text
stringlengths
2.85k
2.55M
label
class label
11 classes
PROC. OF THE 6th EUR. CONF. ON PYTHON IN SCIENCE (EUROSCIPY 2013) 65 SfePy - Write Your Own FE Application Robert Cimrman∗† arXiv:1404.6391v2 [cs.CE] 29 Apr 2014 F Abstract—SfePy (Simple Finite Elements in Python) is a framework for solving various kinds of problems (mechanics, physics, biology, ...) described by partial differential equations in two or three space dimensions by the finite element method. The paper illustrates its use in an interactive environment or as a framework for building custom finite-element based solvers. Index Terms—partial differential equations, finite element method, Python 1 I NTRODUCTION SfePy (Simple Finite Elements in Python) is a multi-platform (Linux, Mac OS X, Windows) software released under the New BSD license, see http://sfepy.org. It implements one of the standard ways of discretizing partial differential equations (PDEs) which is the finite element method (FEM) [R1]. So far, SfePy has been employed for modelling in materials science, including, for example, multiscale biomechanical modelling (bone, muscle tissue with blood perfusion) [R2], [R3], [R4], [R5], [R6], [R7], computation of acoustic transmission coefficients across an interface of arbitrary microstructure geometry [R8], computation of phononic band gaps [R9], [R10], finite element formulation of Schroedinger equation [R11], and other applications, see also Figure 3. The software can be used as • a collection of modules (a library) for building custom or domain-specific applications, • a highly configurable "black box" PDE solver with problem description files in Python. In this paper we focus on illustrating the former use by using a particular example. All examples presented below were tested to work with the version 2013.3 of SfePy. 2 D EVELOPMENT The SfePy project uses Git for source code management and GitHub web site for the source code hosting and developer interaction, similarly to many other scientific python tools. The version 2013.3 has been released in September 18. 2013, and its git-controlled sources contained 761 total files, 138191 total lines (725935 added, 587744 removed) and 3857 commits * Corresponding author: [email protected] † New Technologies Research Centre, University of West Bohemia, Plzeň, Czech Republic c 2014 Robert Cimrman. This is an open-access article disCopyright ○ tributed 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/ done by 15 authors. However, about 90% of all commits were done by the main developer as most authors contributed only a few commits. The project seeks and encourages more regular contributors, see http://sfepy.org/doc-devel/development.html. 3 S HORT D ESCRIPTION The code is written mostly in Python. For speed in general, it relies on fast vectorized operations provided by NumPy [R12] arrays, with heavy use of advanced broadcasting and "index tricks" features. C and Cython [R13] are used in places where vectorization is not possible, or is too difficult/unreadable. Other components of the scientific Python software stack are used as well, among others: SciPy [R14] solvers and algorithms, Matplotlib [R15] for 2D plots, Mayavi [R16] for 3D plots and simple postprocessing GUI, IPython [R17] for a customized shell, SymPy [R18] for symbolic operations/code generation etc. The basic structure of the code allows a flexible definition of various problems. The problems are defined using components directly corresponding to mathematical counterparts present in a weak formulation of a problem in the finite element setting: a solution domain and its sub-domains (regions), variables belonging to suitable discrete function spaces, equations as sums of terms (weak form integrals), various kinds of boundary conditions, material/constitutive parameters etc. The key notion in SfePy is a term, which is the smallest unit that can be used to build equations (linear combinations of terms). It corresponds to a weak formulation integral and takes usually several arguments: (optional) material parameters, a single virtual (or test) function variable and zero or more state (or unknown) variables. The available terms (currently 105) are listed at our web site (http://sfepy.org/doc-devel/terms_ overview.html). The already existing terms allow to solve problems from many scientific domains, see Figure 3. Those terms cover many common PDEs in continuum mechanics, poromechanics, biomechanics etc. with a notable exception of electromagnetism (work in progress, see below). SfePy discretizes PDEs using a continuous Galerkin approximation with finite elements as defined in [R1]. Discontinuous element-wise constant approximation is also possible. Currently the code supports the 2D area (triangle, rectangle) and 3D volume (tetrahedron, hexahedron) elements. Structural elements like shells, plates, membranes or beams are not supported with a single exception of a hyperelastic MooneyRivlin membrane. Several kinds of basis or shape functions can be used for the finite element approximation of the physical fields: 66 PROC. OF THE 6th EUR. CONF. ON PYTHON IN SCIENCE (EUROSCIPY 2013) the classical nodal (Lagrange) basis can be used with all element types; • the hierarchical (Lobatto) basis can be used with tensorproduct elements (rectangle, hexahedron). Although the code can provide the basis function polynomials of a high order (10 or more), orders greater than 4 are not practically usable, especially in 3D. This is caused by the way the code assembles the element contributions into the global matrix - it relies on NumPy vectorization and evaluates the element matrices all at once and then adds to the global matrix - this allows fast term evaluation and assembling but its drawback is a very high memory consumption for high polynomial orders. Also, the polynomial order has to be uniform over the whole (sub)domain where a field is defined. Related to polynomial orders, tables with quadrature points for numerical integration are available or can be generated as needed. We are now working on implementing Nédélec and RaviartThomas vector bases in order to support other kinds of PDEs, such as the Maxwell equations of electromagnetism. Once the equations are assembled, a number solvers can be used to solve the problem. SfePy provides a unified interface to many standard codes, for example UMFPACK [R19], PETSc [R20], Pysparse [R21] as well as the solvers available in SciPy. Various solver classes are supported: linear, nonlinear, eigenvalue, optimization, and time stepping. Besides the external solvers mentioned above, several solvers are implemented directly in SfePy. Nonlinear/optimization solvers: • The Newton solver with a backtracking line-search is the default solver for all problems. For simplicity we use a unified approach to solve both the linear and non-linear problems - former (should) converge in a single nonlinear solver iteration. • The steepest descent optimization solver with a backtracking line-search can be used as a fallback optimization solver when more sophisticated solvers fail. Time-stepping-related solvers: • The stationary solver is used to solve time-independent problems. • The equation sequence solver is a stationary solver that analyzes the dependencies among equations and solves smaller blocks first. An example would be the thermoelasticity problem described below, where the elasticity equation depends on the load given by temperature distribution, but the temperature distribution (Poisson equation) does not depend on deformation. Then the temperature distribution can be found first, followed by the elasticity problem with the already known temperature load. This greatly reduces memory usage and improves speed of solution. • The simple implicit time stepping solver is used for (quasistatic) time-dependent problems, using a fixed time step. • The adaptive implicit time stepping solver can change the time step according to a user provided function. The default function adapt_time_step() decreases the • • 4 step in case of bad Newton convergence and increases the step (up to a limit) when the convergence is fast. It is convenient for large deformation (hyperelasticity) problems. The explicit time stepping solver can be used for dynamic problems. T HERMOELASTICITY E XAMPLE This example involves calculating a temperature distribution in an object followed by an elastic deformation analysis of the object loaded by the thermal expansion and boundary displacement constraints. It shows how to use SfePy in a script/interactively. The actual equations (weak form) are described below. The entire script consists of the following steps: Import modules. The SfePy package is organized into several sub-packages. The example uses: • sfepy.fem: the finite element method (FEM) modules • sfepy.terms: the weak formulation terms - equations building blocks • sfepy.solvers: interfaces to various solvers (SciPy, PETSc, ...) • sfepy.postprocess: post-processing & visualization based on Mayavi import numpy as np from sfepy.fem import (Mesh, Domain, Field, FieldVariable, Material, Integral, Equation, Equations, ProblemDefinition) from sfepy.terms import Term from sfepy.fem.conditions import Conditions, EssentialBC from sfepy.solvers.ls import ScipyDirect from sfepy.solvers.nls import Newton from sfepy.postprocess import Viewer Load a mesh file defining the object geometry. mesh = Mesh.from_file(’meshes/2d/square_tri2.mesh’) domain = Domain(’domain’, mesh) Define solution and boundary conditions domains, called regions. omega = domain.create_region(’Omega’, ’all’) left = domain.create_region(’Left’, ’vertices in x < -0.999’, ’facet’) right = domain.create_region(’Right’, ’vertices in x > 0.999’, ’facet’) bottom = domain.create_region(’Bottom’, ’vertices in y < -0.999’, ’facet’) top = domain.create_region(’Top’, ’vertices in y > 0.999’, ’facet’) Save regions for visualization. domain.save_regions_as_groups(’regions.vtk’) Use a quadratic approximation for temperature field, define unknown T and test s variables. field_t = Field.from_args(’temperature’, np.float64, ’scalar’, omega, 2) t = FieldVariable(’t’, ’unknown’, field_t, 1) s = FieldVariable(’s’, ’test’, field_t, 1, primary_var_name=’t’) SFEPY - WRITE YOUR OWN FE APPLICATION 67 Define numerical quadrature for the approximate integration rule. integral = Integral(’i’, order=2) Define the Laplace equation governing the temperature distribution: Z ∇s · ∇T = 0 , ∀s . Ω term = Term.new(’dw_laplace(s, t)’, integral, omega, s=s, t=t) eq = Equation(’temperature’, term) eqs = Equations([eq]) Set boundary conditions for the temperature: T = 10 on Γleft , T = 30 on Γright . term2 = Term.new(’dw_biot(m.alpha, v, t)’, integral, omega, m=m, v=v, t=t2) eq = Equation(’temperature’, term1 - term2) eqs = Equations([eq]) Set boundary conditions for the displacements: u = 0 on Γbottom , u1 = 0.0 on Γtop (x -component). u_bottom = EssentialBC(’u_bottom’, bottom, {’u.all’ : 0.0}) u_top = EssentialBC(’u_top’, top, {’u.[0]’ : 0.0}) Set the thermoelasticity equations and boundary conditions to the problem definition. pb.set_equations_instance(eqs, keep_solvers=True) pb.time_update(ebcs=Conditions([u_bottom, u_top])) t_left = EssentialBC(’t_left’, left, {’t.0’ : 10.0}) t_right = EssentialBC(’t_right’, right, {’t.0’ : 30.0}) displacement = pb.solve() out.update(displacement.create_output_dict()) Create linear (ScipyDirect) and nonlinear solvers (Newton). Save the solution of both problems into a single VTK file. ls = ScipyDirect({}) nls = Newton({}, lin_solver=ls) pb.save_state(’thermoelasticity.vtk’, out=out) Solve the thermoelasticity problem to get u. Combine the equations, boundary conditions and solvers to form a full problem definition. pb = ProblemDefinition(’temperature’, equations=eqs, nls=nls, ls=ls) pb.time_update(ebcs=Conditions([t_left, t_right])) Display the solution using Mayavi. view = Viewer(’thermoelasticity.vtk’) view(vector_mode=’warp_norm’, rel_scaling=1, is_scalar_bar=True, is_wireframe=True, opacity={’wireframe’ : 0.1}) Solve the temperature distribution problem to get T . 4.1 temperature = pb.solve() out = temperature.create_output_dict() Use a linear approximation for displacement field, define unknown u and test v variables. The variables are vectors with two components in any point, as we are solving on a 2D domain. Results The above script saves the domain geometry as well as the temperature and displacement fields into a VTK file called ’thermoelasticity.vtk’ and also displays the results using Mayavi. The results are shown in Figures 1 and 2. field_u = Field.from_args(’displacement’, np.float64, ’vector’, omega, 1) u = FieldVariable(’u’, ’unknown’, field_u, mesh.dim) v = FieldVariable(’v’, ’test’, field_u, mesh.dim, primary_var_name=’u’) Set Lamé parameters of elasticity λ , µ, thermal expansion coefficient αi j and background temperature T0 . Constant values are used here. In general, material parameters can be given as functions of space and time. lam = 10.0 # Lame parameters. mu = 5.0 te = 0.5 # Thermal expansion coefficient. T0 = 20.0 # Background temperature. eye_sym = np.array([[1], [1], [0]], dtype=np.float64) m = Material(’m’, lam=lam, mu=mu, alpha=te * eye_sym) Define and set the temperature load variable to T − T0 . t2 = FieldVariable(’t’, ’parameter’, field_t, 1, primary_var_name=’(set-to-None)’) t2.set_data(t() - T0) Define the thermoelasticity equation governing structure deformation: Z Ω Di jkl ei j (v)ekl (u) − Z (T − T0 ) αi j ei j (v) = 0 , ∀v , Ω where Di jkl = µ(δik δ jl + δil δ jk ) + λ δi j δkl is the homogeneous ∂u isotropic elasticity tensor and ei j (u) = 12 ( ∂∂ xuij + ∂ xij ) is the small strain tensor. The equations can be built as linear combinations of terms. Fig. 1: The temperature distribution. 5 A LTERNATIVE WAY: P ROBLEM D ESCRIPTION F ILES Problem description files (PDF) are Python modules containing definitions of the various components (mesh, regions, fields, equations, ...) using basic data types such as dict and tuple. For simple problems, no programming at all is term1 = Term.new(’dw_lin_elastic_iso(m.lam, m.mu, v, u)’, integral, omega, m=m, v=v, u=u) required. On the other hand, all the power of Python (and 68 PROC. OF THE 6th EUR. CONF. ON PYTHON IN SCIENCE (EUROSCIPY 2013) } solvers = { ’ls’ : (’ls.scipy_direct’, {}), ’newton’ : (’nls.newton’, {’i_max’ : 1, ’eps_a’ : 1e-10, }), } options = { ’nls’ : ’newton’, ’ls’ : ’ls’, } Many more examples can be found at http://docs.sfepy.org/ gallery/gallery or http://sfepy.org/doc-devel/examples.html. 6 Fig. 2: The deformed mesh showing displacements. supporting SfePy modules) is available when needed. The definitions are used to construct and initialize in an automatic way the corresponding objects, similarly to what was presented in the example above, and the problem is solved. The main script for running a simulation described in a PDF is called simple.py. C ONCLUSION We briefly introduced the open source finite element package SfePy as a tool for building domain-specific FE-based solvers as well as a black-box PDE solver. 6.1 Work on SfePy is partially supported by the Grant Agency of the Czech Republic, projects P108/11/0853 and 101/09/1630. R EFERENCES [R1] 5.1 Example: Temperature Distribution This example defines the problem of temperature distribution on a 2D rectangular domain. It directly corresponds to the temperature part of the thermoelasticity example, only for the sake of completeness a definition of a material coefficient is shown as well. [R2] [R3] from sfepy import data_dir [R4] filename_mesh = data_dir + ’/meshes/2d/square_tri2.mesh’ materials = { ’coef’ : ({’val’ : 1.0},), } [R5] regions = { ’Omega’ : ’all’, ’Left’ : (’vertices in (x < -0.999)’, ’facet’), ’Right’ : (’vertices in (x > 0.999)’, ’facet’), } [R6] fields = { ’temperature’ : (’real’, 1, ’Omega’, 2), } [R8] [R7] [R9] variables = { ’t’ : (’unknown field’, ’temperature’, 0), ’s’ : (’test field’, ’temperature’, ’t’), } Support [R10] ebcs = { ’t_left’ : (’Left’, {’t.0’ : 10.0}), ’t_right’ : (’Right’, {’t.0’ : 30.0}), } [R11] integrals = { ’i1’ : (’v’, 2), } [R12] equations = { ’eq’ : ’dw_laplace.i1.Omega(coef.val, s, t) = 0’ [R14] [R13] Thomas J. R. Hughes, The Finite Element Method: Linear Static and Dynamic Finite Element Analysis, Dover Publications, 2000. R.~Cimrman and E.~Rohan. Two-scale modeling of tissue perfusion problem using homogenization of dual porous media. International Journal for Multiscale Computational Engineering, 8(1):81-102, 2010. E.~Rohan, R.~Cimrman, S.~Naili, and T.~Lemaire. Multiscale modelling of compact bone based on homogenization of double porous medium. In Computational Plasticity X - Fundamentals and Applications, 2009. E.~Rohan and R.~Cimrman. Multiscale fe simulation of diffusiondeformation processes in homogenized dual-porous media. Mathematics and Computers in Simulation, 82(10):1744--1772, 2012. R.~Cimrman and E.~Rohan. On modelling the parallel diffusion flow in deforming porous media. Mathematics and Computers in Simulation, 76(1-3):34--43, 2007. E.~Rohan and R.~Cimrman. Multiscale fe simulation of diffusiondeformation processes in homogenized dual-porous media. Mathematics and Computers in Simulation, 82(10):1744--1772, 2012. E.~Rohan, S.~Naili, R.~Cimrman, and T.~Lemaire. Hierarchical homogenization of fluid saturated porous solid with multiple porosity scales. Comptes Rendus - Mecanique, 340(10):688--694, 2012. E.~Rohan and V.~Lukeš. Homogenization of the acoustic transmission through a perforated layer. Journal of Computational and Applied Mathematics, 234(6):1876--1885, 2010. E.~Rohan, B.~Miara, and F.~Seifrt. Numerical simulation of acoustic band gaps in homogenized elastic composites. International Journal of Engineering Science, 47(4):573--594, 2009. E.~Rohan and B.~Miara. Band gaps and vibration of strongly heterogeneous reissner-mindlin elastic plates. Comptes Rendus Mathematique, 349(13-14):777--781, 2011. R.~Cimrman, J.~Vackář, M.~Novák, O.~Čertík, E.~Rohan, and M.~Tůma. Finite element code in python as a universal and modular tool applied to kohn-sham equations. In ECCOMAS 2012 - European Congress on Computational Methods in Applied Sciences and Engineering, e-Book Full Papers, pages 5212--5221, 2012. T. E. Oliphant. Python for scientific computing. Computing in Science & Engineering, 9(3):10-20, 2007. http://www.numpy.org. R. Bradshaw, S. Behnel, D. S. Seljebotn, G. Ewing, et al. The Cython compiler. http://cython.org. E. Jones, T. E. Oliphant, P. Peterson, et al. SciPy: Open source scientific tools for Python, 2001-. http://www.scipy.org. SFEPY - WRITE YOUR OWN FE APPLICATION Fig. 3: Gallery of applications. Perfusion and acoustic images by Vladimír Lukeš. [R15] J. D. Hunter. Matplotlib: A 2d graphics environment. Computing in Science & Engineering, 9(3):90-95, 2007. http://matplotlib.org/. [R16] P. Ramachandran and G. Varoquaux. Mayavi: 3d visualization of scientific data. IEEE Computing in Science & Engineering, 13(2):4051, 2011. [R17] F. Pérez and B. E. Granger. IPython: A system for interactive scientific computing. Computing in Science & Engineering, 9(3):21-29, 2007. http://ipython.org/. [R18] SymPy Development Team. Sympy: Python library for symbolic mathematics, 2013. http://www.sympy.org. [R19] T. A. Davis. Algorithm 832: UMFPACK, an unsymmetric-pattern multifrontal method. ACM Transactions on Mathematical Software, 30(2):196--199, 2004. [R20] S. Balay, J. Brown, K. Buschelman, W. D. Gropp, D. Kaushik, M. G. Knepley, L. C. McInnes, B. F. Smith, and H. Zhang. PETSc Web page, 2013. http://www.mcs.anl.gov/petsc. [R21] R. Geus, D. Wheeler, and D. Orban. Pysparse documentation. http: //pysparse.sourceforge.net. 69 70 PROC. OF THE 6th EUR. CONF. ON PYTHON IN SCIENCE (EUROSCIPY 2013)
6cs.PL
Nonparametric independence testing via mutual arXiv:1711.06642v1 [stat.ME] 17 Nov 2017 information Thomas B. Berrett and Richard J. Samworth Statistical Laboratory, University of Cambridge November 20, 2017 Abstract We propose a test of independence of two multivariate random vectors, given a sample from the underlying population. Our approach, which we call MINT, is based on the estimation of mutual information, whose decomposition into joint and marginal entropies facilitates the use of recently-developed efficient entropy estimators derived from nearest neighbour distances. The proposed critical values, which may be obtained from simulation (in the case where one marginal is known) or resampling, guarantee that the test has nominal size, and we provide local power analyses, uniformly over classes of densities whose mutual information satisfies a lower bound. Our ideas may be extended to provide a new goodness-of-fit tests of normal linear models based on assessing the independence of our vector of covariates and an appropriately-defined notion of an error vector. The theory is supported by numerical studies on both simulated and real data. 1 Introduction Independence is a fundamental concept in statistics and many related fields, underpinning the way practitioners frequently think about model building, as well as much of statistical theory. Often we would like to assess whether or not the assumption of independence is reasonable, for instance as a method of exploratory data analysis (Steuer et al., 2002; Albert et al., 2015; Nguyen and Eisenstein, 2017), or as a way of evaluating the goodness-of-fit of a statistical model (Einmahl and van Keilegom, 2008). Testing independence and estimating dependence 1 are well-established areas of statistics, with the related idea of the correlation between two random variables dating back to Francis Galton’s work at the end of the 19th century (Stigler, 1989), which was subsequently expanded upon by Karl Pearson (e.g. Pearson, 1920). Since then many new measures of dependence have been developed and studied, each with its own advantages and disadvantages, and there is no universally accepted measure. For surveys of several measures, see, for example, Schweizer (1981), Joe (1989), Mari and Kotz (2001) and the references therein. We give an overview of more recently-introduced quantities below; see also Josse and Holmes (2016). In addition to the applications mentioned above, dependence measures play an important role in independent component analysis (ICA), a special case of blind source separation, in which a linear transformation of the data is sought so that the transformed data is maximally independent; see e.g. Comon (1994), Bach and Jordan (2002), Miller and Fisher (2003) and Samworth and Yuan (2012). Here, independence tests may be carried out to check the convergence of an ICA algorithm and to validate the results (e.g. Wu, Yu and Li, 2009). Further examples include feature selection, where one seeks a set of features which contains the maximum possible information about a response (Torkkola, 2003; Song et al., 2012), and the evaluation of the quality of a clustering in cluster analysis (Vinh, Epps and Bailey, 2010). When dealing with discrete data, often presented in a contingency table, the independence testing problem is typically reduced to testing the equality of two discrete distributions via a chi-squared test. Here we will focus on the case of distributions that are absolutely continuous with respect to the relevant Lebesgue measure. Classical nonparametric approaches to measuring dependence and independence testing in such cases include Pearson’s correlation coefficient, Kendall’s tau and Spearman’s rank correlation coefficient. Though these approaches are widely used, they suffer from a lack of power against many alternatives; indeed Pearson’s correlation only measures linear relationships between variables, while Kendall’s tau and Spearman’s rank correlation coefficient measure monotonic relationships. Thus, for example, if X has a symmetric distribution on the real line, and Y = X 2 , then the population quantities corresponding to these test statistics are zero in all three cases. Hoeffding’s test of independence (Hoeffding, 1948) is able to detect a wider class of departures from independence and is distribution-free under the null hypothesis but, as with these other classical methods, was only designed for univariate variables. Recent work of Weihs, Drton and Meinshausen (2017) has aimed to address some of computational challenges involved in extending these ideas to multivariate settings. 2 Recent research has focused on constructing tests that can be used for more complex data and that are consistent against wider classes of alternatives. The concept of distance covariance was introduced in Székely, Rizzo and Bakirov (2007) and can be expressed as a weighted L2 norm between the characteristic function of the joint distribution and the product of the marginal characteristic functions. This concept has also been studied in high dimensions (Székely and Rizzo, 2013; Yao, Zhang and Shao, 2017), and for testing independence of several random vectors (Fan et al., 2017). In Sejdinovic et al. (2013) tests based on distance covariance were shown to be equivalent to a reproducing kernel Hilbert space (RKHS) test for a specific choice of kernel. RKHS tests have been widely studied in the machine learning community, with early understanding of the subject given by Bach and Jordan (2002) and Gretton et al. (2005), in which the Hilbert–Schmidt independence criterion was proposed. These tests are based on embedding the joint distribution and product of the marginal distributions into a Hilbert space and considering the norm of their difference in this space. One drawback of the kernel paradigm here is the computational complexity, though Jitkrittum, Szabó and Gretton (2016) and Zhang et al. (2017) have recently attempted to address this issue. The performance of these methods may also be strongly affected by the choice of kernel. In another line of work, there is a large literature on testing independence based on an empirical copula process; see for example Kojadinovic and Holmes (2009) and the references therein. Other test statistics include those based on partitioning the sample space (e.g. Gretton and Györfi, 2010; Heller et al., 2016). These have the advantage of being distribution-free under the null hypothesis, though their performance depends on the particular partition chosen. We also remark that the basic independence testing problem has spawned many variants. For instance, Pfister et al. (2017) extend kernel tests to tests of mutual independence between a group of random vectors. Another important extension is to the problem of testing conditional independence, which is central to graphical modelling (Lauritzen, 1996) and also relevant to causal inference (Pearl, 2009). Existing tests of conditional independence include the proposals of Su and White (2008), Zhang et al. (2011) and Fan, Feng and Xia (2017). To formalise the problem we consider, let X and Y have (Lebesgue) densities fX on RdX and fY on RdY respectively, and let Z = (X, Y ) have density f on Rd , where d := dX + dY . Given independent and identically distributed copies Z1 , . . . , Zn of Z, we wish to test the null hypothesis that X and Y are independent, denoted H0 : X ⊥⊥ Y , against the alternative that X and Y are not independent, written H1 : X 6⊥⊥ Y . Our approach is based on constructing an estimator Ibn = Ibn (Z1 , . . . , Zn ) of the mutual information I(X; Y ) between 3 X and Y . Mutual information turns out to be a very attractive measure of dependence in this context; we review its definition and basic properties in Section 2 below. In particular, its decomposition into joint and marginal entropies (see (1) below) facilitates the use of recentlydeveloped efficient entropy estimators derived from nearest neighbour distances (Berrett, Samworth and Yuan, 2017). The next main challenge is to identify an appropriate critical value for the test. In the simpler setting where either of the marginals fX and fY is known, a simulation-based approach can be employed to yield a test of any given size q ∈ (0, 1). We further provide regularity conditions under which the power of our test converges to 1 as n → ∞, uniformly over classes of alternatives with I(X; Y ) ≥ bn , say, where we may even take bn = o(n−1/2 ). To the best of our knowledge this is the first time that such a local power analysis has been carried out for an independence test for multivariate data. When neither marginal is known, we obtain our critical value via a permutation approach, again yielding a test of the nominal size. Here, under our regularity conditions, the test is uniformly consistent (has power converging to 1) against alternatives whose mutual information is bounded away from zero. We call our test MINT, short for Mutual Information Test; it is implemented in the R package IndepTest (Berrett, Grose and Samworth, 2017). As an application of these ideas, we are able to introduce new goodness-of-fit tests of normal linear models based on assessing the independence of our vector of covariates and an appropriately-defined notion of an error vector. Such tests do not follow immediately from our earlier work, because we do not observe realisations of the error vector directly; instead, we only have access to residuals from a fitted model. Nevertheless, we are able to provide rigorous justification, again in the form of a local analysis, for our approach. It seems that, when fitting normal linear models, current standard practice in the applied statistics community for assessing goodness-of-fit is based on visual inspection of diagnostic plots such as those provided by the plot command in R when applied to an object of class lm. Our aim, then, is to augment the standard toolkit by providing a formal basis for inference regarding the validity of the model. Related work here includes Neumeyer (2009), Neumeyer and Van Keilegom (2010), Müller, Schick and Wefelmeyer (2012), Sen and Sen (2014) and Shah and Bühlmann (2017). The remainder of the paper is organised as follows: after reviewing the concept of mutual information in Section 2.1, we explain in Section 2.2 how it can be estimated effectively from data using efficient entropy estimators. Our new tests, for the cases where one of the marginals is known and where they are both unknown, are introduced in Sections 3 and 4 4 respectively. The regression setting is considered in Section 5, and numerical studies on both simulated and real data are presented in Section 6. Proofs are given in Section 7. The following notation is used throughout. For a generic dimension D ∈ N, let λD and k · k denote Lebesgue measure and the Euclidean norm on RD respectively. If f = dµ/dλD and g = dν/dλD are densities on RD with respect to λD , we write f  g if µ  ν. For z ∈ RD and r ∈ [0, ∞), we write Bz (r) := {w ∈ RD : kw − zk ≤ r} and Bz◦ (r) := Bz (r) \ {z}. We write λmin (A) for the smallest eigenvalue of a positive definite matrix A, and kBkF for the Frobenius norm of a matrix B. 2 2.1 Mutual information Definition and basic properties Retaining our notation from the introduction, let Z := {(x, y) : f (x, y) > 0}. A very natural measure of dependence is the mutual information between X and Y , defined to be Z f (x, y) log I(X; Y ) = I(f ) := Z f (x, y) dλd (x, y), fX (x)fY (y) when f  fX fY , and defined to be ∞ otherwise. This is the Kullback–Leibler divergence between the joint distribution of (X, Y ) and the product of the marginal distributions, so is non-negative, and equal to zero if and only if X and Y are independent. Another attractive feature of mutual information as a measure of dependence is that it is invariant to smooth, invertible transformations of X and Y . Indeed, suppose that X := {x : fX (x) > 0} is an open subset of RdX and φ : X → X 0 is a continuously differentiable bijection whose inverse φ−1 has Jacobian determinant J(x0 ) that never vanishes on X 0 . Let Φ : X × Y → X 0 × Y be  given by Φ(x, y) := φ(x), y , so that Φ−1 (x0 , y) = φ−1 (x0 ), y) also has Jacobian determinant  J(x0 ). Then Φ(X, Y ) has density g(x0 , y) = f φ−1 (x0 ), y |J(x0 )| on Φ(Z) and X 0 = φ(X)  has density gX 0 (x0 ) = fX φ−1 (x0 ) |J(x0 )| on X 0 . It follows that g(x0 , y) dλd (x0 , y) I φ(X); Y = g(x , y) log 0 gX 0 (x )fY (y) Φ(Z)  Z f φ−1 (x0 ), y 0  = g(x , y) log dλd (x0 , y) = I(X; Y ). −1 0 fX φ (x ) fY (y) Φ(Z)  Z 0 5 This means that mutual information is nonparametric in the sense of Weihs, Drton and Meinshausen (2017), whereas several other measures of dependence, including distance covariance, RKHS measures and correlation-based notions are not in general. Under a mild assumption, the mutual information between X and Y can be expressed in terms of their joint and marginal entropies; more precisely, writing Y := {y : fY (y) > 0}, and provided that each of H(X, Y ), H(X) and H(Y ) are finite, Z Z Z f log f dλd − I(X; Y ) = Z fX log fX dµdX − X fY log fY dµdY Y =: −H(X, Y ) + H(X) + H(Y ). (1) Thus, mutual information estimators can be constructed from entropy estimators. Moreover, the concept of mutual information is easily generalised to more complex situations. For instance, suppose now that (X, Y, W ) has joint density f on Rd+dW , and let f(X,Y )|W (·|w), fX|W (·|w) and fY |W (·|w) denote the joint conditional density of (X, Y ) given W = w and the conditional densities of X given W = w and Y given W = w respectively. When f(X,Y )|W (·, ·|w)  fX|W (·|w)fY |W (·|w) for each w in the support of W , the conditional mutual information between X and Y given W is defined as Z I(X; Y |W ) := f (x, y, w) log W f(X,Y )|W (x, y|w) dλd+dW (x, y, w), fX|W (x|w)fY |W (y|w) where W := {(x, y, w) : f (x, y, w) > 0}. This can similarly be written as I(X; Y |W ) = H(X, W ) + H(Y, W ) − H(X, Y, W ) − H(W ), provided each of the summands is finite. Finally, we mention that the concept of mutual information easily generalises to situations with p random vectors. In particular, suppose that X1 , . . . , Xp have joint density f on Rd , where d = d1 +. . .+dp and that Xj has marginal density fj on Rdj . Then, when f  f1 . . . fp , and writing Xp := {(x1 , . . . , xp ) ∈ Rd : f (x1 , . . . , xp ) > 0}, we can define Z I(X1 ; . . . ; Xp ) := f (x1 , . . . , xp ) log Xp = p X f (x1 , . . . , xp ) dλd (x1 , . . . , xp ) f1 (x1 ) . . . fp (xp ) H(Xj ) − H(X1 , . . . , Xp ), j=1 6 with the second equality holding provided that each of the entropies is finite. The tests we introduce in Sections 3 and 4 therefore extend in a straightforward manner to tests of independence of several random vectors. 2.2 Estimation of mutual information For i = 1, . . . , n, let Z(1),i , . . . , Z(n−1),i denote a permutation of {Z1 , . . . , Zn } \ {Zi } such that kZ(1),i − Zi k ≤ . . . ≤ kZ(n−1),i − Zi k. For conciseness, we let ρ(k),i := kZ(k),i − Zi k denote the distance between Zi and the kth nearest neighbour of Zi . To estimate the unknown entropies, we will use a weighted version of the Kozachenko–Leonenko estimator (Kozachenko and Leonenko, 1987). For k = k Z ∈ {1, . . . , n − 1} and weights w1Z , . . . , wkZ P satisfying kj=1 wjZ = 1, this is defined as   d n k ρ(j),i Vd (n − 1) 1 XX Z d,wZ Z b b Hn = Hn,k (Z1 , . . . , Zn ) := w log , n i=1 j=1 j eΨ(j) where Vd := π d/2 /Γ(1 + d/2) denotes the volume of the unit d-dimensional Euclidean ball and where Ψ denotes the digamma function. Berrett, Samworth and Yuan (2017) provided b nZ conditions on k, w1Z , . . . , wZ and the underlying data generating mechanism under which H k is an efficient estimator of H(Z) (in the sense that its asymptotic normalised squared error risk achieves the local asymptotic minimax lower bound) in arbitrary dimensions. With b nX and H b nY of H(X) and H(Y ) defined analogously as functions of (X1 , . . . , Xn ) estimators H and (Y1 , . . . , Yn ) respectively, we can use (1) to define an estimator of mutual information by bX + H bY − H bZ. Ibn = Ibn (Z1 , . . . , Zn ) = H n n n (2) Having identified an appropriate mutual information estimator, we turn our attention in the next two sections to obtaining appropriate critical values for our independence tests. 7 3 The case of one known marginal distribution In this section, we consider the case where at least one of fX and fY in known (in our experience, little is gained by knowledge of the second marginal density), and without loss of generality, we take the known marginal to be fY . We further assume that we can generate in(b) dependent and identically distributed copies of Y , denoted {Yi : i = 1, . . . , n, b = 1, . . . , B}, independently of Z1 , . . . , Zn . Our test in this setting, which we refer to as MINTknown (or MINTknown(q) when the nominal size q ∈ (0, 1) needs to be made explicit), will reject H0 for large values of Ibn . The ideal critical value, if both marginal densities were known, would therefore be Cq(n) := inf{r ∈ R : PfX fY (Ibn > r) ≤ q}. (b) Using our pseudo-data {Yi : i = 1, . . . , n, b = 1, . . . , B}, generated as described above, we define the statistics  (b) Ibn(b) = Ibn (X1 , Y1 ), . . . , (Xn , Yn(b) ) for b = 1, . . . , B. Motivated by the fact that these statistics have the same distribution as (n) Ibn under H0 , we can estimate the critical value Cq by  (n),B b Cq := inf r ∈ R :  B 1 X 1 (b) ≤ q , B + 1 b=0 {Ibn ≥r} (0) (B) (0) the (1 − q)th quantile of {Ibn , . . . , Ibn }, where Ibn := Ibn . The following lemma justifies this critical value estimate. Lemma 1. For any q ∈ (0, 1) and B ∈ N, the MINTknown(q) test that rejects H0 if and only bq(n),B has size at most q, in the sense that if Ibn > C sup  bq(n),B ≤ q, P Ibn > C sup k∈{1,...,n−1} (X,Y ):I(X;Y )=0 where the inner supremum is over all joint distributions of pairs (X, Y ) with I(X; Y ) = 0. An interesting feature of MINTknown, which is apparent from the proof of Lemma 1, is b X in (1), either on the original data, or on the pseudothat there is no need to calculate H n (b) (b) data sets {(X1 , Y1 ), . . . , (Xn , Yn ) : b = 1, . . . , B}. This is because in the (b) b X appears on both sides of of the event {Ibn ≥ Ibn } into entropy estimates, H n decomposition the inequality, so it cancels. This observation somewhat simplifies our assumptions and analysis, as well as 8 reducing the number of tuning parameters that need to be chosen. The remainder of this section is devoted to a rigorous study of the power of MINTknown that is compatible with a sequence of local alternatives (fn ) having mutual information In → 0. To this end, we first define the classes of alternatives that we consider; these parallel the classes introduced by Berrett, Samworth and Yuan (2017) in the context of entropy estimation. Let Fd denote the class of all density functions with respect to Lebesgue measure on Rd . For f ∈ Fd and α > 0, let Z kzkα f (z) dz. µα (f ) := Rd Now let A denote the class of decreasing functions a : (0, ∞) → [1, ∞) satisfying a(δ) = o(δ − ) as δ & 0, for every  > 0. If a ∈ A, β > 0, f ∈ Fd is m := (dβe − 1)-times differentiable and z ∈ Z, we define ra (z) := {8d1/2 a(f (z))}−1/(β∧1) and kf (t) (z)k , Mf,a,β (z) := max max t=1,...,m f (z)   kf (m) (w) − f (m) (z)k sup . f (z)kw − zkβ−m w∈Bz◦ (ra (z)) The quantity Mf,a,β (z) measures the smoothness of derivatives of f in neighbourhoods of z, relative to f (z) itself. Note that these neighbourhoods of z are allowed to become smaller when f (z) is small. Finally, for Θ := (0, ∞)4 × A, and θ = (α, β, ν, γ, a) ∈ Θ, let Fd,θ   := f ∈ Fd : µα (f ) ≤ ν, kf k∞ ≤ γ, sup Mf,a,β (z) ≤ a(δ) ∀δ > 0 . z:f (z)≥δ Berrett, Samworth and Yuan (2017) show that all Gaussian and multivariate-t densities (amongst others) belong to Fd,θ for appropriate θ ∈ Θ. Now, for dX , dY ∈ N and ϑ = (θ, θY ) ∈ Θ2 , define n o FdX ,dY ,ϑ := f ∈ FdX +dY ,θ : fY ∈ FdY ,θY , fX fY ∈ FdX +dY ,θ and, for b ≥ 0, let n o FdX ,dY ,ϑ (b) := f ∈ FdX ,dY ,ϑ : I(f ) > b . Thus, FdX ,dY ,ϑ (b) consists of joint densities whose mutual information is greater than b. In Theorem 2 below, we will show that for a suitable choice of b = bn and for certain ϑ ∈ Θ2 , the power of the test defined in Lemma 1 converges to 1, uniformly over FdX ,dY ,ϑ (b). Before we can state this result, however, we must define the allowable choices of k and 9 the weight vectors. Given d ∈ N and θ = (α, β, γ, ν, a) ∈ Θ let  α−d 4(β ∧ 1) 2α , , τ1 (d, θ) := min 5α + 3d 2α 4(β ∧ 1) + 3d and    d d/4 τ2 (d, θ) := min 1 − , 1− 2β bd/4c + 1 Note that mini=1,2 τi (d, θ) > 0 if and only if both α > d and β > d/2. Finally, for k ∈ N, let W (k)  := T k w = (w1 , . . . , wk ) ∈ R : k X wj j=1 k X Γ(j + 2`/d) = 0 for ` = 1, . . . , bd/4c Γ(j)  wj = 1 and wj = 0 if j ∈ / {bk/dc, b2k/dc, . . . , k} . j=1 Thus, our weights sum to 1; the other constraints ensure that the dominant contributions to the bias of the unweighted Kozachenko–Leonenko estimator cancel out to sufficiently high order, and that the corresponding jth nearest neighbour distances are not too highly correlated. Theorem 2. Fix dX , dY ∈ N, set d = dX + dY and fix ϑ = (θ, θY ) ∈ Θ2 with n o min τ1 (d, θ) , τ1 (dY , θY ) , τ2 (d, θ) , τ2 (dY , θY ) > 0. ∗ ∗ and k ∗ = kn∗ denote any deterministic sequences of positive integers , kY∗ = kY,n Let k0∗ = k0,n with k0∗ ≤ min{kY∗ , k ∗ }, with k0∗ / log5 n → ∞ and with  max k∗ nτ1 (d,θ)− , kY∗ nτ1 (dY ,θY )− , k∗ nτ2 (d,θ) , kY∗ nτ2 (dY ,θY )  →0 (k ) for some  > 0. Also suppose that wY = wY Y ∈ W (kY ) and w = w(k) ∈ W (k) , and that lim supn max(kwk, kwY k) < ∞. Then there exists a sequence (bn ) such that bn = o(n−1/2 ) and with the property that for each q ∈ (0, 1) and any sequence (Bn∗ ) with Bn∗ → ∞, inf inf inf ∗ k ∈{k ∗ ,...,k ∗ } f ∈F Bn ≥Bn Y dX ,dY ,ϑ (bn ) 0 Y k∈{k0∗ ,...,k∗ } b(n),Bn ) → 1. Pf (Ibn > C q Theorem 2 provides a strong guarantee on the ability of MINTknown to detect alternatives, 10 uniformly over classes whose mutual information is at least bn , where we may even have bn = o(n−1/2 ). 4 The case of unknown marginal distributions We now consider the setting in which the marginal distributions of both X and Y are unknown. Our test statistic remains the same, but now we estimate the critical value by permuting our sample in an attempt to mimic the behaviour of the test statistic under H0 . More explicity, for some B ∈ N, we propose independently of (X1 , Y1 ), . . . , (Xn , Yn ) to simulate independent random variables τ1 , . . . , τB uniformly from Sn , the permutation group (b) (b) (b) (b) of {1, . . . , n}, and for b = 1, . . . , B, set Z := (Xi , Yτ (i) ) and I˜n := Ibn (Z1 , . . . , Zn ). For i q ∈ (0, 1), we can now estimate C̃q(n),B (n) Cq b by  := inf r ∈ R :  B 1 X 1 (b) ≤ q , B + 1 b=0 {I˜n ≥r} (0) (n),B where I˜n := Ibn , and refer to the test that rejects H0 if and only if Ibn > C̃q as MINTunknown(q). Lemma 3. For any q ∈ (0, 1) and B ∈ N, the MINTunknown(q) test has size at most q: sup  P Ibn > C̃q(n),B ≤ q. sup k∈{1,...,n−1} (X,Y ):I(X;Y )=0 (n),B Note that Ibn > C̃q if and only if B 1 X 1 (b) ≤ q. B + 1 b=0 {I˜n ≥Ibn } (3) This shows that estimating either of the marginal entropies is unnecessary to carry out (b) b Z − H̃n(b) , where H̃n(b) := H b d,wZ (Z1(b) , . . . , Zn(b) ) is the weighted the test, since I˜n − Ibn = H n n,k Kozachenko–Leonenko joint entropy estimator based on the permuted data. We now study the power of MINTunknown, and begin by introducing the classes of marginal densities that we consider. To define an appropriate notion of smoothness, for 11 z ∈ {w : g(w) > 0} =: W, g ∈ Fd and δ > 0, let  rz,g,δ := δeΨ(k) Vd (n − 1)g(z) 1/d . (4) Now, for A belonging to the class of Borel subsets of W, denoted B(W), define Mg (A) := sup sup δ∈(0,2] z∈A Z 1 d g(z) Vd rz,g,δ g dλd − 1 . Bz (rz,g,δ ) Both rz,g,δ and Mg (·) depend on n and k, but for simplicity we suppress this in our notation. Let φ = (α, µ, ν, (cn ), (pn )) ∈ (0, ∞)3 × [0, ∞)N × [0, ∞)N =: Φ and define GdX ,dY ,φ  := f ∈ FdX +dY : max{µα (fX ), µα (fY )} ≤ µ, max{kfX k∞ , kfY k∞ } ≤ ν,  Z fX fY dλd ≤ pn ∀n ∈ N . ∃Wn ∈ B(X × Y) s.t. MfX fY (Wn ) ≤ cn , Wnc In addition to controlling the αth moment and uniform norms of the marginals fX and fY , the class Gd,φ asks for there to be a (large) set Wn on which this product of marginal densities is uniformly well approximated by a constant over small balls. This latter condition is satisfied by products of many standard parametric families of marginal densities, including normal, Weibull, Gumbel, logistic, gamma, beta, and t densities, and is what ensures that nearest neighbour methods are effective in this context. The corresponding class of joint densities we consider, for φ = (α, µ, ν, (cn ), (pn )) ∈ Φ, is Hd,φ  := f ∈ Fd : µα (f ) ≤ µ, kf k∞ ≤ ν, Z ∃Zn ∈ B(Z) s.t. Mf (Zn ) ≤ cn ,  f dλd ≤ pn ∀n ∈ N . Znc In many cases, we may take Zn = {z : f (z) ≥ δn }, for some appropriately chosen sequence (δn ) with δn → 0 as n → ∞. For instance, suppose we fix d ∈ N and θ = (α, β, ν, γ, a) ∈ Θ. Then, by Berrett, Samworth and Yuan (2017, Lemma 12), there exists such a sequence (δn ), as well as sequences (cn ) and (pn ), where d ka(k/(n − 1)) β∧1 δn = log(n − 1), n−1 β∧1 β∧1 15 2 d d3/2 cn = log− d (n − 1), 7 d + (β ∧ 1) 12 α for large n and pn = o((k/n) α+d − ) for every  > 0, such that Fd,θ ⊆ Hd,φ with φ = (α, µ, ν, (cn ), (pn )) ∈ Φ. We are now in a position to state our main result on the power of MINTunknown. Theorem 4. Let dX , dY ∈ N, let d = dX +dY and fix φ = (α, µ, ν, (cn ), (pn )) ∈ Φ with cn → 0 ∗ ∗ and pn = o(1/ log n) as n → ∞. Let k0∗ = k0,n and k1∗ = k1,n denote two deterministic sequences of positive integers satisfying k0∗ ≤ k1∗ , k0∗ / log2 n → ∞ and (k1∗ log2 n)/n → 0. Then for any b > 0, q ∈ (0, 1) and any sequence (Bn∗ ) with Bn∗ → ∞ as n → ∞, inf inf inf ∗ k∈{k ∗ ,...,k ∗ } f ∈G Bn ≥Bn dX ,dY ,φ ∩Hd,φ : 0 1 I(f )≥b Pf (Ibn > C̃q(n),Bn ) → 1 as n → ∞. Theorem 4 shows that MINTunknown is uniformly consistent against a wide class of alternatives. 5 Regression setting In this section we aim to extend the ideas developed above to the problem of goodness-offit testing in linear models. Suppose we have independent and identically distributed pairs (X1 , Y1 ), . . . , (Xn , Yn ) taking values in Rp × R, with E(Y12 ) < ∞ and E(X1 X1T ) finite and positive definite. Then β0 := argmin E{(Y1 − X1T β)2 } β∈Rp is well-defined, and we can further define i := Yi − XiT β0 for i = 1, . . . , n. We show in the proof of Theorem 6 below that E(1 X1 ) = 0, but for the purposes of interpretability and inference, it is often convenient if the random design linear model Yi = XiT β0 + i , i = 1, . . . , n, holds with Xi and i independent. A goodness-of-fit test of this property amounts to a test of H0 : X1 ⊥⊥ 1 against H1 : X1 6⊥⊥ 1 . The main difficulty here is that 1 , . . . , n are not observed directly. Given an estimator βb of β0 , the standard approach for dealing with this problem is to compute residuals b i := Yi − XiT βb for i = 1, . . . , n, and use these as a proxy for 1 , . . . , n . Many introductory statistics textbooks, e.g. Dobson (2002, Section 2.3.4), Dalgaard (2002, Section 5.2) suggest examining for patterns plots of residuals against fitted 13 values, as well as plots of residuals against each covariate in turn, as a diagnostic, though it is difficult to formalise this procedure. (It is also interesting to note that when applying the plot function in R to an object of type lm, these latter plots of residuals against each covariate in turn are not produced, presumably because it would be prohibitively time-consuming to check them all in the case of many covariates.) The naive approach based on our work so far is simply to use the permutation test of Section 4 on the data (X1 , b 1 ), . . . , (Xn , b n ). Unfortunately, calculating the test statistic Ibn on permuted data sets does not result in an exchangeable sequence, which makes it difficult to ensure that this test has the nominal size q. To circumvent this issue, we assume that the marginal distribution of 1 under H0 has E(1 ) = 0 and is known up to a scale factor σ 2 := E(21 ); in practice, it will often be the case that this marginal distribution is taken to be N (0, σ 2 ), for some unknown σ > 0. We also assume that we can sample from the density fη of η1 := 1 /σ; of course, this is straightforward in the normal distribution case above. Let X = (X1 · · · Xn )T , Y = (Y1 , . . . , Yn )T , and suppose the vector of residuals b  := (b 1 , . . . , b n )T is computed from the least squares estimator βb := (X T X)−1 X T Y . We then define standardised residuals by ηbi := b i /b σ , for i = 1, . . . , n, where σ b2 := n−1 kb k2 ; these standardised residuals are invariant under changes of scale of  := (1 , . . . , n )T . Suppressing the dependence of our entropy estimators on k and the weights w1 , . . . , wk for notational simplicity, our test statistic is now given by  b np (X1 , . . . , Xn ) + H b n1 (b b np+1 (X1 , ηb1 ), . . . , (Xn , ηbn ) . Iˇn(0) := H η1 , . . . , ηbn ) − H Writing η := /σ, we note that  1/2  n ηi − XiT (X T X)−1 X T η 1 1 Tb T b i − Xi (β − β0 ) = , ηbi = (Yi − Xi β) = σ b σ b kη − X T (X T X)−1 X T ηk (b) (b) whose distribution does not depend on the unknown β0 or σ 2 . Let {η (b) = (η1 , . . . , ηn )T : b = 1, . . . , B} denote independent random vectors, whose components are generated independently from fη . For b = 1, . . . , B we then set sb(b) := n−1/2 kb η (b) k and, for i = 1, . . . , n, let (b) ηbi := 1  (b) ηi − XiT (X T X)−1 X T η (b) . (b) sb We finally compute  (b) b np (X1 , . . . , Xn ) + H b n1 (b b np+1 (X1 , ηb1(b) ), . . . , (Xn , ηbn(b) ) . Iˇn(b) := H η1 , . . . , ηbn(b) ) − H 14 Analogously to our development in Sections 3 and 4, we can then define a critical value by Čq(n),B  := inf r ∈ R :  B 1 X 1 (b) ≤ q . B + 1 b=0 {Iˇn ≥r} (0) (B) Conditional on X and under H0 , the sequence (Iˇn , . . . , Iˇn ) is independent and identically distributed and unconditionally it is an exchangeable sequence under H0 . This is the crucial observation from which we can immediately derive that the resulting test has the nominal size. Lemma 5. For each q ∈ (0, 1) and B ∈ N, the MINTregression(q) test that rejects H0 if (0) (n),B and only if Iˇn > Čq has size at most q: sup  P Iˇn > Čq(n),B ≤ q. sup k∈{1,...,n−1} (X,Y ):I(X;Y )=0 (0) (b) As in previous sections, we are only interested in the differences Iˇn − Iˇn for b = 1, . . . , B, b np (X1 , . . . , Xn ) terms cancel out, so these marginal entropy and in these differences, the H estimators need not be computed. In fact, to simplify our power analysis, it is more convenient to define a slightly modified test, which also has the nominal size. Specifically, we assume for simplicity that m := n/2 is an integer, and consider a test in which the sample is split in half, with the second half of the sample used to calculate the estimators βb(2) and σ b2 of β0 and σ 2 respectively. On the (2) first half of the sample, we calculate ηbi,(1) := Yi − XiT βb(2) σ b(2) for i = 1, . . . , m and the test statistic  p+1 p 1 bm bm bm (b η1,(1) , . . . , ηbm,(1) ) − H (X1 , ηb1,(1) ), . . . , (Xm , ηbm,(1) ) . I˘n(0) := H (X1 , . . . , Xm ) + H (b) Corresponding estimators {I˘n : b = 1, . . . , B} based on the simulated data may also be computed using the same sample-splitting procedure, and we then obtain the critical value (n),B C̆q in the same way as above. The advantage from a theoretical perspective of this 2 approach is that, conditional on βb(2) and σ b(2) , the random variables ηb1,(1) , . . . , ηbm,(1) are independent and identically distributed. 15 To describe the power properties of MINTregression, we first define several densities: for γ ∈ Rp and s > 0, let fηbγ,s and fηbγ,s b1γ,s := (η1 − X1T γ)/s and (1) denote the densities of η (1),γ,s ηb1 (1) γ,s γ,s be the densities of (X1 , ηb1γ,s ) := (η1 −X1T γ)/s respectively; further, let fX,b η and fX,b η (1) (1),γ,s and (X1 , ηb1 ) respectively. Note that imposing assumptions on these densities amounts to imposing assumptions on the joint density f of (X, ). For Ω := Θ × Θ × (0, ∞) × (0, 1) × ∗ denote the class of joint (0, ∞) × (0, ∞), and ω = (θ1 , θ2 , r0 , s0 , Λ, λ0 ), we therefore let Fp+1,ω densities f of (X, ) satisfying the following three requirements: (i) o n o n γ,s γ,s fηb : γ ∈ B0 (r0 ), s ∈ [s0 , 1/s0 ] ∪ fηb(1) : γ ∈ B0 (r0 ), s ∈ [s0 , 1/s0 ] ⊆ F1,θ1 and n o n o γ,s γ,s fX,b : γ ∈ B (r ), s ∈ [s , 1/s ] ∪ f : γ ∈ B (r ), s ∈ [s , 1/s ] ⊆ Fp+1,θ2 . 0 0 0 0 0 0 0 0 η X,b η (1) (ii) n o sup max E log2 fηbγ,1 (η1 ) , E log2 fηbγ,1 (η ) ≤ Λ, 1 (1) (5) o n  (1),γ,1  γ,1 2 2 ≤ Λ. sup max E log fη ηb1 , E log fη ηb1 (6) γ∈B0 (r0 ) and γ∈B0 (r0 ) (iii) Writing Σ := E(X1 X1T ), we have λmin (Σ) ≥ λ0 . The first of these requirements ensures that we can estimate efficiently the marginal entropy of our scaled residuals, as well as the joint entropy of these scaled residuals and our covariates. The second condition is a moment condition that allows us to control |H(η1 − X1T γ) − H(η1 )| (and similar quantities) in terms of kγk, when γ belongs to a small ball around the origin. To illustrate the second part of this condition, it is satisfied, for instance, if fη is a standard normal density and E(kX1 k4 ) < ∞, or if fη is a t density and E(kX1 kα ) < ∞ for some α > 0; the first part of the condition is a little more complicated but similar. The final condition is very natural for random design regression problems. (0) (B) By the same observation on the sequence (I˘n , . . . , I˘n ) as was made regarding the (0) (B) sequence (Iˇn , . . . , Iˇn ) just before Lemma 5, we see that the sample-splitting version of the MINTregression(q) test has size at most q. Theorem 6. Fix p ∈ N and ω = (θ1 , θ2 , r0 , s0 , Λ, λ0 ) ∈ Ω, where the first component of θ2 is 16 α2 ≥ 4 and the second component of θ1 is β1 ≥ 1. Assume that n o min τ1 (1, θ1 ) , τ1 (p + 1, θ2 ) , τ2 (1, θ1 ) , τ2 (p + 1, θ2 ) > 0. ∗ ∗ and k ∗ = kn∗ denote any deterministic sequences of positive integers , kη∗ = kη,n Let k0∗ = k0,n with k0∗ ≤ min{kη∗ , k ∗ }, with k0∗ / log5 n → ∞ and with  max k∗ nτ1 (p+1,θ2 )− , kη∗ nτ1 (1,θ1 )− , (kη ) for some  > 0. Also suppose that wη = wη k∗ nτ2 (p+1,θ2 ) , kη∗ nτ2 (1,θ1 )  →0 ∈ W (kη ) and w = w(k) ∈ W (k) , and that lim supn max(kwk, kwη k) < ∞. Then for any sequence (bn ) such that n1/2 bn → ∞, any q ∈ (0, 1) and any sequence (Bn∗ ) with Bn∗ → ∞, inf inf inf ∗ k ∈{k ∗ ,...,k ∗ } f ∈F ∗ Bn ≥Bn η η 0 1,p+1 :I(f )≥bn k∈{k0∗ ,...,k∗ } Pf (I˘n > C̆q(n),Bn ) → 1. Finally in this section, we consider partitioning our design matrix as X = (X ∗ X ∗∗ ) ∈ Rn×(p0 +p1 ) , with p0 + p1 = p, and describe an extension of MINTregression to cases where we are interested in testing the independence between  and X ∗ . For instance, X ∗∗ may consist of an intercept term, or transformations of variables in X ∗ , as in the real data example presented in Section 6.3 below. Our method for simulating standardised residual vectors {b η (b) : b = 1, . . . , B} remains unchanged, but our test statistic and corresponding null statistics become b p (X ∗ , . . . , X ∗ ) + H b 1 (b b p+1 (X ∗ , ηb1 ), . . . , (X ∗ , ηbn ) bn ) − H I¯n(0) := H n 1 n n η1 , . . . , η n 1 n   (b) b p (X ∗ , . . . , X ∗ ) + H b 1 (b b p+1 (X ∗ , ηb1(b) ), . . . , (X ∗ , ηb(b) ) , b = 1, . . . , B. I¯n(b) := H bn(b) ) − H n 1 n n η1 , . . . , η n 1 n n (0) (1) (B) The sequence (I¯n , I¯n , . . . , I¯n ) is again exchangeable under H0 , so a p-value for this mod- ified test is given by B 1 X 1 (b) (0) . B + 1 b=0 {I¯n ≥I¯n } 17 6 Numerical studies 6.1 Practical considerations For practical implementation of the MINTunknown test, we consider both a direct, data-driven approach to choosing k, and a multiscale approach that averages over a range of values of k. To describe the first method, let K ⊆ {1, . . . , n − 1} denote a plausible set of values of k. For a given N ∈ N and independently of the data, generate τ1 , . . . , τ2N independently b (j) be the (unweighted) and uniformly from Sn , and for each k ∈ K and j = 1, . . . , 2N let H n,k Kozachenko–Leonenko joint entropy estimate with tuning parameter k based on the sample {(Xi , Yτj (i) ) : i = 1, . . . , n}. We may then choose b k := sargmin k∈K N X b (2j) − H b (2j−1) )2 , (H n,k n,k j=1 where sargmin denotes the smallest index of the argmin in the case of a tie. In our simulations below, which use N = 100, we refer to the resulting test as MINTauto. For our multiscale approach, we again let K ⊆ {1, . . . , n−1} and, for k ∈ K, let b h(0) (k) := b n,k denote the (unweighted) Kozachenko–Leonenko entropy estimate with tuning parameter H k based on the original data (X1 , Y1 ), . . . , (Xn , Yn ). Now, for b = 1, . . . , B and k ∈ K, (b) we let b h(b) (k) := H̃n,(k) denote the Kozachenko–Leonenko entropy estimate with tuning P (b) (b) b h(b) (k) parameter k based on the permuted data Z , . . . , Zn . Writing h̄(b) := |K|−1 1 k∈K for b = 0, 1, . . . , B, we then define the p-value for our test to be B 1 X 1 (0) (b) . B + 1 b=0 {h̄ ≥h̄ } By the exchangeability of (h̄(0) , h̄(1) , . . . , h̄(B) ) under H0 , the corresponding test has the nominal size. We refer to this test as MINTav, and note that if K is taken to be a singleton set then we recover MINTunknown. In our simulations below, we took K = {1, . . . , 20} and B = 100. 6.2 Simulated data To study the empirical performance of our methods, we first compare our tests to existing approaches through their performance on simulated data. For comparison, we present cor18 responding results for a test based on the empirical copula process decribed by Kojadinovic and Holmes (2009) and implemented in the R package copula (Hofert et al., 2017), a test based on the HSIC implemented in the R package dHSIC (Pfister and Peters, 2017), a test based on the distance covariance implemented in the R package energy (Rizzo and Szekely, 2017) and the improvement of Hoeffding’s test described in Bergsma and Dassios (2014) and implemented in the R package TauStar (Weihs, Drton and Leung, 2016). We also present results for an oracle version of our tests, denoted simply as MINT, which for each parameter value in each setting, uses the best (most powerful) choice of k. Throughout, we took q = 0.05 and n = 200, ran 5000 repetitions for each parameter setting, and for our comparison methods, used the default tuning parameter values recommended by the corresponding authors. We consider three classes of data generating mechanisms, designed to illustrate different possible types of dependence: (i) For l ∈ N and (x, y) ∈ [−π, π]2 , define the density function fl (x, y) = 1 {1 + sin(lx) sin(ly)}. π2 This class of densities, which we refer to as sinusoidal, are identified by Sejdinovic et al. (2013) as challenging ones to detect dependence, because as l increases, the dependence becomes increasingly localised, while the marginal densities are uniform on [−π, π] for each l. Despite this, by the periodicity of the sine function, we have that the mutual information does not depend on l: indeed, Z πZ π  1 {1 + sin(lx) sin(ly)} log 1 + sin(lx) sin(ly) dx dy I(fl ) = 2 π −π −π Z πZ π 1 = 2 (1 + sin u sin v) log(1 + sin u sin v) du dv ≈ 0.0145. π −π −π (ii) Let L, Θ, 1 , 2 be independent with L ∼ U ({1, . . . , l}) for some parameter l ∈ N, Θ ∼ U [0, 2π], and 1 , 2 ∼ N (0, 1). Set X = L cos Θ + 1 /4 and Y = L sin Θ + 2 /4. For large values of l, the distribution of (X/l, Y /l) approaches the uniform distribution on the unit disc. (iii) Let X,  be independent with X ∼ U [−1, 1],  ∼ N (0, 1), and for a parameter ρ ∈ [0, ∞), let Y = |X|ρ . For each of these three classes of data generating mechanisms, we also consider a corre19 sponding multivariate setting in which we wish to test the independence of X and Y when X = (X1 , X2 )T , Y = (Y1 , Y2 )T . Here, (X1 , Y1 ), X2 , Y2 are independent, with X1 and Y1 having the dependence structures described above, and X2 , Y2 ∼ U (0, 1). In these multivariate settings, the generalisations of the TauStar test were too computationally intensive, so were omitted from the comparison. The results are presented in Figure 1(a). Unsurprisingly, there is no uniformly most powerful test among those considered, and if the form of the dependence were known in advance, it may well be possible to design a tailor-made test with good power. Nevertheless, Figure 1(a) shows that, especially in the first and second of the three settings described above, the MINT and MINTav approaches have very strong performance. In these examples, the dependence becomes increasingly localised as l increases, and the flexibility to choose a smaller value of k in such settings means that MINT approaches are particularly effective. Where the dependence is more global in nature, such as in setting (iii), other approaches may be better suited, though even here, MINT is competitive. Interestingly, the multiscale MINTav appears to be much more effective than the MINTauto approach of choosing a single value of k; indeed, in setting (iii), MINTav even outperforms the oracle choice of k. 6.3 Real data In this section we illustrate the use of MINTregression on a data set comprising the average minimum daily January temperature, between 1931 and 1960 and measured in degrees Fahrenheit, in 56 US cities, indexed by their latitude and longitude (Peixoto, 1990). Fitting a normal linear model to the data with temperature as the response and latitude and longitude as covariates leads to the diagnostic plots shown in Figures 2(a) and 2(b). Based on these plots, it is relatively difficult to assess the strength of evidence against the model. Centering all of the variables and running MINTregression with kη = 6, k = 3 and B = 1785 = b105 /56c yielded a p-value of 0.00224, providing strong evidence that the normal linear model is not a good fit to the data. Further investigation is possible via partial regression: in Figure 2(c) we plot residuals based on a simple linear fit of Temperature on Latitude against the residuals of another linear fit of Longitude on Latitude. This partial regression plot is indicative of a cubic relationship between Temperature and Longitude after removing the effects of Latitude. Based on this evidence we fitted a new model with a quadratic and cubic term in Longitude added to the first model. The p-value of the resulting F -test was < 2.2 × 10−16 , giving overwhelming evidence in favour of the inclusion of the quadratic and cubic terms. We then ran our extension of MINTregression to test the independence of  20 Figure 1: Power curves for the different tests considered, for settings (i) (left), (ii) (middle) and (iii) (right). The marginals are univariate (top) and bivariate (bottom). Figure 2: Plots of residuals against fitted values (left) and square roots of the absolute values of the standardised residuals against fitted values (middle) for the US cities temperature data. The right panel gives a partial regression plot after removing the effect of latitude from both the response and longitude. 21 and (Longitude, Latitude), as described at the end of Section 5 with B = 1000. This resulted in a p-value of 0.0679, so we do not reject this model at the 5% significance level. 7 Proofs 7.1 Proofs from Section 3 (1) (B) Proof of Lemma 1. Under H0 , the finite sequence (Ibn , Ibn , . . . , Ibn ) is exchangeable. If fol(1) (B) lows that under H0 , if we split ties at random, then every possible ordering of Ibn , Ibn , . . . , Ibn (1) (B) is equally likely. In particular, the (descending order) rank of Ibn among {Ibn , Ibn , . . . , Ibn }, denoted rank(Ibn ), is uniformly distributed on {1, 2, . . . , B + 1}. We deduce that for any k ∈ {1, . . . , n − 1} and writing PH0 for the probability under the product of any marginal distributions for X and Y , PH0  bq(n),B = PH0 Ibn > C  B 1 X 1 (b) ≤q B + 1 b=0 {Ibn ≥Ibn }   bq(B + 1)c ≤ PH0 rank(Ibn ) ≤ q(B + 1) = ≤ q, B+1 as required. (X,Y ) Let V (f ) := Var log fX f(X)f . The following result will be useful in the proof of TheoY (Y ) rem 2. Lemma 7. Fix dX , dY ∈ N and ϑ ∈ Θ2 . Then V (f ) < ∞. 1/4 f ∈FdX ,dY ,ϑ (0) I(f ) sup Proof of Lemma 7. For x ∈ R we write x− := max(0, −x). We have  E log f (X, Y ) fX (X)fY (Y )   Z fX (x)fY (y) f (x, y) log dλd (x, y) f (x, y) {(x,y):f (x,y)≤fX (x)fY (y)}   Z fX (x)fY (y) ≤ f (x, y) − 1 dλd (x, y) f (x, y) {(x,y):f (x,y)≤fX (x)fY (y)} Z Z  = sup fX fY − f ≤ {I(f )/2}1/2 , = − A∈B(Rd ) A A 22 where the final inequality is Pinsker’s inequality. We therefore have that   f (X, Y ) f (X, Y ) 1/2 f (X, Y ) 3/2 = E log V (f ) ≤ E log log fX (X)fY (Y ) fX (X)fY (Y ) fX (X)fY (Y )  1/2 1/2  f (X, Y ) f (X, Y ) 3 ≤ E log E log fX (X)fY (Y ) fX (X)fY (Y )  1/2  1/2   f (X, Y ) 3 f (X, Y ) E log = I(f ) + 2E log fX (X)fY (Y ) − fX (X)fY (Y )    1/2 1/2 3 . E log fX (X)fY (Y ) + E| log f (X, Y )|3 ≤ 2 I(f ) + 21/2 I(f )1/2 2 By Berrett, Samworth and Yuan (2017, Lemma 11(i)), we conclude that V (f ) < ∞. 1/4 f ∈FdX ,dY ,ϑ :I(f )≤1 I(f ) sup The result follows from this fact, together with the observation that sup V (f ) ≤ 2 f ∈FdX ,dY ,ϑ sup f ∈FdX ,dY ,ϑ  E log2 f (X, Y ) + E log2 fX (X)fY (Y )  < ∞, (7) where the final bound follows from another application of Berrett, Samworth and Yuan (2017, Lemma 11(i)). Proof of Theorem 2. Fix f ∈ FdX ,dY ,ϑ (bn ). We have by two applications of Markov’s inequality that 1 {1 + Bn Pf (Ibn(1) ≥ Ibn )} q(Bn + 1)  1 1 ≤ Pf |Ibn − Ibn(1) − I(f )| ≥ I(f ) + q q(Bn + 1) 1 1 ≤ Ef [{Ibn − Ibn(1) − I(f )}2 ] + . 2 qI(f ) q(Bn + 1) b(n),Bn ) ≤ Pf (Ibn ≤ C q (8) It is convenient to define the following entropy estimators based on pseudo-data, as well as (1) oracle versions of our entropy estimators: let Zi 23 (1)T T := (XiT , Yi (1) (1) ) , Z (1) := (Z1 , . . . , Zn )T (1) (1) and Y (1) := (Y1 , . . . , Yn )T and set b Y,(1) := H b Y,wY (Y (1) ) H n n,k n 1X ∗,Y Hn := − log fY (Yi ), n i=1 b Z,(1) := H b Z,wZ (Z (1) ), H n n,k n X 1 ∗ Hn := − log f (Xi , Yi ), n i=1 n Hn∗,(1) Writing In∗ := 1 n n 1X 1X (1) (1) log fX (Xi )fY (Yi ), Hn∗,Y,(1) := − log fY (Yi ). := − n i=1 n i=1 Pn i=1 i ,Yi ) log fXf(X(Xi )f we have by Berrett, Samworth and Yuan (2017, TheoY (Yi ) rem 1) that sup sup ∗} kY ∈{k0∗ ,...,kY k∈{k0∗ ,...,k∗ } f ∈FdX ,dY ,ϑ = nEf {(Ibn − Ibn(1) − In∗ )2 }    2 Y Y,(1) (1) ∗,Y ∗ ∗,Y,(1) ∗,(1) b b b b + Hn sup nEf Hn − Hn − Hn + Hn − Hn − Hn − Hn sup ∗ } f ∈F kY ∈{k0∗ ,...,kY dX ,dY ,ϑ k∈{k0∗ ,...,k∗ } ≤ 4n sup sup ∗ } f ∈F kY ∈{k0∗ ,...,kY dX ,dY ,ϑ k∈{k0∗ ,...,k∗ } n b Y − H ∗,Y )2 + (H b n − H ∗ )2 Ef (H n n n o Y,(1) ∗,Y,(1) 2 (1) ∗,(1) 2 b b + (Hn − Hn ) + (Hn − Hn ) → 0.  2 It follows by Cauchy–Schwarz and the fact that E In∗ − I(f ) = V (f )/n that 2n := sup sup ∗ } f ∈F kY ∈{k0∗ ,...,kY dX ,dY ,ϑ k∈{k0∗ ,...,k∗ } ≤ sup sup ∗ } f ∈F kY ∈{k0∗ ,...,kY dX ,dY ,ϑ k∈{k0∗ ,...,k∗ } nEf  2 Ibn − Ibn(1) − I(f ) − V (f ) n  1/2 o nEf {(Ibn − Ibn(1) − In∗ )2 } + 2 nEf {(Ibn − Ibn(1) − In∗ )2 }V (f ) → 0, (9) 1/2 where we use (7) to bound V (f ) above. Now consider bn := max(n n−1/2 , n−4/7 log n). 24 By (8), (9) and Lemma 7 we have that inf inf inf ∗ k ∈{k ∗ ,...,k ∗ } f ∈F Bn ≥Bn Y dX ,dY ,ϑ (bn ) 0 Y k∈{k0∗ ,...,k∗ } ≥1− Pf (Ibn > Cq(n),Bn ) (1) E[{Ibn − Ibn − I(f )}2 ] 1 − 2 ∗ ∗ } f ∈F qI(f ) q(Bn + 1) kY ∈{k0∗ ,...,kY dX ,dY ,ϑ (bn ) sup sup k∈{k0∗ ,...,k∗ } ≥1− V (f ) + 2n 1 − 2 q(Bn∗ + 1) f ∈FdX ,dY ,ϑ (bn ) nqI(f ) ≥1− 1 V (f ) 1 n − → 1, sup − q q(Bn∗ + 1) q log7/4 n f ∈FdX ,dY ,ϑ (0) I(f )1/4 sup as required. 7.2 Proofs from Section 4 (0) (1) (B) Proof of Lemma 3. We first claim that (Ibn , Ibn , . . . , Ibn ) is an exchangeable sequence un(b) der H0 . Indeed, let σ be an arbitrary permutation of {0, 1, . . . , B}, and recall that Ibn is computed from (Xi , Yτb (i) )ni=1 , where τb is uniformly distributed on Sn . Note that, under H0 , d we have (Xi , Yi )ni=1 = (Xi , Yτ (i) )ni=1 for any τ ∈ Sn . Hence, for any A ∈ B(RB+1 ),  PH0 (Ibn(σ(0)) , . . . , Ibn(σ(B)) ) ∈ A X  1 bn(σ(0)) , . . . , Ibn(σ(B)) ) ∈ A|τ1 = π1 , . . . , τB = πB = P ( I H 0 (n!)B π ,...,π ∈S n 1 B X  1 bn(0) , . . . , Ibn(B) ) ∈ A|τ1 = πσ(1) π −1 , . . . , τB = πσ(B) π −1 P ( I = H 0 σ(0) σ(0) (n!)B π ,...,π ∈S n 1 B  = PH0 (Ibn(0) , . . . , Ibn(B) ) ∈ A . By the same argument as in the proof of Lemma 1 we now have that bq(B + 1)c ≤ q, PH0 (Ibn > C̃q(n),B ) ≤ B+1 as required. b n(1) given just after (3). We give the proof of Theorem 4 below, Recall the definition of H followed by Lemma 8, which is the key ingredient on which it is based. 25 Proof of Theorem 4. We have by Markov’s inequality that Pf (Ibn ≤ C̃q(n),Bn ) ≤ 1 1 1 b Z ≥ H̃ (1) ) + {1 + Bn Pf (Ibn ≤ I˜n(1) )} ≤ Pf (H . n n q(Bn + 1) q q(Bn + 1) (10) But  bZ ≥ H b (1) ) = Pf H b Z − H(X, Y ) ≥ H b (1) − H(X) − H(Y ) + I(X; Y ) Pf (H n n n n     1 b (1) − H(X) − H(Y )| ≥ 1 I(X; Y ) b Z − H(X, Y )| ≥ I(X; Y ) + P |H ≤ P |H n n 2 2  2 b Z − H(X, Y )| + E|H b (1) − H(X) − H(Y )| . ≤ E|H (11) n n I(X; Y ) The theorem therefore follows immediately from (10), (11) and Lemma 8 below. Lemma 8. Let dX , dY ∈ N, let d = dX + dY and fix φ = (α, µ, ν, (cn ), (pn )) ∈ Φ with cn → 0 ∗ ∗ and pn = o(1/ log n) as n → ∞. Let k0∗ = k0,n and k1∗ = k1,n denote two deterministic sequences of positive integers satisfying k0∗ ≤ k1∗ , k0∗ / log2 n → ∞ and (k1∗ log2 n)/n → 0. Then sup sup k∈{k0∗ ,...,k1∗ } f ∈GdX ,dY ,φ sup k∈{k0∗ ,...,k1∗ } b (1) − H(X) − H(Y )| → 0, Ef |H n b Z − H(X, Y )| → 0 sup Ef |H n f ∈Hd,φ as n → ∞. Proof. We prove only the first claim in Lemma 8, since the second claim involves similar arguments but is more straightforward because the estimator is based on an independent and identically distributed sample and no permutations are involved. Throughout this proof, we write a . b to mean that there exists C > 0, depending only on dX , dY ∈ N and φ ∈ Φ, such that a ≤ Cb. Fix f ∈ GdX ,dY ,φ , where φ = (α, µ, ν, (cn ), (pn )). Write ρ(k),i,(1) (1) for the distance from Zi (1) ξi := e −Ψ(k) Vd (n − (1) (1) to its kth nearest neighbour in the sample Z1 , . . . , Zn 1)ρd(k),i,(1) and so that n X (1) b (1) = 1 H log ξi . n n i=1 Recall that Sn denotes the set of all permutations of {1, . . . , n}, and define Snl ⊆ Sn to be the 26 set of permutations that fix {1, . . . , l} and have no fixed points among {l + 1, . . . , n}; thus P r |Snl | = (n−l)! n−l r=0 (−1) /r!. For τ ∈ Sn , write Pτ (·) := P(·|τ1 = τ ), and Eτ (·) := E(·|τ1 = τ ). Let ln := blog log nc. For i = 1, . . . , n, let (1) A0i := {The k nearest neighbours of Zi (1) (1) are among Zl+1 , . . . , Zn(1) }, (1) and let Ai := A0i ∩ {Zi (1) ∈ Wn }. Using the exchangeability of ξ1 , . . . , ξn , our basic decomposition is as follows: b n(1) − H(X) − H(Y )| EH  ln   X  X l n 1 X 1 X n 1 (1) (1) ≤ Eτ | log ξi | + Eτ log ξi − H(X) − H(Y ) n! l=0 l n i=1 n i=l+1 l τ ∈Sn   n 1 X n X b n(1) − H(X) − H(Y ) + Eτ H n! l=l +1 l l τ ∈Sn n ln  X   l n X 1X n X 1 (1) (log ξi )1Ai − H(X) − H(Y ) l n i=1 n i=l+1 l l=0 τ ∈Sn    n n   1 X 1 X n X (1) b (1) | + |H(X) + H(Y )| . + Eτ | log ξi |1{(Aci \(A0i )c )∪(A0i )c } + Eτ |H n n i=l+1 n! l=l +1 l l ≤ 1 n! (1) Eτ | log ξi | + Eτ n τ ∈Sn (12) The rest of the proof consists of handling each of these four terms. Step 1: We first show that sup sup k∈{1,...,n−1} f ∈GdX ,dY ,φ   n  1 X n X b n(1) | + |H(X) + H(Y )| → 0 Eτ |H n! l=l +1 l l n (13) τ ∈Sn as n → ∞. Writing ρ(k),i,X for the distance from Xi to its kth nearest neighbour in the sample X1 , . . . , Xn and defining ρ(k),i,Y similarly, we have max{ρ2(k),i,X , ρ2(k),τ1 (i),Y } ≤ ρ2(k),i,(1) ≤ ρ2(n−1),i,X + ρ2(n−1),τ1 (i),Y . 27 Using the fact that log(a + b) ≤ log 2 + | log a| + | log b| for a, b > 0, we therefore have that   2  ρ(k),i,(1) Vd (n − 1) d ≤ log + d| log ρ(k),i,X | + log 2 eΨ(k) 2 ρ(k),i,X   Vd (n − 1) d ≤ log + 2d| log ρ(k),i,X | + log 2 + d| log ρ(n−1),i,X | + d| log ρ(n−1),τ1 (i),Y | Ψ(k) e 2 (14)   Vd (n − 1) d ≤ log + log 2 Ψ(k) e 2  (1) | log ξi | + 4d max max{− log ρ(1),j,X , − log ρ(1),j,Y , log ρ(n−1),j,X , log ρ(n−1),j,Y }. j=1,...,n (15) Now, by the triangle inequality, a union bound and Markov’s inequality, n o   hn  o i E max log ρ(n−1),j,X − log 2 ≤ E log max kXj k ≤ E log max kXj k j=1,...,n j=1,...,n j=1,...,n + Z ∞   = P max kXj k ≥ eM dM 0 j=1,...,n   1 1 max 0, log n + log E(kX1 kα ) + nE(kX1 kα ) exp − log n − log E(kX1 kα ) α α 1 ≤ 1 + log n + max(0, log µ) , (16) α ≤ and the same bound holds for E maxj=1,...,n log ρ(n−1),j,Y . Similarly, hn E min log ρ(1),j,X j=1,...,n o i − Z ∞  min ρ(1),j,X ≤ e−M dM j=1,...,n 0 Z −1 ≤ 2dX log n + n(n − 1)VdX kfX k∞ =  P ∞ 2d−1 X ≤ 2d−1 X and the same bound holds for E log n + e−M dX dM log n d−1 X VdX ν,  minj=1,...,n log ρ(1),j,Y (17)  − once we replace dX with dY . By (15), (16), (17) and Stirling’s approximation,   n   n X X n n (1) b max sup E(|Hn |1{τ1 ∈Snl } ) . log n P(τ1 ∈ Snl ) k=1,...,n−1 f ∈Gd ,d ,φ l l X Y l=ln +1 l=ln +1    ln +1 n log n e log n log n (n − ln − 1)! = ≤p →0 ≤ n! ln + 1 (ln + 1)! 2π(ln + 1) ln + 1 28 (18) as n → ∞. Moreover, for any f ∈ GdX ,dY ,φ and (X, Y ) ∼ f , writing  = α/(α + 2dX ), Z |H(X)| ≤ X   kfX k∞ fX | log fX | ≤ fX (x) log dx + | log kfX k∞ | fX (x) X Z kfX k∞ ≤ fX (x)1− dx + | log kfX k∞ |  X Z  ν 1− α − 1−  (1 + kxk ) dx ≤ (1 + µ)  RdX   α dX  VdX µ (α + dX )α+dX 1 + max log ν , log , α αα ddXX Z (19) where the lower bound on kfX k∞ is due to the fact that VdαX µα (fX )dX kfX kα∞ ≥ αα ddXX /(α + dX )α+dX by Berrett, Samworth and Yuan (2017, Lemma 10(i)). Combining (19) with the corresponding bound on H(Y ), as well as (18), we deduce that (13) holds. Step 2: We observe that by (15), (16) and (17), sup sup k∈{1,...,n−1} f ∈GdX ,dY ,φ ln   X l ln log n n 1X 1 X (1) → 0. Eτ | log ξi | . n! l=0 l n i=1 n l (20) τ ∈Sn Step 3: We now show that sup sup k∈{k0∗ ,...,k1∗ } f ∈GdX ,dY ,φ ln   X n  1 X n 1 X (1) Eτ | log ξi |1{(Aci \(A0i )c )∪(A0i )c } → 0. n! l=0 l n i=l+1 l (21) τ ∈Sn We use an argument that involves covering Rd by cones; cf. Biau and Devroye (2015, Section 20.7). For w0 ∈ Rd , z ∈ Rd \ {0} and θ ∈ [0, π], define the cone of angle θ centred at w0 in the direction z by  C(w0 , z, θ) := w0 + w ∈ Rd \ {0} : cos−1 (z T w/(kzkkwk)) ≤ θ ∪ {0}. By Biau and Devroye (2015, Theorem 20.15), there exists a constant Cπ/6 ∈ N depending (1) only on d such that we may cover Rd by Cπ/6 cones of angle π/6 centred at Z1 . In each (1) cone, mark the k nearest points to Z1 (1) (1) (1) among Z2 , . . . , Zn . Now fix a point Zi not marked and a cone that contains it, and let 29 (1) (1) Zi1 , . . . , Zik that is be the k marked points in this cone. By Biau and Devroye (2015, Lemma 20.5) we have, for each j = 1, . . . , k, that (1) (1) (1) (1) kZi − Zij k < kZi − Z1 k. (1) Thus, Z1 (1) is not one of the k nearest neighbours of the unmarked point Zi , and only the (1) marked points, of which there are at most kCπ/6 , may have Z1 as one of their k near- est neighbours. This immediately generalises to show that at most klCπ/6 of the points (1) (1) Zl+1 , . . . , Zn (1) (1) may have any of Z1 , . . . , Zl among their k nearest neighbours. Then, by (15), (16) and (17), we have that, uniformly over k ∈ {1, . . . , n − 1}, 1 Eτ max sup ln l n f ∈GdX ,dY ,φ τ ∈∪l=0 Sn X n 1 (1) | log ξi | (A0i )c  . i=l+1 Now, for x ∈ X and r ∈ [0, ∞), let hx (r) := R Bx (r) kln log n. n fX , and, for s ∈ [0, 1), let h−1 x (s) := Γ(n) sk−1 (1 Γ(k)Γ(n−k) inf{r ≥ 0 : hx (r) ≥ s}. We also write Bk,n−k (s) := (22) − s)n−k−1 for s ∈ (0, 1). Then, by (4) and (13) in Berrett, Samworth and Yuan (2017), there exists C > 0, depending only on dX and φ, such that, uniformly for k ∈ {1, . . . , n − 1},  max Eτ | log ρ(k),i,X |1{Z (1) ∈W c } n i i=l+1,...,n   Z 1 Z VdX (n − 1)h−1 x (s) log fX (x)fY (y) Bk,n−k (s) ds dλd (x, y) = eΨ(k) 0 Wnc Z Z 1  . fX (x)fY (y) log n − log s − log(1 − s) + log(1 + Ckxk) Bk,n−k (s) ds dλd (x, y). Wnc 0 (23) Now, given  ∈ (0, 1), by Hölder’s inequality, and with K := max{1, (α−1) log 2, C α }/(α), Z Z fX (x)fY (y) log(1 + Ckxk) dλd (x, y) ≤ K Wnc Z ≤ K α fX (x)fY (y)(1 Wnc  Z fX (x)fY (y)(1 + kxk ) dλd (x, y) + kxkα ) dλd (x, y) 1− fX (x)fY (y) dλd (x, y) Wnc Wnc ≤ K (1 + µ) p1− n . (24) We deduce from (23) and (24) that for each  ∈ (0, 1) and uniformly for k ∈ {1, . . . , n − 1}, max sup l+1=1,...,n f ∈Gd  Eτ | log ρ(k),i,X |1{Z (1) ∈W c } . pn log n + K pn1− . i X ,dY ,φ 30 n From similar bounds on the corresponding terms with ρ(k),i,X replaced with ρ(n−1),i,X and ρ(n−1),τ1 (i),Y , we conclude from (14) that for every  ∈ (0, 1) and uniformly for k ∈ {1, . . . , n− 1}, max  (1) Eτ | log ξi |1{Z (1) ∈W c } . pn log n + K pn1− . sup i=l+1,...,n f ∈Gd (25) n i X ,dY ,φ The claim (21) follows from (22) and (25). Step 4: Finally, we show that sup sup k∈{k0∗ ,...,k1∗ } f ∈GdX ,dY ,φ ln   X n 1 X 1 X n (1) Eτ (log ξi )1Ai − H(X) − H(Y ) → 0. n! l=0 l n l i=l+1 (26) τ ∈Sn To this end, we consider the following further decomposition: n 1 X (1) (log ξi )1Ai − H(X) − H(Y ) Eτ n i=l+1 n n X 1 X 1 (1) (1)  (1)  ≤ Eτ log ξi fX fY (Zi ) 1Ai + Eτ log fX fY (Zi ) 1{(Aci \(A0i )c )∪(A0i )c } n i=l+1 n i=l+1 n n − l 1 X (1) log fX fY (Zi ) − H(X) + H(Y ) + Eτ n i=l+1 n + l H(X) + H(Y ) . n (27) We deal first with the second term in (27). Now, by the arguments in Step 3,   n X Cπ/6 kl 1 (1)  (1) Eτ log fX fY (Zi ) 1(A0i )c ≤ Eτ max | log fX fY (Zi )| i=l+1,...,n n i=l+1 n      Cπ/6 k1∗ l E max | log fX (Xi )| + E max | log fY (Yi )| . ≤ i=l+1,...,n i=l+1,...,n n (28) Now, for any s > 0, by Hölder’s inequality, α  P fX (X1 ) ≤ s ≤ s 2(α+dX ) Z α 1− 2(α+d fX (x) X) dx x:f (x)≤s ≤s α 2(α+dX ) α 1− 2(α+d (1 + µ) Z X) RdX 1 dx α (1 + kxk )(α+2dX )/α 31 α  2(α+d X) α =: K̃dX ,φ s 2(α+dX ) . X) Writing t∗ := − 2(α+d log(n − l), we deduce that for n ≥ 3, α    E max | log fX (Xi )| ≤ log ν − E min  log fX (Xi ) i=l+1,...,n i=l+1,...,n Z t∗ αt 2(α + dX ) e 2(α+dX ) dt + ≤ log ν + (n − l)K̃dX ,φ log n α −∞ 2(α + dX ) 2(α + dX ) = log ν + log n. (29) K̃dX ,φ + α α  Combining (29) with the corresponding bound on E maxi=l+1,...,n | log fY (Yi )| , which is obtained in the same way, we conclude from (28) that sup sup k∈{k0∗ ,...,k1∗ } f ∈GdX ,dY ,φ n X k ∗ ln log n 1 (1)  log fX fY (Zi ) 1(A0i )c . 1 Eτ → 0. n i=l+1 n (30)  Moreover, given any  ∈ 0, (α + 2d)/α , set 0 := α/(α + 2d). Then by two applications of Hölder’s inequality, n X 1 (1)  Eτ log fX fY (Zi ) 1{Z (1) ∈W c } n i n i=l+1 Z 0 Z ν 0 fX fY (z)| log fX fY (z)| dz ≤ νpn + 0 ≤ fX fY (z)1− dz  Wnc Wnc   Z 0  ν 2d/(α+2d) ≤ νpn + 0 p1− f f (z) dz X Y  n Wnc  Z α/(α+2d)  0 ν  1−  1 2d/(α+2d) α−1 . p1− ≤ νpn + 0 pn 1 + max(1, 2 )µ dz n . α )2d/α  (1 + kzk d R (31) From (30) and (31), we find that n X 1 (1)  sup sup max Eτ log fX fY (Zi ) 1{(Aci \(A0i )c )∪(A0i )c } → 0, ln l n Sn k∈{k0∗ ,...,k1∗ } f ∈GdX ,dY ,φ τ ∈∪l=0 i=l+1 (32) which takes care of the second term in (27). (1) For the third term in (27), since Zi  (j) and Zi : j ∈ / {i, τ (i), τ −1 (i)} are independent, 32 we have  X  n n 1 X n − l (1) (1) 1/2 1 H(X) + H(Y ) ≤ Varτ log fX fY (Zi ) − log fX fY (Zi ) Eτ n i=l+1 n n i=l+1    31/2  31/2 1/2 1/2 2 2 1/2 (1) + E log fY (Y1 ) . ≤ 1/2 Varτ log fX fY (Zn ) ≤ 1/2 E log fX (X1 ) n n By a very similar argument to that in (19), we deduce that n 1 X n − l (1) max Eτ sup sup H(X) + H(Y ) log fX fY (Zi ) − ln l n i=l+1 n Sn k∈{k0∗ ,...,k1∗ } f ∈GdX ,dY ,φ τ ∈∪l=0 → 0, (33) which handles the third term in (27). For the fourth term in (27), we simply observe that, by (19), sup sup max ln l Sn k∈{k0∗ ,...,k1∗ } f ∈GdX ,dY ,φ τ ∈∪l=0 ln |H(X) + H(Y )| → 0. n (34) Finally, we turn to the first term in (27). Recalling the definition of rz,fX fY ,δ in (4), we define the random variables Ni,δ := X 1kZ (1) −Z (1) k≤r l+1≤j≤n j i . (1) Z ,fX fY ,δ i j6=i We study the bias and the variance of Ni,δ . For δ ∈ (0, 2] and z ∈ Wn , we have that (1) Eτ (Ni,δ |Zi Z = z) ≥ (n − ln − 3) fX fY (w) dw Bz (rz,fX fY ,δ ) d ≥ (n − ln − 3)Vd rz,f f ,δ fX fY (z)(1 − cn )  X Y  Ψ(k) n − ln − 3 = δ(1 − cn )e . n−1 (35) Similarly, also, for δ ∈ (0, 2] and z ∈ Wn , (1) Eτ (Ni,δ |Zi Z = z) ≤ 2 + (n − ln − 3) fX fY (w) dw Bz (rz,fX fY ,δ ) ≤ 2 + δ(1 + cn )e 33 Ψ(k)   n − ln − 3 . n−1 (36) Note that if j2 ∈ / {j1 , τ (j1 ), τ −1 (j1 )} then for δ ∈ (0, 2] and z ∈ Wn , Covτ  1 (1) 1 kZj −zk≤rz,fX fY ,δ , 1 (1) 2 kZj −zk≤rz,fX fY ,δ (1) |Zi  = z = 0. Also, for j ∈ / {i, τ (i), τ −1 (i)} we have Varτ  1 (1) |Zi (1) kZj −zk≤rz,fX fY ,δ  Z =z ≤ fX fY (w) dw ≤ Bz (rz,fX fY ,δ ) δ(1 + cn )eΨ(k) . n−1 When j ∈ {i, τ (i), τ −1 (i)} we simply bound the variance above by 1/4 so that, by Cauchy– Schwarz, when n − 1 ≥ 2(1 + cn eΨ(k) ), (1) Varτ (Ni,δ |Zi = z) ≤ 3(n − ln − 3) δ(1 + cn )eΨ(k) + 1. n−1 (37) 1/2 Letting n,k := max(k −1/2 log n, cn ), there exists n0 ∈ N, depending only on dX , dY , φ and k0∗ , such that for n ≥ n0 and all k ∈ {k0∗ , . . . , k1∗ }, we have n,k ≤ 1/2 and     k  n,k Ψ(k) n−ln −3 Ψ(k) n−ln −3 min (1+n,k )(1−cn )e −k , k−2−(1−n,k )(1+cn )e ≥ . n−1 n−1 2 We deduce from (37) and (35) that for n ≥ n0 ,   (1) (1) Pτ {ξi fX fY (Zi ) − 1}1Ai ≥ n,k = Pτ Ai ∩ {ρ(k),i,(1) ≥ rZ (1) ,fX fY ,1+ } n,k i Z (1) (1) fX fY (z)Pτ (Ni,1+n,k ≤ k|Zi = z) dz ≤ Pτ (Ni,1+n,k ≤ k, Zi ∈ Wn ) = Wn (1) Varτ (Ni,1+n,k |Zi = z) fX fY (z) (1) {Eτ (Ni,1+n,k |Zi = z) − k}2 Wn Z ≤ ≤ dz (1+n,k )(1+cn )eΨ(k) +1 n−1  2. n −3 cn )eΨ(k) n−l − k n−1 3(n − ln − 3) (1 + n,k )(1 − (38) Using very similar arguments, but using (36) in place of (35), we also have that for n ≥ n0 , (1) (1) Pτ {ξi fX fY (Zi ) − 1}1Ai ≤ −n,k ≤  (1−n,k )(1+cn )eΨ(k) +1 n−1  2. n −3 n,k )(1 + cn )eΨ(k) n−l n−1 3(n − ln − 3)  k − 2 − (1 − 34 (39) Now, by Markov’s inequality, for k ≥ 3, i ∈ {l + 1, . . . , n}, τ ∈ Snl and δ ∈ (0, 2], Pτ   (1) (1) (1) ξi fX fY (Zi ) ≤ δ ∩ Ai = Pτ (Ni,δ ≥ k, Zi ∈ Wn ) Z Z n−l−3 ≤ fX fY (z) k−2 Wn Bz (rz,f ≤ fX fY (w) dw dz ) X fY ,δ n−l−3 δeΨ(k) (1 + cn ) . k−2 n−1 (40) Moreover, for any i ∈ {l + 1, . . . , n}, τ ∈ Snl and t > 0, by two applications of Markov’s inequality, Pτ   (1) (1) (1) ξi fX fY (Zi ) ≥ t ∩ Ai ≤ Pτ (Ni,t ≤ k, Zi ∈ Wn ) Z Z n−l−3 ≤ fX fY (z) fX fY (w) dw dz n − l − k − 3 Wn Bz (rz,fX fY ,t )c Z µ + kzkα n − ln − 3 α−1 max{1, 2 } fX fY (z) α ≤ dz n − ln − k − 3 rz,fX fY ,t Wn  α/d n − ln − 3 α−1 2α/d α/d n − 1 max{1, 2 }2µν Vd ≤ t−α/d . Ψ(k) n − ln − k − 3 e (41)  Writing sn := log2 (n/k) log2d/α n , we deduce from (38), (39), (40) and (41) that for n ≥ n0 , Z ∞  2 (1)  (1)  1/2 (1)  (1) Eτ log ξi fX fY (Zi ) 1Ai = Pτ ξi fX fY (Zi ) ≤ e−s ∩ Ai ds 0 Z sn Z ∞  (1)  1/2 (1) 2 + Pτ ξi fX fY (Zi ) > es ∩ Ai ds + log (1 + n,k ) + log2 (1+n,k ) Ψ(k) Z ∞ ≤ e n−l−3 (1 + cn ) k−2 n−1 + sn sn e−s 1/2 ds + log2 (1 + n,k ) 0 12(n − ln − 3) (1+n,k )(1+cn )eΨ(k) n−1 k 2 2n,k +1  α/d n − ln − 3 α−1 2α/d α/d n − 1 + max{1, 2 }2µν Vd n − ln − k − 3 eΨ(k) Z ∞ e−s 1/2 α/d ds. sn We conclude that sup sup sup max  (1) (1)  max Eτ log2 ξi fX fY (Zi ) 1Ai < ∞. n S l i=l+1,...,n n∈N k∈{k0∗ ,...,k1∗ } f ∈GdX ,dY ,φ τ ∈∪ll=1 n 35 (42) Finally, then, from (38), (39) and (42), n 1 X (1) (1)  (1) (1)  Eτ log ξi fX fY (Zi ) 1Ai ≤ max Eτ log ξi fX fY (Zi ) 1Ai i=l+1,...,n n i=l+1 h  i1/2  (1) (1)  (1) (1)  ≤ 2n,k + max Pτ log ξi fX fY (Zi ) 1Ai ≥ 2n,k Eτ log2 ξi fX fY (Zi ) 1Ai i=l+1,...,n h  i1/2  (1) (1)  (1) (1) ≤ 2n,k + max Pτ ξi fX fY (Zi ) − 1 1Ai ≥ n,k Eτ log2 ξi fX fY (Zi ) 1Ai , i=l+1,...,n so sup sup max ln l Sn k∈{k0∗ ,...,k1∗ } f ∈GdX ,dY ,φ τ ∈∪l=1 n 1 X (1) (1)  Eτ log ξi fX fY (Zi ) 1Ai → 0. n i=l+1 (43) as n → ∞. The proof of claim (26) follows from (27), together with (32), (33), (34) and (43). The final result therefore follows from (12), (13), (20), (21) and (26). 7.3 Proof from Section 5 T T T Proof of Theorem 6. We partition X = (X(1) X(2) ) ∈ R(m+m)×p and, writing η (0) := /σ,  T (b) (b) T (0) T η(2) , X(2) )−1 X(2) let η (b) = (η(1) )T , (η(2) )T ∈ Rm+m , for b = 0, . . . , B. Further, let γ b := (X(2) (1) T T b(2) /σ. Now define the events η(2) and sb := σ X(2) )−1 X(2) γ b(1) := (X(2) n o Ar0 ,s0 := max(kb γ k, kb γ (1) k) ≤ r0 , sb ∈ [s0 , 1/s0 ] , sb(1) ∈ [s0 , 1/s0 ] and A0 := {λmin (n−1 X T X) > 21 λmin (Σ)}. Now  P(I˘n(0) ≤ I˘n(1) ) ≤ P {I˘n(0) ≤ I˘n(1) } ∩ Ar0 ,s0 ∩ A0 + P(Ac0 ) + P(A0 ∩ Acr0 ,s0 ). For the first term in (44), define functions h, h(1) : Rp → R by (1) h(b) := H(η1 − X1T b) and h(1) (b) := H(η1 − X1T b). 36 (44) Writing R1 and R2 for remainder terms to be bounded below, we have b m (b b m (X1 , ηb1,(1) ), . . . , (Xm , ηbm,(1) ) I˘n(0) − I˘n(1) = H η1,(1) , . . . , ηbm,(1) ) − H   (1) (1) b m (b b m (X1 , ηb(1) ), . . . , (Xm , ηb(1) ) −H η1,(1) , . . . , ηbm,(1) ) + H 1,(1) m,(1) = I(X1 ; 1 ) + h(b γ ) − h(0) − h(1) (b γ (1) ) + h(1) (0) + R1 = I(X1 ; 1 ) + R1 + R2 . (45) To bound R1 on the event Ar0 ,s0 , we first observe that for fixed γ, γ (1) ∈ Rp and s, s(1) > 0, η1 − X1T γ H s     (1)    (1) η1 − X1T γ η1 − X1T γ (1) η1 − X1T γ (1) − H X1 , −H + H X1 , s s(1) s(1)   (1)   η   η (1)  η1 − X1T γ (1) η1 − X1T γ 1 1 −H X1 − H + H X =H 1 s s s(1) s(1)  = H(η1 ) − H(η1 |X1 ) + h(γ) − h(0) − h(1) (γ (1) ) + h(1) (0) = I(X1 ; 1 ) + h(γ) − h(0) − h(1) (γ (1) ) + h(1) (0). (46) Now, for a density g on Rd , define the variance functional Z v(g) := g(x){log g(x) + H(g)}2 dx. Rd If (b γ, γ b(1) , sb, sb(1) )T are such that Ar0 ,s0 holds, then conditional on (b γ, γ b(1) , sb, sb(1) ), we have (1) (1) γ b,b s γ b ,b s fηbγb,bs ∈ F1,θ1 , fX,b η ∈ Fp+1,θ2 , fηb(1) (1) (1) γ b ,b s ∈ F1,θ1 and fX,b η (1) ∈ Fp+1,θ2 . It follows by (46), Berrett, Samworth and Yuan (2017, Theorem 1 and Lemma 11(i)) that lim sup n1/2 n→∞ sup sup Ef (|R1 |1Ar0 ,s0 ) ∗ kη ∈{k0∗ ,...,kη∗ } f ∈Fp+1,ω ∗ ∗ k∈{k0 ,...,k } ≤ lim sup n1/2 n→∞ sup ∗ kη ∈{k0∗ ,...,kη∗ } f ∈Fp+1,ω k∈{k0∗ ,...,k∗ } ≤ 4 sup v(g) + 4 g∈F1,θ1 sup sup  E(R12 1Ar0 ,s0 ) v(g) < ∞. 1/2 (47) g∈Fp+1,θ2 Now we turn to R2 , and study the continuity of the functions h and h(1) , following the approach taken in Proposition 1 of Polyanskiy and Wu (2016). Write a1 ∈ A for the fifth 37 component of θ1 , and for x ∈ R with fη (x) > 0, let ra1 (x) := 1 . 8a1 fη (x) Then, for |y − x| ≤ ra1 (x) we have by Berrett, Samworth and Yuan (2017, Lemma 12) that |fη (y) − fη (x)| ≤ 15 15 fη (x)a1 (fη (x))|y − x| ≤ fη (x). 7 56 Hence | log fη (y) − log fη (x)| ≤ 120 a1 (fη (x))|y − x|. 41 When |y − x| > ra1 (x) we may simply write | log fη (y) − log fη (x)| ≤ 8{| log fη (y)| + | log fη (x)|}a1 (fη (x))|y − x|. Combining these two equations we now have that, for any x, y such that fη (x) > 0, | log fη (y) − log fη (x)| ≤ 8{1 + | log fη (y)| + | log fη (x)|}a1 (fη (x))|y − x|. By an application of the generalised Hölder inequality and Cauchy–Schwarz, we conclude that fη (η1 − X1T γ) fη (η1 )  2 2 1/2   1/4 1/2   ≤ 8 Ea1 (fη (η1 )) E 1 + | log fη (η1 − X1T γ)| + | log fη (η1 )| E(|X1T γ|4  1/2  1/2   1/4 ≤ 16kγk Ea21 (fη (η1 )) E 1 + log2 fη (η1 − X1T γ) + log2 fη (η1 ) E(kX1 k4 ) . E log (48) We also obtain a similar bound on the quantity E log fηbγ,1 (η1 −X1T γ) fηbγ,1 (η1 ) d when kγk ≤ r0 . Moreover, for any random vectors U, V with densities fU , fV on R satisfying H(U ), H(V ) ∈ R, and writing U := {fU > 0}, V := {fV > 0}, we have by the non-negativity of Kullback–Leibler divergence that Z H(U ) − H(V ) = Z fV log fV − V Z fU log fV − U fU log U 38 fU fV (V ) ≤ E log . fV fV (U ) Combining this with the corresponding bound for H(V ) − H(U ), we obtain that   fU (U ) fV (V ) . |H(U ) − H(V )| ≤ max E log , E log fU (V ) fV (U ) Since fη , fηbγ,1 ∈ F1,θ1 when kγk ≤ r0 , we may apply (48), the second part of Berrett, Samworth and Yuan (2017, Proposition 9), (5), (6) and the fact that α2 ≥ 4 to deduce that sup sup ∗ f ∈Fp+1,ω γ∈B0◦ (r0 ) |h(γ) − h(0)| kγk   fηbγ,1 (η1 − X1T γ) 1 fη (η1 − X1T γ) ≤ sup sup max E log , E log < ∞. ∗ fη (η1 ) fηbγ,1 (η1 ) f ∈Fp+1,ω γ∈B0◦ (r0 ) kγk (49) Similarly, |h(1) (γ) − h(1) (0)| < ∞. ∗ kγk f ∈Fp+1,ω γ∈B0◦ (r0 ) sup sup (50) We now study the convergence of γ b and γ b(1) to 0. By definition, the unique minimiser of the function R(β) := E{(Y1 − X1T β)2 } = E(21 ) − 2(β − β0 )T E(1 X1 ) + (β − β0 )T Σ(β − β0 ) is given by β0 , and R(β0 ) = E(21 ). Now, for λ > 0,  R β0 + λE(1 X1 ) = E(21 ) − 2λkE(1 X1 )k2 + λ2 E(1 X1 )T ΣE(1 X1 ). If E(1 X1 ) 6= 0 then taking λ = kE(1 X1 )k2 E(1 X1 )T ΣE(1 X1 )  we have R β0 + λE(1 X1 ) < E(21 ), a contradition. Hence E(1 X1 ) = 0. Moreover, p p n n n  X  X 1 X 1 X 1 X 1/2 E Xi ηi ≤ E Xij ηi ≤ Var Xij ηi m i=m+1 m j=1 i=m+1 m j=1 i=m+1 p 1 X 21/2 p 4 1/4 = 1/2 Var1/2 (X1j η1 ) ≤ 1/2 E(η14 )1/4 max E(X1j ) . j=1,...,p m j=1 n 39 (51) It follows that n o  21/2 p T T (0) 4 1/4 E kb γ k1A0 = E (X(2) X(2) )−1 X(2) η(2) 1A0 ≤ E(η14 )1/4 max E(X1j ) . j=1,...,p λ0 n1/2 (52)  Similar arguments yield the same bound for E kb γ (1) k1A0 . Hence, from (49), (50) and (52), we deduce that lim sup n1/2 n→∞ sup sup Ef (|R2 |1Ar0 ,s0 ∩A0 ) < ∞. (53) ∗ kη ∈{k0∗ ,...,kη∗ } f ∈Fp+1,ω k∈{k0∗ ,...,k∗ } We now bound P(Ac0 ). By the Hoffman–Wielandt inequality, we have that T T {λmin (m−1 X(2) X(2) ) − λmin (Σ)}2 ≤ km−1 X(2) X(2) − Σk2F . Thus P(Ac0 )  −1 ≤ P km T X(2) X(2) p  X 1 4 − ΣkF ≥ λmin (Σ) ≤ Var(X1j X1l ) 2 mλ2min (Σ) j,l=1 ≤ 8p2 4 max E(X1j ). nλ2min (Σ) j=1,...,p (54) Finally, we bound P(A0 ∩ Acr0 ,s0 ). By Markov’s inequality and (52),   1 21/2 p 4 1/4 P {kb γ k ≥ r0 } ∩ A0 ≤ E kb γ k1A0 ≤ E(η14 )1/4 max E(X1j ) . j=1,...,p r0 r0 λ0 n1/2 (55)  The same bound also holds for P {kb γ (1) k ≥ r0 } ∩ A0 . Furthermore, writing P(2) := T T X(2) (X(2) X(2) )−1 X(2) , note that n 1 1 X 2 1 (0)T 1 (0) 2 (0) 2 (0) kη(2) k − 1 − kP(2) η(2) k ≤ (ηi − 1) + η(2) P(2) η(2) , |b s − 1| = m m m i=m+1 m 2 40 so by Chebychev’s inequality, Markov’s inequality and (51), for any δ > 0  P {|b s2 − 1| > δ} ∩ A0      n  λ δ 1/2  δ 1 T (0) 1 X 2 0 ∩ A0 + P X η > ∩ A0 ≤P (η − 1) > m i=m+1 i 2 m (2) (2) 2 ≤ 8 2p 4 1/4 ) . E(η14 ) + E(η14 )1/4 max E(X1j 1/2 1/2 2 j=1,...,p 1/2 nδ δ λ0 n (56)  The same bound holds for P {|(b s(1) )2 − 1| > δ} ∩ A0 . We conclude from Markov’s inequality, (44), (45), (47), (53), (54), (55) and (56) that sup sup sup ∗ k ∈{k ∗ ,...,k ∗ } f ∈F ∗ Bn ≥Bn η η 0 1,p+1 :I(f )≥bn k∈{k0∗ ,...,k∗ } ≤ Pf (I˘n ≤ C̆q(n),Bn ) 1 + sup sup Pf (I˘n(1) ≥ I˘n(0) ) ∗ + 1) kη ∈{k0∗ ,...,kη∗ } f ∈F1,p+1 :I(f )≥bn q(Bn∗ k∈{k0∗ ,...,k∗ } n  1 ˘(1) ≥ I˘(0) } ∩ Ar0 ,s0 ∩ A0 + sup sup P { I ≤ f n n ∗ q(Bn∗ + 1) kη ∈{k0∗ ,...,kη∗ } f ∈F1,p+1 :I(f )≥bn k∈{k0∗ ,...,k∗ } o + Pf (A0 ∩ Acr0 ,s0 ) + Pf (Ac0 ) n1 1 ≤ + sup Ef (|R1 + R2 |1Ar0 ,s0 ) sup ∗ q(Bn∗ + 1) kη ∈{k0∗ ,...,kη∗ } f ∈F1,p+1 :I(f )≥bn bn k∈{k0∗ ,...,k∗ } o + Pf (A0 ∩ Acr0 ,s0 ) + Pf (Ac0 ) → 0, as required. Acknowledgements: Both authors are supported by an EPSRC Programme grant. The first author was supported by a PhD scholarship from the SIMS fund; the second author is supported by an EPSRC Fellowship and a grant from the Leverhulme Trust. References Albert, M., Bouret, Y., Fromont, M. and Reynaud-Bouret, P. (2015) Bootstrap and permutation tests of independence for point processes. Ann. Statist., 43, 2537–2564. 41 Bach, F. R. and Jordan, M. I. (2002) Kernel independent component analysis. J. Mach. Learn. Res., 3, 1–48. Bergsma, W. and Dassios, A. (2014) A consistent test of independence based on a sign covariance related to Kendall’s tau. Bernoulli, 20, 1006–1028. Berrett, T. B., Grose, D. J. and Samworth, R. J. (2017) IndepTest: parametric independence tests based on entropy estimation. non- Available at https://cran.r-project.org/web/packages/IndepTest/index.html. Berrett, T. B., Samworth, R. J. and Yuan, M. (2017) Efficient multivariate entropy estimation via k-nearest neighbour distances. https://arxiv.org/abs/1606.00304v3. Biau, G. and Devroye, L. (2015) Lectures on the Nearest Neighbor Method. Springer, New York. Comon, P. (1994) Independent component analysis, a new concept?. Signal Process., 36, 287–314. Dalgaard, P. (2002) Introductory Statistics with R. Springer-Verlag, New York. Dobson, A. J. (2002) An Introduction to Generalized Linear Models. Chapman & Hall, London. Einmahl, J. H. J. and van Keilegom, I. (2008) Tests for independence in nonparametric regression. Statistica Sinica, 18, 601–615. Fan, J., Feng, Y. and Xia, L. (2017) A projection based conditional dependence measure with applications to high-dimensional undirected graphical models. Available at arXiv:1501.01617. Fan, Y., Lafaye de Micheaux, P., Penev, S. and Salopek, D. (2017) Multivariate nonparametric test of independence. J. Multivariate Anal., 153, 189–210. Gibbs, A. L. and Su, F. E. (2002) On choosing and bounding probability metrics. Int. Statist. Review, 70, 419–435. Gretton A., Bousquet O., Smola A. and Schölkopf B. (2005) Measuring Statistical Dependence with Hilbert-Schmidt Norms. Algorithmic Learning Theory, 63–77. 42 Gretton, A. and Györfi, L. (2010) Consistent nonparametric tests of independence. J. Mach. Learn. Res., 11, 1391–1423. Heller, R., Heller, Y., Kaufman, S., Brill, B. and Gorfine, M. (2016) Consistent distributionfree K-sample and independence tests for univariate random variables. J. Mach. Learn. Res., 17, 1–54. Hoeffding, W. (1948) A non-parametric test of independence. Ann. Math. Statist., 19, 546– 557. Hofert, M., Kojadinovic, I., Mächler, M. and Yan, J. (2017) copula: variate Dependence with Copulas. Multi- R Package version 0.999-18. Available from https://cran.r-project.org/web/packages/copula/index.html. Jitkrittum, W., Szabó, Z. and Gretton, A. (2016) An adaptive test of independence with analytic kernel embeddings. Available at arXiv:1610.04782. Joe, H. (1989) Relative entropy measures of multivariate dependence. J. Amer. Statist. Assoc., 84, 157–164. Josse, J. and Holmes, S. (2016) Measuring multivariate association and beyond. Statist. Surveys, 10, 132–167. Kojadinovic, I. and Holmes, M. (2009) Tests of independence among continuous random vectors based on Cramér–von Mises functionals of the empirical copula process. J. Multivariate Anal., 100, 1137–1154. Kozachenko, L. F. and Leonenko, N. N. (1987) Sample estimate of the entropy of a random vector. Probl. Inform. Transm., 23, 95–101. Lauritzen, S. L. (1996) Graphical Models. Oxford University Press, Oxford. Mari, D. D. and Kotz, S. (2001) Correlation and Dependence. Imperial College Press, London. Miller, E. G. and Fisher, J. W. (2003) ICA using spacings estimates of entropy. J. Mach. Learn. Res., 4, 1271–1295. Müller, U. U., Schick, A. and Wefelmeyer, W. (2012) Estimating the error distribution function in semiparametric additive regression models. J. Stat. Plan. Inference, 142, 552–566. 43 Neumeyer, N. (2009) Testing independence in nonparametric regression. J. Multivariate Anal., 100, 1551–1566. Neumeyer, N. and Van Keilegom, I. (2010) Estimating the error distribution in nonparametric multiple regression with applications to model testing. J. Multivariate Anal., 101, 1067–1078. Nguyen, D. and Eisenstein, J. (2017) A kernel independence test for geographical language variation. Comput. Ling., to appear. Pearl, J. (2009) Causality. Cambridge University Press, Cambridge. Pearson, K. (1920) Notes on the history of correlation. Biometrika, 13, 25–45. Peixoto, J. L. (1990) A property of well-formulated polynomial regression models. The American Statistician, 44, 26–30. Pfister, N., Bühlmann, P., Schölkopf, B. and Peters, J. (2017) Kernel-based tests for joint independence. J. Roy. Statist. Soc., Ser. B, to appear. Pfister, N. and Peters, J. (2017) Schmidt Independence Criterion. dHSIC: Independence Testing via Hilbert R Package version 2.0. Available at https://cran.r-project.org/web/packages/dHSIC/index.html. Polyanskiy, Y. and Wu, Y. (2016) Wasserstein continuity of entropy and outer bounds for interference channels. IEEE Trans. Inf. Theory, 62, 3992–4002. Rizzo, M. L. and Szekely, G. J. (2017) energy: Inference via the Energy of Data. E-Statistics: Multivariate R Package version 1.7-2. Available from https://cran.r-project.org/web/packages/energy/index.html. Samworth, R. J. and Yuan, M. (2012) Independent component analysis via nonparametric maximum likelihood estimation. Ann. Statist., 40, 2973–3002. Schweizer, B. and Wolff, E. F. (1981) On nonparametric measures of dependence for random variables. Ann. Statist., 9, 879–885. Sejdinovic, D., Sriperumbudur, B., Gretton, A. and Fukumizu, K. (2013) Equivalence of distance-based and RKHS-based statistics in hypothesis testing. Ann. Statist., 41, 2263– 2291. 44 Sen, A. and Sen, B. (2014) Testing independence and goodness-of-fit in linear models. Biometrika, 101, 927–942. Shah, R. D. and Bühlmann, P. (2017) Goodness of fit tests for high-dimensional linear models. J. Roy. Statist. Soc., Ser. B, to appear. Song, L., Smola, A., Gretton, A., Bedo, J. and Borgwardt, K. (2012) Feature selection via dependence maximization. J. Mach. Learn. Res., 13, 1393–1434. Steuer, R., Kurths, J., Daub, C. O., Weise, J. and Selbig, J. (2002) The mutual information: detecting and evaluating dependencies between variables. Bioinformatics, 18, 231–240. Stigler, S. M. (1989) Francis Galton’s account of the invention of correlation. Stat. Sci., 4, 73–86. Su, L. and White, H. (2008) A nonparametric Hellinger metric test for conditional independence. Econometric Theory, 24, 829–864. Székely, G. J., Rizzo, M. L. and Bakirov, N. K. (2007) Measuring and testing dependence by correlation of distances. Ann. Statist., 35, 2769–2794. Székely, G. J. and Rizzo, M. L. (2013) The distance correlation t-test of independence in high dimension. J. Multivariate Anal., 117, 193–213. Torkkola, K. (2003) Feature extraction by non-parametric mutual information maximization. J. Mach. Learn. Res., 3, 1415–1438. Vinh, N. X., Epps, J. and Bailey, J. (2010) Information theoretic measures for clusterings comparison: variants, properties, normalisation and correction for chance. J. Mach. Learn. Res., 11, 2837–2854. Weihs, L., Drton, M. and Leung, D. (2016) Efficient computation of the Bergsma–Dassios sign covariance. Comput. Stat., 31, 315–328. Weihs, ances: L., Drton, M. and Meinshausen, N. (2017) Symmetric rank covari- a generalised framework for nonparametric measures of dependence. https://arxiv.org/abs/1708.05653. Wu, E. H. C., Yu, P. L. H. and Li, W. K. (2009) A smoothed bootstrap test for independence based on mutual information. Comput. Stat. Data Anal., 53, 2524–2536. 45 Yao, S., Zhang, X. and Shao, X. (2017) Testing mutual independence in high dimension via distance covariance. J. Roy. Statist. Soc., Set. B, to appear. Zhang, K., Peters, J., Janzing, D. and Schölkopf, B. (2011) Kernel-based conditional independence test and application in causal discovery. https://arxiv.org/abs/1202.3775. Zhang, Q., Filippi, S., Gretton, A. and Sejdinovic, D. (2017) Large-scale kernel methods for independence testing. Stat. Comput., 27, 1–18. 46
10math.ST
Statistical inference of 2-type critical Galton–Watson processes with immigration arXiv:1502.04900v2 [math.ST] 9 May 2016 Kristóf Körmendi∗,⋄, Gyula Pap∗∗ * MTA-SZTE Analysis and Stochastics Research Group, Bolyai Institute, University of Szeged, Aradi vértanúk tere 1, H–6720 Szeged, Hungary. ** Bolyai Institute, University of Szeged, Aradi vértanúk tere 1, H-6720 Szeged, Hungary. e-mail: [email protected] (K. Körmendi), [email protected] (G. Pap). ⋄ Corresponding author. Abstract In this paper the asymptotic behavior of the conditional least squares estimators of the offspring mean matrix for a 2-type critical positively regular Galton–Watson branching process with immigration is described. We also study this question for a natural estimator of the spectral radius of the offspring mean matrix, which we call criticality parameter. We discuss the subcritical case as well. 1 Introduction Branching processes have a number of applications in biology, finance, economics, queueing theory etc., see e.g. Haccou, Jagers and Vatutin [7]. Many aspects of applications in epidemiology, genetics and cell kinetics were presented at the 2009 Badajoz Workshop on Branching Processes, see [25]. The estimation theory for single-type Galton–Watson branching processes with immigration has a long history, see the survey paper of Winnicki [28]. The critical case is the most interesting and complicated one. There are two multi-type critical Galton–Watson processes with immigration for which statistical inference is available: the unstable integer-valued autoregressive models of order 2 (which can be considered as a special 2-type Galton–Watson branching process with immigration), see Barczy et al. [5] and the 2-type doubly symmetric process, see Ispány et al. [10]. In the present paper the asymptotic behavior of the conditional least squares (CLS) estimator of the offspring means and criticality parameter for the general 2-type critical positively regular Galton–Watson process with immigration is described, see Theorem 3.1. It 2010 Mathematics Subject Classifications: 60J80, 62F12. Key words and phrases: Galton–Watson branching process with immigration, conditional least squares estimator. The research of G. Pap was realized in the frames of TÁMOP 4.2.4. A/2-11-1-2012-0001 ,,National Excellence Program – Elaborating and operating an inland student and researcher personal support system”. The project was subsidized by the European Union and co-financed by the European Social Fund. 1 turns out that in a degenerate case this estimator is not even weakly consistent. We also study the asymptotic behavior of a natural estimator of the spectral radius of the offspring mean matrix, which we call criticality parameter. We discuss the subcritical case as well, but the supercritical case still remains open. Let us recall the results for a single-type Galton–Watson branching process (Xk )k∈Z+ with immigration. Assuming that the immigration mean mε is known, the CLS estimator of the offspring mean mξ based on the observations X1 , . . . , Xn has the form Pn Xk−1 (Xk − mε ) (n) m b ξ = k=1Pn 2 k=1 Xk−1 Pn 2 on the set k=1 Xk−1 > 0, see Klimko ans Nelson [17]. Suppose that mε > 0, and the second moment of the branching and immigration distributions are finite. If the process is subcritical, i.e., mξ < 1, then the probability of the existence of the (n) (n) estimator m b ξ tends to 1 as n → ∞, and the estimator m b ξ is strongly consistent, i.e., (n) a.s. m b ξ −→ mξ as n → ∞. If, in addition, the third moments of the branching and immigration distributions are finite, then  e 3 ) + Vε E(X e 2)  Vξ E(X D (n) 1/2 as n → ∞, (1.1) n (m b ξ − mξ ) −→ N 0,   e 2) 2 E(X where Vξ and Vε denote the offspring and immigration variance, respectively, and the e is the unique stationary distribution of the Markov distribution of the random variable X chain (Xk )k∈Z+ . Klimko and Nelson [17] contains a similar results for the CLS estimator of (mξ , mε ), and (1.1) can be derived by the method of that paper, see also Theorem 3.8. Note e 2 ) and E(X e 3 ) can be expressed by the first three moments of the branching and that E(X immigration distributions. If the process is critical, i.e., mξ = 1, then the probability of the existence of the estimator tends to 1 as n → ∞, and R1 Xt d(Xt − mε t) D (n) (1.2) n(m b ξ − 1) −→ 0 R 1 as n → ∞, 2 X dt t 0 (n) m bξ where the process (Xt )t∈R+ is the unique strong solution of the stochastic differential equation (SDE) q dXt = mε dt + Vξ Xt+ dWt , t ∈ R+ , with initial value X0 = 0, where (Wt )t∈R+ is a standard Wiener process, and x+ denotes the positive part of x ∈ R. Wei and Winnicki [27] proved a similar results for the CLS estimator of the offspring mean when the immigration mean is unknown, and (1.2) can be derived by the D (n) method of that paper. Note that X (n) −→ X as n → ∞ with Xt := n−1 X⌊nt⌋ for t ∈ R+ , n ∈ N, where ⌊x⌋ denotes the (lower) integer part of x ∈ R, see Wei and Winnicki [26]. If, in addition, Vξ = 0, then   3Vε D (n) 3/2 as n → ∞, (1.3) n (m b ξ − 1) −→ N 0, 2 mε 2 see Ispány et al. [13]. If the process is supercritical, i.e., mξ > 1, then the probability of the existence of the (n) (n) estimator m bξ tends to 1 as n → ∞, the estimator m bξ is strongly consistent, i.e., (n) a.s. m b ξ −→ mξ as n → ∞, and (1.4) X n k=1 Xk−1 1/2 (n) (m bξ   (mξ + 1)2 − mξ ) −→ N 0, 2 Vξ mξ + mξ + 1 D as n → ∞. Wei and Winnicki [27] showed the same asymptotic behavior for the CLS estimator of the offspring mean when the immigration mean is unknown, and (1.4) can be derived by the method of that paper. In Section 2 we recall some preliminaries on 2-type Galton–Watson models with immigration. Section 3 contains our main results. Section 4 contains a useful decomposition of the process. Sections 5, 6 and 7 contain the proofs. In Appendix A we present estimates for the moments of the processes involved. Appendix B is devoted to the CLS estimators. Appendix C and D is for a version of the continuous mapping theorem and for convergence of random step processes, respectively. 2 Preliminaries on 2-type Galton–Watson models with immigration Let Z+ , N, R and R+ denote the set of non-negative integers, positive integers, real numbers and non-negative real numbers, respectively. Every random variable will be defined on a fixed probability space (Ω, A, P). For each k, j ∈ Z+ and i, ℓ ∈ {1, 2}, the number of individuals of type i in the k th generation will be denoted by Xk,i , the number of type ℓ offsprings produced by the j th individual who is of type i belonging to the (k − 1)th generation will be denoted by ξk,j,i,ℓ, and the number of type i immigrants in the k th generation will be denoted by εk,i . Then we have " # Xk−1,1 " # Xk−1,2 " # " # X ξk,j,1,1 X ξk,j,2,1 Xk,1 εk,1 (2.1) = + + , k ∈ N. Xk,2 ξk,j,1,2 ξk,j,2,2 εk,2 j=1 j=1 Here  X 0 , ξk,j,i , εk : k, j ∈ N, i ∈ {1, 2} X k := " # Xk,1 Xk,2 , are supposed to be independent, where ξ k,j,i := " ξk,j,i,1 ξk,j,i,2 # , εk := " # εk,1 εk,2 . Moreover, {ξk,j,1 : k, j ∈ N}, {ξk,j,2 : k, j ∈ N} and {εk : k ∈ N} are supposed to consist of identically distributed random vectors. 3 We suppose E(kξ1,1,1 k2 ) < ∞, E(kξ1,1,2 k2 ) < ∞ and E(kε1 k2 ) < ∞. Introduce the notations h i   mξ := mξ1 mξ2 ∈ R2×2 mξi := E ξ1,1,i ∈ R2+ , mε := E ε1 ∈ R2+ , + ,  Vξi := Var ξ 1,1,i ∈ R2×2 ,  Vε := Var ε1 ∈ R2×2 , i ∈ {1, 2}. Note that many authors define the offspring mean matrix as m⊤ ξ . For k ∈ Z+ , let Fk :=  σ X 0 , X 1 , . . . , X k . By (2.1), (2.2) E(X k | Fk−1) = Xk−1,1 mξ1 + Xk−1,2 mξ2 + mε = mξ X k−1 + mε . Consequently, E(X k ) = mξ E(X k−1 ) + mε , k ∈ N, which implies (2.3) E(X k ) = mkξ E(X 0 ) + k−1 X j=0 mjξ mε , k ∈ N. Hence, the asymptotic behavior of the sequence (E(X k ))k∈Z+ depends on the asymptotic behavior of the powers (mkξ )k∈N of the offspring mean matrix, which is related to the spectral radius r(mξ ) =: ̺ ∈ R+ of mξ (see the Frobenius–Perron theorem, e.g., Horn and Johnson [9, Theorems 8.2.11 and 8.5.1]). A 2-type Galton–Watson process (X k )k∈Z+ with immigration is referred to respectively as subcritical, critical or supercritical if ̺ < 1, ̺ = 1 or ̺ > 1 (see, e.g., Athreya and Ney [1, V.3] or Quine [21]). We will write the offspring mean matrix of a 2-type Galton–Watson process with immigration in the form " # α β (2.4) mξ := . γ δ We will focus only on positively regular 2-type Galton–Watson processes with immigration, i.e., when there is a positive integer k ∈ N such that the entries of mkξ are positive (see Kesten and Stigum [16]), which is equivalent to β, γ ∈ (0, ∞), α, δ ∈ R+ with α + δ > 0. Then the matrix mξ has eigenvalues p p α + δ + (α − δ)2 + 4βγ α + δ − (α − δ)2 + 4βγ λ+ := , λ− := , 2 2 satisfying λ+ > 0 and −λ+ < λ− < λ+ , hence the spectral radius of mξ is p α + δ + (α − δ)2 + 4βγ . (2.5) ̺ = r(mξ ) = λ+ = 2 By the Perron theorem (see, e.g., Horn and Johnson [9, Theorems 8.2.11 and 8.5.1]), k ⊤ λ−k + mξ → uright uleft 4 as k → ∞, where uright is the unique right eigenvector of mξ (called the right Perron vector of mξ ) corresponding to the eigenvalue λ+ such that the sum of its coordinates is 1, and uleft is the unique left eigenvector of mξ (called the left Perron vector of mξ ) corresponding to the eigenvalue λ+ such that huright , uleft i = 1, hence we have " " # # β γ + λ+ − δ 1 1 uright = , uleft = . β + λ+ − α λ+ − α λ+ − λ− β + λ+ − α More exactly, using the so-called Putzer’s spectral formula, see, e.g., Putzer [20], the powers of mξ can be written in the form " " # # k k λ − δ β λ − α −β λ λ + + + − mkξ = + λ − λ λ − λ− + − + γ λ+ − α −γ λ+ − δ (2.6) k ⊤ = λk+ uright u⊤ left + λ− v right v left , k ∈ N, where v right and v left are appropriate right and left eigenvectors of mξ , respectively, belonging to the eigenvalue λ, for instance, " " # # −β − λ+ + α −λ+ + α 1 1 v right = , v left = . λ+ − λ− γ + λ+ − δ β + λ+ − α β The process (X k )k∈Z+ is critical and positively regular if and only if α, δ ∈ [0, 1) and β, γ ∈ (0, ∞) with α + δ > 0 and βγ = (1 − α)(1 − δ), and then the matrix mξ has eigenvalues λ+ = 1 and λ− = α + δ − 1 ∈ (−1, 1) =: λ. Next we will recall a convergence result for critical and positively regular 2-type CBI processes. A function f : R+ → Rd is called càdlàg if it is right continuous with left limits. Let D(R+ , Rd ) and C(R+ , Rd ) denote the space of all Rd -valued càdlàg and continuous functions on R+ , respectively. Let D∞ (R+ , Rd ) denote the Borel σ-field in D(R+ , Rd ) for the metric characterized by Jacod and Shiryaev [14, VI.1.15] (with this metric D(R+ , Rd ) is a complete (n) and separable metric space). For Rd -valued stochastic processes (Y t )t∈R+ and (Y t )t∈R+ , D n ∈ N, with càdlàg paths we write Y (n) −→ Y as n → ∞ if the distribution of Y (n) on the space (D(R+ , Rd ), D∞ (R+ , Rd )) converges weakly to the distribution of Y on the space D (D(R+ , Rd ), D∞ (R+ , Rd )) as n → ∞. Concerning the notation −→ we note that if ξ and ξn , n ∈ N, are random elements with values in a metric space (E, ρ), then we also denote by D ξn −→ ξ the weak convergence of the distributions of ξn on the space (E, B(E)) towards the distribution of ξ on the space (E, B(E)) as n → ∞, where B(E) denotes the Borel σ-algebra on E induced by the given metric ρ. For each n ∈ N, consider the random step process (n) Xt := n−1 X ⌊nt⌋ , t ∈ R+ . The following theorem is a special case of the main result in Ispány and Pap [12, Theorem 3.1]. 5 2.1 Theorem. Let (X k )k∈Z+ be a 2-type Galton–Watson process with immigration such that α, δ ∈ [0, 1) and β, γ ∈ (0, ∞) with α + δ > 0 and βγ = (1 − α)(1 − δ) (hence it is critical and positively regular), X 0 = 0, E(kξ1,1,1 k2 ) < ∞, E(kξ 1,1,2 k2 ) < ∞ and E(kε1 k2 ) < ∞. Then (2.7) D (n) (X t )t∈R+ −→ (X t )t∈R+ := (Zt uright )t∈R+ as n → ∞ in D(R+ , Rd ), where (Zt )t∈R+ is the pathwise unique strong solution of the SDE q (2.8) dZt = huleft , mε i dt + hVξ uleft , uleft iZt+ dWt , t ∈ R+ , Z0 = 0, where (Wt )t∈R+ is a standard Brownian motion and (2.9) Vξ := 2 X i=1 hei , uright iVξi = βVξ1 + (1 − α)Vξ2 β+1−α is a mixed offspring variance matrix. In fact, in Ispány and Pap [12, Theorem 3.1], the above result has been prooved under the higher moment assumptions E(kξ 1,1,1 k4 ) < ∞, E(kξ1,1,2 k4 ) < ∞ and E(kε1 k4 ) < ∞, which have been relaxed in Danka and Pap [6, Theorem 3.1]. (z) 2.2 Remark. The SDE (3.8) has a unique strong solution (Zt )t∈R+ for all initial values (z) (z) Z0 = z ∈ R, and if z > 0, then Zt is nonnegative for all t ∈ R+ with probability one, hence Zt+ may be replaced by Zt under the square root in (3.8), see, e.g., Barczy et al. [4, Remark 3.3]. Clearly, Vξ depends only on the branching distributions, i.e., on the distributions of ξ1,1,1 and ξ 1,1,2 . Note that Vξ = Var(Y 1 | Y 0 = uright ), where (Y k )k∈Z+ is a 2-type Galton– Watson process without immigration such that its branching distributions are the same as that of (X t )k∈Z+ , since for each i ∈ {1, 2}, Vξi = Var(Y 1 | Y 0 = ei ). For the sake of simplicity, we consider a zero start Galton–Watson process with immigration, that is, we suppose X 0 = 0. The general case of nonzero initial value may be handled in a similar way, but we renounce to consider it. In the sequel we always assume mε 6= 0, otherwise X k = 0 for all k ∈ N. 3 Main results For each n ∈ N, any CLS estimator (n) cξ m " # α bn βbn = γbn δbn 6 of the offspring mean matrix mξ based on a sample X 1 , . . . , X n has the form (n) cξ = B n A−1 m n (3.1) on the set Ωn := {ω ∈ Ω : det(An (ω)) > 0} , (3.2) where (3.3) An := n X X k−1 X ⊤ k−1 , B n := k=1 n X k=1 (X k − mε )X ⊤ k−1 , see Lemma B.1. The spectral radius ̺ given in (2.5) can be called criticality parameter, and (n) cξ , namely, its natural estimator is the spectral radius of m q b α bn + δn + (b αn − δbn )2 + 4βbn γbn (n)  cξ = (3.4) ̺bn := r m , 2 e n with on the set Ωn ∩ Ω (3.5)  e n := ω ∈ Ωn : (b Ω αn (ω) − δbn (ω))2 + 4βbn (ω)b γn (ω) > 0 . First we consider the critical and positively regular case. By Lemma B.6, P(Ωn ) → 1 and e P(Ωn ) → 1 as n → ∞ under appropriate assumptions. 3.1 Theorem. Let (X k )k∈Z+ be a 2-type Galton–Watson process with immigration such that α, δ ∈ [0, 1) and β, γ ∈ (0, ∞) with α + δ > 0 and βγ = (1 − α)(1 − δ) (hence it is critical and positively regular), X 0 = 0, E(kξ 1,1,1 k8 ) < ∞, E(kξ 1,1,2 k8 ) < ∞, E(kε1 k8 ) < ∞, and mε 6= 0. If hVξ v left , v left i + hVε v left , vleft i + hv left , mε i2 > 0, then the probability of the existence of (n) cξ tends to 1 as n → ∞. the estimator m If hVξ v left , v left i > 0, then the probability of the existence of the estimator ̺bn tends to 1 as n → ∞. If hVξ v left , vleft i > 0, then (3.6) (3.7) 1/2 R 1 ft Yt dW Vξ (1 − λ2 )1/2 0 v⊤ − mξ ) −→ R left , 1 hVξ v left , v left i1/2 Y dt t 0 R1 Yt d(Yt − thuleft , mε i) D , n(b ̺n − 1) −→ 0 R1 2 dt Y t 0 (n) n1/2 (c mξ D as n → ∞, with Yt := huleft , Mt + tmε i, t ∈ R+ , where (Mt )t∈R+ is the unique strong solution of the SDE (3.8) 1/2 dMt = (huleft , Mt + tmε i+ )1/2 Vξ 7 dW t , t ∈ R+ M0 = 0, f t )t∈R+ are independent 2-dimenional standard Wiener processes. where (W t )t∈R+ and (W If hVξ v left , vleft i = 0 and hVε v left , v left i + hv left , mε i2 > 0, then D (n) cξ − mξ −→ m (3.9) where hv left , mε i2 I1 := (1 − λ)2 "Z 0 I3 + I4 ⊤ v I1 + I2 left 1 Yt2 dt − Z 1 0 as n → ∞, 2 # Yt dt , Z hVε v left , v left i 1 2 I2 := Yt dt, 1 − λ2 0 Z 1  Z 1 Z 1 Z 1 hv left , mε i 2 I 3 := Yt dt 1 dMt − Yt dt Yt dMt , 1−λ 0 0 0 0 Z Z 1 hVε v left , v left i1/2 1 2 1/2 f t. Yt dt Vξ Yt dW I 4 := (1 − λ2 )1/2 0 0 3.2 Remark. If hVξ v left , v left i + hVε v left , v left i + hv left , mε i2 = 0 then, by Lemma B.4, (1 − a.s. α)Xk,1 = βXk,2 for all k ∈ N, hence there is no unique CLS estimator for the offspring mean matrix mξ . ✷ 3.3 Remark. By Itô’s formula, (3.8) yields that (Yt )t∈R+ satisfies the SDE (2.8) with initial value Y0 = 0. Indeed, by Itô’s formula and the first 2-dimensional equation of the SDE (5.3) we obtain 1/2 dYt = huleft , mε i dt + (Yt+ )1/2 u⊤ dW t , t ∈ R+ . left V ξ 1/2 1/2 2 ⊤ = 0, hence dYt = huleft , mε idt, t ∈ R+ , If hVξ uleft , uleft i = ku⊤ left Vξ k = 0 then uleft Vξ implying that the process (Yt )t∈R+ satisfies the SDE (2.8). If hVξ uleft , uleft i = 6 0 then the process 1/2 hVξ uleft , W t i f Wt := , t ∈ R+ , hVξ uleft , uleft i1/2 is a (one-dimensional) standard Wiener process, hence the process (Yt )t∈R+ satisfies the SDE (2.8). D Consequently, (Yt )t∈R+ = (Zt )t∈R+ , where (Zt )t∈R+ is the unique strong solution of the SDE (2.8) with initial value Z0 = 0, hence, by Theorem 2.1, (3.10) D (n) D (X t )t∈R+ −→ (X t )t∈R+ = (Yt uright )t∈R+ as n → ∞. If hVξ uleft , uleft i = 0 then the unique strong solution of (2.8) is the deterministic function Yt = huleft , mε i t, t ∈ R+ , and then, in (3.6), we have eventually asymptotic normality, since R1   1/2 ft D Yt Vξ dW 4 0 = N 0, Vξ , R1 3 Y dt t 0 D and by (3.7), n(b ̺n − 1) −→ 0, i.e., the scaling n is not proper. 8 ✷ a.s. 3.4 Remark. Note that hVξ uleft , uleft i = 0 is fulfilled if and only if huleft , ξk,j,i i = huleft , E(ξ1,1,i )i for each k, j ∈ N and i ∈ {1, 2}, i.e., the offspring point ξ k,j,i lies almost surely on a line, orthogonal to uleft and containing the point E(ξ 1,1,i ). Indeed, hVξ uleft , uleft i = 0 is fulfilled if and only if hVξi uleft , uleft i = E[huleft , ξk,j,i − E(ξk,j,i)i2 ] = 0 for each k, j ∈ N and i ∈ {1, 2}. a.s. In a similar way, hVξ v left , v left i = 0 is fulfilled if and only if hv left , ξ k,j,ii = hv left , E(ξ 1,1,i )i for each k, j ∈ N and i ∈ {1, 2}, i.e., the offspring point ξ k,j,i lies almost surely on a line, orthogonal to v left and containing the point E(ξ 1,1,i ). ✷ 3.5 Remark. We note that in the critical positively regular case the limit distribution for the CLS estimator of the offspring mean matrix mξ is concentrated on the 2-dimensional subspace √ 2×2 R2 v ⊤ . Surprisingly, the scaling factor of the CLS estimators of mξ is n, which is left ⊂ R the same as in the subcritical case. The reason of this strange phenomenon can be understood e n given in Theorems 4.1 and 4.2. from the joint asymptotic behavior of det(An ) and D n A One of the decisive tools in deriving the needed asymptotic behavior is a good bound for the moments of the involved processes, see Corollary A.6. ✷  R 1 R1 1/2 f tv⊤ Yt dt in (3.6) is similar to the limit 3.6 Remark. The shape of 0 Yt d Vξ W left 0 distribution of the Dickey–Fuller statistics for unit root test of AR(1) time series, see, e.g., Hamilton [8, 17.4.2 and 17.4.7] or Tanaka [24, (7.14) and Theorem 9.5.1], but it contains two independent 2-dimensional standard Wiener processes, which can be reduced to three 1dimensional independent standard Wiener processes. This phenomenon is very similar to the appearance of two independent standard Wiener processes in limit theorems for CLS estimators of the variance of the offspring and immigration distributions for critical branching processes with immigration in Winnicki [29, Theorems 3.5 and 3.8]. Finally, note that the limit distribution of the CLS estimator of the offspring mean matrix mξ is always symmetric, although f t )t∈R+ are independent, by the SDE non-normal in (3.6). Indeed, since (W t )t∈R+ and (W f t )t∈R are also independent, which yields that the limit (3.8), the processes (Yt )t∈R+ and (W + distribution of the CLS estimator of the offspring mean matrix mξ in (3.6) is symmetric. ✷ 3.7 Remark. We note that an eighth order moment condition on the offspring and immigration distributions in Theorem 3.1 is supposed (i.e., we suppose E(kξ 1,1,1 k8 ) < ∞, E(kξ 1,1,2 k8 ) < ∞ and E(kε1 k8 ) < ∞). However, it is important to remark that this condition is a technical one, we suspect that Theorem 3.1 remains true under lower order moment condition on the offspring and immigration distributions, but we renounce to consider it. ✷ In the subcritical case we have the folowing result. By Lemma B.7, P(Ωn ) → 1 and e P(Ωn ) → 1 as n → ∞ under appropriate assumptions. 3.8 Theorem. Let (X k )k∈Z+ be a 2-type Galton–Watson process with immigration such that α, δ ∈ [0, 1) and β, γ ∈ (0, ∞) with α+δ > 0 and βγ < (1−α)(1−δ) (hence it is subcritical and positively regular), X 0 = 0, E(kξ1,1,1 k2 ) < ∞, E(kξ 1,1,2 k2 ) < ∞, E(kε1 k2 ) < ∞, mε 6= 0, and at least one of the matrices Vξ1 , Vξ2 , Vε is invertible. Then the probability 9 (n) cξ and ̺bn tends to 1 as n → ∞, and the estimators of the existence of the estimators m a.s. (n) (n) a.s. cξ and ̺bn are strongly consistent, i.e., m cξ −→ mξ and ̺bn −→ ̺ as n → ∞. m If, in addition, E(kξ 1,1,1 k6 ) < ∞, E(kξ1,1,2 k6 ) < ∞ and E(kε1 k6 ) < ∞, then (3.12) D (n) n1/2 (c mξ − mξ ) −→ Z, (3.11)   D D n1/2 (b ̺n − ̺) −→ Tr(RZ) = N 0, Tr R⊗2 E(Z ⊗2 ) , as n → ∞, where Z is a 2 × 2 random matrix having a normal distribution with zero mean and with ( 2     X   ⊤ ⊗2 ⊗2 ⊗2 f ei X E(Z ) = E (ξ1,1,i − E(ξ 1,1,i )) E X i=1 )  ⊗2  h  i⊗2 −1   ⊤ ⊤ ⊗2 f f f + E (ε1 − E(ε1 )) E X E XX , f is the unique stationary distriwhere the distribution of the 2-dimensional random vector X bution of the Markov chain (X k )k∈Z+ , and " # α − δ 2β 1 1 R := (∇r(mξ ))⊤ = I 2 + p . 2 2 (α − δ)2 + 4βγ 2γ δ−α We suspect that the moment assumptions might be relaxed to E(kξ1,1,1 k3 ) < ∞, E(kξ 1,1,2 k3 ) < ∞ and E(kε1 k3 ) < ∞ by the method of Danka and Pap [6, Theorem 3.1]. 4 Decomposition of the process Applying (2.2), let us introduce the sequence (4.1) M k := X k − E(X k | Fk−1) = X k − mξ X k−1 − mε , of martingale differences with respect to the filtration (X k )k∈Z+ satisfies the recursion (4.2) (Fk )k∈Z+ . k ∈ N. X k = mξ X k−1 + mε + M k , By (3.1), for each n ∈ N, we have (n) cξ − mξ = Dn A−1 m n on the set Ωn given in (3.2), where An is defined in (3.3), and D n := n X M kX ⊤ k−1 , k=1 10 n ∈ N. k ∈ N, By (4.1), the process In the critical case, by (3.10) and Lemmas C.2 and C.3, one can derive Z 1 D −3 n An −→ Yt2 dt uright u⊤ as n → ∞. right =: A 0 Indeed, let us apply Lemma C.2 and Lemma C.3 with K : [0, 1] × R2 → R2×2 , K(s, x) := xx⊤ , (s, x) ∈ [0, 1] × R2 , and U := X , U n := X (n) , n ∈ N. Then kK(s, x) − K(t, y)k = kxx⊤ − yy ⊤ k = kxx⊤ − yx⊤ + yx⊤ − yyk 6 kx − ykkxk + kykkx − yk 6 2R |t − s| + kx − yk  for all s, t ∈ [0, 1] and x, y ∈ R2 with kxk 6 R and kyk 6 R, where R > 0. Further, for all n ∈ N, ! ! n n X X 1 1 1 (n) (n) (n) X (X )⊤ = XkX⊤ , Φn (X (n) ) = X 1 , X n, 3 k n k=1 k/n k/n n n k=1   Z 1 ⊤ Φ(X ) = X 1 , X u X u du . 0 D Using that, by (3.10), (X n , X n ) −→ (X , X ) as n → ∞ and that the process (X )t∈R+ admits continuous paths with probability one, Lemma C.2 (with the choice C := C(R+ , R)) and Lemma C.3 yield that Z 1 Z 1 n 1 X D ⊤ D ⊤ −3 X k X k −→ X u X u du = (Yu uright )(Yu uright )⊤ du = A n An = 3 n k=1 0 0 as n → ∞. However, since det(A) = 0, the continuous mapping theorem can not be used for determining the weak limit of the sequence (n3 A−1 n )n∈N . We can write (4.3) (n) cξ − mξ = D n A−1 m n = 1 e n, Dn A det(An ) n ∈ N, e n denotes the adjugate of An (i.e., the matrix of cofactors) given by on the set Ωn , where A " # n 2 X X −X X k−1,1 k−1,2 k−1,2 e n := , n ∈ N. A 2 −X X X k−1,1 k−1,2 k−1,1 k=1 In order to prove Theorem 3.1 we will find the asymptotic behavior of the sequence e n )n∈N . First we derive a useful decomposition for Xk , k ∈ N. Let us (det(An ), Dn A introduce the sequence Uk := huleft , X k i = (γ + 1 − δ)Xk,1 + (β + 1 − α)Xk,2 , 1−λ 11 k ∈ Z+ . One can observe that Uk > 0 for all k ∈ Z+ , and Uk = Uk−1 + huleft , mε i + huleft , M k i, (4.4) k ∈ N, ⊤ since huleft , mξ X k−1i = u⊤ left mξ X k−1 = uleft X k−1 = Uk−1 , because uleft is a left eigenvector of the mean matrix mξ belonging to the eigenvalue 1. Hence (Uk )k∈Z+ is a nonnegative unstable AR(1) process with positive drift huleft , mε i and with heteroscedastic innovation (huleft , M k i)k∈N . Note that the solution of the recursion (4.4) is (4.5) Uk = k X j=1 huleft , M j + mε i, k ∈ N, and, by Remark 3.3 and Lemma C.2, (4.6) D (n) D (n−1 U⌊nt⌋ )t∈R+ = (huleft , X t i)t∈R+ −→ (huleft , X t i)t∈R+ = (Yt )t∈R+ as n → ∞, where (Yt )t∈R+ is the pathwise unique strong solution of the SDE (2.8). Moreover, let Vk := hv left , X k i = −(1 − α)Xk,1 + βXk,2 , β +1−α k ∈ Z+ . Note that we have Vk = λVk−1 + hv left , mε i + hv left , M k i, (4.7) k ∈ N, ⊤ since hv left , mξ X k−1 i = v ⊤ left mξ X k−1 = λv left X k−1 = λVk−1 , because v left is a left eigenvector of the mean matrix mξ belonging to the eigenvalue λ. Thus (Vk )k∈N is a stable AR(1) process with drift hv left , mε i and with heteroscedastic innovation (hv left , M k i)k∈N . Note that the solution of the recursion (4.7) is (4.8) Vk = k X j=1 λk−j hv left , M j + mε i, k ∈ N. By (2.1) and (4.1), we obtain the decomposition Xk−1,1 (4.9) Mk = X j=1  ξ k,j,1 − E(ξk,j,1) + Xk−1,2 X j=1   ξk,j,2 − E(ξ k,j,2) + εk − E(εk ) , k ∈ N. a.s. Under the assumption hVξ v left , v left i = 0, by Remark 3.4, we have hv left , ξ k,j,i − E(ξk,j,i )i = 0 a.s. for all k, j ∈ N and i ∈ {1, 2}, and hence hv left , M k i = hvleft , εk − E(εk )i, implying a.s. hv left , M k + mε i = hv left , εk i and, by (4.7), (4.10) a.s. Vk = λVk−1 + hv left , εk i, k ∈ N. The recursion (4.2) has the solution Xk = k X mξk−j (mε + M j ), j=1 12 k ∈ N. Consequently, using (2.6), Xk = k X j=1 =  k−j ⊤ uright u⊤ + λ v v right left left (mε + M j ) k X uright u⊤ left j=1 = k X uright u⊤ left j=1 (X j − mξ X j−1 ) + (X j − X j−1 ) + v right v ⊤ left k X j=1 v right v ⊤ left k X  j=1 λk−j (X j − mξ X j−1 ) λk−j X j − λk−j+1X j−1  ⊤ = uright u⊤ left X k + v right v left X k = Uk uright + Vk v right , hence (4.11) Xk = " # Xk,1 Xk,2 " # " # β β+1−α h i U U − V k k k 1−λ = uright v right = β+1−α , γ+1−δ 1−α Vk U + Vk β+1−α k 1−λ k ∈ Z+ . This decomposition yields (4.12) det(An ) = n−1 X k=1 Uk2 ! n−1 X k=1 Vk2 ! − n−1 X k=1 Uk Vk !2 , since det(An ) = det n X X k−1 X ⊤ k−1 k=1 !   " #" #⊤ n h i h iX ⊤ Uk−1 Uk−1 = det  uright v right uright v right  Vk−1 k=1 Vk−1 where (4.13)  " #" #⊤  n h h ii2 X Uk−1 Uk−1   det uright v right , = det Vk−1 k=1 Vk−1 det h i uright v right = 1. Theorem 3.1 will follow from the following statements by the continuous mapping theorem and by Slutsky’s lemma. 13 4.1 Theorem. Suppose that the assumptions of Theorem 3.1 hold. If hVξ v left , v left i > 0, then n X k=1  P n−5/2 Uk−1 Vk−1 −→ 0  2 n−3 Uk−1   n 2 X  n−2 Vk−1  D   −→  −2  n M U k k−1  k=1  n−3/2 M k Vk−1  as n → ∞,  R1 Yt2 dt 0     hVξ v left ,vleft i R 1 Y dt   2 t 1−λ 0   R   1   Yt dMt 0   R 1/2 1/2 1 hVξ v left ,vleft i f Y d W V t t ξ 0 (1−λ2 )1/2 as n → ∞. In case of hVξ v left , vleft i = 0 the second and fourth coordinates of the limit vector of the second convergence is 0 in Theorem 4.1, thus other scaling factors should be chosen for these coordinates, described in the following theorem. 4.2 Theorem. Suppose that the assumptions of Theorem 3.1 hold. If hVξ v left , v left i = 0, then n X k=1  −3 n P 2 n−1 Vk−1 −→ 2 Uk−1   hv left , mε i2 hVε v left , v left i + =: M (1 − λ)2 1 − λ2  R1 Yt2 dt 0 hv left ,mε i R 1 Yt dt 1−λ 0 R1 Yt dMt 0     D  n Uk−1 Vk−1  −→   −2    k=1  n M k Uk−1   −1 hv left ,mε i n M k Vk−1 M1 + n  −2 X  as n → ∞, 1−λ 1/2R 1 hVε vleft ,v left i1/2 V 2 1/2 ξ 0 (1−λ ) ft Yt dW        as n → ∞. Proof of Theorem 3.1. In order to derive the statements, we can use the continuous mapping theorem and Slutsky’s lemma. Theorem 4.1 implies (3.6). Indeed, we can use the representation (4.3), where the adjugate e An can be written in the form " # n " # X 0 1 0 −1 en = A X ℓ−1 X ⊤ , n ∈ N. ℓ−1 −1 0 ℓ=1 1 0 Using (4.11), we have en = Dn A n X Mk k=1 " #⊤ " #" Uk−1 u⊤ 0 right Vk−1 Here we have " #" u⊤ 0 right v⊤ right 1 −1 0 1 v⊤ right −1 0 #" #⊤ u⊤ right " v⊤ right = 0 #" #⊤ n " #" #⊤ " #" # ⊤ X U u⊤ U u 0 −1 ℓ−1 ℓ−1 right right v⊤ right 1 −1 0 # 14 , ℓ=1 Vℓ−1 " #" # u⊤ 0 −1 right v⊤ right 1 v⊤ right Vℓ−1 0 = " # −v ⊤ left u⊤ left 1 . 0 . Theorem 4.1 implies asymptotic expansions n X Mk k=1 " #⊤ Uk−1 Vk−1 " #" #⊤ n X Uℓ−1 Uℓ−1 Vℓ−1 ℓ=1 Vℓ−1 = n2 Dn,1 + n3/2 D n,2 , = n3 An,1 + n5/2 An,2 + n2 An,3 , where −2 D n,1 := n n X M k Uk−1 e⊤ 1 k=1 n X −3/2 D n,2 := n An,1 An,2 An,3 −→ M k Vk−1 e⊤ 2 k=1 D Z 0 1 Yt dMt e⊤ 1 =: D 1 , Z hVξ v left , v left i1/2 1/2 1 f t e⊤ =: D 2 , −→ Yt dW Vξ 2 (1 − λ2 )1/2 0 D " # " # Z 1 n 2 X U 0 1 0 D ℓ−1 := n−3 −→ Yt2 dt =: A1 , 0 0 0 0 0 ℓ=1 " # n X 0 U V ℓ−1 ℓ−1 D := n−5/2 −→ 0, 0 ℓ=1 Uℓ−1 Vℓ−1 " # " # Z 1 n X 0 0 0 0 v , v i hV D ξ left left Yt dt =: A3 := n−2 −→ 2 1 − λ2 0 1 0 ℓ=1 0 Vℓ−1 jointly as n → ∞. Consequently, we obtain an asymptotic expansion " # " # ⊤ 0 1 −v left e n = (n2 D n,1 + n3/2 D n,2 ) DnA (n3 An,1 + n5/2 An,2 + n2 An,3 ) ⊤ −1 0 uleft # " ⊤ −v left , = (n5 C n,1 + n9/2 C n,2 + n4 C n,3 + n7/2 C n,4 ) ⊤ uleft where C n,1 := D n,1 " 0 # 1 −1 0 An,1 = n−5 n n X X k=1 ℓ=1 15 2 M k Uk−1 Uℓ−1 e⊤ 1 " 0 1 −1 0 #" # 1 0 0 0 =0 for all n ∈ N, and C n,2 := D n,1 C n,3 := D n,1 C n,4 := D n,2 " 0 1 # −1 0 " # 0 1 −1 0 " # 0 1 −1 0 An,2 + Dn,2 An,3 + Dn,2 " 0 1 # −1 0 " # 0 1 D An,3 −→ D 2 D An,1 −→ D 2 −1 0 " # 0 1 −1 0 D An,2 −→ D 1 " 0 1 # −1 0 " # 0 1 −1 0 A1 , A3 , A3 as n → ∞. Using again Theorem 4.1 and (4.12), we conclude   R1 hVξ vleft ,v left i R 1 2 Y dt Y dt " # t t 1−λ2 0 0 n−5 det(An ) D  " # " #    ⊤ −→   0 1 −v −9/2 left e   D n D n An A1 2 −1 0 u⊤ left as n → ∞. Here D2 " 0 1 −1 0 # A1 " # −v ⊤ left u⊤ left hVξ v left , v left i1/2 = (1 − λ2 )1/2 hVξ v left , v left i1/2 = (1 − λ2 )1/2 Z Z 1 0 1/2 dt Vξ Yt2 1/2 dt Vξ 1 0 Z Yt2 1 0 Z 1 0 f t e⊤ Yt dW 2 " 0 1 −1 0 #" #" # 1 0 −v ⊤ left 0 0 u⊤ left f t v⊤ . Yt dW left Since mε 6= 0, by the SDE (2.8), we have P(Yt = 0 for all t ∈ [0, 1]) = 0, which implies  R1 R1 that P 0 Yt2 dt 0 Yt dt > 0 = 1, hence the continuous mapping theorem implies (3.6). For the proof of (3.7), we can write ̺bn − 1 in the form q p αn − δbn )2 + 4βbn b (b αn − α) + (δbn − δ) + (b γn − (α − δ)2 + 4βγ ̺bn − 1 = ̺bn − ̺ = 2 = (b αn − α) + (δbn − δ) 2    (b αn − α) − (δbn − δ) (b αn + α) − (δbn + δ) + 4(βbn − β)b γn + 4(b γn − γ)β + q  p 2 (b αn − δbn )2 + 4βbn b γn + (α − δ)2 + 4βγ cn = q , 2 b b 2 (b αn − δn ) + 4βn b γn + (1 − λ) 16 where cn := (b αn − α) hq i 2 b b b (b αn − δn ) + 4βn γbn + (1 − λ) + (b αn + α) − (δn + δ) + 4(βbn − β)b γn + 4(b γn − γ)β + (δbn − δ) hq i (b αn − δbn )2 + 4βbn b γn + (1 − λ) − (b αn + α) + (δbn + δ) . (n) D P (n) cξ − mξ −→ 0, and hence m cξ − mξ −→ 0 as n → ∞. Slutsky’s lemma and (3.6) imply m P Thus b γn −→ γ, and P (b αn + α) − (δbn + δ) −→ 2(α − δ), P (b αn − δbn )2 + 4βbn γbn −→ (α − δ)2 + 4βγ = (2 − α − δ)2 = (1 − λ)2 D as n → ∞. The aim of the following discussion is to show n(cn − dn ) −→ 0 as n → ∞, where   dn := (b αn − α) 2(1 − λ) + 2α − 2δ + 4(βbn − β)γ   + 4(b γn − γ)β + (δbn − δ) 2(1 − λ) − 2α + 2δ We have = 4(1 − δ)(b αn − α) + 4γ(βbn − β) + 4β(b γn − γ) + 4(1 − α)(δbn − δ). hq i  2 b b n(cn − dn ) = n (b αn − δn ) + 4βn γbn − (1 − λ) (b αn − α) + (δbn − δ)  2 + n (b αn − α) − (δbn − δ) + 4n(βbn − β)(b γn − γ), where q (b αn − δbn )2 + 4βbn b γn − (1 − λ)    (b αn − α) − (δbn − δ) (b αn + α) − (δbn + δ) + 4(βbn − β)b γn + 4(b γn − γ)β q , = 2 b b (b αn − δn ) + 4βn γbn + (1 − λ) D hence n(cn − dn ) −→ 0 as n → ∞ will follow from (4.14)    n (b αn − α) − (δbn − δ) (b αn + α) − (δbn + δ) + 4(βbn − β)b γn + 4(b γn − γ)β   × (b αn − α) + (δbn − δ) i hq αn − δbn )2 + 4βbn b γn + (1 − λ) + n (b n o 2 D × (b αn − α) − (δbn − δ) + 4(βbn − β)(b γn − γ) −→ 0 as n → ∞. 17 By (3.6) we have 1/2 n with (n) (c mξ D − mξ ) −→ 1/2 CVξ Z 1 0 f t v⊤ Yt dW left as n → ∞ (1 − λ)1/2 C := . R1 hVξ v left , vleft i1/2 0 Yt dt Consequently,       1/2 R 1 f t v ⊤ e1 Yt dW e⊤ n1/2 (b αn − α) −(1 − α)e⊤ 1 Vξ left 1I 0  1/2 b  ⊤ 1/2 R 1    ⊤ f t v ⊤ e2   n (βn − β)  D e1 Vξ    Y d W βe I C t 1 left 0   −→ C    =  1/2  ⊤ 1/2 R 1     f t v ⊤ e1  β + 1 − α −(1 − α)e⊤ γn − γ)  I Y d W  n (b e2 Vξ t 2  left 0 1/2 R 1 f t v ⊤ e2 n1/2 (δbn − δ) βe⊤ e⊤ V Yt dW 2I 2 ξ left 0 1/2 R 1 f t . By continuous mapping theorem, as n → ∞ with I := V ξ 0 Yt dW     I (1 − α)2 I ⊤ e1 e⊤ n(b αn − α)2 1     ⊤ ⊤  b  n(b  −(1 − α)βI e1 e1 I   αn − α)(βn − β)      (1 − α)2 I ⊤ e1 e⊤  n(b I  αn − α)(b γn − γ)  2     −(1 − α)βI ⊤ e e⊤ I   n(b  C2 1 2    αn − α)(δbn − δ)  D     −→   n(βbn − β)(b (β + 1 − α)2 −(1 − α)βI ⊤ e1 e⊤ I γn − γ)  2        b  2 ⊤ ⊤ b    n(βn − β)(δn − δ)  β I e1 e2 I     −(1 − α)βI ⊤ e e⊤ I   n(b  b γ − γ)( δ − δ) 2 n n    2  2 ⊤ ⊤ 2 b β I e2 e2 I n(δn − δ) (n) D cξ −→ mξ as as n → ∞, and by continuous mapping theorem, Slutskys lemma and m n → ∞, we conclude (4.14), since     2 ⊤ ⊤ 2 ⊤ 2(α − δ) (1 − α)2 e1 e⊤ 1 − β e2 e2 + 4γ −(1 − α)βe1 e1 + β e1 e2   ⊤ + 4β (1 − α)2 e1 e⊤ 2 − (1 − α)βe2 e2   ⊤ 2 ⊤ ⊤ + 2(1 − λ) (1 − α)2 e1 e⊤ 1 + 2(1 − α)βe1 e2 + β e2 e2 − 4(1 − α)βe1 e2   2 2 = e1 e⊤ 1 2(α − δ)(1 − α) − 4βγ(1 − α) + 2(1 − λ)(1 − α)  2  2 + e1 e⊤ 4β γ + 4β(1 − α) − 4β(1 − α)(1 − λ) 2   2 2 2 + e2 e⊤ −2β (α − δ) − 4β (1 − α) + 2β (1 − λ) = 0. 2 Consequently, (3.7) will follow from (4.15) 2 hq ndn D (b αn − δbn )2 + 4βbn γbn + (1 − λ) i −→ 18 R1 0 Yt d(Yt − thuleft , mε i) R1 2 Yt dt 0 as n → ∞. We can write (n) (n) dn = 4(1 − δ)e⊤ mξ − mξ )e1 + 4γe⊤ mξ − mξ )e2 1 (c 1 (c (n) (n) + 4βe⊤ mξ − mξ )e1 + 4(1 − α)e⊤ mξ − mξ )e2 . 2 (c 2 (c e n . We have We use again the representation (4.3) and the asymptotic expansion of D n A " # " # n X n X 0 1 −v ⊤ left −9/2 Dn,1 An,2 = −n M k Uk−1 Uℓ−1 Vℓ−1 v ⊤ left , −1 0 u⊤ left k=1 ℓ=1 " # " # n X n X 0 1 −v ⊤ left −9/2 2 D n,2 An,1 =n M k Vk−1 Uℓ−1 v⊤ left , −1 0 u⊤ left k=1 ℓ=1 implying (1 − δ)e⊤ 1 D n,1 " 0 1 # An,2 e1 + γe⊤ 1 D n,1 " 0 1 # An,2 e2 −1 0 −1 0 " # " # !" # ⊤ 0 1 0 1 −v left + βe⊤ An,2 e1 + (1 − α)e⊤ An,2 e2 = 0, 2 D n,1 2 D n,1 ⊤ −1 0 −1 0 uleft " # " # 0 1 0 1 (1 − δ)e⊤ An,1 e1 + γe⊤ An,1 e2 1 D n,2 1 D n,2 −1 0 −1 0 " # " # !" # ⊤ 0 1 0 1 −v left + βe⊤ An,1 e1 + (1 − α)e⊤ An,1 e2 =0 2 D n,2 2 D n,2 ⊤ −1 0 −1 0 uleft for all n ∈ N, and (1 − δ)e⊤ 1 D n,2 " 0 # 1 " 0 1 # An,2 e1 + γe⊤ An,2 e2 1 D n,2 −1 0 −1 0 " # " # 0 1 0 1 P ⊤ ⊤ + βe2 D n,2 An,2 e1 + (1 − α)e2 D n,2 An,2e2 −→ 0 −1 0 −1 0 as n → ∞. Moreover, " # " # Z Z 1 0 1 −v ⊤ hVξ v left , vleft i 1 left Yt dt Yt dMt u⊤ D1 A3 = left . 2 ⊤ 1 − λ −1 0 uleft 0 0 19 Using again Theorem 4.1 and (4.12), we conclude 2 hq D −→ = ndn (b αn − δbn )2 + 4βbn b γn + (1 − λ) (1 − λ) 1 R1 Yt2 0 1 R1 (1 − λ)2 0 1 R1 dt  Z ⊤ (1 − δ)e1 + Yt2 dt i   βe⊤ 2 Z 1 Yt dMt u⊤ left e1 0 + γe⊤ 1 0 Yt dMt u⊤ left e1 + (1 − 1 Yt dMt u⊤ left e2 0 1 α)e⊤ 2  (1 − δ)(γ + 1 − δ) + γ(β + 1 − α) e⊤ 1 Z 1 0 Z  δ)e⊤ 1 Z Yt dMt u⊤ left e2  1 0   + β(γ + 1 − δ) + (1 − δ)(β + 1 − α) e⊤ 2 1 (γ + 1 − Yt dMt + (β + 1 − (1 − λ) 0 Yt2 dt 0 R1 R1 Yt d(Yt − thuleft , mε i) Yt dhuleft , Mt i 0 = 0 = R1 2 R1 2 Yt dt Yt dt 0 0 = Z α)e⊤ 2 Yt dMt Z 1 Yt dMt 0 Z  1 0 Yt dMt  as n → ∞. Next we show that Theorem 4.2 yields (3.9). Theorem 4.2 implies asymptotic expansions n X Mk k=1 #⊤ " Uk−1 Vk−1 " #" #⊤ n X Uℓ−1 Uℓ−1 ℓ=1 Vℓ−1 Vℓ−1 = n2 Dn,1 + nD n,2 , = n3 An,1 + n2 An,2 + nAn,3 , 20 where −2 Dn,1 := n n X M k Uk−1 e⊤ 1 k=1 −1 Dn,2 := n n X D −→ Z 1 Yt dMt e⊤ 1 =: D 1 , 0 M k Vk−1 e⊤ 2 k=1   Z hVε v left , v left i1/2 1/2 1 hv left , mε i f t e⊤ =: D 2 , M1 + −→ Yt dW Vξ 2 1−λ (1 − λ2 )1/2 0 " # " # Z 1 n 2 X U 0 1 0 D ℓ−1 := n−3 −→ Yt2 dt =: A1 , 0 0 0 0 0 ℓ=1 " # " # Z 1 n X 0 U V 0 1 hv , m i ℓ−1 ℓ−1 D left ε := n−2 −→ Yt2 dt =: A2 , 1 − λ U V 0 1 0 0 ℓ−1 ℓ−1 ℓ=1 D An,1 An,2 An,3 # " # "  n 2 X 0 0 0 0 hV v , v i hv , m i D ε left left left ε + =: A3 := n−1 −→ 2 (1 − λ)2 1 − λ2 0 1 ℓ=1 0 Vℓ−1 jointly as n → ∞. Consequently, we obtain an asymptotic expansion " # " # ⊤ 0 1 −v left e n = (n2 D n,1 + nD n,2 ) DnA (n3 An,1 + n2 An,2 + nAn,3 ) ⊤ −1 0 uleft # " ⊤ −v left , = (n5 C n,1 + n4 C n,2 + n3 C n,3 + n2 C n,4 ) ⊤ uleft where " 0 An,2 + D n,2 " An,3 + D n,2 " C n,1 := Dn,1 1 −1 0 # An,1 = 0 for all n ∈ N, and C n,2 := Dn,1 C n,3 := Dn,1 C n,4 := Dn,2 " 0 1 # −1 0 " # 0 1 −1 0 " # 0 1 −1 0 D An,3 −→ D 2 0 1 −1 0 0 1 # An,1 −→ D 1 # An,2 −→ D 1 D −1 0 " # 0 1 −1 0 D A3 21 " 0 1 # −1 0 " # 0 1 −1 0 A2 + D 2 A3 + D 2 " 0 # 1 −1 0 " # 0 1 −1 0 A1 , A2 , as n → ∞. Using again Theorem 4.1 and (4.12), we conclude R    2  1 2 hVε vleft ,v left i hv left ,mε i2 R 1 hv left ,mε i2 " # + − (1−λ)2 Yt dt Yt dt (1−λ)2 1−λ2 0 0  n−4 det(An ) D  " # " # " # " #   −→   0 1 −v ⊤ 0 1 −v ⊤ en left left  D  n−4 D n A A + D A 1 2 2 1 ⊤ ⊤ −1 0 uleft −1 0 uleft as n → ∞. Here  Z 1 2  Z 1 hv left , mε i2 hv left , mε i2 hVε v left , v left i 2 + − Yt dt = I1 + I2 , Yt dt (1 − λ)2 1 − λ2 (1 − λ)2 0 0 D1 " 0 1 −1 0 # A2 # " −v ⊤ left u⊤ left hv left , mε i = 1−λ hv left , mε i = 1−λ Z 1 Yt dt 0 Z 0 1 Yt dt Z Z 1 Yt dMt e⊤ 1 0 " 0 1 −1 0 # #" #" 0 1 −v ⊤ left 1 0 u⊤ left 1 0 Yt dMt v ⊤ left and D2 " 0 1 −1 0 # A1 " # −v ⊤ left u⊤ left # #" #"  " Z 1 ⊤ 1/2 0 1 1 0 −v hV v , v i hv , m i 1/2 ε left left left ε left f t e⊤ M1 + Yt dW Vξ = Yt2 dt 2 2 )1/2 ⊤ 1 − λ (1 − λ −1 0 0 0 uleft 0 0   Z Z 1 hv left , mε i hVε v left , v left i1/2 1/2 1 2 f Vξ Yt dW t v ⊤ = Yt dt M1 + left . 2 )1/2 1 − λ (1 − λ 0 0 Z 1  Since mε 6= 0, by the SDE (2.8), we have P(Yt = 0 for all t ∈ [0, 1]) = 0, which implies R1 R1  that P 0 Yt2 dt 0 Yt dt > 0 = 1, hence the continuous mapping theorem implies (3.9). ✷ 5 Proof of Theorem 4.1 The first convergence in Theorem 4.1 follows from Lemma B.3. For the second convergence in Theorem 4.1, consider the sequence of stochastic processes       (n) −1 −1 n M n Mt k ⌊nt⌋ X      (n)  (n) (n) (n) −2   n−2 Uk−1  ⊗ M k   Zk with Z k :=  n M k Uk−1  = Z t :=  N t  :=    (n) k=1 −3/2 −3/2 n M k Vk−1 n Vk−1 Pt for t ∈ R+ and k, n ∈ N, where ⊗ denotes Kronecker product of matrices. The second convergence in Theorem 4.1 follows from Lemma B.2 and the following theorem (this will be explained after Theorem 5.1). 22 5.1 Theorem. Suppose that the assumptions of Theorem 4.1 hold. Then we have D Z (n) −→ Z (5.1) as n → ∞, where the process (Z t )t∈R+ with values in (R2 )3 is the unique strong solution of the SDE " # dW t dZ t = γ(t, Z t ) , ft dW (5.2) t ∈ R+ , f t )t∈R are independent 2-dimensional with initial value Z 0 = 0, where (W t )t∈R+ and (W + standard Wiener processes, and γ : R+ × (R2 )3 → (R2×2 )3×2 is defined by   + 1/2 (huleft , x1 + tmε i ) 0   + 3/2   ⊗ Vξ1/2 γ(t, x) := (huleft , x1 + tmε i ) 0  hVξ v left ,vleft i1/2 0 huleft , x1 + tmε i (1−λ2 )1/2 for t ∈ R+ and x = (x1 , x2 , x3 ) ∈ (R2 )3 . (Note that the statement of Theorem 5.1 holds even if hVξ v left , v left i = 0, when the last 2-dimensional coordinate process of the unique strong solution (Z t )t∈R+ is 0.) The SDE (5.2) has the form     1/2 + 1/2 dW (huleft , Mt + tmε i ) Vξ t dMt     1/2   + 3/2   (5.3) dZ t =  dN t  =  (huleft , Mt + tmε i ) Vξ dW t ,   1/2 1/2 hVξ v left ,vleft i f dP t huleft , Mt + tmε i Vξ dW t 2 1/2 t ∈ R+ . (1−λ ) One can prove that the first 2-dimensional equation of the SDE (5.3) has a pathwise unique (y ) (y ) strong solution (Mt 0 )t∈R+ with arbitrary initial value M0 0 = y 0 ∈ R2 . Indeed, it is equivalent to the existence of a pathwise unique strong solution of the SDE  1/2 dSt = huleft , mε i dt + (St+ )1/2 u⊤ dW t , left Vξ (5.4) t ∈ R+ , dQ = −Πm dt + (S + )1/2 I − ΠV 1/2 dW , t ε 2 t t ξ  (y ) (y )  with initial value S0 0 , Q0 0 = huleft , y 0 i, (I 2 − Π)y 0 ∈ R × R2 , where I 2 denotes the 2-dimensional unit matrix and Π := uright u⊤ left , since we have the correspondences (y 0 ) St (y 0 ) = u⊤ left (Mt (y 0 ) Qt + tmε ), (y 0 ) Mt (y 0 ) = Qt (y 0 ) + St (y 0 ) = Mt (y 0 ) − St uright uright , see the proof of Ispány and Pap [12, Theorem 3.1]. By Remark 2.2, St+ may be replaced by St for all t ∈ R+ in the first equation of (5.4) provided that huleft , y 0 i ∈ R+ , hence 23 huleft , Mt + tmε i+ may be replaced by huleft , Mt + tmε i for all t ∈ R+ in (5.3). Thus the SDE (5.2) has a pathwise unique strong solution with initial value Z 0 = 0, and we have   Rt   1/2 1/2 dW V hu , M + sm i s left s ε ξ Mt 0     Rt     Zt =  N t  =  t ∈ R+ . huleft , Ms + smε i dMs , 0   R 1/2 1/2 t hVξ vleft ,v left i fs Pt huleft , Ms + smε i V dW 2 1/2 ξ 0 (1−λ ) D By the method of the proof of X (n) −→ X in Theorem 3.1 in Barczy et al. [4], applying Lemma C.2, one can easily derive " # " # e X (n) D X −→ (5.5) as n → ∞, Z (n) Z where (n) Xt := n−1 X ⌊nt⌋ , More precisely, using that e t := huleft , Mt + tmε iuright , X Xk = k X mξk−j (M j + mε ), j=1 we have " # X (n) Z (n) = ψn (Z (n) ), t ∈ R+ , k ∈ N, n ∈ N, where the mapping ψn : D(R+ , (R2 )3 ) → D(R+ , (R2 )4 ) is given by P⌊nt⌋ ⌊nt⌋−j   + f1 nj − f1 j−1 j=1 mξ n   f1 (t) ψn (f1 , f2 , f3 )(t) :=   f2 (t)  f3 (t) for f1 , f2 , f3 ∈ D(R+ , R2 ), t ∈ R+ , n ∈ N. Further, we have " # e X = ψ(Z), Z where the mapping ψ : D(R+ , (R2 )3 ) → D(R+ , (R2 )4 ) is given by   huleft , f1 (t) + tmε iuright     f (t) 1  ψ(f1 , f2 , f3 )(t) :=    f (t)   2 f3 (t) 24 n ∈ N. mε n       for f1 , f2 , f3 ∈ D(R+ , R2 ) and t ∈ R+ . By page 603 in Barczy et al. [4], the mappings ψn , n ∈ N, and ψ are measurable (the latter one is continuous too), since the coordinate functions are measurable. Using page 604 in Barczy et al. [4], we obtain that the set  C := f ∈ C(R+ , (R2 )3 ) : f (0) = 0 ∈ (R2 )3 has the properties C ⊆ Cψ,(ψn )n∈N with C ∈ B(D(R+ , (R2 )3 )) and P(Z ∈ C) = 1, where Cψ,(ψn )n∈N is defined in Appendix C. Hence, by (5.1) and Lemma C.2, we have " # X (n) Z (n) D = ψn (Z (n) ) −→ ψ(Z) = " # e X Z as n → ∞, as desired. Next, similarly to the proof of (B.5), by Lemma C.3, convergence (5.5) with Uk−1 = huleft , X k−1 i and Lemma B.2 implies   R1   e t i2 dt hu , X −3 2 left 0 n Uk−1   R1     v ,v hV ξ left left i n e 2 X  n−2 Vk−1 hu , X i dt   D  left t 1−λ2 0    −→  as n → ∞. R   −2   1 n M U   Y dM   k k−1 t t k=1 0   1/2 hVξ v left ,v left i1/2 R 1 n−3/2 M k Vk−1 f Y d W V t t 2 1/2 0 (1−λ ) ξ This limiting random vector can be written in the form as given in Theorem 4.1, since e t i = Yt for all t ∈ R+ . huleft , X D Proof of Theorem 5.1. In order to show convergence Z (n) −→ Z, we apply Theorem D.1 (n) (n) (n) with the special choices U := Z, U k := Z k , n, k ∈ N, (Fk )k∈Z+ := (Fk )k∈Z+ and the function γ which is defined in Theorem 5.1. Note that the discussion after Theorem 5.1 shows that the SDE (5.2) admits a unique strong solution (Z zt )t∈R+ for all initial values Z z0 = z ∈ (R2 )3 . Now we show that conditions (i) and (ii) of Theorem D.1 hold. The conditional variance has the form   n−2 n−3 Uk−1 n−5/2 Vk−1    (n) −3 −4 2 −7/2  ⊗ VM Var Z k | Fk−1 =  n U n U n U V k−1 k−1 k−1 k k−1   −5/2 −7/2 −3 2 n Vk−1 n Uk−1 Vk−1 n Vk−1 (n) ⊤ for n ∈ N, k ∈ {1, . . . , n}, with VM k := Var(M k | Fk−1), and γ(s, Z (n) has s )γ(s, Z s ) the form   2 huleft , Ms(n) + smε i huleft , M(n) + sm i 0 ε s   huleft , M(n) + smε i2 huleft , M(n) + smε i3  ⊗ Vξ 0 s s   hVξ v left ,vleft i (n) 2 0 0 huleft , Ms + smε i 1−λ2 25 for s ∈ R+ , where we used that huleft , Ms(n) + smε i+ = huleft , M(n) s + smε i, s ∈ R+ , n ∈ N. Indeed, by (4.1), we get huleft , M(n) s ⌊ns⌋ 1X + smε i = huleft , X k − mξ X k−1 − mε i + huleft , smε i n k=1 ⌊ns⌋ 1X huleft , X k − X k−1 − mε i + shuleft , mε i = n k=1 (5.6) = 1 ns − ⌊ns⌋ 1 ns − ⌊ns⌋ huleft , X ⌊ns⌋ i + huleft , mε i = U⌊ns⌋ + huleft , mε i ∈ R+ n n n n ⊤ ⊤ for s ∈ R+ , n ∈ N, since u⊤ left mξ = uleft implies huleft , mξ X k−1 i = uleft mξ X k−1 = u⊤ left X k−1 = huleft , X k−1 i. In order to check condition (i) of Theorem D.1, we need to prove that for each T > 0, (5.7) sup t∈[0,T ] sup (5.8) t∈[0,T ] (5.9) sup t∈[0,T ] (5.10) sup t∈[0,T ] (5.11) Z t ⌊nt⌋ 1 X P VM k − huleft , M(n) s + smε i Vξ ds −→ 0, n2 k=1 0 Z t ⌊nt⌋ 1 X P 2 Uk−1 VM k − huleft , M(n) s + smε i V ξ ds −→ 0, n3 k=1 0 Z t ⌊nt⌋ 1 X 2 P 3 U VM k − huleft , M(n) s + smε i V ξ ds −→ 0, n4 k=1 k−1 0 Z ⌊nt⌋ hVξ v left , v left i t 1 X 2 P 2 V VM k − huleft , M(n) s + smε i Vξ ds −→ 0, n3 k=1 k−1 1 − λ2 0 sup t∈[0,T ] (5.12) sup t∈[0,T ] ⌊nt⌋ 1 X n5/2 k=1 ⌊nt⌋ 1 X n7/2 k=1 P Vk−1 VM k −→ 0, P Uk−1 Vk−1 VM k −→ 0 as n → ∞. First we show (5.7). By (5.6), Z 0 t huleft , M(n) s ⌊nt⌋−1 ⌊nt⌋ + (nt − ⌊nt⌋)2 nt − ⌊nt⌋ 1 X U + huleft , mε i. Uk + + smε i ds = 2 ⌊nt⌋ n k=1 n2 2n2 Using Lemma A.1, we have VM k = Uk−1 Vξ + Vk−1 Ve ξ + Vε , thus, in order to show (5.7), it 26 suffices to prove −2 n (5.13) ⌊nT ⌋ X k=1 P P n−2 sup U⌊nt⌋ −→ 0, |Vk | −→ 0, t∈[0,T ]   n−2 sup ⌊nt⌋ + (nt − ⌊nt⌋)2 → 0 (5.14) t∈[0,T ] as n → ∞. Using (A.6) with (ℓ, i, j) = (2, 0, 1) and (A.7) with (ℓ, i, j) = (2, 1, 0), we have (5.13). Clearly, (5.14) follows from |nt − ⌊nt⌋| 6 1, n ∈ N, t ∈ R+ , thus we conclude (5.7). Next we turn to prove (5.8). By (5.6), Z ⌊nt⌋−1 ⌊nt⌋−1 X 1 nt − ⌊nt⌋ 2 1 X 2 U + U + hu , m i U⌊nt⌋ k left ε k 3 n3 k=1 n3 n k=1 t 0 2 huleft , M(n) s + smε i ds = + ⌊nt⌋ + (nt − ⌊nt⌋)3 (nt − ⌊nt⌋)2 hu , m iU + huleft , mε i2 . left ε ⌊nt⌋ n3 3n3 Using Lemma A.1, we obtain ⌊nt⌋ X (5.15) Uk−1 VM k = k=1 ⌊nt⌋ X 2 Uk−1 Vξ + k=1 ⌊nt⌋ X k=1 Thus, in order to show (5.8), it suffices to prove (5.16) −3 n ⌊nT ⌋ X k=1 P −3 |Uk Vk | −→ 0, n ⌊nT ⌋ X k=1 Uk−1 Vk−1Veξ + P Uk −→ 0, ⌊nt⌋ X Uk−1 Vε . k=1 P n−3/2 sup U⌊nt⌋ −→ 0, t∈[0,T ]   n−3 sup ⌊nt⌋ + (nt − ⌊nt⌋)3 → 0 (5.17) t∈[0,T ] as n → ∞. By (A.6) with (ℓ, i, j) = (2, 1, 1) and (ℓ, i, j) = (2, 1, 0), and by (A.13), we have (5.16). Clearly, (5.17) follows from |nt − ⌊nt⌋| 6 1, n ∈ N, t ∈ R+ , thus we conclude (5.8). Now we turn to check (5.9). Again by (5.6), we have Z 0 t huleft , Ms(n) ⌊nt⌋−1 ⌊nt⌋−1 ⌊nt⌋−1 X X 3 1 1 X 3 2 2 Uk Uk + 4 huleft , mε i Uk + 4 huleft , mε i + smε i ds = 4 n k=1 2n n k=1 k=1 3 + 3(nt − ⌊nt⌋)2 nt − ⌊nt⌋ 3 2 U + huleft , mε iU⌊nt⌋ ⌊nt⌋ n4 2n4 (nt − ⌊nt⌋)3 ⌊nt⌋ + (nt − ⌊nt⌋)4 2 + huleft , mε i U⌊nt⌋ + huleft , mε i3 . 4 4 n 4n Using Lemma A.1, we obtain (5.18) ⌊nt⌋ X k=1 2 Uk−1 VM k = ⌊nt⌋ X k=1 3 Vξ Uk−1 + ⌊nt⌋ X k=1 27 2 Uk−1 Vk−1 Veξ + ⌊nt⌋ X k=1 2 Uk−1 Vε . Thus, in order to show (5.9), it suffices to prove −4 n (5.19) ⌊nT ⌋ X k=1 −4 (5.20) n ⌊nT ⌋ X k=1 |Uk2 Vk | P −4 −→ 0, P n ⌊nT ⌋ X k=1 P Uk2 −→ 0, P n−4/3 sup U⌊nt⌋ −→ 0, Uk −→ 0, t∈[0,T ]   n−4 sup ⌊nt⌋ + (nt − ⌊nt⌋)4 → 0 (5.21) t∈[0,T ] as n → ∞. By (A.6) with (ℓ, i, j) = (4, 2, 1), (ℓ, i, j) = (4, 2, 0), and (ℓ, i, j) = (2, 1, 0), and by (A.13), we have (5.19) and (5.20). Clearly, (5.21) follows again from |nt − ⌊nt⌋| 6 1, n ∈ N, t ∈ R+ , thus we conclude (5.9). Next we turn to prove (5.10). First we show that −3 n (5.22) sup t∈[0,T ] ⌊nt⌋ X 2 Vk−1 VM k k=1 ⌊nt⌋ hVξ v left , vleft i X 2 P − Uk−1 Vξ −→ 0 2 1−λ k=1 as n → ∞ for all T > 0. Using Lemma A.1, we obtain ⌊nt⌋ X (5.23) 2 Vk−1 VM k = ⌊nt⌋ X 2 Vξ Uk−1 Vk−1 + k=1 k=1 k=1 ⌊nt⌋ X 3 e Vk−1 Vξ + ⌊nt⌋ X 2 Vk−1 Vε . k=1 Using (A.6) with (ℓ, i, j) = (6, 0, 3) and (ℓ, i, j) = (4, 0, 2), we have −3 n ⌊nT ⌋ X k=1 3 P |Vk | −→ 0, −3 n ⌊nT ⌋ X k=1 P Vk2 −→ 0 as n → ∞, hence (5.22) will follow from (5.24) −3 n sup t∈[0,T ] ⌊nt⌋ X k=1 2 Uk−1 Vk−1 ⌊nt⌋ hVξ v left , v left i X 2 P − Uk−1 −→ 0 2 1−λ k=1 as n → ∞ P⌊nt⌋ 2 for all T > 0. The aim of the following discussion is to decompose k=1 Uk−1 Vk−1 as a sum of a martingale and some other terms. Using recursions (4.7), (4.4) and formulas (A.1) and (A.2), we obtain   2 2 E(Uk−1 Vk−1 | Fk−2) = E (Uk−2 + huleft , M k−1 + mε i) λVk−2 + hv left , M k−1 + mε i Fk−2 ⊤ 2 + v⊤ = λ2 Uk−2 Vk−2 left E(M k−1 M k−1 | Fk−2 )v left Uk−2 2 + constant + linear combination of Uk−2 Vk−2 , Vk−2 , Uk−2 and Vk−2 2 2 = λ2 Uk−2 Vk−2 + hVξ v left , v left i Uk−2 + constant 2 + linear combination of Uk−2 Vk−2 , Vk−2 , Uk−2 and Vk−2 . 28 Thus ⌊nt⌋ X 2 Uk−1 Vk−1 = ⌊nt⌋ X  2 Uk−1 Vk−1 k=2 k=1 − 2 E(Uk−1 Vk−1 | Fk−2)  + ⌊nt⌋ X k=2 2 E(Uk−1 Vk−1 | Fk−2) ⌊nt⌋ ⌊nt⌋ ⌊nt⌋ X X X   2 2 2 2 2 = Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) + λ Uk−2 Vk−2 + hVξ v left , v left i Uk−2 k=2 k=2 + O(n) + linear combination of ⌊nt⌋ X k=2 Uk−2 Vk−2 , ⌊nt⌋ X ⌊nt⌋ X 2 Vk−2 , Vk−2 . k=2 k=2 k=2 k=2 Uk−2 and ⌊nt⌋ X Consequently, ⌊nt⌋ X 2 Uk−1 Vk−1 k=1 ⌊nt⌋  1 X 2 2 U V − E(U V | F ) = k−1 k−1 k−2 k−1 k−1 1 − λ2 k=2 ⌊nt⌋ hVξ v left , v left i X 2 λ2 2 + Uk−2 − U⌊nt⌋−1 V⌊nt⌋−1 + O(n) 2 2 1−λ 1−λ k=2 ⌊nt⌋ X + linear combination of Uk−2 Vk−2 , k=2 ⌊nt⌋ X 2 Vk−2 , k=2 ⌊nt⌋ X Uk−2 and k=2 ⌊nt⌋ X Vk−2 . k=2 Using (A.8) with (ℓ, i, j) = (8, 1, 2) we have −3 n ⌊nt⌋ X   P 2 2 sup Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) −→ 0 as n → ∞. t∈[0,T ] k=2 Thus, in order to show (5.24), it suffices to prove (5.25) n−3 ⌊nT ⌋ X k=1 −3 n (5.26) ⌊nT ⌋ X k=1 (5.27) P n−3 |Uk Vk | −→ 0, P X k=1 −3 Uk −→ 0, ⌊nT ⌋ n ⌊nT ⌋ X k=1 P 2 n−3 sup U⌊nt⌋ V⌊nt⌋ −→ 0, t∈[0,T ] P Vk2 −→ 0, P |Vk | −→ 0, P n−3/2 sup U⌊nt⌋ −→ 0 t∈[0,T ] as n → ∞. Using (A.6) with (ℓ, i, j) = (2, 1, 1); (ℓ, i, j) = (4, 0, 2); (ℓ, i, j) = (2, 1, 0), and (ℓ, i, j) = (2, 0, 1), we have (5.25) and (5.26). By (A.7) with (ℓ, i, j) = (4, 1, 2), and by (A.13), we have (5.27). Thus we conclude (5.24), and hence (5.22). By Lemma A.1 and (A.6) with (ℓ, i, j) = (2, 1, 1) and (ℓ, i, j) = (2, 1, 0), we get (5.28) −3 n sup t∈[0,T ] ⌊nt⌋ X k=1 Uk−1 VM k − 29 ⌊nt⌋ X k=1 P 2 Vξ −→ 0 Uk−1 as n → ∞ for all T > 0. As a last step, using (5.8), we obtain (5.10). For (5.11), consider ⌊nt⌋ X (5.29) Vk−1 VM k = k=1 ⌊nt⌋ X Uk−1 Vk−1 Vξ + ⌊nt⌋ X k=1 k=1 2 e Vk−1 Vξ + ⌊nt⌋ X Vk−1Vε , k=1 where we used Lemma A.1. Using (A.6) with (ℓ, i, j) = (4, 0, 2), and (ℓ, i, j) = (2, 0, 1), we have −5/2 n ⌊nT ⌋ X Vk2 k=1 P −5/2 −→ 0, n ⌊nT ⌋ X k=1 hence (5.11) follows from Lemma B.3. P |Vk | −→ 0 as n → ∞, Convergence (5.12) can be handled in the same way as (5.11). For completeness we present all of the details. By Lemma A.1, we have ⌊nt⌋ X (5.30) Uk−1 Vk−1 VM k = k=1 ⌊nt⌋ X 2 Uk−1 Vk−1 Vξ + k=1 ⌊nt⌋ X k=1 2 e Uk−1 Vk−1 Vξ + Using (A.6) with (ℓ, i, j) = (4, 1, 2), and (ℓ, i, j) = (2, 1, 1), we have −7/2 n ⌊nT ⌋ X 2 Uk−1 Vk−1 k=1 P −→ 0, −7/2 n n (5.31) sup ⌊nt⌋ X t∈[0,T ] k=1 X k=1 hence (5.12) will follow from −7/2 ⌊nT ⌋ ⌊nt⌋ X P |Uk−1Vk−1 | −→ 0 P 2 Uk−1 Vk−1 −→ 0 Uk−1 Vk−1 Vε . k=1 as n → ∞, as n → ∞. P⌊nt⌋ 2 The aim of the following discussion is to decompose k=1 Uk−1 Vk−1 as a sum of a martingale and some other terms. Using recursions (4.7), (4.4) and Lemma A.1, we obtain    2 E(Uk−1 Vk−1 | Fk−2) = E (Uk−2 + huleft , M k−1 + mε i)2 λVk−2 + hv left , M k−1 + mε i Fk−2 2 2 2 Vk−2 + constant + linear combination of Uk−2 , Vk−2 , Uk−2 , Vk−2 and Uk−2 Vk−2 . = λUk−2 Thus ⌊nt⌋ X 2 Uk−1 Vk−1 ⌊nt⌋ ⌊nt⌋ X  2  X 2 2 E(Uk−1 Vk−1 | Fk−2) Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) + = k=2 k=2 k=1 ⌊nt⌋ ⌊nt⌋ X X  2  2 2 Uk−2 Vk−2 + O(n) Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) + λ = k=2 k=2 + linear combination of ⌊nt⌋ X k=1 Uk−2 , ⌊nt⌋ X Vk−2 , k=1 30 ⌊nt⌋ X k=1 2 Uk−2 , ⌊nt⌋ X k=1 2 Vk−2 and ⌊nt⌋ X k=1 Uk−2 Vk−2 . Consequently ⌊nt⌋ X ⌊nt⌋  1 X 2 λ 2 = Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) − U2 V⌊nt⌋−1 1 − λ k=2 1 − λ ⌊nt⌋−1 2 Uk−1 Vk−1 k=1 + O(n) + linear combination of ⌊nt⌋ X ⌊nt⌋ X Uk−2 , k=1 Vk−2 , k=1 ⌊nt⌋ X 2 Uk−2 , k=1 ⌊nt⌋ X 2 Vk−2 and k=1 ⌊nt⌋ X Uk−2 Vk−2 . k=1 Using (A.8) with (ℓ, i, j) = (8, 2, 1) we have −7/2 n ⌊nt⌋ X  2  P 2 Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) −→ 0 sup as n → ∞. t∈[0,T ] k=2 Thus, in order to show (5.31), it suffices to prove −7/2 n (5.32) ⌊nT ⌋ X k=1 (5.33) −7/2 n ⌊nT ⌋ X k=1 Vk2 P −7/2 Uk −→ 0, P n X Uk2 k=1 −7/2 −→ 0, ⌊nT ⌋ n ⌊nT ⌋ X k=1 P −→ 0, P |Uk Vk | −→ 0, −7/2 n ⌊nT ⌋ X k=1 P |Vk | −→ 0, P 2 n−7/2 sup |U⌊nt⌋ V⌊nt⌋ | −→ 0 t∈[0,T ] as n → ∞. Here (5.32) and (5.33) follow by (A.6) and (A.7), thus we conclude (5.12). Finally, we check condition (ii) of Theorem D.1, i.e., the conditional Lindeberg condition (5.34) ⌊nT ⌋ X k=1  P (n) E kZ k k2 1{kZ (n) k>θ} Fk−1 −→ 0 k for all θ > 0 and T > 0.   (n) (n) We have E kZ k k2 1{kZ (n) k>θ} Fk−1 6 θ−2 E kZ k k4 Fk−1 and k  (n) 4 4 kZ k k4 6 3 n−4 + n−8 Uk−1 + n−6 Vk−1 kM k−1k4 . Hence ⌊nT ⌋ X k=1  (n) E kZ k k2 1{kZ (n) k>θ} → 0 k as n → ∞ for all θ > 0 and T > 0, q 4 8 E(kM k k8 ) E(Uk−1 E(kM k k4 ) = O(k 2 ), E(kM k k4 Uk−1 ) 6 ) = O(k 6 ) q 4 8 ) = O(k 4 ) by Corollary A.6. This yields (5.34). E(kM k k4 Vk−1 ) 6 E(kM k k8 ) E(Vk−1 since and ✷ We call the attention to the fact that our eighth order moment conditions E(kξ1,1,1 k8 ) < ∞, E(kξ 1,1,2 k8 ) < ∞ and E(kε1 k8 ) < ∞ are used for applying Corollary A.6. 31 6 Proof of Theorem 4.2 The first convergence in Theorem 4.2 follows from Lemma B.5. For the second convergence in Theorem 4.2, consider the sequence of stochastic processes     (n) −1 n M Mt k ⌊nt⌋ X   (n)   (n) (n) (n) −2    Zk with Z k := n M k Uk−1  Z t :=  N t  :=  (n) k=1 −1 Pt n M k Vk−1 for t ∈ R+ and k, n ∈ N. Theorem 4.2 follows from Lemma B.4 and the following theorem (this will be explained after Theorem 6.1). 6.1 Theorem. Suppose that the assumptions of Theorem 4.2 hold. If hVξ v left , v left i = 0 then (6.1) D Z (n) −→ Z as n → ∞, where the process (Z t )t∈R+ with values in R2 × (R2 )3 is the unique strong solution of the SDE " # dW t (6.2) dZ t = γ(t, Z t ) , t ∈ R+ , ft dW f t )t∈R+ are independent 2-dimensional with initial value Z 0 = 0, where (W t )t∈R+ and (W standard Wiener processes, and γ : R+ × (R2 )3 → (R2×2 )3×2 is defined by   (huleft , x1 + tmε i+ )1/2 0   + 3/2  ⊗ V 1/2 γ(t, x) :=  (hu , x + tm i ) 0 left 1 ε ξ   1/2 hv left ,mε i + 1/2 + 1/2 hVε v left ,vleft i (huleft , x1 + tmε i ) (huleft , x1 + tmε i ) 1−λ (1−λ2 )1/2 for t ∈ R+ and x = (x1 , x2 , x3 ) ∈ (R2 )3 . As in the case of Theorem 4.1, the SDE (6.2) has a unique strong solution with initial value Z 0 = 0, for which we have     R t 1/2 1/2 Y Vξ dW s Mt 0 s     Rt    Zt =  = t ∈ R+ . Y dM  , N s s 0  t   R R 1/2 1/2 1/2 t 1/2 hv left ,mε i t 1/2 vleft ,v left i fs Pt Y Vξ dW Y Vξ dW s + hVε(1−λ 2 )1/2 0 s 1−λ 0 s One can again easily derive (6.3) " # X (n) Z (n) D −→ " # e X Z 32 as n → ∞, where (n) Xt := n−1 X ⌊nt⌋ , e t := huleft , Mt + tmε iuright , X t ∈ R+ , n ∈ N. Next, similarly to the proof of (B.5), by Lemma C.3, convergence (6.3) and Lemma B.4 imply   R1   2 e huleft , X t i dt 2 0 n−3 Uk−1       hv left ,mε i2 hVε v left ,v left i n 2 X +  n−1 Vk−1  D   2 2 (1−λ) 1−λ   −→   as n → ∞. R  −2    1 n M U Y dM   k k−1  t t k=1  0   1/2 hv left ,mε i hVε vleft ,vleft i1/2 R 1 1/2 n−1/2 M k Vk−1 f Y V M1 + dW t 1−λ (1−λ2 )1/2 0 t ξ The limiting random vector can be written in the form as given in Theorem 4.2, since e t i = Yt for all t ∈ R+ . huleft , X Proof of Theorem 6.1. Similar to the proof of Theorem 5.1. The conditional variance has the form   n−2 n−3 Uk−1 n−2 Vk−1    (n) −3 −4 2 −3  Var Z k | Fk−1 =  n U n U n U V k−1 k−1 k−1  ⊗ V M k k−1  2 n−2 Vk−1 n−3 Uk−1 Vk−1 n−2 Vk−1 (n) ⊤ for n ∈ N, k ∈ {1, . . . , n}, with V M k := Var(M k | Fk−1), and γ(s, Z (n) has s )γ(s, Z s ) the form   hv left ,mε i (n) 2 hu , M + sm i huleft , Ms(n) + smε i huleft , M(n) + sm i left ε ε s s 1−λ   hv left ,mε i (n) (n) (n) 2 3  huleft , Ms + smε i2  huleft , Ms + smε i huleft , Ms + smε i ⊗V ξ  1−λ hv left ,mε i hv left ,mε i 2 huleft , M(n) huleft , M(n) Mhuleft , M(n) s + smε i s + smε i s + smε i 1−λ 1−λ for s ∈ R+ . In order to check condition (i) of Theorem D.1, we need to prove only that for each T > 0, Z t ⌊nt⌋ 1 X 2 P Vk−1VM k − M huleft , Ms(n) + smε iVξ ds −→ 0, 2 n k=1 0 sup (6.4) t∈[0,T ] (6.5) sup t∈[0,T ] (6.6) sup t∈[0,T ] Z ⌊nt⌋ hvleft , mε i t 1 X P huleft , M(n) Vk−1 VM k − s + smε iVξ ds −→ 0, 2 n k=1 1−λ 0 Z ⌊nt⌋ 1 X hv left , mε i t P 2 Uk−1 Vk−1 VM k − huleft , M(n) s + smε i Vξ ds −→ 0 3 n k=1 1−λ 0 as n → ∞, since the rest, namely, (5.7), (5.8) and (5.9), have already been proved. We turn to prove (6.5). First we show that (6.7) −2 n sup ⌊nt⌋ X t∈[0,T ] k=1 Vk−1 VM k ⌊nt⌋ hv left , mε i X P − Uk−1 Vξ −→ 0 1 − λ k=1 33 as n → ∞ for all T > 0. We use the decomposition (5.29). Using (A.9) with (ℓ, i, j) = (4, 0, 2) and (ℓ, i, j) = (2, 0, 1), we have −2 n ⌊nT ⌋ X Vk2 k=1 P −2 −→ 0, n ⌊nT ⌋ X k=1 P |Vk | −→ 0 as n → ∞, hence (6.7) will follow from n−2 sup (6.8) t∈[0,T ] ⌊nt⌋ X k=1 Uk−1 Vk−1 − ⌊nt⌋ hv left , mε i X P Uk−1 −→ 0 1 − λ k=1 as n → ∞ P⌊nt⌋ for all T > 0. The aim of the following discussion is to decompose k=1 Uk−1 Vk−1 as a sum of a martingale and some other terms. Using recursions (4.4), (4.10) and formula (A.1), we obtain    E(Uk−1 Vk−1 | Fk−2) = E (Uk−2 + huleft , M k−1 + mε i) λVk−2 + hvleft , εk−1 i Fk−2 = λUk−2 Vk−2 + hvleft , mε iUk−2 + constant + constant×Vk−2 . Thus ⌊nt⌋ X Uk−1 Vk−1 k=1 ⌊nt⌋ ⌊nt⌋ X   X 2 = Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) + E(Uk−1 Vk−1 | Fk−2) k=2 k=2 ⌊nt⌋ ⌊nt⌋ X X   Uk−2 Vk−2 Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) + λ = k=2 k=2 + hv left , mε i ⌊nt⌋ X Uk−2 + O(n) + constant× ⌊nt⌋ X Vk−2 . k=2 k=2 Consequently, ⌊nt⌋ X Uk−1 Vk−1 k=1 ⌊nt⌋ ⌊nt⌋  hv left , mε i X 1 X Uk−2 Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) + = 1 − λ k=2 1 − λ k=2 ⌊nt⌋ X λ U⌊nt⌋−1 V⌊nt⌋−1 + O(n) + constant× Vk−2 . − 1−λ k=2 Using (A.11) with (ℓ, i, j) = (4, 1, 1) we have −2 n ⌊nt⌋ X   P sup Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) −→ 0 t∈[0,T ] k=2 34 as n → ∞. Thus, in order to show (6.8), it suffices to prove (6.9) −2 n ⌊nT ⌋ X k=1 P P n−2 sup U⌊nt⌋ V⌊nt⌋ −→ 0, |Vk | −→ 0, t∈[0,T ] P n−2 sup U⌊nt⌋ −→ 0 t∈[0,T ] as n → ∞. By (A.9) with (ℓ, i, j) = (2, 0, 1), and by (A.10) with (ℓ, i, j) = (2, 1, 1) and (ℓ, i, j) = (2, 1, 0), we have (6.9). Thus we conclude (6.8), and hence (6.7). By Lemma A.1 and (A.9) with (ℓ, i, j) = (2, 1, 1) and (ℓ, i, j) = (2, 1, 0), we get n−2 sup (6.10) t∈[0,T ] ⌊nt⌋ X k=1 VM k − ⌊nt⌋ X k=1 P Uk−1 Vξ −→ 0 as n → ∞ for all T > 0. As a last step, using (5.7) and (6.7), we obtain (6.5). Next we turn to prove (6.4). First we show that −2 n (6.11) sup ⌊nt⌋ X t∈[0,T ] k=1 2 Vk−1 VM k −M ⌊nt⌋ X k=1 P Uk−1 Vξ −→ 0 as n → ∞ for all T > 0. We use the decomposition (5.23). Using (A.9) with (ℓ, i, j) = (6, 0, 3) and (ℓ, i, j) = (4, 0, 2), we have −2 n ⌊nT ⌋ X k=1 3 P |Vk | −→ 0, −2 n ⌊nT ⌋ X k=1 P Vk2 −→ 0 as n → ∞, hence (6.11) will follow from (6.12) −2 n sup t∈[0,T ] ⌊nt⌋ X k=1 2 Uk−1 Vk−1 −M ⌊nt⌋ X k=1 P Uk−1 −→ 0 as n → ∞ P⌊nt⌋ 2 for all T > 0. The aim of the following discussion is to decompose k=1 Uk−1 Vk−1 as a sum of a martingale and some other terms. Using recursions (4.4), (4.10) and formula (A.1), we obtain   2 2 E(Uk−1 Vk−1 | Fk−2) = E (Uk−2 + huleft , M k−1 + mε i) λVk−2 + hv left , εk−1 i Fk−2 2 = λ2 Uk−2 Vk−2 + 2λhv left , mε iUk−2 Vk−2 + E(hv left , εk−1 i2 ) Uk−2 + constant + constant × Vk−2 . 35 Thus ⌊nt⌋ X 2 Uk−1 Vk−1 k=1 ⌊nt⌋ ⌊nt⌋ X   X 2 2 2 = Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) + E(Uk−1 Vk−1 | Fk−2) k=2 k=2 ⌊nt⌋ ⌊nt⌋ ⌊nt⌋ X X X   2 2 2 2 Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) + λ Uk−2 Vk−2 Uk−2 Vk−2 + 2λhv left , mε i = k=2 k=2 k=2 2 + E(hv left , εk−1i ) ⌊nt⌋ X k=2 Uk−2 + O(n) + constant × ⌊nt⌋ X Vk−2 . k=2 Consequently, ⌊nt⌋ X 2 Uk−1 Vk−1 k=1 ⌊nt⌋ ⌊nt⌋  2λhvleft , mε i X 1 X 2 2 = Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) + Uk−2 Vk−2 1 − λ2 k=2 1 − λ2 k=2 ⌊nt⌋ ⌊nt⌋ X λ2 E(hv left , εk−1 i2 ) X 2 Vk−2 . U V + O(n) + constant × Uk−2 − + 2 ⌊nt⌋−1 ⌊nt⌋−1 1 − λ2 1 − λ k=2 k=2 Using (A.11) with (ℓ, i, j) = (8, 1, 2) we have −2 n ⌊nt⌋ X   P 2 2 sup Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) −→ 0 as n → ∞. t∈[0,T ] k=2 By (A.9) with (ℓ, i, j) = (2, 0, 1), and by (A.10) with (ℓ, i, j) = (4, 1, 2), we obtain −2 (6.13) n ⌊nT ⌋ X k=1 P P 2 n−2 sup U⌊nt⌋ V⌊nt⌋ −→ 0 |Vk | −→ 0, t∈[0,T ] as n → ∞, hence −2 n sup t∈[0,T ] ⌊nt⌋ X 2 Uk−1 Vk−1 k=1 ⌊nt⌋ ⌊nt⌋ 2λhvleft , mε i X E(hv left , εk−1 i2 ) X P − U V − Uk−2 −→ 0 k−2 k−2 2 1 − λ2 1 − λ k=2 k=2 as n → ∞ for all T > 0. Thus, taking into account (6.8), we conclude (6.12), and hence (6.11), since hv left , mε i2 hVε v left , vleft i hv left , mε i 2λhvleft , mε i E(hv left , εk−1 i2 ) + = + . 1−λ 1 − λ2 1 − λ2 (1 − λ)2 1 − λ2 As a last step, using (6.10) and (5.7), we obtain (6.4). Finally we turn to prove (6.6). First we show that (6.14) −3 n sup ⌊nt⌋ X t∈[0,T ] k=1 Uk−1 Vk−1 VM k ⌊nt⌋ hv left , mε i X 2 P Uk−1 Vξ −→ 0 − 1 − λ k=1 36 as n → ∞ for all T > 0. We use the decomposition (5.30). Using (A.9) with (ℓ, i, j) = (4, 1, 2) and (ℓ, i, j) = (2, 1, 1), we have −3 n ⌊nT ⌋ X Uk Vk2 k=1 P −3 −→ 0, n (6.15) n sup t∈[0,T ] ⌊nt⌋ X 2 Uk−1 Vk−1 k=1 X k=1 hence (6.14) will follow from −3 ⌊nT ⌋ P Uk |Vk | −→ 0 as n → ∞, ⌊nt⌋ hv left , mε i X 2 P − Uk−1 −→ 0 1 − λ k=1 as n → ∞ P⌊nt⌋ 2 for all T > 0. The aim of the following discussion is to decompose k=1 Uk−1 Vk−1 as a sum of a martingale and some other terms. Using recursions (4.4), (4.10) and formula (A.1), we obtain    2 E(Uk−1 Vk−1 | Fk−2) = E (Uk−2 + huleft , M k−1 + mε i)2 λVk−2 + hv left , εk−1i Fk−2 2 2 = λUk−2 Vk−2 + hv left , mε iUk−2 + constant + linear combinations of Uk−2 Vk−2 , Uk−2 and Vk−2 . Thus ⌊nt⌋ X 2 Uk−1 Vk−1 2 Uk−1 Vk−1 k=2 k=1 = = ⌊nt⌋ X  ⌊nt⌋ X  2 Uk−1 Vk−1 k=2 − − 2 E(Uk−1 Vk−1 | Fk−2) 2 E(Uk−1 Vk−1 | Fk−2) + O(n) + linear combinations of  ⌊nt⌋ X +λ ⌊nt⌋ X ⌊nt⌋ X 2 Uk−1 Vk−1 k=1 + ⌊nt⌋ X k=2 2 Uk−2 Vk−2 k=2 Uk−2 Vk−2 , k=2 Consequently,  ⌊nt⌋ X 2 E(Uk−1 Vk−1 | Fk−2) + hv left , mε i Uk−2 and k=2 ⌊nt⌋ X ⌊nt⌋ X 2 Uk−2 k=2 Vk−2. k=2 ⌊nt⌋  1 X 2 2 = Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) 1 − λ k=2 ⌊nt⌋ hv left , mε i X 2 λ 2 + Uk−2 − U⌊nt⌋−1 V⌊nt⌋−1 1 − λ k=2 1−λ + O(n) + linear combinations of ⌊nt⌋ X Uk−2 Vk−2 , k=2 Using (A.11) with (ℓ, i, j) = (8, 2, 1) we have −3 n ⌊nt⌋ X  2  P 2 Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) −→ 0 sup t∈[0,T ] k=2 37 ⌊nt⌋ X Uk−2 and k=2 as n → ∞. ⌊nt⌋ X k=2 Vk−2. Thus, in order to show (6.15), it suffices to prove −3 n (6.16) ⌊nT ⌋ X k=1 ⌊nT ⌋ X −3 (6.17) n k=1 P Uk |Vk | −→ 0, P |Vk | −→ 0, ⌊nT ⌋ X −3 n k=1 P Uk −→ 0, P 2 n−3 sup U⌊nt⌋ |V⌊nt⌋ | −→ 0 t∈[0,T ] as n → ∞. By (A.9) with (ℓ, i, j) = (4, 1, 1) and (ℓ, i, j) = (4, 1, 0) we obtain (6.16). By (A.9) with (ℓ, i, j) = (4, 0, 1) and (A.10) with (ℓ, i, j) = (4, 2, 1), we obtain (6.17). Thus we conclude (6.15), and hence (6.14). By Lemma A.1 and (A.9) with (ℓ, i, j) = (4, 2, 1) and (ℓ, i, j) = (4, 2, 0), we get −3 (6.18) n sup t∈[0,T ] ⌊nt⌋ X k=1 Uk−1 VM k − ⌊nt⌋ X k=1 P 2 Vξ −→ 0 Uk−1 as n → ∞ for all T > 0. As a last step, using (6.14) and (5.8), we obtain (6.6). Condition (ii) of Theorem D.1 can be checked again as in case of Theorem 5.1. 7 ✷ Proof of Theorem 3.8 By Quine and Durham [22], the Markov chain (X k )k∈Z+ admits a unique stationary distribution, and we have (7.1) e1 e2   X  n X X X 1X a.s. f f (X k−1 , X k ) −→ E f X, ξ 1,j,1 + ξ 1,j,2 + ε1 , n j=1 j=1 as n → ∞, k=1 for all Borel measurable functions f : R2 × R2 → R with e1 e2   X  X X X f E f X, ξ 1,j,1 + ξ1,j,2 + ε1 < ∞, j=1 j=1 f 2 ) < ∞, hence see (2.1) in Quine and Durham [22]. By Quine [21], we have E(kXk n (7.2)  1X a.s. fX f⊤ , X k−1X ⊤ −→ E X k−1 n k=1 as n → ∞. fX f⊤ The aim of the following discussion is to show that the matrix E X Quine [21], we have  is invertible. By ∞ X  ⊤ f f f E(X f⊤ ). e1 )Vξ + E(X e2 )Vξ + Vε (m⊤ )i + E(X) miξ E(X E XX = ξ 1 2 i=0 38   fX f⊤ w = 0. But fX f⊤ is not invertible, then there exists w ∈ R2 \ {0} with w ⊤ E X If E X e1 )w ⊤ Vξ w = 0, E(X e2 )w⊤ Vξ w = 0 and w ⊤ Vε w = 0. We have E(X e1 ) > 0 and then E(X 1 2 P∞ i e2 ) > 0, since, by Quine [21], we have E(X) f = E(X i=0 mξ mε , where mε 6= 0 and there exists i ∈ N such that the entries of miξ are positive. Consequently, we obtain w⊤ Vξ1 w = 0, w⊤ Vξ2 w = 0 and w ⊤ Vε w = 0, which is impossible, since at least one of the matrices Vξ1 ,  fX f⊤ has to be invertible, and we conclude Vξ , Vε is invertible, hence E X 2  X −1 n  1 a.s.  ⊤ fX f⊤ −1 , −→ E X X k−1X k−1 n k=1 (7.3) as n → ∞. Applying again (7.1) and using the decomposition (4.9), n 1X (X k − mξ X k−1 − mξ )X ⊤ k−1 n k=1 a.s. −→ E e1 X X j=1 (ξ1,j,1 − E(ξ 1,j,1)) + e2 X X j=1 !  ⊤ f (ξ1,j,2 − E(ξ 1,j,2)) + (ε1 − E(ε1 )) X "  Xe # e2  X 1 X X ⊤ f X f =0 (ξ 1,j,1 − E(ξ1,j,1)) + =E E (ξ 1,j,2 − E(ξ1,j,2)) + (ε1 − E(ε1 )) X j=1 j=1 as n → ∞. Consequently,  X −1  X n n 1 1 a.s. (n) ⊤ ⊤ c ξ − mξ = (X k − mξ X k−1 − mξ )X k−1 X k−1 X k−1 −→ 0 m n k=1 n k=1 c(n) as n → ∞, hence we obtain the strong consistency of m ξ . By the continuity of the function (n) r, this implies the strong consistency of ̺bn = r(c mξ ). The asymptotic normality (3.8) can be proved by the martingale central limit theorem. We can write  −1  X n n 1 X 1 (n) 1/2 ⊤ n (c mξ − mξ ) = X k−1 X k−1 Zk n1/2 k=1 n k=1   ⊗2 ⊗2 with Z k := M k X ⊤ Fk−1 = E M ⊗2 Fk−1 (X ⊤ k−1 . We have E Z k k−1 ) . By the decomk position (4.9), (7.4) 2  X     E M ⊗2 F = Xk−1,i E (ξ1,1,i − E(ξ1,1,i ))⊗2 + E (ε1 − E(ε1 ))⊗2 , k−1 k i=1 thus by (7.1), the asymptotic covariances have the form   n 2    a.s. X   ⊤ ⊗2 1X ⊗2 ⊗2 ei X f E Z k Fk−1 −→ E (ξ1,1,i − E(ξ1,1,i )) E X n k=1 i=1      ⊤ ⊗2 ⊗2 f + E (ε1 − E(ε1 )) E X as n → ∞. 39 k ∈ N, The aim of the following discussion is to check the conditional Lindeberg condition n (7.5) 1X P E(kZ k k2 1{kZ k k>θ√n} | Fk−1) −→ 0 n k=1 as n → ∞ for all θ > 0. By the decomposition (4.9),  E M ⊗4 Fk−1 = P (Xk−1,1 , Xk−1,2) k with P = (P1 , . . . , P16 ) : R2 → R16 , where P1 , . . . , P16 are polynomials having degree at most 2, and their coefficients depend on the moments E[(ξ 1,1,1 − E(ξ 1,1,1 )⊗4 ], E[(ξ 1,1,2 − E(ξ 1,1,2 )⊗4 ], E[(ε1 − E(ε1 )⊗4 ], Vξ1 , Vξ2 and Vε . Thus n n 1 X 1X 2 √ E(kZ k k4 | Fk−1) E(kZ k k 1{kZ k k>θ n} | Fk−1) 6 2 2 n nθ k=1 k=1 n n 1 X 1 X P 4 4 6 2 2 kX k k E(kM k k | Fk−1) = 2 2 kX k k4 P (Xk−1,1, Xk−1,2 ) −→ 0 n θ k=1 n θ k=1 as n → ∞ for all θ > 0, since, by Lemma A.9, E(kX k k4 |P (Xk−1,1 , Xk−1,2)|) = O(1), hence P n−2 nk=1 E(kX k k4 |P (Xk−1,1 , Xk−1,2)|) → 0 as n → ∞. Consequently, by the martingale central limit theorem, we obtain n 1 X n1/2 k=1 D e Z k −→ Z as n → ∞, e is a 2 × 2 random matrix having a normal distribution with zero mean and with where Z     2    ⊗2  X      ⊤ ⊗2 ⊤ ⊗2 ⊗2 ⊗2 f e f e = E (ξ 1,1,i − E(ξ1,1,i )) E Xi X . + E (ε1 − E(ε1 )) E X E Z i=1 Using (7.3) and applying Slutsky’s lemma, we obtain (3.8). The convergence (3.12) follows from (3.8) by the so called Delta Method with the function r, see, e.g., Lehmann and Romano [18, Theorem 11.2.14]. Appendices A Estimations of moments In the proof of Theorem 3.1, good bounds for moments of the random vectors and variables (M k )k∈Z+ , (X k )k∈Z+ , (Uk )k∈Z+ and (Vk )k∈Z+ are extensively used. First note that, for all k ∈ N, E(M k | Fk−1) = 0 and E(M k ) = 0, since M k = X k − E(X k | Fk−1). 40 A.1 Lemma. Let (X k )k∈Z+ be a 2-type Galton–Watson process with immigration and with X 0 = 0. If E(kξ1,1,1 k2 ) < ∞, E(kξ1,1,2 k2 ) < ∞ and E(kε1 k2 ) < ∞ then (A.1) Var(M k | Fk−1) = Xk−1,1 Vξ1 + Xk−1,2 Vξ2 + Vε = Uk−1 Vξ + Vk−1 Veξ + Vε for all k ∈ N, where Veξ := 2 X i=1 hei , v right iVξi = βVξ1 − (1 − δ)Vξ2 . β+1−δ If E(kξ 1,1,1 k3 ) < ∞, E(kξ 1,1,2 k3 ) < ∞ and E(kε1 k3 ) < ∞ then, for all k ∈ N, (A.2) ⊗3 E(M ⊗3 k | Fk−1) = Xk−1,1 E[(ξ 1,1,1 − E(ξ 1,1,1 ) ] + Xk−1,2 E[(ξ1,1,2 − E(ξ1,1,2 )⊗3 ] + E[(ε1 − E(ε1 )⊗3 ].  Proof. Using the decomposition (4.9), where, for all k ∈ N, the random vectors ξ k,j,1 − E(ξ k,j,1), ξk,j.2 − E(ξk,j,2), εk − E(εk ) : j ∈ N are independent of each other, independent of Fk−1, and have zero mean vector, we conclude (A.1) and (A.2). ✷ A.2 Lemma. Let (ζ k )k∈N be independent and identically distributed random vectors with values in Rd such that E(kζ 1 kℓ ) < ∞ with some ℓ ∈ N. ℓ (i) Then there exists Q = (Q1 , . . . , Qdℓ ) : R → Rd , where Q1 , . . . , Qdℓ are polynomials having degree at most ℓ − 1 such that   ⊗ℓ E (ζ 1 + · · · + ζ N )⊗ℓ = N ℓ E(ζ 1 ) + Q(N), N ∈ N, N > ℓ. ℓ (ii) If E(ζ 1 ) = 0 then there exists R = (R1 , . . . , Rdℓ ) : R → Rd , where R1 , . . . , Rdℓ are polynomials having degree at most ⌊ℓ/2⌋ such that  E (ζ 1 + · · · + ζ N )⊗ℓ = R(N), N ∈ N, N > ℓ. The coefficients of the polynomials Q and R depend on the moments E(ζ i1 ⊗ · · · ⊗ ζ iℓ ), i1 , . . . , iℓ ∈ {1, . . . , N}. Proof. (i) We have E (ζ 1 + · · · + ζ N ) ⊗ℓ  = X      N − k1 − · · · − ks−1 N − k1 N ··· ks k2 k1 s∈{1,...,ℓ}, k1 ,...,ks ∈Z+ , k1 +2k2 +···+sks =ℓ, ks 6=0 × 41 X (N,ℓ) (i1 ,...,iℓ )∈Pk ,...,ks 1 E(ζ i1 ⊗ · · · ⊗ ζ iℓ ), (N,ℓ) where the set Pk1 ,...,ks consists of permutations of all the multisets containing pairwise different elements jk1 , . . . , jks of the set {1, . . . , N} with multiplicities k1 , . . . , ks , respectively. Since      N(N − 1) · · · (N − k1 − k2 − · · · − ks + 1) N − k1 − · · · − ks−1 N − k1 N = ··· k1 !k2 ! · · · ks ! ks k2 k1 is a polynomial of the variable N having degree k1 + · · · + ks 6 ℓ, there exists P = ℓ (P1 , . . . , Pdℓ ) : R → Rd , where P1 , . . . , Pdℓ are polynomials having degree at most ℓ such  that E (ζ 1 +· · ·+ζ N )⊗ℓ = P (N). A term of degree ℓ can occur only in case k1 +· · ·+ks = ℓ, when k1 + 2k2 + · · · + sks = ℓ implies s = 1 and k1 = ℓ, thus the corresponding term of  ⊗ℓ degree ℓ is N(N − 1) · · · (N − ℓ + 1) E(ζ 1 ) , hence we obtain the statement. (ii) Using the same decomposition, we have E (ζ 1 + · · · + ζ N ) ⊗ℓ  =      N − k2 − · · · − ks−1 N − k2 N ··· ks k3 k2 X s∈{2,...,ℓ}, k2 ,...,ks ∈Z+ , 2k2 +3k3 +···+sks =ℓ, ks 6=0 × X (N,ℓ) (i1 ,...,iℓ )∈P0,k ,...,ks 2 E(ζ i1 ⊗ · · · ⊗ ζ iℓ ). Here      N(N − 1) · · · (N − k2 − k3 − · · · − ks + 1) N − k2 − · · · − ks−1 N − k2 N = ··· ks k3 k2 k2 !k3 ! · · · ks ! is a polynomial of the variable N having degree k2 + · · · + ks . Since ℓ = 2k2 + 3k3 + · · · + sks > 2(k2 + k3 + · · · + ks ), we have k2 + · · · + ks 6 ℓ/2 yielding part (ii). ✷ A.3 Remark. In what follows, using the proof of Lemma A.4, we give a bit more explicit form of the polynomial Rℓ in part (ii) of Lemma A.4 for the special cases ℓ = 1, 2, 3, 4, 5, 6. E(ζ 1 + · · · + ζ N ) = 0 E((ζ 1 + · · · + ζ N )⊗2 ) = N E(ζ ⊗2 1 ). E((ζ 1 + · · · + ζ N )⊗3 ) = N E(ζ ⊗3 1 ). X N(N − 1) E((ζ 1 + · · · + ζ N )⊗4 ) = N E(ζ ⊗4 ) + E(ζ i1 ⊗ ζ i2 ⊗ ζ i3 ⊗ ζ i4 ). 1 2! (N,4) (i1 ,i2 ,i3 ,i4 )∈P0,2 E((ζ 1 + · · · + ζ N )⊗5 ) = N E(ζ ⊗5 1 ) + N(N − 1) X (N,5) (i1 ,i2 ,i3 ,i4 ,i5 )∈P0,1,1 42 E(ζ i1 ⊗ ζ i2 ⊗ ζ i3 ⊗ ζ i4 ⊗ ζ i5 ). E((ζ 1 + · · · + ζ N )⊗6 ) = N E(ζ ⊗6 1 ) + N(N − 1) + N(N − 1) 2! X (N,6) (i1 ,i2 ,i3 ,i4 ,i5 ,i6 )∈P0,1,0,1 X (N,6) (i1 ,i2 ,i3 ,i4 ,i5 ,i6 )∈P0,0,2 + N(N − 1)(N − 2) 3! E(ζ i1 ⊗ ζ i2 ⊗ ζ i3 ⊗ ζ i4 ⊗ ζ i5 ⊗ ζ i6 ) E(ζ i1 ⊗ ζ i2 ⊗ ζ i3 ⊗ ζ i4 ⊗ ζ i5 ⊗ ζ i6 ) X (N,6) (i1 ,i2 ,i3 ,i4 ,i5 ,i6 )∈P0,3 E(ζ i1 ⊗ ζ i2 ⊗ ζ i3 ⊗ ζ i4 ⊗ ζ i5 ⊗ ζ i6 ). ✷ Lemma A.2 can be generalized in the following way. A.4 Lemma. For each i ∈ N, let (ζ i,k )k∈N be independent and identically distributed random vectors with values in Rd such that E(kζ i,1 kℓ ) < ∞ with some ℓ ∈ N. Let j1 , . . . , jℓ ∈ N. ℓ (i) Then there exists Q = (Q1 , . . . , Qdℓ ) : Rℓ → Rd , where Q1 , . . . , Qdℓ are polynomials of ℓ variables having degree at most ℓ − 1 such that E (ζ j1 ,1 + · · · + ζ j1 ,N1 ) ⊗ · · · ⊗ (ζ jℓ ,1 + · · · + ζ jℓ ,Nℓ )  = N1 . . . Nℓ E(ζ j1 ,1 ) ⊗ · · · ⊗ E(ζ jℓ ,1 ) + Q(N1 , . . . , Nℓ ) for N1 , . . . , Nℓ ∈ N with N1 > ℓ, . . . , Nℓ > ℓ. ℓ (ii) If E(ζ j1 ,1 ) = . . . = E(ζ jℓ ,1 ) = 0 then there exists R = (R1 , . . . , Rdℓ ) : Rℓ → Rd , where R1 , . . . , Rdℓ are polynomials of ℓ variables having degree at most ⌊ℓ/2⌋ such that  E (ζ j1 ,1 + · · · + ζ j1 ,N1 ) ⊗ · · · ⊗ (ζ jℓ ,1 + · · · + ζ jℓ ,Nℓ ) = R(N1 , . . . , Nℓ ) for N1 , . . . , Nℓ ∈ N with N1 > ℓ, . . . , Nℓ > ℓ. The coefficients of the polynomials Q and R depend on the moments E(ζ j1 ,i1 ⊗ · · · ⊗ ζ jℓ ,iℓ ), i1 ∈ {1, . . . , N1 }, . . . , iℓ ∈ {1, . . . , Nℓ }. A.5 Lemma. Let (X k )k∈Z+ be a 2-type Galton–Watson process with immigration such that α, γ ∈ [0, 1) and β, γ ∈ (0, ∞) with α + δ > 0 and βγ = (1 − α)(1 − γ) (hence it is critical and positively regular). Suppose X 0 = 0, and E(kξ 1,1,1 kℓ ) < ∞, E(kξ1,1,2 kℓ ) < ∞, E(kε1 kℓ ) < ∞ with some ℓ ∈ N. Then E(kX k kℓ ) = O(k ℓ ), i.e., supk∈N k −ℓ E(kX k kℓ ) < ∞.  Proof. The statement is clearly equivalent with E |P (Xk,1, Xk,2)| 6 cP,ℓ k ℓ , k ∈ N, for all polynomials P of two variables having degree at most ℓ, where cP,ℓ depends only on P and ℓ. 43 If ℓ = 1 then (2.3) and (2.6) imply " " # #! k−1 X 1−δ β k 1 − (α + δ − 1)k 1 − α −β j E(X k ) = mξ mε = + mε 2−α−δ (2 − α − δ)2 γ 1−α −γ 1 − δ j=0 for all k ∈ N, which yields the statement. By (2.1),  ⊗2 Xk−1,1  X ⊗2 k = X j=1   Xk−1,2 + (A.3) ξ k,j,1  X j=1 Xk−1,2 + X  ⊗2 Xk−1,2 +  X j=1 Xk−1,1 ξ k,j,2 ⊗   X j=1 ξ k,j,2  Xk−1,1  + ε⊗2 k +  Xk−1,1 ξk,j,1 +   X j=1  Xk−1,2 ξ k,j,1 ⊗ εk + εk ⊗  j=1  X j=1 X j=1    Xk−1,2 ξk,j,1 ⊗  X ξk,j,2 j=1   Xk−1,1 ξ k,j,1 ⊗ εk + εk ⊗  X j=1  ξk,j,1 ξ k,j,1 . Since for all k ∈ N, the random variables {ξ k,j,1, ξ k,j,2, εk : j ∈ N} are independent of each other and of the σ-algebra Fk−1, we have   E(X ⊗2 k | Fk−1 ) = E +E M X ξ k,j,1 j=1 +E M X ξ k,j,1 j=1 +E N X ξ k,j,2 j=1 ! ! ! M X j=1 ⊗E !⊗2   ξ k,j,1 j=1 !⊗2   ξ k,j,2 ξk,j,2 ⊗ E(εk ) + E(εn ) ⊗ E M X ξ k,j,1 ⊗ E(εk ) + E(εk ) ⊗ E N X ξ k,j,2 ξ k,j,2 j=1 N =Xk−1,2 + E N X N X N X M =Xk−1,1 ! M =Xk−1,1  M =Xk−1,1 N =Xk−1,2 +E j=1 j=1 j=1 ! ! ! ⊗E + E(ε⊗2 k ) N =Xk−1,2 M X j=1 ξ k,j,1 ! M =Xk−1,1 N =Xk−1,2 M =Xk−1,1 . N =Xk−1,2 Using part (i) of Lemma A.4 and separating the terms having degree 2 and less than 2, we have E(X ⊗2 k | Fk−1 ) 2 2 ⊗2 = Xk−1,1 m⊗2 ξ1 + Xk−1,2 mξ2 + Xk−1,1 Xk−1,2 (mξ1 ⊗ mξ2 + mξ2 ⊗ mξ1 ) + Q2 (Xk−1,1 , Xk−1,2 ) = (Xk−1,1 mξ1 + Xk−1,2 mξ2 )⊗2 + Q2 (Xk−1,1 , Xk−1,2) = (mξ X k−1 )⊗2 + Q2 (Xk−1,1 , Xk−1,2) ⊗2 = m⊗2 ξ X k−1 + Q2 (Xk−1,1 , Xk−1,2 ), 44 where Q2 = (Q2,1 , Q2,2 , Q2,3 , Q2,4 ) : R2 → R4 , and Q2,1 , Q2,2 , Q2,3 and Q2,4 are polynomials of two variables having degree at most 1. Hence ⊗2 ⊗2 E(X ⊗2 k ) = mξ E(X k−1 ) + E[Q2 (Xk−1,1 , Xk−1,2 )]. In a similar way, ⊗ℓ ⊗ℓ E(X ⊗ℓ k ) = mξ E(X k−1 ) + E[Qℓ (Xk−1,1 , Xk−1,2 )], ℓ where Qℓ = (Qℓ,1 , . . . , Qℓ,2ℓ ) : R2 → R2 , and Qℓ,1 , . . . , Qℓ,2ℓ are polynomials of two variables having degree at most ℓ − 1, implying E(X ⊗ℓ k ) = k X k−j (m⊗ℓ E[Qℓ (Xj−1,1 , Xj−1,2)] ξ ) j=1 (A.4) = k X (mξk−j )⊗ℓ E[Qℓ (Xj−1,1 , Xj−1,2)]. j=1 Let us suppose now that the statement holds for 1, . . . , ℓ − 1. Then E[|Qℓ,i (Xj−1,1, Xj−1,2)|] 6 cQℓ,i,ℓ−1 k ℓ−1 , k ∈ N, i ∈ {1, . . . , 2ℓ }. Formula (2.6) clearly implies k(miξ )⊗ℓ k = O(1), i.e., supi∈Z+ , ℓ∈N k(miξ )⊗ℓ k < ∞, hence we obtain the assertion for ℓ. ✷ A.6 Corollary. Let (X k )k∈Z+ be a 2-type Galton–Watson process with immigration such that α, δ ∈ [0, 1) and β, γ ∈ (0, ∞) with α + δ > 0 and βγ = (1 − α)(1 − γ) (hence it is critical and positively regular). Suppose X 0 = 0, and E(kξ 1,1,1 kℓ ) < ∞, E(kξ1,1,2 kℓ ) < ∞, E(kε1 kℓ ) < ∞ with some ℓ ∈ N. Then E(kX k ki ) = O(k i ), ⌊i/2⌋ E(M ⊗i ), k ) = O(k E(Uki ) = O(k i ), E(Vk2j ) = O(k j ) for i, j ∈ Z+ with i 6 ℓ and 2j 6 ℓ. If, in addition, hVξ v left , v left i = 0, then E(hv left , M k ii ) = O(1), E(Vk2j ) = O(1) for i, j ∈ Z+ with i 6 ℓ and 2j 6 ℓ. ⌊i/2⌋ Proof. The first statement is just Lemma A.5. Next we turn to prove E(M ⊗i ). k ) = O(k  Using (4.9), part (ii) of Lemma A.4, and that the random vectors ξ k,j,1 − E(ξ k,j,1), ξk,j.2 − E(ξ k,j,2), εk − E(εk ) : j ∈ N are independent of each other, independent of Fk−1 , and have zero mean vector, we obtain E(M ⊗i k | Fk−1) = R(Xk−1,1 , Xk−1,2 ), 45 with R = (R1 , . . . , R2i ) : R2 → R2i , where R1 , . . . , R2i are polynomials of two variables having degree at most i/2. Hence E(M ⊗i k ) = E(R(Xk−1,1 , Xk−1,2 )). ⌊i/2⌋ By Lemma A.5, we conclude E(M ⊗i ). k ) = O(k  i  (1−δ)Xk,1 +βXk,2 i Lemma A.5 implies E(Uk ) = E = O(k i ). (2−α−δ)β Next, for j ∈ Z+ with 2j 6 ℓ, we prove E(Vk2j ) = O(k j ) using induction in k. By the recursion Vk = (α + δ − 1)Vk−1 + hv left , M k + mε i, k ∈ N, we have E(Vk ) = (α + δ − 1) E(Vk−1 ) + hv left , mε i, k ∈ N, with initial value E(V0 ) = 0, hence E(Vk ) = hv left , mε i k−1 X i=0 (α + δ − 1)i , k ∈ N, which yields | E(Vk )| = O(1). Indeed, for all k ∈ N, k−1 X i=0 (α + δ − 1)i 6 1 . 1 − |α + δ − 1| The rest of the proof of E(Vk2j ) = O(k j ) can be carried out as in Corollary 9.1 of Barczy et al. [5]. By (4.9) and Remark 3.4, hVξ v left , v left i = 0 implies hvleft , M k i = hv left , εk − E(εk )i, k ∈ N, implying E(hvleft , M k ii ) = E(hvleft , ε1 − E(ε1 )ii ) = O(1) for i ∈ Z+ with i 6 ℓ. Finally, by (4.2), we obtain hvleft , X k i = hv left , mξ X k−1 i + hv left , mε i + hv left , εk − E(εk )i = hm⊤ ξ v left , X k−1 i + hv left , εk i Using m⊤ ξ v left = (α + δ − 1)v left , we conclude (A.5) Vk = (α + δ − 1)Vk−1 + hv left , εk i, k ∈ N. Thus we get a recursion Vek = (α + δ − 1)Vek−1 + hv left , M k i, k ∈ N, for the sequence Vek := Vk − E(Vk ), k ∈ N, and rest of the proof of E(Vk2j ) = O(1) for j ∈ Z+ with 2j 6 ℓ can be carried out again by the method Corollary 9.1 of Barczy et al. [5], applying E(hv left , M k ii ) = O(1) for i ∈ Z+ with i 6 ℓ. ✷ The next corollary can be derived exactly as Corollary 9.2 of Barczy et al. [5]. A.7 Corollary. Let (X k )k∈Z+ be a 2-type Galton–Watson process with immigration with offspring means (α, δ) ∈ (0, 1)2 and βγ = (1 − α)(1 − γ) (hence it is critical and positively regular). Suppose X 0 = 0, and E(kξ1,1,1 kℓ ) < ∞, E(kξ1,1,2 kℓ ) < ∞, E(kε1 kℓ ) < ∞ with some ℓ ∈ N. Then 46 (i) for all i, j ∈ Z+ with max{i, j} 6 ⌊ℓ/2⌋, and for all κ > i + 2j + 1, we have −κ (A.6) n n X k=1 P |Uki Vkj | −→ 0 as n → ∞, (ii) for all i, j ∈ Z+ with max{i, j} 6 ℓ, for all T > 0, and for all κ > i + have P j i n−κ sup |U⌊nt⌋ V⌊nt⌋ | −→ 0 (A.7) j 2 + i+j , ℓ as n → ∞, t∈[0,T ] (iii) for all i, j ∈ Z+ with max{i, j} 6 ⌊ℓ/4⌋, for all T > 0, and for all κ > i + we have (A.8) −κ n sup ⌊nt⌋ X t∈[0,T ] k=1 we P [Uki Vkj − E(Uki Vkj | Fk−1)] −→ 0 j 2 + 21 , as n → ∞. If, in addition, hVξ v left , v left i = 0, then (iv) for all i, j ∈ Z+ with max{i, j} 6 ⌊ℓ/2⌋, and for all κ > i + 1, we have −κ (A.9) n n X k=1 P |Uki Vkj | −→ 0 as n → ∞, (v) for all i, j ∈ Z+ with max{i, j} 6 ℓ, for all T > 0, and for all κ > i + i+j , we have ℓ P j i n−κ sup |U⌊nt⌋ V⌊nt⌋ | −→ 0 (A.10) as n → ∞, t∈[0,T ] (vi) for all i, j ∈ Z+ with max{i, j} 6 ⌊ℓ/4⌋, for all T > 0, and for all κ > i + 12 , we have (A.11) −κ n sup ⌊nt⌋ X t∈[0,T ] k=1 P [Uki Vkj − E(Uki Vkj | Fk−1)] −→ 0 as n → ∞. (vii) for all j ∈ Z+ with j 6 ⌊ℓ/2⌋, for all T > 0, and for all κ > 12 , we have (A.12) −κ n sup ⌊nt⌋ X t∈[0,T ] k=1 P [Vkj − E(Vkj | Fk−1)] −→ 0 as n → ∞. A.8 Remark. In the special case ℓ = 2, i = 1, j = 0, one can improve (A.7), namely, one can show (A.13) P n−κ sup U⌊nt⌋ −→ 0 t∈[0,T ] as n → ∞ for κ > 1, see Barczy et al. [5]. 47 A.9 Lemma. Let (X k )k∈Z+ be a 2-type Galton–Watson process with immigration such that α, γ ∈ [0, 1) and β, γ ∈ (0, ∞) with α + δ > 0 and βγ < (1 − α)(1 − γ) (hence it is subcritical and positively regular). Suppose X 0 = 0, and E(kξ1,1,1 kℓ ) < ∞, E(kξ1,1,2 kℓ ) < ∞, E(kε1 kℓ ) < ∞ with some ℓ ∈ N. Then E(kX k kℓ ) = O(1), i.e., supk∈N E(kX k kℓ ) < ∞.  Proof. The statement is clearly equivalent with E |P (Xk,1, Xk,2)| 6 cP,ℓ , k ∈ N, for all polynomials P of two variables having degree at most ℓ, where cP,ℓ depends only on P and ℓ. By (2.3) and (2.6), E(X k ) = k−1 X mjξ mε = j=0 k−1 X λj+ uright u⊤ left mε + j=0 k−1 X j=0 λj− v right v ⊤ left mε for all k ∈ N, which, by |λ− | 6 λ+ < 1, yields k E(X k )k = O(1), and hence E(kX k k) = O(1). Let us suppose now that the statement holds for 1, . . . , ℓ − 1. By (A.4), E(X ⊗ℓ k ) = k X (mξk−j )⊗ℓ E[Qℓ (Xj−1,1 , Xj−1,2)], j=1 ℓ where Qℓ = (Qℓ,1 , . . . , Qℓ,2ℓ ) : R2 → R2 , and Qℓ,1 , . . . , Qℓ,2ℓ are polynomials of two variables having degree at most ℓ − 1. By the induction hypothesis, k ∈ N, E[|Qℓ,i (Xj−1,1 , Xj−1,2)|] 6 cQℓ,i ,ℓ−1 , i ∈ {1, . . . , 2ℓ }. −iℓ i ⊗ℓ Formula (2.6) clearly implies k(miξ )⊗ℓ k = O(λiℓ + ), i.e., supi∈Z+ , ℓ∈N λ+ k(mξ ) k < ∞, hence, by 0 < λ+ < 1, we obtain the assertion for ℓ. ✷ B CLS estimators (n) cξ of mξ based on a sample X 1 , . . . , X n can be For each n ∈ N, a CLS estimator m obtained by minimizing the sum of squares n X k=1 X k − E(X k | Fk−1) 2 = n X k=1 kX k − mξ X k−1 − mε k2 with respect to mξ over R2×2 . In what follows, we use the notation x0 := 0. For all n ∈ N, we define the function Qn : (R2 )n × R2×2 → R by Qn (x1 , . . . , xn ; m′ξ ) := n X k=1 48 xk − m′ξ xk−1 − mε 2 for all m′ξ ∈ R2×2 and x1 , . . . , xn ∈ R2 . By definition, for all n ∈ N, a CLS estimator of mξ is a measurable function Fn : (R2 )n → R2×2 such that Qn (x1 , . . . , xn ; Fn (x1 , . . . , xn )) = inf m′ξ ∈R2×2 Qn (x1 , . . . , xn ; m′ξ ) for all x1 , . . . , xn ∈ R2 . Next we give the solutions of this extremum problem. B.1 Lemma. For each n ∈ N, any CLS estimator of mξ is a measurable function Fn : (R2 )n → R2×2 for which (B.1) Fn (x1 , . . . , xn ) = Hn (x1 , . . . , xn )Gn (x1 , . . . , xn )−1 on the set  (x1 , . . . , xn ) ∈ (R2 )n : det(Gn (x1 , . . . , xn )) > 0 , where Gn (x1 , . . . , xn ) := n X xk−1 x⊤ k−1 , Hn (x1 , . . . , xn ) := k=1 n X k=1 (xk − mε )x⊤ k−1 . Proof of Lemma B.1. In the proof we write " " # " (n) (n) # # n X α′ β ′ (xk,i − mε,i )xk−1,1 f1,1 f1,2 ′ mξ = , Fn = (n) (n) , hn,i = , γ ′ δ′ f2,1 f2,2 k=1 (xk,i − mε,i )xk−1,2 49 i ∈ {1, 2}, Gn (x1 , . . . , xn ) = Gn , Hn (x1 , . . . , xn ) = Hn , and Qn (x1 , . . . , xn ; m′ξ ) = Qn . The quadratic function Qn can be written in the form n X Qn = k=1 ′ ′ (xk,1 − α xk−1,1 − β xk−1,2 − mε,1 ) + " #⊤ " n X α′ = β′ k=1 − + xk−1,1 xk−1,2 xk−1,1 xk−1,2 x2k−1,2 (xk,1 − mε,1 )xk−1,2 k=1 " #⊤ " n X γ′ δ′ β ′ k=1 β ′ + δ ′ − k=1 x2k−1,2 − G−1 n hn,1 " # γ′ + n X xk−1,1 xk−1,2 (xk,2 − mε,2 )xk−1,2 !⊤ G−1 n hn,2 Gn !⊤ Gn δ " # α′ β ′ δ + − (xk,2 − γ ′ xk−1,1 − δ ′ xk−1,2 − mε,2 )2 − #" # γ′ δ′ n X k=1 " #⊤ " # n X α′ (xk,1 − mε,1 )xk−1,1 β′ k=1 (xk,1 − mε,1 )xk−1,2 (xk,1 − mε,1 )2 − " #⊤ " # n X γ′ (xk,2 − mε,2 )xk−1,1 δ′ k=1 (xk,2 − mε,2 )xk−1,2 (xk,2 − mε,2 )2 − G−1 n hn,1 " # γ′ ′ k=1 β′ xk−1,1 xk−1,2 ′ n X #" # α′ x2k−1,1 " #⊤ " # n X (xk,2 − mε,2 )xk−1,1 γ′ " # α′ = x2k−1,1 " #⊤ " # n X (xk,1 − mε,1 )xk−1,1 α′ k=1 − 2 ! G−1 n hn,2 −1 − h⊤ n,1 Gn hn,1 ! − −1 h⊤ n,2 Gn hn,2 + n X k=1 kxk − mε k2 . P x2k−1,1 nk=1 x2k−1,2 − We can check that the matrix Gn is strictly positive definite. Indeed, k=1 P Pn P Pn 2 2 ( nk=1 xk−1,1 xk−1,2 ) > 0 implies x2k−1,1 nk=1 x2k−1,2 > 0, and hence, k=1 k=1 xk−1,1 > 0 Pn 2 and k=1 xk−1,2 > 0. Consequently, " (n) # " (n) # " # ⊤ f1,1 f h 2,1 ⊤ −1 = G−1 = G−1 Fn = n,1 (G−1 n hn,1 , n hn,2 , n ) = H n Gn , (n) (n) ⊤ f1,2 f2,2 hn,2 Pn since " # h⊤ n,1 h⊤ n,2 = # " n X (xk,1 − mε,1 )xk−1,1 (xk,1 − mε,1 )xk−1,2 k=1 (xk,2 − mε,2 )xk−1,1 (xk,2 − mε,2 )xk−1,2 hence we obtain (B.1). = n X k=1 (xk − mε )x⊤ k−1 = Hn , ✷ For the existence of these CLS estimators in case of a critical symmetric 2-type Galton– Watson process, i.e., when ̺ = 1, we need the following approximations. B.2 Lemma. Suppose that the assumptions of Theorem 3.1 hold. For each T > 0, we have −2 n sup ⌊nt⌋ X t∈[0,T ] k=1 Vk2 ⌊nt⌋ hVξ v left , v left i X P − Uk−1 −→ 0 1 − λ2 k=1 50 as n → ∞. P⌊nt⌋ 2 Proof. In order to prove the satement, we derive a decomposition of k=1 Vk as a sum of a martingale and some other terms. Using recursion (4.7), Lemma A.1 and (4.11), we obtain   E(Vk2 | Fk−1) = E (λVk−1 + hv left , M k + mε i)2 Fk−1 ⊤ 2 = λ2 Vk−1 + 2λhvleft , mε iVk−1 + hv left , mε i2 + v ⊤ left E(M k M k | Fk−1 )v left 2 = λ2 Vk−1 + v⊤ left (Xk−1,1 V ξ1 + Xk−1,2 V ξ2 )v left + constant + constant × Vk−1 2 = λ2 Vk−1 + v⊤ left V ξ v left Uk−1 + constant + constant × Vk−1 . Thus ⌊nt⌋ X Vk2 ⌊nt⌋ X  = Vk2 k=1 k=1 ⌊nt⌋ X  = Vk2 k=1 − E(Vk2 − E(Vk2  | Fk−1) +  ⌊nt⌋ X k=1 | Fk−1) + λ + O(n) + constant × ⌊nt⌋ X 2 E(Vk2 | Fk−1) ⌊nt⌋ X 2 Vk−1 + v⊤ left V ξ v left k=1 ⌊nt⌋ X Uk−1 k=1 Vk−1 . k=1 Consequently, ⌊nt⌋ X k=1 Vk2 ⌊nt⌋ ⌊nt⌋ X  1 X 2 1 2 Uk−1 = V − E(Vk | Fk−1) + hVξ v left , v left i 1 − λ2 k=1 k 1 − λ2 k=1 ⌊nt⌋ X λ2 2 − Vk−1 . V + O(n) + constant × 1 − λ2 ⌊nt⌋ k=1 Using (A.8) with (ℓ, i, j) = (8, 0, 2) we obtain −2 n sup ⌊nt⌋ X  t∈[0,T ] k=1 Vk2 − E(Vk2 | Fk−1)  P −→ 0 as n → ∞. P 2 Using (A.7) with (ℓ, i, j) = (3, 0, 2) we obtain n−2 supt∈[0,T ] V⌊nt⌋ −→ 0. Moreover, P P ⌊nt⌋ n−2 k=1 Vk−1 −→ 0 as n → ∞ follows by (A.6) with the choice (ℓ, i, j) = (8, 0, 1). Consequently, we obtain the statement. ✷ B.3 Lemma. Suppose that the assumptions of Theorem 3.1 hold. Then for each T > 0, −5/2 n sup ⌊nt⌋ X t∈[0,T ] k=1 P Uk−1 Vk−1 −→ 0 51 as n → ∞. P⌊nt⌋ Proof. The aim of the following discussion is to decompose k=1 Uk−1 Vk−1 as a sum of a martingale and some other terms. Using the recursions (4.7), (4.4) and Lemma A.1, we obtain    E(Uk−1 Vk−1 | Fk−2) = E (Uk−2 + huleft , M k−1 + mε i) λVk−2 + hv left , M k−1 + mε i Fk−2 ⊤ = λUk−2 Vk−2 + hv left , mε iUk−2 + λhuleft , mε iVk−2 + u⊤ left mε mε v left + u⊤ E(M k−1 M ⊤ k−1 | Fk−2 )v = λUk−2 Vk−2 + constant + linear combination of Uk−2 and Vk−2. Thus ⌊nt⌋ X Uk−1 Vk−1 ⌊nt⌋ ⌊nt⌋ X   X E(Uk−1 Vk−1 | Fk−2) Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) + = k=2 k=2 k=1 ⌊nt⌋ ⌊nt⌋ X X   Uk−2 Vk−2 Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) + λ = k=2 k=2 + O(n) + linear combination of ⌊nt⌋ X ⌊nt⌋ X Uk−2 and k=2 Consequently ⌊nt⌋ X Uk−1 Vk−1 k=2 Vk−2 . k=2 ⌊nt⌋  1 X = Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) 1 − λ k=2 ⌊nt⌋ ⌊nt⌋ X X λ U⌊nt⌋−1 V⌊nt⌋−1 + O(n) + linear combination of Uk−2 and Vk−2 . − 1−λ k=2 k=2 Using (A.8) with (ℓ, i, j) = (4, 1, 1) we have −5/2 n ⌊nt⌋ X   P Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) −→ 0 sup t∈[0,T ] k=2 as n → ∞. Thus, in order to show the statement, it suffices to prove (B.2) −5/2 n ⌊nT ⌋ X k=1 P Uk −→ 0, −5/2 n ⌊nT ⌋ X k=1 P |Vk | −→ 0, P n−5/2 sup |U⌊nt⌋ V⌊nt⌋ | −→ 0 t∈[0,T ] as n → ∞. Using (A.6) with (ℓ, i, j) = (2, 1, 0) and (ℓ, i, j) = (2, 0, 1), and (A.7) with (ℓ, i, j) = (3, 1, 1) we have (B.2), thus we conclude the statement. ✷ B.4 Lemma. Suppose that the assumptions of Theorem 3.1 hold. If hVξ v left , v left i = 0, then for each T > 0, ⌊nt⌋ X P −1 n sup Vk2 − Mt −→ 0 as n → ∞, t∈[0,T ] k=1 52 where M is defined in Theorem 4.2. Moreover, M = 0 if and only if hVε v left , v left i + hvleft , mε i2 = 0, which is equivalent to a.s. (1 − α)Xk,1 = βXk,2 for all k ∈ N. Proof. First we show −1 (B.3) n sup ⌊nt⌋ X t∈[0,T ] k=1 Vk − hv left , mε i P t −→ 0 1−λ as n → ∞ for each T > 0. Using recursion (A.5), we obtain E(Vk | Fk−1) = λVk−1 + hv left , mε i, Thus ⌊nt⌋ X Vk = k=1 k=1 Consequently, ⌊nt⌋ X ⌊nt⌋ X [Vk − E(Vk | Fk−1)] + λ n X k=1 k ∈ N. Vk−1 + ⌊nt⌋hv left , mε i. ⌊nt⌋ 1 X λ hv left , mε i Vk = [Vk − E(Vk | Fk−1)] − V⌊nt⌋ + ⌊nt⌋ . 1 − λ k=1 1−λ 1−λ k=1 Using (A.12) with (ℓ, j) = (2, 1) we obtain −1 n ⌊nt⌋ X   P Vk − E(Vk | Fk−1) −→ 0 sup t∈[0,T ] k=1 as n → ∞. P Using (A.10) with (ℓ, i, j) = (2, 0, 1) we obtain n−1 supt∈[0,T ] |V⌊nt⌋ | −→ 0 as n → ∞, and hence we conclude (B.3). P⌊nt⌋ 2 In order to prove the convergence in the statement, we derive a decomposition of k=1 Vk as a sum of a martingale and some other terms. Using recursion (A.5), we obtain   E(Vk2 | Fk−1) = E (λVk−1 + hv left , εk i)2 Fk−1 2 = λ2 Vk−1 + 2λhvleft , mε iVk−1 + E(hv left , εk i2 ). Thus ⌊nt⌋ X k=1 Vk2 ⌊nt⌋ ⌊nt⌋ X  2  X 2 E(Vk2 | Fk−1) Vk − E(Vk | Fk−1) + = k=1 k=1 ⌊nt⌋ ⌊nt⌋ X X  2  2 2 2 Vk−1 Vk − E(Vk | Fk−1) + λ = k=1 k=1 + 2λhvleft , mε i ⌊nt⌋ X k=1 53 Vk−1 + ⌊nt⌋ E(hv left , εk i2 ). Consequently, ⌊nt⌋ X Vk2 k=1 ⌊nt⌋  1 X 2 λ2 2 = V2 V − E(V | F ) − k−1 k k 1 − λ2 1 − λ2 ⌊nt⌋ k=1 ⌊nt⌋ E(hvleft , εk i2 ) 2λhv left , mε i X . V + ⌊nt⌋ + k−1 1 − λ2 1 − λ2 k=1 Using (A.12) with (ℓ, j) = (4, 2) we obtain −1 n ⌊nt⌋ X  sup t∈[0,T ] k=1 Vk2 − E(Vk2 | Fk−1)  P −→ 0 as n → ∞. P 2 Using (A.10) with (ℓ, i, j) = (3, 0, 2) we obtain n−1 supt∈[0,T ] V⌊nt⌋ −→ 0 as n → ∞. Consequently, by (B.3), we obtain −1 n sup ⌊nt⌋ X t∈[0,T ] k=1 −1 =n sup Vk2 − ⌊nt⌋ X t∈[0,T ] k=1 2λhvleft , mε i2 E(hvleft , εk i2 ) t − t (1 − λ)(1 − λ2 ) 1 − λ2 P Vk2 − Mt −→ 0 as n → ∞. Clearly M = 0 if and only if hVε v left , v left i = 0 and hv left , mε i = 0, which is equivalent to E(hv left , εi i2 ) = hVε v left , v left i + hv left , mε i2 = 0 for all i ∈ N, which is equivalent to a.s. a.s. hv left , εk i = (1−α)εk,1 −βεk,2 = 0 for all k ∈ N, which is equivalent to (1−α)Xk,1 −βXk,2 = 0 for all k ∈ N. ✷ B.5 Lemma. Suppose that the assumptions of Theorem 3.1 hold. If hVξ v left , v left i = 0, then for each T > 0, −2 n ⌊nt⌋ ⌊nt⌋ X hv left , mε i X P Uk−2 −→ 0 Uk−1 Vk−1 − sup 1 − λ t∈[0,T ] k=1 k=1 as n → ∞. P⌊nt⌋ Proof. The aim of the following discussion is to decompose k=1 Uk−1 Vk−1 as a sum of a martingale and some other terms. Using the recursions (4.4), (A.5), and Lemma A.1, we obtain  E(Uk−1 Vk−1 | Fk−2) = E (Uk−2 + huleft , M k−1 + mε i)(λVk−2 + hvleft , εk−1 i) Fk−2 = λUk−2 Vk−2 + hv left , mε iUk−2 + λhuleft , mε iVk−2 ⊤ + huleft , mε ihv left , mε i + u⊤ left E(M k−1 εk−1 | Fk−2)v left = λUk−2 Vk−2 + hv left , mε iUk−2 + constant + constant×Vk−2 . 54 Thus ⌊nt⌋ X Uk−1 Vk−1 k=1 ⌊nt⌋ ⌊nt⌋ X   X = Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) + E(Uk−1 Vk−1 | Fk−2) k=2 k=2 ⌊nt⌋ ⌊nt⌋ X X   Uk−2 Vk−2 Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) + λ = k=2 k=2 + hv left , mε i Consequently, ⌊nt⌋ X Uk−1 Vk−1 k=2 ⌊nt⌋ X k=2 ⌊nt⌋ X Vk−2. Uk−2 + O(n) + constant× k=2 ⌊nt⌋  1 X λ = Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) − U⌊nt⌋−1 V⌊nt⌋−1 1 − λ k=2 1−λ ⌊nt⌋ ⌊nt⌋ X hv left , mε i X Vk−2. Uk−2 + O(n) + constant× + 1 − λ k=2 k=2 Using (A.11) with (ℓ, i, j) = (4, 1, 1) we have −2 n ⌊nt⌋ X   P Uk−1 Vk−1 − E(Uk−1 Vk−1 | Fk−2) −→ 0 sup as n → ∞. t∈[0,T ] k=2 Thus, in order to show the statement, it suffices to prove (B.4) −2 n ⌊nT ⌋ X k=1 P |Vk | −→ 0, P n−2 sup |U⌊nt⌋ V⌊nt⌋ | −→ 0 t∈[0,T ] as n → ∞. Using (A.9) with (ℓ, i, j) = (2, 0, 1), and (A.10) with (ℓ, i, j) = (3, 1, 1) we have (B.4), thus we conclude the statement. ✷ Now we can prove asymptotic existence and uniqueness of CLS estimators of the offspring mean matrix and of the criticality parameter in the critical case. B.6 Proposition. Suppose that the assumptions of Theorem 3.1 hold, and hVξ v left , v left i + hVε v left , vleft i + hv left , mε i2 > 0. Then limn→∞ P(Ωn ) = 1, where Ωn is defined in (3.2), (n) cξ converges to 1 as and hence the probability of the existence of a unique CLS estimator m e n ) = 1, where Ω e n is defined in (3.5), and n → ∞. If hVξ v left , v left i > 0 then limn→∞ P(Ω hence the probability of the existence of the estimator ̺bn converges to 1 as n → ∞. D Proof. Recall convergence (n−1 U⌊nt⌋ )t∈R+ −→ (Yt )t∈R+ from (4.6). Using Lemmas B.2, B.3, C.2 and C.3, one can show     R1 2 −3 2 Yt dt n Uk−1 0 n  X   D    n−5/2 Uk−1 Vk−1  −→  as n → ∞.  0     R k=1 2 1 hv left ,mε i n−2 Vk−1 Yt dt 1−λ 55 0 By (4.12) and continuous mapping theorem, (B.5) −5 n hVξ v left , v left i det(An ) −→ 1 − λ2 D Z 1 0 Yt2 dt Z 0 1 Yt dt as n → ∞. Since mε 6= 0, by the SDE (2.8), we have P(Yt = 0 for all t ∈ [0, 1]) = 0, which implies that  R1 R1 R1 R1 P 0 Yt2 dt 0 Yt dt > 0 = 1. Consequently, the distribution function of 0 Yt2 dt 0 Yt dt is continuous at 0. If hVξ v left , v left i > 0 then, by (B.5),  P(Ωn ) = P (det(An ) > 0) = P n−5 det(An ) > 0   Z 1  Z Z 1 Z 1 hVξ v left , v left i 1 2 2 →P Yt dt Yt dt > 0 = P Yt dt Yt dt > 0 = 1 1 − λ2 0 0 0 0 as n → ∞. If hVξ v left , vleft i = 0, then, using convergence (4.6) and Lemmas B.4, B.5, C.2 and C.3, one can show     R1 2 −3 2 Yt dt n Uk−1 0 n  X   D  R  n−2 Uk−1 Vk−1  −→  hvleft ,mε i 1 Yt dt  as n → ∞.    1−λ 0   k=1 2 2 hv left ,mε i left ,mε i n−1 Vk−1 + hVε v1−λ 2 (1−λ)2 By (4.12) and continuous mapping theorem, Z 1 2   Z hv left , mε i2 hVε v left , mε i hv left , mε i 1 D −4 2 Yt dt n det(An ) −→ + Yt dt − (1 − λ)2 1 − λ2 1−λ 0 0 Z 1 2 ! Z Z 1 hVε v left , mε i 1 2 hv left , mε i2 = Yt dt + Yt2 dt − Yt dt 2 1 − λ2 (1 − λ) 0 0 0  2 R1 R1 R1 as n → ∞. As above, P 0 Yt2 dt > 0 = 1. It is also known that P 0 Yt2 dt − 0 Yt dt >  0 = 1, see, e.g., the proof of Theorem 3.2 in Barczy et al. [2]. Consequently, the distribution function of the above limit distribution is continuous at 0. Since hVξ v left , v left i+hVε v left , v left i+ hv left , mε i2 > 0 and hVξ v left , v left i = 0, we have hVε v left , v left i > 0 or hv left , mε i2 > 0, hence,  P(Ωn ) = P (det(An ) > 0) = P n−4 det(An ) > 0 ! Z 1 2 ! Z Z 1 hv left , mε i2 hVε v left , mε i 1 2 →P Yt dt + Yt2 dt − Yt dt >0 =1 2 1 − λ2 (1 − λ) 0 0 0 as n → ∞. (n) D (n) P cξ −→ mξ cξ −→ mξ as n → ∞, and hence m If hVξ v left , v left i > 0, then (3.6) yields m P as n → ∞, thus (b αn − δbn )2 + 4βbn γbn −→ (α − δ)2 + 4βγ = (1 − λ)2 > 0, implying  e n ) = P (b P(Ω αn − δbn )2 + 4βbn γbn > 0 → 1 as n → ∞, 56 hence we obtain the satement. ✷ Next we prove asymptotic existence and uniqueness of CLS estimators of the offspring mean matrix and of the criticality parameter in the subcritical case. B.7 Proposition. Suppose that the assumptions of Theorem 3.8 hold. Then limn→∞ P(Ωn ) = e n ) = 1, where Ωn and Ω e n are defined in (3.2) and (3.5), respectively, 1 and limn→∞ P(Ω (n) cξ and ̺bn converges and hence the probability of the existence of unique CLS estimators m to 1 as n → ∞. Proof. Recall convergence from (7.2). Consequently, fX f⊤ The matrix E X and hence we obtain   a.s. fX f⊤ , n−1 An −→ E X as n → ∞,    a.s. fX f⊤ , n−1 det(An ) −→ det E X  as n → ∞. fX f⊤ is invertible, see the proof of Theorem 3.8. Thus det E X P(Ωn ) = P(det(An ) > 0) = P(n−1 det(An ) > 0) → 1, (n) cξ The estimator m > 0, as n → ∞. (n) a.s. cξ −→ mξ as n → ∞. Consequently, is strongly consistent, hence m a.s. (b αn − δbn )2 + 4βbn b γn −→ (α − δ)2 + 4βγ > 0, as n → ∞, e n ) = 1. and hence we obtain limn→∞ P(Ω C  ✷ A version of the continuous mapping theorem The following version of continuous mapping theorem can be found for example in Kallenberg [15, Theorem 3.27]. C.1 Lemma. Let (S, dS ) and (T, dT ) be metric spaces and (ξn )n∈N , ξ be random elements D with values in S such that ξn −→ ξ as n → ∞. Let f : S → T and fn : S → T , n ∈ N, be measurable mappings and C ∈ B(S) such that P(ξ ∈ C) = 1 and limn→∞ dT (fn (sn ), f (s)) = 0 D if limn→∞ dS (sn , s) = 0 and s ∈ C. Then fn (ξn ) −→ f (ξ) as n → ∞. For the case S = D(R+ , Rd ) and T = Rq (or T = D(R+ , Rq )), where d, q ∈ N, we formulate a consequence of Lemma C.1. lu For functions f and fn , n ∈ N, in D(R+ , Rd ), we write fn −→ f if (fn )n∈N converges to f locally uniformly, i.e., if supt∈[0,T ] kfn (t) − f (t)k → 0 as n → ∞ for all 57 T > 0. For measurable mappings Φ : D(R+ , Rd ) → Rq (or Φ : D(R+ , Rd ) → D(R+ , Rq )) and Φn : D(R+ , Rd ) → Rq (or Φn : D(R+ , Rd ) → D(R+ , Rq )), n ∈ N, we will denote by CΦ,(Φn )n∈N lu the set of all functions f ∈ C(R+ , Rd ) such that Φn (fn ) → Φ(f ) (or Φn (fn ) −→ Φ(f )) lu whenever fn −→ f with fn ∈ D(R+ , Rd ), n ∈ N. We will use the following version of the continuous mapping theorem several times, see, e.g., Barczy et al. [3, Lemma 4.2] and Ispány and Pap [11, Lemma 3.1]. (n) C.2 Lemma. Let d, q ∈ N, and (U t )t∈R+ and (U t )t∈R+ , n ∈ N, be Rd -valued stochastic D processes with càdlàg paths such that U (n) −→ U. Let Φ : D(R+ , Rd ) → Rq (or Φ : D(R+ , Rd ) → D(R+ , Rq )) and Φn : D(R+ , Rd ) → Rq (or Φn : D(R+ , Rd ) → D(R+ , Rq )), n ∈ N, be measurable mappings such that there exists C ⊂ CΦ,(Φn )n∈N with C ∈ B(D(R+ , Rd )) D and P(U ∈ C) = 1. Then Φn (U (n) ) −→ Φ(U). In order to apply Lemma C.2, we will use the following statement several times, see Barczy et al. [5, Lemma B.3]. C.3 Lemma. Let d, p, q ∈ N, h : Rd → Rq be a continuous function and K : [0, 1]×R2d → Rp be a function such that for all R > 0 there exists CR > 0 such that (C.1) kK(s, x) − K(t, y)k 6 CR (|t − s| + kx − yk) for all s, t ∈ [0, 1] and x, y ∈ R2d with kxk 6 R and kyk 6 R. Moreover, let us define the mappings Φ, Φn : D(R+ , Rd ) → Rq+p , n ∈ N, by  !    n 1X k k−1 k Φn (f ) := h(f (1)), K ,f , ,f n k=1 n n n  Z Φ(f ) := h(f (1)), 1 K(u, f (u), f (u)) du 0  for all f ∈ D(R+ , Rd ). Then the mappings Φ and Φn , n ∈ N, are measurable, and CΦ,(Φn )n∈N = C(R+ , Rd ) ∈ B(D(R+ , Rd )). D Convergence of random step processes We recall a result about convergence of random step processes towards a diffusion process, see Ispány and Pap [11]. This result is used for the proof of convergence (5.1). D.1 Theorem. Let γ : R+ × Rd → Rd×r be a continuous function. Assume that uniqueness in the sense of probability law holds for the SDE (D.1) d U t = γ(t, U t ) dW t , 58 t ∈ R+ , with initial value U 0 = u0 for all u0 ∈ Rd , where (W t )t∈R+ is an r-dimensional standard Wiener process. Let (U t )t∈R+ be a solution of (D.1) with initial value U 0 = 0 ∈ Rd . (n) For each n ∈ N, let (U k )k∈N be a sequence of d-dimensional martingale differences with (n) (n) (n) respect to a filtration (Fk )k∈Z+ , i.e., E(U k | Fk−1) = 0, n ∈ N, k ∈ N. Let (n) Ut := ⌊nt⌋ X (n) t ∈ R+ , Uk , k=1 n ∈ N. (n)  Suppose that E kU k k2 < ∞ for all n, k ∈ N. Suppose that for each T > 0, (i) sup t∈[0,T ] (ii) ⌊nT P⌋ k=1 ⌊nt⌋ P k=1 Rt P (n)  (n) ⊤ Var U k | Fk−1 − 0 γ(s, U s(n) )γ(s, U (n) s ) ds −→ 0, (n) (n)  P E kU k k2 1{kU (n) k>θ} Fk−1 −→ 0 for all θ > 0, k P D where −→ denotes convergence in probability. Then U (n) −→ U as n → ∞. Note that in (i) of Theorem D.1, k · k denotes a matrix norm, while in (ii) it denotes a vector norm. References [1] Athreya, K. B. and Ney, P. E. (1972). Branching Processes, Springer-Verlag, New York-Heidelberg. [2] Barczy, M., Döring, L., Li, Z. and Pap, G. (2013). On parameter estimation for critical affine processes. Electronic Journal of Statistics 7 647–696. [3] Barczy, M., Ispány, M. and Pap, G. (2010). Asymptotic behavior of CLS estimators of autoregressive parameter for nonprimitive unstable INAR(2) models. Available on the ArXiv: http://arxiv.org/abs/1006.4641. [4] Barczy, M., Ispány, M. and Pap, G. (2011). Asymptotic behavior of unstable INAR(p) processes. Stochastic Processes and their Applications 121(3) 583–608. [5] Barczy, M., Ispány, M. and Pap, G. (2014). Asymptotic behavior of conditional least squares estimators for unstable integer-valued autoregressive models of order 2. Scandinavian Journal of Statistics 41(4) 866–892. [6] Danka, T. and Pap, G. (2016+). Asymptotic behavior of critical indecomposable multitype branching processes with immigration. To appear in European Series in Applied and Industrial Mathematics (ESAIM). Probability and Statistics. Available on the ArXiv: http://arxiv.org/abs/1401.3440. 59 [7] Haccou, P., Jagers, P. and Vatutin, V. 2005. Branching Processes, Cambridge University Press, Cambridge. [8] Hamilton, J. D. (1994). Time series analysis. Princeton University Press, Princeton. [9] Horn, R. A. and Johnson, Ch. R. (1985). Matrix Analysis. Cambridge University Press, Cambridge. [10] Ispány, M., Körmendi, K. and Pap, G. (2014). Asymptotic behavior of CLS estimators for 2-type doubly symmetric critical Galton–Watson processes with immigration. Bernoulli 20(4) 2247–2277. [11] Ispány, M. and Pap, G. (2010). A note on weak convergence of step processes. Acta Mathematica Hungarica 126(4) 381–395. [12] Ispány, M. and Pap, G. (2014). Asymptotic behavior of critical primitive multi-type branching processes with immigration. Stochastic Analysis and Applications 32(5) 727– 741. [13] Ispány, M., Pap, G. and van Zuijlen, M. C. A. (2003). Asymptotic inference for nearly unstable INAR(1) models. Journal of Applied Probability 40(3) 750–765. [14] Jacod, J. and Shiryaev, A. N. (2003). Limit Theorems for Stochastic Processes, 2nd ed. Springer-Verlag, Berlin. [15] Kallenberg, O. (1997). Foundations of Modern Probability. Springer, New York, Berlin, Heidelberg. [16] Kesten, H. and Stigum, B. P. (1966). A limit theorem for multidimensional Galton– Watson processes. The Annals of Mathematical Statistics 37(5) 1211–1223. [17] Klimko, L. A. and Nelson, P. I. (1978). On conditional least squares estimation for stochastic processes. The Annals of Statistics 6(3) 629–642. [18] Lehmann, E.L. and Romano, J. P. (2009). Testing Statistical Hypotheses, 3rd ed. Springer-Verlag Berlin Heidelberg. [19] Musiela, M. and Rutkowski, M. (1997). Martingale Methods in Financial Modelling, Springer-Verlag, Berlin, Heidelberg. [20] Putzer, E. J. (1966). Avoiding the Jordan canonical form in the discussion of linear systems with constant coefficients. The American Mathematical Monthly 73(1) 2–7. [21] Quine, M. P. (1970). The multi-type Galton–Watson process with immigration. Journal of Applied Probability 7(2) 411–422. [22] Quine, M. P. and Durham, P. (1977). Estimation for multitype branching processes. Journal of Applied Probability 14(4) 829–835. 60 [23] Revuz, D. and Yor, M. (2001). Continuous Martingales and Brownian Motion, 3rd ed., corrected 2nd printing. Springer-Verlag, Berlin. [24] Tanaka, K. (1996). Time Series Analysis, Nonstationary and Noninvertible Distribution Theory. Wiley Series in Probability and Statistics. John Wiley & Sons, Inc., New York. [25] Velasco, M.G., Puerto, I.M., Martı́nez, R., Molina, M., Mota, M., and Ramos, A. 2010. Workshop on Branching Processes and Their Applications, Lecture Notes in Statistics, Proceedings 197, Springer-Verlag, Berlin, Heidelberg. [26] Wei, C. Z. and Winnicki, J. (1989). Some asymptotic results for the branching process with immigration. Stochastic Processes and their Applications 31(2) 261–282. [27] Wei, C. Z. and Winnicki, J. (1990). Estimation of the means in the branching process with immigration. The Annals of Statistics 18 1757–1773. [28] Winnicki, J. (1988). Estimation theory for the branching process with immigration. In: Statistical inference from stochastic processes (Ithaca, NY, 1987), 301–322, Contemp. Math., 80, Amer. Math. Soc., Providence, RI. [29] Winnicki, J. (1991). Estimation of the variances in the branching process with immigration. Probability Theory and Related Fields 88(1) 77–106. 61
10math.ST
arXiv:1707.00617v1 [cs.AI] 28 Jun 2017 Submodular Function Maximization for Group Elevator Scheduling Srikumar Ramalingam Arvind U. Raghunathan and Daniel Nikovski School of Computing, University of Utah, USA Mitsubishi Electric Research Labs (MERL), Cambridge, MA, USA [email protected] {raghunathan,nikovski}@merl.com Abstract We propose a novel approach for group elevator scheduling by formulating it as the maximization of submodular function under a matroid constraint. In particular, we propose to model the total waiting time of passengers using a quadratic Boolean function. The unary and pairwise terms in the function denote the waiting time for single and pairwise allocation of passengers to elevators, respectively. We show that this objective function is submodular. The matroid constraints ensure that every passenger is allocated to exactly one elevator. We use a greedy algorithm to maximize the submodular objective function, and derive provable guarantees on the optimality of the solution. We tested our algorithm using Elevate 8, a commercial-grade elevator simulator that allows simulation with a wide range of elevator settings. We achieve significant improvement over the existing algorithms. Introduction Group elevator scheduling refers to the problem of assigning passenger requests to specific elevators. We exemplify this using a specific example below. Consider a building with F = 8 floors and C = 3 elevator cars as shown in Figure 1. Passengers requesting elevator service press the call buttons on their respective floors to signal the direction of their rides. We refer to these as hall calls. For example, there are two hall calls on the floors 2 and 7 requesting service to higher and lower floors respectively. From the standpoint of the elevators, the direction of travel of the hall calls are known. However, the number of passengers behind a hall call and their destinations are typically not available in most elevator systems. The waiting passengers are unaware of the locations of individual cars, their moving directions, or the cars assigned to service them. For example in Figure 1, the first elevator car C1 is at the floor 3 and moving upward to service a passenger in the car going to floor 5. This information is only available after the passenger enters the car and presses the particular floor button in the elevator car. We refer to such requests from passengers in the cars as car calls. The elevator cars C2 and C3 are moving downwards and upwards to service their respective passenger requests. At each floor, we can have hall call buttons in upward and downward Copyright c 2017, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. Figure 1: A typical elevator system with 3 elevator cars and 8 floors. The three elevator cars C1, C2, and C3 are moving to serve the requests of the passengers that are in their cars. Passengers indicate the preference for their rides by pressing the upward or downward buttons. directions. In a building with F floors we can have a maximum of 2F − 2 hall calls (there can be hall calls in only one direction at the lobby and the top floors) at any time. With C elevator cars, we can have a maximum of C 2F −2 assignments of hall calls to elevators. Given this incomplete information of the waiting passengers and the huge search space, the scheduler in an elevator system has the responsibility of assigning a particular elevator to service each of the hall calls. In general, the schedulers assign the hall calls to elevator cars to optimize some criteria such as the average waiting time, total travel time of the passengers, energy consumption, etc. In addition, the potential human-system interactions only serve to complicate the decision-making as even a gentle gesture of keeping the elevator door open for arriving passengers can render a particular assignment suboptimal. As a result, the schedulers must constantly improvise and potentially change the assignments of hall calls to elevators as new information is revealed over time. In fact, such reassignments are completely oblivious to the waiting passengers. Consequently, the problem of group elevator scheduling is a hard problem and continues to be researched due to its practical significance. In this paper, we address the problem of assigning the hall calls to elevator cars so as to minimize the average waiting time (AWT) of the passengers. The waiting time of a single passenger is the time taken from the moment the passenger presses the hall call button at a floor to the instant at which the passenger is picked up. We address the more prevalent elevator systems wherein: • Hall calls do not provide information on destination floors. • Number of passengers behind a hall call is not known. • No prediction of future passengers is available. • Reassignment of hall calls is allowed. In this setting, it is not possible to compute the exact waiting time. Consequently, we use information on the current car calls and the motion of the elevator car to compute an estimate of the waiting times. Reassignment of hall calls to elevators, wherein the scheduler can modify the previous assignments as long as the hall call has not been serviced, helps to mitigate the effect of the uncertainty in the hall calls. We propose an approximation algorithm to determine the assignments that minimize the estimated average waiting times. Prior Work Most of the existing methods address one or more of the following scenarios: • Sensing and User Inputs: Algorithms that rely on additional user-interface devices that allow the users to enter their destination floors, or the use of sensors to detect the number of passengers waiting at each floor. • Traffic-patterns: Algorithms that are tailor-made for specific traffic patterns. • Design Criteria: Algorithms that are motivated by different design criteria such as estimated time of arrival, average waiting time, etc. Sensing and User Inputs In a destination control elevator system, the passengers provide the destination information to the scheduler before they board the cars. Several AI techniques (Koehler and Ottiger 2002) have been used to address the scheduling of destination control systems, and this problem has been shown to be NP-hard even in the simplest settings (Seckinger and Koehler 1999). In the case of full destination control scenario, the problem of group elevator scheduling can be formulated using planning domain definition language (PDDL) (Koehler and Schuster 2000; Koehler and Ottiger 2002). In the presence of complete information, elevator scheduling problem has been addressed using mixed integer linear programming (MILP) (Ruokokoski, Ehtamo, and Pardalos 2015; Xu and Feng 2016). Genetic algorithms have also been proposed to generate control policy for elevator scheduling (Dai et al. 2010). In studies dating back to 1995, computer vision algorithms have been proposed to automatically count the number of passengers waiting at each floor, but they are not commonly used due to the cost of retro-fitting existing instal- lations (Schofield, Stonham, and Mehta 1995). The availability of complete information may become feasible in the case of new and high-rise buildings, but the market for such buildings is much smaller than existing installations. Hence, improving the performance of schedulers with incomplete information continues to be a very relevant and challenging problem to date. Traffic-patterns Elevator traffic patterns can broadly be classified into three types: up-peak, down-peak, and inter-floor. In the up-peak case, passengers always enter the elevator system at the lobby and request upward rides. In the case of down-peak, the passengers request downward rides from all floors to the lobby. In the case of inter-floor the passengers request upward or downward rides between different floors, but not to or from the lobby. For up-peak traffic case, special purpose algorithms are developed based on queuing theory (Pepyne and Cassandras 1997). In the down-peak case, efficient algorithms have been developed using Finite Intervisit Minimization (FIM) and Empty the System Algorithm (ESA) (Bao et al. 1994). The intensity of each traffic pattern can be represented using fuzzy variables and fuzzy logic can be used for the assignment of cars to hall calls (Ujihara and Tsuji 1988; Ujihara and Amano 1994). In particular, the fuzzy rules can be used to identify the specific pattern and this can allocate a specific control algorithm for scheduling. Most of the time, the traffic patterns can be seen as the combination of these three basic patterns, e.g., at lunch time it could be 45 % down-peak, 45 % up-peak, and 10 % interfloor. One of the biggest challenges in exploiting this traffic pattern is the difficulty in accurate detection and the high frequency at which these patterns change. Neural networks and reinforcement learning methods have also been used for elevator scheduling problems (Crites and Barto 1996; Markon, Kita, and Nishikawa 1994). In particular, Crites and Barto combined neural networks and Q-learning to demonstrate improved performance over FIM and ESA for one specific down-peak scenario (Crites and Barto 1996). However, it took about 60,000 hours of training time and thereby impractical for real elevator systems. On the other hand, with the recent progress in deep learning methods with the use of GPUs, this might be an interesting future direction. There have been algorithms that use dynamic programming to compute the exact minimization of average waiting time (AWT) (Nikovski and Brand 2003). Their approach was to model it as Markov decision process (MDP). However, they assume that the number of passengers waiting behind a hall call is known. Design Criteria One of the popular elevator scheduling policy is collective control, where the cars stop at the nearest call in the running direction (Strakosch 1998). In particular, the system computes the travel distances between hall calls and elevators. The scheduler assigns the hall call to the ”nearest” car in terms of the distance. This strategy is not optimal and usu- ally results in bunching, where several cars arrive at the same floor at the same time. We can also allocate hall calls by minimizing the estimated time of arrival (ETA) instead of the distance. To avoid the problem of bunching, we can use other approaches such as zoning or sectoring, where we partition the building into zones and each car can serve only one zone. In other words, we consider the same number of zones as the number of elevators. This strategy improves performance when the traffic is downwards towards the lobby. It has been shown that this strategy is also suboptimal when too many passengers arrive in the same zone (Barney and dos Santos 1985; Strakosch 1998). Relative system response (RSR) is a scheduling strategy used by Otis Elevator company to optimize a heuristic criterion based on a weighted sum of penalties and bonuses computed for every car, without any explicit relation to the actual AWT (Bittar 1982). Another criteria used by Otis that is well correlated with AWT is remaining response time (RRT), which is the time required by a car to reach the floor of the hall call (Powell and Williams 1992). Approximate methods have been used to compute the average waiting time (AWT) by predicting the number of stops for passenger pickups and the most likely floor at which the car reverses its direction (Siikonen 1997; Cho, Gagov, and Kwon 1999; Barney and dos Santos 1985). Our Contributions • To the best of our knowledge, we are not aware of any group elevator scheduling algorithm that is based on submodularity. In this work, we show that the problem of group elevator scheduling can be formulated as the maximization of submodular functions under a matroid constraint. Submodularity is one of the key concepts in machine learning, computer vision, economics, and game theory. Recently it has found application in such diverse domains as: sensor placement (Guestrin, Krause, and Singh 2008), outbreak detection (Leskovec et al. 2007), word alignment (Lin and Bilmes 2011), clustering (Liu et al. 2013), viral marketing (Kempe, Kleinberg, and Tardos 2003), and finding diverse subsets in structured item sets (Prasad, Jegelka, and Batra 2014). • Our formulation enables the use of a simple greedy algorithm with guarantees on the optimality of the solution. • We use as objective a quadratic Boolean function that approximates the average waiting times of passengers. • Existing efforts in the literature demonstrate their advantages using customized simulation data, which makes it harder to evaluate and understand their usefulness. We evaluate using Elevate 8 and show consistent and significant improvement over the implemented standard scheduling algorithms in Elevate 8 over a wide variety of elevator settings. Background In this section, we briefly define useful entities such as set functions, submodularity, and matroids. Notations: Let B denote the Boolean set {0, 1} and R the set of reals. We use x to denote vectors. Definition 1. A set function F : 2E → R, where E is a finite set, maps a set to a real number. A set function can also be seen as a pseudo-Boolean function (Boros and Hammer 2002) that takes a Boolean vector as argument and returns a real number. Definition 2. A set function F : 2E → R is submodular if for all A, B ⊆ E with B ⊆ A and e ∈ E\A, we have: F (A ∪ {e}) − F (A) ≤ F (B ∪ {e}) − F (B). (1) This property is also referred to as diminishing return since the gain from adding an element to a small set B is never smaller than adding it to a superset A ⊃ B (Nemhauser, Wolsey, and Fisher 1978). Definition 3. A set function F is monotonically increasing if for all A, B ⊆ E and B ⊆ A, we have: F (B) ≤ F (A). (2) Definition 4. A matroid is an ordered pair M = (E, I) consisting of a finite set E and a collection I of subsets of E satisfying the following three conditions: 1. ∅ ∈ I. 2. If I ∈ I and I 0 ⊆ I, then I 0 ∈ I. 3. If I1 and I2 are in I and |I1 | < |I2 |, then there is an element e ∈ I2 − I1 such that I1 ∪ {e} ∈ I. The members of I are the independent sets of M . Note that there exist several other definitions for matroids that are equivalent. For more details, one can refer to (Oxley 1992). Definition 5. Let E1 , . . . , En be the partition of the finite set E and let k1 , . . . , kn be positive integers. The ordered pair M = (E, I) is a partition matroid if: I = {I : I ⊆ E, |I ∩ Ei | ≤ ki , 1 ≤ i ≤ n}. (3) Problem Formulation In this section, we formulate group elevator scheduling as a quadratic Boolean optimization problem. The qualifier “quadratic” is due to our choice of model for the waiting times of passengers. To set the stage, suppose there are N hall calls that need to be assigned to elevators. Note that these N hall calls include previously assigned calls that are considered for reassignment and new hall calls that have just requested service. We do not allow reassignment when the assigned car is already close to servicing the assigned hall call. The decision variables in the problem are denoted by xci . The variable xci is a Boolean variable to denote the assignment of the hall call i to elevator car c:  1 if the hall call i is assigned to car c, c xi = (4) 0 otherwise. Let x ∈ {0, 1}N ·C denote the vector storing all the assignments {x11 , x12 , . . . , x1N , . . . , xC N }. In any feasible assignment of hall calls to elevator cars, each hall call must be assigned to exactly one elevator car. This can be imposed through the constraint, C X xci = 1, ∀i ∈ {1, ..., N }. (5) c=1 The number of feasible assignments is C N . If we denote the waiting time associated with a feasible assignment x as wtrue (x) then the group elevator scheduling problem can be posed as minimizing wtrue (x) over all feasible assignments x. Clearly, computing the terms in the objective of such an optimization problem is an onerous task and is infeasible for real elevator systems in which decisions are typically made every second or fractions of a second. To alleviate this bottleneck we propose the following approximation for the total waiting time to serve the hall calls, g(x) = N X C X wic xci + i=1 c=1 N X N X C X c c c wij xi xj (6) i=1 j=i+1 c=1 c where wic , wij are computed based on the current state of the elevator car c as explained next. The term wic is the waiting time for car c to pick up the passenger(s) for hall call i given the current set of car calls for the car c. Consider the assignment of the hall calls to car C1 in Figure 1. We first consider the assignment of hall call on floor 3 to car C1 as shown in Figure 2(a). Since C1 already has a car call to floor 5 the waiting time for the hall call can be computed as wic = t3→5 + tdoor + t5→2 where ti→j represents the time to travel from floor i to floor j and tdoor includes the sum of door opening, dwell and closing times. Car C1 moves from a state of rest to state of rest when it travels from floor 5 to floor 2. On other hand, for the journey from floor 3 to 5 the car may already be in motion or at rest. Hence, the time required needs to be computed according to the kinematic state of the elevator car. Such kinemattic formulas have been derived in (Peters 1993) as a function of the velocity, acceleration and jerk of the car and the maximum limits for the same. Note that the other hall calls are completely ignored in performing this computation. We refer to this as unary term since the influence of other hall calls are completely ignored in the computation. In a similar manner, we can compute the waiting time wjc for picking the passenger requesting hall call from floor 7 (refer Figure 2(b)). c The term wij represents the excess over the wic + wjc that is incurred when both hall calls i and j are assigned to the same car c. We refer to this term as pairwise term. In other c words, (wic + wjc + wij ) is the total waiting time to pick up passengers for hall calls on floors i and j given the current set of car calls for car c and can be obtained as c wij = t3→5 + tdoor + t5→7 + tdoor + t7→f + tdoor + tf →2 − wic − wjc where f represents the unknown destination floor of the pasc senger on floor 7. In the computation of wij we have chosen to serve the hall call at floor 7 before serving the hall call at floor 2. This choice is dictated by typical elevator movement rules. Once a car is empty, • The car maintains its upward (downward) direction of motion if there are up (down) hall calls at floors above (below) the current floor of the elevator car. • If not, the car moves to the highest (lowest) floor at which downward (upward) hall call exists. • If not, then the car moves downward (upward) until the lowest (highest) floor with hall call in the upward (downward) direction exists. Unlike in the computation of the unary terms, notice that we require knowledge of the destination floor f for the first hall call that is serviced. Since this information is not available we instead compute the pairwise term as an expectation over all possible destination floors for that hall call,   X t3→5 + tdoor + t5→7 + tdoor c wij = ωf · +t7→f + tdoor + tf →2 f ∈{1,...,6} − wic − wjc where ωf is the probability of floor f being the destination. If there exists additional information on the probabilities these can be easily incorporated in the computation for the pairwise term. However, in the absence of such information we assume that destination floors are equally likely. Observe that the set of destination floors is only {1, . . . , 6} since the hall call requests downward service from floor 7. As in the computation of the unary terms, the remaining hall calls are ignored in performing this computation. We can state the following result on the pairwise term. c Lemma 1. wij ≥ 0. Proof. Suppose two hall calls i, j are assigned to the same car and that hall call i is serviced first. The waiting time for hall call i is exactly wic . If the second hall call is also on the same floor then the total waiting time is wic + wjc . If not the waiting time for hall call j is greater than wjc since the car makes an intermediate stop and there is also time associated with door operation to pick up the passenger for hall call i. Hence, the pairwise term is always nonnegative. Clearly, g(x) is exact when no more than 2 hall calls are assigned to each elevator car. For higher number of assignments to a car this is only a proxy for the actual waiting times of the passengers. However, our choice of this quadratic form for g(x) is motivated by: • nice properties that (we prove in the next section) that allow us to derive simple algorithms with provable guarantees • reduced computational effort in computing the objective O(N · C + N (N − 1) · C). Let w denote the vector storing all the weights C 1 C {w11 , . . . , w1C , w21 , . . . , wN , w12 , . . . , wN −1N }. We write the group elevator scheduling problem to minimize the waiting time as the following quadratic Boolean A, B ⊆ E. Let i → c ∈ E\A. We can observe that: X c h(A ∪ {i → c}) − h(A) = −wic − wij (j,c):j→c∈A h(B ∪ {i → c}) − h(B) = −wic X − c wij (j,c):j→c∈B Since unary and pairwise terms are non-negative (refer Lemma 1) and B ⊆ A, (a) wic (b) wjc c (c) wij h(A ∪ {i → c}) − h(A) ≤ h(B ∪ {i → c}) − h(B) which proves the claim. Figure 2: Computation of unary and pairwise terms. Now we consider the constraint in Equation (5) modeling the assignment of a hall call to exactly one elevator car. We show that this can be formulated using partition matroid constraint. In order to do that, let us consider N disjoint subsets of the ground set E as shown below: optimization problem: min g(x) x s.t C X xci = 1, ∀i ∈ {1, ..., N }, (7) E1 c=1 x ∈ {0, 1}N ·C . EN Submodular Maximization & Matroid In the section we show that the quadratic Boolean optimization in Equation (7) can be posed as a submodular maximization problem over a matroid. To begin with, we pose the problem in Equation (7) as a maximization using negations in the objective function: max − g(x) s.t Let M = (E, I) denote a partition matroid such that each independent set shares no more than one element with each of the disjoint subsets as shown below: |I ∩ Ei | ≤ 1, I ∈ I, ∀i ∈ {1, . . . , N } Let us consider the following submodular function maximization under a partition matroid constraint: A⊆E xci = 1, ∀i ∈ {1, ..., N }, (11) max h(A) x C X = {1 → 1, . . . , 1 → C} .. . = {N → 1, . . . , N → C}. (8) c=1 x ∈ {0, 1}N ·C . Some related notation on set functions that will allow us to formulate the problem over sets and help us to introduce the matroid constraints. Let us consider a finite set E comprising the assignments: E = {1 → 1, . . . , N → 1, . . . , 1 → C, . . . , N → C} where i → c denotes that hall call i is assigned to car c. The objective function g(x) can be equivalently defined over the subsets of E as follows. Let h : 2E → R be a set function defined for for any set A ⊂ E as: h(A) = −g(x), (9)   c ∈ {1, . . . , C}, 1 i → c ∈ A, where xci = ,∀ . i ∈ {1, . . . , N } 0 otherwise (10) . Lemma 2. The function h(A) is submodular. Proof. Consider two sets A and B where B ⊆ A and (SFM-1) s.t. A ∈ I, M = {E, I}. Note that the above optimization is different from the maximization problem given in Equation 8 because the constraints are different. The partition matroid only enforces that each hall call is assigned to no more than one elevator car (i.e., |A ∩ Ei | ≤ 1). However, it does not enforce that each hall call is assigned to at least one elevator car (i.e., |A ∩ Ei | ≥ 1 is not enforced). In order to do that, we add a penalty term such that an assignment that violates equation (5) (i.e. |A ∩ Ei | < 1) has a lower objective than any feasible assignment. This will ensure that each hall call is assigned to at least one elevator car. We consider the following additional term h1 (A) in the objective function: h1 (A) = − N X pi · (C − |A ∩ Ei |) i=1  where, pi = max c∈{1,...,C} wic + N X  (12) c  wij . j=1,j6=i The term h1 (A) reduces the objective function by PN C i=1 pi if there is no assignment, i.e., A = ∅. Since pi ≥ 0, we increase the objective function for every assignment of hall call to a car (i → c) included in the set A. Further, the function h1 (A) satisfies the following property for any i → c ∈ / A, h1 (A ∪ {i → c}) − h1 (A) = pi . (13) The following lemma shows that the combined objective function is submodular. Lemma 3. The function h(A) + h1 (A) is submodular. Proof. Consider two sets A, B ⊂ E with B ⊂ A. Let i → c ∈ E \ A. Then, by Equation (13) we have that h1 (A∪{i → c})−h1 (A) = h1 (B∪{i → c})−h1 (B) = pi . In other words, h1 (A) satisfies the condition for submodularity (Equation (1)) in Definition 2 as an equality. The sum of two submodular functions is submodular and thus h(A) + h1 (A) is submodular. We consider the following submodular function maximization problem that is equivalent to the quadratic Boolean optimization problem in Equation 8. PN Lemma 4. The function h(B) + h1 (B) + C i=1 pi is monotonically non-decreasing. PN Proof. The constant term C i=1 pi does not affect the monotonicity of a function. Thus we need to only show that h(B) + h1 (B) is monotonically non-decreasing for any B ⊂ E. Suppose that i → c ∈ / B is added to the set B. From Equations (11) and (13), h(B ∪ {i → c}) + h1 (B ∪ {i → c}) − h(B) − h1 (B) X c = − wic − wij + pi (j,c):j→c∈B  =− wic A⊆E + max c∈{1,...,C} (j,c):j→c∈B (SFM-2) In this work, we use a greedy algorithm to solve the maximization of the submodular function under the matroid constraint. The use of greedy algorithm is motivated by the following theorem: Theorem 1. (Nemhauser, Wolsey, and Fisher 1978) For maximizing monotonically non-decreasing submodular functions under a matroid constraint, the optimality of the greedy algorithm is characterized by the following equation: 1 f (Agreedy ) ≥ f (AOP T ), 2 (14) where f (∅) = 0. In the submodular optimization problem given in Equation (SFM-2), the objective function is not equal to zero when A = ∅. The optimality bound given in Theorem 1 applies for submodular function maximization where the function is equal to zero when the solution is an empty set. From PN Equation (12), h(∅) + h1 (∅) = −C i=1 pi . By adding a PN constant term (C i=1 pi ) we can ensure that the requirement of Theorem 1 can be satisfied. Further, the addition of a constant to a submodular function (h(A) + h1 (A)), also ensures submodularity of the resulting function h(A) + PN h1 (A)+C i=1 pi (refer Definition 2). We consider the following optimization problem which is equivalent to SFM-2: N X i=1 pi (SFM-3) s.t. A ∈ I, M = {E, I}. In order to apply Theorem 1 to the above optimization problem, we also have to show that the objective function is monotonically non-decreasing. wic + N X  c  wij . j=1,j6=i Since the unary and pairwise terms are non-negative (refer Lemma 1), it can be readily seen that:   N X c  max wic + wij ≥ wic xci s.t. A ∈ I, M = {E, I}. A⊆E c wij c∈{1,...,C} max h(A) + h1 (A) max h(A) + h1 (A) + C − X + j=1,j6=i X c wij ≥ 0. (j,c):j→c∈B Hence h(B ∪{i → c})+h1 (B ∪{i → c}) ≥ h(B)+h1 (B). (15) Further any set A with B ⊆ A ⊆ E can be obtained by incrementally adding to set B the elements in A \ B. Thus, iterative application of Equation (15) yields h(B) + h1 (B) ≤ h(A) + h1 (A) proving the claim. For the sake of completeness, we of the greedy algorithm used in of submodular function under a straint (Nemhauser, Wolsey, and Fisher objective function in Equation (SFM-3) PN f (A) = h(A) + h1 (A) + C i=1 pi . list the steps maximization matroid con1978). Let the be denoted by Greedy Algorithm: 1. Initialize S = ∅. 2. Let s = arg maxs0 ∈E f (S ∪ {s0 }) − f (S) such that S ∪ {s0 } ∈ I. 3. If s 6= ∅ then S = S ∪ {s} and go to step 2. 4. S is the required solution. Note that the objective function used in Equation (SFM-3) is not just the average waiting time. We also add a penalty PN h1 (A) and a constant term C i=1 pi . Thus the actual bound on the optimality using greedy algorithm is ! N N X X 1 h(AOP T ) + pi (16) h(Agreedy ) + pi ≥ 2 i=1 i=1 Note the penalty term evaluates to h1 (A) = −(C − PN 1) i=1 pi for valid assignments where every hall call is assigned to elevator car. Taking into account the constant Pone n term C i=1 pi yields the offset in Equation (16). We can also consider higher order terms to impose penalty on non-balanced assignment of passengers to elevator cars, i.e., assigning most of the passengers to single elevator cars. For example, we can impose a penalty whenever three passengers are assigned to a single elevator car. This penalty can be imposed using a third degree term, i.e., xci xcj xcl . By adding a higher order term of order k with negative coefficients to the function h(A) the resulting function is known to be submodular (Boros and Hammer 2002; Kolmogorov and Zabih 2004). Experiments We implemented our submodular maximization based greedy algorithm within the elevator simulator Elevate 81 . This is a commercial-grade simulator that allows the selection of the number of floors, the number of elevator cars, the speed/acceleration of cars, height of the floors, etc. It allows the user to choose different traffic patterns such as up-peak, down-peak, and inter-floor. In particular, the simulator provides several industry-standard methods such as group collective control, estimated time of arrival (ETA), destination control, etc. In addition to the details described earlier, we outline a few other enhancements to our algorithm: • We considered only non-destination control scenarios. Since we do not know the destination floors, we consider all possible destinations and use their average to compute the delay. • For the elevator cars that are close to capacity, we use a penalty term to avoid assigning additional passengers. This is achieved by using a high unary cost for assigning additional passengers to these elevator cars. This ensures that these calls are assigned by the greedy algorithm in the later stage. After the greedy assignment, we remove these assignments from the respective elevators. • Door status determines the amount of time that elapses before the elevator can move away from a floor. This is important for correct assignment in low traffic conditions. The simulator provides information on the door status and we appropriately include the additional time due to door operation. • We give a bonus to hall calls assigned to a car with existing car calls for the hall call floor. The bonus is provided in the form of reduction of the unary term associated with the particular assignment. The reduction is specified as, wic = wic − min(0.20wic , 10). (17) • We penalize assignments of too many hall calls to the same elevator car. This is achieved using higher order terms. For example, by adding the term 1 https://www.peters-research.com/index.php/8-elevate/58elevate-8 wic1 i2 ...ik xc1 xc2 ...xck in the objective function we increase the waiting time by wic1 i2 ...ik if k passengers board the same elevator car c. It is important to note that the above changes to the cost function still preserve submodularity. We used the following experimental setup to evaluate the different scheduling algorithms. We studied: • three different buildings with 8, 10, and 12 floors • for each building we consider a 1-hour period of interfloor traffic scenario with 5 different arrival rates specified as percentage of passengers in 5 minutes - 10%, 15%, 20%, 25% and 30% • for each building we considered 2, 3, 4, 5, and 6 elevator cars. For each specific building, arrival rate of passengers and fixed number of elevator cars, we measure the average waiting time achieved by the scheduling algorithm as the average over 10 different instances of the traffic scenario. We compare our methods with group collective control and estimated time of arrival (ETA) methods. The said methods are known to work well under different traffic conditions and elevator settings. The implementation in Elevate 8 employs several heuristics for improved performance: accounting for future demands, priority for coincident calls, not stopping an elevator car when it is full, intelligent decisions about keeping the door open before getting the hall call, detecting up-peak or down-peak scenarios automatically, etc. However, such heuristics are not included in an explicit objective function and it is hard to determine the impact of some of these improvements. In all our experiments, we consistently outperform these methods in a wide variety of elevator settings. We begin by describing an ablation study on our algorithm. Figure 3 plots the percentage savings in average waiting time when using both unary and pairwise terms in the objective function as opposed to using only the unary term c in the objective. For the latter case we simply set wij = 0. The plot provides the savings at different number of cars and arrival rates of traffic. In this study, we did not include the bonus specified in Equation (17). Figure 3 clearly shows that pairwise term is critical to obtaining higher savings in average waiting time across all buildings. The average reduction over all scenarios is about 10.9 %. Figure 4 considers the effect of including the bonus in Equation (17). The plot shows the reduction in average waiting times for the objective using unary and pairwise terms with the bonus from Equation (17) over the case where the bonus is not included. The average reduction over all scenarios is about 1.6 %. We now compare our scheduling algorithms against the ones in Elevate. Figure 5 plots the reduction in average waiting time over group collective control for different arrival rates and fixed elevators for three different buildings. For the case of 8-floors we obtain an average reduction of 8.6 %, 5.3 % for 10-floors and 3.9 % for 12-floors. Figure 6 plots the reduction in average waiting time over ETA for different arrival rates and fixed elevators for three Figure 5: We show the percentage decrease in the average waiting time of our submodular approach with respect to the group collective control. Figure 3: We show the percentage decrease in the average waiting time using pairwise terms. Figure 6: We show the percentage decrease in the average waiting time of our submodular approach with respect to ETA. different buildings. For the case of 8-floors we obtain an average reduction of 4.4 %, 3.9 % for 10-floors and 4.2 % for 12-floors. To illustrate the utility of higher-order terms, we use a small penalty for discouraging the assignment of 4 or 5 passengers to the same car and obtain further reduction in waiting time. For the case of 8-floors we obtain an average reduction of 4.6 % over ETA as shown in Figure 7. Discussion Figure 4: We show the percentage decrease in the average waiting time using coincident call bonus. We show a novel method for solving the group elevator scheduling problem by formulating it as the maximization of submodular functions under a matroid constraint. Our method consistently outperforms other industry-standard methods in a wide variety of elevator settings. In the future, we plan to investigate alternative methods that could directly maximize non-monotonous submodular functions (Feige, Mirrokni, and Vondrak 2007). This will allow us to derive improved guarantees on the optimality of the solution. The use of explicit objective function to model several design criteria also opens up the possibility of other integer programming methods for finding globally optimal Figure 7: We show the percentage decrease in the average waiting time using higher order submodular function with respect to ETA. solutions. References [Bao et al. 1994] Bao, G.; Cassandras, C. G.; Djaferis, T. E.; Gandhi, A. D.; and Looze, D. P. 1994. Elevator dispatchers for down-peak traffic. Technical report, University of Massachusetts, Department of Electrical and Computer Engineering, Amherst, Massachusetts. [Barney and dos Santos 1985] Barney, G., and dos Santos, S. 1985. Elevator traffic analysis, design and control. England: IEE, Peter Peregrinus Ltd. [Bittar 1982] Bittar, J. 1982. Relative system response elevator call assignments. US Patent. 4,363,381. [Boros and Hammer 2002] Boros, E., and Hammer, P. L. 2002. Pseudo-boolean optimization. Discrete Appl. Math. 123(1-3):155–225. [Cho, Gagov, and Kwon 1999] Cho, Y.; Gagov, Z.; and Kwon, W. 1999. Elevator group control with accurate estimation of hall call waiting times. In In Proceedings of the 1999 International Conference on Robotics and Automation, 447–452. [Crites and Barto 1996] Crites, R. H., and Barto, A. G. 1996. Improving elevator performance using reinforcement learning. In Advances in Neural Information Processing Systems, 1017–1023. [Dai et al. 2010] Dai, D.; Zhang, J.; Xie, W.; Yin, Z.; and Zhang, Y. 2010. Elevator groupcontrol policy with destination registration based on hybrid genetic algorithms. In International Conference on Computer Application and System Modeling. [Feige, Mirrokni, and Vondrak 2007] Feige, U.; Mirrokni, V. S.; and Vondrak, J. 2007. Maximizing non-monotone submodular functions. In Foundations of Computer Science (FOCS). [Guestrin, Krause, and Singh 2008] Guestrin, C.; Krause, A.; and Singh, A. P. 2008. Near-optimal sensor placements in gaussian processes: Theory, efficient algorithms and em- pirical studies. Journal of Machine Learning Research 235– 284. [Kempe, Kleinberg, and Tardos 2003] Kempe, D.; Kleinberg, J.; and Tardos, E. 2003. Maximizing the spread of influence through a social network. In KDD. [Koehler and Ottiger 2002] Koehler, J., and Ottiger, D. 2002. An ai-based approach to destination control in elevators. AI Magazine 23(3):59–79. [Koehler and Schuster 2000] Koehler, J., and Schuster, K. 2000. Elevator control as a planning problem. In AI Planning and Scheduling (AIPS). [Kolmogorov and Zabih 2004] Kolmogorov, V., and Zabih, R. 2004. What energy functions can be minimized via graph cuts? PAMI 26(2). [Leskovec et al. 2007] Leskovec, J.; Krause, A.; Guestrin, C.; Faloutsos, C.; VanBriesen, J.; and Glance, N. 2007. Cost-effective outbreak detection in networks. In The ACM SIGKDD Conference on Knowledge Discovery and Data Mining, 420–429. [Lin and Bilmes 2011] Lin, H., and Bilmes, J. 2011. Word alignment via submodular maximization over matroids. In The 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies - Short Papers, 170–175. [Liu et al. 2013] Liu, M. Y.; Tuzel, O.; Ramalingam, S.; and Chellappa, R. 2013. Entropy rate clustering: Cluster analysis via maximizing a submodular function subject to a matroid constraint. IEEE Transaction on Pattern Analysis and Machine Intelligence (TPAMI). [Markon, Kita, and Nishikawa 1994] Markon, S.; Kita, H.; and Nishikawa, Y. 1994. Adaptive optimal elevator group control by use of neural networks. Trans. Inst. Syst. Contr. Inform. Eng. 7:487–497. [Nemhauser, Wolsey, and Fisher 1978] Nemhauser, G. L.; Wolsey, L. A.; and Fisher, M. L. 1978. An analysis of the approximations for maximizing submodular set functions. Mathematical Programming 265–294. [Nikovski and Brand 2003] Nikovski, D., and Brand, M. 2003. Decision-theoretic group elevator scheduling. In International Conference on Automated Planning and Scheduling (ICAPS). [Oxley 1992] Oxley, J. 1992. Matroid Theory. Oxford University Press. [Pepyne and Cassandras 1997] Pepyne, D., and Cassandras, C. 1997. Optimal dispatching control for elevator systems during uppeak traffic. IEEE transactions on control systems technology 5(6):629–643. [Peters 1993] Peters, R. 1993. Ideal lift kinematics: Formulae for the equations of motion of a lift. Technical report, Internal Brunel University/Arup Research and Development paper. [Powell and Williams 1992] Powell, B. A., and Williams, J. N. 1992. Elevator dispatching based on remaining response time. US Patent 5,146,053. [Prasad, Jegelka, and Batra 2014] Prasad, A.; Jegelka, S.; and Batra, D. 2014. Submodular meets structured: Finding diverse subsets in exponentially-large structured item sets. In Neural Information Processing Systems (NIPS). [Ruokokoski, Ehtamo, and Pardalos 2015] Ruokokoski, M.; Ehtamo, H.; and Pardalos, P. M. 2015. Elevator dispatching problem: a mixed integer linear programming formulation and polyhedral results. Journal of Combinatorial Optimization 29(4). [Schofield, Stonham, and Mehta 1995] Schofield, A.; Stonham, T.; and Mehta, P. 1995. A machine vision system for counting people. In In New Methods and Technologies in Planning and Construction of Intelligent Buildings, ed. A. Lustig, 5059. Haifa, Israel: IB/IC Intelligent Building Congress. [Seckinger and Koehler 1999] Seckinger, B., and Koehler, J. 1999. Online synthesis of elevator controls as a planning problem. In Thirteenth Workshop on Planning and Configuration, Technical Report, Department of Computer Science, University of Wuerzburg. [Siikonen 1997] Siikonen, M. 1997. Elevator group control with artificial intelligence. Technical Report A67, Helsinki University of Technology, Systems Analysis Laboratory, Helsinki, Finland. [Strakosch 1998] Strakosch, G. R. 1998. Vertical transportation: elevators and escalators. New York, NY: John Wiley & Sons, Inc. [Ujihara and Amano 1994] Ujihara, H., and Amano, M. 1994. The latest elevator group-control system. Mitsubishi Electric Advance 67:10–12. [Ujihara and Tsuji 1988] Ujihara, H., and Tsuji, S. 1988. The revolutionary ai-2000 elevator group-control system and the new intelligent option series. Mitsubishi Electric Advance 45:58. [Xu and Feng 2016] Xu, J., and Feng, T. 2016. Single elevator scheduling problem with complete information: An exact model using mixed integer linear programming. In American control conference (ACC).
2cs.AI
arXiv:1309.1251v1 [cs.PL] 5 Sep 2013 Pattern Matching via Choice Existential Quantifications in Imperative Languages Keehang Kwon Dept. of Computer Engineering, DongA University 840 hadan saha, Busan, Korea [email protected] Abstract: Selection statements – if-then-else, switch and try-catch – are commonly used in modern imperative programming languages. We propose another selection statement called a choice existentially quantified statement. This statement turns out to be quite useful for pattern matching among several merits. Examples will be provided for this statement. keywords: selection, pattern matching, choice quantification, print. 1 Introduction Most imperative languages have selection statements to control execution flow. A selection statement allows the machine to choose between two or more statements during execution. Selection statements typically include ifthen-else and try-catch. Unfortunately, these statements are not sufficient for expressing nondeterministic tasks in a concise way. To ovecome these problems, inspired by the work in [2, 3], we propose a new kind of selection statements called choice existentially quantified statements (CEQ statements). This statement is quite simple and of the form choose(x)G where G is a statement. This has the following execution semantics: ex(P, choose(x)G) if ex(P, [t/x]G) 1 where the term (or the value) t is chosen by the machine and P is a set of procedure (and function) definitions. In the above definition, the machine chooses a successf ul term t and then proceeds with executing [t/x]G. We also introduce a variant of the above, choose(x ∈ S) G, which is called a bounded choice existentially quantified statement (BCEQ statement). Bounded quantifiers differ from unbounded quantifiers in that bounded quantifiers restrict the range of the variable x to the set S. Thus, bounded quantifiers make it easier for the machine to choose a successful term. It can be easily seen that our new statement subsumes the print statement. For example, let G be a statement and let E be an expression. Then G; print(E) can be converted to choose(x)(G; x == E) provided x does not appear free in G and the choice of x is visible to the user. In the above, note that a boolean condition is a legal statement in our language, as we shall see in Section 2. The CEQ statement makes it simple to represent complex, nondeterministic tasks. For example, the following statement represents the task of finding (and printing) an index x (between 1 and 50) such that the xth Fibonacci number is 5. choose(x ∈ {1..50})(5 == f ib(x)) In this case, the machine will find the value of 6 for x after some search. Another example is the following. This statement represents the task of finding and printing the values of the tenth Fibonacci number and the factorial of 20. choose(x) choose(y)(x == f ib(10); y == f act(20)) Note that the above program is compact and easy to read. This paper focuses on the core of Java. This is to present the idea in a concise way. The remainder of this paper is structured in the following way. We describe the core Java with the CEQ statements in Section 2. In Section 3, we present some example of Javachoo . Section 4 concludes the paper. 2 The Language The language is a subset of the core (untyped) Java with some extensions. It is described by G- and D-formulas given by the syntax rules below: 2 G ::= A | cond | x = E | G; G | choose(x)G | choose(x ∈ S)G D ::= A = G | ∀x D In the above, cond represents a boolean condition, S represents a set and E is an expression. A represents a head of an atomic procedure definition of the form p(x1 , . . . , xn ) where each xi is a variable. A D-formula is called a procedure (and function) definition. In the transition system below, G-formulas will act as the main program (or statements), and a set of D-formulas enhanced with the machine state (a set of variable-value bindings) will act as a program. We will present an execution semantics via a proof theory [1, 6, 5, 7]. The rules defines what it means to execute the main task G from a program P. These rules define precisely what is a success and failure. Below the notation D; P denotes {D} ∪ P but with the D formula being distinguished (marked for backchaining). Note that execution alternates between two phases: the main phase (the phase of executing the main program) and the backchaining phase (one with a distinguished clause). The notation S sand R denotes the following: execute S and execute R sequentially. It is considered a success if both executions succeed. Definition 1. Let G be a main task and let P be a program. Then the notion of executing hP, Gi successfully and producing a new program P ′ – ex(P, G, P ′ ) – is defined as follows: (1) ex((A = G1 ); P, A) if ex(P, G1 ) and ex(D; P, A). (2) ex(∀xD; P, A) if ex([s/x]D; P, A) where s is a value (or a term). % argument passing (3) ex(P, A) if D ∈ P and ex(D; P, A). % a procedure call (4) ex(P, cond, P) if eval(P, cond, cond′ ) and cond′ is true. % evaluating boolean condition cond to cond′ . (5) ex(P, x = E, P ⊎ {hx, E ′ i}) if eval(P, E, E ′ ). % the assignment statement. If evaluating E fails, then the whole statement fails. Here, ⊎ denotes a set union but hx, V i in P will be replaced by hx, E ′ i. (6) ex(P, G1 ; G2 , P2 ) if ex(P, G1 , P1 ) sand ex(P1 , G2 , P2 ). (7) ex(P, choose(x)G, P1 ) if ex(P, [t/x]G, P1 ) where t is a successful value for x chosen by the machine. 3 (8) ex(P, choose(x ∈ S)G, P1 ) if x ∈ S and ex(P, [t/x]G, P1 ) where t is a successful value for x chosen by the machine. If ex(P, G, P1 ) has no derivation, then the machine returns the failure. 3 Examples Pattern matching is a useful feature in modern programming languages. While there have been several attempts to add pattern matching to imperative paradigm [8], these attempts are rather complex and rely on refining the type system. The simplest approach to adding pattern matching, which requires no type systems, is to allow first-order terms as data. For example, tuple(tom, 31, male) would be a legimate data. In such a case, our choose statement is well-suited for pattern matching. For example, the following statement is a simple implementation of destructuring an employee’s record into three components. getrecord(emp) { choose(name)choose(age)choose(sex) (tuple(name, age, sex) == emp); It is not easy to write concise codes for this task in traditional languages. Fortunately, it is quite simple in our setting. 4 Conclusion In this paper, we have considered an extension to a core Java with a new selection statement. This extension allows choose(x)G where x is a variable and G is a statement. This statement makes it possible for the core Java to perform nondeterministic tasks. Our language gives, in a sense, a logical status to Java. This means that other logical connectives such as disjunctions can be added. Some progress has been made towards this direction [4]. 5 Acknowledgements This work was supported by Dong-A University Research Fund. 4 References [1] G. Kahn, “Natural Semantics”, In the 4th Annual Symposium on Theoretical Aspects of Computer Science, LNCS vol. 247, 1987. [2] G. Japaridze, “Introduction to computability logic”, Annals of Pure and Applied Logic, vol.123, pp.1–99, 2003. [3] G. Japaridze, “Sequential operators in computability logic”, Information and Computation, vol.206, No.12, pp.1443-1475, 2008. [4] K. Kwon, S. Hur and M. Park, “Improving Robustness via Disjunctive Statements in Imperative Programming”, IEICE Transations on Information and Systems, vol.E96-D,No.9, September, 2013. [5] J. Hodas and D. Miller, “Logic Programming in a Fragment of Intuitionistic Linear Logic”, Information and Computation, vol.110, No.2, pp.327-365, 1994. [6] D. Miller, G. Nadathur, F. Pfenning, and A. Scedrov, “Uniform proofs as a foundation for logic programming”, Annals of Pure and Applied Logic, vol.51, pp.125–157, 1991. [7] D. Miller, G. Nadathur, Programming with higher-order logic, Cambridge University Press, 2012. [8] S. Ryu, C. Park and G. Steel Jr. “Adding Pattern Matching to Existing Object-Oriented Languages”, FOOL ’10, Nevada, USA, 2010. 5
6cs.PL
arXiv:1711.05787v1 [cs.DB] 15 Nov 2017 WebRelate: Integrating Web Data with Spreadsheets using Examples JEEVANA PRIYA INALA, MIT, USA RISHABH SINGH, Microsoft Research, USA Data integration between web sources and relational data is a key challenge faced by data scientists and spreadsheet users. There are two main challenges in programmatically joining web data with relational data. First, most websites do not expose a direct interface to obtain tabular data, so the user needs to formulate a logic to get to different webpages for each input row in the relational table. Second, after reaching the desired webpage, the user needs to write complex scripts to extract the relevant data, which is often conditioned on the input data. Since many data scientists and end-users come from diverse backgrounds, writing such complex regular-expression based logical scripts to perform data integration tasks is unfortunately often beyond their programming expertise. We present WebRelate, a system that allows users to join semi-structured web data with relational data in spreadsheets using input-output examples. WebRelate decomposes the web data integration task into two sub-tasks of i) URL learning and ii) input-dependent web extraction. We introduce a novel synthesis paradigm called “Output-constrained Programming By Examples”, which allows us to use the finite set of possible outputs for the new inputs to efficiently constrain the search in the synthesis algorithm. We instantiate this paradigm for the two sub-tasks in WebRelate. The first sub-task generates the URLs for the webpages containing the desired data for all rows in the relational table. WebRelate achieves this by learning a string transformation program using a few example URLs. The second sub-task uses examples of desired data to be extracted from the corresponding webpages and learns a program to extract the data for the other rows. We design expressive domain-specific languages for URL generation and web data extraction, and present efficient synthesis algorithms for learning programs in these DSLs from few input-output examples. We evaluate WebRelate on 88 real-world web data integration tasks taken from online help forums and Excel product team, and show that WebRelate can learn the desired programs within few seconds using only 1 example for the majority of the tasks. CCS Concepts: • Software and its engineering → Programming by example; Additional Key Words and Phrases: Program Synthesis, Data Integration, Spreadsheets, Web Mining ACM Reference Format: Jeevana Priya Inala and Rishabh Singh. 2018. WebRelate: Integrating Web Data with Spreadsheets using Examples. Proc. ACM Program. Lang. 2, POPL, Article 2 (January 2018), 28 pages. https://doi.org/10.1145/3158090 1 INTRODUCTION Data integration is a key challenge faced by many data scientists and spreadsheet end-users. Despite several recent advances in techniques for making it easier for users to perform data analysis [Kandel et al. 2011], the inferences obtained from the analyses is only as good as the information diversity of the data. Therefore, more and more users are enriching their internal data Authors’ addresses: Jeevana Priya Inala, CSAIL, MIT, 32 Vassar Street, Cambridge, MA, 02139, USA, [email protected]; Rishabh Singh, Microsoft Research, Redmond, WA, USA, [email protected]. 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 the author(s) 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]. © 2018 Copyright held by the owner/author(s). Publication rights licensed to the Association for Computing Machinery. 2475-1421/2018/1-ART2 https://doi.org/10.1145/3158090 Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. 2 2:2 Jeevana Priya Inala and Rishabh Singh in spreadsheets with the rich data available on the web. However, the web data sources (websites) are typically semi-structured and in a format different from the original spreadsheet data format, and hence, performing such integration tasks requires writing complex regular-expression based data transformation and web scraping scripts. Unfortunately, a large fraction of end-users come from diverse backgrounds and writing such scripts is beyond their programming expertise [Gualtieri 2009]. Even for experienced programmers and data scientists, writing such data integration scripts can be difficult and time consuming. Example 1.1. To make the problem concrete, consider the integration task shown in Fig. 1. A user had a spreadsheet consisting of pairs of currencies and the dates of transaction (shown in Fig. 1(a)), and wanted to get the exchange rates from the web. Since there were thousands of rows in the spreadsheet, manually performing this task was prohibitively expensive for the user. 1 2 3 Cur 1 Cur 2 Date EUR USD AUD USD INR CAD 03, November, 16 01, November, 16 07, October, 16 (a) Exchange Rate (b) Fig. 1. (a) A spreadsheet containing pairs of currency symbols and dates of transaction. (b) The webpage for EUR to USD exchange rate for different dates. Previous works have explored two different strategies for automating such data integration tasks. In DataXFormer [Abedjan et al. 2015], a user provides a few end-to-end input-output examples (such as row1 → 1.1105 in the above example), and the system uses a fully automatic approach by searching through a huge database of web forms and web tables to find a transform that is consistent with the examples. However, many websites do not expose web forms and do not have the data in a single web table. On the other end are programming by demonstration (PBD) systems such as WebCombine [Chasins et al. 2015] and Vegemite [Lin et al. 2009] that rely on users to demonstrate how to navigate and retrieve the desired data for a few example rows. Although the PBD systems can handle a broader range of webpages compared to DataXFormer, they tend to put an additional burden on users to perform exact demonstrations to get to the webpage, which has been shown to be problematic for users [Lau 2009]. In this paper, we present an intermediate approach where a user provides a few examples of URLs of webpages that contain the data as well as examples of the desired data from these webpages, and the system automatically learns how to perform the integration task for the other rows in the spreadsheet. For instance, in the above task, the example URL for the first row is http://www.investing.com/currencies/eur-usd-historical-data and the corresponding webpage is shown in Fig. 1(b) where the user highlights the desired data. There are three main challenges for a system to learn a program to automate this integration task. First, the system needs to learn a program to generate the desired URLs for the other input rows. In the above example, the intended program for learning URLs needs to select the appropriate columns from the spreadsheet, perform casing transformations, and then concatenate them with appropriate Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. WebRelate: Integrating Web Data with Spreadsheets using Examples 2:3 URL synthesizer Spreadsheet MSFT AMZN URL examples String transformation (LVSA) URL synthesizer AAPL TWTR Desired data 57.90 756.90 107.90 … Input dependent Wrapper Induction Stringsynthesizer transformation URL (LVSA) Selected data nodes Output-constrained ranking http://.../msft http://.../amzn http://.../aapl …. List of URLs Output-constrained ranking Data synthesizer Fig. 2. An overview of the workflow of the WebRelate system. A user starts with providing a few examples for URL strings corresponding to the desired webpages of the first few spreadsheet rows. The URL synthesizer then learns a program consistent with the URL examples, which is executed to generate the desired URLs for the remaining spreadsheet rows. The user then opens the URLs for the first few spreadsheet rows in an adjoining pane (one at a time), and highlights the data items that need to be extracted from the webpage. The Data synthesizer then learns a data extraction program consistent with the examples to extract the desired data for the remaining spreadsheet rows. constant strings. Moreover, many URL generation programs require using string transformations on input data based on complex regular expressions. The second challenge is to learn an extraction logic to retrieve the relevant data, which depends on the underlying DOM structure of the webpage. Additionally, for many integration scenarios, the data that needs to be extracted from the web is conditioned on the data in the table. For instance, in the above example, the currency exchange rate from the web page should be extracted based on the Date column in the table. There are efficient systems in the literature for wrapper induction [Anton 2005; Dalvi et al. 2009; Kushmerick 1997; Muslea et al. 1998] that can learn robust and generalizable extraction programs from a few labeled examples, but, to the best of our knowledge, there is no previous work that can learn data extraction programs that are conditioned on the input. The third challenge is that the common data key to join the two sources (spreadsheet and web data) might be in different formats, which requires writing additional logic to transform the data before performing the join. For instance, in the example above, the format of the date in the web page “Nov 03, 2016” is different from the format in the spreadsheet “03, November, 16”. To address the above challenges, we present WebRelate, a system that uses input-output examples to learn a program to perform the web data integration task. The high-level overview of the system is shown in Fig. 2. It breaks down the integration task into two sub-tasks. The first sub-task uses the URL synthesizier module to learn a program to generate the URLs of the webpages that contain the desired data from few example URLs. The second sub-task uses the Data synthesizer module to learn a data extraction program to retrieve the relevant data from these URLs given a set of example data selections on the webpages. WebRelate is built on top a novel program synthesis paradigm of “Output-constrained Programming By Examples” (O-PBE). This formulation is only possible in PBE scenarios where it is possible to compute a finite set of possible outputs for new inputs (i.e. for inputs other than the inputs in Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. 2:4 Jeevana Priya Inala and Rishabh Singh the input-output examples provided by the user). Previous PBE systems such as FlashFill [Gulwani 2011; Gulwani et al. 2012] and its extensions do not have such a property as any output string is equally likely for the new inputs and there is no way to constrain the possible set of outputs. The O-PBE paradigm allows us to develop a new efficient synthesis algorithm that combines both the output uniqueness constraint (program should match only 1 output string that is provided by the user for the inputs in the examples) as well as the generalization constraint (output is within the set of possible outputs for the other inputs). We instantiate the O-PBE paradigm for the two sub-tasks in WebRelate: i) URL generation, and ii) input-dependent web extraction. For URL learning problems, the constraint is that the output should be a valid URL or the output should be from the list of possible URLs obtained using the search engine for that particular input. For data extraction problems, the constraint is that the output program for every input should result in a non-empty node in the corresponding HTML document. We design an expressive domain-specific language (DSL) for the URL generation programs. The DSL is built on top of regular expression based substring operations introduced in FlashFill [Gulwani 2011]. We then present a synthesis algorithm based on layered version space algebra (LVSA) to efficiently learn URL programs in the DSL from few input-output examples. We also show that this algorithm is significantly better than existing VSA based techniques. Learning URLs as a string transformation program raises an additional challenge since some URLs may contain additional strings such as unique identifiers that are not in the spreadsheet table and are not constants (Ex 2.2 illustrates this challenge). The O-PBE framework allows us to handle such scenarios by having filter programs in the language for URLs. These filter programs produce regular expressions for URLs as opposed to concrete strings. Then, WebRelate leverages a search engine to get a list of relevant URLs for every input and selects the one that matches the regular expression. Similar to URL learning, WebRelate uses examples to learn data extraction programs. A user can select a URL to be loaded in a neighboring frame, and then highlight the desired data element to be extracted. WebRelate records the DOM locations of all such example data and learns a program to perform the desired extraction task for the other rows in the table. We present a new technique for input-dependent wrapper induction that involves designing an expressive DSL built on top of XPath constructs and regular expression based substring operations. We, then, present a synthesis algorithm that uses predicates graphs to succinctly represent a large number of DSL expressions that are consistent with a given set of I/O examples. For the currency exchange example, our system learns a program that first transforms the date to the required format and then, extracts the conversion rate element whose left sibling contains the transformed date value from the webpage. This paper makes the following key contributions: • We present WebRelate, a system to join web data with relational data, which divides the data integration task into URL learning and web data extraction tasks. • We present a novel program synthesis paradigm called “Output-constrained Programming By Examples” that allows for incorporating output uniqueness and generalization constraints for an efficient synthesis algorithm (§ 3). We instantiate this paradigm for the two sub-tasks of URL learning and data extraction. • We design a DSL for URL generation using string transformations and an algorithm based on layered version space algebra to learn URLs from a few examples (§ 4). • We design a DSL on top of XPath constructs that allows input-dependent data extractions. We present a synthesis algorithm based on a predicates graph data structure to learn extraction programs from examples (§ 5). Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. WebRelate: Integrating Web Data with Spreadsheets using Examples 2:5 • We evaluate WebRelate on 88 real-world data integration tasks. It takes on average less than 1.2 examples and 0.15 seconds each to learn the URLs, whereas it takes less than 5 seconds and 1 example to learn data extraction programs for 93% of tasks (§ 6). 2 MOTIVATING EXAMPLES In this section, we present a few additional motivating scenarios for web data integration tasks of varying complexity and illustrate how WebRelate can be used to automate these tasks using few input-output examples. Example 2.1. [Stock prices] A user wanted to retrieve the stock prices for hundreds of companies (Company column) as shown in Fig. 3. Company 1 2 3 4 5 6 MSFT AMZN AAPL TWTR T S URL Stock price https://finance.yahoo.com/q?s=msft https://finance.yahoo.com/q?s=amzn https://finance.yahoo.com/q?s=aapl https://finance.yahoo.com/q?s=twtr https://finance.yahoo.com/q?s=t https://finance.yahoo.com/q?s=s 59.87 775.88 113.69 17.66 36.51 6.31 (a) (b) Fig. 3. Joining stock prices from web with company symbols using WebRelate. Given one example URL and data extraction from the webpage for the first row, the system learns a program to automatically generate the corresponding URLs and extracted stock prices for the other rows (shown in bold). In order to perform this integration task in WebRelate, a user can provide an example URL such as https://finance.yahoo.com/q?s=msft that has the desired stock price for the first row in the spreadsheet (Fig. 3(a)). This web-page then gets loaded and is displayed to the user. The user can then highlight the required data from the web-page (Fig. 3(b)). WebRelate learns the desired program to perform this task in two steps. First, it learns a program to generate the URLs for remaining rows by learning a string transformation program that combines the constant string “https://finance.yahoo.com/q?s=” with the company symbol in the input. Second, it learns a web data extraction program to extract the desired data from these web-pages. Example 2.2. [Weather]. A user had a list of addresses in a spreadsheet and wanted to get the weather information at each location as shown in Fig. 4. The provided example URL is https: //weather.com/weather/today/l/Seattle+WA+98109:4:US#!. There are two challenges in learning the URL program for this example. First, the addresses contain more information than just the city and state names such as street names and house numbers. Therefore, the URL program first needs to learn regular expressions to extract the cityname and state from the address and then concatenate them appropriately with constant strings to get the desired URL. The second challenge is that the URL contains zip code that is not present in the input, meaning that there is no simple program that concatenates constants and sub-strings to learn the URLs for the remaining inputs. For supporting such cases, the DSL for URL learning also supports filter programs that use regular expressions to denote unknown parts of the URL. A possible filter program for this example is https://weather.com/weather/today/l/{Extracted city name}+{Extracted state name}+{AnyStr}:4:US#!, where AnyStr can match any non-empty string. Then, for every other row in the table, WebRelate leverages a search engine to get a Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. 2:6 1 2 3 Jeevana Priya Inala and Rishabh Singh Address Weather 742 17th Street NE,Seattle,WA 732 Memorial Drive,Cambridge,MA Apt 12, 112 NE Main St.,Boston,MA 59 43 42 (a) (b) Fig. 4. Joining weather data from web with addresses. Given one example row, the system automatically extracts the weather for other row entries (shown in bold). list of possible URLs for that row and selects the top URL that matches the filter program. By default, we use the words in input row as the search query term and set the target URL domain to be the domain of the given example URLs. WebRelate also allows users to provide search query terms (such as “Seattle weather”) as additional search query examples and it learns the remaining search queries for other inputs using a string transformation program. Using the search query and a filter program, WebRelate learns the following URL for the second row: https: //weather.com/weather/today/l/Cambridge+MA+02139:4:US#!. Example 2.3. [Citations] A user had a table containing author names and titles of research papers, and wanted to extract the number of citations for each article using Google Scholar (as shown in Fig. 5). In this case, the example URL for Samuel Madden’s Google Scholar page is https://scholar.google. com/scholar?q=samuel+madden and the corresponding web page is shown in Fig. 5(b). The URL can be learned as a string transformation program over the Author column. The more challenging part of this integration task is that the data in the web page is in a semi-structured format and the required data (# citations) should be extracted based on the Article column in the input. Our data extraction DSL is expressive enough to learn a program that captures this complex dependency. This program generates the entire string “Cited by 2316” and WebRelate learns another transformation program on top of this to extract only the number of citations “2316” from the results. 1 2 3 Author Samuel Madden HV Jagadish Mike Stonebraker Article TinyDB: an acquisitional ... Structural joins: A primitive ... C-store: a column-oriented ... (a) # citations 2316 1157 1119 (b) Fig. 5. (a) Integrating a spreadsheet containing authors and article titles with the number of citations obtained from Google Scholar. (b) The google scholar page for the first example. Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. WebRelate: Integrating Web Data with Spreadsheets using Examples 3 2:7 OUTPUT-CONSTRAINED PROGRAMMING BY EXAMPLE We first define the abstract Output-constrained Programming By Example (O-PBE) problem, which we then instantiate for both the URL synthesizer and the data extraction synthesizer. Let E = {(i 1 , o 1 ), · · · , (im , om )} denote the list of m input-output examples provided by the user and U = {im+1 , · · · , im+n } denote the list of n inputs with unknown outputs. We use L to denote the DSL that describes the space of possible programs. The traditional PBE problem is to find a program P in the DSL that satisfies the given input-output examples i.e. ∃ P ∈ L. ∀ k ≤ m. P(i k ) = ok On the other hand, the O-PBE problem formulation takes advantage of the existence of an oracle O that can generate a finite list of possible outputs for any given input. For instance, in the URL learning scenario, this oracle is a search engine that lists the top URLs obtained for a search query term based on the input. For the data extraction learning scenario, this oracle is the web document corresponding to each input where any node in the web document is a candidate output. The existence of this oracle can benefit the PBE problem in two ways. First, we can solve problems with noisy input-output examples where there is no single program in the language that can generate all the desired outputs for the inputs in the examples. For instance, the URL learning task in Ex 2.2 is a synthesis problem with noisy input-output examples that traditional PBE approaches cannot solve. However, the presence of oracles can solve this problem because it is now sufficient to just learn a program that, given an input and list of possible outputs, can discriminate the desired output from the other possible outputs. This property is called the output-uniqueness constraint. The second benefit of oracles is that they impose additional constraints on the learned program. In addition to satisfying the input-output examples, we want the learned program to produce valid outputs for the other inputs. We refer to this as the generalization constraint. Using this constraint, the O-PBE approach can efficiently learn the desired program using very few input-output examples. Thus, we can now define the O-PBE problem formally as follows: ∃ P ∈ L. ∀ k ≤ m. P(i k , O(i k )) = ok ∧ ∀ k ≤ n. P(im+k , O(im+k )) ∈ O(im+k ) (output-uniqueness constraint) (generalization constraint) where program P is now a more expressive higher-order expression in the language L that takes as input a list of possible outputs O(i) (in addition to the input i) and returns one output among them i.e. P(i, O(i)) = o s.t . o ∈ O(i). At a high level, to solve this synthesis problem, WebRelate first learns the set of all programs in the language L that satisfies the given input-output examples E (not necessarily uniquely). This set is represented succinctly using special data structures. Then, WebRelate uses an output-constrained ranking scheme to eliminate programs that do not uniquely satisfy the given examples E or are inconsistent with the unseen inputs U . We now describe the two instantiations of the abstract O-PBE problem for the URL and data extraction synthesizers in more detail. 4 URL LEARNING We first present the domain-specific language for the URL generation programs and then present a synthesis algorithm based on layered version space algebra to efficiently learn programs from few input-output examples. 4.1 URL Generation Language Lu Syntax. The syntax of the DSL for URL generation Lu is shown in Fig. 6. The DSL is built on top of regular expression based substring constructs introduced in FlashFill [Gulwani 2011; Gulwani Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. 2:8 Jeevana Priya Inala and Rishabh Singh URL String u := Predicate ϕ := Atomic expr f := Regex expr r := Base expr b := ConstStr(s) | SubStr(k, pl , pr , c) | Replace(k, pl , pr , c, s 1 , s 2 ) Filter(ϕ) Concat(f 1 , · · · , fn ) r |b AnyStr Position p := (τ , k, Dir) | ConstPos(k) Direction Dir := Start | End Token τ := s |T Regex Token T := CAPS | ProperCase | lowercase | Digits | Alphabets | AlphaNum Case c := lower | upper | prop | iden Fig. 6. The syntax of the DSL Lu for regular expression based URL learning. Here, s is a string, and k is an integer. et al. 2012] with the key differences highlighted. The top-level URL program is a filter expression Filter(ϕ) that takes as argument a predicate ϕ, where ϕ is denoted using a concatenation of base atomic expressions or AnyStr expressions. The base atomic expression b can either be constant string, a regular expression based substring expression that takes an index, two position expressions and a case expression, or a replace expression that takes two string arguments in addition to the arguments of substring expression. A position expression can either be a constant position index k or a regular expression based position (τ , k, Dir) that denotes the Start or End of k th match of token τ in the input string. Semantics. The semantics of the DSL for Lu is shown in Fig. 7. We use the notation JxKi to represent the semantics of x when evaluated on an input i (a list of strings from the table row). The semantics of a filter expression Filter(ϕ) is to use a URL list generator oracle Ou to obtain a ranked list of URLs for the input i, and select the first URL that matches the regular expression generated by the evaluation of the predicate ϕ. The default implementation for Ou runs a search engine on the words derived from the input i (with the domain name of URL examples) and returns the URLs of the top results. However, a user can also provide a few search query examples, which WebRelate uses to learn another string transformation program to query the search engine for the remaining rows. The semantics of a predicate expression ϕ is to first evaluate each individual atomic expression in the arguments and then return the concatenation of resulting atomic strings. The semantics of AnyStr expression is Σ+ that can match any non-empty string. The semantics of a substring expression is to first evaluate the position expressions to obtain left and right indices and then return the corresponding substring for the kth string in i. The semantics of a replace expression Replace(k, pl , pr , c, s 1 , s 2 ) is to first get the substring corresponding to the position expressions and then replace all occurrences of string s 1 with the string s 2 in the substring. We allow strings s 1 and s 2 to take values from a finite set of delimiter strings such as “ ”, “-”, “_”, and “#”. Examples. A program in Lu to perform the URL learning task in Ex 1.1 is: Filter(Concat( ConstStr(“http://www.investing.com/currencies/”), Substr(0, ConstPos(0), ConstPos(-1), lower), ConstStr(“-”), Substr(1, ConstPos(0), ConstPos(-1), lower), ConstStr(“-historical-data”))). The program concatenates a constant string, the lowercase transformation of the first input string (−1 index in ConstPos denotes the last string index), the constant hyphen , the lowercase transformation of the second input string, and finally, another constant string. Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. WebRelate: Integrating Web Data with Spreadsheets using Examples JFilter(ϕ)Ki JConcat(f 1 , · · · , fn )Ki JAnyStrKi JConstStr(s)Ki JSubStr(k, pl , pr , c)Ki = = = u s.t. u ∈ Ou (i) and JϕKi |= u Concat(Jf 1 Ki , · · · , Jfn Ki ) Σ+ = s = ToCase(i k [Jpl Ki ..Jpr Ki ], c) JReplace(k, pl , pr , c, s 1 , s 2 )Ki = = ToCase(i k [Jpl Ki ..Jpr Ki ], c)[s 1 ← s 2 ] k > 0? k : len(s) + k J(τ , k, Start)Ki = Start of k th match of τ in i = End of k th match of τ in i JConstPos(k)Ki J(τ , k, End)Ki 2:9 Fig. 7. The semantics of the DSL Lu . Ou is a URL list oracle that generates a ranked list of URLs for the input i by using a search engine. A DSL program for the URL learning task in Ex 2.2 is: Filter(ϕ), where ϕ ≡ Concat(b1 , b2 , ConstStr(“+”), b3 ,ConstStr(“+”), AnyStr, ConstStr(“:4:US#!”)), b1 ≡ ConstStr(“https://weather.com /weather/today/l/”), b2 ≡SubStr(0, (“,”,-2,End),(“,”,-1,Start),iden), and b3 ≡ SubStr(0, (“,”,-1,End), ConstPos(-1),iden). Here, b2 and b3 are regular expression based substring expressions to derive the city and the state strings from the input address. 4.2 Synthesis Algorithm We now present the synthesis algorithm to learn a URL program that solves the O-PBE problem. 4.2.1 Background: Version Space Algebra. This section presents a brief background on version space algebra (VSA), a technique used by existing string transformation synthesizers such as FlashFill. We refer the readers to [Gulwani et al. 2012] for a detailed description. The key idea of VSA is to use a directed acyclic graph (DAG) to succinctly represent an exponential number of candidate programs using polynomial space. For the string transformation scenario, a DAG D is defined as a tuple (V, νs , νt , E, W) where V is the set of vertices, E is the set of edges, νs is the starting vertex and νt is the target vertex. Each edge in the DAG represents a set of atomic expressions (the map W captures this relation) whereas a path in the DAG represents the concatenation of the atomic expressions of the edges. Given a synthesis problem, a DAG is constructed in such a way that any path in the DAG from νs to νt is a valid program in L that satisfies the examples. This is achieved by iteratively constructing a DAG for each example and performing an automata-like-intersection on these individual DAGs to get the final DAG. For example, a sample DAG is shown in Fig. 8. The nodes in this DAG (for each I/O example) correspond to the indices of the output string. An edge from a node i to a node j in the DAG represents the set of expressions that can generate the substring between the indices i and j of the output example string when executed on the input data. 4.2.2 Layered Version Space Algebra. It is challenging to use VSA techniques for learning URLs because the URL strings are long, and the run time and the DAG size of the existing algorithms explode with the length of the output. To overcome this issue, we introduce a synthesis algorithm based on a layered version space algebra for efficiently searching the space of consistent programs. The key idea is to perform search over increasingly expressive sub-languages L 1 ⊆ L 2 · · · ⊆ Lk , where Lk corresponds to the complete language Lu . The sub-languages are selected such that the earlier languages capture the portion of the search space that is highly probable and at the same Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. 2:10 Jeevana Priya Inala and Rishabh Singh Fig. 8. An example DAG using Version space algebra (VSA) to represent the set of transformations consistent with the example. For example, here, W0,3 is a list of three different expressions {ConstStr(eur), SubStr(0, ConstPos(0), ConstPos(−1), lower), AnyStr}; W19,20 = {ConstStr(d), SubStr(1, ConstPos(2), ConstPos(3), lower), AnyStr}. time, it is easier to search for a program in these sub-languages. For example, it is less likely to concatenate a constant with a sub-string within a word in the URL and hence, earlier sub-languages are designed to eliminate such programs. For instance, consider the URL in Ex 1.1. In this case, given the first I/O example, programs that derive the character d in data from the last character in the input (USD) are not desirable because they do not generalize to other inputs. The general synthesis algorithm GenProg for learning URL string transformations in a sublanguage Li is shown in Fig. 9. This algorithm is similar to the VSA based algorithm, but the key difference is that instead of learning all candidate programs (which can be expensive), the algorithm only learns the programs that are in the sub-language Li . The GenProg algorithm takes as input the I/O examples {i k , ok }k , and three Boolean functions λs , λc , λa that parameterize the search space for the language Li . The output is a program that is consistent with the examples or ⊥ if no such program exists. The algorithm first uses the GenDag procedure to learn a DAG consisting of all consistent programs (in the given sub-language) for the first example. It then iterates over the other examples and intersects the corresponding DAGs to compute a DAG representing programs consistent with all the examples. Finally, it searches for the best program in the DAG that satisfies the O-PBE constraints and returns it. The GenDag algorithm is also shown in Fig. 9, where the space of programs is constrained by the parameter Boolean functions λs , λc , and λa . Each function λ : int → int → string → bool takes two integer indices and a string as input and returns a Boolean value denoting whether certain atomic expressions are allowed to be added to the DAG. The algorithm first creates len(o) + 1 nodes, and then adds an edge between each pair of nodes ⟨k, l⟩ such that 0 ≤ k < l ≤ len(o). For each edge ⟨k, l⟩, the algorithm learns all atomic expressions that can generate the substring o[k..l]. For learning SubStr and Replace expressions, the algorithm enumerates different argument parameters for positions, cases, and delimiter strings, whereas the ConstStr and AnyStr expressions are always available to be added. The addition of SubStr and Replace atomic expressions to the DAG are guarded by the Boolean function λs whereas the addition of ConstStr and AnyStr atomic expressions are guarded by the Boolean functions λc and λa , respectively. Fig. 10 shows how the different layers are instantiated for learning URL expressions. For the first layer, the algorithm only searches for URL expressions where each word in the output is either generated by a substring or a constant or an AnyStr. The onlyWords (oW) function is defined as: oW = (i, j, o) => ¬isAlpha(o[i − 1]) ∧ ¬isAlpha(o[j + 1]) ∧ ∀ k : i ≤ k ≤ j isAlpha(o[k]) where isAlpha(c) is true if the character c is an alphabet. The second layer allows for multiple words in the output string to be learned as a single substring. The function multipleWords (mW) is Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. WebRelate: Integrating Web Data with Spreadsheets using Examples GenProg({(i k , ok )}k , λs , λc , λa ) Dag d = GenDag(i 1 ,o 1 ,λs ,λc ,λa ) for k from 2 to m: if d = ⊥: return ⊥ Dag d’ = GenDag(i k ,ok ,λs ,λc ,λa ) d = d.Intersect(d’) return SearchBestProg(d) 2:11 GenDag(i, o, λs , λc , λa ) V = {0, ..., len(o)}, νs = {0}, νt = {len(o)} E = {⟨k, l⟩ : 0 ≤ k < l ≤ len(o)} W = maps each edge to set of atomic exprs foreach 0 ≤ k < l ≤ len(o): w = ∅ if λs (k, l, o): w.add(GenSubstr(k, l, i, o)) if λs (k, l, o): w.add(GenReplace(k, l, i, o)) if λc (k, l, o): w.add(ConstStr(o[k..l])) if λa (k, l, o): w.add(AnyStr) W.add(⟨k, l⟩, w) return Dag(V, νs , νt , E, W) Fig. 9. Synthesis algorithm for URL generation programs, parameterized by λs , λc , and λa . LearnURL({(i k , ok )}k ) if(p := GenProg({(i k , ok )}k , oW, oW, oW) , ⊥: return p // Layer 1 if(p := GenProg({(i k , ok )}k , mW, oW, oW) , ⊥: return p // Layer 2 if(p := GenProg({(i k , ok )}k , iW ∨ mW, oW, oW) , ⊥: return p // Layer 3 return GenProg({(i k , ok )}k , T, T, T) // Layer 4 Fig. 10. Layered version spaces for learning a program in Lu . Fig. 11. DAG for Ex 1.1 constructed using layer 1 where S: SubStr, C: ConstStr, R: Replace, and A: AnyStr. defined as: mW = (i, j, o) => ¬isAlpha(o[i − 1]) ∧ ¬isAlpha(o[j + 1]) The third layer, in addition, allows for words in the output string to be a concatenation of multiple substrings, but not a concatenation of substrings with constant strings (or AnyStr). The function insideWords (iW) is defined as: iW = (i, j, o) => ∀ k : i ≤ k ≤ j isAlpha(o[k]) The final layer allows arbitrary compositions of constants, AnyStr and substring expressions by setting the functions λs , λc and λa to always return True (T). Example 4.1. Consider the currency exchange example where the example URL for the input {EUR, USD, 03, November 16} is “http://www.investing.com/currencies/eur-usd-historical-data”. The first layer of the search will create a DAG as shown in Fig. 11. We can observe that the DAG eliminates most of the unnecessary programs such as those that consider the d in data to come from the D in USD and the DAG is much smaller (and sparser) compared to the DAG in Fig. 8. Example 4.2. For the same example, assume that we want to get the currency exchange values from http://finance.yahoo.com/q?s=EURUSD=X. For this example, layers 1 and 2 can only learn the string EURUSD as a ConstStr which will not work for the other inputs, or a AnyStr which is Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. 2:12 Jeevana Priya Inala and Rishabh Singh Fig. 12. (a) and (b) shows a portion of the DAGs for Ex 4.3 using layer 1 of hierarchical search. (c) shows additional edges from layer 2 of the hierarchical search. too general. So, the layered search moves to layer 3 which allows SubStr inside words. Now, the system can learn EUR and USD separately as two SubStr expressions and concatenate them. Example 4.3. Consider another example where we want to learn the URL https://en.wikipedia. org/wiki/United_States from the input United States and the URL https://en.wikipedia.org/ wiki/India from the input India. Fig. 12(a) and (b) show portions of the DAGs for these two examples when using the first layer1 . Here, there is no common program that can learn both these examples together. In such situations, the layered search will move to the second layer. Fig. 12(c) shows the extra edges added in layer 2. Now, these examples can be learned together as Filter(Concat(ConstStr(“https”),· · · ,ConstStr(“/”), Replace(0, ConstPos(0),ConstPos(-1), iden, “ ”, “_”))). 4.2.3 Output-constrained Ranking. The LearnURL algorithm learns multiple programs that match the example URLs. However, not all of these programs are desirable for two reasons. First, some filter programs are too general and hence, fail the output-uniqueness constraint. For instance, AnyStr is one of the possible predicates that will be learned by the algorithm, but in addition to matching the desired example URLs, this predicate will also match any URL in the search results. Hence, we need to carefully select a consistent program from the DAG. Second, not all programs are equally desirable as they may not generalize well to the unseen inputs. For instance, consider Ex 2.2. If we have an example URL such as https://weather.com/weather/today/l/Seattle+WA+98109:4:US#!, then the programs that make the zip code 98109 to be a constant instead of AnyStr are not desirable. On the other hand, we want strings such as today and weather to be constants. We overcome both of these issues by devising an output-constrained ranking scheme. Fig. 13 shows our approach where we search for a consistent program in tandem with finding the best program. The algorithm takes as input a DAG d, a list of examples E, and a list of unseen inputs U , and the outcome is the best program in the DAG that is consistent with the given examples (if such a program exists). The algorithm is a modification to Dijkstra’s shortest path algorithm. The algorithm maintains a ranked list of at-most κ prefix programs for each node ν in the DAG where a prefix program is a path in the DAG from the start node to ν and the rank of a prefix program is the sum of ranks of all atomic expressions in the path. The atomic expressions are ranked as SubStr = Replace > ConstStr > AnyStr. Initially, the set of prefix programs for every node is ∅. The algorithm then traverses the DAG in reverse topological order and for each outgoing edge, it iterates through pairs of prefixes and atomic expressions based on their ranks. For each pair, the algorithm checks if the partial path satisfies the output-uniqueness constraint (Line 8) and the generalization constraint (Line 9). Whenever a consistent pair is found, the concatenation of the atomic expression with the prefix is added to the list of prefixes for the other node in the edge. 1 We omit the DAGs for the first part of the URLs as they are similar to the previous example. Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. WebRelate: Integrating Web Data with Spreadsheets using Examples 1 2 3 4 5 6 7 8 9 10 11 12 13 2:13 SearchBestProg(d, E, U ) foreach ν ∈ V(d): ν .prefixes = ∅, foreach ν ∈ V(d) in reverse topological order: foreach e: ⟨ν, ν ′ ⟩ ∈ E(d): foreach ϕ sofar in ν .prefixes.RankedIterator: foreach f in W(e).RankedIterator: if Consistent(ϕ sofar + f , ν ′ , E): if Generalizes(ϕ sofar + f , ν ′ , U ): ν ′ .prefixes.add(ϕ sofar + f , ϕ sofar .score + f .score) if f , AnyStr: Goto Line 12 if AnyStr < ϕ sofar : Goto Line 5 return d.νt .prefixes[0] Fig. 13. Algorithm to find the best consistent program from the DAG learned by LearnURL. Finally, the algorithm returns the highest ranked prefix for the target node of the DAG. In the limit κ → ∞, the above algorithm will always find a consistent program if it exists. However, in practice, we found that a smaller value of κ is sufficient because of the two pruning steps at Line 11 and Line 12 and because of the ranking that gives least preference to AnyStr among the other atomic expressions. Theorem 4.4 (Soundness of GenProg). The GenProg algorithm is sound for all λs , λc and λa i.e. given a few input-output examples {(i k , ok )}k , the learned program P will always satisfy ∀k. JPKi k = ok . Proof sketch: This holds because the GenDag algorithm only learns programs that are consistent for each input and Intersect preserves this consistency across multiple inputs. For learned programs that contain AnyStr expressions, the SearchBestProg algorithm ensures soundness because it only adds an atomic expression to a prefix if the combination is consistent with respect to the given examples. Theorem 4.5 (Completeness of GenProg). The GenProg algorithm is complete when λs = True, λc = True, λa = True, and in the limit κ → ∞ where at-most κ prefixes are stored for each node in the SearchBestProg algorithm. In other words, if there exists a program in Lu that is consistent with the given set of input-output examples, then the algorithm will produce one. Proof sketch: This is because when λs , λc , and λa are True, GenDag will learn all atomic expressions for every edge that satisfy the examples. Since, the DAG structure allows all possible concatenations of atomic expressions, the GenDag algorithm is complete in this case. Intersect also preserves completeness, and in the limit κ → ∞, the SearchBestProg will try all possible paths in the DAG to find a consistent program. Thus, GenProg does not drop any consistent program and hence, complete. Theorem 4.6 (Soundness of LearnUrl). The LearnUrl algorithm is sound. Proof sketch: This is because every layer in the layered search is sound using Theorem 4.4. Theorem 4.7 (Completeness of LearnUrl). The LearnUrl algorithm is complete in the limit κ → ∞ where at-most κ prefixes are stored for each node in the SearchBestProg algorithm. Proof sketch: This follows because the last layer in the layered search is complete using Theorem 4.5. Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. 2:14 Jeevana Priya Inala and Rishabh Singh Prog P := Pred π := NodePred πn := AttrPred πa := (name, {π1 , · · · , πr }) πn | π path π a | πc [attr(name) == ϕ ] CountPred πc := [count(axis) == k] PathPred πpath := [p] nc | ns | na /ns | p/nc Path p := Node n := (name, axis, πpos , {πn1 , · · · , πnr }) PosPred π pos := [pos (== | ≤) k] | ⊥ Axis axis := Child | Ancestor | Left | Right String ϕ := Same as ϕ in Fig. 6 Fig. 14. The syntax for the extraction language Lw , where name is a string, k is an integer, and ⊥ is an empty predicate. 5 DATA EXTRACTION LEARNING Once we have a list of URLs, we now need to synthesize a program to extract the relevant data from these web pages. This data extraction is usually done using a query language such as XPath [Berglund et al. 2003] that uses path expressions to select an HTML node (or a list of HTML nodes) from an HTML document. Previous systems such as DataXFormer [Abedjan et al. 2015; Morcos et al. 2015] have considered the absolute XPath obtained from the examples to do the extraction on other unseen inputs. An absolute XPath assumes that all the elements from the root of the HTML document to the target node have that same structure. This assumption is not always valid as web-pages are very dynamic. For instance, consider the weather data extraction from Ex 2.2. The web pages sometimes have an alert message to indicate events such as storms, and an absolute XPath will fail to extract the weather information from these web pages. More importantly, an absolute XPath will not work for input-dependent data extractions as shown in Ex 1.1. Learning an XPath program from a set of examples is called wrapper induction, and there exist many techniques [Anton 2005; Dalvi et al. 2009; Kushmerick 1997; Muslea et al. 1998] that solve this problem. However, none of the previous approaches applied wrapper induction in the context of data-integration tasks that requires generating input-dependent XPath programs. We present a DSL that extends the XPath language with input-dependent constructs. Then, we present an O-PBE based synthesis algorithm that can learn robust and generalizable extraction programs using very few examples. Our synthesis algorithm uses a VSA based technique that allows us to seamlessly integrate with complex string transformation learning algorithms from § 4 that are necessary for learning input-dependent extractions. Note that it is not always possible to achieve input-dependent data extraction by using a twophase approach, which first extracts all relevant data from the web-page into a structured format and then, extracts the input-dependent components from this structured data. This is because the data-dependence between the input and the webpage is sometimes hidden, e.g. a stock div element might have id “msft-price”, which is not directly visible to the users. In these scenarios, it is not possible for the users to identify and provide examples regarding what data should be extracted into the structured format in the intermediate step before the second step of data extraction. Hence, a more integrated approach is required for learning input-dependent extractions. Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. WebRelate: Integrating Web Data with Spreadsheets using Examples Filter(λγ .γ .name == name and ∧rk =1 Jπk Ki (γ ), AllNodes(w)) γ .Attr(name) == JϕKi J(name, {π1 , · · · , πr })Ki (w) J[attr(name) == ϕ]Ki (γ ) = J[p]Ki (γ ) = Len(JpKi ({γ })) > 0 = JnKi ({γk }k ) = JnKi (JpKi ({γk }k )) J[count(axis) == k]Ki (γ ) Jp/nKi ({γk }k ) JϕKi Checki (n, γ ) = = 2:15 Len(Neighbors(γ , axis)) == k Filter(λγ .Checki (n, γ ), Flatten(Map(λγ .Neighbors(γ , n.axis, n.πpos )), {γk }k ))) = Same as in Fig. 7 ≡ γ .name == n.name and ∧k Jn.πnk Ki (γ ) Fig. 15. The semantics of Lw , where AllNodes, Len and Neighbors are macros with expected semantics. 5.1 Data Extraction Language Lw Syntax. Fig. 14 shows the syntax of Lw . At the top-level, a program is a tuple containing a name and a list of predicates, where name denotes the HTML tag and predicates denote the constraints that the desired “target” nodes should satisfy. There are two kinds of predicates—NodePred and PathPred. A NodePred can either be an AttrPred or a CountPred. An AttrPred has a name and a value. We treat the text inside a node as yet another attribute. The attribute values are not just strings but are string expressions from the DSL Lu in Fig. 6, which allow the attributes to be computed using string transformations on the input data. This is one of the key differences between the XPath language and Lw . A CountPred indicates the number of neighbors of a node along a particular direction. Predicates can also be PathPreds denoting existence of a particular path in the HTML document starting from the current node. A path is a sequence of nodes where each node has a name, an axis, a PosPred, and a list of NodePreds (possibly empty). The name denotes the HTML tag, axis is the direction of this node from the previous node in the path, and PosPred denotes the distance between the node and the previous node along the axis. A PosPred can also be empty (⊥) meaning that the node can be at any distance along the axis. In Lw , we only consider paths that have at-most one node along the Ancestor axis (na ) and at-most one sibling node along the Left or the Right axis (ns ). Moreover, the ancestor and sibling nodes can only occur at the beginning of the path. Semantics. Fig. 15 shows the semantics of Lw . A program P is evaluated under a given input data i, on an HTML webpage w, and it produces a list of HTML nodes that have the same name and satisfy all the predicates in P. In this formulation, we use γ to represent an HTML node, and it is not to be confused with the node n in the DSL. A predicate is evaluated on an HTML node and results in a Boolean value. Evaluating an AttrPred checks whether the value of the attribute in the HTML node matches the evaluation of the string expression under the given input i. A CountPred verifies that the number of children of the HTML node along the axis (obtained using the Neighbors macro) matches the count k. A PathPred first evaluates the path which results in a list of HTML nodes and checks that the list is not empty. A path is evaluated step-by-step for each node, where each step evaluation is based on the set of HTML nodes obtained from the previous steps. Based on the axis of the node in the current step evaluation, the set of HTML nodes is expanded to include all their neighbors along that axis and at a position as specified by the PosPred. Next, this set is filtered according to the name of the node and its node predicates (using the Check macro). Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. 2:16 Jeevana Priya Inala and Rishabh Singh LearnTarget(γ ) = LearnAnchor(γ ); LearnChildren(γ ); LearnSiblings(γ ); LearnAncestors(γ ) LearnChildren(γ ) = ∀γ ′ in Neighbors(γ , Child). LearnAnchor(γ ′ ); LearnChildren(γ ′ ) LearnSiblings(γ ) = ∀γ ′ in Neighbors(γ , {Left, Right}). LearnAnchor(γ ′ ); LearnChildren(γ ′ ) LearnAncestors(γ ) = ∀γ ′ in Neighbors(γ , Ancestor). LearnAnchor(γ ′ ); LearnSiblings(γ ′ ) LearnAnchor(γ ) = Anchor(γ .name, LearnPreds(γ )) LearnAttrPred(γ ) = ∀attr in γ . AttrPred(attr.name, GenDag(attr.value)) LearnCountPred(γ ) = ∀dir. CountPred(dir, Len(Neighbors(γ , dir))) Fig. 16. Algorithm to transform an HTML document into a predicates graph. Example. A possible program for the currency exchange rate extraction in Ex 1.1 is (td, [(td, Left,[pos == 1])/ (text,Child,[attr("text") == ⟨Transformed Date⟩]))]). This expression denotes the extraction of an HTML node (γ 1 ) with a td tag. The path predicate states that there should be another td HTML node (γ 2 ) to the left of γ 1 at a distance of 1 and it should have a text child with its text attribute equal to the transformed date that is learned from the input. Design choices. This DSL is only a subset of the XPath language that has been chosen so that it can handle a wide variety of data extraction tasks and at the same time, enables an efficient synthesis algorithm. For example, our top-level program is a single node whereas the XPath language would support arbitrary path expressions. Moreover, paths in XPath do not have to satisfy the ordering criteria that Lw enforces and in addition, the individual nodes in the path expression in Lw cannot have recursive path predicates. However, we found that most of these constraints can be expressed as additional path predicates in the top-level program and hence, does not restrict the expressiveness. 5.2 Synthesis Algorithm We now describe the synthesis algorithm for learning a program in Lw from examples. Here, the list of input-output examples is denoted as E = {(i 1 , w 1 , γ 1 ), (i 2 , w 2 , γ 2 ), · · · (im , wm , γm )}, where each example is a tuple of an input i, a web page w, and a target HTML node γ , and the list of pairs of unseen inputs and web pages is denoted as U = {(im+1 , wm+1 ), (im+2 , wm+2 ), · · · , (im+n , wm+n )}. In this case, the O-PBE synthesis task can be framed as a search problem to find the right set of predicates ({π1 , π2 , · · · , πr }) that can sufficiently constrain the given target example nodes. At a high-level, the synthesis algorithm has three key steps: First, it uses the first example to learn all possible predicates for the target node in that example. Then, the remaining examples are used to refine these predicates. Finally, the algorithm searches for a subset of these predicates that uniquely satisfies the given examples and also generalizes well to the unseen inputs. 5.2.1 Learning all predicates. For any given example HTML node, there are numerous predicates (especially path predicates) in the language that constrain the target node. In order to learn and operate on these predicates efficiently, we use a graph data structure called predicates graph to compactly represent the set of all predicates. This data structure is inspired by the tree data structure used in Anton [2005], but it is adapted to our DSL and algorithm. Similar to Anton [2005], to avoid confusion with the nodes in the DSL, we use the term Anchor to refer to nodes and the term Hop to refer to edges in this graph. Hence, a predicates graph is a tuple (A, H,T ) where A is the list of anchors, H is the list of hops and T ∈ A is the target anchor. An anchor is a tuple (n, P) where n is the name of the anchor and P is a list of node predicates in the Lw language. An edge is a tuple (a 1 , a 2 , x, d) where a 1 is the start anchor, a 2 is the end anchor, Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. WebRelate: Integrating Web Data with Spreadsheets using Examples 2:17 x is the axis and d is a predicate on the distance between a 1 and a 2 measured in terms of number of hops in the original HTML document. Fig. 16 shows the algorithm for transforming an HTML document into a predicates graph. We will explain this algorithm based on an example shown in Fig. 17 where the input HTML document is shown on the left, and the corresponding predicates graph is shown on the right; the target node is the text node (T3 ) shown in red. First, it is important to note the difference between these two representations. Although both the HTML document and the predicates graph have a tree like structure, the latter is more centered around the target anchor. In the predicates graph, all anchors are connected to the target anchor using a minimum number of intermediate anchors that is allowed by the DSL. The algorithm first creates an anchor for the target and then learns the anchors for its children, siblings, and ancestors recursively. Learning a child or a sibling will also learn its children in a recursive manner, whereas learning an ancestor will only learn its siblings recursively. Finally, when creating an anchor for an HTML node, all the node predicates of the HTML node are inherited by the anchor, but if there are any attribute predicates, their string values are first converted to DAGs using the GenDag method in § 4.2.2. After the above transformation, a path p = a 1 /a 2 /· · · ar in the predicates graph (where a 1 is the target node) represents many different predicates in Lw corresponding to different combinations of the node predicates in each anchor ak . We use predicates(p) to denote the set of all such predicates, e.g. for the path from the target (T3 ) to the text nodeT2 in Fig. 17, predicates(p) = {πp1 , πp2 , πp3 · · · } where: πp1 = [(p, Ancestor, [pos == 1])/(div, Left, [pos == 1])/ (text, Child, [attr("text") = dag2 .BestProg])] πp2 = [(p, Ancestor, [pos == 1])/(div, Left)/(text, Child, [attr("text") = dag2 .BestProg])] πp3 = [(p, Ancestor)/(div, Left)/(text, Child)] We can define a partial ordering among predicates generated by a path p as follows: π1 ⊑ π 2 if the set of all node predicates in π1 is a subset of the set of all node predicates in π 2 . In the above example, we have πp3 ⊑ πp2 ⊑ πp1 . Definition 5.1 (Minimal path predicate). Given a path p in the predicates graph, a minimal path predicate is the predicate πp encoded by this path such that šπp ′ . πp ′ ⊑ πp . Definition 5.2 (Maximal path predicate). Given a path p in the predicates graph, a maximal path predicate is the predicate πp such that šπp ′ . πp ⊑ πp ′ In other words, a minimal path predicate is the one that does not have any node predicates for any anchor in the path and a maximal path predicate is the one that has all node predicates for every anchor in the path. For the above example, πp3 is the minimal path predicate and πp1 is the maximal path predicate assuming the nodes do not have any other predicates. Lemma 5.3. Any predicate expressed by the predicates graph, Π, for an example (i, w, γ ) will satisfy the example i.e. ∀path p ∈ Π. ∀π ∈ predicates(p). Jπ Ki (γ ) = True. Proof Sketch: This lemma is true because LearnTarget constructs the predicates graph by only adding those nodes and predicates that are in the original HTML document. Lemma 5.4. The predicates graph, Π, for an example (i, w, γ ) can express all predicates in Lw that satisfy the example i.e. ∀π ∈ Lw . Jπ Ki (γ ) = True =⇒ ∃path p ∈ Π. π ∈ predicates(p). Proof Sketch: This lemma is true because the traversal of nodes when constructing the predicates graph covers all possible paths in the HTML document that can be expressed in Lw . For the implementation, we only construct a portion of the predicates graph that captures nodes that are within a distance r = 5 from the target node. Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. 2:18 Jeevana Priya Inala and Rishabh Singh Fig. 17. An example demonstrating the transformation from an HTML document to a predicates graph. IntersectPath(p, q) = {ak }k where ak = IntersectAnchor(apk , aqk ) IntersectAnchor(ap , aq ) = Anchor(ap .name, {πk }k ) where πk = IntersectPred(πpk , πqk ) IntersectAttrPred(πp , πq ) = AttrPred(πp .name, Intersect(πp .DAG, πq .DAG)) if πp .name = πq .name IntersectPosPred(πp , πq ) = IntersectCountPred(πp , πq ) = PosPred(==, πp .k) if πp .k = πq .k else PosPred(≤, max(πp .k, πq .k)) CountPred(πp .k) if πp .k = πq .k Fig. 18. Algorithm to intersect two paths in two predicates graphs. 5.2.2 Handling multiple examples. We, now, have a list of all predicates that constrain the target HTML node for the first example. However, not all of these predicates will satisfy the other examples provided by the user. A simple strategy to prune the unsatisfiable predicates is to create a predicates graph for each example and perform a full intersection of all these graphs. However, this operation is very expensive and has a complexity of N m where N is the number of nodes in the HTML document and m is the number of examples. Moreover, in the next subsection, we will see that the algorithm for searching the right set of predicates (Fig. 20) will try to add these predicates one-by-one based on a ranking scheme and stops after a satisfying set is obtained. Therefore, our strategy is to refine predicates in the predicates graph in a lazy fashion for one path at a time (rather than the whole graph) when the path is required by the SearchBestProg algorithm. We will motivate this refinement algorithm using the example from Fig. 17. Suppose that the first example E 1 in this scenario has i 1 = “10/16/16” and w 1 as shown in Fig. 17(a) with s 11 = “10-162016” and s 21 = “foo”. As described earlier, one of the possible predicates for this example is: π = [(p,Ancestor,[pos==1])/(div,Left,[pos==1])/ (text,Child, [attr("text")=dag2 .BestProg])]. Now, suppose that the best program of dag2 extracts the date (16) in the text of s 11 from the year (16) (rather than the date 16) in the input i 1 . Also, assume that the second example E 2 has i 2 = “10/15/16”and w 2 similar to w 1 but with s 12 = “bar" and s 22 = “10-15-2016”. Clearly, the predicate π will not satisfy this new example and hence, we need to refine the path for π using the other examples. The path for π , p = T31 /P11 /D 21 /T21 , is shown in Fig. 19(a). The algorithm for refining the path is done iteratively for one example at a time. For any new example Ek , the algorithm will first check if the maximal path predicate of p satisfies the new example. If it does, then there is no need to refine this path. Otherwise, the algorithm gets all paths in the predicates graph corresponding to Ek that satisfies the minimal path predicate of p. For the example E 2 , there are two such paths as shown in Fig. 19(b). The algorithm will then intersect p with each of these paths. Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. WebRelate: Integrating Web Data with Spreadsheets using Examples 2:19 Fig. 19. Example demonstrating refining a path in predicates graph using other examples. 1 2 3 4 5 6 SearchBestProg(Π, E, U ) Π ′ = ϕ; RankP(Π) foreach π in Π.SortedIterator: P = Refine(Path(π ), E) foreach π ′ in P done = TestNAdd(π ′ , Π ′ , E, U ) if (done): return (E[0].γ .Name, Π ′ ) Fig. 20. The algorithm for computing the best predicate set using output-constrained ranking. Fig. 18 shows the algorithm for intersecting two paths. The algorithm goes through all the anchors in the two paths and intersects each of their node predicates. Note that, since the two paths have the same minimal path predicate, the anchors in the two paths will have the same sequence of tags. For intersecting attribute predicates, the algorithm will intersect their respective DAGs corresponding to the values if their attributes have the same name. For intersecting position predicates, the algorithm will take the maximum value of k and update the operation accordingly. For intersecting count predicates, the algorithm will return the same predicate if the counts (k) are the same. For the example in Fig. 19, Fig. 19(c)-(d) are the two new resulting paths after the intersection, whose predicates are: π1′ = [(p,Ancestor,[pos==1])/(div,Left,[pos==1])/(text,Child, [attr("text")=(dag21 ∧ dag22 ).TopProg])] π2′ = [(p,Ancestor,[pos==1])/(div,Left,[pos≤ 2])/(text,Child, [attr("text")=(dag21 ∧ dag12 ).TopProg])] The worst case complexity of this lazy refinement strategy is N m , but in practice, it works well because the algorithm usually accesses few paths in the predicates graph because of the ranking scheme and moreover, the path intersection is only required if the original path cannot satisfy the new examples. The following lemmas regarding the intersection algorithm hold true by construction. Let p, q be two paths in the predicates graphs of two different examples {(i 1 , w 1 , γ 1 ), (i 2 , w 2 , γ 2 )} that have the same minimal path predicate, and let r be the path obtained after the intersection. Lemma 5.5. Any predicate obtained after intersecting two paths satisfies all the examples. Formally, ∀π ∈ predicates(r ). Jπ Ki 1 (γ 1 ) = True ∧ Jπ Ki 2 (γ 2 ) = True. Lemma 5.6. Intersecting two paths preserves all predicates that satisfy the examples. Formally, ∀π . π ∈ predicates(p) ∧ π ∈ predicates(q) =⇒ π ∈ predicates(r ). 5.2.3 Output-constrained ranking of predicates. We now have a list of predicates that satisfy the first example and we have an algorithm to refine predicates based on the other examples provided by the user. However, only some of these predicates are desirable as some predicates might not Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. 2:20 Jeevana Priya Inala and Rishabh Singh generalize to unseen inputs and some others might not be required to constrain the target nodes. Fig. 20 shows the algorithm that uses output-constrained ranking to find a subset of the predicates that generalizes well. The algorithm takes as inputs a set of predicates Π, a list of input-output examples E, and a list of unseen inputs U . It uses the unseen inputs as a test set to prune away predicates that do not generalize well. The algorithm iterates through the list of all predicates based on a ranking scheme and adds the predicate if there is at-least one node in each test document that satisfies the predicates added so far. This process is stopped if we find a set of predicates that uniquely constrains the target nodes in the provided examples. Ranking Scheme. We use the following criterion that gives higher priority to predicates that best constrain the set of target nodes and at the same time, capture user intentions: (i) Attribute predicates with more sub-string expressions on input data are preferred over other attribute predicates, (ii) Left siblings nodes are preferred over right siblings because usually websites contain descriptor information to the left of values and in most cases, these descriptor information tend to be the same across websites, and (iii) Nodes closer to target are preferred over farther nodes. Theorem 5.7 (Soundness). The data extraction synthesis algorithm is sound i.e. given some inputoutput examples {(i k , w k , γk )}k , the program P that is learned by the algorithm will always satisfy ∀k. JPKi k (w k ) = {γk }. Proof Sketch: This theorem follows directly from Lemmas 5.3 and 5.5. Theorem 5.8 (Completeness). The data extraction synthesis algorithm is complete i.e. if there exists a program in Lw that satisfies the given I/O examples, then the algorithm is guaranteed to find one program that satisfies the examples. Proof Sketch: This holds because the predicates graphs created for the examples are complete using Lemma 5.4. And the algorithm for refining a path intersects the path with all similar paths (that satisfy the minimal path predicate) in the other examples and IntersectPath preserves all predicates that can be satisfied by the examples (Lemma 5.6). Note, that the SearchBestProg algorithm cannot influence the soundness or completeness argument because the set of all predicates obtained after refining every path in the predicates graph is a sound and complete solution. SearchBestProg only influences how well it generalizes to unseen inputs. A Note on adding new rows and changing data sources. When adding new rows to the spreadsheet after the integration task has been performed, there might be concerns about whether the joined data for the old rows will be obsolete. For example, in Ex 2.1 or Ex 2.2, the stock values or the weather information would change presumable every second. However, the user still does not need to re-provide updated examples. This is because WebRelate learns programs in the DSLs and it can just re-execute the learned program directly and compute results for the new rows. Only in cases if the website DOM structure changes (which does not happen too often for major websites), the user would need to re-update the previously provided examples. 6 EVALUATION In this section, we evaluate WebRelate on a variety of real-world web integration tasks. In particular, we evaluate whether the DSLs for URL learning and data extraction are expressive enough to encode these tasks, the efficiency of the synthesis algorithms, the number of examples needed to learn the programs, and the impact of layered version spaces and output-constrained ranking. Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. WebRelate: Integrating Web Data with Spreadsheets using Examples 2:21 Benchmarks. We collected 88 web-integration tasks taken from online help forums and the Excel product team. These tasks cover a wide range of domains including finance, sports, weather, travel, academics, geography, and entertainment. Each benchmark has 5 to 32 rows of input data in the spreadsheet. These 88 tasks decompose into 62 URL learning tasks and 88 extraction tasks. For some benchmarks, we had scenarios with examples and webpages provided by the Excel team. For other benchmarks, we chose alternate sources for data extraction and provided examples manually, but they were independent of the underlying learning system. The set of benchmarks with unique URLs is shown in Fig. 21. Experimental Setup. We implemented WebRelate in C#. All experiments were performed using a dual-core Intel i5 2.40 GHz CPU with 8GB RAM. For each component, we incrementally provided examples until the system learned a program that satisfied all other inputs, and we report the results of the final iteration. 6.1 URL learning For each URL learning task, we run the layered search using 4 different configurations for the layers: 1. L1 to L4, 2. L2 to L4, 3. L3 to L4, and 4. Only L4 where L1, L2, L3, and L4 are as defined in Fig. 10. The last configuration essentially compares against the VSA algorithm used in FlashFill (except for the new constructs). Fig. 22(a) shows the synthesis times2 required for learning URLs. We categorize the benchmarks based on the layer that has the program required for performing the transformation. We can see that for the L1 to L4 configuration, WebRelate solves all the tasks in less than 1 second. The L2 to L4 configuration performs equally well whereas the performance of only L4 configuration is much worse. Only 28 benchmarks complete when given a timeout of 2 minutes. Note that none of the URL learning tasks need the L4 configuration in our benchmarks, but we still allow for using L4 for two reasons: i) completeness of the synthesis algorithm for our DSL for other benchmarks in future, and ii) comparison against a no layered approach (a baseline similar to FlashFill like VSA algorithms). For these tasks, the length of the URLs is in the range of 23 to 89. Regarding DSL coverage, about 50% of the benchmarks require AnyStr, 88% require SubStr, 38% require Replace, and all benchmarks require ConstStr expressions. Thus, all DSL features are needed for different subsets of benchmarks. Moreover, note that the 50% of the benchmarks that require AnyStr expressions cannot be learned by traditional PBE techniques and hence, require the O-PBE formulation. We also perform an experiment to evaluate the impact on generalization with the outputconstrained ranking scheme. For this experiment, we use the L1 to L4 configuration for the layered search and report the results in Fig. 22(b). With output-constrained ranking, 85% of the benchmarks require only 1 example whereas without it, only 29% of benchmarks can be synthesized using a single example. Note that the L1 to L4 layered search already has a strong prior that the programs in earlier layers are more desirable, and the output-constrained ranking is able to further reduce the number of examples required. To evaluate the scalability with respect to the number of examples, we performed an experiment where we took a benchmark that has 32 rows in the spreadsheet and incrementally added more examples. The results are shown in Fig. 24(a). Although the theoretical complexity of the algorithms is exponential in the number of examples, in practice, we observed that the performance scales almost linearly. We attribute this to the sparseness of the DAGs learned during the layered search. 2 excluding the time take to run search queries on the search engine. Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. 2:22 # 1-2 3-4 5-7 8 9 10 11 12 13-14 15-16 17 18 19-23 24 25-26 27 28 29-31 32-35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50-52 53 54 55 56 57 58 59 60 61 62 63-65 66 67 68 69 70 71 72 73 74 75 76 77-78 79 80 81 82 83-84 85 86-88 Jeevana Priya Inala and Rishabh Singh Description ATP players to ages/countries ATP players to latest tweet/total tweets ATP players to single titles/ranking/W-L ATP players to number of singles based on year ATP players to rankings ATP players to rankings ATP players to career titles Addresses to population Addresses to population/zipcode Addresses to weather/weather based on date Addresses to weather Addresses to weather Addresses to weather stats Airport code to airport name Airport code to delay status/name Airport code to terminal information Albums to genre Authors to paper citations, max citation, title Authors to different data from DBLP Cities to population Company symbols to 1 year target prices Company symbols to stock prices Company symbols to stock prices Company symbols to stock prices Company symbols to stock prices Company symbols to stock prices Company symbols to stock prices Company symbols to stock prices Company symbols to stock prices on date Company symbols to stock prices on date Country names to population Country names to population Cricket results for teams on different dates Cricket stats for two different teams Currency exchange values Currency exchange values Currency exchange values Currency exchange values Currency exchange values Currency exchange values Currency exchange values based on date Currency exchange values based on date Currency exchange values based on date Flight distance between two cities Flight fares between two cities/cheapest/airline Flight fares between two cities Flight travel time between two cities Flight travel time between two cities NFL teams to rankings NFL teams to rankings NFL teams to rankings NFL teams to rankings NFL teams to stadium names Nobel prize for different subjects based on year Nobel prize for different years based on subject Nobel prize for different years based on subject Novels to authors/genre Novels to authors # of coauthored papers between two authors Number of daily flights between two cities People to profession Real estate properties to sale prices and stats Stock prices with names from same webpage Video names to youtube stats #R 5 5 20 7 5 5 5 7 7 7 7 7 6 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 5 5 8 8 8 8 8 8 8 8 8 5 5 5 5 5 5 5 5 5 32 5 5 5 7 8 10 5 5 5 6 5 Example data item(s) (age 29) | Serbia and Montenegro Long tweet message | 2,324 7 | ATP Rank #1 | 742-152 7 1 #1 66 (7th in the Open Era) 668,342 (100% urban, 0% rural). 786,130 | 98101 Zip Code 51◦ | 51◦ 57◦ F 52 49|Partly sunny|74◦ |62|68◦ Boston Logan International Airport (BOS) Very few delays | Logan International Terminal B - Gates B4 - B19 Rock Cited by 175 | Cited by 427 | Syntax-guided Demo...|Alvin Cheung(12)|PLDI(9)|POPL(2) 21,357,000 65 59.87 59.87 59.87 59.87 59.00 59.95 $59.87 60.61 60.61 1,326,801,576 1,336,286,256 Australia won by 3 wickets 90 | 24 | 31.67 66.7870 INR/USD = 66.84699 66.7800 66.8043 INR 66.779 66.7914 64.1643 INR 66.778 64.231 2,487 Miles $217 | Wednesday | $237 $257 6 hrs 11 mins 5 hours, 38 minutes 4-5, 3rd in AFC East 26th 26.7 #5 New Era Field Richard F. Heck Richard F. Heck Richard F. Heck Charles Dickens | Historical novel Charles Dickens Rastislav Bodik (6) 26 Principal Researcher $1,452 | 1,804 sqft 7.60 11,473,055 | 2,672,818,718 views | Jul 15, 2012 Website Domain wikipedia twitter espn espn.go atpworldtour tennis wikipedia city-data zipcode accuweather timeanddate weather accuweather virginamerica flightstats aa wikipedia scholar.google dblp worldpopulation nasdaq finance.yahoo money.cnn quotes.wsj google marketwatch nasdaq google google yahoo worldometers wikipedia espncricinfo espncricinfo finance.yahoo moneyconverter bloomberg investing xe exchange-rates investing exchange-rates investing cheapoair farecompare cheapflights travelmath cheapflights espn cbssports nfl teamrankings espn wikipedia nobelprize nobelprize wikipedia goodreads dblp cheapoair zoominfo zillow marketwatch youtube Fig. 21. The set of web data integration benchmarks with a brief description along with number of input rows (#R), the example data item(s), and the website domain from which the data is extracted. Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. WebRelate: Integrating Web Data with Spreadsheets using Examples 10 9 L1 to L4 L2 to L4 L3 to L4 Only L4 7 Layer 1 6 Output-constrained ranking Basic ranking 8 Layer 2 Layer 3 4 # examples 8 Time (s) 2:23 6 Layer 1 5 Layer 2 Layer 3 4 3 2 2 0 0 0 0 1 10 20 30 40 Benchmarks 50 60 70 10 20 30 40 Benchmarks (a) 50 60 70 (b) Fig. 22. (a) The synthesis times and (b) the number of examples required for learning URL programs. The benchmarks are categorized based on the layer that contains the program required for performing the transformation. 10 T_pred T_intersect T_search Time (s) 8 Cat. 1 6 Cat. 2 Cat. 3 4 2 0 0 10 20 30 40 50 Benchmarks 60 70 80 90 Fig. 23. The synthesis times for learning data extraction programs by WebRelate on the 88 benchmarks. Data extraction learning time (s) URL learning time (s) 4.0 3.5 3.0 2.5 2.0 1.5 1.0 0.5 0 5 10 15 20 # examples (a) 25 30 35 60 50 40 30 20 10 0 0 5 10 15 20 # examples 25 30 35 (b) Fig. 24. The synthesis time vs the number of examples for URL learning (a) and data extraction learning (b). 6.2 Data Extraction We now present the evaluation of our data extraction synthesizer. We categorize the benchmarks into three categories. The first category consists of benchmarks where the data extraction can be learned using an absolute XPath. The second category includes the benchmarks that cannot be learned using an absolute XPath, but by using relative predicates (especially involving nearby strings). The last category handles the cases where the data extraction is input-dependent. Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. 2:24 Jeevana Priya Inala and Rishabh Singh 9 Output-constrained Non output-constrained 8 # examples 7 Cat. 1 6 Cat. 2 Cat. 3 5 4 3 2 1 0 0 10 20 30 40 50 60 Benchmarks 70 80 90 Fig. 25. The number of examples needed to learn the data extraction programs. Fig. 23 shows the synthesis times3 for all 88 benchmarks. The figure also splits the synthesis time into the time taken for learning the predicates graphs (T_pred), for intersecting the predicates graphs if there are multiple examples (T_intersect) and finally, for searching the right set of predicates (T_search). WebRelate can learn the correct extraction for all the benchmarks in all the three categories showing that the DSL is very expressive. Moreover, it can learn them very quickly— 97% of benchmarks take less than 5 seconds. Fig. 25 shows the number of examples required and also compares against non output-constrained ranking. It can be seen that with output-constrained ranking, 93% of benchmarks require only 1 example. Most of the synthesis time is actually spent in generating the predicates graphs and this time is proportional to the number of attribute strings in the HTML document since WebRelate will create a DAG for each string. In our examples, the number of HTML nodes we consider for the predicates graph is in the range of 30 to 1200 with 3 to 200 attribute strings. For some benchmarks, the time spent in searching for the right set of predicates dominates. These are the benchmarks that require too many predicates to sufficiently constrain the target nodes. The actual time spent on intersecting the predicates graph is not very significant. For benchmarks that require multiple examples, we found that the time spent on intersection is only 15% of the total time (on average) due to our lazy intersection algorithm. Fig. 24(b) shows how the performance scales with respect to the number of examples. Similar to URL learning, the performance scales almost linearly as opposed to exponentially. We attribute this to our lazy intersection algorithm. 7 RELATED WORK Data Integration from Web: DataXFormer [Abedjan et al. 2015; Morcos et al. 2015] performs semantic data transformations using web tables and forms. Given a set of input-output examples, it searches a large index of web tables and web forms to find a consistent transformation. For web forms, it performs a web search consisting of input-output examples to identify web forms that might be relevant, and then uses heuristics to invoke the form with the correct set of inputs. Instead of being completely automated, WebRelate, on the other hand, allows users to identify the relevant websites and point to the desired data on the website, which allows WebRelate to perform data integration from more sophisticated websites. Moreover, WebRelate allows for joining data based on syntactic transformations on inputs, whereas DataXFormer only searches based on exact inputs. 3 excluding the time taken to load the webpages Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. WebRelate: Integrating Web Data with Spreadsheets using Examples 2:25 WebCombine [Chasins et al. 2015] is a PBD web scraping tool for end-users that allows them to first extract logical tables from a webpage, and then provide example interactions for the first table entry on another website. It uses Ringer [Barman et al. 2016] as the backend record and replay engine to record the interactions performed by the user on a webpage. The recorded interaction is turned into a script that can be replayed programmatically. WebCombine parameterizes the recorded script using 3 rules that parameterize xpaths, strings, and frames with list items. Vegemite [Lin et al. 2009] uses direct manipulation and PBD to allow end-users to easily create web mashups to collect information from multiple websites. It first uses a demonstration to open a website, copy/paste the data for the first row into the website, and records user interactions using the CoScripter [Leshed et al. 2008] engine. The learnt script is then executed for remaining rows in the spreadsheet. The XPath learning does not need to be complex since all rows go to the same website and the desired data is at the same location in the DOM. Instead of recording user demonstrations, WebRelate uses examples of URLs (or search queries) to learn a program to get to the desired webpages. The demonstrations-based specification has been shown to be challenging for users [Lau 2009] and many websites do not expose such interactions. These systems learn simpler XPath expressions for data extraction, whereas WebRelate can learn input data-dependent Xpath expressions that are crucial for data integration tasks. Moreover, these systems assume the input data is in a consistent format that can be directly used for interactions, whereas WebRelate learns additional transformations on the input for both learning the URLs and data-dependent extractions. Programming By Examples (PBE) for string transformations: Data Wrangler [Kandel et al. 2011] uses examples and predictive interaction [Heer et al. 2015] to create reusable data transformations such as map, joins, aggregation, and sorting. There have also been many recent PBE systems such as FlashFill [Gulwani 2011], BlinkFill [Singh 2016], and FlashExtract [Le and Gulwani 2014] that use VSA [Polozov and Gulwani 2015] for efficiently learning string transformations from examples. Unlike these systems that perform data transformation and extraction from a single document, WebRelate joins data between a spreadsheet and a collection of webpages. WebRelate builds on top of the substring constructs introduced by these systems to perform both URL learning and data extraction. Moreover, WebRelate uses layered version spaces and a output-constrained ranking technique to efficiently synthesize programs. There is another PBE system that learns relational joins between two tables from examples [Singh and Gulwani 2012]. It uses a restricted set of relational algebra to allow using VSA for efficient synthesis. Unlike learning joins between two relational sources, WebRelate learns joins between a relational data source (spreadsheet) and a semi-structured data source (multiple webpages). Wrapper Induction: Wrapper induction [Kushmerick 1997] is a technique to automatically extract relational information from webpages using labeled examples. There exists a large body of research on wrapper induction with some techniques using input-output examples to learn wrappers [Anton 2005; Dalvi et al. 2009; Hsu and Dung 1998; Kushmerick 1997; Le and Gulwani 2014; Muslea et al. 1998] and others [Chasins et al. 2015; Crescenzi et al. 2001; Zhai and Liu 2005] perform unsupervised learning using pattern mining or similarity functions. Some of these techniques [Anton 2005; Dalvi et al. 2009; Le and Gulwani 2014] are based on Xpath similar to WebRelate whereas some techniques such as [Kushmerick 1997] treat webpages as strings and learn delimiter strings around the desired data from a fixed class of patterns. The main difference between any of these techniques and WebRelate is that the extraction language used by WebRelate is more expressive as it allows richer Xpath expressions that can depend on inputs. Program Synthesis: The field of program synthesis has seen a renewed interest in recent years [Alur et al. 2013; Gulwani et al. 2017]. In addition to VSA based approaches, several other approaches including constraint-based [Solar-Lezama et al. 2006], enumerative [Udupa et al. 2013], Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. 2:26 Jeevana Priya Inala and Rishabh Singh stochastic [Schkufza et al. 2013], and finite tree automata based techniques [Wang et al. 2017, 2018] have been recently developed to synthesize programs in different domains. Synthesis techniques using examples have also been developed for learning data structure manipulations [Singh and Solar-Lezama 2011], type-directed synthesis for recursive functions over algebraic datatypes [Frankle et al. 2016; Osera and Zdancewic 2015], transforming tree-structured data [Yaghmazadeh et al. 2016], and interactive parser synthesis [Leung et al. 2015]. These approaches are not suited for learning URLs and data extraction programs because the DSL operators such as regular expression based substrings and data-dependent xpath expressions are not readily expressible in these approaches and enumerative approaches do not scale because of large search space. 8 LIMITATIONS AND FUTURE WORK There are certain situations under which WebRelate may not be able to learn a data integration task. First, since all of our synthesis algorithms are sound, WebRelate cannot deal with noise. For example, if any input data in the spreadsheet is misspelled or has a semantically different format, then WebRelate may not be able to learn such string transformation programs. Our system can handle syntactic data transformations and partial semantic transformations, but not fully semantic transformations. For instance, in Ex 4.3 if the input country name was “US” instead of “United States”, then WebRelate would not be able to learn such programs. As future work, we plan to use recent neural program synthesis techniques [Devlin et al. 2017; Parisotto et al. 2017; Singh and Kohli 2017] to learn a noise model based on semantics and web tables [He et al. 2015], and incorporate this model into the synthesis algorithm to make it more robust with respect to noise, small web page discrepancies, and different semantic data formats. In WebRelate, we assume that the webpages containing the desired data have URLs that can be programmatically learned. However, there are also situations that require complex interactions such as traversing through multiple pages possibly by interacting with the webpage UI before getting to the page that has the desired data. In future, we want to explore integrating the techniques in this paper with techniques from record and replay systems such as Ringer [Barman et al. 2016] to enable data-dependent replay. 9 CONCLUSION We presented WebRelate, a PBE system for joining semi-structured web data with relational data. The key idea in WebRelate is to decompose the task into two sub-tasks: URL learning and data extraction learning. We frame the URL learning problem in terms of learning syntactic string transformations and filters, whereas we learn data extraction programs in a rich DSL that allows for data-dependent Xpath expressions. The key idea in the synthesis algorithms is to use layered version spaces and output-constrained ranking to efficiently learn the programs using very few input-output examples. We have evaluated WebRelate successfully on several real-world web data integration tasks. ACKNOWLEDGMENTS We would like to thank Armando Solar-Lezama, Ben Zorn, and anonymous reviewers for their constructive feedback and insightful comments. We would also like to thank the members of the Microsoft Excel and Power BI teams for their helpful feedback on various versions of the WebRelate system and the real-world web data integration scenarios. REFERENCES Ziawasch Abedjan, John Morcos, Michael N Gubanov, Ihab F Ilyas, Michael Stonebraker, Paolo Papotti, and Mourad Ouzzani. 2015. Dataxformer: Leveraging the Web for Semantic Transformations.. In CIDR. Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. WebRelate: Integrating Web Data with Spreadsheets using Examples 2:27 Rajeev Alur, Rastislav Bodík, Garvit Juniwal, Milo M. K. Martin, Mukund Raghothaman, Sanjit A. Seshia, Rishabh Singh, Armando Solar-Lezama, Emina Torlak, and Abhishek Udupa. 2013. Syntax-guided synthesis. In FMCAD. 1–8. Tobias Anton. 2005. XPath-Wrapper Induction by generalizing tree traversal patterns. In Lernen, Wissensentdeckung und Adaptivitt (LWA) 2005, GI Workshops, Saarbrcken. 126–133. Shaon Barman, Sarah Chasins, Rastislav Bodík, and Sumit Gulwani. 2016. Ringer: web automation by demonstration. In OOPSLA. 748–764. Anders Berglund, Scott Boag, Don Chamberlin, Mary F Fernandez, Michael Kay, Jonathan Robie, and Jérôme Siméon. 2003. Xml path language (xpath). World Wide Web Consortium (W3C) (2003). Sarah Chasins, Shaon Barman, Rastislav Bodík, and Sumit Gulwani. 2015. Browser Record and Replay as a Building Block for End-User Web Automation Tools. In WWW. 179–182. Valter Crescenzi, Giansalvatore Mecca, and Paolo Merialdo. 2001. Roadrunner: Towards automatic data extraction from large web sites. In VLDB, Vol. 1. 109–118. Nilesh Dalvi, Philip Bohannon, and Fei Sha. 2009. Robust Web Extraction: An Approach Based on a Probabilistic Tree-edit Model. In SIGMOD. 335–348. Jacob Devlin, Jonathan Uesato, Surya Bhupatiraju, Rishabh Singh, Abdel-rahman Mohamed, and Pushmeet Kohli. 2017. RobustFill: Neural Program Learning under Noisy I/O. In ICML. 990–998. Jonathan Frankle, Peter-Michael Osera, David Walker, and Steve Zdancewic. 2016. Example-directed synthesis: a typetheoretic interpretation. In POPL. 802–815. Mike Gualtieri. 2009. Deputize end-user developers to deliver business agility and reduce costs. Forrester Report for Application Development and Program Management Professionals (2009). Sumit Gulwani. 2011. Automating string processing in spreadsheets using input-output examples. In POPL. 317–330. Sumit Gulwani, William R. Harris, and Rishabh Singh. 2012. Spreadsheet data manipulation using examples. Commun. ACM 55, 8 (2012), 97–105. Sumit Gulwani, Oleksandr Polozov, and Rishabh Singh. 2017. Program Synthesis. Foundations and Trends in Programming Languages 4, 1-2 (2017), 1–119. Yeye He, Kris Ganjam, and Xu Chu. 2015. SEMA-JOIN: Joining Semantically-related Tables Using Big Table Corpora. Proc. VLDB Endow. 8, 12 (Aug. 2015), 1358–1369. Jeffrey Heer, Joseph M Hellerstein, and Sean Kandel. 2015. Predictive Interaction for Data Transformation.. In CIDR. Chun-Nan Hsu and Ming-Tzung Dung. 1998. Generating finite-state transducers for semi-structured data extraction from the web. Information systems 23, 8 (1998), 521–538. Sean Kandel, Andreas Paepcke, Joseph M. Hellerstein, and Jeffrey Heer. 2011. Wrangler: interactive visual specification of data transformation scripts. In CHI. 3363–3372. Nicholas Kushmerick. 1997. Wrapper induction for information extraction. Ph.D. Dissertation. Univ. of Washington. Tessa Lau. 2009. Why Programming-By-Demonstration Systems Fail: Lessons Learned for Usable AI. AI Magazine 30, 4 (2009), 65–67. Vu Le and Sumit Gulwani. 2014. FlashExtract: A Framework for Data Extraction by Examples. In PLDI. 542–553. Gilly Leshed, Eben M Haber, Tara Matthews, and Tessa Lau. 2008. CoScripter: automating & sharing how-to knowledge in the enterprise. In CHI. 1719–1728. Alan Leung, John Sarracino, and Sorin Lerner. 2015. Interactive parser synthesis by example. In PLDI. 565–574. James Lin, Jeffrey Wong, Jeffrey Nichols, Allen Cypher, and Tessa A Lau. 2009. End-user programming of mashups with vegemite. In IUI. 97–106. John Morcos, Ziawasch Abedjan, Ihab Francis Ilyas, Mourad Ouzzani, Paolo Papotti, and Michael Stonebraker. 2015. DataXFormer: An Interactive Data Transformation Tool. In SIGMOD. Ion Muslea, Steve Minton, and Craig Knoblock. 1998. Stalker: Learning extraction rules for semistructured, web-based information sources. In Workshop on AI and Information Integration. AAAI, 74–81. Peter-Michael Osera and Steve Zdancewic. 2015. Type-and-example-directed Program Synthesis. In PLDI. 619–630. Emilio Parisotto, Abdel-rahman Mohamed, Rishabh Singh, Lihong Li, Dengyong Zhou, and Pushmeet Kohli. 2017. NeuroSymbolic Program Synthesis. In ICLR. Oleksandr Polozov and Sumit Gulwani. 2015. FlashMeta: a framework for inductive program synthesis. In OOPSLA. 107–126. Eric Schkufza, Rahul Sharma, and Alex Aiken. 2013. Stochastic superoptimization. In ASPLOS. 305–316. Rishabh Singh. 2016. BlinkFill: Semi-supervised Programming By Example for Syntactic String Transformations. PVLDB 9, 10 (2016), 816–827. Rishabh Singh and Sumit Gulwani. 2012. Learning Semantic String Transformations from Examples. PVLDB 5, 8 (2012), 740–751. Rishabh Singh and Pushmeet Kohli. 2017. AP: Artificial Programming. In SNAPL. 16:1–16:12. Rishabh Singh and Armando Solar-Lezama. 2011. Synthesizing data structure manipulations from storyboards. In FSE. 289–299. Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018. 2:28 Jeevana Priya Inala and Rishabh Singh Armando Solar-Lezama, Liviu Tancau, Rastislav Bodík, Sanjit A. Seshia, and Vijay A. Saraswat. 2006. Combinatorial sketching for finite programs. In ASPLOS. 404–415. Abhishek Udupa, Arun Raghavan, Jyotirmoy V. Deshmukh, Sela Mador-Haim, Milo M. K. Martin, and Rajeev Alur. 2013. TRANSIT: specifying protocols with concolic snippets. In PLDI. 287–296. Xinyu Wang, Isil Dillig, and Rishabh Singh. 2017. Synthesis of Data Completion Scripts using Finite Tree Automata. In OOPSLA. Xinyu Wang, Isil Dillig, and Rishabh Singh. 2018. Program Synthesis using Abstraction Refinement. In POPL. Navid Yaghmazadeh, Christian Klinger, Isil Dillig, and Swarat Chaudhuri. 2016. Synthesizing transformations on hierarchically structured data. In PLDI. 508–521. Yanhong Zhai and Bing Liu. 2005. Web Data Extraction Based on Partial Tree Alignment. In WWW. 76–85. Proceedings of the ACM on Programming Languages, Vol. 2, No. POPL, Article 2. Publication date: January 2018.
6cs.PL
arXiv:1707.02772v2 [cs.PL] 24 Mar 2018 Probabilistic Program Equivalence for NetKAT∗ STEFFEN SMOLKA, Cornell University, USA PRAVEEN KUMAR, Cornell University, USA NATE FOSTER, Cornell University, USA JUSTIN HSU, Cornell University, USA DAVID KAHN, Cornell University, USA DEXTER KOZEN, Cornell University, USA ALEXANDRA SILVA, University College London, UK We tackle the problem of deciding whether two probabilistic programs are equivalent in Probabilistic NetKAT, a formal language for specifying and reasoning about the behavior of packet-switched networks. We show that the problem is decidable for the history-free fragment of the language by developing an effective decision procedure based on stochastic matrices. The main challenge lies in reasoning about iteration, which we address by designing an encoding of the program semantics as a finite-state absorbing Markov chain, whose limiting distribution can be computed exactly. In an extended case study on a real-world data center network, we automatically verify various quantitative properties of interest, including resilience in the presence of failures, by analyzing the Markov chain semantics. 1 INTRODUCTION Program equivalence is one of the most fundamental problems in Computer Science: given a pair of programs, do they describe the same computation? The problem is undecidable in general, but it can often be solved for domain-specific languages based on restricted computational models. For example, a classical approach for deciding whether a pair of regular expressions denote the same language is to first convert the expressions to deterministic finite automata, which can then be checked for equivalence in almost linear time [32]. In addition to the theoretical motivation, there are also many practical benefits to studying program equivalence. Being able to decide equivalence enables more sophisticated applications, for instance in verified compilation and program synthesis. Less obviously—but arguably more importantly—deciding equivalence typically involves finding some sort of finite, explicit representation of the program semantics. This compact encoding can open the door to reasoning techniques and decision procedures for properties that extend far beyond straightforward program equivalence. With this motivation in mind, this paper tackles the problem of deciding equivalence in Probabilistic NetKAT (ProbNetKAT), a language for modeling and reasoning about the behavior of packet-switched networks. As its name suggests, ProbNetKAT is based on NetKAT [3, 9, 30], which is in turn based on Kleene algebra with tests (KAT), an algebraic system combining Boolean predicates and regular expressions. ProbNetKAT extends NetKAT with a random choice operator and a semantics based on Markov kernels [31]. The framework can be used to encode and reason about randomized protocols (e.g., a routing scheme that uses random forwarding paths to balance load [33]); describe uncertainty about traffic demands (e.g., the diurnal/nocturnal fluctuation in access patterns commonly seen in networks for large content providers [26]); and model failures (e.g., switches or links that are known to fail with some probability [10]). However, the semantics of ProbNetKAT is surprisingly subtle. Using the iteration operator (i.e., the Kleene star from regular expressions), it is possible to write programs that generate continuous distributions over an uncountable space of packet history sets [8, Theorem 3]. This makes reasoning about convergence non-trivial, and requires representing infinitary objects compactly ∗ This is a preliminary draft from March 28, 2018. 2 S. Smolka, P. Kumar, N. Foster, J. Hsu, D. Kahn, D. Kozen, and A. Silva in an implementation. To address these issues, prior work [31] developed a domain-theoretic characterization of ProbNetKAT that provides notions of approximation and continuity, which can be used to reason about programs using only discrete distributions with finite support. However, that work left the decidability of program equivalence as an open problem. In this paper, we settle this question positively for the history-free fragment of the language, where programs manipulate sets of packets instead of sets of packet histories (finite sequences of packets). Our decision procedure works by deriving a canonical, explicit representation of the program semantics, for which checking equivalence is straightforward. Specifically, we define a big-step semantics that interprets each program as a finite stochastic matrix—equivalently, a Markov chain that transitions from input to output in a single step. Equivalence is trivially decidable on this representation, but the challenge lies in computing the big-step matrix for iteration—intuitively, the finite matrix needs to somehow capture the result of an infinite stochastic process. We address this by embedding the system in a more refined Markov chain with a larger state space, modeling iteration in the style of a small-step semantics. With some care, this chain can be transformed to an absorbing Markov chain, from which we derive a closed form analytic solution representing the limit of the iteration by applying elementary matrix calculations. We prove the soundness of this approach formally. Although the history-free fragment of ProbNetKAT is a restriction of the general language, it captures the input-output behavior of a network—mapping initial packet states to final packet states—and is still expressive enough to handle a wide range of problems of interest. Many other contemporary network verification tools, including Anteater [22], Header Space Analysis [15], and Veriflow [17], are also based on a history-free model. To handle properties that involve paths (e.g., waypointing), these tools generate a series of smaller properties to check, one for each hop in the path. In the ProbNetKAT implementation, working with history-free programs can reduce the space requirements by an exponential factor—a significant benefit when analyzing complex randomized protocols in large networks. We have built a prototype implementation of our approach in OCaml. The workhorse of the decision procedure computes a finite stochastic matrix—representing a finite Markov chain—given an input program. It leverages the spare linear solver UMFPACK [5] as a back-end to compute limiting distributions, and incorporates a number of optimizations and symbolic techniques to compactly represent large but sparse matrices. Although building a scalable implementation would require much more engineering (and is not the primary focus of this paper), our prototype is already able to handle programs of moderate size. Leveraging the finite encoding of the semantics, we have carried out several case studies in the context of data center networks; our central case study models and verifies the resilience of various routing schemes in the presence of link failures. Contributions and outline. The main contribution of this paper is the development of a decision procedure for history-free ProbNetKAT. We develop a new, tractable semantics in terms of stochastic matrices in two steps, we establish the soundness of the semantics with respect to ProbNetKAT’s original denotational model, and we use the compact semantics as the basis for building a prototype implementation with which we carry out case studies. In Section 2 and Section 3 we introduce ProbNetKAT using a simple example and motivate the need for quantitative, probabilistic reasoning. In Section 4, we present a semantics based on finite stochastic matrices and show that it fully characterizes the behavior of ProbNetKAT programs on packets (Theorem 4.1). In this big-step semantics, the matrices encode Markov chains over the state space 2Pk . A single step of the chain models the entire execution of a program, going directly from the initial state corresponding to the set of input packets the final state corresponding to the set of output packets. Although this reduces Probabilistic Program Equivalence for NetKAT 3 program equivalence to equality of finite matrices, we still need to provide a way to explicitly compute them. In particular, the matrix that models iteration is given in terms of a limit. In Section 5 we derive a closed form for the big-step matrix associated with p ∗ , giving an explicit representation of the big-step semantics. It is important to note that this is not simply the calculation of the stationary distribution of a Markov chain, as the semantics of p ∗ is more subtle. Instead, we define a small-step semantics, a second Markov chain with a larger state space such that one transition models one iteration of p ∗ . We then show how to transform this finer Markov chain into an absorbing Markov chain, which admits a closed form solution for its limiting distribution. Together, the big- and small-step semantics enable us to analytically compute a finite representation of the program semantics. Directly checking these semantics for equality yields an effective decision procedure for program equivalence (Corollary 5.8). This is in contrast with the previous semantics [8], which merely provided an approximation theorem for the semantics of iteration p ∗ and was not suitable for deciding equivalence. In Section 6, we illustrate the practical applicability of our approach by exploiting the representation of ProbNetKAT programs as stochastic matrices to answer a number of questions of interest in real-world networks. For example, we can reduce loop termination to program equivalence: the fact that the while loop below terminates with probability 1 can be checked as follows: while ¬f =0 do (skip ⊕r f ←0) ≡ f ←0 We also present real-world case studies that use the stochastic matrix representation to answer questions about the resilience of data center networks in the presence of link failures. We discuss obstacles in extending our approach to the full ProbNetKAT language in Section 7, including a novel automata model encodable in ProbNetKAT for which equivalence seems challenging to decide. We survey related work in Section 8 and conclude in Section 9. 2 OVERVIEW This section introduces the syntax and semantics of ProbNetKAT using a simple example. We will also see how various properties, including program equivalence and also program ordering and quantitative computations over the output distribution, can be encoded in ProbNetKAT. Each of the analyses in this section can be automatically carried out in our prototype implementation. As our running example, consider the network shown in Figure 1. It connects Source and Destination hosts through a topology with three switches. Suppose we want to implement the following policy: forward packets from the Source to the Destination. We will start by building a straightforward implementation of this policy in ProbNetKAT and then verify that it correctly implements the specification embodied in the policy using program equivalence. Next, we will refine our implementation to improve its resilience to link failures and verify that the refinement is more resilient. Finally, we characterize the resilience of both implementations quantitatively. 2.1 Deterministic Programming and Reasoning We will start with a simple deterministic program that forwards packets from left to right through the topology. To a first approximation, a ProbNetKAT program can be thought of as a random function from input packets to output packets. We model packets as records, with fields for standard headers such as the source address (src) and destination address (dst) of a packet, as well as two fields switch (sw) and port (pt) identifying the current location of the packet. The precise field names and ranges turns out to be not so important for our purposes; what is crucial is that the number of fields and the size of their domains must be finite. NetKAT provides primitives f ←n and f =n to modify and test the field f of an incoming packet. A modification f ←n returns the input packet with the f field updated to n. A test f =n either 4 S. Smolka, P. Kumar, N. Foster, J. Hsu, D. Kahn, D. Kozen, and A. Silva Switch 3 1 2 3 1 3 2 1 Switch 1 Source 2 Switch 2 Destination Fig. 1. Example network. returns the input packet unmodified if the test succeeds, or returns the empty set if the test fails. There are also primitives skip and drop that behave like a test that always succeeds and fails, respectively. Programs p, q are assembled to larger programs by composing them in sequence (p ; q) or in parallel (p & q). NetKAT also provides the Kleene star operator p ∗ from regular expressions to iterate programs. ProbNetKAT extends NetKAT with an additional operator p ⊕r q that executes either p with probability r , or q with probability 1 − r . Forwarding. We now turn to the implementation of our forwarding policy. To route packets from Source to Destination, all switches can simply forward incoming packets out of port 2: p1 ≜ pt←2 p2 ≜ pt←2 p3 ≜ pt←2 This is achieved by modifying the port field (pt). Then, to encode the forwarding logic for all switches into a single program, we take the union of their individual programs, after guarding the policy for each switch with a test that matches packets at that switch: p ≜ (sw=1 ; p1 ) & (sw=2 ; p2 ) & (sw =3 ; p3 ) Note that we specify a policy for switch 3, even though it is unreachable. Now we would like to answer the following question: does our program p correctly forward packets from Source to Destination? Note however that we cannot answer the question by inspecting p alone, since the answer depends fundamentally on the network topology. Topology. Although the network topology is not programmable, we can still model its behavior as a program. A unidirectional link matches on packets located at the source location of the link, and updates their location to the destination of the link. In our example network (Figure 1), the link ℓi j from switch i to switch j , i is given by ℓi j ≜ sw=i ; pt=j ; sw←j ; pt←i We obtain a model for the entire topology by taking the union of all its links: t ≜ ℓ12 & ℓ13 & ℓ32 Although this example uses unidirectional links, bidirectional links can be modeled as well using a pair of unidirectional links. Network Model. A packet traversing the network is subject to an interleaving of processing steps by switches and links in the network. This is expressible in NetKAT using Kleene star as follows: M(p, t) ≜ (p ; t)∗ ; p However, the model M(p, t) captures the behavior of the network on arbitrary input packets, including packets that start at arbitrary locations in the interior of the network. Typically we are interested only in the behavior of the network for packets that originate at the ingress of the Probabilistic Program Equivalence for NetKAT 5 network and arrive at the egress of the network. To restrict the model to such packets, we can define predicates in and out and pre- and post-compose the model with them: in ; M(p, t) ; out For our example network, we are interested in packets originating at the Source and arriving at the Destination, so we define in ≜ sw=1 ; pt=1 out ≜ sw=2 ; pt=2 With a full network model in hand, we can verify that p correctly implements the desired network policy, i.e. forward packets from Source to Destination. Our informal policy can be expressed formally as a simple ProbNetKAT program: teleport ≜ sw←2 ; pt←2 We can then settle the correctness question by checking the equivalence in ; M(p, t) ; out ≡ in ; teleport Previous work [3, 9, 30] used NetKAT equivalence with similar encodings to reason about various essential network properties including waypointing, reachability, isolation, and loop freedom, as well as for the validation and verification of compiler transformations. Unfortunately, the NetKAT decision procedure [9] and other state of the art network verification tools [15, 17] are fundamentally limited to reasoning about deterministic network behaviors. 2.2 Probabilistic Programming and Reasoning Routing schemes used in practice often behave non-deterministically—e.g., they may distribute packets across multiple paths to avoid congestion, or they may switch to backup paths in reaction to failures. To see these sorts of behaviors in action, let’s refine our naive routing scheme p to make it resilient to random link failures. Link Failures. We will assume that switches have access to a boolean flag upi that is true if and only if the link connected to the switch at port i is transmitting packets correctly.1 To make the network resilient to a failure, we can modify the program for Switch 1 as follows: if the link ℓ12 is up, use the shortest path to Switch 2 as before; otherwise, take a detour via Switch 3, which still forwards all packets to Switch 2. pb1 ≜ (up2 =1 ; pt←2) & (up2 =0 ; pt←3) As before, we can then encode the forwarding logic for all switches into a single program: pb ≜ (sw=1 ; pb1 ) & (sw=2 ; p2 ) & (sw=3 ; p3 ) Next, we update our link and topology encodings. A link behaves as before when it is up, but drops all incoming packets otherwise: ℓbi j ≜ upj =1 ; ℓi j For the purposes of this example, we will consider failures of links connected to Switch 1 only: b t ≜ ℓb12 & ℓb13 & ℓ32 1 Modern switches use low-level protocols such as Bidirectional Forwarding Detection (BFD) to maintain healthiness information about the link connected to each port [4]. 6 S. Smolka, P. Kumar, N. Foster, J. Hsu, D. Kahn, D. Kozen, and A. Silva We also need to assume some failure model, i.e. a probabilistic model of when and how often links fail. We will consider three failure models: f 0 ≜ up2 ←1 ; up3 ←1  Ê 1 1 1 f1 ≜ f 0 @ , (up2 ←0) & (up3 ←1) @ , (up2 ←1) & (up3 ←0) @ 2 4 4 f 2 ≜ (up2 ←1 ⊕0.8 up2 ←0) ; (up2 ←1 ⊕0.8 up2 ←0) Intuitively, in model f 0 , links never fail; in f 1 , the links ℓ12 and ℓ13 can fail with probability 25% each, but at most one fails; in f 2 , the links can fail independently with probability 20% each. Finally, we can assemble the encodings of policy, topology, and failures into a refined model: b t, f ) ≜ var up2 ←1 in M(p, var up3 ←1 in M((f ; p), t) b wraps our previous model M with declarations of the two local variables up2 The refined model M and up3 , and it executes the failure model at each hop prior to switch and topology processing. As a quick sanity check, we can verify that the old model and the new model are equivalent in the absence of failures, i.e. under failure model f 0 : b b M(p, t) ≡ M(p, t , f0 ) Now let us analyze our resilient routing scheme pb. First, we can verify that it correctly routes packets to the Destination in the absence of failures by checking the following equivalence: b p, b in ; M(b t , f 0 ) ; out ≡ in ; teleport In fact, the scheme pb is 1-resilient: it delivers all packets as long as no more than 1 link fails. In particular, it behaves like teleport under failure model f 1 . In contrast, this is not true for our naive routing scheme p: b p, b b b in ; M(b t , f 1 ) ; out ≡ in ; teleport . in ; M(p, t , f 1 ) ; out Under failure model f 2 , neither of the routing schemes is fully resilient and equivalent to teleportation. However, it is reassuring to verify that the refined routing scheme pb performs strictly better than the naive scheme p, b b b p, b M(p, t , f 2 ) < M(b t , f2 ) where p < q means that q delivers packets with higher probability than p. Reasoning using program equivalences and inequivalences is helpful to establish qualitative properties such as reachability properties and program invariants. But we can also go a step further, and compute quantitative properties of the packet distribution generated by a ProbNetKAT program. For example, we may ask for the probability that the schemes deliver a packet originating at Source to Destination under failure model f 2 . The answer is 80% for the naive scheme, and 96% for the resilient scheme. Such a computation might be used by an Internet Service Provider (ISP) to check that it can meet its service-level agreements (SLA) with customers. In Section 6 we will analyze a more sophisticated resilient routing scheme and see more complex examples of qualitative and quantitative reasoning with ProbNetKAT drawn from real-world data center networks. But first, we turn to developing the theoretical foundations (Sections 3 to 5). Probabilistic Program Equivalence for NetKAT 3 7 BACKGROUND ON PROBABILISTIC NETKAT In this section, we review the syntax and semantics of ProbNetKAT [8, 31] and basic properties of the language, focusing on the history-free fragment. A synopsis appears in Figure 2. 3.1 Syntax A packet π is a record mapping a finite set of fields f1 , f2 , . . . , fk to bounded integers n. Fields include standard header fields such as source (src) and destination (dst) addresses, as well as two logical fields for the switch (sw) and port (pt) that record the current location of the packet in the network. The logical fields are not present in a physical network packet, but it is convenient to model them as if they were. We write π .f to denote the value of field f of π and π [f :=n] for the packet obtained from π by updating field f to n. We let Pk denote the (finite) set of all packets. ProbNetKAT expressions consist of predicates (t, u, . . .) and programs (p, q, . . .). Primitive predicates include tests (f =n) and the Boolean constants false (drop) and true (skip). Compound predicates are formed using the usual Boolean connectives of disjunction (t & u), conjunction (t ; u), and negation (¬t). Primitive programs include predicates (t) and assignments (f ←n). Compound programs are formed using the operators parallel composition (p & q), sequential composition (p ; q), iteration (p ∗ ), and probabilistic choice (p ⊕r q). The full version of the language also provides a dup primitives, which logs the current state of the packet, but we omit this operator from the history-free fragment of the language considered in this paper; we discuss technical challenges to handling full ProbNetKAT in Section 7. The probabilistic choice operator p ⊕r q executes p with probability r and q with probability 1 −r , where r is rational, 0 ≤ r ≤ 1. We often use an n-ary version and omit the r ’s as in p1 ⊕ · · · ⊕ pn , which is interpreted as executing one of the pi chosen with equal probability. This can be desugared into the binary version. Conjunction of predicates and sequential composition of programs use the same syntax (t ; u and p ; q, respectively), as their semantics coincide. The same is true for disjunction of predicates and parallel composition of programs (t & u and p & q, respectively). The negation operator (¬) may only be applied to predicates. The language as presented in Figure 2 only includes core primitives, but many other useful constructs can be derived. In particular, it is straightforward to encode conditionals and while loops: if t then p else q ≜ t ; p & ¬t ; q while t do p ≜ (t ; p)∗ ; ¬t These encodings are well known from KAT [19]. Mutable and immutable local variables can also be desugared into the core calculus (although our implementation supports them directly): var f ←n in p ≜ f ←n ; p ; f ←0 Here f is an otherwise unused field. The assignment f ←0 ensures that the final value of f is “erased” after the field goes out of scope. 3.2 Semantics In the full version of ProbNetKAT, the space 2H of sets of packet histories2 is uncountable, and programs can generate continuous distributions on this space. This requires measure theory and Lebesgue integration for a suitable semantic treatment. However, as programs in our history-free fragment can generate only finite discrete distributions, we are able to give a considerably simplified presentation (Figure 2). Nevertheless, the resulting semantics is a direct restriction of the general semantics originally presented in [8, 31]. 2A history is a non-empty finite sequence of packets modeling the trajectory of a single packet through the network. 8 S. Smolka, P. Kumar, N. Foster, J. Hsu, D. Kahn, D. Kozen, and A. Silva Semantics Syntax Naturals n ::= 0 | 1 | 2 | · · · Fields f ::= f1 | · · · | fk Packets Pk ∋ π ::= {f1 = n 1 , . . . , fk = nk } Probabilities r ∈ [0, 1] ∩ Q Predicates Programs JpK ∈ 2Pk → D(2Pk ) JdropK(a) ≜ δ (∅) JskipK(a) ≜ δ (a) Jf =nK(a) ≜ δ ({π ∈ a | π .f = n}) Jf ←nK(a) ≜ δ ({π [f :=n] | π ∈ a}) t, u ::= drop | skip | f =n | t &u | t ;u | ¬t False True Test Disjunction Conjunction Negation p, q ::= t | f ←n | p &q | p ;q | p ⊕r q | p∗ n ∈N Filter (0) ≜ skip, p (n+1) ≜ skip & p ; p (n) where p Assignment Union (Discrete) Probability Monad D Sequence Unit δ : X → D(X ) δ (x) ≜ δ x Choice Iteration Bind −† : (X → D(Y )) → D(X ) → D(Y ) Í f † (µ)(A) ≜ x ∈X f (x)(A) · µ(x) J¬tK(a) ≜ D(λb.a − b)(JtK(a)) Jp & qK(a) ≜ D(∪)(JpK(a) × JqK(a)) Jp ; qK(a) ≜ JqK† (JpK(a)) Jp ⊕r qK(a) ≜ rÄ · JpK(a) + (1 − r ) · JqK(a) Jp ∗ K(a) ≜ Jp (n) K(a) Fig. 2. ProbNetKAT core language: syntax and semantics. Proposition 3.1. Let L−M denote the semantics defined in [31]. Then for all dup-free programs p and inputs a ∈ 2Pk , we have JpK(a) = LpM(a), where we identify packets and histories of length one. Proof. The proof is given in Appendix A. □ For the purposes of this paper, we work in the discrete space 2Pk , i.e., the set of sets of packets. An outcome (denoted by lowercase variables a, b, c, . . . ) is a set of packets and an event (denoted by uppercase variables A, B, C, . . . ) is a set of outcomes. Given a discrete probability measure on this space, the probability of an event is the sum of the probabilities of its outcomes. Programs are interpreted as Markov kernels on the space 2Pk . A Markov kernel is a function 2Pk → D(2Pk ) in the probability (or Giry) monad D [11, 18]. Thus, a program p maps an input set of packets a ∈ 2Pk to a distribution JpK(a) ∈ D(2Pk ) over output sets of packets. The semantics uses the following probabilistic primitives:3 • For a discrete measurable space X , D(X ) denotes the set of probability measures over X ; that is, the set of countably additive functions µ : 2X → [0, 1] with µ(X ) = 1. • For a measurable function f : X → Y , D(f ) : D(X ) → D(Y ) denotes the pushforward along f ; that is, the function that maps a measure µ on X to D(f )(µ) ≜ µ ◦ f −1 = λA ∈ ΣY . µ({x ∈ X | f (x) ∈ A}) which is called the pushforward measure on Y . • The unit δ : X → D(X ) of the monad maps a point x ∈ X to the point mass (or Dirac measure) δ x ∈ D(X ). The Dirac measure is given by δ x (A) ≜ 1[x ∈ A] 3 The same primitives can be defined for uncountable spaces, as would be required to handle the full language. Probabilistic Program Equivalence for NetKAT 9 That is, the Dirac measure is 1 if x ∈ A and 0 otherwise. • The bind operation of the monad, −† : (X → D(Y )) → D(X ) → D(Y ) lifts a function f : X → D(Y ) with deterministic inputs to a function f † : D(X ) → D(Y ) that takes random inputs. Intuitively, this is achieved by averaging the output of f when the inputs are randomly distributed according to µ. Formally, Õ f † (µ)(A) ≜ f (x)(A) · µ(x). x ∈X • Given two measures µ ∈ D(X ) and ν ∈ D(Y ), µ × ν ∈ D(X × Y ) denotes their product measure. This is the unique measure satisfying: (µ × ν)(A × B) = µ(A) · ν (B) Intuitively, it models distributions over pairs of independent values. With these primitives at our disposal, we can now make our operational intuitions precise. Formal definitions are given in Figure 2. A predicate t maps (with probability 1) the set of input packets a ∈ 2Pk to the subset of packets b ⊆ a satisfying the predicate. In particular, the false primitive drop simply drops all packets (i.e., it returns the empty set with probability 1) and the true primitive skip simply keeps all packets (i.e., it returns the input set with probability 1). The test f =n returns the subset of input packets whose f -field contains n. Negation ¬t filters out the packets returned by t. Parallel composition p & q executes p and q independently on the input set, then returns the union of their results. Note that packet sets do not model nondeterminism, unlike the usual situation in Kleene algebras—rather, they model collections of packets traversing possibly different portions of the network simultaneously. Probabilistic choice p ⊕r q feeds the input to both p and q and returns a convex combination of the output distributions according to r . Sequential composition p ; q can be thought of as a two-stage probabilistic experiment: it first executes p on the input set to obtain a random intermediate result, then feeds that into q to obtain the final distribution over outputs. The outcome of q needs to be averaged over the distribution of intermediate results produced by p. It may be helpful to think about summing over the paths in a probabilistic tree diagram and multiplying the probabilities along each path. We say that two programs are equivalent, denoted p ≡ q, if they denote the same Markov kernel, i.e. if JpK = JqK. As usual, we expect Kleene star p ∗ to satisfy the characteristic fixed point equation p ∗ ≡ skip & p ; p ∗ , which allows it to be unrolled ad infinitum. Thus we define it as the supremum of its finite unrollings p (n) ; see Figure 2. This supremum is taken in a CPO (D(2Pk ), ⊑) of distributions that is described in more detail in § 3.3. The partial ordering ⊑ on packet set distributions gives rise to a partial ordering on programs: we write p ≤ q iff JpK(a) ⊑ JqK(a) for all inputs a ∈ 2Pk . Intuitively, p ≤ q iff p produces any particular output packet π with probability at most that of q for any fixed input. A fact that should be intuitively clear, although it is somewhat hidden in our presentation of the denotational semantics, is that the predicates form a Boolean algebra: Lemma 3.2. Every predicate t satisfies JtK(a) = δ a∩bt for a certain packet set bt ⊆ Pk, where • bdrop = ∅, • bskip = Pk, • bf =n = {π ∈ Pk | π .f = n}, 10 S. Smolka, P. Kumar, N. Foster, J. Hsu, D. Kahn, D. Kozen, and A. Silva • b¬t = Pk − bt , • bt &u = bt ∪ bu , and • bt ;u = bt ∩ bu . Proof. For drop, skip, and f =n, the claim holds trivially. For ¬t, t & u, and t ; u, the claim follows inductively, using that D(f )(δb ) = δ f (b) , δb × δc = δ (b,c) , and that f † (δb ) = f (b). The first and last equations hold because ⟨D, δ, −† ⟩ is a monad. □ 3.3 The CPO (D(2Pk ), ⊑) The space 2Pk with the subset order forms a CPO (2Pk , ⊆). Following Saheb-Djahromi [27], this CPO can be lifted to a CPO (D(2Pk ), ⊑) on distributions over 2Pk . Because 2Pk is a finite space, the resulting ordering ⊑ on distributions takes a particularly easy form: µ ⊑ν ⇐⇒ µ({a}↑) ≤ ν ({a}↑) for all a ⊆ Pk where {a}↑ ≜ {b | a ⊆ b} denotes upward closure. Intuitively, ν produces more outputs then µ. As was shown in [31], ProbNetKAT satisfies various monotonicity (and continuity) properties with respect to this ordering, including a ⊆ a ′ =⇒ JpK(a) ⊑ JpK(a ′) and n ≤ m =⇒ Jp (n) K(a) ⊑ Jp (m) K(a). As a result, the semantics of p ∗ as the supremum of its finite unrollings p (n) is well-defined. While the semantics of full ProbNetKAT requires domain theory to give a satisfactory characterization of Kleene star, a simpler characterization suffices for the history-free fragment: Lemma 3.3 (Pointwise Convergence). Let A ⊆ 2Pk . Then for all programs p and inputs a ∈ 2Pk , Jp ∗ K(a)(A) = lim Jp (n) K(a)(A). n→∞ Proof. See Appendix A □ This lemma crucially relies on our restrictions to dup-free programs and the space 2Pk . With this insight, we can now move to a concrete semantics based on Markov chains, enabling effective computation of program semantics. 4 BIG-STEP SEMANTICS The Scott-style denotational semantics of ProbNetKAT interprets programs as Markov kernels 2Pk → D(2Pk ). Iteration is characterized in terms of approximations in a CPO (D(2Pk ), ⊑) of distributions. In this section we relate this semantics to a Markov chain semantics on a state space consisting of finitely many packets. Since the set of packets Pk is finite, so is its powerset 2Pk . Thus any distribution over packet sets is discrete and can be characterized by a probability mass function, i.e. a function Õ f : 2Pk → [0, 1], f (b) = 1 b ⊆Pk It is convenient to view f as a stochastic vector, i.e. a vector of non-negative entries that sums to 1. The vector is indexed by packet sets b ⊆ Pk with b-th component f (b). A program, being a function that maps inputs a to distributions over outputs, can then be organized as a square matrix indexed by Pk in which the stochastic vector corresponding to input a appears as the a-th row. Pk Pk Thus we can interpret a program p as a matrix BJpK ∈ [0, 1]2 ×2 indexed by packet sets, where the matrix entry BJpKab denotes the probability that program p produces output b ∈ 2Pk on input a ∈ 2Pk . The rows of BJpK are stochastic vectors, each encoding the output distribution Probabilistic Program Equivalence for NetKAT 11 BJpK ∈ S(2Pk ) BJdropKab ≜ 1[b = ∅] BJp & qKab ≜ Õ 1[c ∪ d = b] · BJpKa,c · BJqKa,d c,d BJskipKab ≜ 1[a = b] BJf =nKab ≜ 1[b = {π ∈ a | π .f = n}] BJ¬tKab ≜ 1[b ⊆ a] · BJtKa,a−b BJf ←nKab ≜ 1[b = {π [f := n] | π ∈ a}] BJp ; qK ≜ BJpK · BJqK BJp ⊕r qK ≜ r · BJpK + (1 − r ) · BJqK BJp ∗ Kab ≜ lim BJp (n) Kab n→∞ Fig. 3. Big-Step Semantics: BJpKab denotes the probability that program p produces output b on input a. corresponding to a particular input set a. Such a matrix is called (right-)stochastic. We denote by S(2Pk ) the set of right-stochastic square matrices indexed by 2Pk . The interpretation of programs as stochastic matrices is largely straightforward and given formally in Figure 3. At a high level, deterministic program primitives map to simple (0, 1)-matrices, and program operators map to operations on matrices. For example, the program primitive drop is interpreted as the stochastic matrix ∅ b2 ... bn 1  ..  .. BJdropK = .  .  an  1  ∅ 0 · · · 0  .. . . ..  . .  .  0 · · · 0  a2 1 .. . an a1 = ∅ 1 (1) 1 that moves all probability mass to the ∅-column, and the primitive skip is the identity matrix. The formal definitions are given in Figure 3 using Iverson brackets: 1[φ] is defined to be 1 if φ is true, or 0 otherwise. As suggested by the picture in (1), a stochastic matrix B ∈ S(2Pk ) can be viewed as a Markov chain (MC), a probabilistic transition system with state space 2Pk that makes a random transition between states at each time step. The matrix entry Bab gives the probability that, whenever the system is in state a, it transitions to state b in the next time step. Under this interpretation, sequential composition becomes matrix product: a step from a to b in BJp ; qK decomposes into a step from a to some intermediate state c in BJpK and a step from c to the final state b in BJqK with probability Õ BJp ; qKab = BJpKac · BJqKcb = (BJpK · BJqK)ab . c 4.1 Soundness The main theoretical result of this section is that the finite matrix BJpK fully characterizes the behavior of a program p on packets. Theorem 4.1 (Soundness). For any program p and any sets a, b ∈ 2Pk , BJp ∗ K is well-defined, BJpK is a stochastic matrix, and BJpKab = JpK(a)({b}). Proof. It suffices to show the equality BJpKab = JpK(a)({b}); the remaining claims then follow by well-definedness of J−K. The equality is shown using Lemma 3.3 and a routine induction on p: For p = drop, skip, f =n, f ←n we have JpK(a)({b}) = δc ({b}) = 1[b = c] = BJpKab for c = ∅, a, {π ∈ a | π .f = n}, {π [f := n] | π ∈ a}, respectively. 12 S. Smolka, P. Kumar, N. Foster, J. Hsu, D. Kahn, D. Kozen, and A. Silva For ¬t we have, BJ¬tKab = 1[b ⊆ a] · BJtKa,a−b = 1[b ⊆ a] · JtK(a)({a − b}) = 1[b ⊆ a] · 1[a − b = a ∩ bt ] = 1[b ⊆ a] · 1[a − b = a − (H − bt )] = 1[b = a ∩ (H − bt )] = J¬tK(a)(b) (IH) (Lemma 3.2) (Lemma 3.2) For p & q, letting µ = JpK(a) and ν = JqK(a) we have Jp & qK(a)({b}) = (µ × ν )({(b1 , b2 ) | b1 ∪ b2 = b}) Í = b1,b2 1[b1 ∪ b2 = b] · (µ × ν )({(b1 , b2 )}) Í = Íb1,b2 1[b1 ∪ b2 = b] · µ({b1 }) · ν ({b2 }) = b1,b2 1[b1 ∪ b2 = b] · BJpKab1 · BJqKab2 = BJp & qKab (IH) where we use in the second step that b ⊆ Pk is finite, thus {(b1 , b2 ) | b1 ∪ b2 = b} is finite. For p ; q, let µ = JpK(a) and νc = JqK(c) and recall that µ is a discrete distribution on 2Pk . Thus Í Jp ; qK(a)({b}) = Íc ∈2Pk νc ({b}) · µ({c}) = c ∈2Pk BJqKc,b · BJpKa,c = BJp ; qKab . For p ⊕r q, the claim follows directly from the induction hypotheses. Finally, for p ∗ , we know that BJp (n) Kab = Jp (n) K(a)({b}) by induction hypothesis. The key to proving the claim is Lemma 3.3, which allows us to take the limit on both sides and deduce BJp ∗ Kab = lim BJp (n) Kab = lim Jp (n) K(a)({b}) = Jp ∗ K(a)({b}). n→∞ n→∞ □ Together, these results reduce the problem of checking program equivalence for p and q to checking equality of the matrices produced by the big-step semantics, BJpK and BJqK. Corollary 4.2. For programs p and q, JpK = JqK if and only if BJpK = BJqK. Proof. Follows directly from Theorem 4.1. □ Unfortunately, BJp ∗ K is defined in terms of a limit. Thus, it is not obvious how to compute the big-step matrix in general. The next section is concerned with finding a closed form for the limit, resulting in a representation that can be effectively computed, as well as a decision procedure. 5 SMALL-STEP SEMANTICS This section derives a closed form for BJp ∗ K, allowing to compute BJ−K explicitly. This yields an effective mechanism for checking program equivalence on packets. In the “big-step” semantics for ProbNetKAT, programs are interpreted as Markov chains over the state space 2Pk , such that a single step of the chain models the entire execution of a program, going directly from some initial state a (corresponding to the set of input packets) to the final state b (corresponding to the set of output packets). Here we will instead take a “small-step” approach and design a Markov chain such that one transition models one iteration of p ∗ . To a first approximation, the states (or configurations) of our probabilistic transition system are triples ⟨p, a, b⟩, consisting of the program p we mean to execute, the current set of (input) packets a, and an accumulator set b of packets output so far. The execution of p ∗ on input a ⊆ Pk starts from the initial state ⟨p ∗ , a, ∅⟩. It proceeds by unrolling p ∗ according to the characteristic equation Probabilistic Program Equivalence for NetKAT 1 ⟨p ∗ , a, b⟩ 13 ⟨skip & p ; p ∗ , a, b⟩ 1 ⟨p ; p ∗ , a, b ∪ a⟩ B Jp K a, a ′ BJpKa,a ′ ⟨p ∗ , a ′, b ∪ a⟩ Fig. 4. The small-step semantics is given by a Markov chain whose states are configurations of the form ⟨program, input set, output accumulator⟩. The three dashed arrows can be collapsed into the single solid arrow, rendering the program component superfluous. p ∗ ≡ skip & p ; p ∗ with probability 1: 1 ⟨p ∗ , a, ∅⟩ −−−−−−−−−→ ⟨skip & p ; p ∗ , a, ∅⟩ To execute a union of programs, we must execute both programs on the input set and take the union of their results. In the case of skip & p ; p ∗ , we can immediately execute skip by outputting the input set with probability 1, leaving the right hand side of the union: 1 ⟨skip & p ; p ∗ , a, ∅⟩ −−−−−−−−−→ ⟨p ; p ∗ , a, a⟩ To execute the sequence p ; p ∗ , we first execute p and then feed its (random) output into p ∗ : ∀a ′ : BJpKa, a ′ ⟨p ; p ∗ , a, a⟩ −−−−−−−−−→ ⟨p ∗ , a ′, a⟩ At this point the cycle closes and we are back to executing p ∗ , albeit with a different input set a ′ and some accumulated outputs. The structure of the resulting Markov chain is shown in Figure 4. At this point we notice that the first two steps of execution are deterministic, and so we can collapse all three steps into a single one, as illustrated in Figure 4. After this simplification, the program component of the states is rendered obsolete since it remains constant across transitions. Thus we can eliminate it, resulting in a Markov chain over the state space 2Pk × 2Pk . Formally, it can be defined concisely as SJpK ∈ S(2Pk × 2Pk ) SJpK(a,b),(a ′,b ′ ) ≜ 1[b ′ = b ∪ a] · BJpKa,a ′ As a first sanity check, we verify that the matrix SJpK defines indeed a Markov chain: Lemma 5.1. SJpK is stochastic. Proof. For arbitrary a, b ⊆ Pk, we have Õ Õ SJpK(a,b),(a ′,b ′ ) = 1[b ′ = a ∪ b] · BJpKa,a ′ a ′,b ′ a ′,b ′ = Õ Õ = Õ a′  1[b ′ = a ∪ b] · BJpKa,a ′ b′ BJpKa,a ′ = 1 a′ where, in the last step, we use that BJpK is stochastic (Theorem 4.1). □ Next, we show that steps in SJpK indeed model iterations of p ∗ . Formally, the (n + 1)-step of SJpK is equivalent to the big-step behavior of the n-th unrolling of p ∗ in the following sense: 14 S. Smolka, P. Kumar, N. Foster, J. Hsu, D. Kahn, D. Kozen, and A. Silva Proposition 5.2. BJp (n) Ka,b = Í a′ SJpKn+1 (a,∅),(a ′,b) Proof. Naive induction on the number of steps n ≥ 0 fails, because the hypothesis is too weak. We must first generalize it to apply to arbitrary start states in SJpK, not only those with empty accumulator. The appropriate generalization of the claim turns out to be: Lemma 5.3. Let p be program. Then for all n ∈ N and a, b, b ′ ⊆ Pk, Õ Õ 1[b ′ = a ′ ∪ b] · BJp (n) Ka,a ′ = SJpKn+1 (a,b),(a ′,b ′ ) a′ Proof. a′ By induction on n ≥ 0. For n = 0, we have Õ Õ 1[b ′ = a ′ ∪ b] · BJp (n) Ka,a ′ = 1[b ′ = a ′ ∪ b] · BJskipKa,a ′ a′ a′ = Õ 1[b ′ = a ′ ∪ b] · 1[a = a ′] a′ = 1[b ′ = a ∪ b] = 1[b ′ = a ∪ b] · Õ BJpKa,a ′ a′ = Õ SJpK(a,b),(a ′,b ′ ) a′ In the induction step (n > 0), Õ 1[b ′ = a ′ ∪ b] · BJp (n) Ka,a ′ a′ = Õ = Õ a′ 1[b ′ = a ′ ∪ b] · BJskip & p ; p (n−1) Ka,a ′ 1[b ′ = a ′ ∪ b] · Õ c a′ 1[a ′ = a ∪ c] · BJp ; p (n−1) Ka,c ! = Õ Õ = Õ c 1[b = a ∪ b] · 1[a = a ∪ c] · ′ ′ ′ Õ a′ k 1[b = a ∪ c ∪ b] · BJpKa,k · BJp ′ (n−1) c,k = Õ BJpKa,k · a′ k = Õ BJpKa,k · ÕÕ a′ = = Õ a′ Kk,c 1[b ′ = a ′ ∪ (a ∪ b)] · BJp (n−1) Kk,a ′ SJpKn(k,a∪b),(a ′,b ′ ) 1[k 2 = a ∪ b] · BJpKa,k1 · SJpKn(k1,k2 ),(a ′,b ′ ) k 1,k 2 ÕÕ a′ Õ a′ k = Õ BJpKa,k · BJp (n−1) Kk,c SJpK(a,b)(k1,k2 ) · SJpKn(k1,k2 ),(a ′,b ′ ) k 1,k 2 SJpKn+1 (a,b),(a ′,b ′ ) Proposition 5.2 then follows by instantiating Lemma 5.3 with b = ∅. □ □ Probabilistic Program Equivalence for NetKAT 5.1 15 Closed form Let (an , bn ) denote the random state of the Markov chain SJpK after taking n steps starting from (a, ∅). We are interested in the distribution of bn for n → ∞, since this is exactly the distribution of outputs generated by p ∗ on input a (by Proposition 5.2 and the definition of BJp ∗ K). Intuitively, the ∞-step behavior of SJpK is equivalent to the big-step behavior of p ∗ . The limiting behavior of finite state Markov chains has been well-studied in the literature (e.g., see [16]), and we can exploit these results to obtain a closed form by massaging SJpK into a so called absorbing Markov chain. A state s of a Markov chain T is called absorbing if it transitions to itself with probability 1: s (formally: Ts,s ′ = 1[s = s ′]) 1 A Markov chain T ∈ S(S) is called absorbing if each state can reach an absorbing state: n ∀s ∈ S. ∃s ′ ∈ S, n ≥ 0. Ts,s ′ > 0 and Ts ′,s ′ = 1 The non-absorbing states of an absorbing MC are called transient. Assume T is absorbing with nt transient states and na absorbing states. After reordering the states so that absorbing states appear before transient states, T has the form   I 0 T = R Q where I is the na × na identity matrix, R is an nt × na matrix giving the probabilities of transient states transitioning to absorbing states, and Q is an nt ×nt square matrix specifying the probabilities of transient states transitioning to transient states. Absorbing states never transition to transient states, thus the na × nt zero matrix in the upper right corner. No matter the start state, a finite state absorbing MC always ends up in an absorbing state eventually, i.e. the limit T ∞ ≜ limn→∞ T n exists and has the form   I 0 ∞ T = A 0 for an nt × na matrix A of so called absorption probabilities, which can be given in closed form: A = (I + Q + Q 2 + . . . ) R That is, to transition from a transient state to an absorbing state, the MC can first take an arbitrary number of steps between transient states, before taking a single and final step into an absorbing Í state. The infinite sum X ≜ n ≥0 Q n satisfies X = I + QX , and solving for X we get X = (I − Q)−1 and A = (I − Q)−1 R (2) (We refer the reader to [16] or Lemma A.2 in Appendix A for the proof that the inverse must exist.) Before we apply this theory to the small-step semantics SJ−K, it will be useful to introduce some T MC-specific notation. Let T be an MC. We write s − →n s ′ if s can reach s ′ in precisely n steps, i.e. T n > 0; and we write s − n > 0 for any if Ts,s → s ′ if s can reach s ′ in any number of steps, i.e. if Ts,s ′ ′ T T T n ≥ 0. Two states are said to communicate, denoted s ← → s ′, if s − → s ′ and s ′ − → s. The relation T ← → is an equivalence relation, and its equivalence classes are called communication classes. A communication class is called absorbing if it cannot reach any states outside the class. We sometimes T n . For the rest of the section, we fix a program p and write Pr[s − →n s ′] to denote the probability Ts,s ′ abbreviate BJpK as B and SJpK as S. Of central importance are what we will call the saturated states of S: 16 S. Smolka, P. Kumar, N. Foster, J. Hsu, D. Kahn, D. Kozen, and A. Silva Definition 5.4. A state (a, b) of S is called saturated if the accumulator b has reached its final S value, i.e. if (a, b) → − (a ′, b ′) implies b ′ = b. Once we have reached a saturated state, the output of p ∗ is determined. The probability of ending up in a saturated state with accumulator b, starting from an initial state (a, ∅), is Õ n lim S (a,∅),(a ′,b) n→∞ a′ that p ∗ and indeed this is the probability outputs b on input a by Proposition 5.2. Unfortunately, a saturated state is not necessarily absorbing. To see this, assume there exists only a single field f ranging over {0, 1} and consider the program p ∗ = (f ←0 ⊕1/2 f ←1)∗ . Then S has the form 0, 0 0, {0, 1} 1, 0 1, {0, 1} 0, ∅ where all edges are implicitly labeled with 12 , 0 denotes the packet with f set to 0 and 1 denotes the packet with f set to 1, and we omit states not reachable from (0, ∅). The two right most states are saturated; but they communicate and are thus not absorbing. We can fix this by defining the auxiliary matrix U ∈ S(2Pk × 2Pk ) as ( 1[a ′ = ∅] if (a, b) is saturated ′ U(a,b),(a ′,b ′ ) ≜ 1[b = b] · 1[a ′ = a] else It sends a saturated state (a, b) to the canonical saturated state (∅, b), which is always absorbing; and it acts as the identity on all other states. In our example, the modified chain SU looks as follows: 0, {0, 1} 0, 0 ∅, {0, 1} 0, ∅ 1, {0, 1} 1, 0 To show that SU is always an absorbing MC, we first observe: S Lemma 5.5. S, U , and SU are monotone in the following sense: (a, b) → − (a ′, b ′) implies b ⊆ b ′ (and similarly for U and SU ). Proof. For S and U the claim follows directly from their definitions. For SU the claim then follows compositionally. □ Now we can show: Proposition 5.6. Let n ≥ 1. (1) (SU )n = S n U (2) SU is an absorbing MC with absorbing states {(∅, b) | b ⊆ Pk}. Proof. (1) It suffices to show that U SU = SU . Suppose that U SU Pr[(a, b) −−−−→1 (a ′, b ′)] = p > 0. Probabilistic Program Equivalence for NetKAT 17 It suffices to show that this implies SU Pr[(a, b) −−→1 (a ′, b ′)] = p. If (a, b) is saturated, then we must have (a ′, b ′) = (∅, b) and U SU SU Pr[(a, b) −−−−→1 (∅, b)] = 1 = Pr[(a, b) −−→1 (∅, b)] U If (a, b) is not saturated, then (a, b) −→1 (a, b) with probability 1 and therefore U SU SU Pr[(a, b) −−−−→1 (a ′, b ′)] = Pr[(a, b) −−→1 (a ′, b ′)] (2) Since S and U are stochastic, clearly SU is a MC. Since SU is finite state, any state can reach an SU absorbing communication class. (To see this, note that the reachability relation −−→ induces a partial order on the communication classes of SU . Its maximal elements are necessarily absorbing, and they must exist because the state space is finite.) It thus suffices to show that a state set C ⊆ 2Pk × 2Pk in SU is an absorbing communication class iff C = {(∅, b)} for some b ⊆ Pk. B S “⇐”: Observe that ∅ − →1 a ′ iff a ′ = ∅. Thus (∅, b) → − 1 (a ′, b ′) iff a ′ = ∅ and b ′ = b, and likewise U (∅, b) −→1 (a ′, b ′) iff a ′ = ∅ and b ′ = b. Thus (∅, b) is an absorbing state in SU as required. SU “⇒”: First observe that by monotonicity of SU (Lemma 5.5), we have b = b ′ whenever (a, b) ←→ (a ′, b ′); thus there exists a fixed bC such that (a, b) ∈ C implies b = bC . SU Now pick an arbitrary state (a, bC ) ∈ C. It suffices to show that (a, bC ) −−→ (∅, bC ), because SU that implies (a, bC ) ←→ (∅, bC ), which in turn implies a = ∅. But the choice of (a, bC ) ∈ C was arbitrary, so that would mean C = {(∅, bC )} as claimed. SU To show that (a, bC ) −−→ (∅, bC ), pick arbitrary states such that S U (a, bC ) → − (a ′, b ′) −→1 (a ′′, b ′′) SU SU and recall that this implies (a, bC ) −−→ (a ′′, b ′′) by claim (1). Then (a ′′, b ′′) −−→ (a, bC ) because C is absorbing, and thus bC = b ′ = b ′′ by monotonicity of S, U , and SU . But (a ′, b ′) was chosen as an arbitrary state S-reachable from (a, bC ), so (a, b) and by transitivity (a ′, b ′) must be saturated. Thus a ′′ = ∅ by the definition of U . □ Arranging the states (a, b) in lexicographically ascending order according to ⊆ and letting n = |2Pk |, it then follows from Proposition 5.6.2 that SU has the form   In 0 SU = R Q where for a , ∅  (SU )(a,b),(a ′,b ′ ) = R Moreover, SU converges and its limit is given by  In ∞ (SU ) ≜ (I − Q)−1R Q  (a,b),(a ′,b ′ )  0 = lim (SU )n 0 n→∞ (3) We can use the modified Markov chain SU to compute the limit of S: Theorem 5.7 (Closed Form). Let a, b, b ′ ⊆ Pk. Then Õ n ∞ lim S (a,b),(a ′,b ′ ) = (SU )(a,b),(∅,b ′ ) n→∞ a′ (4) 18 S. Smolka, P. Kumar, N. Foster, J. Hsu, D. Kahn, D. Kozen, and A. Silva or, using matrix notation, lim Õ n→∞ a′ n S (−,−),(a ′,−)  Pk Pk Pk In = ∈ [0, 1](2 ×2 )×2 (I − Q)−1 R  (5) In particular, the limit in (4) exists and it can be effectively computed in closed-form. Proof. Using Proposition 5.6.1 in the second step and equation (3) in the last step, Õ Õ n lim S (a,b),(a (S n U )(a,b),(a ′,b ′ ) ′,b ′ ) = lim n→∞ n→∞ a′ = lim n→∞ = a′ Õ a′ (SU )n(a,b),(a ′,b ′ ) Õ ∞ (SU )∞ (a,b),(a ′,b ′ ) = (SU )(a,b),(∅,b ′ ) a′ (SU )∞ is computable because S and U are matrices over Q and hence so is (I − Q)−1 R. □ Corollary 5.8. For programs p and q, it is decidable whether p ≡ q. Proof. Recall from Corollary 4.2 that it suffices to compute the finite rational matrices BJpK and BJqK and check them for equality. But Theorem 5.7 together with Proposition 5.2 gives us an effective mechanism to compute BJ−K in the case of Kleene star, and BJ−K is straightforward to compute in all other cases. To summarize, we repeat the full chain of equalities we have deduced: Õ Jp ∗ K(a)({b}) = BJp ∗ Ka,b = lim BJp (n) Ka,b = lim SJpKn(a,∅),(a ′,b) = (SU )∞ (a,∅),(∅,b) n→∞ n→∞ a′ (From left to right: Theorem 4.1, Definition of BJ−K, Proposition 5.2, and Theorem 5.7.) 6 □ CASE STUDY: RESILIENT ROUTING We have build a prototype based on Theorem 5.7 and Corollary 5.8 in OCaml. It implements ProbNetKAT as an embedded DSL and compiles ProbNetKAT programs to transition matrices using symbolic techniques and a sparse linear algebra solver. A detailed description and performance evaluation of the implementation is beyond the scope of this paper. Here we focus on demonstrating the utility of such a tool by performing a case study with real-world datacenter topologies and resilient routing schemes. Recently proposed datacenter designs [1, 13, 14, 21, 24, 29] utilize a large number of inexpensive commodity switches, which improves scalability and reduces cost compared to other approaches. However, relying on many commodity devices also increases the probability of failures. A recent measurement study showed that network failures in datacenters [10] can have a major impact on application-level performance, leading to a new line of work exploring the design of fault-tolerant datacenter fabrics. Typically the topology and routing scheme are co-designed, to achieve good resilience while still providing good performance in terms of throughput and latency. 6.1 Topology and routing Datacenter topologies typically organize the fabric into multiple levels of switches. FatTree. A FatTree [1], which is a multi-level, multi-rooted tree, is perhaps the most common example of such a topology. Figure 5 shows a 3-level FatTree topology with 20 switches. The bottom level, edge, consists of top-of-rack (ToR) switches; each ToR switch connects all the hosts within a rack (not shown in the figure). These switches act as ingress and egress for intra-datacenter traffic. Probabilistic Program Equivalence for NetKAT 19 Core C ✗ Aggregation A ✗ A′ A′′ Edge s1 s2 s3 s4 s5 s6 s7 s8 Fig. 5. A FatTree topology with 20 switches. s1 s2 s3 s4 s5 s6 s7 s8 Fig. 6. An AB FatTree topology with 20 switches. The other two levels, aggregation and core, redundantly interconnect the switches from the edge layer. The redundant structure of a FatTree naturally lends itself to forwarding schemes that locally route around failures. To illustrate, consider routing from a source (s7) to a destination (s1) along shortest paths in the example topology. Packets are first forwarded upwards, until eventually there exists a downward path to s1. The green links in the figure depict one such path. On the way up, there are multiple paths at each switch that can be used to forward traffic. Thus, we can route around failures by simply choosing an alternate upward link. A common routing scheme is called equal-cost multi-path routing (ECMP) in the literature, because it chooses between several paths all having the same cost—e.g., path length. ECMP is especially attractive as is it can provide better resilience without increasing the lengths of forwarding paths. However, after reaching a core switch, there is a unique shortest path to the destination, so ECMP no longer provides any resilience if a switch fails in the aggregation layer (cf. the red cross in Figure 5). A more sophisticated scheme could take a longer (5-hop) detour going all the way to another edge switch, as shown by the red lines in the figure. Unfortunately, such detours inflate the path length and lead to increased latency and congestion. AB FatTree. FatTree’s unpleasantly long backup routes on the downward paths are caused by the symmetric wiring of aggregation and core switches. AB FatTrees [21] alleviate this flaw by skewing the symmetry of wiring. It defines two types of subtrees, differing in their wiring to higher levels. To illustrate, Figure 6 shows an example which rewires the FatTree from Figure 5 to make it an AB FatTree. It contains two types of subtrees: i) Type A: switches depicted in blue and wired to core using dashed lines, and ii) Type B: switches depicted in red and wired to core using solid lines. Type A subtrees are wired in a way similar to FatTree, but type B subtrees differ in their connections to core switches (see the original paper for full details [21]). This slight change in wiring enables shorter detours to route around failures in the downward direction. Consider again a flow involving the same source (s7) and destination (s1). As before, we have multiple options going upwards when following shortest paths (e.g., the one depicted in green), but we have a unique downward path once we reach the top. But unlike FatTree, if the aggregation switch on the downward path fails, we find that there is a short (3-hop) detour, as shown in blue. This backup path exists because the core switch, which needs to reroute traffic, is connected to aggregation switches of both types of subtrees. More generally, aggregation switches of the same type as the failed switch provide a 5-hop detour (as in a standard FatTrees); but aggregation switches of the opposite type can provide a more efficient 3-hop detour. 20 S. Smolka, P. Kumar, N. Foster, J. Hsu, D. Kahn, D. Kozen, and A. Silva // F10 with 3-hop & 5-hop rerouting // F10 without rerouting f10_3_5 := f10_0 := if at_ingress then (default <- 1); // ECMP, but don’t use inport if default = 1 then ( fwd_on_random_shortest_path f10_3; if at_down_port then (5hop_rr; default <- 0) // F10 with 3-hop rerouting ) else ( f10_3 := default <- 1; // back to default forwarding f10_0; fwd_downward_uniformly_at_random if at_down_port then 3hop_rr ) Fig. 7. ProbNetKAT implementation of F10 in three refinement steps. 6.2 ProbNetKAT implementation. Now we will see how to encode several routing schemes using ProbNetKAT and analyze their behavior in each topology under various failure models. Routing. F10 [21] provides a routing algorithm that combines the three routing and rerouting strategies we just discussed (ECMP, 3-hop rerouting, 5-hop rerouting) into a single scheme. We implemented it in three steps (see Figure 7). The first scheme, F100 , implements an approach similar to ECMP:4 it chooses a port uniformly at random from the set of ports connected to minimumlength paths to the destination. We exclude the port at which the packet arrived from this set; this eliminates the possibility of forwarding loops when routing around failures. Next, we improve the resilience of F100 by augmenting it with 3-hop rerouting if the next hop aggregation switch A along the downward shortest path from a core switch C fails. To illustrate, consider the blue path in Figure 6. We find a port on C that connects to an aggregation switch A′ of the opposite type than the failed aggregation switch, A, and forward the packet to A′. If there are multiple such ports that have not failed, we choose one uniformly at random. Normal routing continues at A′, and ECMP will know not to send the packet back to C. F103 implements this refinement. Note that if the packet is still parked at port whose adjacent link is down after executing F103 , it must be that all ports connecting to aggregation switches of the opposite type are down. In this case, we attempt 5-hop rerouting via an aggregation switch A′′ of the same type as A. To illustrate, consider the red path in Figure 6. We begin by sending the packet to A′′. To let A′′ know that it should not send the packet back up as normally, we set a flag default to false in the packet, telling A′′ to send the packet further down instead. From there, default routing continues. F103,5 implements this refinement. p Failure and Network model. We define a family of failure models fk in the style of Section 2. Let k ∈ N∪{∞} denote a bound on the maximum number of link failures that may occur simultaneously, and assume that links otherwise fail independently with probability 0 ≤ p < 1 each. We omit p when it is clear from context. For simplicity, to focus on the more complicated scenarios occurring on downward paths, we will model failures only for links connecting the aggregation and core layer. Our network model works much like the one from Section 2. However, we model a single destination, switch 1, and we elide the final hop to the appropriate host connected to this switch. M(p, t) ≜ in ; do (p ; t) while (¬sw=1) 4 ECMP implementations are usually based on hashing, which approximates random forwarding provided there is sufficient entropy in the header fields used to select an outgoing port. Probabilistic Program Equivalence for NetKAT k 0 1 2 3 4 ∞ b b b M(F10 0, t, f k ) M(F10 3, t, f k ) M(F10 3,5, t, f k ) ≡ teleport ≡ teleport ≡ teleport ✓ ✗ ✗ ✗ ✗ ✗ ✓ ✓ ✓ ✗ ✗ ✗ ✓ ✓ ✓ ✓ ✗ ✗ Table 1. Evaluating k-resilience of F10. 21 k 0 1 2 3 4 ∞ compare compare compare (F100, F103 ) (F103, F103,5 ) (F103,5, teleport) ≡ < < < < < ≡ ≡ ≡ < < < ≡ ≡ ≡ ≡ < < Table 2. Comparing schemes under k failures. The ingress predicate in is a disjunction of switch-and-port tests over all ingress locations. This first b t, f ) that integrates the failure model and declares all model is embedded into a refined model M(p, necessary local variables that track the healthiness of individual ports: b t, f ) ≜ var up1 ←1 in M(p, ... var upd ←1 in M((f ; p), t) Here d denotes the maximum degree of all nodes in the FatTree and AB FatTree topologies from Figures 5 and 6, which we encode as programs fattree and abfattree. much like in Section 2.2. 6.3 Checking invariants We can gain confidence in the correctness of our implementation of F10 by verifying that it maintains certain key invariants. As an example, recall our implementation of F103,5 : when we perform 5-hop rerouting, we use an extra bit (default) to notify the next hop aggregation switch to forward the packet downwards instead of performing default forwarding. The next hop follows this instruction and also sets default back to 1. By design, the packet can not be delivered to the destination with default set to 0. To verify this property, we check the following equivalence: b b ∀t, k : M(F10 3,5 , t, f k ) ≡ M(F10 3,5 , t, f k ) ; default=1 We executed the check using our implementation for k ∈ {0, 1, 2, 3, 4, ∞} and t ∈ {fattree, abfattree}. As discussed below, we actually failed to implement this feature correctly on our first attempt due to a subtle bug—we neglected to initialize the default flag to 1 at the ingress. 6.4 F10 routing with FatTree We previously saw that the structure of FatTree doesn’t allow 3-hop rerouting on failures because all subtrees are of the same type. This would mean that augmenting ECMP with 3-hop rerouting should have no effect, i.e. 3-hop rerouting should never kick in and act as a no-op. To verify this, we can check the following equivalence: b b ∀k : M(F10 0 , fattree, f k ) ≡ M(F10 3 , fattree, f k ) We have used our implementation to check that this equivalence indeed holds for k ∈ {0, 1, 2, 3, 4, ∞}. 22 S. Smolka, P. Kumar, N. Foster, J. Hsu, D. Kahn, D. Kozen, and A. Silva 1.00 Pr[delivery] 0.95 0.90 AB FatTree, F10 no rerouting AB FatTree, F10 3-hop rerouting AB FatTree, F10 3+5-hop rerouting FatTree, F10 3+5-hop rerouting 0.85 0.80 1/128 1/64 1/32 1/16 Link failure probability 1/8 1/4 Fig. 8. Probability of delivery vs. link-failure probability. (k = ∞). 6.5 Refinement Recall that we implemented F10 in three stages. We started with a basic routing scheme (F100 ) based on ECMP that provides resilience on the upward path, but no rerouting capabilities on the downward paths. We then augmented this scheme by adding 3-hop rerouting to obtain F103 , which can route around certain failures in the aggregation layer. Finally, we added 5-hop rerouting to address failure cases that 3-hop rerouting cannot handle, obtaining F103,5 . Hence, we would expect the probability of packet delivery to increase with each refinement of our routing scheme. Additionally, we expect all schemes to deliver packets and drop packets with some probability under the unbounded failure model. These observations are summarized by the following ordering: b b b drop < M(F10 0 , t, f ∞ ) < M(F10 3 , t, f ∞ ) < M(F10 3,5 , t, f ∞ ) < teleport where t = abfattree and teleport ≜ sw←1. To our surprise, we were not able to verify this property initially, as our implementation indicated that the ordering b b M(F10 3 , t, f ∞ ) < M(F10 3,5 , t, f ∞ ) was violated. We then added a capability to our implementation to obtain counterexamples, and found that F103 performed better than F103,5 for packets π with π .default = 0. We were missing the first line in our implementation of F103,5 (cf., Figure 7) that initializes the default bit to 1 at the ingress, causing packets to be dropped! After fixing the bug, we were able to confirm the expected ordering. 6.6 k-resilience We saw that there exists a strict ordering in terms of resilience for F100 , F103 and F103,5 when an unbounded number of failures can happen. Another interesting way of measuring resilience is to count the minimum number of failures at which a scheme fails to guarantee 100% delivery. Using ProbNetKAT, we can measure this resilience by setting k in fk to increasing values and checking equivalence with teleportation. Table 1 shows the results based on our decision procedure for the AB FatTree topology from Figure 6. The naive scheme, F100 , which does not perform any rerouting, drops packets when a failure occurs on the downward path. Thus, it is 0-resilient. In the example topology, 3-hop rerouting Probabilistic Program Equivalence for NetKAT 23 1.0 Pr[hop count ≤ x] 0.9 0.8 AB FatTree, F10 no rerouting AB FatTree, F10 3-hop rerouting AB FatTree, F10 3+5-hop rerouting FatTree, F10 3+5-hop rerouting 0.7 0.6 2 4 6 8 Hop count 10 12 14 Fig. 9. Increased latency due to resilience. (k = ∞, p = 41 ) has two possible ways to reroute for the given failure. Even if only one of the type B subtrees is reachable, F103 can still forward traffic. However, if both the type B subtrees are unreachable, then F103 will not be able to reroute traffic. Thus, F103 is 2-resilient. Similarly, F103,5 can route as long as any aggregation switch is reachable from the core switch. For F103,5 to fail the core switch would need to be disconnected from all four aggregation switches. Hence it is 3-resilient. In cases where schemes are not equivalent to teleport, we can characterize the relative robustness by computing the ordering, as shown in Table 2. 6.7 Resilience under increasing failure rate We can also do more quantitative analyses such as evaluating the effect of increase failure probability of links on the probability of packet delivery. Figure 8 shows this analysis in a failure model in which an unbounded number of failures can occur simultaneously. We find that F100 ’s delivery probability dips significantly as the failure probability increases because F100 is not resilient to failures. In contrast, both F103 and F103,5 continue to ensure high probability of delivery by rerouting around failures. 6.8 Cost of resilience By augmenting naive routing schemes with rerouting mechanisms, we are able to achieve a higher degree of resilience. But this benefit comes at a cost. The detours taken to reroute traffic increase the latency (hop count) for packets. ProbNetKAT enables quantifying this increase in latency by augmenting our model with a counter that gets increased at every hop. Figure 9 shows the CDF of latency as the fraction of traffic delivered within a given hop count. On AB FatTree, we find that F100 delivers as much traffic as it can (≈80%) within a hop count ≤ 4 because the maximum length of a shortest path from any edge switch to s1 is 4 and F100 does not use any longer paths. F103 and F103,5 deliver the same amount of traffic with hop count ≤ 4. But, with 2 additional hops, they are able to deliver significantly more traffic because they perform 3-hop rerouting to handle certain failures. With 4 additional hops, F103,5 ’s throughput increases as 5-hop rerouting helps. We find that F103 also delivers more traffic with 8 hops—these are the cases when F103 performs 3-hop rerouting twice for a single packet as it encountered failure twice. Similarly, we see small increases 24 S. Smolka, P. Kumar, N. Foster, J. Hsu, D. Kahn, D. Kozen, and A. Silva 4.8 E[hop count | delivered] AB FatTree, F10 no rerouting AB FatTree, F10 3-hop rerouting AB FatTree, F10 3+5-hop rerouting FatTree, F10 3+5-hop rerouting 4.6 4.4 4.2 4.0 3.8 3.6 1/128 1/64 1/32 1/16 Link failure probability 1/8 1/4 Fig. 10. Expected hop-count conditioned on delivery. (k = ∞). in throughput for higher hop counts. We find that F103,5 improves resilience for FatTree too, but the impact on latency is significantly higher as FatTree does not support 3-hop rerouting. 6.9 Expected latency Figure 10 shows the expected hop-count of paths taken by packets conditioned on their delivery. Both F103 and F103,5 deliver packets with high probability even at high failure probabilities, as we saw in Figure 8. However, a higher probability of link-failure implies that it becomes more likely for these schemes to invoke rerouting, which increases hop count. Hence, we see the increase in expected hop-count as failure probability increases. F103,5 uses 5-hop rerouting to achieve more resilience compared to F103 , which performs only 3-hop rerouting, and this leads to slightly higher expected hop-count for F103,5 . We see that the increase is more significant for FatTree in contrast to AB FatTree because FatTree only supports 5-hop rerouting. As the failure probability increases, the probability of delivery for packets that are routed via the core layer decreases significantly for F100 (recall Figure 8). Thus, the distribution of delivered packets shifts towards those with direct 2-hop path via an aggregation switch (such as packets from s2 to s1), and hence the expected hop-count decreases slightly. 6.10 Discussion As this case study of resilient routing in datacenters shows, the stochastic matrix representation of ProbNetKAT programs and accompanying decision procedure enable us to answer a wide variety of questions about probabilistic networks completely automatically. These new capabilities represent a signficant advance over current network verification tools, which are based on deterministic packet-forwarding models [9, 15, 17, 22]. 7 DECIDING FULL PROBNETKAT: OBSTACLES AND CHALLENGES As we have just seen, history-free ProbNetKAT can describe sophisticated network routing schemes under various failure models, and program equivalence for the language is decidable. However, it is less expressive than the original ProbNetKAT language, which includes an additional primitive dup. Intuitively, this command duplicates a packet π ∈ Pk and outputs the word π π ∈ H, where H = Pk∗ is the set of non-empty, finite sequences of packets. An element of H is called a packet Probabilistic Program Equivalence for NetKAT 25 history, representing a log of previous packet states. ProbNetKAT policies may only modify the first (head) packet of each history; dup fixes the current head packet into the log by copying it. In this way, ProbNetKAT policies can compute distributions over the paths used to forward packets, instead of just over the final output packets. However, with dup, the semantics of ProbNetKAT becomes significantly more complex. Policies p now transform sets of packet histories a ∈ 2H to distributions JpK(a) ∈ D(2H ). Since 2H is uncountable, these distributions are no longer guaranteed to be discrete, and formalizing the semantics requires full-blown measure theory (see prior work for details [31]). Deciding program equivalence also becomes more challenging. Without dup, policies operate on sets of packets 2Pk ; crucially, this is a finite set and we can represent each set with a single state in a finite Markov chain. With dup, policies operate on sets of packet histories 2H . Since this set is not finite—in fact, it is not even countable—encoding each packet history as a state would give a Markov chain with infinitely many states. Procedures for deciding equivalence are not known for such systems. While in principle there could be a more compact representation of general ProbNetKAT policies as finite Markov chains or other models where equivalence is decidable, (e.g., weighted or probabilistic automata [7] or quantitative variants of regular expressions [2]), we suspect that deciding equivalence in the presence of dup is intractable. As evidence in support of this conjecture, we show that ProbNetKAT policies can simulate the following kind of probabilistic automata. This model appears to be new, and may be of independent interest. Definition 7.1. Let A be a finite alphabet. A 2-generative probabilistic automata is defined by a tuple (S, s 0 , ρ, τ ) where S is a finite set of states; s 0 ∈ S is the initial state; ρ : S → (A ∪ {_})2 maps each state to a pair of letters (u, v), where either u or v may be a special blank character _; and the transition function τ : S → D(S) gives the probability of transitioning from one state to another. The semantics of an automaton can be defined as a probability measure on the space A∞ × A∞ , where A∞ is the set of finite and (countably) infinite words over the alphabet A. Roughly, these measures are fully determined by the probabilities of producing any two finite prefixes of words (w, w ′) ∈ A∗ × A∗ . Presenting the formal semantics would require more concepts from measure theory and take us far afield, but the basic idea is simple to describe. An infinite trace of a 2-generative automata over states s 0 , s 1 , s 2 , . . . gives a sequence of pairs of (possibly blank) letters: ρ(s 0 ), ρ(s 1 ), ρ(s 2 ) . . . By concatenating these pairs together and dropping all blank characters, a trace induces two (finite or infinite) words over the alphabet A. For example, the sequence, (a 0 , _), (a 1 , _), (_, a 2 ), . . . gives the words a 0a 1 . . . and a 2 . . . . Since the traces are generated by the probabilistic transition function τ , each automaton gives rise to a probability measure over pairs of words. While we have no formal proof of hardness, deciding equivalence between these automata appears highly challenging. In the special case where only one word is generated (say, when the second component produced is always blank), these automata are equivalent to standard automata with ε-transitions (e.g., see [23]). In the standard setting, non-productive steps can be eliminated and the automata can be modeled as a finite state Markov chain, where equivalence is decidable. In our setting, however, steps producing blank letters in one component may produce non-blank letters in the other. As a result, it is not entirely clear how to eliminate these steps and encode our automata as a Markov chain. 26 S. Smolka, P. Kumar, N. Foster, J. Hsu, D. Kahn, D. Kozen, and A. Silva Returning to ProbNetKAT, 2-generative automata can be encoded as policies with dup. We sketch the idea here, deferring further details to Appendix B. Suppose we are given an automaton (S, s 0 , ρ, τ ). We build a ProbNetKAT policy over packets with two fields, st and id. The first field st ranges over the states S and the alphabet A, while the second field id is either 1 or 2; we suppose the input set has exactly two packets labeled with id = 1 and id = 2. In a set of packet history, the two active packets have the same value for st ∈ S—this represents the current state in the automata. Past packets in the history have st ∈ A, representing the words produced so far; the first and second components of the output are tracked by the histories with id = 1 and id = 2. We can encode the transition function τ as a probabilistic choice in ProbNetKAT, updating the current state st of all packets, and recording non-blank letters produced by ρ in the two components by applying dup on packets with the corresponding value of id. Intuitively, a set of packet histories generated by the resulting ProbNetKAT term describes a pair of words generated by the original automaton. With a bit more bookkeeping (see Appendix B), we can show that two 2-generative automata are equivalent if and only if their encoded ProbNetKAT policies are equivalent. Thus, deciding equivalence for ProbNetKAT with dup is harder than deciding equivalence for 2-generative automata. Showing hardness for the full framework is a fascinating open question. At the same time, deciding equivalence between 2-generative automata appears to require substantially new ideas; these insights could shed light on how to decide equivalence for the full ProbNetKAT language. 8 RELATED WORK A key ingredient that underpins the results in this paper is the idea of representing the semantics of iteration using absorbing Markov chains, and exploiting their properties to directly compute limiting distributions on them. Markov chains have been used by several authors to represent and to analyze probabilistic programs. An early example of using Markov chains for modeling probabilistic programs is the seminal paper by Sharir, Pnueli, and Hart [28]. They present a general method for proving properties of probabilistic programs. In their work, a probabilistic program is modeled by a Markov chain and an assertion on the output distribution is extended to an invariant assertion on all intermediate distributions (providing a probabilistic generalization of Floyd’s inductive assertion method). Their approach can assign semantics to infinite Markov chains for infinite processes, using stationary distributions of absorbing Markov chains in a similar way to the one used in this paper. Note however that the state space used in this and other work is not like ProbNetKAT’s current and accumulator sets (2P k × 2P k ), but is instead is the Cartesian product of variable assignments and program location. In this sense, the absorbing states occur for program termination, rather than for accumulation as in ProbNetKAT. Although packet modification is clearly related to variable assignment, accumulation does not clearly relate to program location. Readers familiar with prior work on probabilistic automata might wonder if we could directly apply known results on (un)decidability of probabilistic rational languages. This is not the case— probabilistic automata accept distributions over words, while ProbNetKAT programs encode distributions over languages. Similarly, probabilistic programming languages, which have gained popularity in the last decade motivated by applications in machine learning, focus largely on Bayesian inference. They typically come equipped with a primitive for probabilistic conditioning and often have a semantics based on sampling. Working with ProbNetKAT has a substantially different style, in that the focus is on on specification and verification rather than inference. Di Pierro, Hankin, and Wiklicky have used probabilistic abstract interpretation (PAI) to statically analyze probabilistic λ-calculus [6]. They introduce a linear operator semantics (LOS) and demonstrate a strictness analysis, which can be used in deterministic settings to replace lazy with Probabilistic Program Equivalence for NetKAT 27 eager evaluation without loss. Their work was later extended to a language called pW hile, using a store plus program location state-space similar to [28]. The language pW hile is a basic imperative language comprising while-do and if-then-else constructs, but augmented with random choice between program blocks with a rational probability, and limited to a finite of number of finitely-ranged variables (in our case, packet fields). The authors explicitly limit integers to finite sets for analysis purposes to maintain finiteness, arguing that real programs will have fixed memory limitations. In contrast to our work, they do not deal with infinite limiting behavior beyond stepwise iteration, and do not guarantee convergence. Probabilistic abstract interpretation is a new but growing field of research [34]. Olejnik, Wicklicky, and Cheraghchi provided a probabilistic compiler pwc for a variation of pW hile [25], implemented in OCaml, together with a testing framework. The pwc compiler has optimizations involving, for instance, the Kronecker product to help control matrix size, and a Julia backend. Their optimizations based on the Kronecker product might also be applied in, for instance, the generation of SJpK from BJpK, but we have not pursued this direction as of yet. There is a plenty of prior work on finding explicit distributions of probabilistic programs. Gordon, Henzinger, Nori, and Rajamani surveyed the state of the art with regard to probabilistic inference [12]. They show how stationary distributions on Markov chains can be used for the semantics of infinite probabilistic processes, and how they converge under certain conditions. Similar to our approach, they use absorbing strongly-connected-components to represent termination. Markov chains are used in many probabilistic model checkers, of which PRISM [20] is a prime example. PRISM supports analysis of discrete-time Markov chains, continuous-time Markov chains, and Markov decision processes. The models are checked against specifications written in temporal logics like PCTL and CSL. PRISM is written in Java and C++ and provides three model checking engines: a symbolic one with (multi-terminal) binary decision diagrams ((MT)BDDs), a sparse matrix one, and a hybrid. The use of PRISM to analyse ProbNetKAT programs is an interesting research avenue and we intend to explore it in the future. 9 CONCLUSION This paper settles the decidability of program equivalence for history-free ProbNetKAT. The key technical challenge is overcome by modeling the iteration operator as an absorbing Markov chain, which makes it possible to compute a closed-form solution for its semantics. The resulting tool is useful for reasoning about a host of other program properties unrelated to equivalence. Natural directions for future work include investigating equivalence for full ProbNetKAT, developing an optimized implementation, and exploring new applications to networks and beyond. REFERENCES [1] Mohammad Al-Fares, Alexander Loukissas, and Amin Vahdat. 2008. A Scalable, Commodity Data Center Network Architecture. In ACM SIGCOMM Computer Communication Review, Vol. 38. ACM, 63–74. [2] Rajeev Alur, Dana Fisman, and Mukund Raghothaman. 2016. Regular programming for quantitative properties of data streams. In ESOP 2016. 15–40. [3] Carolyn Jane Anderson, Nate Foster, Arjun Guha, Jean-Baptiste Jeannin, Dexter Kozen, Cole Schlesinger, and David Walker. 2014. NetKAT: Semantic Foundations for Networks. In POPL. 113–126. [4] Manav Bhatia, Mach Chen, Sami Boutros, Marc Binderberger, and Jeffrey Haas. 2014. Bidirectional Forwarding Detection (BFD) on Link Aggregation Group (LAG) Interfaces. RFC 7130. (Feb. 2014). https://doi.org/10.17487/RFC7130 [5] Timothy A. Davis. 2004. Algorithm 832: UMFPACK V4.3—an Unsymmetric-pattern Multifrontal Method. ACM Trans. Math. Softw. 30, 2 (June 2004), 196–199. https://doi.org/10.1145/992200.992206 [6] Alessandra Di Pierro, Chris Hankin, and Herbert Wiklicky. 2005. Probabilistic λ-calculus and quantitative program analysis. Journal of Logic and Computation 15, 2 (2005), 159–179. https://doi.org/10.1093/logcom/exi008 [7] Manfred Droste, Werner Kuich, and Heiko Vogler. 2009. Handbook of Weighted Automata. Springer. 28 S. Smolka, P. Kumar, N. Foster, J. Hsu, D. Kahn, D. Kozen, and A. Silva [8] Nate Foster, Dexter Kozen, Konstantinos Mamouras, Mark Reitblatt, and Alexandra Silva. 2016. Probabilistic NetKAT. In ESOP. 282–309. https://doi.org/10.1007/978-3-662-49498-1_12 [9] Nate Foster, Dexter Kozen, Matthew Milano, Alexandra Silva, and Laure Thompson. 2015. A Coalgebraic Decision Procedure for NetKAT. In POPL. ACM, 343–355. [10] Phillipa Gill, Navendu Jain, and Nachiappan Nagappan. 2011. Understanding Network Failures in Data Centers: Measurement, Analysis, and Implications. In ACM SIGCOMM. 350–361. [11] Michele Giry. 1982. A categorical approach to probability theory. In Categorical aspects of topology and analysis. Springer, 68–85. https://doi.org/10.1007/BFb0092872 [12] Andrew D Gordon, Thomas A Henzinger, Aditya V Nori, and Sriram K Rajamani. 2014. Probabilistic programming. In Proceedings of the on Future of Software Engineering. ACM, 167–181. https://doi.org/10.1145/2593882.2593900 [13] Chuanxiong Guo, Guohan Lu, Dan Li, Haitao Wu, Xuan Zhang, Yunfeng Shi, Chen Tian, Yongguang Zhang, and Songwu Lu. 2009. BCube: A High Performance, Server-centric Network Architecture for Modular Data Centers. ACM SIGCOMM Computer Communication Review 39, 4 (2009), 63–74. [14] Chuanxiong Guo, Haitao Wu, Kun Tan, Lei Shi, Yongguang Zhang, and Songwu Lu. 2008. Dcell: A Scalable and Fault-Tolerant Network Structure for Data Centers. In ACM SIGCOMM Computer Communication Review, Vol. 38. ACM, 75–86. [15] Peyman Kazemian, George Varghese, and Nick McKeown. 2012. Header Space Analysis: Static Checking for Networks. In USENIX NSDI 2012. 113–126. https://www.usenix.org/conference/nsdi12/technical-sessions/presentation/kazemian [16] John G Kemeny, James Laurie Snell, et al. 1960. Finite markov chains. Vol. 356. van Nostrand Princeton, NJ. [17] Ahmed Khurshid, Wenxuan Zhou, Matthew Caesar, and Brighten Godfrey. 2012. Veriflow: Verifying Network-Wide Invariants in Real Time. In ACM SIGCOMM. 467–472. [18] Dexter Kozen. 1981. Semantics of probabilistic programs. J. Comput. Syst. Sci. 22, 3 (1981), 328–350. https://doi.org/10. 1016/0022-0000(81)90036-2 [19] Dexter Kozen. 1997. Kleene Algebra with Tests. ACM TOPLAS 19, 3 (May 1997), 427–443. https://doi.org/10.1145/ 256167.256195 [20] M. Kwiatkowska, G. Norman, and D. Parker. 2011. PRISM 4.0: Verification of Probabilistic Real-time Systems. In Proc. 23rd International Conference on Computer Aided Verification (CAV’11) (LNCS), G. Gopalakrishnan and S. Qadeer (Eds.), Vol. 6806. Springer, 585–591. https://doi.org/10.1007/978-3-642-22110-1_47 [21] Vincent Liu, Daniel Halperin, Arvind Krishnamurthy, and Thomas E Anderson. 2013. F10: A Fault-Tolerant Engineered Network. In USENIX NSDI. 399–412. [22] Haohui Mai, Ahmed Khurshid, Rachit Agarwal, Matthew Caesar, P. Brighten Godfrey, and Samuel Talmadge King. 2011. Debugging the Data Plane with Anteater. In ACM SIGCOMM. 290–301. [23] Mehryar Mohri. 2000. Generic ε -removal algorithm for weighted automata. In CIAA 2000. Springer, 230–242. [24] Radhika Niranjan Mysore, Andreas Pamboris, Nathan Farrington, Nelson Huang, Pardis Miri, Sivasankar Radhakrishnan, Vikram Subramanya, and Amin Vahdat. 2009. Portland: A Scalable Fault-Tolerant Layer 2 Data Center Network Fabric. In ACM SIGCOMM Computer Communication Review, Vol. 39. ACM, 39–50. [25] Maciej Olejnik, Herbert Wiklicky, and Mahdi Cheraghchi. 2016. Probabilistic Programming and Discrete Time Markov Chains. (2016). http://www.imperial.ac.uk/media/imperial-college/faculty-of-engineering/computing/public/ MaciejOlejnik.pdf [26] Arjun Roy, Hongyi Zeng, Jasmeet Bagga, George Porter, and Alex C. Snoeren. 2015. Inside the Social Network’s (Datacenter) Network. In ACM SIGCOMM. 123–137. [27] N. Saheb-Djahromi. 1980. CPOs of measures for nondeterminism. Theoretical Computer Science 12 (1980), 19–37. https://doi.org/10.1016/0304-3975(80)90003-1 [28] Micha Sharir, Amir Pnueli, and Sergiu Hart. 1984. Verification of probabilistic programs. SIAM J. Comput. 13, 2 (1984), 292–314. https://doi.org/10.1137/0213021 [29] Ankit Singla, Chi-Yao Hong, Lucian Popa, and P Brighten Godfrey. 2012. Jellyfish: Networking Data Centers Randomly. In USENIX NSDI. 225–238. [30] Steffen Smolka, Spiros Eliopoulos, Nate Foster, and Arjun Guha. 2015. A Fast Compiler for NetKAT. In ICFP 2015. https://doi.org/10.1145/2784731.2784761 [31] Steffen Smolka, Praveen Kumar, Nate Foster, Dexter Kozen, and Alexandra Silva. 2017. Cantor Meets Scott: Semantic Foundations for Probabilistic Networks. In POPL 2017. https://doi.org/10.1145/3009837.3009843 [32] Robert Endre Tarjan. 1975. Efficiency of a Good But Not Linear Set Union Algorithm. J. ACM 22, 2 (1975), 215–225. https://doi.org/10.1145/321879.321884 [33] L. Valiant. 1982. A Scheme for Fast Parallel Communication. SIAM J. Comput. 11, 2 (1982), 350–361. [34] Di Wang, Jan Hoffmann, and Thomas Reps. 2018. PMAF: An Algebraic Framework for Static Analysis of Probabilistic Programs. In POPL 2018. https://www.cs.cmu.edu/~janh/papers/WangHR17.pdf Probabilistic Program Equivalence for NetKAT A 29 OMITTED PROOFS Lemma A.1. Let A be a finite boolean combination of basic open sets, i.e. sets of the form Ba = {a} ↑ for a ∈ ℘ω (H), and let L−M denote the semantics from [31]. Then for all programs p and inputs a ∈ 2H , Lp ∗ M(a)(A) = lim Lp (n) M(a)(A) n→∞ Proof. Using topological arguments, the claim follows directly from previous results: A is a Cantor-clopen set by [31] (i.e., both A and A are Cantor-open), so its indicator function 1A is Cantor-continuous. But µ n ≜ Lp (n) M(a) converges weakly to µ ≜ Lp ∗ M(a) in the Cantor topology (Theorem 4 in [8]), so ∫ ∫ lim Lp (n) M(a)(A) = lim 1Adµ n = 1Adµ = Lp ∗ M(a)(A) n→∞ n→∞ (To see why A and A are open in the Cantor topology, note that they can be written in disjunctive normal form over atoms B {h } .) □ Proof of Proposition 3.1. We only need to show that for dup-free programs p and history-free inputs a ∈ 2Pk , LpM(a) is a distribution on packets (where we identify packets and singleton histories). We proceed by structural induction on p. All cases are straightforward except perhaps the case of p ∗ . For this case, by the induction hypothesis, all Jp (n) K(a) are discrete probability distributions on packet sets, therefore vanish outside 2Pk . By Lemma A.1, this is also true of the limit Jp ∗ K(a), as its value on 2Pk must be 1, therefore it is also a discrete distribution on packet sets. □ Proof of Lemma 3.3. This follows directly from Lemma A.1 and Proposition 3.1 by noticing that any set A ⊆ 2Pk is a finite boolean combination of basic open sets. □ Lemma A.2. The matrix X = I − Q in Equation (2) of §5.1 is invertible. Proof. Let S be a finite set of states, |S | = n, M an S × S substochastic matrix (Mst ≥ 0, M1 ≤ 1). Í i A state s is defective if (M1)s < 1. We say M is stochastic if M1 = 1, irreducible if ( n−1 i=0 M )st > 0 (that is, the support graph of M is strongly connected), and aperiodic if all entries of some power of M are strictly positive. We show that if M is substochastic such that every state can reach a defective state via a path in the support graph, then the spectral radius of M is strictly less than 1. Intuitively, all weight in the system eventually drains out at the defective states. Let es , s ∈ S, Í be the standard basis vectors. As a distribution, esT is the unit point mass on s. For A ⊆ S, let e A = s ∈A es . The L 1 -norm of a substochastic vector is its total weight as a distribution. Multiplying on the right by M never increases total weight, but will strictly decrease it if there is nonzero weight on a defective state. Since every state can reach a defective state, this must happen Í after n steps, thus ∥esT M n ∥1 < 1. Let c = maxs ∥esT M n ∥1 < 1. For any y = s as es , Õ ∥yT M n ∥1 = ∥( as es )T M n ∥1 s ≤ Õ s |as | · ∥esT M n ∥1 ≤ Õ |as | · c = c · ∥yT ∥1 . s Then M n is contractive in the L 1 norm, so |λ| < 1 for all eigenvalues λ. Thus I − M is invertible because 1 is not an eigenvalue of M. □ 30 B S. Smolka, P. Kumar, N. Foster, J. Hsu, D. Kahn, D. Kozen, and A. Silva ENCODING 2-GENERATIVE AUTOMATA IN FULL PROBNETKAT To keep notation light, we describe our encoding in the special case where the alphabet A = {x, y}, there are four states S = {s 1 , s 2 , s 3 , s 4 }, the initial state is s 1 , and the output function ρ is ρ(s 1 ) = (x, _) ρ(s 2 ) = (y, _) ρ(s 3 ) = (_, x) ρ(s 4 ) = (_, y). Encoding general automata is not much more complicated. Let τ : S → D(S) be a given transition function; we write pi, j for τ (si )(s j ). We will build a ProbNetKAT policy simulating this automaton. Packets have two fields, st and id, where st ranges over S ∪A ∪ {•} and id ranges over {1, 2}. Define: p ≜ st=s 1 ; loop∗ ; st←• The initialization keeps packets that start in the initial state, while the final command marks histories that have exited the loop by setting st to be special letter •. The main program loop first branches on the current state st:  st=s 1      st=s 2  loop ≜ case  st=s 3     st=s 4  : state1 : state2 : state3 : state4 Then, the policy simulates the behavior from each state. For instance:    (if id=1 then st←x ; dup else skip) ; st←s 1 @ p1,1 ,  Ê  (if id=1 then st←y ; dup else skip) ; st←s 2 @ p1,2 ,  state1 ≜  (if id=2 then st←x ; dup else skip) ; st←s 3 @ p1,3 ,     (if id=2 then st←y ; dup else skip) ; st←s @ p 4 1,4  The policies state2, state3, state4 are defined similarly. Now, suppose we are given two 2-generative automata W ,W ′ that differ only in their transition functions. For simplicity, we will further assume that both systems have strictly positive probability of generating a letter in either component in finitely many steps from any state. Suppose they generate distributions µ, µ ′ respectively over pairs of infinite words Aω × Aω . Now, consider the encoded ProbNetKAT policies p, p ′. We argue that JpK = JqK if and only if µ = µ ′.5 First, it can be shown that JpK = Jp ′K if and only if JpK(e) = Jp ′K(e), where e ≜ {π π | π ∈ Pk}. and ν ′ Let ν = JpK(e) = is the following equality: Jp ′K(e). The key connection between the automata and the encoded policies µ(Su,v ) = ν(Tu,v ) (6) for every pair of finite prefixes u, v ∈ A∗ . In the automata distribution on the left, Su,v ⊆ Aω × Aω consists of all pairs of infinite strings where u is a prefix of the first component and v is a prefix of the second component. In the ProbNetKAT distribution on the right, we first encode u and v as packet histories. For i ∈ {1, 2} representing the component and w ∈ A∗ a finite word, define the history hi (w) ∈ H ≜ (st = •, id = i), (st = w[|w |], id = i), . . . , (st = w[1], id = i), (st = s 1 , id = i). The letters of the word w are encoded in reverse order because by convention, the head/newest packet is written towards the left-most end of a packet history, while the oldest packet is written 5 We will not present the semantics of ProbNetKAT programs with dup here; instead, the reader should consult earlier papers [8, 31] for the full development. Probabilistic Program Equivalence for NetKAT 31 towards the right-most end. For instance, the final letter w[|w |] is the most recent (i.e., the latest) letter produced by the policy. Then, Tu,v is the set of all history sets including h1 (u) and h2 (v): Tu,v ≜ {a ∈ 2H | h1 (u) ∈ a, h2 (v) ∈ a}. Now JpK = Jp ′K implies µ = µ ′, since Equation (6) gives µ(Su,v ) = µ ′(Su,v ). The reverse implication is a bit more delicate. Again by Equation (6), we have ν (Tu,v ) = ν ′(Tu,v ). We need to extend this equality to all cones, defined by packet histories h: B h ≜ {a ∈ 2H | h ∈ a}. This follows by expressing B h as boolean combinations of Tu,v , and observing that the encoded policy produces only sets of encoded histories, i.e., where the most recent state st is set to • and the initial state st is set to s 1 .
6cs.PL
arXiv:1705.09372v1 [cs.IT] 25 May 2017 Centralized vs Decentralized Multi-Agent Guesswork Salman Salamatian Ahmad Beirami Asaf Cohen Muriel Médard MIT, USA MIT, USA Ben-Gurion University, Israel MIT, USA Abstract—We study a notion of guesswork, where multiple agents intend to launch a coordinated brute-force attack to find a single binary secret string, and each agent has access to side information generated through either a BEC or a BSC. The average number of trials required to find the secret string grows exponentially with the length of the string, and the rate of the growth is called the guesswork exponent. We compute the guesswork exponent for several multi-agent attacks. We show that a multi-agent attack reduces the guesswork exponent compared to a single agent, even when the agents do not exchange information to coordinate their attack, and try to individually guess the secret string using a predetermined scheme in a decentralized fashion. Further, we show that the guesswork exponent of two agents who do coordinate their attack is strictly smaller than that of any finite number of agents individually performing decentralized guesswork. Index Terms—Guesswork; brute-force attack; coordinated attack. I. I NTRODUCTION We consider a setup where a system is protected using a password X n ∈ X n , drawn i.i.d. at random from a distribution pX (·) on the finite alphabet X . An adversary wishes to breach the system by guessing the password. Assuming n is known to the adversary, a brute-force attack on the system would consist of first producing a list of all of the |X |n strings in X n ordered from the most likely to the least likely with respect to pX n (·), and then exhausting the list one by one until successfully guessing the password. Let the guesswork, denoted by G(X n ), be defined as the position at which the password string X n appears in the adversary’s list of all strings. The guesswork G(X n ) can be thought of as the computational cost in terms of number of queries required of an adversary to breach the system. As shall be discussed, G(X n ) grows exponentially with n for the processes considered in this paper, and the rate of its growth is referred to as the guesswork exponent. If m adversarial agents coordinate their attack on the secret string, the system will be compromised as soon as either of them succeeds, and hence, the average guesswork is reduced. Indeed, an optimal strategy would consist here of having each agent query the most likely sequence that has not yet been queried by any of the other agents. As the length of the password n grows, the impact of finitely many agents becomes more and more negligible, and since the size of the list grows exponentially in n, dividing the list by a constant does not change the guesswork exponent. In this work, we further assume that the agents have access to a side information string Y n , which they use to construct an updated list of strings, this time ordered with respect to pX n |Y n (·|Y n ). In its most general form, this side information can model complex additional information that the adversary may have acquired on the choice of the password, ranging from background search on the user who chose the password, to simply behind the back attacks in which an illegitimate person observes parts of the password. For example, considering Y n to be the output of a binary erasure channel can model an agent who has acquired parts of the secret password in the clear. Consider now a case in which multiple adversaries try to guess the password, each having n access to some side information Y(i) , which is assumed to be generated independently given X n through some discrete memoryless channel. Contrary to the case where there is no side information, we demonstrate that having even a fixed number of agents can help in reducing the exponent of the guesswork — whether they coordinate and use their side information in a centralized manner, or try independently in a decentralized way to guess the password (see Fig. 2). We illustrate the impact of multiple agents by studying both the centralized and the decentralized mechanisms for side information provided through the binary symmetric channel (BSC) and the binary erasure channel (BEC). This setting can also indirectly model adversaries and users over multiple accounts, some of which have been compromised. Suppose a user has several accounts, each requiring a password. The user may decide to use one identical password for all of the accounts, where the compromise of one of the accounts puts in peril all of his accounts. On the other extreme, he may decide to use completely independent passwords for each of the accounts, in which case one password being compromised does not give away any information on any of the other passwords. In practice, most users settle for a solution in between these two extremes. For example, the user may choose to slightly tweak their passwords from one account to another as to avoid the disastrous consequences of one account being compromised providing access to the rest of the accounts, while still maintaining some convenience. In this case, if one password is compromised, an adversary gains some side-information about the rest of the passwords. The normalized moments of guesswork are of great interest as they provide operational meanings in several information theoretic problems. For any α > 0, let Eα (pX ) denote the guesswork exponent and be defined as Eα (pX ) := 1 1 lim log E{[G(X n )]α }, α n→∞ n II. P RELIMINARIES A. Notations Fig. 1: In the centralized mechanism, a single list is constructed by collecting all the side-informations. In the decentralized setting, each agent constructs a separate list. where the expectation is with respect to the measure pX . Further, let E0 (pX ) := limα→0 Eα (pX ). For example, E1 (pX ) is the exponential growth rate of the expected number of queries required of the adversary to breach the secret string, and E0 (pX ) is the average codeword rate in optimal one shot source coding [1], [2]. Similarly, one can extend these notions to guesswork with side-information. The conditional guesswork, denoted G(X n |Y n ), can be thought of as the computational cost of an agent who has acquired side information Y n . The conditional guesswork exponent Eα (pX,Y ) then describes the exponential rate of conditional guesswork. Related Work: We briefly mention some related work. Guesswork was first considered in [3], where it was shown that guesswork is not necessarily related to the Shannon entropy. In [4], it is shown that the moments of guesswork for i.i.d. sequences are related to the Rényi-entropy of the source. Since then, this was generalized to various source processes (see [5], [6]), and under source uncertainty in [7]. In [8], guesswork is shown to satisfy a large deviation principle. [9] studies guesswork subject to distortion. A geometric perspective on guesswork is introduced in [10]. Guesswork, as a metric for quantifying the computational effort of brute-force attacks has been studied under various settings: under an entropy constraint in [11], over the typical set in [12], multiple users in [13], with erasures in [14]. Guesswork is central to several other problems in information theory, ranging from the computational cost of sequential decoding [4], to the error exponent in list decoding [15]. Main Contribution: In this paper, we consider the guesswork exponent under two types of side information, namely BECǫ and BSCδ , where ǫ and δ are the respective channel parameters. We characterize the impact of multiple agents in this setting, and show that even a finite number of agents reduces the conditional guesswork exponent. We carry this out by considering two extreme settings, one in which the agents are guessing the password, individually and independently (decentralized mechanism), and one in which all the side information is collected and used collectively (centralized mechanism). Section II introduces the setting along with some notations and background on guesswork with side information. Results for the BECǫ and BSCδ are presented in Section III and Section IV, respectively. Let (X n , Y n ) := (X1 , Y1 ), . . . , (Xn , Yn ), where (Xi , Yi ) ∈ X × Y, denote a random string of length n drawn i.i.d. from a distribution pX,Y over some finite alphabet X × Y. The sequence X n can be thought of as the password to guess, while the sequence Y n can be thought of as side information. The conditional guesswork E [G(X n |Y n )] is then the computational cost of the adversary with side information Y n . For β > 0, β 6= 1, we denote by Hβ (X) and Hβ (X|Y ), respectively, the Rényi-entropy and conditional Rényi-entropy of order β, defined in the usual way: !1/β X β β log pX (x) , Hβ (X) = 1−β x  !1/β  X X β . log  pX,Y (x, y)β Hβ (X|Y ) = 1−β y x We will focus on the case of binary input alphabets, i.e., X = {0, 1}. For 0 ≤ p ≤ 1/2, we denote by Hβ (p) the binary Rényi entropy of order β, and by H(p) the binary Shannon entropy. Furthermore, we let D(p||q) be defined as the KLdivergence between two binary distributions parameterized by p and q, respectively, that is: D(p||q) = p log p 1−p + (1 − p) log . q 1−q (1) Given an observation Y n = y n , we denote by G(X n |Y n = y n ) the position of X n in the list of ordered sequences xn from most likely to least likely according to pX n |Y n (·|y n ). The conditional Guesswork E [G(X n |Y n )α ] is then the average P n n n n α y n pY n (y )E [G(X |Y = y ) ]. We are interested in the conditional guesswork exponent defined as 1 log E[G(X n |Y n )α ], (2) n for α > 0. An application of L’Hopital’s rule yields the following useful equality: Eα (pX,Y ) := lim n→∞ 1 1 Eα (pX,Y ) = lim E [log(G(X n |Y n ))] . (3) n→∞ α n In a seminal result, Arıkan [4] showed that the moments α of 1 guesswork are related to the Renyi entropies of order 1+α of the source, that is: lim α→0 1 (X|Y ). Eα (pX,Y ) = αH 1+α (4) When the input distribution pX is clear from context, we may . f (n) write Eα (pY |X ). We use f (n) = g(n), if limn→∞ log log g(n) = 1. Logarithms and exponents are in base 2. B. Background on Noise and Erasures For the remainder of the paper, we will suppose that X n is a uniform Bernoulli sequence, and we will be interested in two families of side information. Namely, we will let Y n be the output of X n through a binary symmetric channel (BSCδ ), or through a binary erasure channel (BECǫ ). We will use the notation Eα (BSCδ ) and Eα (BECǫ ), to denote each corresponding exponent, where it is implicit that the input distribution pX n is chosen to be uniform over binary sequences of length n. BSC: Let Y n be the output of X n through a BSC with flipover probability δ ≤ 1/2. Noting that X n = Y n + Z n , where the addition operation is over Z2 , it is easy to see that G(X n |Y n ) = G(Z n ), and the average guesswork is given by: 1 log E[G(Z n )α ] = αH1/(1+α) (δ). (5) n BEC: Let Y n be the output of X n through a BEC channel with erasure probability 0 ≤ ǫ ≤ 1. Denote by En the number of erasures. Then, we have that G(X n |Y n ) = G(X ′En ), where X ′En is the erased sequence. It has been shown in [14], using results from large deviation theory, that the α-th moment of guesswork in this setting (referred to as subordinated Guesswork in [14]) is: answer this question, we consider the two families of side information we already introduced, namely BECǫ and BSCδ , and characterize the conditional guesswork exponent under the two following strategies, illustrated in Fig. 1: Decentralized Mechanism: Each of the m agents tries to n guess X n based on its own observation Y(i) . The process ends when at least one of the agents correctly guesses X n . The conditional guesswork exponent for this strategy, denoted (d) Eα (pm Y |X ), is therefore:  o n 1 1 1 (d) m n α . ) G(X n |Y(i) Eα (pY |X ) = lim log E min i=1,...,m α α n→∞ n (9) n Centralized: The agents share their observations Y(i) , i = 1, . . . , m with a central authority who collapses the side information and constructs an optimal list based on pX|Y(1) ,...,Y(m) . The conditional guesswork exponent for this strategy is denoted by Eα(c) (pm Y |X ), and: Eα (BECǫ ) = sup (αλ − D(λ||ǫ)) . Eα(c) (pm Y |X ) = Eα (pY ′ |X ), Eα (BSCδ ) = lim n→∞ (6) λ∈[0,1] Specifically, for α = 1, the exponent of the average guesswork is given by: 1 (7) log E[G(X En )] = log (1 + ǫ) . n Finally, the following lemma which we will use in the proofs, characterizes the guesswork exponent of a sequence generated by the concatenation of a uniform binary sequence, and an arbitrary i.i.d. sequence. lim n→∞ Lemma 1. Let U ∼ Ber(1/2) and V ∼ Ber(p), with p ≤ 1/2, and denote by U mn and V n−mn their i.i.d. sequences, for some sequence mn such that limn→∞ mnn = λ. Then, the guesswork exponent for the sequence X n = (U mn , V n−mn ) obtained by the concatenation of U mn and V n−mn is: 1 log E [G(X n )α ] = λα + (1 − λ)αH1/1+α (p). (8) n Proof Sketch. The result follows from the fact that we need to guess the subsequence V n−mn , but each such subsequence has 2mn uniform possibilities for U mn . lim n→∞ C. Setting As shown above, the problem of Guesswork under side information is well understood. A more complicated problem is one in which multiple agents receive side information, and not a single source of side information. Precisely, let there be m agents, each observing an independent realization of a n n side information Y(i) , i = 1, . . . , m, where Y(i) is the output n of the password sequence X through a discrete memory-less channel. Clearly, if all the agents cooperate and share their side information, they can construct an optimal list based on the agn n gregate collection of side information Y ′ = (Y(1) , . . . , Y(m) ). This strategy clearly out performs the strategy in which each agent tries to guess the sequence on its own. However, it is not clear to which extent this sharing of side information improves the exponent with respect to a decentralized approach. To (10) ′ where Qm Y = (Y1 , . . . , Y(m) ) and pY ′ |X (y1 , . . . , ym |x) = p i=1 Y |X (yi |x). Note that it follows directly that Eα(d) (p1Y |X ) = (c) Eα (p1Y |X ) = Eα (pY |X ). In the rest of the paper, we will characterize the conditional guesswork exponents under BECǫ and BSCδ side information. n n Precisely, we let Y(1) , . . . , Y(m) be the output of X n through m independent BSCδ or BECǫ channels. Note that, even though the initial channel is a simple binary channel, the resulting channel from the collapsing of the side information may be more complex. This will be the case for BSC. In the next section, we analyze the guesswork exponent for the BEC side information. The analysis for the BSC is in Section IV. It has to be noted that we are studying asymptotic behaviors for fixed m, that is m does not grow with n. In the sequel, we may take the limit when m → ∞ and determine say (c) m limm→∞ Eα(c) (pm Y |X ), where Eα (pY |X ) is itself the result of a limit when n → ∞. It is understood here that the order of the limits is crucial and an interchange of limit is not possible. III. BEC A. Centralized Mechanism The BECǫ is simple to analyze because collapsing information is tractable. In particular, the symbol in position i in the sequence X n is erased in all received signals Yin with probability ǫm . Therefore, the resulting collapsed random variable Ỹ n is the output of X n through a BEC with erasure probability ǫm , and we have the following. Theorem 1. The guesswork exponent for the centralized Mechanism with m agents under BEC is: m Eα(c) (BECm ǫ ) = max (αλ − D(λkǫ )) . λ∈[0,1] (11) Carrying out the maximization for α = 1, we have the following. Guesswork Exponent E1 1 this claim has to be nuanced. Indeed, we are looking at the asymptotic behavior of the guesswork exponent as n → ∞, for a fixed number of agents, i.e., this does not allow a growing number of agents with n. log(1 + ǫ) Decentralized m = 2 ǫ Centralized m = 2 Centralized m = 10 0.8 Proof Sketch. The proof of Thm 2 follows from two steps. First, we establish an upper bound based on the shortest sequence. Due to space restrictions, we provide below only a proof sketch in the case of m = 2. First, we find an upper bound on the guesswork exponent by considering the exponent of the shortest sequence. The details are omitted, but follow from a standard use of the method of types. 0.6 0.4 0.2 (i) 0 0 0.2 0.4 0.6 0.8 i=1,...,m 1 ǫ Fig. 2: Comparison of centralized and decentralized settings for the BEC. Corollary 1. The centralized Mechanism with m agents under BEC side information has expected Guesswork exponent (see Fig. 2): (c) m E1 (BECm ǫ ) = log (1 + ǫ ) . (12) Remark 1. The function f (x) = log(1 + xm ) over x ∈ [0, 1], is convex for any m ≥ 2. Moreover, as the number of agents increases, the exponents tends towards a flat function Eα(c) = 0, with a discontinuity at ǫ = 1. Moreover, since the ǫm−1 first derivative (when α = 1) is m 1+ǫ m for any m ≥ 2, the centralized curve starts flat with a negligible exponent for small ǫ. B. Decentralized Mechanism The study of the decentralized case is more involved since, on the n one hand, om one cannot construct a unified list based n on all Y(i) , yet, on the other hand, the guesswork i=1   n are not independent and one random variables G X n |Y(i) om n  n cannot easily combine G X n |Y(i) . First, we discuss i=1 the result: Theorem 2. The decentralized mechanism with BEC sideinformation has Guesswork Exponent: Eα(d) (BECm ǫ ) = sup (αλ − mD(λ||ǫ)) . ∗ E[ min {G(X En )α }] ≤ E[G(X En )α ]. (13) λ∈[0,1] Before we proceed to the proof, some remarks are in order. One can verify that the limit of the Guesswork Exponent for the decentralized mechanism, as the number of agents m increases, converges towards ǫ (see Fig 2). Indeed, for large m, the term −mD(λkǫ) dominates, and the solution of the optimization is λ ≃ ǫ. On the other hand, Remark 1 establishes that the Guesswork exponent is convex for any m ≥ 2, implying that even two agents that collapse their side information are more powerful than any finite number of agents guessing X n in a decentralized way. Note that (14) where En∗ is the random variable representing the minimum number of erasures among all m agents. Therefore, we have: Eα(d) (BECm ǫ ) ≤ sup (αλ − mD(λkǫ)) . (15) λ∈[0,1] To obtain a matching lower-bound, we consider an oracle that provides additional information to both agents, strictly reducing their guesswork. In general terms, the additional information from the oracle allows to construct explicitly the optimal list of both agents. More precisely, this is achieved by transmitting the position of the common erasures for both agent. The optimal joint strategy is then to construct lists as to minimize queries that have a common subsequence in the overlapping erasures. Indeed, each incorrect query from an agent, shapes the probability distribution of the second agent because of the common sequences. We show that this probability shaping, can be again lower-bounded by a mechanism in which each agent has two guesses at each step, instead of one, therefore not affecting the guesswork exponent. IV. BSC A. Centralized Mechanism In the case of the BSCδ , the centralized mechanism is more involved to analyze. Indeed, the resulting channel BSCm δ is not a BSC anymore, since one has m noisy measurements per password-bit. Indeed, as it will be clear soon, guessing should be preceded with some kind of estimation. Nevertheless, for m = 2, we can characterize precisely what this channel exactly is, by considering the 2m = 4 cases. We will then discuss how to generalize this result to arbitrary m > 2. Theorem 3. The centralized mechanism with m = 2 agents under BSCδ side-information satisfies:    δ2 Eα(c) (BSC2δ ) = sup αλH1/1+α + 1 − 2δ(1 − δ) λ∈[0,1]  α(1 − λ) − D (λk2δ(1 − δ)) . Corollary 2. The average guesswork, when α = 1, is (Fig. 3) (c) E1 (BSC2δ ) = log(4δ(1 − δ) + 1). (16) Note that one can easily verify the following log(4δ(1 − δ) + 1) ≤ H(δ), (18) with equality only if δ = 1/2 or δ = 0. The previous theorem only treats the case of m = 2 agents, although a similar technique can be used to tackle any m ≥ 2 number of agents. Unfortunately, this method is intractable for large m. However, the following result allows us to compute the limit as the number of agents grows to infinity: 1 Guesswork Exponent E1 Proof. Denote by Y1n and Y2n the sequence of side information observed by each agent, and divide each into two parts. In the first part, Y1n and Y2n agree and have the same bit in every position, that is on this subsequence, the centralized Ỹ n is essentially the result of a BSC with parameter δ 2 /(1−2δ(1−δ)). In the second part, they disagree and have contradicting bits in every position, which is essentially an erasure. We let λ ∈ [0, 1] be the fraction of bits over which they agree, i.e. λn is the size of the first subsequence defined above. Therefore, the central authority has to guess a sequence of the type X̃ n = (Ũ n(1−λ) , Z̃ nλ ), where Ũ n(1−λ) is an i.i.d. sequence of uniform Bernoulli random variables that correspond to the erasures, and Z nα is an i.i.d. sequence of Bernoulli random variables with parameter δ̃ , δ 2 /(1−2δ(1−δ)). By Lemma 1, we have that: 1 lim log E[G(X̃ n )α ] = λα + (1 − λ)αH1/1+α (δ̃). (17) n→∞ n Noting that the probability of the subsequence of agreements to be of length λn is (up to polynomial factors) exp {−nD(λk2δ(1 − δ))}, we get the desired optimization. Solving for α = 1 yields the corollary. 0.8 0.6 0.2 0 0.1 0.2 0.3 0.4 0.5 Fig. 3: Comparison of the centralized and decentralized setting for BSC. In other words, when m is large enough, one can estimate each bit of the password based on the noisy observations. B. Decentralized Mechanism In contrast with the BEC case, when the side-information n Y(i) is the result of a BSC, the resulting guessworks are n n independent. Indeed, as stated before G(X n |Y(i) ) = G(Z(i) ), n where now the sequences of flips Z(i) are independent. The following result, which is a special case of the more general large deviation result in [13] follows directly: Theorem 4. The decentralized mechanism with m agents under BSC side-information has expected Guesswork exponent: m Eα(d) (BSCm δ ) = αH α+m (δ). lim Eα(c) (BSCm δ ) = 0. m→∞ (19) Proof. For a fixed n and m, we do a deterministic pren n , . . . , Y(m) , which can only processing on the sequences Y(1) increase the guesswork, by definition. Namely, we let Ỹi be defined as the majority bit among the received sideinformations at index i, that is : ( 0 ,if Ni (0) ≥ Ni (1), Ỹi = (20) 1 ,if Ni (0) < Ni (1), Pm where Ni (0) = j=1 Y(j),i , for Y(j),i the i-th bit of the n sequence Y(j) , and Ni (1) = n − Ni (0). Then, it is easy to see that Ỹ n is the output of X n through a BSC with parameter δm , such that δm → 0 as m → ∞ for any δ < 1/2. Therefore, we have, for any n, and for fixed m, the following inequality: E[G(X n |Y ′ )α ] ≤ E[G(X n |Ỹ n )α ] ⇒ 0 δ Lemma 2. Let δ < 12 , then: ⇒ Eα(c) (BSCm δ ) lim Eα(c) (BSCm δ ) m→∞ Centralized m = 2 Decentralized m = 2 H(δ) H1/2 (δ) 0.4 (21) ≤ Eα (BSCδm ) (22) ≤ lim Eα (BSCδm ). (23) m→∞ As the right hand side of the last inequality converges to 0 for any δ < 12 , we obtain the desired result. (24) Alternative Proof. For completeness, we provide a proof that does not require to evaluate the full large deviation behavior of the guesswork to evaluate its moments. First we recall the following elementary result. Let Sin be the sum of n i.i.d. coin flips with parameter δ. Then, for any δ < s ≤ 1: Pr( min Si = sn) = mPr(S1 = sn) i=1...,m m Y P r(Si ≥ sn) i=2 . (25) m−1 = exp{−nD(s||δ)} (exp{−nD(s||δ)}) (26) . = exp{−nmD(s||δ)}. (27) Alternatively, when 0 < s ≤ δ, we have:   . Pr min Si = sn = exp{−nD(s||δ)}. (28) i=1,...,m . n n Using the previous results, and recalling that G(Z(i) ) = 2 Si , n where Si is the number of 0’s in the sequence (the type of the binary sequence), we obtain that: ( ) . n α ) ] = exp n sup (αλ − f (λ, m)) , E[ min G(Z(i) i=1,...,m λ∈[0,1] (29) where f (λ, m) = 1{λ > δ}mD(λ||δ) + 1{λ ≤ δ}D(λ||δ). The desired result follows by observing that the maximization over λ always lead to a solution in the range λ > δ, for any α > 0. Remark 2. The limit when m → ∞ of the decentralized setting tends to the Shannon entropy αH(δ) for any α > 0. ACKNOWLEDGMENT The authors are thankful to Ken Duffy, whose comments greatly improved the presentation and content of this paper. R EFERENCES [1] O. Kosut and L. Sankar, “Asymptotics and non-asymptotics for universal fixed-to-variable source coding,” IEEE Transactions on Information Theory, 2017. [2] A. Beirami and F. Fekri, “Fundamental limits of universal lossless oneto-one compression of parametric sources,” in 2014 IEEE Information Theory Workshop (ITW ’14), Nov. 2014, pp. 212–216. [3] J. L. Massay, “Guessing and entropy,” in 1994 IEEE International Symposium on Information Theory Proceedings, 1994, p. 204. [4] E. Arikan, “An inequality on guessing and its application to sequential decoding,” IEEE Trans. on Inf. Theory, vol. 42, no. 1, pp. 99–105, Jan. 1996. [5] D. Malone and W. G. Sullivan, “Guesswork and entropy,” IEEE Transactions on Information Theory, vol. 50, no. 3, pp. 525–526, 2004. [6] C. E. Pfister and W. G. Sullivan, “Renyi entropy, guesswork moments, and large deviations,” IEEE Transactions on Information Theory, vol. 50, no. 11, pp. 2794–2800, 2004. [7] R. Sundaresan, “Guessing under source uncertainty,” IEEE Trans. on Inf. Theory, vol. 53, no. 1, pp. 525–526, Jan. 2007. [8] M. M. Christiansen and K. R. Duffy, “Guesswork, large deviations, and Shannon entropy,” IEEE Trans. on Inf. Theory, vol. 59, no. 2, pp. 796– 802, Feb. 2013. [9] E. Arikan and N. Merhav, “Guessing subject to distortion,” IEEE Trans. on Inf. Theory, vol. 44, no. 3, pp. 1041–1056, May 1998. [10] A. Beirami, R. Calderbank, M. Christiansen, K. Duffy, A. Makhdoumi, and M. Médard, “A geometric perspective on guesswork,” in 53rd Annual Allerton Conference (Allerton), Oct. 2015. [11] A. Beirami, R. Calderbank, K. Duffy, and M. Médard, “Quantifying computational security subject to source constraints, guesswork and inscrutability,” in 2015 IEEE International Symposium on Information Theory Proceedings, Jun. 2015. [12] M. M. Christiansen, K. R. Duffy, F. du Pin Calmon, and M. Médard, “Brute force searching, the typical set and guesswork,” in Information Theory Proceedings (ISIT), 2013 IEEE International Symposium on. IEEE, 2013, pp. 1257–1261. [13] ——, “Multi-user guesswork and brute force security,” IEEE Transactions on Information Theory, vol. 61, no. 12, pp. 6876–6886, 2015. [14] ——, “Guessing a password over a wireless channel (on the effect of noise non-uniformity),” in Signals, Systems and Computers, 2013 Asilomar Conference on. IEEE, 2013, pp. 51–55. [15] N. Merhav, “List decoding—Random coding exponents and expurgated exponents,” IEEE Trans. Inf. Theory, vol. 60, no. 11, pp. 6749–6759, 2014.
7cs.IT
Spatially Controlled Relay Beamforming: 2-Stage Optimal Policies arXiv:1705.07463v1 [math.OC] 21 May 2017 Dionysios S. Kalogerias and Athina P. Petropulu May 2017 Abstract The problem of enhancing Quality-of-Service (QoS) in power constrained, mobile relay beamforming networks, by optimally and dynamically controlling the motion of the relaying nodes, is considered, in a dynamic channel environment. We assume a time slotted system, where the relays update their positions before the beginning of each time slot. Modeling the wireless channel as a Gaussian spatiotemporal stochastic field, we propose a novel 2-stage stochastic programming problem formulation for optimally specifying the positions of the relays at each time slot, such that the expected QoS of the network is maximized, based on causal Channel State Information (CSI) and under a total relay transmit power budget. This results in a schema where, at each time slot, the relays, apart from optimally beamforming to the destination, also optimally, predictively decide their positions at the next time slot, based on causally accumulated experience. Exploiting either the Method of Statistical Differentials, or the multidimensional Gauss-Hermite Quadrature Rule, the stochastic program considered is shown to be approximately equivalent to a set of simple subproblems, which are solved in a distributed fashion, one at each relay. Optimality and performance of the proposed spatially controlled system are also effectively assessed, under a rigorous technical framework; strict optimality is rigorously demonstrated via the development of a version of the Fundamental Lemma of Stochastic Control, and, performance-wise, it is shown that, quite interestingly, the optimal average network QoS exhibits an increasing trend across time slots, despite our myopic problem formulation. Numerical simulations are presented, experimentally corroborating the success of the proposed approach and the validity of our theoretical predictions. Keywords. Spatially Controlled Relay Beamforming, Mobile Relay Beamforming, Network Mobility Control, Network Utility Optimization, QoS Maximization, Motion Control, Distributed Cooperative Networks, Stochastic Programming. The Authors are with the Department of Electrical & Computer Engineering, Rutgers, The State University of New Jersey, 94 Brett Rd, Piscataway, NJ 08854, USA. e-mail: {d.kalogerias, athinap}@rutgers.edu. This work is supported by the National Science Foundation (NSF) under Grants CCF-1526908 & CNS-1239188. Also, this work constitutes an extended preprint of a two part paper (soon to be) submitted for publication to the IEEE Transactions on Signal Processing in Spring/Summer 2017. 1 Contents 1 Introduction 2 2 System Model 6 3 Spatiotemporal Wireless Channel Modeling 3.1 Large Scale Gaussian Channel Modeling in the dB Domain . . . . . . . . . . . . . . 3.2 Model Justification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Extensions & Some Technical Considerations . . . . . . . . . . . . . . . . . . . . . . 7 8 10 11 4 Spatially Controlled Relay Beamforming 15 4.1 Joint Scheduling of Communications & Controls . . . . . . . . . . . . . . . . . . . . 15 4.2 2-Stage Stochastic Optimization of Beamforming Weights and Relay Positions: Base Formulation & Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.3 SINR Maximization at the Destination . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.3.1 Approximation by the Method of Statistical Differentials . . . . . . . . . . . 23 4.3.2 Brute Force . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.4 Theoretical Guarantees: Network QoS Increases Across Time Slots . . . . . . . . . . 28 5 Numerical Simulations & Experimental Validation 33 6 Conclusions 36 7 Acknowledgments 36 8 Appendices 8.1 Appendix A: Proofs / Section 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.1 Proof of Lemma 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.2 Proof of Theorem 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2 Appendix B: Measurability & The Fundamental Lemma of Stochastic Control . . 8.2.1 Random Functions & The Substitution Rule for Conditional Expectations 8.2.2 A Base Form of the Lemma . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2.3 Guaranteeing the Existence of Measurable Optimal Controls . . . . . . . 8.2.4 Fusion & Derivation of Conditions C1-C6 . . . . . . . . . . . . . . . . . . 8.3 Appendix C: Proofs / Section 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.1 Proof of Theorem 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.2 Proof of Lemma 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.3 Proof of Theorem 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.4 Proof of Theorem 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . 37 37 37 38 39 40 45 53 55 56 56 62 63 63 Introduction Distributed, networked communication systems, such as relay beamforming networks [1–7] (e.g., Amplify & Forward (AF)) are typically designed without explicitly considering how the positions of the networking nodes might affect the quality of the communication. Optimum physical placement of assisting networking nodes, which could potentially improve the quality of the communication, 2 does not constitute a clear network design aspect. However, in most practical settings in physical layer communications, the Channel State Information (CSI) observed by each networking node, per channel use, although (modeled as) random, it is both spatially and temporally correlated. It is, therefore, reasonable to ask if and how system performance could be improved by controlling the positions of certain network nodes, based on causal side information, and exploiting the spatiotemporal dependencies of the wireless medium. Recently, autonomous node mobility has been proposed as an effective means to further enhance performance in various distributed network settings. In [8], optimal transmit AF beamforming has been combined with potential field based relay mobility control in multiuser cooperative networks, in order to minimize relay transmit power, while meeting certain Quality-of-Service (QoS) constraints. In [9], in the framework of information theoretic physical layer security, decentralized jammer motion control has been jointly combined with noise nulling and cooperative jamming, maximizing the network secrecy rate. In [10], optimal relay positioning has been studied in systems where multiple relays deliver information to a destination, in the presence of an eavesdropper, with a goal of maximizing or achieving a target level of ergodic secrecy. In the complementary context of communication aware (comm-aware) robotics, node mobility has been exploited in distributed robotic networks, in order to enhance system performance, in terms of maintaining reliable, in-network communication connectivity [11–14], and optimizing network energy management [15]. Networked node motion control has also been exploited in special purpose applications, such as networked robotic surveillance [16] and target tracking [17]. In [8–10], the links among the nodes of the network (or the related statistics) are assumed to be available in the form of static channel maps, during the whole motion of the jammers/relays. However, this is an oversimplifying assumption in scenarios where the channels change significantly in time and space [18–20]. In this paper, we try to overcome this major limitation, and we consider the problem of optimally and dynamically updating relay positions in one source/destination relay beamforming networks, in a dynamic channel environment. Different from [8–10], we model the wireless channel as a spatiotemporal stochastic field ; this approach may be seen as a versatile extension of a realistic, commonly employed “log-normal” channel model [20]. We then propose a 2-stage stochastic programming problem formulation, optimally specifying the positions of the relays at each time slot, such that the Signal-to-Interference+Noise Ratio (SINR) or QoS at the destination, at the same time slot, is maximized on average, based on causal CSI, and subject to a total power constraint at the relays. At each time slot, the relays not only beamform to the destination, but also optimally, predictively decide their positions at the next time slot, based on their experience (causal actions and channel observations). This novel, cyber-physical system approach to relay beamforming is termed as Spatially Controlled Relay Beamforming. Exploiting the assumed stochastic channel structure, it is first shown that the proposed optimal motion control problem is equivalent to a set of simpler, two dimensional subproblems, which can be solved in a distributed fashion, one at each relay, without the need for intermediate exchange of messages among the relays. However, each of the objectives of the aforementioned subproblems involves the evaluation of a conditional expectation of a well defined ratio of almost surely positive random variables, which is impossible to perform analytically, calling for the development of easily implementable approximations to each of the original problems. Two such heuristics are considered. The first is based on the so-called Method of Statistical Differentials [21], whereas the second constitutes a brute force approach, based on the multidimensional Gauss-Hermite Quadrature Rule, a readily available routine for numerical integration. In both cases, the original problem objective is 3 replaced by the respective approximation, which, in both cases, is shown to be easily computed via simple, closed form expressions. The computational complexity of both approaches is also discussed and characterized. Subsequently, we present an important result, along with the respective detailed technical development, characterizing the performance of the proposed system, across time slots (Theorems 6 and 7). In a nutshell, this result states that, although our problem objective is itself myopic at each time slot, the expected network QoS exhibits an increasing trend across time slots (in other words, the expected QoS increases in time, within a small positive slack), under optimal decision making at the relays. Lastly, we present representative numerical simulations, experimentally confirming both the efficacy and feasibility of the proposed approach, as well as the validity of our theoretical predictions. During exposition of the proposed spatially controlled relay beamforming system, we concurrently develop and utilize a rigorous discussion concerning the optimality of our approach, and with interesting results (Section 8.2 / Appendix B). Clearly, our problem formulation is challenging; it involves a variational stochastic optimization problem, where, at each time slot, the decision variable, a function of the so far available useful information in the system (also called a policy, or a decision rule), constitutes itself the spatial coordinates, from which every network relay will observe the underlying spatiotemporal channel field, at the next time slot. In other words, our formulation requires solving an (myopic, in particular) optimal spatial field sampling problem, in a dynamic fashion. Such a problem raises certain fundamental questions, not only related to our proposed spatially controlled beamforming formulation, but also to a large class of variational stochastic programs of similar structure. In this respect, our contributions are partially driven by assuming an underlying complete base probability space of otherwise arbitrary structure, generating all random phenomena considered in this work. Under this general setting, we explicitly identify sufficient conditions, which guarantee the validity of the so-called substitution rule for conditional expectations, specialized to such expectations of random spatial (in general) fields/functions with an also random spatial parameter, relative to some σ-algebra, which makes the latter parameter measurable (fixed) (Definition 6 & Theorem 8). General validity of the substitution rule, without imposing additional, special conditions, traces back to the existence of regular conditional distributions, defined directly on the sample space of the underlying base probability space. Such regular conditional distributions cannot be guaranteed to exist, unless the sample space has nice topological properties, for instance, if it is Polish [22]. In the context of our spatially controlled beamforming application, such structural requirements on the sample space, which, by assumption, is conceived as a model of “nature”, and generates the spatiotemporal channel field sampled by the relays, are simply not reasonable. Considering this, our first contribution is to show that it is possible to guarantee the validity of the form of the substitution rule under consideration by imposing conditions on the topological structure of the involved random field, rather than that of the sample space (a part of its domain). This results in a rather generally applicable problem setting (Theorem 8). In this work, the validity of the substitution rule is ascertained by imposing simple continuity assumptions on the random functions involved, which, in some cases, might be considered somewhat restrictive. Nevertheless, those assumptions can be significantly weakened, guaranteeing the validity of the substitution rule for vastly discontinuous random functions, including, for instance, cases with random discontinuities, or random jumps. The development of this extended analysis, though, is out of the scope of this paper, and will be presented elsewhere. The validity of the substitution rule is vitally important in the treatment of a wide class of variational stochastic programs, including that involved in the proposed spatially controlled beamforming 4 approach. In particular, leveraging the power of the substitution rule, we develop a version of the so-called Fundamental Lemma of Stochastic Control (FLSC) [23–28] (Lemma 3), which provides sufficient conditions that permit interchange of integration (expectation) and max/minimization in general variational (stochastic) programming settings. The FLSC allows the initial variational problem to be exchanged by a related, though pointwise (ordinary) optimization problem, thus efficiently reducing the search over a class of functions (initial problem) to searching over constants, which is, of course, a standard and much more handleable optimization setting. In slightly different ways, the FLSC is evidently utilized in relevant optimality analysis both in Stochastic Programming [25, 26], and in Dynamic Programming & Stochastic Optimal Control [23, 24, 27, 28]. A very general version of the FLSC is given in ([25], Theorem 14.60), where unconstrained variational optimization of integrals of extended real-valued random lower semicontinuous functions [26], or, by another name, normal integrands [25], with respect to a general σ-finite measure, is considered. Our version of the FLSC may be considered a useful variation of Theorem 14.60 in [25], and considers constrained variational optimization problems involving integrals of random functions, but with respect to some base probability measure (that is, expectations). In our result, via the tower property of expectations, the role of the normal integrand in ([25], Theorem 14.60) is played by the conditional expectation of the random function considered, relative to a σ-algebra, which makes the respective decision variable of the problem (a function(al)) measurable. Assuming a base probability space of arbitrary structure, this argument is justified by assuming validity of the substitution rule, which, in turn, is ascertained under our previously developed sufficient conditions. Different from ([25], Theorem 14.60), in our version of the FLSC, apart from natural Borel measurability requirements, no continuity assumptions are directly imposed on the structure on either the random function, or the respective conditional expectation. In this respect, our result extends ([25], Theorem 14.60), and is of independent interest. On the other hand, from the strongly related perspective of Stochastic Optimal Control, our version of the FLSC may be considered as the basic building block for further development of Bellman Equation-type, Dynamic Programming solutions [27, 28], under a strictly Borel measurability framework, sufficient for our purposes. Quite differently though, in our formulation, the respective cost (at each stage of the problem) is itself a random function (a spatial field), whose domain is the Cartesian product of a base space of arbitrary topology, with another, nicely behaved Borel space, instead of the usual Cartesian product of two Borel spaces (the spaces of state and controls), as in the standard dynamic programming setting [27, 28]. Essentially, our formulation is “one step back” as compared to the basic dynamic programming model of [27, 28], in the sense that the cost considered herein refers directly back to the base space. As a result, different treatment of the problem is required; essentially, the validity of the substitution rule for our cost function bypasses the requirement for existence of conditional distributions, and exploits potential nice properties of the respective conditional cost (in our case, joint Borel measurability). Emphasizing on our particular problem formulation, our functional assumptions, which guarantee the validity of the substitution rule, combined with the FLSC, result in a total of six sufficient conditions, under which strict optimality via problem exchangeability is guaranteed (conditions C1-C6 in Lemma 4). Those conditions are subsequently shown to be satisfied specifically for the spatially controlled beamforming problem under consideration (verification Theorem 3), ensuring strict optimality of a solution obtained by exploiting problem exchangeability. Finally, motivated by the need to provide performance guarantees for the proposed myopic stochastic decision making scheme (our spatially controlled beamforming network), we introduce the concept of a linear martingale difference generator spatiotemporal field. We then rigorously 5 show that, when such fields are involved in the objective of a myopic stochastic sampling scheme, stagewise myopic stochastic exploration of the involved field is, under conditions, either monotonic, or quasi-monotonic (that is, monotonic within some small positive slack), either under optimal sampling decision making, or when retaining the same policy next. This result is the basis for providing performance guarantees for the proposed spatially controlled relay beamforming system, as briefly stated above. Notation (some and basic): Matrices and vectors will be denoted by boldface uppercase and boldface lowercase letters, respectively. Calligraphic letters and formal script letters will denote sets and σ-algebras, respectively. The operators (·)T and (·)H , λmin (·) and λmax (·) will denote transposition, conjugate transposition, minimum and maximum eigenvalue, respectively. The `p P 1/p norm of x ∈ Rn is kxkp , ( ni=1 |x (i)|p ) , for all N 3 p ≥ 1. For any N 3 N ≥ 1, SN , SN +, SN ++ will denote the sets of symmetric, symmetric positive semidefinite and symmetric positive definite matrices, respectively. √The finite N -dimensional identity operator will be denoted as IN . + Additionally, we define J , −1, N+ , {1, 2, . . .}, N+ n , {1, 2, . . . , n}, Nn , {0} ∪ Nn and + + Nm n , Nn \ Nm−1 , for positive naturals n > m. 2 System Model On a compact, square planar region W ⊂ R2 , we consider a wireless cooperative network consisting of one source, one destination and R ∈ N+ assistive relays, as shown in Fig. 2.1. Each entity of the network is equipped with a single antenna, being able for both information reception and broadcasting/transmission. The source and destination are stationary and located at pS ∈ W and pD ∈ W, respectively, whereas the relays are assumed to be mobile; each relay i ∈ N+ R moves along a trajectory pi (t) ∈ S ⊂ W − {pS , pD } ⊂ W, where, in general, t ∈ R+ , and where S is compact. h iT We also define the supervector p (t) , pT1 (t) pT2 (t) . . . pTR (t) ∈ S R ⊂ R2R×1 . Additionally, we assume that the relays can cooperate with each other, either by exchanging local messages, or by communicating with a local fusion center, through a dedicated channel. Hereafter, as already stated above, all probabilistic arguments made below presume the existence of a complete base probability space of otherwise completely arbitrary structure, prespecified by a triplet (Ω, F , P). This base space models a universal source of randomness, generating all stochastic phenomena in our considerations. Assuming that a direct link between the source and the destination does not exist, the role of the relays is determined to be assistive to the communication, operating in a classical, two phase AF relaying mode. Fix a T > 0, and divide the time interval [0, T ] into NT time slots, with t ∈ N+ NT n o 2 denoting the respective time slot. Let s (t) ∈ C, with E |s (t)| ≡ 1, denote the symbol to be transmitted at time slot t. Also, assuming a flat fading channel model, as well as channel reciprocity and quasistaticity in each time slot, let the sets {fi (t) ∈ C}i∈N+ and {gi (t) ∈ C}i∈N+ contain the R R random, spatiotemporally varying source-relay and relay-destination channel gains, respectively. These are further assumed to be evaluations of the separable random channel fields or maps f (p, t) and g (p, t), respectively, that is, fi (t) ≡ f (pi (t) , t) and gi (t) ≡ g (pi (t) , t), for all i ∈ N+ R and for all t ∈ N+ . Then, if P > 0 denotes the transmission power of the source, during AF phase 1, the 0 NT signals received at the relays can be expressed as p ri(t), P0 fi(t) s(t) + ni(t) ∈ C, (2.1) 6 Source pS f( f p j ) , t) t ( pi (t)  ,t g (p i pi (t) g pj pj (t) (t) , Destination t)  t (t) , pD S⊂W W ⊂ R2 Figure 2.1: A schematic of the system model considered. n o + 2 for all i ∈ N+ and for all t ∈ N , where n (t) ∈ C, with E |n (t)| ≡ σ 2 , constitutes a zero i i R NT mean observation noise process at the i-th relay, independent across relays. During AF phase 2, all relays simultaneously retransmit the information received, each modulating their received signal by a weight wi (t) ∈ C, i ∈ N+ R . The signal received at the destination can be expressed as p X y (t), P0 wi(t) gi(t) ri(t) + i∈NR ≡ X p X P0 wi(t) gi(t) fi(t) s(t) + wi(t) gi(t) ni(t) + nD (t) ∈ C, | + i∈NR {z signal (transformed) } + i∈NR | {z interference + reception noise (2.2) } n o + 2 2 for all i ∈ N+ ≡ σD , constitutes a zero mean, R and t ∈ NNT , where nD (t) ∈ C, with E |nD (t)| spatiotemporally white noise process at the destination. In the following, it is assumed that the channel fields f (p, t) and g (p, t) may be statistically dependent both spatially and temporally, and that, as usual, the processes s (t), [f (p, t) g (p, t)], ni (t) for all i ∈ N+ R , and nD (t) are mutually independent. Also, we will assume that, at each time slot t, CSI {fi (t)}i∈N+ and {gi (t)}i∈N+ is known exactly to all relays. This may be achieved through R R pilot based estimation. 3 Spatiotemporal Wireless Channel Modeling This section introduces a general stochastic model for describing the spatiotemporal evolution of the wireless channel. For the benefit of the reader, a more intuitive justification of this general model is also provided. Additionally, some extensions to the model are briefly discussed, highlighting its versatility, along with some technical considerations, which will be of importance later, for analyzing the theoretical consistency of the subsequently proposed techniques. 7 3.1 Large Scale Gaussian Channel Modeling in the dB Domain At each space-time point (p, t) ∈ S × N+ NT , the source-relay channel field may be decomposed as the product of three space-time varying components [29], as f (p, t) ≡ f P L(p) f SH (p, t) f M F (p, t) eJ | {z } | {z } | {z } path loss shadowing 2π kp−pS k 2 λ , (3.1) fading √ where J , −1 denotes the imaginary unit, λ > 0 denotes the wavelength employed for the communication, and: −`/2 1. f P L (p) , kp − pS k2 loss exponent. is the path loss field, a deterministic quantity, with ` > 0 being the path 2. f SH (p, t) ∈ R is the shadowing field, whose square is, for each (p, t) ∈ S × N+ NT , a base-10 log-normal random variable with zero location. 3. f M F (p, t) ∈ C constitutes the multipath fading field, a stationary process with known statistics. The same decomposition holds in direct correspondence for the relay-destination channel field, g (p, t). Additionally, if “⊥ ⊥” means “is statistically independent of”, it is assumed that [20] h i h i f M F (p, t) g M F (p, t) ⊥⊥ f SH (p, t) g SH (p, t) and (3.2) f M F (p, t) ⊥⊥ g M F (p, t) . (3.3) In particular, if the phase of f M F (p, t) is denoted as φf (p, t) ∈ [−π, π], is further assumed that f M F (p, t) ⊥⊥ φf (p, t) , (3.4) and the same for for g M F (p, t). It also follows that h i h i f M F (p, t) g M F (p, t) ⊥⊥ f SH (p, t) g SH (p, t) . (3.5) We are interested in the magnitudes of both fields f (p, t) and g (p, t). Instead of working with the multiplicative model described by (3.1), it is much preferable to work in logarithmic scale. We may define the log-scale magnitude field F (p, t) , αS (p) ` + σS (p, t) + ξS (p, t) , (3.6) where we define −αS (p) , 10 log10 (kp − pS k2 ) ,  2 σS (p, t) , 10 log10 f SH (p, t) 2 (3.7) and ξS (p, t) , 10 log10 f M F (p, t) − ρ, with   2 ρ , E 10 log10 f M F (p, t) , 8 (3.8) (3.9) (3.10) for all (p, t) ∈ S ×N+ NT . It is then trivial to show that the magnitude of f (p, t) may be reconstructed via the bijective formula   log (10) ρ/20 |f (p, t)| ≡ 10 exp F (p, t) , (3.11) 20 for all (p, t) ∈ S × N+ NT , a “trick” that will prove very useful in the next section. Regarding g (p, t), the log-scale field G (p, t) is defined in the same fashion, but replacing the subscript “S” by “D”. For each relay i ∈ N+ R , let us define the respective log-scale channel magnitude processes Fi (t) , F (pi (t) , t) and Gi (t) , G (pi (t) , t), for all t ∈ N+ NT . Of course, we may stack all the Fi (t)’s defined in (3.6), resulting in the vector additive model F (t) , αS (p (t)) ` + σ S (t) + ξ S (t) ∈ RR×1 , (3.12) where αS (t), σ S (t) and ξ S (t) are defined accordingly. We can also define G (t) , αD (p (t)) ` + σ D (t) + ξ D (t) ∈ RR×1 , with each quantity in direct correspondence with (3.12). We may also i define, in the same manner, the log-scale shadowing and multipath fading processes σS(D) (t) , i + σS(D) (pi (t) , t) and ξS(D) (t) , ξS(D) (pi (t) , t), for all t ∈ NNT , respectively. Next, let us focus on the spatiotemporal dynamics of {|fi (t)|}i and {|gi (t)|}i , which are modeled through those of the shadowing components of {Fi (t)}i and {Gi (t)}i . It is assumed that, for any NT and any deterministic ensemble of positions of the relays in N+ NT , say {p (t)}t∈N+ , the random vector NT h iT F T (1) GT (1) . . . F T (NT ) GT (NT ) ∈ R2RNT ×1 (3.13) is jointly Gaussian with known means and   known covariance matrix.  More specifically, on a per i.i.d. i.d. 2 i 2 + i node basis, we let ξS(D) (t) ∼ N 0, σξ and σS(D) (t) ∼ N 0, η , for all t ∈ N+ NT and i ∈ NR [20, 30]. In particular, extending Gudmundson’s model [31] in a straightforward way, we propose defining the spatiotemporal correlations of the shadowing part of the channel as ! n o pi (k) − pj (l) 2 |k − l| i j 2 E σS (k) σS (l) , η exp − − , (3.14) β γ and correspondingly for n o i σD (t) + i∈NR , and additionally,   n o n o kpS − pD k2 i j i j E σS (k) σD (l) , E σS (k) σS (l) exp − , δ (3.15) + + + 2 for all (i, j) ∈ N+ R × NR and for all (k, l) ∈ NNT × NNT . In the above, η > 0 and β > 0 are called the shadowing power and the correlation distance, respectively [31]. In this fashion, we will call γ > 0 and δ > 0 the correlation time and the BS (Base Station) correlation, respectively. For later reference, let us define the (cross)covariance matrices n o ΣSD (k, l) , E σ S (k) σ TD (l) + 1{S≡D} 1{k≡l} σξ2 IR ∈ SR , (3.16) as well as Σ (k, l) ,   ΣSS (k, l) ΣSD (k, l) ∈ S2R , ΣSD (k, l) ΣDD (k, l) 9 (3.17) Source f( t) , ) t pi( pS cl a t bs O l e ca i s y Destination Ph pi (t) g pj pj (t)  t (t) , pD W ⊂ R2 Figure 3.1: A case where source-relay and relay-destination links are likely to be correlated. + for all (k, l) ∈ N+ NT × NNT . Using these definitions, the covariance matrix of the joint distribution describing (3.13) can be readily expressed as   Σ (1, 1) Σ (1, 2) . . . Σ (1, NT )  Σ (2, 1) Σ (2, 2) . . . Σ (2, NT )    2RNT Σ, . (3.18) ∈S .. .. .. . .   . . . . Σ (NT , 1) Σ (NT , 2) · · · Σ (NT , NT ) Of course, in order for Σ to be a valid covariance matrix, it must be at least positive semidefinite, 2RN that is, in S+ T . If fact, for nearly all cases of interest, Σ is guaranteed to be strictly positive 2RN definite (or in S++ T ), as the following result suggests. Lemma 1. (Positive (Semi)Definiteness of Σ) For all possible deterministic trajectories of the 2RNT 2RNT 2 relays on S R × N+ . In NT , it is true that Σ ∈ S++ , as long as σξ 6= 0. Otherwise, Σ ∈ S+ other words, as long as multipath (small-scale) fading is present in the channel response, the joint Gaussian distribution of the channel vector in (3.13) is guaranteed to be nonsingular. Proof of Lemma 1. See Appendix A. 3.2  Model Justification As already mentioned, the spatial dependence among the source-relay and relay-destination channel magnitudes (due to shadowing) is described via Gudmundson’s model [31] (position related component in (3.14)), which has been very popular in the literature and also experimentally verified 10 [20, 31, 32]. Second, the Laplacian type of temporal dependence among the same groups of channel magnitudes also constitutes a reasonable choice, in the sense that channel magnitudes are expected to be significantly correlated only for small time lags, whereas, for larger time lags, such dependence should decay at a fast rate. For an experimental justification of the adopted model, see, for instance, [33, 34]. Also note that, this exponential temporal correlation model may result as a reformulation of Gudmundson’s model, as well. Of course, one could use any other positive (semi)definite kernel, multiplying the spatial correlation exponential kernel, without changing the statement and proof of Lemma 1. Third, the incorporation of the spherical/isotropic BS correlation term in our proposed general model (in (3.15)) can be justified by the the existence of important cases where the source and destination might be close to each other and yet no direct link may exist between them. See, for instance, Fig. (3.1), where a “large” physical obstacle makes the direct communication between the source and the destination impossible. Then, relay beamforming can be exploited in order to enable efficient communication between the source and the destination, making intelligent use of the available resources, in order to improve or maintain a certain QoS in the network. In such cases, however, it is very likely that the shadowing parts of the source-relay and relay-destination links will be spatially and/or temporally correlated among each other, since shadowing is very much affected by the spatial characteristics of the terrain, which, in such cases, is common for both beamforming phases. Of course, by taking the BS station correlation δ → 0, one recovers the generic/trivial case where the source-relay and relay-destination links are mutually independent. 3.3 Extensions & Some Technical Considerations It should be also mentioned that our general description of the wireless channel as a spatiotemporal Gaussian field, does not limit the covariance matrix Σ to be formed as in (3.18); other choices for Σ will work fine in our subsequent developments, as long as, for each fixed t ∈ N+ NT , some mild conditions on the spatial interactions of the fields σS(D) (p, t) and ξS(D) (p, t), are satisfied. In what follows, we consider only the source-relay fields σS (p, t) and ξS (p, t). The same arguments hold for the relay-destination fields σD (p, t) and ξD (p, t), in direct correspondence. Fix t ∈ N+ NT . Recall that, so far, we have defined the statistical behavior of both σS (p, t) and ξS (p, t) only on a per-node basis. However, since the spatiotemporal statistical model introduced in Section 3.1 is assumed to be valid for any possible trajectory of the relays in S R × N+ NT , each relay is allowed to be anywhere in S, at each time slot t. This statistical construction induces the statistical structure (the laws) of both fields σS (p, t) and ξS (p, t) on S. As far as σS (p, t) is concerned, it is straightforward to see that it constitutes a Gaussian process with zero mean, and a continuous and isotropic covariance kernel Σσ : R2 → R, defined as   kτ k2 2 Σσ (τ ) , η exp − , (3.19) β where τ , p − q ≥ 0, for all (p, q) ∈ S 2 , which agrees with the model introduced in (3.14), for k ≡ l (Gudmundson’s model). Thus, σS (p, t) is a well defined random field. However, this is not the case with ξS (p, t). Under no additional restrictions, ξS (p, t) and ξS (q, t) are implicitly assumed to be independent for all (p, q) ∈ S 2 , such that p 6= q. Thus, we are led to consider ξS (p, t) as a zero-mean white process in continuous space. However, it is well known that such a process is technically problematic in a measure theoretic framework. Nevertheless, we may observe that it is not actually essential to characterize the covariance structure of ξS (p, t) for all (p, q) ∈ S 2 , with p 6= q. This is due to the fact that, at each time slot t ∈ N+ NT , it is physically 11 impossible for any two relays to be arbitrarily close to each other. We may thus make the following simple assumption on the positions of the relays, at each time slot t ∈ N+ NT . Assumption 1. (Relay Separation) There exists an εM F > 0, such that, for all t ∈ N+ NT and any ensemble of relay positions at time slot t, {pi (t)}i∈N+ , it is true that R inf + + (i,j)∈NR ×NR with i6=j pi (t) − pj (t) 2 > εM F . (3.20) Assumption 1 simply states that, at each t ∈ N+ NT , all relays are at least εM F distance units apart from each other. If this constraint is satisfied, then, without any loss of generality, we may define ξS (p, t) as a Gaussian field with zero mean, and with any continuous, isotropic (say) covariance kernel Σξ : R2 → R, which satisfies ( σξ2 , if τ ≡ 0 Σξ (τ ) , , (3.21) 0, if kτ k2 ≥ εM F and is arbitrarily defined otherwise. A simple example is the spherical, compactly supported kernel with width εM F , defined as [35]     3 kτ k2 1 kτ k2 3 Σo (τ ) 1 − + , if kτ k2 < εM F . (3.22) , 2 εM F 2 εM F 2  σξ 0, if kτ k2 ≥ εM F Of course, across (discrete) time slots, ξS (p, t) inherits whiteness without any technical issue. We should stress that the above assumptions are made for technical reasons and will be transparent in the subsequent analysis, as long as the mild constraint (3.20) is satisfied; from the perspective of the relays, all evaluations of ξS (p, t), at each time slot, will be independent to each other. And, of course, εM F may be chosen small enough, such that (3.20) is satisfied virtually always, assuming that the relays are sufficiently far apart from each other, and/or that, at each time slot t, their new positions are relatively close to their old positions, at time slot t − 1. Based on the explicit statistical description of σS (p, t) and ξS (p, t) presented above, we now additionally demand that both are spatial fields with (everywhere) continuous sample paths. Equivalently, we demand that, for every ω ∈ Ω, σS (ω, p, t) ∈ C (S) and ξS (ω, p, t) ∈ C (S) , where C (A) denotes the set of continuous functions on some qualifying set A. Sample path continuity of stationary Gaussian fields may be guaranteed under mild conditions on the respective lag-dependent covariance kernel, as the following result suggests, however in a, slightly weaker, almost everywhere sense. Theorem 1. (a.e.-Continuity of Gaussian Fields [36–38]) Let X (s), s ∈ RN , be a real-valued, zero-mean, stationary Gaussian random field with a continuous covariance kernel ΣX : RN → R. Suppose that there exist constants 0 < c < +∞ and ε, ζ > 0, such that 1− for all τ ∈ n ΣX (τ ) c ≤ , ΣX (0) |log (kτ k2 )|1+ε (3.23) o x ∈ RN kxk2 < ζ . Then, X (s) is P-almost everywhere sample path continuous, or, equivalently, P − a.e.-continuous, on every compact subset K ⊂ RN and, therefore, on RN itself. Additionally, X (s) is bounded, P-almost everywhere, as well. 12 Utilizing Theorem 1 and generically assuming that Σξ , Σo , it is possible to show that both fields σS (p, t) and ξS (p, t) satisfy the respective conditions and thus, that both fields are a.e.continuous on S. For σS (p, t), the reader is referred to ([37], Example 2.2). Of course, instead of Σσ , any other kernel may be considered, as long as the condition Theorem 1 is satisfied. As far as ξS (p, t) is concerned, let us choose ε ≡ 1 and ζ ≡ 1 . We thus need to show that, for every τ , kτ k2 ∈ [0, 1), it holds that 1− Σo (τ ) c , ≤ Σo (0) (log (kτ k2 ))2 or, equivalently, 1− 3 τ 1 1− + 2 εM F 2  τ εM F 3 ! (3.24) 1{τ <εM F } ≤ c (log (τ ))2 , (3.25) for some finite, positive constant c. We first consider the case where 1 > τ ≥ εM F > 0 (whenever εM F < 1, of course). We then have 1≤ (log (εM F ))2 2 (log (τ )) , c1 (log (τ ))2 , (3.26) easily verifying the condition required by Theorem 1. Now, when 0 ≤ τ < min {εM F , 1}, it is easy to see that there exists a finite c2 > 0, such that c2 τ≤ (log (τ ))2 . (3.27) If τ ≡ 0, then the inequality above holds for any choice of c2 . If τ > 0, define a function h : (0, 1) → R+ , as h (τ ) , τ (log (τ ))2 . (3.28) By a simple first derivative test, it follows that h (τ ) ≤ max h (τ ) τ ∈(0,1) ≡ h (exp (−2)) ≡ 4 exp (−2) , ∀τ ∈ (0, 1) . (3.29) Consequently, (3.27) is (loosely) satisfied for all τ ∈ [0, min {εM F , 1}) ⊆ (0, 1), by choosing c2 ≡ 4 exp (−2). Now, observe that 3 τ 1 − 2 εM F 2  τ εM F 3 < 3 τ 3c2 ≤ . 2 εM F 2εM F (log (τ ))2 (3.30) Finally, simply choose   3c2 c ≡ max c1 , 2εM F   2 6 exp (−2) ≡ max (log (εM F )) , < +∞, εM F 13 (3.31) which immediately implies (3.25). Therefore, we have shown that, if we choose Σξ ≡ Σo , then, for any fixed, but arbitrarily small εM F > 0, the spatial field ξS (p, t) will also be almost everywhere sample path continuous. Observe that, via the analysis above, sample path continuity of the involved fields can be ascertained, but only in the only almost everywhere sense. Nevertheless, it easy to show that there always exist everywhere sample path continuous fields σ eS (p, t) and ξeS (p, t), which are indistinguishable from σS (p, t) and ξS (p, t), respectively [39]. Therefore, there is absolutely no loss of generality if we take both σS (p, t) and ξS (p, t) to be sample path continuous, everywhere in Ω, and we will do so, hereafter. Sample path continuity of all fields σS(D) (p, t) and ξS(D) (p, t) will be essential in Section 4, where we rigorously discuss optimality of the proposed relay motion control framework, with special focus on the relay beamforming problem. We close this section by discussing, in some more detail, the temporal properties of the evaluations of the fields σS (p, t) and σD (p, t) at any deterministic set of N (say) positions {pi ∈ S}i∈N+ , N same across all NT time slots. This results in the zero-mean, stationary temporal Gaussian process h iT C (t) , {σS (pi , t)}i∈N+ {σD (pi , t)}i∈N+ ∈ R2N ×1 , t ∈ N+ (3.32) NT , N N with matrix covariance kernel ΣC : Z → S2N + , defined, under the specific spatiotemporal model considered, as   |ν| e ΣC (ν) , exp − ΣC ∈ S2N (3.33) + , γ + where ν , t − s, for all (t, s) ∈ N+ NT × NNT ,   1 κ b C ∈ S2N e 4Σ ΣC , + , κ 1   kpS − pD k2 κ , exp − < 1, δ  b C (i, j) , Σσ pi − pj , ∀ (i, j) ∈ N+ × N+ , Σ N N (3.34) (3.35) (3.36) and with “4” denoting the operator of the Kronecker product. Then, the following result is true. Theorem 2. (C (t) is Markov) For any deterministic, time invariant set of points {pi ∈ S}i∈N+ , N the vector process C (t) ∈ R2N ×1 , t ∈ N+ NT , as defined in (3.32)-(3.36), may be represented as a stable order-1 vector autoregression, satisfying the linear stochastic difference equation X (t) ≡ ϕX (t − 1) + W (t) , t ∈ N+ NT , (3.37) where ϕ , exp (−1/γ) < 1,   eC X (0) ∼ N 0, Σ and     i.i.d. eC , W (t) ∼ N 0, 1 − ϕ2 Σ In particular, C (t) is Markov. 14 (3.38) (3.39) ∀t ∈ N+ NT . (3.40) Proof of Theorem 2. The proof is a standard exercise in time series; see Appendix A.  From a practical point of view, Theorem 2 is extremely valuable. Specifically, the Markovian representation of C (t) may be employed in order to efficiently simulate the spatiotemporal paths of the communication channel on any finite, but arbitrarily fine grid. This is important, since it allows detailed numerical evaluation of all methods developed in this work. Theorem 2 also reveals that the channel model we have considered actually agrees with experimental results presented in, for instance, [33, 34], which show that autoregressive processes constitute an adequate model for stochastically describing temporal correlations among wireless communication links. Remark 1. Unfortunately, to the best of our knowledge, the channel process along a specific relay trajectory, presented in Section 3.1, where the positions of the relays are allowed to vary across time slots is no longer stationary and may not be shown to satisfy the Markov Property. Therefore, in our analysis presented hereafter, we regard the aforementioned process as a general, nonstationary Gaussian process. All inference results presented below are based on this generic representation.  Remark 2. For simplicity, all motion control problems in this paper are formulated on the plane (some subset of R2 ). This means that any motion of the relays of the network along the third dimension of the space is indifferent to our channel model. Nevertheless, under appropriate (based on the requirements discussed above) assumptions concerning 3D wireless channel modeling, all subsequent arguments would hold in exactly the same fashion when fully unconstrained motion in R3 is assumed to affect the quality of the wireless channel.  4 Spatially Controlled Relay Beamforming In this section, we formulate and solve the spatially controlled relay beamforming problem, advocated in this paper. The beamforming objective adopted will be maximization of the Signal-toInterference+Noise Ratio (SINR) at the destination (measuring network QoS), under a total power budget at the relays. For the single-source single-destination setting considered herein, the aforementioned beamforming problem admits a closed form solution, a fact which will be important in deriving optimal relay motion control policies, in a tractable fashion. But first, let us present the general scheduling schema of the proposed mobile beamforming system, as well as some technical preliminaries on stochastic programming and optimal control, which will be used repeatedly in the analysis to follow. 4.1 Joint Scheduling of Communications & Controls At each time slot t ∈ N+ NT and assuming the same carrier for all communication tasks, we employ a basic joint communication/decision making TDMA-like protocol, as follows: 1. The source broadcasts a pilot signal to the relays, which then estimate their respective channels relative to the source. 2. The same procedure is carried out for the channels relative to the destination. 3. Then, based on the estimated CSI, the relays beamform in AF mode (assume perfect CSI estimation). 15 Relay Motion Channel Estimation ... ... ∆τt−1 t−1 t Beamforming Figure 4.1: Proposed TDMA-like joint scheduling protocol for communications and controls. 4. Based on the CSI received so far, strategic decision making is implemented, motion controllers of the relays are determined and relays are steered to their updated positions. The above sequence of actions is repeated for all NT time slots, corresponding to the total operational horizon of the system. This simple scheduling protocol is graphically depicted in Fig. 4.1. Concerning relay kinematics, it is assumed that the relays obey the differential equation ṗ (τ ) ≡ u (τ ) , ∀τ ∈ [0, T ] , (4.1) where u , [u1 . . . uR ]T ∈ S R , with ui : [0, T ] → S being the motion controller of relay i ∈ N+ R. Apparently, relay motion is in continuous time. However, assuming the relays may move only after their controls have been determined and up to the start of the next time slot, we can write Z p (t) ≡ p (t − 1) + ut−1 (τ ) dτ, ∀t ∈ N2NT , (4.2) ∆τt−1 with p (1) ≡ pinit , and where ∆τt ⊂ R and ut : ∆τt → S R denote the time interval that the relays + are allowed P to move in and the respective relay controller, in each time slot t ∈ NNT −1 . It holds that u (τ ) ≡ t∈N+ ut (τ ) 1∆τt (τ ), where τ belongs in the first NT − 1 time slots.Of course, at each NT −1 time slot t, the length of ∆τt , |∆τt |, must be sufficiently small such that the temporal correlations of the CSI at adjacent time slots are sufficiently strong. These correlations are controlled by the correlation time parameter γ, which can be a function of the slot width. Therefore, the velocity of the relays must be of the order of (|∆τt |)−1 . In this work, though, we assume that the relays are not explicitly resource constrained, in terms of their motion. Now, regarding the form of the relay motion controllers ut−1 (τ ) , τ ∈ ∆τt−1 , given a goal position vector at time slot t, po (t) , it suffices to fix a path in S R , such that the points po (t) and p (t − 1) are 16 connected in at most time |∆τt−1 |. A generic choice for such a path is the straight line1 connecting poi (t) and pi (t − 1), for all i ∈ N+ R . Therefore, we may choose the relay controllers at time slot + t − 1 ∈ NNT −1 as 1 uot−1 (τ ) , (po (t) − p (t − 1)) , ∀τ ∈ ∆τt−1 . (4.3) ∆τt−1 As a result, any motion control problem considered hereafter can now be formulated in terms of specifying the goal relay positions at the next time slot, given their positions at the current time slot (and the observed CSI). In the following, let C (Tt ) denote the set of channel gains observed by the relays, along the paths of their point trajectories Tt , {p (1) . . . p (t)}, t ∈ N+ NT . Then, Tt may be recursively updated as + Tt ≡ Tt−1 ∪ {p (t)}, for all t ∈ NNT , with T0 , ∅. In a technically precise sense, {C (Tt )}t∈N+ will NT also denote the filtration generated by the CSI observed at the relays, along Tt , interchangeably. In other words, in case the trajectories of the relays are themselves random, then C (Tt ) denotes the σ-algebra generated by both the CSI observed up to and including time slot t and p (1) . . . p (t), for all t ∈ N+ NT . Additionally, we define C (T0 ) ≡ C ({∅}) as C (T0 ) , {∅, Ω}, that is, as the trivial σ-algebra, and we may occasionally refer to time t ≡ 0, as a dummy time slot, by convention. 4.2 2-Stage Stochastic Optimization of Beamforming Weights and Relay Positions: Base Formulation & Methodology At each time slot t ∈ N+ NT , given the current CSI encoded in C (Tt ), we are interested in determining o w (t) , [w1 (t) w2 (t) . . . wR (t)]T , as an optimal solution to a beamforming optimization problem, as a functional of C (Tt ). Let the optimal value (say infimum) of this problem be the process Vt ≡ V (p (t) , t), a functional of the CSI encoded in C (Tt ), depending on the positions of the relays at time slot t. Suppose that, at time slot t − 1, an oracle reveals C (Tt ≡ Tt−1 ∪ {p (t)}), which also determines the channels corresponding to the new positions of the relays at the next time slot t. Then, we could further consider optimizing Vt with respect to p (t), representing the new position of the relays. But note that, C (Tt ) is not physically observable and in the absence of the oracle, optimizing Vt with respect to p (t) is impossible, since, given C (Tt−1 ), the channels at any position of the relays are nontrivial random variables. However, it is reasonable to search for the best decision on the positions of the relays at time slot t, as a functional of the available information encoded in C (Tt−1 ), such that Vt is optimized on average. This procedure may be formally formulated as a 2-stage stochastic program [26], minimize E {V (p (t) , t)} p(t) subject to p (t) ≡ M (C (Tt−1 )) ∈ C (po (t−1)) , , for some M : R4R(t−1) → R2R (4.4) 2R to be solved at each t−1 ∈ N+ ⇒ R2R is a multifunction, with C (po (t − 1)) ⊆ S R NT −1 , where C : R representing a physically feasible spatial neighborhood around the point po (t − 1) ∈ S R , the decision vector selected at time t − 2 ∈ NNT −2 (recall that t ≡ 0 denotes a dummy time slot). Note that, in 1 Caution is needed here, due to the possibility of physical collisions among relays themselves, or among relays and other physical obstacles in the workspace, S. Nevertheless, for simplicity, we assume that either such events never occur, or that, if they do, there exists some transparent collision avoidance mechanism implemented at each relay, which is out of our direct control. 17 2nd Stage Problem at t − 1 Beamforming Optimization {fi , gi }: CSI at (po (t − 1) , t − 1) C(Tt−2 ) · ∪ {·} w∗ (t − 1) po (t) and uot−1 (τ ) , τ ∈ ∆τt−1 1st Stage Problem at t Relay Controller C(Tt−1 ) Optimization @ Time Slot t − 1 Figure 4.2: 2-Stage optimization of beamforming weights and spatial relay controllers. The variables wo (t − 1), uot−1 and po (t) denote the optimal beamforming weights and relay controllers at time slot t − 1, and the optimal relay positions at time slot t, respectively. general, the decision selected at t − 2, po (t − 1), may not be an optimal decision for the respective problem solved at t − 2 and implemented at t − 1. To distinguish po (t − 1) from an optimal decision at t − 2, the latter will be denoted as p∗ (t − 1), for all t ∈ N2NT . Also note that, in order for (4.4) to be well defined, important technical issues, such as measurability of Vt and existence of its expectation at least for each feasible decision p (t), should be precisely resolved. Problem (4.5), together with the respective beamforming problem with optimal value Vt (which will focus on shortly) are referred to as the first-stage problem and the second-stage problem, respectively [26]. Hereafter, aligned with the literature, any feasible choice for the decision variable p (t) in (4.5), will be interchangeably called an (admissible) policy. A generic block representation of the proposed 2-stage stochastic programming approach is depicted in Fig. 4.2. Mainly due to the arbitrary structure of the function M, (4.4) is too general to consider, within a reasonable analytical framework. Thus, let us slightly constrain the decision set of (4.4) to include only measurable decisions, resulting in the formulation minimize E {V (p (t) , t)} p(t) o subject to p (t) ≡ M (C (T  t−1 )) ∈ C(p (t−1)) ,  , −1 4R(t−1) 2R M (A) ∈ B R , ∀A ∈ B R (4.5) provided, of course, that the stochastic program (4.5) is well defined. The second constraint in (4.5) is equivalent to M being Borel measurable, instead of being any arbitrary function, as in (4.4). Provided its well definiteness, the stochastic program (4.5) is difficult to solve, most importantly because of its variational character ; the decision variable p (t) is constrained to be a functional of the CSI observed up to and including time t − 1. A very powerful tool, which will enable us to both make (4.5) meaningful and overcome the aforementioned difficulty, is the Fundamental Lemma of Stochastic Control [23–28], which in fact refers to a family of technical results related to the interchangeability of integration (expectation) and minimization in general stochastic programming. Under the framework of the Fundamental Lemma, in Appendix B, we present a detailed discussion, best suited for the purposes of this paper, which is related to the important technical issues, arising when one wishes to meaningfully define and tractably simplify “hard”, variational problems of the form of (4.5). 18 In particular, Lemma 4, presented in Section 8.2.4 (Appendix B), identifies six sufficient technical conditions (conditions C1-C6, see statement of Lemma 4), under which the variational problem (4.5) is exchangeable by the structurally simpler, pointwise optimization problem minimize E {V (p (t) , t) |C (Tt−1 ) } p(t) subject to p (t) ∈ C (po (t−1)) , (4.6) to be solved at each t − 1 ∈ N+ NT −1 . Observe that, in (4.6), the decision variable p (t) is constant, as opposed to (4.5), where the decision variable p (t) is itself a functional of the observed information at time slot t − 1, that is, a policy. Provided that CSI C (Tt−1 ) and po (t−1) are known and that the involved conditional expectation can be somehow evaluated, (4.6) constitutes an ordinary, nonlinear optimization problem. If Lemma 4 is in power, exchangeability of (4.5) by (4.6) is understood in the sense that the optimal value of (4.5), which is a number, coincides with the expectation of optimal value of (4.6), which turns out to be a measurable function of C (Tt−1 ). In other words, minimization is interchangeable with integration, in the sense that ( ) inf p(t)∈Dt E {V (p (t) , t)} ≡ E info p(t)∈C (p (t−1)) E {V (p (t) , t) |C (Tt−1 ) } , (4.7) for all t ∈ N2NT , where Dt denotes the set of feasible decisions for (4.5). What is more, under the aforementioned technical conditions of Lemma 4, exchangeability implies that, if there exists an admissible policy of (4.5), say p∗ (t), which solves (4.6), then p∗ (t) is also optimal for (4.5). Additionally, Lemma 4 implies existence of at least one optimal solution to (4.6), which is simultaneously feasible and, thus, optimal, for the original stochastic program (4.5). If, further, (4.6) features a unique optimal solution, say p∗ (t), then p∗ (t) must be an optimal solution to (4.5). In the next subsection, we will specify the optimal value of the second-stage subproblem, Vt , for each time t ∈ N+ NT . That is, we will consider a fixed criterion for implementing relay beamforming (recourse actions) at each t, after the predictive decisions on the positions of the relays have been made (at time t − 1) and the relays have moved to their new positions, implying that the CSI at time at time t has been revealed. Of course, one of the involved challenges will be to explicitly show that Conditions C1-C6 are satisfied for each case considered, so that we can focus on solving the ordinary nonlinear optimization problem (4.6), instead of the much more difficult variational problem (4.5). The other challenge we will face is actually solving (4.6). Remark 3. It would be important to note that the pointwise problem (4.5) admits a reasonable and intuitive interpretation: At each time slot t − 1, instead of (deterministically) optimizing Vt with respect to p (t) in C (po (t−1)), which is, of course, impossible, one considers optimizing a projection of V (p, t), p ∈ S R onto the space of all measurable functionals of C (Tt−1 ), which corresponds to the information observed by the relays, up to t − 1. Provided that, for every p ∈ S R , V (p, t) is in the Hilbert space of square-integrable, real-valued functions relative to P, L2 (Ω, F , P; R), it is then reasonable to consider orthogonal projections, that is, the Minimum Mean Square Error (MMSE) estimate, or, more accurately, prediction of V (p, t) given C (Tt−1 ). This, of course, coincides with the conditional expectation E {V (p, t) |C (Tt−1 ) }. One then optimizes the random utility E {V (p, t) |C (Tt−1 ) }, with respect to p in the random set C (po (t−1)), as in (4.6). Although there is nothing technically wrong with actually starting with (4.6) as our initial problem formulation, and essentially bypassing the technical difficulties of (4.5), the fact that the 19 objective of (4.6) depends on C (Tt−1 ) does not render it a useful optimality criterion. This is because the objective of (4.6) quantifies the performance of a single decision, only conditioned on C (Tt−1 ), despite the fact that an optimal solution to (4.6) (provided it exists) constitutes itself a functional of C (Tt−1 ). In other words, the objective of (4.6) does not quantify the performance of a policy (a decision rule); in order to do that, any reasonable performance criterion should assign a number to each policy, ranking its quality, and not a function depending on C (Tt−1 ). The expected utility E {Vt } of the variational problem (4.5) constitutes a suitable such criterion. And by the Fundamental Lemma, (4.5) may be indeed reduced to (4.6), which can thus be regarded as a proxy for solving the former. There are two main reasons justifying our interest in policies, rather than individual decisions. First, one should be interested in the long-term behavior of the beamforming (in our case) system, in the sense that it should be possible to assess system performance if the system is used repeatedly over time, e.g., periodically (every hour, day) or on demand. For example, consider a beamforming system (the “experiment”), which operates for NT time slots and dependently restarts its operation at time slots kNT +1, for k in some subset of N+ . This might be practically essential for maintaining system stability over time, saving on resources, etc. It is then clear that merely quantifying the performance of individual decisions is meaningless, from an operational point of view; simply, the random utility approach quantifies performance only along a specific path of the observed information, C (Tt−1 ), for t ∈ N+ NT . This issue is more profound when channel observations taking specific values correspond to events of zero measure (this is actually the case with the Gaussian channel model introduced in Section 3). On the contrary, it is of interest to jointly quantify system performance when decisions are made for different outcomes of the sample space Ω. This immediately results in the need for quantifying the performance of different policies (decision rules), and this is only possible by considering variational optimization problems, such as (4.5). Additionally, because decisions are made in stages, it is of great interest to consider how the system performs across time slots, or, in other words, to discover temporal trends in performance, if such trends exist. In particular, for the beamforming problem considered in this paper, we will be able to theoretically characterize system behavior under both suboptimal and optimal decision making, in the average (expected) sense (see Section 4.4), across all time slots; this is impossible to do for each possible outcome of the sample space, individually, when the random utility approach is considered. The second main reason for considering the variational program (4.5) as our main objective, instead of (4.6), is practical, and extremely important from an engineering point of view. The expected utility approach assigns, at each time slot, a number to each policy, quantifying its quality. Simulating repeatedly the system and invoking the Law of Large Numbers, one may obtain excellent estimates of the expected performance of the system, quantified by the chosen utility. Therefore, the systematic experimental assessment of a particular sequence of policies (one for each time slot) is readily possible. Apparently, such experimental validation approach is impossible to perform by adopting the random (conditional) utility approach, since the performance of the system will be quantified via a real valued (in general) random quantity.  Remark 4. The stochastic programming methodology presented in this subsection is very general and can support lots of choices in regard to the structure of the second-stage subproblem, Vt . As shown in the discussion developed in Appendix B, the key to showing the validity of the Fundamental Lemma is the set of conditions C1-C6. If these are satisfied, it is then possible to convert the original, variational problem into a pointwise one, while strictly preserving optimality.  20 4.3 SINR Maximization at the Destination The basic and fundamentally important beamforming criterion considered in this paper is that of enhancing network QoS, or, in other words, maximizing the respective SINR at the destination, subject to a total power budget at the relays. At each time slot t ∈ N+ NT , given CSI encoded in T C (Tt ) and with w (t) , [w1 (t) . . . wR (t)] , this may be achieved by formulating the constrained optimization problem [1, 4] E { PS (t)| C (Tt )} E { PI+N (t)| C (Tt )} maximize w(t) , (4.8) subject to E { PR (t)| C (Tt )} ≤ Pc where PR (t), PS (t) and PI+N (t) denote the random instantaneous power at the relays, that of the signal component and that of the interference plus noise component at the destination (see (2.2)), respectively and where Pc > 0 denotes the total available relay transmission power. Using the mutual independence assumptions regarding CSI related to the source and destination, respectively, (4.8) can be reexpressed analytically as [1] maximize w(t) wH (t) R (p (t) , t) w (t) 2 σD + wH (t) Q (p (t) , t) w (t) , subject to w H (4.9) (t) D (p (t) , t) w (t) ≤ Pc where, dropping the dependence on (p (t) , t) or t for brevity, h iT  2 2 2 D , P0 diag |f1 | |f2 | . . . |fR | + σ 2 IR ∈ SR ++ , T R , P0 hhH ∈ SR and + , with h , [f1 g1 f2 g2 . . . fR gR ] h  iT Q , σ 2 diag |g1 |2 |g2 |2 . . . |gR |2 ∈ SR ++ . (4.10) (4.11) (4.12) Note that the program (4.9) is always feasible, as long as Pc is nonnegative. It is well known that the optimal value of (4.9) can be expressed in closed form as [1]   −1 2 −1/2 −1/2 −1/2 −1/2 Vt ≡ V (p (t) , t) , Pc λmax σD IR + Pc D QD D RD , (4.13) for all t ∈ N+ NT . Exploitting the structure of the matrices involved, Vt may also be expressed analytically as [4] Vt ≡ , X + i∈NR X + i∈NR Pc P0 |f (pi (t) , t)|2 |g (pi (t) , t)|2 2 2 P0 σ D |f (pi (t) , t)|2 + Pc σ 2 |g (pi (t) , t)|2 + σ 2 σD VI (pi (t) , t) , ∀t ∈ N+ NT . 21 (4.14) Adopting the 2-stage stochastic optimization framework presented and discussed in Section 4.2, we are now interested, at each time slot t − 1 ∈ N+ NT −1 , in the program maximize E p(t)   X      VI (pi (t) , t)   + i∈NR o subject to p (t) ≡ M (C (T  t−1 )) ∈ C(p (t−1)) ,  M−1 (A) ∈ B R4R(t−1) , ∀A ∈ B R2R , (4.15) where po (1) ∈ S R is a known constant, representing the initial positions of the relays. But in order to be able to formulate (4.15) in a well defined manner fully and and simplify it by exploitting the Fundamental Lemma, we have to explicitly verify Conditions C1-C6 of Lemma 4 in Section 8.2.4 of Appendix B. To this end, let us present a definition. Definition 1. (Translated Multifunctions) Given nonempty sets H ⊂ RN , A ⊆ RN and any fixed h ∈ H, D : RN ⇒ RN is called the (H, h)-translated multifunction in A, if and only if n o N D (y) , { x ∈ A| x − y ∈ H}, for all y ∈ A − h , x ∈ R x + h ∈ A . Note that translated multifunctions, in the sense of Definition 1, are always unique and nonempty, whenever y ∈ A − h. We also observe that, if y ∈ / A − h, D (y) is undefined; in fact, outside A − h, D may be defined arbitrarily, and this will be irrelevant in our analysis. The following assumption on the structure of the compact-valued multifunction C : R2R ⇒ R2R is adopted hereafter, and for the rest of this paper. Assumption 2. (C is Translated) Given any arbitrary compact set 0 ∈ G, C constitutes the corresponding (G, 0)-translated, compact-valued multifunction in S R . Then, the following important result is true. Theorem 3. (Verification Theorem / SINR Maximization) Suppose that, at time slot t−1 ∈ o o N+ NT −1 , the selected decision at t − 2, p (t − 1) ≡ p (ω, t − 1), is measurable relative to C (Tt−2 ). Then, the stochastic program (4.15) satisfies conditions C1-C6 and the Fundamental Lemma applies (see Appendix B, Section 8.2.4, Lemma 4). Additionally, as long as the pointwise program maximize p X + i∈NR E { VI (pi , t)| C (Tt−1 )} (4.16) o subject to p ∈ C (p (t−1)) has a unique maximizer p∗ (t), and po (t) ≡ p∗ (t), then po (t) is C (Tt−1 )-measurable and the condition of the theorem is automatically satisfied at time slot t. Proof of Theorem 3. See Appendix C.  As Theorem 3 suggests, in order for conditions C1-C6 to be simultaneously satisfied for all t ∈ N2NT , it is sufficient that the program (4.16) has a unique optimal solution, for each t. Although, in general, such requirement might not be particularly appealing, for the problems of interest in this paper, the event where (4.16) does not have a unique optimizer is extremely rare, almost never 22 occurring in practice. Nevertheless, uniqueness of the optimal solution to (4.16) does not constitute a necessary condition for C (Tt−1 )-measurability of the optimal decision at time slot t − 1. For instance, p∗ (t) will always be C (Tt−1 )-measurable when the compact-valued, closed multifunction C : R2R ⇒ R2R is additionally finite-valued, and po (t) ≡ p∗ (t). This choice for C is particularly useful for practical implementations. In any case, as long as conditions C1-C6 are guaranteed to be satisfied, we may focus exclusively on the pointwise program (4.16), whose expected optimal value, via the Fundamental Lemma, coincides with the optimal value of the original problem (4.15). By definition, we readily observe that the problem (4.16) is separable. In fact, given that, for each t ∈ N+ NT −1 , decisions taken and CSI collected so far are available to all relays, (4.16) can be solved in a completely distributed fashion at the relays, with the i-th relay being responsible for solving the program maximize E { VI (p, t)| C (Tt−1 )} p , (4.17) subject to p ∈ Ci (po (t−1)) 2 2 + at each t − 1 ∈ N+ NT −1 , where Ci : R ⇒ R denotes the corresponding part of C, for each i ∈ NR . Note that no local exchange of intermediate results is required among relays; given the available information, each relay independently solves its own subproblem. It is also evident that apart from the obvious difference in the feasible set, the optimization problems at each of the relays are identical. The problem, however, with (4.17) is that its objective involves the evaluation of a conditional expectation of a well defined ratio of almost surely positive random variables, which is impossible to perform analytically. For this reason, it is imperative to resort to the development of well behaved approximations to (4.17), which, at the same time, would facilitate implementation. In the following, we present two such heuristic approaches. 4.3.1 Approximation by the Method of Statistical Differentials The first idea we are going to explore is that of approximating the objective of (4.17) by truncated Taylor expansions. Observe that VI can be equivalently expressed as VI (p, t) ≡ 1 2 σD Pc −2 |g (p, t)| 2 2 σ 2 σD σ + |f (p, t)|−2 + |f (p, t)|−2 |g (p, t)|−2 P0 Pc P0 , 1 , VII (p, t) (4.18) 2 for all (p, t) ∈ S × N+ NT . Then, for t ∈ NNT , we may locally approximate E { VI (p, t)| C (Tt−1 )} around the point E { VII (p, t)| C (Tt−1 )} (see Section 3.14.2 in [21]; also known as the Method of Statistical Differentials) via a first order Taylor expansion as E { VI (p, t)| C (Tt−1 )} ≈ or via a second order Taylor expansion as E { VI (p, t)| C (Tt−1 )} ≈ 1 , E { VII (p, t)| C (Tt−1 )} n o E (VII (p, t))2 C (Tt−1 ) (E { VII (p, t)| C (Tt−1 )})3 (4.19) , where it is straightforward to show that the square on the numerator can be expanded as !2 2 2 σ 2 σD σ 2 σD 2 −4 −4 (VII (p, t)) ≡ |f (p, t)| |g (p, t)| + 2 |f (p, t)|−2 |g (p, t)|−2 Pc P0 Pc P0 23 (4.20) !2 2 σD σ2 σ2 |f (p, t)|−4 |g (p, t)|−2 + 2 +2 P0 Pc P0 !2 !2 2 σ2 σD + |f (p, t)|−4 + |g (p, t)|−4 . P0 Pc 2 σD Pc !2 |f (p, t)|−2 |g (p, t)|−4 (4.21) The approximate formula (4.20) may be in fact computed in closed form at any point p ∈ S, thanks to the following technical, but simple, result. Lemma 2. (Big Expectations) Under the wireless channel model introduced in Section 3, it is true that, at any p ∈ S,   F,G [F (p, t) G (p, t)]T C (Tt−1 ) ∼ N µF,G (p) , Σ (p) , (4.22) t|t−1 t|t−1 for all t ∈ N2NT , and where we define h iT F G µF,G (p), µ (p) µ (p) , t|t−1 t|t−1 t|t−1 (4.23)  µFt|t−1 (p),αS (p) ` + cF1:t−1 (p) Σ−1 1:t−1 m1:t−1 −µ1:t−1 ∈ R,  −1 µGt|t−1 (p),αD (p) ` + cG 1:t−1 (p) Σ1:t−1 m1:t−1 −µ1:t−1 ∈ R and   " " # #T kp −p k 2 2 2 − S δD 2 F F η + σ η e c (p) c (p) ξ 1:t−1   − 1:t−1 ΣF,G Σ−1 ∈ S2++ , 1:t−1 G kp −p k t|t−1 (p), cG (p) c (p) 2 − S δD 2 2 2 1:t−1 1:t−1 η e η + σξ (4.24) (4.25) (4.26) with h iT m1:t−1 , F T (1) GT (1) . . . F T (t − 1) GT (t − 1) ∈ R2R(t−1)×1 , µ1:t−1 ,[αS (p (1)) αD (p (1)) . . . αS (p (t − 1)) αD (p (t − 1))]T ` ∈ R2R(t−1)×1 , h i cF1:t−1 (p), cF1 (p) . . . cFt−1 (p) ∈ R1×2R(t−1) , h i G G 1×2R(t−1) cG , 1:t−1 (p), c1 (p) . . . ct−1 (p) ∈ R  n n oo oo n n j F j ck (p), E σS (p, t) σS (k) E σS (p, t) σD (k) , ∀k ∈ N+ t−1 + + j∈NR j∈NR n n  oo n n oo j cG E σD (p, t) σSj (k) E σ (p, t) σ (k) , ∀k ∈ N+ t−1 and k (p), D + + D j∈NR j∈NR   Σ (1, 1) ··· Σ (1, t − 1)   2R(t−1) .. .. .. Σ1:t−1 ,  ,  ∈ S++ . . . (4.27) (4.28) (4.29) (4.30) (4.31) (4.32) (4.33) Σ (t − 1, 1) · · · Σ (t − 1, t − 1) for all (p, t) ∈ S × N2NT . Further, for any choice of (m, n) ∈ Z × Z, the conditional correlation of the fields |f (p, t)|m and |g (p, t)|n relative to C (Tt−1 ) may be expressed in closed form as E { |f (p, t)|m |g (p, t)|n | C (Tt−1 )} 24  T   2  T  ! log (10) log (10) m m m ≡10(m+n)ρ/20 exp µF,G (p)+ ΣF,G (p) , (4.34) t|t−1 t|t−1 n n n 20 20 at any p ∈ S and for all t ∈ N2NT . Proof of Lemma 2. See Appendix C.  Since, by exploitting Lemma 2 and (4.21), formula (4.20) can be evaluated without any particular difficulty, we now propose the replacement of the original pointwise problem of interest, (4.17), with either of the heuristics 1 maximize p E { VII (p, t)| C (Tt−1 )} (4.35) o subject to p ∈ Ci (p (t−1)) and maximize p n o E (VII (p, t))2 C (Tt−1 ) (E { VII (p, t)| C (Tt−1 )})3 , (4.36) o subject to p ∈ Ci (p (t−1)) + to be solved at relay i ∈ N+ R , at each time t − 1 ∈ NNT −1 , depending on the order of approximation employed, respectively. Observe that Jensen’s Inequality directly implies that the objective of (4.35) is always lower than or equal than that of (4.36) and that of the original program (4.17), conditioned, of course, on identical information. As a result, (4.35) is also a lower bound relaxation to (4.17). On the other hand, the objective of (4.35) might be desirable in practice, since it is easier to compute. Both approximations are technically well behaved, though, as made precise by the next theorem. Theorem 4. (Behavior of Approximation Chains I / SINR Maximization) Both heuristics (4.35) and (4.36) each feature at least one measurable maximizer. Therefore, provided that any of the two heuristics is solved at each time slot t − 1 ∈ N+ NT −1 , that the selected one features a unique ∗ ∗ o e (t), and that p e (t) ≡ p (t), for all t ∈ N2NT , the produced decision chain is measurable maximizer, p and condition C2 is satisfied at all times. Proof of Theorem 4. See Appendix C.  Theorem 4 implies that, at each time slot t ∈ N+ NT −1 and under the respective conditions, the chosen heuristic constitutes a well defined approximation to the original problem, (4.17) and, in turn, to (4.15), in the sense that all conditions C1-C4 are satisfied. At this point, it will be important to note that, for each p ∈ S, computation of the conditional mean and covariance in (4.22) of Lemma 2 require execution of matrix operations, which are of expanding dimension in t ∈ N2NT ; observe that, for instance, the covariance matrix Σ1:t−1 is of size 2R (t − 1), which is increasing in t ∈ N2NT . Fortunately, however, the increase is linear in t. Additionally, the reader may readily observe that the inversion of the covariance matrix Σ1:t−1 constitutes the computationally dominant operation in the long formulas of Lemma 2. The computational complexity of this matrix inversion, which takes place at each time slot t − 1 ∈ N+ NT −1 , is,   3 3 in general, of the order of O R t elementary operations. Fortunately though, we may exploit the 25 Matrix Inversion Lemma, in order to reduce the computational complexity of the aforementioned  3 2 matrix inversion to the order of O R t . Indeed, by construction, Σ1:t−1 may be expressed as Σ1:t−1 where  Σ1:t−2 ≡ T (Σc1:t−2 )  Σc1:t−2 , Σ (t − 1, t − 1) (4.37) Σc1:t−2 , [Σ (1, t − 1) . . . Σ (t − 2, t − 1)]T ∈ R2R(t−2)×2R . Invoking the Matrix Inversion Lemma, we obtain the recursive expression   T −1 −1 c −1 c −1 −1 c −1 Σ + Σ1:t−2 Σ1:t−2 St−1 (Σ1:t−2 ) Σ1:t−2 −Σ1:t−2 Σ1:t−2 St−1  1:t−2 , Σ−1 1:t−1 = T c −1 −1 −S−1 (Σ ) Σ S t−1 1:t−2 1:t−2 t−1 c 2R St−1 , Σ (t − 1, t − 1) − (Σc1:t−2 ) Σ−1 1:t−2 Σ1:t−2 ∈ S++ , T (4.38) with (4.39) (4.40) where St−1 is the respective Schur complement. From (4.39) and (4.40), it can be easily verified  c 3 2 . that the most computationally demanding operation involved is Σ−1 Σ , of order O R t 1:t−2 1:t−2     Since the inversion of St−1 is of the order of O R3 , we arrive at a total complexity of O R3 t2 elementary operations of the recursive scheme presented above, and implemented at each time slot t−1. The achieved reduction in complexity is important. In most scenarios, R, the number of relays, will be relatively small and fixed for the whole operation of the system, whereas t, the time slot index, might generally take large values, since it is common for the operational horizon of the system, NT , to be large. Additionally, the reader may readily observe that the aforementioned covariance matrix is independent of the position at which the channel is predicted, p. As a result, its inversion may be performed just once in each time slot, for all evaluations of the mean and covariance of the Gaussian density in (4.22), for all different choices of p on a fixed grid (say). Consequently, if the total number of such evaluations is P ∈ N+ , and recalling that the complexity for a matrixvector multiplication is quadratic in the dimension of the quantities involved, then, at worst, the   2 2 3 2 total computational complexity for channel prediction is of the order of O P R t + R t , at each t − 1 ∈ N+ would have to be able NT −1 . This means that a potential actual computational system   to execute matrix operations with complexity at most of the order of O P R2 NT2 + R3 NT2 , which constitutes the worst case complexity, over all NT time slots. The analysis above characterizes the complexity for solving either of the heuristics (4.35) and (4.36), if the feasible set Ci is assumed to be finite, for all i ∈ N+ R . Of course, if the quantity RNT is considered a fixed constant, implying that computation of the mean and covariance in (4.22) is considered the result of a black box with fixed (worst) execution time and with input p, then, at each t − 1 ∈ N+ NT −1 , the total computational complexity for channel prediction is of the order of O (P ) function evaluations, that is, linear in P . 4.3.2 Brute Force The second approach to the solution of (4.17), considered in this section, is based on the fact that the objective of the aforementioned program can be evaluated rather efficiently, relying on the multidimensional Gauss-Hermite Quadrature Rule [40], which constitutes a readily available routine for numerical integration. It is particularly effective for computing expectations of complicated functions of Gaussian random variables [41]. This is indeed the case here, as shown below. 26 Leveraging Lemma 2 and as it can also be seen in the proof of Theorem 3 (condition C6), the objective of (4.17) can be equivalently represented, for all t ∈ N2NT , via a Lebesgue integral as Z   F,G r (x) N x; µF,G (p) , Σ (p) dx, (4.41) E { VI (p, t)| C (Tt−1 )} = t|t−1 t|t−1 2 R for any choice of p ∈ S, where N (·; µ, Σ) : R2 → R++ denotes the bivariate Gaussian density, with 2 mean µ ∈ R2×1 and covariance Σ ∈ S2×2 + , and the function r : R → R++ is defined exploitting the trick (3.11) as r (x) ≡ r (x1 , x2 ) , Pc P0 102ρ/10 [exp (x1 + x2 )] 2 P0 σD [exp (x1 )] log(10) 10 + Pc σ 2 [exp (x2 )] log(10) 10 log(10) 10 2 + 10−ρ/10 σ 2 σD , (4.42) for all x ≡ (x1 , x2 ) ∈ R2 . Exploitting the Lebesgue integral representation (4.41), it can be easily shown that the conditional expectation may be closely approximated by the double summation formula (see Section IV in [41]) q  X X F,G F,G E { VI (p, t)| C (Tt−1 )} ≈ $l 1 $l 2 r Σ t|t−1(p)q (l1 ,l2 ) + µ t|t−1(p) , (4.43) + l1 ∈NM + l2 ∈NM  T where M ∈ N+ denotes the quadrature resolution, q (l1 ,l2 ) , ql1 ql2 ∈ R2×1 denotes the (l1 , l2 )-th  T quadrature point and $ (l1 ,l2 ) , $l1 $l2 ∈ R2×1 denotes respective weighting coefficient, for all + (l1 , l2 ) ∈ N+ M × NM . Both sets of quadrature points and weighting coefficients are automatically selected apriori and independently in each dimension, via the following simple procedure [41, 42]. Let us define a matrix J ∈ RM ×M , such that r  min {i, j} , |j − i| ≡ 1 + , ∀ (i, j) ∈ N+ (4.44) J (i, j) , 2 M × NM .  0, otherwise That is, J constitutes a hollow, tridiagonal, symmetric matrix. Let the sets {λi (J ) ∈ R}i∈N+ M n o M ×1 and v i (J ) ∈ R contain the eigenvalues and normalized eigenvectors of J , respectively. + i∈NM Then, simply, quadrature points and the respective weighting coefficients are selected independently in each dimension j ∈ {1, 2} as √ qlj ≡ 2λlj (J ) and (4.45)  2 $lj ≡ v lj (J ) (1) , ∀lj ∈ N+ (4.46) M. In (4.46), v lj (J ) (1) denotes the first entry of the involved vector. Under the above considerations, in this subsection, we propose, for a sufficiently large number of quadrature points M , the replacement of the original pointwise problem (4.17) with the heuristic  q X F,G F,G maximize $l1 $l2 r Σ t|t−1(p)q (l1 ,l2 ) + µ t|t−1(p) p + + , (4.47) (l1 ,l2 )∈NM ×NM subject to p ∈ Ci (po (t−1)) 27 + to be solved at relay i ∈ N+ R , at each time t − 1 ∈ NNT −1 . As in Section 4.3.1 above, the following result is in power, concerning the technical consistency of the decision chain produced by considering the approximate program (4.47), for all t ∈ N2NT . Proof is omitted, as it is essentially identical to that of Theorem 4. Theorem 5. (Behavior of Approximation Chains II / SINR Maximization) Consider the the heuristic (4.47). Then, under the same circumstances, all conclusions of Theorem 4 hold true. Since the computations in (4.45) and (4.46) do not depend on p or the information collected so far, encoded in C (Tt−1 ), for t ∈ N2NT , quadrature points and the respective weights can be determined offline and stored in memory. Therefore, the computational burden of (4.43) concentrates solely  on  the computation of an inner product, whose q computational complexity  is of the order of 2 2 F,G F,G O M , as well as a total of M evaluations of r Σ t|t−1(p)q (l1 ,l2 ) +µ t|t−1(p) , for each value of F,G p. Excluding temporarily the computational burden of µF,G t|t−1 (p) and Σ t|t−1 (p), each of the latter evaluations is of fixed complexity, since each involves elementary operations among matrices and vectors in R2×2 and R2×1 , respectively and, additionally, the involved matrix square root can be evaluated in closed form, via the formula [43] r   F,G Σ t|t−1(p) + det ΣF,G (p) I2 q t|t−1 2×2 s ΣF,G ∈ S+ , (4.48) (p) ≡ r t|t−1     F,G tr ΣF,G t|t−1 (p) + 2 det Σ t|t−1 (p) where we have taken into account that ΣF,G t|t−1 (p) is always a (conditional) covariance matrix and, thus, (conditionally) positive semidefinite. As a result and considering the last paragraph of Section 4.3.1, if (4.43) is evaluated on a finite grid of possible locations, say P ∈ N+ , then, at each t − 1 ∈ N+ complexity of the Gauss-Hermite Quadrature Rule outlined above NT −1 , the total computational   is of the order of O P M 2 + P R2 t2 + R3 t2 elementary operations / function evaluations. This will be the total, worst case computational complexity for solving (4.47), if the feasible set Ci is assumed to be finite, for all i ∈ N+ R . As noted above, a finite feasible set greatly simplifies implementation, since a trial-and-error approach may be employed for solving the respective optimization problem. If M is considered a fixed constant (e.g., M ≡ 103 ), and the same holds for Rt ≤ RNT , then, in each time slot, the total complexity of the Gauss-Hermite Quadrature Rule is of the order of O (P ) evaluations of (4.43), that is, linear in P . In that case, the whole numerical integration routine is considered a black box of fixed computational load, which, in each time slot, takes p as its input. Observe that, whenever M ≈ RNT , the worst case complexity of the brute force method, described in this subsection, over all NT time slots, is essentially the same as that of the Taylor approximation method, presented earlier in Section 4.3.1. 4.4 Theoretical Guarantees: Network QoS Increases Across Time Slots The proposed relay position selection approach presented in Section 4.3 enjoys a very important and useful feature, initially observed via numerical simulations: Although a 2-stage stochastic programming procedure is utilized independently at each time slot for determining optimal relay positioning and beamforming weights at the next time slot, the average network QoS (that is, the achieved 28 SINR) actually increases, as a function of time (the time slot). Then, it was somewhat surprising to discover that, additionally, this behavior of the achieved SINR can be predicted theoretically, in an indeed elegant manner and, as it will be clear below, under mild and reasonable assumptions on the structure of the spatially controlled beamforming problem under consideration. But first, it would be necessary to introduce the following definition. Definition 2. (L.MD.G Fields) On (Ω, F , P), an integrable stochastic field Ξ : Ω × RN × N → R is said to be a Linear Martingale Difference (MD) Generator, relative to a filtration {Ht ⊆ F }t∈N , and with scaling factor µ ∈ R, or, equivalently, L.MD.G♦ (Ht , µ), if and only if, for each t ∈ N+ , there exists a measurable set Ωt ⊆ Ω, with P (Ωt ) ≡ 1, such that, for every x ∈ RN , it is true that E { Ξ (x, t)| Ht−1 } (ω) ≡ µE { Ξ (x, t − 1)| Ht−1 } (ω) , (4.49) for all ω ∈ Ωt . Remark 5. A fine detail in the definition of a L.MD.G♦(Ht , µ) field is that, for each t ∈ N, the event Ωt does not depend on the choice of point x ∈ RN . Nevertheless, even if the event where (4.49) is satisfied is indeed dependent on the particular x ∈ RN , let us denote it as Ωx,t , we may leverage the fact that conditional expectations are unique almost everywhere, and arbitrarily define E { Ξ (x, t)| Ht−1 } (ω) , µE { Ξ (x, t − 1)| Ht−1 } (ω) , (4.50)  for all ω ∈ Ωcx,t , where P Ωcx,t ≡ 0. That is, we modify both, or either of the random elements E { Ξ (x, t − 1)| Ht−1 } and E { Ξ (x, t)| Ht−1 }, on the null set Ωcx,t , such that (4.49) is satisfied. Then, it may be easily verified that both such modifications result in valid versions of the conditional expectations of Ξ (x, t − 1) and Ξ (x, t) relative to Ht−1 , respectively and satisfy property (4.49), everywhere with respect to ω ∈ Ω. In Definition 2, invariance of Ωt with respect to x ∈ RN , in conjunction with the power of the substitution rule for conditional expectations (Section 8.2.1), will allow the development of strong conditional arguments, when x is replaced by a random element, measurable relative to Ht−1 .  Remark 6. There are lots of examples of L.MD.G stochastic fields, satisfying the technical properties of Definition 2. For completeness, let us present two such examples. Employing generic notation, consider an integrable real-valued stochastic field n Y (x, t), x ∈ RN , to∈ N. Let the natural filtration associated with Y (x, t) be {Yt }t∈N , with Yt , σ Y (x, t) , x ∈ RN , for all t ∈ N. Also, consider another, for simplicity temporal, integrable real-valued process W (t) , t ∈ N. Suppose, further, that Y (x, t) is a martingale with respect to t ∈ N (relative to {Yt }t∈N ), and that W (t) + is a zero mean process, independent of Y (x, t). In particular,   we assume  that,  for every t ∈ N , Y there exist events ΩYt ⊆ Ω and ΩW ≡ 1 and P ΩW ≡ 1, such that, for t ⊆ Ω, satisfying P Ωt t all x ∈ RN , E { Y (x, t)| Yt−1 } (ω) ≡ Y (ω, x, t − 1) and (4.51) E { W (t)| Yt−1 } (ω) ≡ 0, (4.52)  T W T W for all ω ∈ ΩYt Ωt , where, apparently, P ΩYt Ωt ≡ 1. Our first, probably most basic example of a L.MD.G field is simply the martingale Y (x, t) itself. Of course, in order to verify this statement, we need to show that it satisfies the technical 29 requirements of Definition 2, relative to a given filtration; in particular, let us choose {Yt }t∈N to be that filtration. Then, for every (x, t) ∈ RN × N+ , it is trivial to see that E { Y (x, t)| Yt−1 } (ω) ≡ Y (ω, x, t − 1) ≡ E { Y (x, t − 1)| Yt−1 } (ω) , (4.53) for all ω ∈ ΩYt , where Y (x, t − 1) is chosen as our version of E { Y (x, t − 1)| Yt−1 }, everywhere in Ω. As a result, the martingale Y (x, t) is itself a L.MD.G♦ (Yt , 1), as expected. The second, somewhat more interesting example of a L.MD.G field is defined as X (x, t) , %Y (x, t) + W (t) , (4.54) for all (x, t) ∈ RN × N, where, say, 0 < % ≤ 1. In order to verify the technical requirements of Definition 2, let us again choose {Yt }t∈N as our filtration. Then, for every (x, t) ∈ RN × N+ , there  Y,W exists a measurable set ΩY,W x,t ⊆ Ω, with P Ωx,t ≡ 1, such that, for all ω ∈ ΩY,W x,t , E { X (x, t)| Yt−1 } (ω) ≡ %Y (ω, x, t − 1) + E {W (t)} ≡ %Y (ω, x, t − 1) . (4.55) Therefore, we may choose our version for E { X (x, t)| Yt−1 } as E { X (x, t)| Yt−1 } (ω) ≡ %Y (ω, x, t − 1) , ∀ω ∈ Ω. (4.56) In exactly the same fashion, we may choose, for every (x, t) ∈ RN × N+ , E { X (x, t − 1)| Yt−1 } (ω) ≡ %Y (ω, x, t − 1) , ∀ω ∈ Ω. (4.57) Consequently, for every (x, t) ∈ RN × N+ , it will be true that E { X (x, t)| Yt−1 } (ω) ≡ %Y (ω, x, t − 1) ≡ E { X (x, t − 1)| Yt−1 } (ω) , for all ω ∈ Ω, showing that the field X (x, t) is also L.MD.G♦ (Yt , 1). (4.58)  Leveraging the notion of a L.MD.G field, the following result may be proven, characterizing the temporal (in discrete time) evolution of the objective of myopic stochastic o programs of the form n ↑ of (4.5). In order to introduce the result, let us consider the family Pt , with Pt↑ being + t∈NN the limit σ-algebra generated by all admissible policies at time slot t, defined as    [  Pt↑ , σ σ {p (t)} ⊆ C (Tt−1 ) , ∀t ∈ N+ NT ,   T (4.59) p(t)∈Dt with P1↑ being the trivial σ-algebra; recall that p (1) ∈ S R is assumed to be a constant. Also, for every t ∈ N+ NT , let us define the class n  o Dt ≡ p : Ω → S R p−1 (A) ∈ Pt↑ , for all A ∈ B S R . The result now follows. 30 (4.60) Theorem 6. (L.MD.G Objectives Increase over Time) Consider, for each t ∈ N2NT , the maximization version of the 2-stage stochastic program (4.5), for some choice of the second-stage optimal value V (p, t), p ∈ S R , t ∈ N2NT . Suppose that conditions C1-C6 are satisfied at all times and let p∗ (t) denote an optimal solution to (4.5), decided at t − 1 ∈ N+ NT −1 . Suppose, further, that, for every t ∈ N+ , NT n o • V (p, t) is L.MD.G♦ (Ht , µ), for a filtration Ht ⊇ Pt↑ and some µ ∈ R, and that + t∈NN T • V (·, ·, t) is both SP ♦CHt and SP ♦CHt−1 , with Dt ⊆ CHt ⊆ IHt (Remark 11 / Section 8.2.1). Then, for any admissible policy po (t − 1), it is true that µE {V (po (t − 1) , t − 1)} ≡ E {V (po (t − 1) , t)} and     µE V p∗ (t − 1) , t − 1 ≤ E V p∗ (t) , t , ∀t ∈ N2NT . (4.61) (4.62) In particular, if µ ≡ 1, the objective: • does not decrease by not updating the decision variable, and • is nondecreasing over time, under optimal decision making. Proof of Theorem 6. See Appendix C.  Of all possible choices for µ, the one where µ ≡ 1 is of special importance and practical relevance, as we will see in the next. In particular, in this case, and provided that the respective assumptions are fulfilled, Theorem 6 implies that optimal myopic exploration of the random field V (p, t) is monotonic, either under optimal decision making, or by retaining the same policy next. In the case where µ 6= 1, things can be quite interesting as well. For instance, suppose that one focuses on the maximization counterpart of the stochastic program (4.5). In this case, it is of interest to sequentially, myopically and feasibly sample the field V (p, t), such that it is maximized on average. Let us also refer to V (p, t) as the reward of the sampling process. Additionally, suppose that V (p, t) is a L.MD.G field, with parameter µ ≡ 0.9 < 1. Assuming that the respective assumptions are satisfied, Theorem 6 implies that, for any admissible sampling policy po (t − 1), E{V (po (t − 1) , t)}≡0.9E{V (po (t − 1) , t − 1)} and     E V p∗ (t) , t ≥0.9E V p∗ (t − 1) , t − 1 , (4.63) (4.64) for all t ∈ N2NT . In other words, either performing optimal decision making, or retaining the same policy next, will result in an at most 10% loss of performance. This means that the performance of optimal sampling at the next time step cannot be worse than 90% of that at the current time slot. Of course, this is important, because, in a sense, the risk of (non-)maintaining the average reward achieved up to the current time slot is meaningfully quantified. Remark 7. When the stochastic program under study is separable, that is, when the objective is of the form X V (p (t) , t) ≡ Vi (pi (t) , t) (4.65) + i∈NM (and the respective constraints of the problem decoupled), then, in order to reach the conclusions of Theorem 6 for V , it suffices for Theorem 6 to hold individually for each Vi , i ∈ N+ M . This is true, for instance, for the spatially controlled beamforming problem (4.15).  31 We may now return to the beamforming problem under consideration, namely (4.15). By Remark 7 and Theorem 6, it would suffice if we could show that the field VI (p, t) is a linear MD generator, relative to a properly chosen filtration. Unfortunately, though, this does not seem to be the case; the statistical structure of VI (p, t) does not match that of a linear MD generator exactly, relative to any reasonably chosen filtration. Nevertheless, under the channel model of Section 3, it is indeed possible to show that VI (p, t) is approximately L.MD.G♦ (C (Tt−1 ) , 1), a fact that explains, in an elegant manner, why our proposed spatially controlled beamforming framework is expected to work so well, both under optimal and suboptimal decision making. To show that VI (p, t) is approximately L.MD.G♦ (C (Tt−1 ) , 1), simply consider projecting VI (p, t − 1) onto C (Tt−2 ), via the conditional expectation E { VI (p, t − 1)| C (Tt−2 )}. Of course, and based on what we have seen so far, E { VI (p, t − 1)| C (Tt−2 )} can be written as a Lebesgue integral of VI (p, t − 1) expressed in terms of the vector field [F (p, t − 1) G (p, t − 1)]T , times its conditional density relative to C (Tt−2 ). It then easy to see that this conditional density will be, of course, Gaussian, and will be of exactly the same form as the conditional density of [F (p, t) G (p, t)]T relative to C (Tt−1 ), as presented in Lemma 2, but with t replaced by t − 1. Likewise, E { VI (p, t)| C (Tt−2 )} is of the same form as E { VI (p, t − 1)| C (Tt−2 )}, but with all terms       1 2 t−2 exp − , exp − , . . . , exp − (4.66) γ γ γ simply replaced by  2 exp − γ   3 , exp − γ for all t ∈ N3NT . Of course, if t ≡ 2, we have   t−1 , . . . , exp − γ  , E { VI (p, 2)| C (T0 )} ≡ E {VI (p, 2)} ≡ E {VI (p, 1)} ≡ E { VI (p, 1)| C (T0 )} . Now, for γ sufficiently large, we may approximately write     x x+1 ≈ exp − , exp − γ γ ∀x > 1, (4.67) (4.68) (4.69) and, therefore, due to continuity, it should be true that E { VI (p, t)| C (Tt−2 )} ≈ E { VI (p, t − 1)| C (Tt−2 )} , (4.70) for all t ∈ N2NT (and everywhere with respect to ω ∈ Ω). As a result, we have shown that, at least approximately, VI (p, t) is L.MD.G♦ (C (Tt−1 ) , 1). We may then invoke Theorem 6 in an approximate manner, leading to the following important result. Hereafter, for x ∈ R and y ∈ R, x . y will imply that x is approximately smaller or equal than y, in the sense that x ≤ y + ε, where ε > 0 is some small slack. Theorem 7. (QoS Increases over Time Slots) Consider the separable stochastic program (4.15). For γ sufficiently large, and for any admissible policy po (t − 1), it is true that E {VI (poi (t − 1) , t − 1)} ≈ E {VI (poi (t − 1) , t)} ,     E VI p∗i (t − 1) , t − 1 . E VI p∗i (t) , t , ∀i ∈ N+ R 32 (4.71) (4.72) E {V (po (t − 1) , t − 1)} ≈ E {V (po (t − 1) , t)}     E V p∗ (t − 1) , t − 1 . E V p∗ (t) , t , and (4.73) (4.74) for all t ∈ N2NT . In other words, approximately, the average network QoS: • does not decrease by not updating the positions of the relays and • is nondecreasing across time slots, under (per relay) optimal decision making. Theorem 7 is very important from a practical point of view, and has the following additional implications. Roughly speaking, under the conditions of Theorem 7, that is, if the temporal interactions of the channel are sufficiently strong, the average network QoS is not (approximately) expected to, at least abruptly, decrease if one or more relays stop moving at some point. Such event might indeed happen in an actual autonomous network, possibly due to power limitations, or a failure in the motion mechanisms of some network nodes. In the same framework, Theorem 7 implies that the relays which continue moving contribute (approximately) positively to increasing the average network QoS, across time slots. Such behavior of the proposed spatially controlled beamforming system may be also confirmed numerically, as discussed in Section 5. For the record, and as it will be also shown in Section 5, relatively small values for the correlation time γ, such as γ ≡ 5, are sufficient in order to practically observe the nice system behavior promised by Theorem 7. This fact makes the proposed spatially controlled beamforming system attractive in terms of practical feasibility, and shows that such an approach could actually enhance system performance in a well-behaved, real world situation. 5 Numerical Simulations & Experimental Validation In this section, we present synthetic numerical simulations, which essentially confirm that the proposed approach, previously presented in Section 4, actually works, and results in relay motion control policies, which yield improved beamforming performance. All synthetic experiments were conducted on an imaginary square terrain of dimensions 30 × 30 squared units of length, with W ≡ [0, 30]2 , uniformly divided into 30 × 30 ≡ 900 square regions. The locations of the source and destination are fixed as pS ≡ [15 0]T and pD ≡ [15 30]T . The beamforming temporal horizon is chosen as T ≡ 40 and the number of relays is fixed at R ≡ 8. The wavelength is chosen as λ ≡ 0.125, corresponding to a carrier frequency of 2.4 GHz. The various parameters of the assumed channel model are set as ` ≡ 3, ρ ≡ 20, σξ2 ≡ 20, η 2 ≡ 50, β ≡ 10, γ ≡ 5 and δ ≡ 1. The variances of 2 the reception noises at the relays and the destination are fixed as σ 2 ≡ σD ≡ 1. Lastly, both the transmission power of the source and the total transmission power budget of the relays are chosen as P ≡ Pc ≡ 25 (≈ 14dB) units of power. The relays are restricted to the rectangular region S ≡ [0, 30] × [12, 18]. Further, at each time instant, each of the relays is allowed to move inside a 9-region area, centered at each current position, thus defining its closed set of feasible directions Ci , for each relay i ∈ N+ R . Basic collision and out-of-bounds control was also considered and implemented. In order to assess the effectiveness of our proposed approach, we compare both heuristics (4.35) and (4.36) against the case where an agnostic, purely randomized relay control policy is adopted; in this case, at each time slot, each relay moves randomly to a new available position, without taking previously observed CSI into consideration. For simplicity, we do not consider the brute force method presented earlier in Section 4.3.2. For reference, we also consider the performance + of an oracle control policy at the relays, where, at each time slot t − 1 ∈ N+ NT −1 , relay i ∈ NR 33 10 8 6 5 10 15 20 25 30 35 40 5 10 15 20 25 30 35 40 12 10 8 6 Figure 5.1: Comparison of the proposed strategic relay planning schemes, versus an agnostic, randomized relay motion policy. updates its position by noncausally looking into the future and choosing the position pi , which maximizes directly the quantity VI (pi , t), over Ci (pi (t − 1)). Of course, the comparison of all controlled systems is made under exactly the same communication environment. Fig. 5.1 shows the expectation and standard deviation of the achieved QoS for all controlled systems, approximated by executing 4000 trials of the whole experiment. As seen in the figure, there is a clear advantage in exploiting strategically designed relay motion control. Whereas the agnostic system maintains an average SINR of about 4 dB at all times, the system based on the proposed 2nd order heuristic (4.36) is clearly superior, exhibiting an increasing trend in the achieved SINR, with a gap starting from about 0.5 dB at time slot t ≡ 2, up to 3 dB at time slots t ≡ 10, 11, . . . , 40. The 1st order heuristic (4.35) comes second, with always slightly lower average SINR, and which also exhibits a similar increasing trend as the 2nd order heuristic (4.36). Additionally, it seems to converge to the performance achieved by (4.36), across time slots. The existence of an increasing trend in the achieved average network QoS has already been predicted by Theorem 6 for a strictly optimal policy, and our experiments confirm this behavior for both heuristics (4.35) and (4.36), as well. This shows that both heuristics constitute excellent approximations to the original problem (4.17). Consequently, it is both theoretically and experimentally verified that, although the proposed stochastic programming formulation is essentially myopic, the resulting system performance is not, and this is dependent on the fact that the channel exhibits non trivial temporal statistical interactions. We should also comment on the standard deviation of all systems, which, from Fig. 5.1, seems somewhat high, relative to the range of the respective average SINR. This is exclusively due to the wild variations of the channel, which, in turn, are due to the effects of shadowing and multipath fading; it is not due to the adopted beamforming technique. This is reasonable, since, when the channel is not actually in deep fade at time t (an event which might happen with positive 34 R ≡ 8, # of Trials: 4000 7 R ≡ 8, # of Trials: 4000 Random Failures iff t ∈ [12, 15] Random Failures iff t ∈ [5, 6] 6.5 Expected SINR (dB) Expected SINR (dB) 6.5 Strategic: 0 failures Strategic: 1 failures Strategic: 3 failures Strategic: 5 failures Agnostic (0 failures) 6 5.5 6 Strategic: 0 failures Strategic: 1 failures Strategic: 3 failures Strategic: 5 failures Agnostic (0 failures) 5.5 5 5 4.5 4.5 0 2 4 6 8 10 12 14 16 18 20 0 2 6 8 10 12 Time Slot (t) (a) (b) R ≡ 8, # of Trials: 4000, with γ ≡ 15 7.5 14 16 18 20 18 20 R ≡ 8, # of Trials: 4000, γ ≡ 15 7 Random Failures iff t ∈ [12, 15] Random Failures iff t ∈ [5, 6] 7 6.5 Expected SINR (dB) Expected SINR (dB) 4 Time Slot (t) 6.5 Strategic: 0 failures Strategic: 1 failures Strategic: 3 failures Strategic: 5 failures Agnostic (0 failures) 6 5.5 5 6 5.5 Strategic: 0 failures Strategic: 1 failures Strategic: 3 failures Strategic: 5 failures Agnostic (0 failures) 5 4.5 4.5 4 4 0 2 4 6 8 10 12 14 16 18 20 0 2 4 6 8 10 12 Time Slot (t) Time Slot (t) (c) (d) 14 16 Figure 5.2: Performance of the proposed spatially controlled system, at the presence of motion failures. probability), the relays, at time t − 1, are predictively steered to locations, which, most probably, incur higher network QoS. As clearly shown in Fig. 5.1, for all systems under study, including that implementing the oracle policy, an increase in system performance also implies a proportional increase in the respective standard deviation. Next, we experimentally evaluate the performance of the system at the presence of random motion failures in the network. Hereafter, we work with the 2nd order heuristic (4.36), and set T ≡ 20. Random motion failures are modeled by choosing, at each trial, a random sample of a fixed number of relays and a random time when the failures occur, that is, at each time, the selected relays just stop moving; they continue to beamform staying still, at the position each of them visited last. Two cases are considered; in the first case, motion failures happen if and only if t ∈ [12, 15] (Figs. 5.2a and 5.2c), whereas, in the second case, t ∈ [5, 6] (Figs. 5.2b and 5.2d). In both cases, 35 zero, one, three and five relays (chosen at random, at each trial) stop moving. Two cases for γ are considered, γ ≡ 5 (Figs. 5.2a and 5.2b) and γ ≡ 15 (Figs. 5.2c and 5.2d). Again, the results presented in Fig. 5.2 pleasingly confirm our predictions implied by Theorem 6 (note, however, that Theorem 6 does not support randomized motion failures; on the other hand, our simulations are such in order to stress test the proposed system in more adverse motion failure cases). In particular, Fig. 5.2a clearly demonstrates that a larger number of motion failures induces a proportional, relatively (depending on γ) slight decrease in performance; this decrease, though, is smoothly evolving, and is not abrupt. This behavior is more pronounced in Fig. 5.2c, where the correlation time parameter γ has been increased to 15 (recall that, in Theorem 6, γ is assumed to be sufficiently large). We readily observe that, in this case, over the same horizon, the operation of the system is smoother, and decrease in performance, as well as its slope, are significantly smaller than those in Fig. 5.2a, for all cases of motion failures. Now, in Figs. 5.2b and 5.2d, when motion failures happen early, well before the network QoS converges to its maximal value, we observe that, although some relays might stop moving at some point, the achieved expected network QoS continues exhibiting its usual increasing trend. Of course, the performance of the system converges values strictly proportional to the number of failures in each of the cases considered. This means that the relays which continue moving contribute positively to increasing network QoS. This has been indeed predicted by Theorem 6, as well. 6 Conclusions We have considered the problem of enhancing QoS in time slotted relay beamforming networks with one source/destination, via stochastic relay motion control. Modeling the wireless channel as a spatiotemporal stochastic field, we proposed a novel 2-stage stochastic programming formulation for predictively specifying relay positions, such that the future expected network QoS is maximized, based on causal CSI and under a total relay power constraint. We have shown that this problem can be effectively approximated by a set of simple, two dimensional subproblems, which can be distributively solved, one at each relay. System optimality was tediously analyzed under a rigorous mathematical framework, and our analysis resulted in the development of an extended version of the Fundamental Lemma of Stochastic Control, which constitutes a result of independent interest, as well. We have additionally provided strong theoretical guarantees, characterizing the performance of the proposed system, and showing that the average QoS achieved improves over time. Our simulations confirmed the success of the proposed approach, which results in relay motion control policies yielding significant performance improvement, when compared to agnostic, randomized relay motion. 7 Acknowledgments Dionysios Kalogerias would like to kindly thank Dr. Nikolaos Chatzipanagiotis for very fruitful discussions in the very early stages of the development of this work, and Ioannis Manousakis and Ioannis Paraskevakos for their very useful comments and suggestions, especially concerning practical applicability, implementation of the proposed methods, as well as simulation issues. 36 8 Appendices 8.1 8.1.1 Appendix A: Proofs / Section 3 Proof of Lemma 1 In the following, we will rely on an incremental construction of Σ. Initially, consider the matrix  e e (1, 2) . . . Σ e (1, NT )  Σ (1, 1) Σ  Σ e (2, 1) e (2, 2) . . . Σ e (2, NT )  Σ  RN e , Σ (8.1)   ∈ S T, .. .. .. ..   . . . . e (NT , 1) Σ e (NT , 2) · · · Σ e (NT , NT ) Σ + R e where, for each combination (k, l) ∈ N+ NT × NNT , Σ (k, l) ∈ S , with  e (k, l) (i, j) , Σ e pi (k) , pj (l) Σ pi (k) − pj (l) , η exp − β 2 2 ! , (8.2) + e for all (i, j) ∈ N+ R × NR . By construction, Σ is positive semidefinite, because the well known 2 2 e exponential kernel Σ : R × R → R++ defined above is positive (semi)definite. Next, define the positive definite matrix   1 κ , with (8.3) K, κ 1   kpS − pD k2 κ , exp − <1 (8.4) δ e and consider the Tracy-Singh type of product of K and Σ  e (1, 1) e (1, 2) . . . K 4 Σ e (1, NT )  K4Σ K4Σ  K4Σ e (2, 1) e (2, 2) . . . K 4 Σ e (2, NT )  K4Σ  2RNT eK , K ◦ Σ e , Σ ,  ∈S . . . . . . . .   . . . . e (NT , 1) K 4 Σ e (NT , 2) · · · K 4 Σ e (NT , NT ) K4Σ (8.5) + where “4” denotes the operator of the Kronecker product. Then, for each (k, l) ∈ N+ NT × NNT , we have " # e (k, l) κΣ e (k, l) Σ 2R e (k, l) ≡ K4Σ (8.6) e (k, l) Σ e (k, l) ∈ S . κΣ e K is positive semidefinite, that is, in S2RNT . First, via a simple inductive It is easy to show that Σ + argument, it can be shown that, for compatible matrices A, B, C, D, (AB) ◦ (CD) ≡ (A ◦ C) (B ◦ D) . (8.7) e are symmetric, Also, for compatible A, B, it is true that (A ◦ B)T ≡ AT ◦ BT . Since K and Σ T T e ≡ U e Λ e U e . Given the identities consider their spectral decompositions K ≡ UK ΛK UK and Σ Σ Σ Σ stated above, we may write     eK ≡ K ◦ Σ e ≡ UK ΛK UTK ◦ U e Λ e UTe Σ Σ Σ Σ 37   UTK ◦ UTΣ e   T ≡ UK ◦ UΣ ΛK ◦ ΛΣ UK ◦ UΣ , (8.8) e e e       T T T where UK ◦ UΣ UK ◦ UTΣ ≡ U U ◦ U U e e e e ≡ I2 ◦IRNT ≡ I2RNT , and where the matrix K K Σ Σ ΛK ◦ΛΣ e is easily shown to be diagonal and with nonnegative elements. Thus, since (8.8) constitutes e K , it follows that Σ e K ∈ S2RNT . a valid spectral decomposition for Σ + As a last step, let E ∈ SNT , such that   |k − l| , (8.9) E (k, l) , exp − γ ≡ UK ◦ UΣ e  ΛK ◦ ΛΣ e + for all (k, l) ∈ N+ NT × NNT . Again, E is positive semidefinite, because the well known Laplacian kernel is positive (semi)definite. Consider the matrix e E , (E 4 12R×2R ) Σ e K ∈ S2RNT , Σ (8.10) where “ ” denotes the operator of the Schur-Hadamard product. Of course, since the matrix 12R×2R is rank-1 and positive semidefinite, E 4 12R×2R will be positive semidefinite as well. Consequently, e E will also be positive semidefinite. Finally, observe that by the Schur Product Theorem, Σ 2RN e E + σξ2 I2RN , Σ≡Σ T from where it follows that Σ ∈ S++ T , whenever σξ2 6= 0. Our claims follow. 8.1.2 (8.11)  Proof of Theorem 2 Obviously, the vector process X (t) is Gaussian with mean zero. This is straightforward to show. Therefore, what remains is, simply, to verify that the covariance structure of X (t) is the same as that of C (t), that is, we need to show that n o n o E X (s) X T (t) ≡ E C (s) C T (t) , (8.12) + for all (s, t) ∈ N+ NT × NNT . First, consider the case where s ≡ t. Then, we have n o n o E X (s) X T (t) ≡ E X (t) X T (t) n o   e C. = ϕ2 E X (t − 1) X T (t − 1) + 1 − ϕ2 Σ Observe, though, that, similarly to the scalar order-1 autoregressive model, the quantity n o e C ≡ E X (0) X T (0) Σ (8.13) (8.14) n o is a fixed point of the previously stated recursion for E X (t) X T (t) . Therefore, it is true that n o n o e C ≡ ΣC (0) ≡ E C (t) C T (t) , E X (t) X T (t) ≡ Σ 38 (8.15) which the desired result. Now, consider the case where s < t. Then, it may be easily shown that n o n o n o E X (s) X T (t) ≡ ϕ2 E X (s − 1) X T (t − 1) + ϕE W (s) X T (t − 1) . (8.16) Let us consider the second term on the RHS of (8.16). Expanding the recursion, we may write n o n  o ϕE W (s) X T (t − 1) ≡ ϕE W (s) ϕX T (t − 2) + W T (t − 1) n o ≡ ϕ2 E W (s) X T (t − 2) .. . n o ≡ ϕt−s E W (s) W T (s)   e C. ≡ ϕt−s 1 − ϕ2 Σ (8.17) We observe that this term depends only on the lag t − s. Thus, it is true that n o n o   eC E X (s) X T (t) ≡ ϕ2 E X (s − 1) X T (t − 1) + ϕt−s 1 − ϕ2 Σ n o     e C 1 + ϕ2 = ϕ2·2 E X (s − 2) X T (t − 2) + ϕt−s 1 − ϕ2 Σ .. . n o   X  2 s−1 T t−s 2 e ≡ ϕ E X (0) X (t − s) + ϕ 1 − ϕ ΣC ϕ 2s i∈Ns−1 n o   e C. = ϕ2s E X (0) X T (t − s) + ϕt−s 1 − ϕ2s Σ n o Further, we may expand E X (0) X T (t − s) in similar fashion as above, to get that n o e C. E X (0) X T (t − s) ≡ ϕt−s Σ (8.18) (8.19) Exactly the same arguments may be made for the symmetric case where t < s. Therefore, it follows that n o eC E X (s) X T (t) ≡ ϕ|t−s| Σ   |t − s| e ≡ exp − ΣC γ ≡ ΣC (t − s) (8.20) + for all (s, t) ∈ N+ NT × NNT , and we are done. 8.2  Appendix B: Measurability & The Fundamental Lemma of Stochastic Control In the following, aligned with the purposes of this paper, a detailed discussion is presented, which is related to important technical issues, arising towards the analysis and simplification of variational problems of the form of (4.5). 39 At this point, it would be necessary to introduce some important concepts. Let us first introduce the useful class of Carathéodory functions [26, 44]2 . Definition 3. (Carathéodory Function [26, 44]) On (Ω, F ), the mapping H : Ω × RN → R is called Carathéodory, if and only if H (·, x) is F -measurable for all x ∈ RN and H (ω, ·) is continuous for all ω ∈ Ω. Remark 8. As the reader might have already observed, Carathéodory functions and random fields with (everywhere) continuous sample paths are essentially the same thing. Nevertheless, the term “Carathéodory function” is extensively used in our references [25, 26, 44]. This is the main reason why we still define and use the term.  In the analysis that follows, we will exploit the notion of measurability for closed-valued multifunctions. Definition 4. (Measurable Multifunctions [25,26]) On the measurable space (Ω, F ), a closedvalued multifunction X : Ω ⇒ RN is F -measurable if and only if, for all closed A ⊆ RN , the preimage n o \ X −1 (A) , ω ∈ Ω X (ω) A = 6 ∅ (8.21) is in F . If F constitutes a Borel σ-algebra, generated by a topology on Ω, then an F -measurable X will be equivalently called Borel measurable. We will also make use of the concept of a closed multifunction (Remark 28 in [26], p. 365), whose definition is also presented below, restricted to the case of Euclidean spaces, of interest in this work. Definition 5. (Closed Multifunction [26]) A closed-valued multifunction X : RM ⇒ RN (a function from RM to closed sets in RN ) is closed if and only if, for all sequences {xk }k∈N and {y k }k∈N , such that xk −→ x, y k −→ y and xk ∈ X (y k ), for all k ∈ N, it is true that x ∈ X (y). k→∞ 8.2.1 k→∞ Random Functions & The Substitution Rule for Conditional Expectations Given a random function g (ω, x), a sub σ-algebra Y , another Y -measurable random element X, and as long as E { g (·, x)| Y } exists for all x in the range of X, we would also need to make extensive use of the substitution rule E { g (·, X)| Y } (ω) ≡ E { g (·, X (ω))| Y } (ω) ≡ E { g (·, x)| Y } (ω)|x≡X(ω) , P − a.e., (8.22) which would allow us to evaluate conditional expectations, by essentially fixing the quantities that are constant relative to the information we are conditioning on, carry out the evaluation, and then let those quantities vary in ω again. Although the substitution rule is a concept readily taken for granted when conditional expectations of Borel measurable functions of random elements (say, from products of Euclidean spaces to R) are considered, it does not hold, in general, for arbitrary random functions. As far as our general formulation is concerned, it is necessary to consider random 2 Instead of working with the class of Carathéodory functions, we could also consider the more general class of random lower semicontinuous functions [26], which includes the former. However, this might lead to overgeneralization and, thus, we prefer not to do so; the class of Carathéodory functions will be perfectly sufficient for our purposes. 40 functions, whose domain is a product of a well behaved space (such as RN ) and the sample space, Ω, whose structure is assumed to be and should be arbitrary, at least in regard to the applications of interest in this work. One common way to ascertain the validity of the substitution rule is by exploiting the representation of conditional expectations via integrals with respect to the relevant regular conditional distributions, whenever the latter exist. But because of the arbitrary structure of the base space (Ω, F , P), regular conditional distributions defined on points in the sample space Ω cannot be guaranteed to exist and, therefore, the substitution rule may fail to hold. However, as we will see, the substitution rule will be very important for establishing the Fundamental Lemma. Therefore, we may choose to impose it as a property on the structures of g and/or X instead, as well as establish sufficient conditions for this property to hold. The relevant definition follows. Definition 6. (Substitution Property (SP )) On (Ω, F , P), consider a random element Y : Ω → RM , the associated sub σ-algebra Y , σ {Y } ⊆ F , and a random function g : Ω × RN → R, such that E {g (·, x)} exists for all x ∈ RN . Let CY be any functional class, such that3  ) ( −1 (A) ∈ Y , for all A ∈ B RN N X CY ⊆ IY , X : Ω → R . (8.23) E {g (·, X)} exists We say that g possesses the Substitution Property within CY , or, equivalently, that g is SP ♦CY , if and only if there exists a jointly Borel measurable function h : RM × RN → R, with h (Y (ω) , x) ≡ E { g (·, x)| Y } (ω), everywhere in (ω, x) ∈ Ω × RN , such that, for any X ∈ CY , it is true that E { g (·, X)| Y } (ω) ≡ h (Y (ω) , X (ω)) , (8.24) almost everywhere in ω ∈ Ω with respect to P. Remark 9. Observe that, in Definition 6, h is required to be the same for all X ∈ CY . That is, h should be determined only by the structure of g, relative to Y , regardless of the specific X within CY , considered each time. On the other hand, it is also important to note that the set of unity measure, where (8.24) is valid, might indeed be dependent on the particular X.  Remark 10. Another detail of Definition 6 is that, because E {g (·, x)} is assumed to exist for all x ∈ RN , E { g (·, x)| Y } also exists and, as an extended Y -measurable random variable, for every x ∈ RN , there exists a Borel measurable function hx : RM → R, such that hx (Y (ω)) ≡ E { g (·, x)| Y } (ω) , ∀ω ∈ Ω. (8.25) One may then readily define a function h : RM ×RN → R, such that h (Y (ω), x)≡E { g (·, x)| Y } (ω), uniformly for all points, ω, of the sample space, Ω. This is an extremely important fact, in regard to the analysis that follows. Observe, however, that, in general, h will be Borel measurable only in its first argument; h is not guaranteed to be measurable in x ∈ RN , for each Y ∈ RM , let alone jointly measurable in both its arguments.  Remark 11. (Generalized SP ) Definition 6 may be reformulated in a more general setting. In particular, Y may be assumed to be any arbitrary sub σ-algebra of F , but with the subtle difference that, in such case, one would instead directly demand that the random function h : Ω×RN → R, with 3 Hereafter, statements of type “E {g (·, X)} exists” will implicitly imply that g (·, X) is an F -measurable function. 41   h (ω, x) ≡ E { g (·, x)| Y } (ω), everywhere in (ω, x) ∈ Ω × RN , is jointly Y ⊗ B RN -measurable and such that, for any X ∈ CY (with CY defined accordingly), it is true that E { g (·, X)| Y } (ω) ≡ h (ω, X (ω)) , P − a.e.. (8.26) Although such a generalized definition of the substitution property is certainly less enlightening, it is still useful. Specifically, this version of SP is explicitly used in the statement and proof of Theorem 6, presented in Section 4.4.  Keeping (Ω, F , P) of arbitrary structure, we will be interested in the set of g’s which are SP ♦IY . The next result provides a large class of such random functions, which is sufficient for our purposes. Theorem 8. (Sufficient Conditions for the SP ♦IY ) On (Ω, F , P), consider a random element Y : Ω → RM , the associated sub σ-algebra Y , σ {Y } ⊆ F , and a random function g : Ω×RN → R. Suppose that: • g is dominated by a P-integrable function; that is, ∃ψ ∈ L1 (Ω, F , P; R) , such that sup |g (ω, x)| ≤ ψ (ω) , N x∈R ∀ω ∈ Ω, (8.27) • g is Carathéodory on Ω × RN , and that • the extended real valued function E { g (·, x)| Y } is Carathéodory on Ω × RN . Then, g is SP ♦IY . Proof of Theorem 8. Under the setting of the theorem, consider any Y -measurable random element X : Ω → RN , for which E {g (·, X)} exists. Then, E { g (·, X)| Y } exists. Also, by domination of g by ψ, for all x ∈ RN , E { g (·, x)| Y } exists and constitutes a P-integrable, Y -measurable random variable. By Remark 10, we know that E { g (·, x)| Y } (ω) ≡ h (Y (ω) , x) , ∀ (ω, x) ∈ Ω × RN , (8.28) where h : RM ×RN → R is Borel measurable in its first argument. However, since E { g (·, x)| Y } (ω) N M N ≡ h (Y (ω) , x) is Carathéodory    on Ω × R , h is Carathéodory on R × R , as well. Thus, h will be jointly B RM ⊗ B RN -measurable (Lemma 4.51 in [44], along with the fact that R is metrizable). We claim that, actually, h is such that E { g (·, X)| Y } ≡ h (Y, X) , P − a.e.. (8.29) Employing a common technique, the result will be proven in steps, starting from indicators and building up to arbitrary measurable functions, as far as X is concerned. Before embarking with the core of the proof, note that, for any x1 and x2 in RN and any A ∈ F , the sum g (·, x1 ) 1A + g (·, x2 ) 1Ac is always well defined, and E {g (·, x1 ) 1A } and E {g (·, x2 ) 1Ac } both exist and are finite by domination. This implies that E {g (·, x1 ) 1A } + E {g (·, x2 ) 1Ac } is always well-defined, which in turn implies the validity of the additivity properties (Theorem 1.6.3 and Theorem 5.5.2 in [45]) E {g (·, x1 ) 1A + g (·, x2 ) 1Ac } ≡ E {g (·, x1 ) 1A } + E {g (·, x2 ) 1Ac } ∈ R, 42 and (8.30) E { g (·, x1 ) 1A + g (·, x2 ) 1Ac | Y } ≡ E { g (·, x1 ) 1A | Y } + E { g (·, x2 ) 1Ac | Y } , P − a.e.. (8.31) Hence, under our setting, any such manipulation is technically justified. e 1A (ω), for some x e ∈ RN and some A ∈ Y . Then, by ([45], Suppose first that X (ω) ≡ x Theorem 5.5.11 & Comment 5.5.12), it is true that e ) 1A + g (·, 0) 1Ac | Y } E { g (·, X)| Y } ≡ E { g (·, x e ) 1A | Y } + E { g (·, 0) 1Ac | Y } ≡ E { g (·, x e )| Y } + 1Ac E { g (·, 0)| Y } ≡ 1A E { g (·, x e ) + 1Ac h (Y, 0) ≡ 1A h (Y, x e 1A ) ≡ h (Y, x ≡ h (Y, X) , P − a.e., (8.32) e i 1Ai (ω) , x (8.33) proving the claim for indicators. Consider now simple functions of the form X (ω) ≡ X + i∈NI T S e i ∈ RN , Ai ∈ Y , for all i ∈ N+ where x Aj ≡ ∅, for i 6= j and i∈N+ Ai ≡ Ω. Then, we I , with Ai I again have     X  e i ) 1Ai Y E { g (·, X)| Y } ≡ E g (·, x    +  i∈NI X  e i ) 1Ai Y ≡ E g (·, x + i∈NI ≡ ≡ X + i∈NI X + i∈NI  e i )| Y } 1Ai E { g (·, x ei) 1Ai h (Y, x   X  e i 1Ai  ≡ h Y, x + i∈NI ≡ h (Y, X) , P − a.e., (8.34) and the proved is claimed for simple functions. To show that our claims are true for any arbitrary random function g, we take advantage of the continuity of both h and gnin x. First, o we know that h is Carathéodory, which means that, for N every ω ∈ Ω, if any sequence xn ∈ R is such that xn −→ x (for arbitrary x ∈ RN ), it is true that n→∞ n∈N h (Y (ω) , xn ) ≡ E { g (·, xn )| Y } (ω) −→ E { g (·, x)| Y } (ω) ≡ h (Y (ω) , x) . n→∞ 43 (8.35) Second, weoknow that g is Carathéodory as well, also implying that, for every ω ∈ Ω, if any sequence n is such that xn −→ x, it is true that xn ∈ RN n→∞ n∈N n o Next, let Xn : Ω → RN g (ω, xn ) −→ g (ω, x) . (8.36) n→∞ n∈N be a sequence of simple Borel functions, such that, for all ω ∈ Ω, Xn (ω) −→ X (ω) . (8.37) n→∞ Note that such a sequence always exists (see 1.5.5 (b) in [45]). Consequently, for each  Theorem  N ω ∈ Ω, we may write (note that g is F ⊗ B R -measurable; see ([44], Lemma 4.51)) g (ω, Xn (ω)) −→ g (ω, X (ω)) , (8.38) n→∞ that is, the sequence {g (·, Xn )}n∈N converges to g (·, X), everywhere in Ω. Now, let us try to apply the Dominated Convergence Theorem for conditional expectations (Theorem 5.5.5 in [45]) to the aforementioned sequence of functions. Of course, we have to show that all members of the sequence {g (·, Xn )}n∈N are dominated by another integrable function, uniformly in n ∈ N. By assumption, there exists an integrable function ψ : Ω → R, such that ∀ (ω, x) ∈ Ω × RN . |g (ω, x)| ≤ ψ (ω) , (8.39) In particular, it must also be true that |g (ω, Xn (ω))| ≤ ψ (ω) , ∀ (ω, n) ∈ Ω × N, (8.40) verifying the domination requirement. Thus, Dominated Convergence implies the existence of an  event ΩΠ1 ⊆ Ω, with P ΩΠ1 ≡ 1, such that, for all ω ∈ ΩΠ1 , E { g (·, Xn )| Y } (ω) −→ E { g (·, X)| Y } (ω) . n→∞ Also, for every ω ∈ Ω T (8.41) ΩΠ1 ≡ ΩΠ1 , (8.35) yields h (Y (ω) , Xn (ω)) −→ h (Y (ω) , X (ω)) . (8.42) n→∞ However, by what we have shown above, because the sequence {Xn }n∈N consists of simple functions, then, for every n ∈ N, there exists ΩΠn ⊆ Ω, with P (ΩΠn ) ≡ 1, such that, for all ω ∈ ΩΠn , E { g (·, Xn )| Y } (ω) ≡ h (Y (ω) , Xn (ω)) . (8.43)  Since N is countable, there exists a “global” event ΩΠ2 ⊆ Ω, with P ΩΠ2 ≡ 1, such that, for all ω ∈ ΩΠ2 , E { g (·, Xn )| Y } (ω) ≡ h (Y (ω) , Xn (ω)) , ∀n ∈ N. (8.44)  T Now define the event ΩΠ3 , ΩΠ1 ΩΠ2 . Of course, P ΩΠ3 ≡ 1. Then, for every ω ∈ ΩΠ3 , (8.41), (8.42) and (8.44) all hold simultaneously. Therefore, for every ω ∈ ΩΠ3 , it is true that (say) h (Y (ω) , Xn (ω)) −→ E { g (·, X)| Y } (ω) n→∞ 44 and (8.45) h (Y (ω) , Xn (ω)) −→ h (Y (ω) , X (ω)) , (8.46) n→∞ which immediately yields E { g (·, X)| Y } (ω) ≡ h (Y (ω) , X (ω)) , P − a.e., (8.47) showing that g is SP ♦IY .  Remark 12. We would like to note that the assumptions of Theorem 8 can be significantly weakened, guaranteeing the validity of the substitution rule for vastly discontinuous random functions, including, for instance, cases with random discontinuities, or random jumps. This extended analysis, though, is out of the scope of the paper and will be presented elsewhere.  8.2.2 A Base Form of the Lemma We will first state a base, very versatile version of the Fundamental Lemma, treating a general class of problems, which includes the particular stochastic problem of interest, (4.5), as a subcase. Lemma 3. (Fundamental Lemma / Base Version) On (Ω, F , P), consider a random element Y : Ω → RM , the sub σ-algebra Y , σ {Y } ⊆ F , a random function g : Ω × RN → R, such that E {g (·, x)} exists for all x ∈ RN , a Borel measurable closed-valued multifunction X : RN ⇒ RN , with dom (X ) ≡ RN , as well as another Y -measurable random element ZY : Ω → RN , with ZY (ω) ≡ Z (Y (ω)), for all ω ∈ Ω, for some Borel Z : RM → RN . Consider also the decision set ) ( X (ω) ∈ X (ZY (ω)) , a.e. in ω ∈ Ω  Y N FX (ZY ) , X : Ω → R , (8.48) X −1 (A) ∈ Y , for all A ∈ B RN containing all Y -measurable selections of X (ZY ). Then, FXY (ZY ) is nonempty. Suppose that: • E {g (·, X)} exists for all X ∈ FXY (ZY ) , with inf X∈F Y X (ZY ) E {g (·, X)} < +∞, and that • g is SP ♦FXY (ZY ) . Then, if Y denotes the completion of Y relative to the restriction P|Y , then the optimal value function inf x∈X (ZY ) E { g (·, x)| Y } , ϑ is Y -measurable and it is true that inf Y X∈FX (Z ) Y E {g (·, X)} ≡ E  inf x∈X (ZY ) E { g (·, x)| Y }  ≡ E {ϑ} . (8.49) In other words, variational minimization over FXY (ZY ) is exchangeable by pointwise (over constants) minimization over the random multifunction X (ZY ), relative to Y . Remark 13. Note that, in the statement of Lemma 3, assuming that the infimum of E {g (·, X)} over FXY (ZY ) is less than +∞ is equivalent to assuming the existence of an X in FXY (ZY ) , such that E {g (·, X)} is less than +∞.  Before embarking with the proof of Lemma 3, it would be necessary to state an old, fundamental selection theorem, due to Mackey [46]. 45 Theorem 9. (Borel Measurable Selections [46]) Let (S1 , B (S1 )) and (S2 , B (S2 )) be Borel spaces and let (S2 , B (S2 )) be standard. Let µ : B (S1 ) → [0, ∞] be a standard measure on (S1 , B (S1 )).  Suppose that A ∈ B (S1 ) ⊗ B (S2 ), such that, for each y ∈ S1 , there exists xy ∈ S2 , so that y, xy ∈ A. Then, there exists a Borel subset O ∈ B (S1 ) with µ (O) ≡ 0, as well as a Borel measurable function φ : S1 → S2 , such that (y, φ (y)) ∈ A, for all y ∈ S1 \ O. Remark 14. Theorem 9 refers to the concepts of a Borel space, a standard Borel space and a standard measure. These are employed as structural assumptions, in order for the conclusions of the theorem to hold true. In this paper, except for the base probability space (Ω, F , P), whose structure may be arbitrary, all other spaces and measures considered will satisfy those assumptions by default. We thus choose not to present the respective definitions; instead, the interested reader is referred to the original article, [46].  We are now ready to prove Lemma 3, as follows. Proof of Lemma 3. As usual with such results, the proof will rely on showing a double sided inequality [23–25, 27, 28, 47]. There is one major difficulty, though, in the optimization setting considered, because all infima may be potentially unattainable, within the respective decision sets. However, it is immediately evident that, because g is assumed to be SP ♦FXY (ZY ) , and via a simple application of the tower property, it will suffice to show that   inf E {h (Y, X)} ≡ E inf h (Y, x) . (8.50) Y x∈X (ZY ) X∈FX (Z ) Y This is because it is true that, for any Y -measurable selection of X (ZY ), say X : Ω → RN , for which E {g (·, X)} exists, E { g (·, X)| Y } (ω) ≡ h (Y (ω) , x)|x=X(ω) , ∀ω ∈ ΩΠX ,  where the event ΩΠX ∈ F is such that P ΩΠX ≡ 1 and h is jointly Borel, satisfying E { g (·, x)| Y } ≡ h (Y (ω) , x) , (8.51) (8.52) everywhere in (ω, x) ∈ Ω × RN . For the sake of clarity in the exposition, we will break the proof into a number of discrete subsections, providing a tractable roadmap to the final result. Step 1. FXY (ZY ) is nonempty. It suffices to show that there exists at least one Y -measurable selection of X (ZY ), that is, a Y -measurable random variable, say X : Ω → RN , such that X (ω) ∈ X (ZY (ω)), for all ω in the domain of X (ZY ). We first show that the composite multifunction X (ZY (·)) : Ω ⇒ RN is Y -measurable. Recall from Definition 4 that it suffices to show that n o \ X ZY−1 (A) , ω ∈ Ω X (ZY (ω)) A = 6 ∅ ∈Y, (8.53) for every closed A ⊆ RN  . Since the closed-valued multifunction X is Borel measurable, it is true −1 N that X (A) ∈ B R , for all closed A ⊆ RN . We also know that ZY is Y -measurable, or that 46     ZY−1 (B) ∈ Y , for all B ∈ B RN . Setting B ≡ X −1 (A) ∈ B RN , for any arbitrary closed A ⊆ RN , it is true that   n o Y 3 ZY−1 X −1 (A) ≡ ω ∈ Ω ZY (ω) ∈ X −1 (A) n o \ ≡ ω ∈ Ω X (ZY (ω)) A = 6 ∅ ≡ X ZY−1 (A) , (8.54) and, thus, the composition X (ZY (·)) is Y -measurable, or, in other words, measurable on the measurable (sub)space (Ω, Y ). Now, since the closed-valued multifunction X (ZY ) is measurable on (Ω, Y ), it admits a Castaing Representation (Theorem 14.5 in [25] & Theorem 7.34 in [26]). Therefore, there exists at least one Y -measurable selection of X (ZY ), which means that FXY (ZY ) contains at least one element. F Step 2. ϑ is Y -measurable. To show the validity of this statement, we first demonstrate that, for any chosen h : RM × RN → R, as in Definition 6, the function ξ : RM → R, defined as ξ (y) , inf x∈X (Z(y)) h (y, x) , ∀y ∈ RM , (8.55)     is measurable relative to B RM , the completion of B RM relative to the pushforward PY . This follows easily from the following  facts.  First,  the  graph of the measurable multifunction X (Z (·)) M N is itself measurable and in B R ⊗B R (Theorem 14.8 in [25]), and, therefore, analytic (Appendix A.2 in [27]). Second, h is jointly Borel measurable and, therefore, a lower semianalytic function (Appendix A.2 in [27]). As a result, ([28], Proposition 7.47) implies that ξ is also lower semianalytic, and, consequently, universally measurable (Appendix A.2 in [27]). Being universally   M measurable, ξ is also measurable relative to B R , thus proving our claim. We also rely on the   definitions of both Y and B RM , stated as (Theorem 1.9 in [48]) [ B ∈ Y ⇐⇒ B ≡ C D C ∈ Y and D ⊆ O ∈ Y , with P|Y (O) ≡ 0 and (8.56)       [ B ∈ B RM ⇐⇒ B ≡ C D C ∈ B RM and D ⊆ O ∈ B RM , with PY (O) ≡ 0. (8.57) Now, specifically, to show that ϑ is measurable relative to Y , it suffices to show that, for every  Borel A ∈ B R , ϑ−1 (A) , { ω ∈ Ω| ϑ (ω) ∈ A} ∈ Y . (8.58) Recall, that,  by definition of ξ, it is true that ξ (Y (ω)) ≡ ϑ (ω), for all ω ∈ Ω. Then, for every A ∈ B R , we may write ϑ−1 (A) ≡ ξY −1 (A) ≡ { ω ∈ Ω| ξ (Y (ω)) ∈ A} n o ≡ ω ∈ Ω| Y (ω) ∈ ξ −1 (A) 47   , Y −1 ξ −1 (A) . (8.59)   S But ξ −1 (A) ∈ B RM , which, by (8.57), equivalently means that ξ −1 (A) ≡ GA HA , for some     GA ∈ B RM and some HA ⊆ EA ∈ B RM , with PY (EA ) ≡ 0. Thus, we may further express any A-preimage of ϑ as  [  ϑ−1 (A) ≡ Y −1 GA HA [ ≡ Y −1 (GA ) Y −1 (HA ) . (8.60) Now, because GA is Borel and Y is a random element, it is true that Y −1 (GA ) ∈ Y . On the other hand, HA ⊆ EA , which implies that Y −1 (HA ) ⊆ Y −1 (EA ), where   P|Y Y −1 (EA ) ≡ PY (EA ) ≡ 0. (8.61)  Therefore, we have shown that, for every A ∈ B R , ϑ−1 (A) may always be written as a union of an element in Y and some subset of a P|Y -null set, also in Y . Enough said. F Step 3. For every X ∈ FXY (ZY ) , it is true that h (Y, X) ≥ inf x∈X (ZY ) h (Y, x) ≡ ϑ. For each ω ∈ Ω (which also determines Y ), we may write ϑ (ω) ≡ ≡ inf x∈X (Z(Y (ω))) h (Y (ω) , x) inf M(Y (ω))∈X (ZY (ω)) h (Y (ω) , M (Y (ω))) , (8.62) where M : RM → RN is of arbitrary nature. Therefore, ϑ may be equivalently regarded as the result of infimizing h over the set of all, measurable or not, functionals of Y , which are also selections of X (ZY ). This set, of course, includes FXY (ZY ) . Now, choose an X ≡ MX (Y ) ∈ FXY (ZY ) , as above, for some Borel measurable MX : RM → RN . Then, it must be true that ϑ (ω) ≤ h (Y (ω) , MX (Y (ω))) ≡ h (Y (ω) , X (ω)) , everywhere in ω ∈ Ω. (8.63) F Step 4. It is also true that inf Y X∈FX (Z ) Y E {h (Y, X)} ≥ E  inf x∈X (ZY )  h (Y, x) . (8.64) From Step 3, we know that, for every X ∈ FXY (ZY ) , we have h (Y, X) ≥ ϑ. (8.65) At this point, we exploit measurability of ϑ, proved in Step 2. Since, by assumption, inf Y X∈FX (Z ) Y E {h (Y, X)} ≡ inf Y X∈FX (Z ) Y 48 E {g (·, X)} < +∞, (8.66) it follows that there exists XF ∈ FXY (ZY ) , such that E {h (Y, XF )} < +∞ (recall that the integral E {g (·, XF )} exists anyway, also by assumption). Since (8.65) holds for every X ∈ FXY (ZY ) , it also holds for XF ∈ FXY (ZY ) and, consequently, the integral of ϑ exists, with E {ϑ} < +∞. Then, we may take expectations on both sides of (8.65) (Theorem 1.5.9 (b) in [45]), yielding E {h (Y, X)} ≥ E {ϑ} , ∀X ∈ FXY (ZY ) . (8.67) Infimizing additionally both sides over X ∈ FXY (ZY ) , we obtain the desired inequality. We may also observe that, if inf X∈F Y E {h (Y, X)} ≡ −∞, then X (ZY inf Y X∈FX (Z ) Y ) E {h (Y, X)} ≡ E {ϑ} ≡ −∞, (8.68) and the conclusion of Lemma 3 holds immediately. Therefore, in the following, we may assume that inf X∈F Y E {h (Y, X)} > −∞. F X (ZY ) Step 5. For every ε > 0, n ∈ N and every y ∈ RM , there exists x ≡ xy ∈ X (Z (y)), such that  h y, xy ≤ max {ξ (y) , −n} + ε. (8.69) This simple fact may be shown by contradiction; replacing the universal with existential quantifiers and vice versa in the above statement, suppose that there exists ε > 0 , n ∈ N, and y ∈ RM such that, for all x ∈ X (Z (y)), h (y, x) > max {ξ (y) , −n} + ε. There are two cases: 1) ξ (y) > −∞. In this case, max {ξ (y) , −n} ≥ ξ (y), which would imply that, for all x ∈ X (Z (y)), h (y, x) > ξ (y) + ε, (8.70) contradicting the fact that ξ (y) is the infimum (the greatest lower bound) of h (y, x) over X (Z (y)), since ε > 0. 2) ξ (y) ≡ −∞. Here, max {ξ (y) , −n} ≡ −n, and, for all x ∈ XZ (y), we would write h (y, x) > −n + ε ∈ R, (8.71) which, again, contradicts the fact that −∞ ≡ ξ (y) is the infimum of h (y, x) over X (Z (y)). Therefore, in both cases, we are led to a contradiction, implying that the statement preceding and including (8.69) is true. The idea of using the maximum operator, so that ξ (y) may be allowed to take the value −∞, is credited to and borrowed from ([25], proof of Theorem 14.60). F M Step 6. There exists a Borel measurable function ξe : R → R, such that  where Rξ ∈ B RM  ξe(y) ≡ ξ (y) , is such that PY ∀y ∈ Rξ ⊇ Rξ , (8.72)     Rξ ≡ 1, and Rξ ∈ B RM is such that P Y Rξ ≡ 1, where P Y denotes the completion of the pushforward PY .   From ([48], Proposition 2.12), we know that, since ξ is B RM -measurable, there exists a   B RM -measurable function ξe : RM → R, such that ξe(y) ≡ ξ (y) , 49 ∀y ∈ Rξ , (8.73)    where Rξ is an event in B RM , such that P Y Rξ ≡ 1. However, from Step 2 (see (8.57)),     S E E M and P Y Rξ ≡ 0. Then, it may be easily we know that Rξ ≡ Rξ Rξ , where Rξ ∈ B R     shown that P Y Rξ ≡ P Y Rξ ≡ 1 and, since P Y and PY agree on the elements of B RM ,  PY Rξ ≡ 1, as well. F Step 7. There exists a (P, ε, n)-optimal selector Xnε ∈ FXY (ZY ) : For every ε > 0 and for every n ∈ N, there exists Xnε ∈ FXY (ZY ) , such that   ε h (Y, Xn ) ≤ max inf h (Y, x) , −n + ε, P − a.e.. (8.74) x∈X (ZY ) This is the most crucial property of the problem that needs to be established, in order to reach to the final conclusions of Lemma 3. In this step, we make use of Theorem 9. Because Theorem 9 works on Borel spaces, in the following, it will be necessary to work directly on the state space of the random element Y , equipped with its Borel σ-algebra, and the pushforward PY . In the following, we will also make use of the results proved in Step 5 and Step 6. Recall the definition of   ξ in the statement of Lemma 3. We may readily show that the multifuncM tion X (Z (·)) is B R -measurable. This may be shown in exactly the same way as in Step 1, exploiting the hypotheses that the multifunction X and the function Z are both Borel measurable. Borel measurability of X (Z (·)) will be exploited shortly. Compare the result of Step 5 with what we would like to prove here; the statement preceding and including (8.69) is not enough for our purposes; what we would actually like is to be able to generate a selector, that is, a function of y such that (8.69) would hold at least almost everywhere with respect to PY . This is why we need Theorem 9. The idea of using Theorem 9 into this context is credited to and borrowed from [49].   From Step 2 and Step 6, we know that ξ is B RM -measurable and that there exists a Borel measurable function ξe : RM → R, such that ξe(y) ≡ ξ (y) , everywhere in y ∈ Rξ , where     Rξ ∈ B RM is such that PY Rξ ≡ P Y Rξ ≡ 1. Then, it follows that ξe(y) ≡ inf x∈X (Z(y)) h (y, x) , (8.75) for all y ∈ Rξ . Define, for brevity, XZ (y) , X (Z (y)), for all y ∈ RM . Towards the application of Theorem 9, fix any ε > 0 and any n ∈ N and consider the set   x ∈ Xn (Z (y)) o     , if y ∈ Rξ ε,n M N e ΠXZ ≡ (y, x) ∈ R × R h (y, x) ≤ max ξ (y) , −n + ε . (8.76)    c  x ∈ X (Z (y)) , if y ∈ Rξ     We will show that Πnε constitutes a measurable set in B RM ⊗ B RN . Observe that Πε,n XZ ≡ T ε,n S ΠXZ (Π Πrem ), where we define n o ΠXZ , (y, x) ∈ RM × RN x ∈ X (Z (y)) , (8.77) 50 n n o o Πε,n , (y, x) ∈ RM × RN y ∈ Rξ , h (y, x) ≤ max ξe(y) , −n + ε and (8.78) o n (8.79) Πrem , (y, x) ∈ RM × RN y ∈ Rcξ .     Clearly, it suffices to show that both ΠXZ and Πε,n are in B RM ⊗ B RN . First, the set ΠXZ is the graph of the multifunction XZ , and, because XZ is measurable, it follows from ([25],     Theorem 14.8) that ΠXZ ∈ B RM ⊗ B RN . Second, because g is SP ♦FXY (ZY ) , h is jointly ε,n Borel measurable. Additionally, Rξ is Borel and ξe is Borel as well. Consequently,   Π  can  be M N written as the intersection of two measurable sets, implying that it is in B R ⊗ B R , as     well. And third, Πrem ∈ B RM ⊗ B RN , since Rcξ is Borel, as a complement of a Borel set.     M Therefore, Πε,n ∈ B R ⊗ B RN . XZ Now, we have to verify the selection property, set as a requirement in the statement of Theorem 9. Indeed, for every y ∈ Rξ , there exists xy ∈ X (Z (y)), such that (8.69) holds, where ξ (y) ≡ ξe(y) (see Step 6 and above), while, for every y ∈ Rcξ , any xy ∈ X (Z (y)) will do. Thus, for every  y ∈ RM , there exists xy ∈ RN , such that y, xy ∈ Πε,n XZ . As a result, Theorem 9 applies and c ε,n implies that there exists a Borel subset RΠ of PY -measure 0, as well as a Borel measurable XZ ε,n . In other words, the Borel selector Sεn : RM → RN , such that, (y, Sεn (y)) ∈ Πε,n XZ , for all y ∈ RΠ XZ measurable selector Sεn is such that Sεn (y) ∈ X (Z n(y)) ando h (y, Sεn (y)) ≤ max ξe(y) , −n + ε, ∀y ∈ Rξ T RΠε,n , RξΠε,n , XZ (8.80) XZ   T where, of course, PY Rξ RΠε,n ≡ 1. Additionally, (8.80) must be true at y = Y (ω), as long as XZ ω is such that the values of Y are restricted to RξΠε,n . Equivalently, we demand that ω∈  XZ ω ∈ Ω| Y (ω) ∈ RξΠε,n X Z  ≡Y −1   ξ RΠε,n , Ωεn . XZ (8.81)   But RξΠε,n ∈ B RM and Y is a random element and, hence, a measurable function for Ω to RM . XZ This means that Ωεn ∈ Y and we are allowed to write Z ε ! P (dω) P (Ωn ) ≡ Y = Z −1 ξ ε,n ΠX Z R ( ≡ PY M y∈R  y∈R RξΠε,n X Z ξ ε,n ΠX Z  )P Y (dy) ≡ 1. (8.82) Therefore, we may pull (8.80) back to the base space, and restate it as Sεn (Y (ω)) ∈ X (ZY (ω)) and h (Y (ω) , Sεn (Y (ω))) ≤ max {ξ (Y (ω)) , −n} + ε, 51 ∀ω ∈ Ωεn , (8.83) where Ωεn ⊆ Ω is an event, such that P (Ωεn ) ≡ 1. Then, by construction, Sεn (Y ) ∈ FXY (ZY ) . As a result, for any choice of ε > 0 and n ∈ N, the selector Xnε , Sεn (Y ) ∈ FXY (ZY ) is such that E { g (·, Xnε )| Y } (ω) ≤ max {ϑ (ω) , −n} + ε, P − a.e.. (8.84) We are done. F Step 8. It is true that inf Y X∈FX (Z ) Y E {h (Y, X)} ≤ E  inf x∈X (ZY )  Define the sequence of random variables $n : Ω → R  h (Y, x) . n∈N as (see the RHS of (8.74)) ∀ (ω, n) ∈ Ω × N. $n (ω) , max {ϑ (ω) , −n} , (8.85) (8.86) Also, recall that E {ϑ} < +∞. Additionally, observe that ∀ (ω, n) ∈ Ω × N, $n (ω) ≤ max {ϑ (ω) , 0} ≥ 0, (8.87) where it is easy to show that E {max {ϑ, 0}} < +∞. Thus, all members of {$n }n∈N are bounded by an integrable random variable, everywhere in ω and uniformly in n, whereas it is trivial that, for every ω ∈ Ω, $n (ω) & ϑ (ω) . n→∞ Consider now the result of Step 7, where we showed that, for every ε > 0 and for every n ∈ N, there exists a selector Xnε ∈ FXY (ZY ) , such that h (Y, Xnε ) ≤ $n + ε, P − a.e.. (8.88) We can then take expectations on both sides (note that all involved integrals exist), to obtain E {h (Y, Xnε )} ≤ E {$n } + ε. (8.89) Since Xnε ∈ FXY (ZY ) , it also follows that inf Y X∈FX (Z ) Y E {h (Y, X)} ≤ E {$n } + ε. (8.90) It is also easy to see that $n fulfills the requirements of the Extended Monotone Convergence Theorem ([45], Theorem 1.6.7 (b)). Therefore, we may pass to the limit on both sides of (8.90) as n → ∞, yielding inf E {h (Y, X)} ≤ E {ϑ} + ε. (8.91) Y X∈FX (Z ) Y But ε > 0 is arbitrary. F Finally, just combine the statements of Step 4 and Step 8, and the result follows, completing the proof of Lemma 3.  Remark 15. Obviously, Lemma 3 holds also for maximization problems as well, by defining g ≡ −f , for some random function f : Ω × RN → R, under the corresponding setting and assumptions. Note that, in this case, we have to assume that supX∈F Y E {f (·, X)} > −∞.  X (ZY 52 ) Remark 16. Lemma 3 may be considered a useful variation of Theorem 14.60 in [25], in the following sense. First, it is specialized for conditional expectations of random functions, which are additionally SP ♦FXY (ZY ) , in the context of stochastic control. The latter property allows these conditional expectations to be expressed as (Borel) random functions themselves. This is in contrast to ([25], Theorem 14.60), where it is assumed that the random function, whose role is played by the respective conditional expectation in Lemma 3, is somehow provided apriori. Second, Lemma 3 extends ([25], Theorem 14.60), in the sense that the decision set FXY (ZY ) confines any solution to the respective optimization problem to be a Y -measurable selection of a closed-valued measurable multifunction, while at the same time, apart from natural (and important) measurability requirements, no continuity assumptions are imposed on the structure of the random function induced by the respective conditional expectation; only the validity of the substitution property is required. In ([25], Theorem 14.60), on the other hand, it is respectively assumed that the involved random function is a normal integrand, or, in other words, that it is random lower semicontinuous.  Remark 17. In Lemma 3, variational optimization is performed over some subset of functions measurable relative to Y ≡ σ {Y }, where Y is some given random element. Although we do not pursue such an approach here, it would most probably be possible to develop a more general version of Lemma 3, where the decision set would be appropriately extended to include Y -measurable random elements, as well. In such case, the definition of the substitution property could be extended under the framework of lower semianalytic functions and universal measurability, and would allow the development of arguments showing existence of everywhere ε-optimal and potentially everywhere optimal policies (decisions), in the spirit of [27, 28].  8.2.3 Guaranteeing the Existence of Measurable Optimal Controls Although Lemma 3 constitutes a very useful result, which enables the simplification of a stochastic variational problem, by essentially replacing it by an at least structurally simpler, pointwise optimization problem, it does not provide insight on the existence of a common optimal solution, within the respective decision sets. On the one hand, it is easy to observe that, similarly to ([25], Theorem 14.60), if there exists an optimal selection X ∗ ∈ FXY (ZY ) , such that X ∗ ∈ arg min E { g (·, x)| Y } = 6 ∅, x∈X (ZY ) P − a.e., (8.92) and Lemma 3 applies, then, exploiting the fact that g is SP ♦FXY (ZY ) , we may write inf Y X∈FX (Z ) Y E {g (·, X)} ≡ E {ϑ} ≡ E {ξ (Y )}   = E h Y, X ∗    = E E g ·, X ∗ Y   ≡ E g ·, X ∗ , (8.93) implying that the infimum of E {g (·, X)} over X ∈ FXY (ZY ) is attained by X ∗ ; therefore, X ∗ is also an optimal solution to the respective variational problem. Conversely, if X ∗ attains  the infimum  of E {g (·, X)} over X ∈ FXY (ZY ) and the infimum is greater than −∞, then both E g ·, X ∗ and 53   E {ϑ} are finite, which also implies that E g ·, X ∗ Y and ϑ are finite P − a.e.. As a result, and recalling Step 3 in the proof of Lemma 3, we have    E E g ·, X ∗ Y − ϑ ≡ 0 and (8.94)  ∗ E g ·, X Y − ϑ ≥ 0, P − a.e.. (8.95)   and, consequently, ϑ ≡ E g ·, X ∗ Y , P − a.e.. Unfortunately, it is not possible to guarantee existence of such an X ∗ ∈ FXY (ZY ) , in general. However, at least for the purposes of this paper, it is both reasonable and desirable to demand the existence of an optimal solution X ∗ , satisfying (8.92) (in our spatially controlled beamforming problem, we need to make a feasible decision on the position of the relays at the next time slot). Additionally, such an optimal solution, if it exists, will not be available in closed form, and, consequently, it will be impossible to verify measurability directly. Therefore, we have to be able to show both existence and measurability of X ∗ indirectly, and specifically, by imposing constraints on the structure of the stochastic optimization problem under consideration. One way to do this, emphasizing on our spatially controlled beamforming problem formulation, is to restrict our attention to pointwise optimization problems involving Carathéodory objectives, over closed-valued multifunctions, which are additionally closed -see Definition 5. Focusing on Carathéodory functions is not particularly restrictive, since it is already clear that, in order to guarantee the validity of the substitution rule (the SP Property), similar continuity assumptions would have to be imposed on both random functions g and E { g (·, ·)| Y } ≡ h, as Theorem 8 suggests. At the same time, restricting our attention to optimizing Carathéodory functions over measurable multifunctions, measurability of optimal values and optimal decisions is preserved, as the next theorem suggests. Theorem 10. (Measurability under Partial Minimization) On the base subspace (Ω, Y , P|Y ), where Y ⊆ F , let the random function H : Ω × RN → R be Carathéodory, and consider another random element Z : Ω → RN , as well as any compact-valued multifunction X : RN ⇒ RN , with dom (X ) ≡ RN , which is also closed. Additionally, define H ∗ : Ω → R as the optimal value to the optimization problem minimize H (ω, x) x , ∀ω ∈ Ω. (8.96) subject to x ∈ X (Z (ω)) Then, H ∗ is Y -measurable and attained for at least one Y -measurable minimizer X ∗ : Ω → RN . If the minimizer X ∗ is unique, then it has to be Y -measurable. Proof of Theorem 10. From ([26], pp. 365 - 367 and/or [25], Example 14.32 & Theorem 14.37), we may immediately deduce that H ∗ is Y -measurable and attained for at least one Y -measurable minimizer X ∗ , as long as the compact (therefore closed, as well)-valued multifunction X (Z (·)) : Ω ⇒ RN is measurable relative to Y . In order to show that the composition X (Z (·)) is Y measurable, we use the assumption that the compact-valued multifunction X : RN ⇒ RN is closed and, therefore, Borel measurable (Remark 28 in [26], p. 365). Then, Y -measurability of X (Z (·)) follows by the same arguments as in Step 1, in the proof of Lemma 3.  Remark 18. It would be important to mention that if one replaces RN with any compact (say) subset H ⊂ RN in the statement of Theorem 10, then the result continues to hold as is. No modification is necessary. In our spatially controlled beamforming problem, this compact set H is specifically identified either with the hypercubic region S R , or with some compact subset of it.  54 8.2.4 Fusion & Derivation of Conditions C1-C6 Finally, combining Theorem 8, Lemma 3 and Theorem 10, we may directly formulate the following constrained version of the Fundamental Lemma, which is of central importance regarding the special class of stochastic problems considered in this work and, in particular, (4.5). Lemma 4. (Fundamental Lemma / Fused Version) On (Ω, F , P), consider a random element Y : Ω → RM , the sub σ-algebra Y , σ {Y } ⊆ F , a random function g : Ω × RN → R, such that E {g (·, x)} exists for all x ∈ RN , a multifunction X : RN ⇒ RN , with dom (X ) ≡ RN and , as well as another function ZY : Ω → RN . Assume that: C1. X is compact-valued and closed, and that C2. ZY is a Y -measurable random element. Consider also the nonempty decision set FXY (ZY ) . Additionally, suppose that: C3. E {g (·, X)} exists for all X ∈ FXY (ZY ) , with inf X∈F Y X (ZY ) E {g (·, X)} < +∞, C4. g is dominated by a P-integrable function, uniformly in x ∈ RN , C5. g is Carathéodory on Ω × RN , and that C6. E { g (·, x)| Y } ≡ h (Y, x) is Carathéodory on Ω × RN . Then, the optimal value function inf x∈X (ZY ) E { g (·, x)| Y } , ϑ is Y -measurable, and it is true that inf Y X∈FX (Z Y )   E {g (·, X)} ≡ E {ϑ} ≡ E g ·, X ∗ , (8.97) for at least one X ∗ ∈ FXY (ZY ) , such that X ∗ (ω) ∈ arg minx∈X (ZY ) E { g (·, x)| Y } (ω), everywhere in ω ∈ Ω. If there is only one minimizer attaining ϑ, then it has to be Y -measurable. Proof of Lemma 4. We just carefully combine Theorem 8, Lemma 3 and Theorem 10. First, if conditions C4-C6 are satisfied, then, from Theorem 8, it follows that g is SP ♦IY . Then, since FXY (ZY ) ⊆ IY , g is SP ♦FXY (ZY ) , as well. Consequently, with C1-C3 being true, all assumptions of Lemma 3 are satisfied, and the first equivalence of (8.97) from the left is true. Additionally, from Theorem 10, it easily follows that the optimal value ϑ is Y -measurable, attained by an at least one Y -measurable X ∗ , which, of course, constitutes a selection of X (Z (Y )) ≡ X (ZY ), or, equivalently, X ∗ ∈ FXY (ZY ) . Then, because g is SP ♦FXY (ZY ) , we may write ϑ≡ ≡ inf E { g (·, x)| Y } inf h (Y, x) x∈X (ZY ) x∈X (ZY ) ∗ ≡ h Y, X   ≡ E g ·, X ∗ Y , P − a.e.,   which yields the equivalence E {ϑ} ≡ E g ·, X ∗ . The proof is complete. 55 (8.98)  Remark 19. Note that, because, in Lemma 4, X ∗ (ω) ∈ X (ZY (ω)), everywhere in ω ∈ Ω, it is true that X ∗ is actually a minimizer of the slightly more constrained problem of infimizing E {g (·, X)} over the set of precisely all Y -measurable selections of X (ZY ). Denoting this decision set as ,E Y FXY (Z ) ⊆ FX (ZY ) , the aforementioned statement is true since, simply, Y inf Y ,E (ZY X∈FX =⇒ ) inf Y ,E (ZY X∈FX ) E {g (·, X)} ≥ inf Y X∈FX (Z ) Y   E {g (·, X)} ≡ E g ·, X ∗   E {g (·, X)} ≡ E g ·, X ∗ . (8.99) (8.100) ,E where we have used the fact that X ∗ ∈ FXY (Z . This type of decision set is considered, for simplicity, Y) in (4.5), which corresponds to the original formulation of the spatially controlled beamforming problem.  Lemma 4 is of major importance, as it directly provides us with conditions C1-C6, which, being relatively easily verifiable, at least for our spatially controlled beamforming setting, ensure strict theoretical consistency of the methods developed in this paper. At this point, our discussion concerning the Fundamental Lemma has been concluded.  8.3 8.3.1 Appendix C: Proofs / Section 4 Proof of Theorem 3 Since, in the following, we are going to verify conditions C1-C6 of Lemma 4 in Section 8.2.4 (Appendix B) for the 2-stage problem (4.15), it will be useful to first match it to the setting of Lemma 4, term-by-term. Table 1 shows how the components of (4.15) are matched to the respective components of the optimization problem considered in Lemma 4. For the rest of the proof, we consider this variable matching automatic. Keep t ∈ N2NT fixed. As in the statement of Theorem 3, suppose that, at time slot t − 1 ∈ N+ NT −1 , po (t − 1) ≡ po (ω, t − 1) is measurable relative to C (Tt−2 ). Then, condition C2 is automatically verified. F Next, let us verify C1. For this, we will simply show directly that closed-valued translated multifunctions, in the sense of Definition 1, are also closed. Given two closed sets H ⊂ RN , A ⊆ RN and a fixed reference h ∈ H, let D : RN ⇒ RN be (H, h)-translated in A and consider any two arbitrary sequences {xk ∈ A}k∈N and {y k ∈ A − h}k∈N , (8.101) such that xk −→ x, y k −→ y and xk ∈ D (y k ), for all k ∈ N. By Definition 1, xk ∈ D (y k ) if k→∞ k→∞ and only if xk − y k ∈ H, for all k ∈ N. But xk − y k −→ x − y and H is closed. Therefore, it is k→∞ true that x − y ∈ H, as well, showing that D is closed. By Assumption 2, C : R2R ⇒ R2R is the (G, 0)-translated multifunction in S R , for some compact and, hence, closed, G ⊂ S R . Consequently, the restriction of C in S R is closed and C3 is verified. F 2 Condition C5 is also easily verified; it suffices to show that both functions |f (·, ·, t)| and |g (·, ·, t)|2 are Carathéodory on Ω × S, or, in other words, that the fields |f (p, t)|2 and |g (p, t)|2 are everywhere sample path continuous. Indeed, if this holds, VI (·, ·, t) will be Carathéodory, as a 56 Problem of Lemma 4 2-Stage Problem (4.15) All relay positions and channel observations, up to (current) time slot t − 1 σ-Algebra C (Tt−1 ), jointly generated by the above random vector Optimal value of the second-stage problem, V (·, ·, t − 1) : Ω × S R → R++ Spatially feasible motion region C : S R ⇒ S R , with dom (C) ≡ S R Selected motion policy at time slot t − 2, po (·, t − 1) : Ω → S R Decision set Dt ,E (precisely matched with FXY (Z )) Random element Y : Ω → RM σ-Algebra Y , σ {Y } Random Function g : Ω × RN → R Multifunction X : RN ⇒ RN , with dom (X ) ≡ RN Function ZY : Ω → RN Decision set FXY (ZY ) Y Table 1: Variable matching for (4.15) and the respective problem considered in Lemma 4. continuous functional of |f (·, ·, t)|2 and |g (·, ·, t)|2 , and since h iT  X T T V p1 . . . pR , t ≡ VI (pi , t) , (8.102) + i∈NR it readily follows that V (·, ·, t) is Carathéodory on Ω × S R . In order to show (everywhere) sample path continuity of |f (p, t)|2 (respectively |g (p, t)|2 ) on S, we may utilize (3.11). As a result, sample path continuity of |f (p, t)|2 is equivalent to sample path continuity of F (p, t) ≡ αS (p) ` + σS (p, t) + ξS (p, t) , ∀p ∈ S. (8.103) Of course, αS is a continuous function of p. As long as the fields σS (p, t) and ξS (p, t) are concerned, these are also sample path continuous; see Section 3.3. Enough said. F We continue with C3. Since we already know that V (·, ·, t) is Carathéodory, it follows from   ([44], Lemma 4.51) that V (·, ·, t) is also jointly measurable relative to F ⊗ B S R . Next, let p (t) ≡ p (ω, t) ∈ S R be any random element, measurable with respect to C (Tt−1 ) and, thus, F , too. Then, from ([44], Lemma 4.49), we know that the pair (p (t, ω) , (t, ω)) is also F -measurable. Consequently, |V (·, p (·, t) , t)|2 must be F -measurable, as a composition of measurable functions. Additionally, V (·, ·, t) is, by definition, nonnegative. Thus, its expectation exists (Corollary 1.6.4 in [45]), and we are done. F Conditions C4 and C6 need slightly more work, in order to be established. To verify C4, we have to show existence of a function in L1 (Ω, F , P; R), which dominates V (·, ·, t), uniformly in p ∈ S R . Everywhere in Ω, again using (3.11), and with ς , log (10) /10 for brevity, we may write h iT  X Pc P0 |f (pi , t)|2 |g (pi , t)|2 T T V p1 . . . pR , t ≡ 2 2 2 2 2 2 + P0 σD |f (pi , t)| + Pc σ |g (pi , t)| + σ σD i∈NR ≤ P0 X σ 2 + i∈NR |f (pi , t)|2 57 ≤ ≡ ≡ ≡ P0 X σ2 10ρ/10 P0 R σ2 σ2 σ2 ≤ P0 R 10 σ2 ! exp ς sup αS (p) ` + χS (p, t) p∈S P0 R ! exp ς sup αS (p) ` + σS (p, t) + ξS (p, t) p∈S σ2 ρ/10 ! exp ς sup F (p, t) p∈S 10ρ/10 P0 R 10 sup exp (ςF (p, t)) p∈S 10ρ/10 P0 R ρ/10 , sup |f (pi , t)|2 + pi ∈S i∈NR ! ! exp ς` sup αS (p) exp ς sup χS (p, t) p∈S , ϕ (ω, t) > 0, ∀ω ∈ Ω. p∈S (8.104) Due to the fact that αS is continuous in p ∈ S and that S is compact, the Extreme Value Theorem implies that the deterministic term supp∈S αS (p) is finite. Consequently, it suffices to show that ( !) E exp ς sup χS (p, t) p∈S < +∞, (8.105) provided, of course, that the expectation is meaningfully defined. For this to happen, it suffices that the function supp∈S χS (p, t) is a well defined random variable. Since both σS (p, t) and ξS (p, t) are sample path continuous, it follows that the sum field σS (p, t) + ξS (p, t) is sample path continuous. It is then relatively easy to see that supp∈S χS (p, t) is a measurable function. See, for instance, Theorem 10, or [38]. Additionally, the Extreme Value Theorem again implies that supp∈S χS (p, t) is finite everywhere on Ω, which in turn means that the field χS (p, t) is at least almost everywhere bounded on the compact set S. Now, in order to prove that (8.105) is indeed true, we will invoke a well known result from the theory of concentration of measure, the Borell-TIS Inequality, which now follows. Theorem 11. (Borell-TIS Inequality [38]) Let X (s), s ∈ RN , be a real-valued, zero-mean, Gaussian random field, P-almost everywhere bounded on a compact subset K ⊂ RN . Then, it is true that   E sup X (s) < +∞ and (8.106) s∈K       u2  n o P sup X (s) − E sup X (s) > u ≤ exp − (8.107) , 2 s∈K s∈K 2 sup E X (s) s∈K for all u > 0. 58 As highlighted in ([38], page 50), an immediate consequence of the Borell-TIS Inequality is that, under the setting of Theorem 11, we may further assert that    2    u − E sup X (s)    s∈K n o  P sup X (s) > u ≤ exp − (8.108) ,   s∈K 2 sup E X 2 (s) s∈K for all u > E {sups∈K X (s)}. To show (8.105), we exploit the Borell-TIS Inequality and follow a procedure similar to ([38], Theorem 2.1.2). First, from the discussion above, we readily see that the field χS (p, t) does satisfy the assumptions Theorem 11. Also, because χS (p, t) is the sum of two independent fields, it is true that n o E χ2S (p, t) ≡ η 2 + σξ2 . (8.109)  As a result, Theorem 11 implies that E supp∈S χS (p, t) is finite and we may safely write ( !) Z ∞ ! ! E exp ς sup χS (p, t) ≡ p∈S ≡ Z0 ∞ 0 P exp ς sup χS (p, t) > x dx p∈S P ! log (x) sup χS (p, t) > dx. ς p∈S In order to exploit (8.108), it must hold that ( ) ( )! log (x) > 0. > E sup χS (p, t) ⇔ x > exp ςE sup χS (p, t) ς p∈S p∈S Therefore, we may break (8.110) into two parts and bound from above, namely, ( !) E exp ς sup χS (p, t) ≡ Z p∈S exp(ςE{supp∈S χS (p,t)}) 0 + ≤ Z Z P ! log (x) sup χS (p, t) > dx ς p∈S ∞ exp(ςE{supp∈S χS (p,t)}) P ! log (x) sup χS (p, t) > dx ς p∈S exp(ςE{supp∈S χS (p,t)}) 0 + Z dx ∞ exp(ςE{supp∈S χS (p,t)})     exp−   ( )!2  log (x)  − E sup χS (p, t)  ς p∈S    dx 2 2  2 η + σξ  59 (8.110) (8.111) ( )! ≤ exp ςE sup χS (p, t) Z p∈S ∞ +ς E{supp∈S χS (p,t)}  ( )!2   u − E sup χS (p, t)  p∈S    exp(ςu) exp− 2 2  2 η + σ ξ     du.   (8.112) Since both terms on the RHS of (8.112) are finite, (8.105) is indeed satisfied. Consequently, it is true that E {ϕ (·, t)} < +∞ ⇔ ϕ (·, t) ∈ L1 (Ω, F , P; R) . (8.113) Enough said; C4 is now verified. F 2 Moving on to C6, the goal here is to show that, for each fixed t ∈ NNT , the well defined random function H : Ω × S R → R, defined as H (ω, p) , E {V (p, t) |C (Tt−1 ) } (ω) , (8.114) is Carathéodory. Observe, though, that we may write X H (ω, p) ≡ HI (ω, pi ), (8.115) + i∈NR where the random function HI : Ω × S → R is defined as ( ) Pc P0 |f (p, t)|2 |g (p, t)|2 HI (ω, p) , E 2 2 C (Tt−1 ) (ω) . P0 σD |f (p, t)|2 + Pc σ 2 |g (p, t)|2 + σ 2 σD (8.116) Because a finite sum of Carathéodory functions (in this case, in different variables) is obviously Carathéodory, it suffices to show that HI is Carathéodory. First, it is easy to see that HI (·, p) constitutes a well defined conditional expectation of a nonnegative random variable, for all p ∈ S. Therefore, what remains is to show that HI (ω, ·) is continuous on S, everywhere with respect to ω ∈ Ω. For this, we will rely on the sequential definition of continuity and the explicit representation of HI as an integral with respect to the Lebesgue measure, which exploits the form of the projective system of finite dimensional distributions of |f (p, t)|2 and |g (p, t)|2 . In particular, because of the trick (3.11), it is easy to show that HI can be equivalently expressed as the Lebesgue integral Z HI (ω, p) = r (x) N (x; µ2 (ω, p) , Σ2 (ω, p)) dx, (8.117) 2 R where the continuous function r : R2 → R++ is defined as (recall that ς ≡ log (10) /10) r (x) ≡ r (x1 , x2 ) , Pc P0 10ρ/10 [exp (x1 + x2 )]ς 2 2 P0 σ D [exp (x1 )]ς + Pc σ 2 [exp (x2 )]ς + 10−ρ/10 σ 2 σD 60 , (8.118) for all x ≡ (x1 , x2 ) ∈ R2 , and N : R2 × S × Ω → R++ , corresponds to the jointly Gaussian conditional density of F (p, t) and G (p, t), relative to C (Tt−1 ), with mean µ2 : (ω, p) → R2×1 and covariance Σ2 : (ω, p) → S2×2 ++ explicitly depending on ω and p as µ2 (ω, p) ≡ µ2 (C (Tt−1 ) (ω) ; p) Σ2 (ω, p) ≡ Σ2 (C (Tt−1 ) (ω) ; p) , and (8.119) ∀ (ω, p) ∈ Ω × S. (8.120) Via a simple change of variables, we may reexpress HI (ω, p) as Z r (x + µ2 (ω, p)) N (x; 0, Σ2 (ω, p)) dx. HI (ω, p) ≡ R 2 (8.121) It is straightforward to verify that both µ2 (ω, ·) and Σ2 (ω, ·) are continuous functions in p ∈ S, for all ω ∈ Ω. This is due to the fact that all functions involving p in the wireless channel model introduced in Section 3 are trivially continuous in this variable. Equivalently, we may assert that the whole integrand r (x + µ2 (ω, ·)) N (x; 0, Σ2 (ω, ·)) is a continuous function, for all pairs (ω, x) ∈ Ω × R2 . Next, fix ω ∈ Ω, and for arbitrary p ∈ S, consider any sequence {pk ∈ S}k∈N , such that pk −→ p. Then, HI (ω, ·) is continuous if and only if HI (ω, pk ) −→ HI (ω, p). We will show this k→∞ k→∞ via a simple application of the Dominated Convergence Theorem. Emphasizing the dependence on p as a superscript for the sake of clarity, we can write   1 T  p −1 exp − x Σ2 x    2 q r x + µp2 N x; 0, Σp2 ≡r x + µp2  2π det Σp2      1 p −1 2 kxk2 exp − λmin Σ2  2 q ≤r x + µp2  2π det Σp2 ! kxk22  exp − 2λmax Σp2 p q ≡r x + µ2  2π det Σp2 ! kxk22  exp − 2λmax Σp2 ς P0 10ρ/10  p q ≤ exp x1 + µ2 (1)  σ2 2π det Σp2   ≤ P0 10ρ/10 σ2 " exp x1 + sup µp2 (1) p∈S !#ς kxk22  p  2sup λmax Σ2 p∈S r  2π inf det Σp2  exp − p∈S , P0 10ρ/10 σ 2 [exp(x1 + p1 )]ς 61 kxk22 2p2 √ 2π p3 exp − ! , ψ (ω, x) , (8.122) where, due to the continuity of µ2 (ω, ·) and Σ2 (ω, ·), the continuity of the maximum eigenvalue and determinant operators, the fact that S is compact, and the power of the Extreme Value Theorem, all extrema involved are finite and, of course, independent of p. It is now easy to verify that the RHS of (8.122) is integrable. Indeed, by Fubini’s Theorem (Theorem 2.6.4 in [45]) ! Z Z kxk22 P0 10ρ/10 exp(ςp1 ) 1 ψ (ω, x) dx= exp(ςx1 ) dx exp − √ 2 p3 2π 2p2 2 σ2 R R ! Z kxk22 P0 10ρ/10 exp(ςp1 )p2 1 ≡ exp(ςx1 ) exp − dx √ p3 2πp2 2p2 2 σ2 R ! Z P0 10ρ/10 exp(ςp1 )p2 1 x21 = exp(ςx1 ) √ dx1 exp − √ p3 2p2 2πp2 σ2 R   P 10ρ/10 exp(ςp1 (ω))p2 (ω) p2 (ω) 2 p = 0 2 exp ς < +∞, ω ∈ Ω. (8.123) 2 p3 (ω) σ That is,     ψ (ω, ·) ∈ L1 R2 , B R2 , L; R , ω ∈ Ω, (8.124) where L denotes the Lebesgue measure. We can now call Dominated Convergence; since, for each x ∈ R2 (and each ω ∈ Ω), r (x + µ2 (ω, pk )) N (x; 0, Σ2 (ω, pk )) −→ r (x + µ2 (ω, p)) N (x; 0, Σ2 (ω, p)) k→∞ (8.125) and all members of this sequence are dominated by the integrable function ψ (ω, ·), it is true that Z r (x + µ2 (ω, pk )) N (x; 0, Σ2 (ω, pk )) dx HI (ω, pk )≡ 2 R Z r (x + µ2 (ω, p)) N (x; 0, Σ2 (ω, p)) dx ≡ HI (ω, p) . (8.126) −→ k→∞ 2 R But {pk }k∈N and p are arbitrary, showing that HI (ω, ·) is continuous, for each fixed ω ∈ Ω. Hence, HI is Carathéodory on Ω × S. F The proof to the second part of Theorem 3 follows easily by direct application of the Fundamental Lemma (Lemma 4; also see Table 1).  8.3.2 Proof of Lemma 2 In the notation of the statement of the lemma, the joint conditional distribution of [F (p, t) G (p, t)]T relative to the σ-algebra C (Tt−1 ) can be readily shown to be Gaussian with mean µF,G t|t−1 (p) and 2 covariance ΣF,G t|t−1 (p), for all (p, t) ∈ S × NNT . This is due to the fact that, in Section 3, we have implicitly assumed that the channel fields F (p, t) and G (p, t) are jointly Gaussian. It is then a F,G typical exercise (possibly somewhat tedious though) to show that the functions µF,G t|t−1 and Σ t|t−1 are of the form asserted in the statement of the lemma. Regarding the proof for (4.34), observe that we can write E { |f (p, t)|m |g (p, t)|n | C (Tt−1 )} 62     log (10) ≡ 10 E exp (mF (p, t) + nG (p, t)) C (Tt−1 ) 20     log (10) T (m+n)ρ/20 [m n] [F (p, t) G (p, t)] ≡ 10 E exp C (Tt−1 ) , 20 (m+n)ρ/20 (8.127) with the conditional expectation on the RHS being nothing else than the conditional moment generating function of the conditionally jointly Gaussian random vector [F (p, t) G (p, t)]T at each p and t, evaluated at the point (log (10) /20) [m n]T , for any choice of (m, n) ∈ Z × Z. Recalling the special form of the moment generating function for Gaussian random vectors, the result readily follows.  8.3.3 Proof of Theorem 4 It will suffice to show that both objectives of (4.35) and (4.36) are Carathéodory in Ω × S. But this statement may be easily shown by analytically expressing both (4.35) and (4.36) using Lemma 2. Now, since both objectives of (4.35) and (4.36) are Carathéodory, we may invoke Theorem 10 (Appendix B), in an inductive fashion, for each t ∈ N2NT , guaranteeing the existence of at least one e ∗ (t), which solves the optimization C (Tt−1 )-measurable decision for either (4.35), or (4.36), say p problem considered, for all ω ∈ Ω. Proceeding inductively gives the result.  8.3.4 Proof of Theorem 6 By assumption, V (p, t) is L.MD.G♦ (Ht , µ), implying, for every t ∈ N+ NT , the existence of an event R Ωt ⊆ Ω, satisfying P (Ωt ) ≡ 1, such that, for every p ∈ S , µE { V (p, t − 1)| Ht−1 } (ω) ≡ E { V (p, t)| Ht−1 } (ω) , ∀ω ∈ Ωt . (8.128) Fix t ∈ N2NT . Consider any admissible policy po (t) at t, implemented at t and decided at o t−1 ∈ N+ NT −1 . By our assumptions, V (·, ·, t) is SP ♦CHt . Additionally, because p (t) is admissible, it will be measurable relative to the limit Pt↑ and, hence, measurable relative to Ht . Thus,  σ-algebra  o o there exists an event Ωpt ⊆ Ω, with P Ωpt o ≡ 1, such that, for every ω ∈ Ωpt , E { V (po (t) , t)| Ht } (ω) ≡ E { V (p, t)| Ht } (ω)|p=po (ω,t) ≡ ht (ω, po (ω, t)) , (8.129)   where the extended real-valued random function ht : Ω×S R → R is jointly Ht ⊗B S R -measurable, with ht (ω, p) ≡ E { V (p, t)| Ht } (ω), everywhere in (ω, p) ∈ Ω × S R . Also by our assumptions, V (·, ·, t) is SP ♦CHt−1 , as well. Similarly to the arguments made ↑ above, if po (t) is assumed to be measurable relative to the limit σ-algebra Pt−1 , or, in other words, admissible at t − 1,  then  it will also be measurable relative to Ht−1 . Therefore, there exists an event o o o Ωp− ⊆ Ω, with P Ωp− ≡ 1, such that, for every ω ∈ Ωp− , t t t E { V (po (t) , t)| Ht−1 } (ω) ≡ E { V (p, t)| Ht−1 } (ω)|p=po (ω,t) ≡ ht− (ω, po (ω, t)) , 63 (8.130)   where the random function ht− : Ω × S R → R is jointly Ht−1 ⊗ B S R -measurable, with ht− (ω, p) ≡ E { V (p, t)| Ht−1 } (ω), everywhere in (ω, p) ∈ Ω × S R . Note that, by construction, po (t) will also be admissible at time t and, therefore, measurable relative to and Ht , as well. Now, we combine the arguments made above. Keep t ∈ N2NT fixed. At time slot t − 2 ∈ NNT −2 , let po (t − 1) ≡ po (ω, t − 1) be a C (Tt−2 )-measurable admissible policy (recall that C1-C6 are satisfied by assumption; also recall that, if t ≡ 2, C (Tt−2 ) ≡ C (T0 ) is the trivial σ-algebra). At o o o the next time slot t − 1 ∈ N+ NT −1 , let us choose p (t) ≡ p (ω, t − 1); in this case, p (t) will also be C (Tt−2 )-measurable and result in the same final position for the relays at time slot t ∈ N2NT . As a result, the relays just stay still. Under these circumstances, at time slot t − 1 ∈ N+ NT −1 , the o expected network QoS will be E {V (p (t − 1) , t − 1)}, whereas, at the next time slot t ∈ N2NT , it will be E {V (po (t − 1) , t)}. Exploiting (8.128), we may write \ o \ o µht−1 (ω, p) ≡ ht− (ω, p) , ∀ (ω, p) ∈ Ωt Ωpt−1 Ωp− × S R , (8.131) t  where, obviously, P Ωt T o Ωpt−1 T o Ωp− ≡ 1. Consequently, it will be true that t µht−1 (ω, po (ω, t − 1)) ≡ ht− (ω, po (ω, t − 1)) , ∀ω ∈ Ωt From (8.129) and (8.130), it is also true that \ o Ωpt−1 \ o Ωp− . t µE { V (po (t − 1) , t − 1)| Ht−1 } (ω) ≡ E { V (po (t − 1) , t)| Ht−1 } (ω) , (8.132) (8.133) almost everywhere with respect to P. This, of course, implies that µE {V (po (t − 1) , t − 1)} ≡ E {V (po (t − 1) , t)} , (8.134) and for all t ∈ N2NT , since t was arbitrary. Since (8.134) holds for all admissible policies decided at time slot t − 2 ∈ NNT −2 , it will also hold for the respective optimal policy, that is,     µE V p∗ (t − 1) , t − 1 ≡ E V p∗ (t − 1) , t , ∀t ∈ N2NT . (8.135) Next, as discussed above, the choice po (t) ≡ p∗ (ω, t − 1) constitutes an admissible policy decided ∗ ∗ at time slot t − 1 ∈ N+ NT −1 ; it suffices to see that p (ω, t − 1) ∈ C p (ω, t − 1) , by definition of our initial 2-stage problem, because “staying still” is always a feasible decision for the relays. Consequently, because the optimal policy p∗ (t) results in the highest network QoS, among all admissible policies, it will be true that     µE V p∗ (t − 1) , t − 1 ≤ E V p∗ (t) , t , ∀t ∈ N2NT , (8.136) completing the proof of Theorem 6.  References [1] V. Havary-Nassab, S. ShahbazPanahi, A. Grami, and Z.-Q. Luo, “Distributed Beamforming for Relay Networks based on Second-Order Statistics of the Channel State Information,” Signal Processing, IEEE Transactions on, vol. 56, no. 9, pp. 4306–4316, Sept 2008. 64 [2] V. Havary-Nassab, S. ShahbazPanahi, and A. Grami, “Optimal distributed beamforming for two-way relay networks,” Signal Processing, IEEE Transactions on, vol. 58, no. 3, pp. 1238– 1250, March 2010. [3] Y. Jing and H. Jafarkhani, “Network beamforming using relays with perfect channel information,” Information Theory, IEEE Transactions on, vol. 55, no. 6, pp. 2499–2517, June 2009. [4] G. Zheng, K.-K. Wong, A. Paulraj, and B. Ottersten, “Collaborative-Relay Beamforming with Perfect CSI: Optimum and Distributed Implementation,” Signal Processing Letters, IEEE, vol. 16, no. 4, pp. 257–260, April 2009. [5] J. Li, A. Petropulu, and H. Poor, “Cooperative transmission for relay networks based on second-order statistics of channel state information,” Signal Processing, IEEE Transactions on, vol. 59, no. 3, pp. 1280–1291, March 2011. [6] Y. Liu and A. Petropulu, “On the sumrate of amplify-and-forward relay networks with multiple source-destination pairs,” Wireless Communications, IEEE Transactions on, vol. 10, no. 11, pp. 3732–3742, November 2011. [7] Y. Liu and A. Petropulu, “Relay selection and scaling law in destination assisted physical layer secrecy systems,” in Statistical Signal Processing Workshop (SSP), 2012 IEEE, Aug 2012, pp. 381–384. [8] N. Chatzipanagiotis, Y. Liu, A. Petropulu, and M. Zavlanos, “Controlling groups of mobile beamformers,” in Decision and Control (CDC), 2012 IEEE 51st Annual Conference on, Dec 2012, pp. 1984–1989. [9] D. S. Kalogerias, N. Chatzipanagiotis, M. M. Zavlanos, and A. P. Petropulu, “Mobile jammers for secrecy rate maximization in cooperative networks,” in Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on, May 2013, pp. 2901–2905. [10] D. S. Kalogerias and A. P. Petropulu, “Mobi-cliques for improving ergodic secrecy in fading wiretap channels under power constraints,” in Acoustics, Speech and Signal Processing (ICASSP), 2014 IEEE International Conference on, May 2014, pp. 1578–1591. [11] J. Fink, A. Ribeiro, and V. Kumar, “Robust control of mobility and communications in autonomous robot teams,” IEEE Access, vol. 1, pp. 290–309, 2013. [12] Y. Yan and Y. Mostofi, “Co-optimization of communication and motion planning of a robotic operation under resource constraints and in fading environments,” IEEE Transactions on Wireless Communications, vol. 12, no. 4, pp. 1562–1572, April 2013. [13] J. Fink, A. Ribeiro, and V. Kumar, “Robust control of mobility and communications in autonomous robot teams,” IEEE Access, vol. 1, pp. 290–309, 2013. [14] J. Fink, A. Ribeiro, and V. Kumar, “Robust control for mobility and wireless communication in cyber-physical systems with application to robot teams,” Proceedings of the IEEE, vol. 100, no. 1, pp. 164–178, Jan 2012. 65 [15] Y. Yan and Y. Mostofi, “To go or not to go: On energy-aware and communication-aware robotic operation,” IEEE Transactions on Control of Network Systems, vol. 1, no. 3, pp. 218–231, Sept 2014. [16] A. Ghaffarkhah and Y. Mostofi, “Path planning for networked robotic surveillance,” IEEE Transactions on Signal Processing, vol. 60, no. 7, pp. 3560–3575, July 2012. [17] A. Ghaffarkhah and Y. Mostofi, “Communication-aware motion planning in mobile networks,” IEEE Transactions on Automatic Control, vol. 56, no. 10, pp. 2478–2485, Oct 2011. [18] S.-J. Kim, E. Dall’Anese, and G. Giannakis, “Cooperative spectrum sensing for cognitive radios using kriged kalman filtering,” Selected Topics in Signal Processing, IEEE Journal of, vol. 5, no. 1, pp. 24–36, Feb 2011. [19] E. Dall’Anese, S.-J. Kim, and G. Giannakis, “Channel gain map tracking via distributed kriging,” Vehicular Technology, IEEE Transactions on, vol. 60, no. 3, pp. 1205–1211, March 2011. [20] M. Malmirchegini and Y. Mostofi, “On the Spatial Predictability of Communication Channels,” Wireless Communications, IEEE Transactions on, vol. 11, no. 3, pp. 964–978, March 2012. [21] R. C. Elandt-Johnson and N. L. Johnson, Survival Models and Data Analysis, Wiley, 1999. [22] R. Durrett, Probability: theory and examples, Cambridge university press, 2010. [23] J. L. Speyer and W. H. Chung, Stochastic Processes, Estimation, and Control, vol. 17, Siam, 2008. [24] K. J. Astrom, Introduction to Stochastic Control Theory, vol. 70, New York: Academic Press, 1970. [25] R. T. Rockafellar and R. J. B. Wets, Variational Analysis, vol. 317, Springer Science & Business Media, 2009. [26] A. Shapiro, D. Dentcheva, and A. Ruszczynski, Lectures on Stochastic Programming: Modeling and Theory (MPS-SIAM Series on Optimization), SIAM-Society for Industrial and Applied Mathematics, 1st edition, 2009. [27] D. P. Bertsekas, Dynamic Programming & Optimal Control, vol. II: Approximate Dynamic Programming, Athena Scientific, Belmont, Massachusetts, 4th edition, 2012. [28] D. P. Bertsekas and S. E. Shreve, Stochastic optimal control: The discrete time case, vol. 23, Academic Press New York, 1978. [29] A. Goldsmith, Wireless Communications, Cambridge university press, 2005. [30] S. L. Cotton and W. G. Scanlon, “Higher Order Statistics for Lognormal Small-Scale Fading in Mobile Radio Channels,” Antennas and Wireless Propagation Letters, IEEE, vol. 6, pp. 540–543, 2007. [31] M. Gudmundson, “Correlation Model for Shadow Fading in Mobile Radio Systems,” Electronics Letters, vol. 27, no. 23, pp. 2145–2146, Nov 1991. 66 [32] A. Gonzalez-Ruiz, A. Ghaffarkhah, and Y. Mostofi, “A Comprehensive Overview and Characterization of Wireless Channels for Networked Robotic and Control Systems,” Journal of Robotics, vol. 2011, 2012. [33] A. Kaya, L. Greenstein, and W. Trappe, “Characterizing indoor wireless channels via ray tracing combined with stochastic modeling,” Wireless Communications, IEEE Transactions on, vol. 8, no. 8, pp. 4165–4175, August 2009. [34] C. Oestges, N. Czink, B. Bandemer, P. Castiglione, F. Kaltenberger, and A. J. Paulraj, “Experimental characterization and modeling of outdoor-to-indoor and indoor-to-indoor distributed channels,” IEEE Transactions on Vehicular Technology, vol. 59, no. 5, pp. 2253–2265, Jun 2010. [35] M. G. Genton, “Classes of Kernels for Machine Learning: A Statistics Perspective,” Journal of Machine Learning Research, vol. 2, no. Dec, pp. 299–312, 2001. [36] R. J. Adler, The Geometry of Random Fields, vol. 62, Siam, 2010. [37] P. Abrahamsen, A Review of Gaussian Random Fields and Correlation Functions, Norsk Regnesentral/Norwegian Computing Center, 1997. [38] R. J. Adler and J. E. Taylor, Random Fields & Geometry, Springer Science & Business Media, 2009. [39] L. Aggoun and R. J. Elliott, Measure theory and filtering: Introduction and applications, vol. 15, Cambridge University Press, 2004. [40] W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, Numerical Recipes in C, vol. 2, Cambridge university press Cambridge, 1996. [41] I. Arasaratnam, S. Haykin, and R. J. Elliott, “Discrete-Time Nonlinear Filtering Algorithms Using Gauss-Hermite Quadrature,” Proceedings of the IEEE, vol. 95, no. 5, pp. 953–977, May 2007. [42] G. H. Golub and J. H. Welsch, “Calculation of Gauss Quadrature Rules,” Mathematics of computation, vol. 23, no. 106, pp. 221–230, 1969. [43] B. W. Levinger, “The Square Root of a 2×2 Matrix,” Mathematics Magazine, vol. 53, no. 4, pp. 222–224, 1980. [44] C. D. Aliprantis and K. Border, Infinite Dimensional Analysis: A Hitchhiker’s Guide, Springer Science & Business Media, 2006. [45] R. B. Ash and C. Doleans-Dade, Probability and Measure Theory, Academic Press, 2000. [46] G. W. Mackey, “Borel structure in groups and their duals,” Transactions of the American Mathematical Society, vol. 85, no. 1, pp. 134–165, 1957. [47] L. Meier, R. Larson, and A. Tether, “Dynamic programming for stochastic control of discrete systems,” IEEE Transactions on Automatic Control, vol. 16, no. 6, pp. 767–775, Dec 1971. 67 [48] G. B. Folland, Real Analysis: Modern Techniques and their Applications, John Wiley & Sons, 2nd edition, 1999. [49] R. E. Strauch, “Negative dynamic programming,” The Annals of Mathematical Statistics, vol. 37, no. 4, pp. 871–890, 1966. 68
10math.ST
ChatPainter: Improving Text to Image Generation using Dialogue Shikhar Sharma 1 Dendi Suhubdy 2 3 Vincent Michalski 2 3 1 Samira Ebrahimi Kahou 1 Yoshua Bengio 2 3 arXiv:1802.08216v1 [cs.CV] 22 Feb 2018 Abstract Synthesizing realistic images from text descriptions on a dataset like Microsoft Common Objects in Context (MS COCO), where each image can contain several objects, is a challenging task. Prior work has used text captions to generate images. However, captions might not be informative enough to capture the entire image and insufficient for the model to be able to understand which objects in the images correspond to which words in the captions. We show that adding a dialogue that further describes the scene leads to significant improvement in the inception score and in the quality of generated images on the MS COCO dataset. 1. Introduction Automatic generation of realistic images from text descriptions has numerous potential applications, for instance in image editing, in video games, or for accessibility. Spurred by the recent successes of Variational Autoencoders (VAEs) (Kingma & Welling, 2014) and Generative Adversial Networks (GANs) (Goodfellow et al., 2014; Denton et al., 2015; Radford et al., 2016), there has been a lot of recent work and interest in the research community on image generation from text captions (Mansimov et al., 2016; Reed et al., 2016a; Zhang et al., 2017; Xu et al., 2017). realistic images on datasets of birds, flowers, room interiors, faces etc., but don’t do very well on datasets like MS COCO (Lin et al., 2014) which contain several objects within a single image and where subjects are not always centred in the image. A caption for an image of a flower can usually describe most of the relevant details of the flower (see Figure 1). However, for the MS COCO dataset a caption might not contain all the relevant details about the foreground and the background. As can be seen from Figure 2, it is possible for two very similar MS COCO captions to correspond to very different images. Due to this complexity, a caption can be considered a noisy descriptor and due to the limited amount of image-caption paired data, the model might not always be able to understand which objects in the image correspond to which words in the caption. Previous work in the literature has found that conditioning on auxiliary data such as category labels (Mirza & Osindero, 2014), or object location and scale (Reed et al., 2016b) helps in improving the quality of generated images and in making them more interpretable. (a) A flock of birds flying in a blue sky. This flower has overlapping pink pointed petals surrounding a ring of short yellow filaments Figure 1. Caption and corresponding generated image from the StackGAN model (Zhang et al., 2017). Image reproduced with permission from authors. Current state-of-the-art models are capable of generating 1 Microsoft Research, Montréal, Canada 2 Université de Montréal, Montréal, Canada 3 Montreal Institute for Learning Algorithms, Montréal, Canada. Correspondence to: Shikhar Sharma <[email protected]>. (b) A flock of birds flying in an overcast sky Figure 2. Two very different looking images can have similar captions in the COCO dataset and the captions also might not describe the image fully. Sketch artists typically have a back and forth conversation with witnesses when they have to draw a person’s sketch, where the artist asks for more details and draws the sketch while the witnesses provide requested details and feedback on the current state of the sketch. We hypothesize that conditioning on a similar conversation about a scene in addition to a caption would significantly improve the generated image’s quality and we explore this idea in this paper. For this, we pair captions provided with the MS COCO dataset with dialogues from the Visual Dialog dataset (VisDial) (Das et al., ChatPainter: Improving Text to Image Generation using Dialogue 2017). These dialogues were collected using a chat interface pairing two workers on Amazon Mechanical Turk (AMT). One of them was assigned the role of an ‘answerer’, who could see an MS COCO image together with its caption and had to answer questions about that image. The other was assigned the role of the ‘questioner’ and could see only the image’s caption. The questioner had to ask questions to be able to imagine the scene more clearly. Similar to a dialogue between a sketch artist who gradually refines an image and a witness describing a person, the VisDial dialogue turns iteratively add fine-grained details to a (mental) image. In this paper, • We use VisDial dialogues along with MS COCO captions to generate images. We show that this results in the generation of better quality images. • We provide results indicating that our model obtains a higher inception score than the baseline StackGAN model which uses only captions. Though we just demonstrate improvements over the StackGAN (Zhang et al., 2017) model in this paper, this additional dialogue module can be added to any caption-to-imagegeneration model and is an orthogonal contribution. 2. Related Work In the past, variationally trained models have often been used for image generation. A significant drawback of these models has been that they tend to generate blurry images. Among latent variable based variationally trained models, Kingma et al. (2016) proposed inverse autoregressive flows, where they inverted the sequential data generation of an autoregressive model, which helped in parallelizing computation. They presented results on MNIST (LeCun et al., 1998) and CIFAR-10 (Krizhevsky, 2009) datasets. Recently, Cai et al. (2017) added residual blocks (He et al., 2016) and skip connections to their decoder and generated images in multiple stages. The initial components produce a coarse image and the final components refine the previously generated image. Their deep residual VAE was able to generate sharper images on MNIST and CelebA (Liu et al., 2015) compared to previous VAEs. Among tractable likelihood models, Van Den Oord et al. (2016) proposed the PixelRNN model which predicts pixels of an image sequentially along the rows or along the diagonal using fast two-dimensional recurrent layers. They achieved significantly improved log-likelihood scores on the MNIST, CIFAR-10 and ImageNet (Deng et al., 2009) datasets. Makhzani et al. (2016) proposed an adversarial autoencoder model where they use GANs to perform variational inference and achieve competitive performance on both generative and semi-supervised classification tasks. GANs have received attention recently because they produce sharper images (Goodfellow et al., 2014; Denton et al., 2015; Radford et al., 2016) compared to other generative models. They however suffer from several issues such as ‘mode collapse’ (i.e. the generator learns to generate samples from only a few modes of the distribution), lack of variation among generated images, and instabilities in the training procedure. Training GANs has generally required careful design of the model architecture and a balance between optimization of the generator and the discriminator. Arjovsky et al. (2017) proposed minimizing an approximation of the Earth Mover (Wasserstein) distance between the real and generated distributions. Their model, Wasserstein GAN (WGAN), is much more stable than previous approaches and reduces most of the aforementioned issues affecting GANs. Additionally, the reduction of the critic’s (the discriminator is called the ‘critic’ in this work) loss correlates with better sample quality which is a desirable property. Gulrajani et al. (2017) further improved upon these issues by removing weight clipping from the WGAN and instead adding a gradient penalty (WGAN-GP) for the gradient of the critic. Recently, Karras et al. (2018) have produced high-quality high resolution images (1024 × 1024) by progressively growing both the generator and the discriminator layer-by-layer and by using the WGAN-GP loss. Apart from faster training time, they found that by adding layers progressively, training stability is improved significantly. Among recent efforts to stabilize the training of GANs via noise-induced regularization, Roth et al. (2017) reduced several failure modes of GANs by penalizing a weighted gradient-norm of the discriminator. They observed stability improvements and better generalization performance. Miyato et al. (2018) proposed a spectral weight normalization technique for GANs in which they control the Lipschitz constant of the discriminator function resulting in global regularization of the discriminator. Gradient analysis of the spectrally normalized weights shows that their technique prevents layers from becoming sensitive in a single direction. This approach yields more complexity and variation in generated samples compared to previous weight normalization methods. Apart from generating images directly from noise with GANs, there has been recent work on conditioning the generator or discriminator or both on additional information. Mirza & Osindero (2014) introduced the idea of conditioning both the generator and discriminator on extra information such as class labels. They ran experiments on both unimodal image data and multi-modal image-metadata-annotations data. Their experiments resulted in better Parzen window-based log-likelihood estimates for MNIST compared to unconditioned GANs. On the MIR Flickr 25 000 dataset (Huiskes & Lew, 2008), they generated metadata tags conditioned on images. Odena et al. (2017) ChatPainter: Improving Text to Image Generation using Dialogue Caption Dialogue Caption Encoder ϕt Conditioning Augmentation [ĉ0 ] Md xMd ĉ0 Upsample Dialogue Encoder ζd 64 x 64 Image Downsample σ Real / Fake Downsample σ Real / Fake Downsample z (a) Stage-I model Conditioning Augmentation ĉ [ĉ]Md xMd [ĉ]Mg xMg ϕt ζd Stage-I 64 x 64 Image Residual Blocks Upsample 256 x 256 Image Downsample Downsample (b) Stage-II model Figure 3. ChatPainter: (a) Stage-I of the model generates a 64 × 64 image conditioned on a caption and the corresponding dialogue. (b) Stage-II of the model generates a 256 × 256 image conditioned on Stage-I’s 64 × 64 generated image and the caption and corresponding dialogue. conditioned their generator on both noise and class labels and their discriminator additionally classified images into classes. By explicitly making the generator and discriminator aware of class labels, they were able to generate better quality images on larger multi-class datasets and higher image variability compared to previous work. Their experiments also indicated that generating higher resolution images yielded higher discriminability. A lot of work has been done in recent years to generate MS COCO images from captions. Mansimov et al. (2016) used a conditional DRAW (Gregor et al., 2015) model with soft attention over the words of the caption to generate images on the MS COCO dataset and then sharpened them with an adversarial network. However, their generated images were low resolution (32 × 32) and generated blob-like objects in most cases. Building upon other work in GANs, Nguyen et al. (2017) introduced a prior on the latent code used by their generator. They ran an optimization procedure to find the latent code which the generator takes as its input. This procedure maximized the activations of an image captioning network run over the generated image. This method produced high-quality and diverse images at high resolution (227 × 227). Reed et al. (2016a) trained a Deep Convolutional Generative Adversarial Network (DCGAN) with the generator and discriminator both conditioned on features from a character-level convolutional Recurrent Neural Network (RNN) encoder over the captions to generate visually-plausible 64 × 64 images. Dash et al. (2017) additionally trained their discriminator to classify images similar to Odena et al. (2017) and generated 128 × 128 images. Zhang et al. (2017) also conditioned their generator and discriminator on caption encodings but their StackGAN model generates images in multiple stages – stage-I gener- ates a coarse low resolution (64 × 64) image and stage-II generates the final high resolution (256 × 256) image. This stacking of models resulted in generation of highly photorealistic images, at higher resolutions compared to previous work, on datasets of flowers (Nilsback & Zisserman, 2008) and birds (Wah et al., 2011) and many good looking images on the MS COCO dataset as well. However, they did not train their two stages in an end-to-end fashion. Stage-I was trained to completion first and then Stage-II was trained. Very recently, Xu et al. (2017) increased the number of stages, trained them in an end-to-end fashion, added an attention mechanism over the captions, as well as added a novel attentional multimodal similarity model to guide the training loss, which resulted in significantly increased performance and the state-of-the-art inception score (Salimans et al., 2016) of 25.89 on the MS COCO dataset. Hong et al. (2018) first generated a semantic layout map of the objects in the image and then conditioned on the map and the caption to generate semantically meaningful 128 × 128 images. 3. Data In our experiments, we used images and their captions from the MS COCO (Lin et al., 2014) dataset. MS COCO covers 91 categories of objects, grouped into 11 super-categories of objects such as person and accessory, animal, vehicle, etc. We use the ‘2014 Train’ set as our training set and the ‘2014 Val’ set as our test set. The train set consists of ∼ 80K images and includes five captions for each image. The test set consists of ∼ 40K images along with their captions. We obtain dialogues for these images from the VisDial (Das et al., 2017) dataset. VisDial consists of 10 question-answer ChatPainter: Improving Text to Image Generation using Dialogue Table 1. An example of the input data, the corresponding dataset image, and the image generated by our best ChatPainter model. Input Caption: adult woman with yellow surfboard standing in water. Q: is the woman standing on the board? A: no she is beside it. Q: how much of her is in the water? A: up to her midsection. Q: what color is the board? A: yellow. Q: is she wearing sunglasses? A: no. Q: what about a wetsuit? A: no she has on a bikini top. Q: what color is the top? A: orange and white. Q: can you see any other surfers? A: no. Q: is it sunny? A: the sky isn’t visible but it appears to be a nice day. Q: can you see any palm trees? A: no. Q: what about mountains? A: no. conversation turns per dialogue and has one dialogue for each of the MS COCO images. VisDial was collected by pairing two crowd-workers and having them talk about an image as described in Section 1. Hence, we have ∼ 80K dialogues for the training set and ∼ 40K for the test set. Dataset image where DKL is the Kullback-Leibler divergence. In the CA module, a fully connected layer is applied over the input that generates µ and σ which are both Ng dimensional. The module samples  from N (0, I). Finally, the conditioning variables ĉ are computed as ĉ = µ + σ 4. Model We build upon the StackGAN model introduced by Zhang et al. (2017). StackGAN generates an image in two stages where Stage-I generates a coarse 64 × 64 image and StageII generates a refined 256 × 256 image. We try to use the same notation everywhere as used in the original StackGAN paper. Our model ChatPainter’s architecture is shown in Figure 3 and described below. We generate caption embedding ϕt by encoding the captions with a pre-trained encoder1 (Reed et al., 2016a). We generate dialogue embeddings ζd by two methods: • Non-recurrent encoder We collapse the entire dialogue into a single string and encode it with a pretrained Skip-Thought (Kiros et al., 2015) encoder 2 . • Recurrent encoder We generate Skip-Thought vectors for each turn of the dialogue and then encode them with a bidirectional LSTM-RNN (Graves & Schmidhuber, 2005; Hochreiter & Schmidhuber, 1997). We then concatenate the caption and dialogue embeddings and this is passed as input to the Conditioning Augmentation (CA) module. The CA module was introduced by Zhang et al. (2017) to produce latent variable inputs for the generator from the embeddings. They also proposed a regularization term to encourage smoothness over the conditioning manifold which we adapt for our additional dialogue embeddings: DKL (N (µ(ϕt , ζd ), diag(σ(ϕt , ζd )))||N (0, I)), 1 2 https://github.com/reedscot/icml2016 https://github.com/ryankiros/skip-thoughts (1) Generated image , (2) where is the element-wise multiplication operator. Thus, the conditioning variables ĉ are effectively samples from N (µ(ϕt , ζd ), diag(σ(ϕt , ζd ))). 4.1. Stage-I The conditioning variables for Stage-I, ĉ0 , are concatenated with Nz -dimensional noise, z, drawn from a random normal distribution, pz . The Stage-I generator upsamples this input representation to a W0 × H0 image. This Stage-I image is expected to be blurry and a rough version of the final one. The discriminator downsamples this image to Md × Md × Ndi . ĉ0 is then spatially replicated to Md × Md × Nd and concatenated with the downsampled representation. This is further downsampled to a scalar value between 0 and 1. The model is trained by alternating between maximizing LD0 and minimizing LG0 : LD0 = E(I0 ,t,d)∼pdata [log D0 (I0 , ϕt , ζd )]+ Ez∼pz ,(t,d)∼pdata [log(1 − D0 (G0 (z, ĉ0 ), ϕt , ζd ))], (3) LG0 = Ez∼pz ,(t,d)∼pdata [log(1 − D0 (G0 (z, ĉ0 ), ϕt , ζd ))] + λDKL (N (µ(ϕt , ζd ), diag(σ(ϕt , ζd )))||N (0, I)), (4) where I0 is the real image, t is the text caption, d is the dialogue, pdata is the true data distribution, λ is the regularization coefficient, G0 is the Stage-I generator, and D0 is the Stage-I discriminator. In our experiments, Nz = 100, W0 = 64, H0 = 64, Md = 4, Ndi = 512, Nd = 128, and λ = 2 – same as that in the StackGAN model. ChatPainter: Improving Text to Image Generation using Dialogue Figure 4. Example 256 × 256 images generated by our non-recurrent encoder ChatPainter model on the MS COCO test set. Best viewed in color. Images are cherry-picked from a larger random sample. Figure 5. Example 256 × 256 images generated by our recurrent encoder ChatPainter model on the MS COCO test set. Best viewed in color. Images are cherry-picked from a larger random sample. 4.2. Stage-II The Stage-II generator, G, first downsamples generated stage-I images to Mg × Mg × Ngi . The conditioning variables for Stage-II, ĉ, are generated and then spatially replicated to Mg × Mg × Ng and finally concatenated to the downsampled image representation. For Stage-II training, in case of the recurrent dialogue encoder, the RNN weights are copied from Stage-I and kept fixed. The concatenated input is passed through a series of residual blocks and is then upsampled to a W × D image. The Stage-II discriminator, D, downsamples the input image to Md × Md × Ndi . ĉ is then spatially replicated to Md ×Md ×Nd and concatenated with the downsampled representation which is further downsampled to a scalar value between 0 and 1. The Stage-II model is trained by alternating between maximizing LD ChatPainter: Improving Text to Image Generation using Dialogue Figure 6. Example 256 × 256 images generated by our recurrent encoder ChatPainter model on the MS COCO test set. Best viewed in color. Images have been selected randomly. and minimizing LG : where I is the real image, and s0 is the image generated from Stage-I. LD = E(I,t,d)∼pdata [log D(I, ϕt , ζd )]+ Es0 ∼pG0 ,(t,d)∼pdata [log(1 − D(G(s0 , ĉ), ϕt , ζd ))], (5) LG = Es0 ∼pG0 ,(t,d)∼pdata [log(1 − D(G(s0 , ĉ), ϕt , ζd ))] + λDKL (N (µ(ϕt , ζd ), diag(σ(ϕt , ζd )))||N (0, I)), (6) In our experiments, Mg = 16, Ngi = 512, Ng = 128, W = 256, D = 256, Ndi = 512, Nd = 128, and λ = 2 – same as that in the StackGAN model. The architecture of the upsample, downsample and residual blocks, as shown in Figure 3 and as mentioned above in ChatPainter: Improving Text to Image Generation using Dialogue Table 2. Inception scores for generated images on the MS COCO test set3 . Model Reed et al. (2016a) StackGAN (Zhang et al., 2017) ChatPainter (non-recurrent) ChatPainter (recurrent) Hong et al. (2018) AttnGAN (Xu et al., 2017) Inception Score 7.88 ± 0.07 8.45 ± 0.03 9.43 ± 0.04 9.74 ± 0.02 11.46 ± 0.09 25.89 ± 0.47 the model details, is kept the same as that of the original StackGAN. 4.3. Training details Similar to StackGAN, we use a matching-aware discriminator (Reed et al., 2016a), that is trained using “real” pairs consisting of a real image together with matching caption and dialogue, and “fake” pairs that consist either of a real image together with another images’s caption and dialogue or a generated image with the corresponding caption and dialogue. We train both stages for 800 epochs using the Adam optimizer (Kingma & Ba, 2015). The initial learning rate for all experiments is 0.0002. We decay the learning rate to half of its previous value after every 50 epochs. For Stage-I, we use a batch size of 384 and for Stage-II, we use a batch size of 64. In case of the recurrent dialogue encoder, the hidden dimension of the RNN is set to 1024. The implementation is based on PyTorch (Paszke et al., 2017) and we trained the models on a machine with 4 NVIDIA Tesla P40s. 5. Results Table 1 shows the corresponding caption, dialogue inputs, and the test set image for an image generated by our best ChatPainter model. We present some of the more realistic images generated by our non-recurrent encoder ChatPainter in Figure 4, and by our recurrent encoder ChatPainter in Figure 5. For fairness of comparison, we also present a random sample of the images generated by our recurrent encoder ChatPainter on the MS COCO dataset in Figure 6. As seen from these figures, the model is able to generate close-torealistic images for some of the caption and dialogue inputs though not very realistic ones for most. We report inception scores on the images generated from our models in Table 2 and compare with other recent models. For computing inception score, we use the Inception 3 The two best-performing methods were released while writing this manuscript and we will evaluate the effect of our scheme using these methods as base architecture in future work. v3 model pretrained on ImageNet available with PyTorch. We then generate images for the 40k test set and use 10 random splits of 30k images each. We report the mean and standard deviation across these splits. We see that the ChatPainter model, which is conditioned on additional dialogue information, gets higher inception score than the StackGAN model just conditioned on captions. Also, the recurrent version of ChatPainter gets higher inception score than the non-recurrent version. This is likely due to it learning better encoding of the dialogues as the Skip-Thought encoder isn’t trained with very long sentences, which is the case in the non-recurrent version where we collapse the dialogue in a single string. 6. Discussion and Future Work In this paper, apart from conditioning on image captions, we additionally conditioned the ChatPainter model on publicly available dialogue data and obtained significant improvement in inception score on the MS COCO dataset. While many of the generated 256 × 256 images look quite realistic, the StackGAN family of models (including ChatPainter) has several limitations and also exhibits some of the issues other GANs also suffer from. The StackGAN family is able to generate photo-realistic images easily on restricteddomain datasets such as those on flowers and birds but on MS COCO, it is able to generate images that exhibit strong global consistency but does not produce recognizable objects in many cases. The current training loss formulation also makes it susceptible to mode collapse. Training the model with dialogue data is also not very stable. Recent improvements in the literature such as training with the WGAN-GP loss can help mitigate these issues to some extent. Using an auxiliary loss for the discriminator by doing object recognition or caption generation from the generated image should also lead to improvements as has been observed in prior work on other image generation tasks. The non-end-to-end training also leads to longer training time and loss of information which can be improved upon by growing the model progressively layer-by-layer as done by Karras et al. (2018). An interesting research direction we wish to explore further is to generate an image at each turn of the conversation (or modify the previous time-step’s image) using dialogues as a feedback mechanism. The datasets we use in this paper neither have separate images for each turn of the dialogue nor is the dialogue dependent on multiple images. In the sketch-artist scenario discussed in Section 1, the sketch artist would make several changes to the image as the conversation progresses and the future conversation also would depend on the image at that point in the conversation, However, no such publicly available dataset exists yet to the best of our knowledge and we plan to collect such a dataset ChatPainter: Improving Text to Image Generation using Dialogue soon. The recently announced dataset CoDraw (Kim et al., 2017) contains dialogues about clip art drawings, where intermediate images are updated after every dialogue turn. At the time of publication of this work, CoDraw had not yet been publicly released and if the intermediate images for this dataset are released, that would be a useful contribution for dialogue-to-image-generation research. Image generation guided by dialogue has tremendous potential in the areas of image editing, video games, digital art, accessibility, etc., and is a promising future research direction in our opinion. Acknowledgements We would like to acknowledge Amjad Almahairi, KuanChieh Wang, and Philip Bachman for helpful discussions on GANs and Alex Marino for help with reviewing the generated images. We would also like to thank the authors of StackGAN for releasing their PyTorch code which we built upon. This research was enabled in part by support provided by WestGrid and Compute Canada. References Arjovsky, Martin, Chintala, Soumith, and Bottou, Léon. Wasserstein generative adversarial networks. In Proceedings of the 34th International Conference on Machine Learning, 2017. Cai, Lei, Gao, Hongyang, and Ji, Shuiwang. Multi-stage variational auto-encoders for coarse-to-fine image generation. CoRR, abs/1705.07202, 2017. Das, Abhishek, Kottur, Satwik, Gupta, Khushi, Singh, Avi, Yadav, Deshraj, Moura, José MF, Parikh, Devi, and Batra, Dhruv. Visual Dialog. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. Dash, Ayushman, Gamboa, John Cristian Borges, Ahmed, Sheraz, Liwicki, Marcus, and Afzal, Muhammad Zeshan. TAC-GAN - text conditioned auxiliary classifier generative adversarial network. CoRR, abs/1703.06412, 2017. Deng, J., Dong, W., Socher, R., Li, L. J., Li, Kai, and Fei-Fei, Li. Imagenet: A large-scale hierarchical image database. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2009. Denton, Emily L, Chintala, Soumith, szlam, arthur, and Fergus, Rob. Deep generative image models using a laplacian pyramid of adversarial networks. In Advances in Neural Information Processing Systems 28. 2015. Goodfellow, Ian, Pouget-Abadie, Jean, Mirza, Mehdi, Xu, Bing, Warde-Farley, David, Ozair, Sherjil, Courville, Aaron, and Bengio, Yoshua. Generative adversarial nets. In Advances in Neural Information Processing Systems 27. 2014. Graves, Alex and Schmidhuber, Jürgen. Framewise phoneme classification with bidirectional lstm and other neural network architectures. Neural Networks, 18(5-6), 2005. Gregor, Karol, Danihelka, Ivo, Graves, Alex, Rezende, Danilo, and Wierstra, Daan. Draw: A recurrent neural network for image generation. In Proceedings of the 32nd International Conference on Machine Learning, 2015. Gulrajani, Ishaan, Ahmed, Faruk, Arjovsky, Martin, Dumoulin, Vincent, and Courville, Aaron C. Improved training of wasserstein gans. In Advances in Neural Information Processing Systems 30. 2017. He, Kaiming, Zhang, Xiangyu, Ren, Shaoqing, and Sun, Jian. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016. Hochreiter, Sepp and Schmidhuber, Jürgen. Long short-term memory. Neural computation, 9(8), 1997. Hong, Seunghoon, Yang, Dingdong, Choi, Jongwook, and Lee, Honglak. Inferring semantic layout for hierarchical text-to-image synthesis. CoRR, abs/1801.05091, 2018. Huiskes, Mark J. and Lew, Michael S. The mir flickr retrieval evaluation. In MIR ’08: Proceedings of the 2008 ACM International Conference on Multimedia Information Retrieval, 2008. Karras, Tero, Aila, Timo, Laine, Samuli, and Lehtinen, Jaakko. Progressive growing of GANs for improved quality, stability, and variation. In Proceedings of the International Conference on Learning Representations, 2018. Kim, Jin-Hwa, Parikh, Devi, Batra, Dhruv, Zhang, ByoungTak, and Tian, Yuandong. Codraw: Visual dialog for collaborative drawing. CoRR, abs/1712.05558, 2017. Kingma, Diederik P and Ba, Jimmy. Adam: A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations, 2015. Kingma, Diederik P. and Welling, Max. Auto-encoding variational bayes. In Proceedings of the International Conference on Learning Representations, 2014. Kingma, Diederik P, Salimans, Tim, Jozefowicz, Rafal, Chen, Xi, Sutskever, Ilya, and Welling, Max. Improved variational inference with inverse autoregressive flow. In Advances in Neural Information Processing Systems 29. 2016. ChatPainter: Improving Text to Image Generation using Dialogue Kiros, Ryan, Zhu, Yukun, Salakhutdinov, Ruslan R, Zemel, Richard, Urtasun, Raquel, Torralba, Antonio, and Fidler, Sanja. Skip-thought vectors. In Advances in Neural Information Processing Systems 28. 2015. Krizhevsky, Alex. Learning multiple layers of features from tiny images. Master’s thesis, University of Toronto, 2009. Radford, Alec, Metz, Luke, and Chintala, Soumith. Unsupervised representation learning with deep convolutional generative adversarial networks. In Proceedings of the International Conference on Learning Representations, 2016. LeCun, Yann, Bottou, Léon, Bengio, Yoshua, and Haffner, Patrick. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11), 1998. Reed, Scott, Akata, Zeynep, Yan, Xinchen, Logeswaran, Lajanugen, Schiele, Bernt, and Lee, Honglak. Generative adversarial text to image synthesis. In Proceedings of the 33rd International Conference on Machine Learning, 2016a. Lin, Tsung-Yi, Maire, Michael, Belongie, Serge, Hays, James, Perona, Pietro, Ramanan, Deva, Dollár, Piotr, and Zitnick, C Lawrence. Microsoft coco: Common objects in context. In European Conference on Computer Vision, 2014. Reed, Scott E, Akata, Zeynep, Mohan, Santosh, Tenka, Samuel, Schiele, Bernt, and Lee, Honglak. Learning what and where to draw. In Advances in Neural Information Processing Systems 29. 2016b. Liu, Ziwei, Luo, Ping, Wang, Xiaogang, and Tang, Xiaoou. Deep learning face attributes in the wild. In The IEEE International Conference on Computer Vision, 2015. Roth, Kevin, Lucchi, Aurelien, Nowozin, Sebastian, and Hofmann, Thomas. Stabilizing training of generative adversarial networks through regularization. In Advances in Neural Information Processing Systems 30. 2017. Makhzani, Alireza, Shlens, Jonathon, Jaitly, Navdeep, and Goodfellow, Ian. Adversarial autoencoders. In International Conference on Learning Representations, 2016. Mansimov, Elman, Parisotto, Emilio, Ba, Lei Jimmy, and Salakhutdinov, Ruslan. Generating images from captions with attention. In Proceedings of the International Conference on Learning Representations, 2016. Salimans, Tim, Goodfellow, Ian, Zaremba, Wojciech, Cheung, Vicki, Radford, Alec, Chen, Xi, and Chen, Xi. Improved techniques for training gans. In Advances in Neural Information Processing Systems 29. 2016. Mirza, Mehdi and Osindero, Simon. Conditional generative adversarial nets. CoRR, abs/1411.1784, 2014. Van Den Oord, Aäron, Kalchbrenner, Nal, and Kavukcuoglu, Koray. Pixel recurrent neural networks. In Proceedings of the 33rd International Conference on Machine Learning, 2016. Miyato, Takeru, Kataoka, Toshiki, Koyama, Masanori, and Yoshida, Yuichi. Spectral normalization for generative adversarial networks. In Proceedings of the International Conference on Learning Representations, 2018. Wah, Catherine, Branson, Steve, Welinder, Peter, Perona, Pietro, and Belongie, Serge. The Caltech-UCSD Birds200-2011 Dataset. Technical Report CNS-TR-2011-001, California Institute of Technology, 2011. Nguyen, Anh, Clune, Jeff, Bengio, Yoshua, Dosovitskiy, Alexey, and Yosinski, Jason. Plug & play generative networks: Conditional iterative generation of images in latent space. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. Xu, Tao, Zhang, Pengchuan, Huang, Qiuyuan, Zhang, Han, Gan, Zhe, Huang, Xiaolei, and He, Xiaodong. Attngan: Fine-grained text to image generation with attentional generative adversarial networks. CoRR, abs/1711.10485, 2017. Nilsback, M-E. and Zisserman, A. Automated flower classification over a large number of classes. In Indian Conference on Computer Vision, Graphics and Image Processing, 2008. Zhang, Han, Xu, Tao, Li, Hongsheng, Zhang, Shaoting, Wang, Xiaogang, Huang, Xiaolei, and Metaxas, Dimitris N. Stackgan: Text to photo-realistic image synthesis with stacked generative adversarial networks. In The IEEE International Conference on Computer Vision, 2017. Odena, Augustus, Olah, Christopher, and Shlens, Jonathon. Conditional image synthesis with auxiliary classifier GANs. In Proceedings of the 34th International Conference on Machine Learning, 2017. Paszke, Adam, Gross, Sam, Chintala, Soumith, Chanan, Gregory, Yang, Edward, DeVito, Zachary, Lin, Zeming, Desmaison, Alban, Antiga, Luca, and Lerer, Adam. Automatic differentiation in pytorch. In NIPS Autodiff Workshop, 2017.
1cs.CV
A Lynden-Bell integral estimator for the tail index of right-truncated data with a random threshold Nawel Haouas, Abdelhakim Necir1, Djamel Meraghni, Brahim Brahimi Laboratory of Applied Mathematics, Mohamed Khider University, Biskra, Algeria arXiv:1611.05147v2 [math.ST] 20 Nov 2016 Abstract By means of a Lynden-Bell integral with deterministic threshold, Worms and Worms [A Lynden-Bell integral estimator for extremes of randomly truncated data. Statist. Probab. Lett. 2016; 109: 106-117] recently introduced an asymptotically normal estimator of the tail index for randomly right-truncated Pareto-type data. In this context, we consider the random threshold case to derive a Hill-type estimator and establish its consistency and asymptotic normality. A simulation study is carried out to evaluate the finite sample behavior of the proposed estimator. Keywords: Extreme value index; Heavy-tails; Lynden-Bell estimator; Random truncation. AMS 2010 Subject Classification: 60F17, 62G30, 62G32, 62P05. 1. Introduction Let (Xi , Yi ) , 1 ≤ i ≤ N be a sample of size N ≥ 1 from a couple (X, Y) of indepen- dent random variables (rv’s) defined over some probability space (Ω, A, P) , with continuous marginal distribution functions (df’s) F and G respectively. Suppose that X is truncated to the right by Y, in the sense that Xi is only observed when Xi ≤ Yi . We assume that both survival functions F := 1 − F and G := 1 − G are regularly varying at infinity with respective negative indices −1/γ1 and −1/γ2 . That is, for any x > 0, F (xz) G (xz) = x−1/γ1 and lim = x−1/γ2 . z→∞ F (z) z→∞ G (z) lim (1.1) It is well known that, in extreme value analysis, weak approximations are achieved in the second-order framework (see, e.g., de Haan and Ferreira, 2006, page 48). Thus, it seems 1 Corresponding author: [email protected] E-mail addresses: [email protected] (N. Haouas) [email protected] (D. Meraghni) [email protected] (B. Brahimi) 1 2 quite natural to suppose that F and G satisfy the second-order condition of regular variation, which we express in terms of the tail quantile functions pertaining to both df’s. That is, we assume that for x > 0, we have xτ1 − 1 UF (tx) /UF (t) − xγ1 , = xγ1 t→∞ AF (t) τ1 lim (1.2) and UG (tx) /UG (t) − xγ2 xτ2 − 1 = xγ2 , (1.3) t→∞ AG (t) τ2 where τ1 , τ2 < 0 are the second-order parameters and AF , AG are functions tending to zero lim and not changing signs near infinity with regularly varying absolute values at infinity with indices τ1 , τ2 respectively. For any df K, the function UK (t) := K ← (1 − 1/t) , t > 1, stands for the tail quantile function, with K ← (u) := inf {v : K (v) ≥ u} , 0 < u < 1, denoting the generalized inverse of K. From Lemma 3 in Hua and Joe (2011) , the second-order conditions (1.2) and (1.3) imply that there exist constants d1 , d2 > 0, such that F (x) = d1 y −1/γ1 ℓ1 (x) and G (x) = d2 y −1/γ2 ℓ2 (x) , x > 0, (1.4) where limx→∞ ℓi (x) = 1 and |1 − ℓi | is regularly varying at infinity with tail index τi γ, i = 1, 2. This ccondition is fullfilled by many commonly used models such as Burr, Fréchet, Generalized Pareto, absolute Student, log-gamma distributions, to name but a few. Also known as heavy-tailed, Pareto-type or Pareto-like distributions, these models take a prominent role in extreme value theory and have important practical applications as they are used rather systematically in certain branches of non-life insurance, as well as in finance, telecommunications, hydrology, etc... (see, e.g., Resnick, 2006). Let us now denote (Xi , Yi ) , i = 1, ..., n to be the observed data, as copies of a couple of rv’s (X, Y ) , corresponding to the truncated sample (Xi , Yi ) , i = 1, ..., N, where n = nN is a sequence of discrete rv’s which, in virtue of the weak law of large numbers, satisP fies nN /N → p := P (X ≤ Y) , as N → ∞. We denote the joint df of X and Y by H (x, Z y) := P (X ≤ x, Y ≤ y) = P (X ≤ min (x, Y) , Y ≤ y | X ≤ Y) , which is equal to y p−1 F (min (x, z)) dG (z) . The marginal distributions of the rv’s X and Y, respectively deZ x Ry −1 G (z) dF (z) and G (y) = p−1 0 F (z) dG (z) . noted by F and G, are given by F (x) = p 0 0 Since F and G are heavy-tailed, then their right endpoints are infinite and thus they are R∞ R∞ equal. Hence, from Woodroofe (1985), we may write x dF (y) /F (y) = x dF (y) /C (y) , where C (z) := P (X ≤ z ≤ Y ) . Differentiating the previous equation leads to the follow- ing crucial equation C (x) dF (x) = F (x) dF (x) , whose solution is defined by F (x) = 3  R∞ exp − x dF (z) /C (z) . This leads to Woodroofe’s nonparametric estimator (Woodroofe, 1985) of df F, given by Fn(W)  Y 1 (x) := exp − nCn (Xi ) i:X >x i  , which is derived only by replacing df’s F and C by their respective empirical counterparts n n P P Fn (x) := n−1 1 (Xi ≤ x) and Cn (x) := n−1 1 (Xi ≤ x ≤ Yi ) . There exists a more i=1 i=1 popular estimator for F, known as Lynden-Bell nonparametric maximum likelihood estimator (Lynden-Bell, 1971), defined by Fn(LB) Y  (x) := 1− i:Xi >x 1 nCn (Xi )  , which will be considered in this paper to derive a new estimator for the tail index of df F. Note that the tail of df F simultaneously depends on G and F while that of G only relies on G. By using Proposition B.1.10 in de Haan and Ferreira (2006), to the regularly varying functions F and G, we show that both F and G are regularly varying at infinity as well, with respective indices −1/γ := − (γ1 + γ2 ) / (γ1 γ2 ) and −1/γ2 . In view of the definition of γ, Gardes and Stupfler (2015) derived a consistent estimator, for the extreme value index γ1 , whose asymptotic normality is established in Benchaira et al. (2015), under the tail dependence and the second-order conditions of regular variation. Recently, by considering a Lynden-Bell integration with a deterministic threshold tn > 0, Worms and Worms (2016) proposed another asymptotically normal estimator for γ1 as follows: (LB) γb1 (tn ) := 1 (LB) nFn (tn ) n X i=1 (LB) Xi Fn (Xi ) log . 1 (Xi > tn ) Cn (Xi ) tn Likewise, Benchaira et al. (2016a) considered a Woodroofe integration (with a random threshold) to propose a new estimator for the tail index γ1 given by (W) γ1 b := 1 (W) nFn (Xn−k:n ) k (W) X Fn (Xn−i+1:n ) i=1 Cn (Xn−i+1:n ) log Xn−i+1:n , Xn−k:n where, given n = m = mN , Z1:m ≤ ... ≤ Zm:m denote the order statistics pertaining to a sample Z1 , ..., Zm , and k = kn is a (random) sequence of integers such that, given n = m, 1 < km < m, km → ∞ and km /m → 0 as N → ∞. The consistency and asymptotic (W) normality of γb1 are established in Benchaira et al. (2016a) through a weak approximation 4 to Woodroofe’s tail process √ Dn(W) (x) := (W) k Fn (Xn−k:n x) (W) Fn (Xn−k:n ) − x−1/γ1 ! , x > 0. More precisely, the authors showed that, under (1.2) and (1.3) with γ1 < γ2 , there exist  a function A0 (t) ∼ A∗F (t) := AF 1/F (UF (t)) , t → ∞, and a standard Wiener process {W (s) ; s ≥ 0} , defined on the probability space (Ω, A, P) , such that, for 0 < ǫ < 1/2−γ/γ2 and x0 > 0, (x) − Γ (x; W) − x−1/γ1 sup x(1/2−ǫ)/γ−1/γ2 D(W) n x≥x0 as N → ∞, provided that given n = m, is a Gaussian process defined by Γ (x; W) := √ xτ1 /γ1 − 1 √ kA0 (n/k) = oP (1) , γ1 τ1 (1.5) km A0 (m/km ) = O (1) , where {Γ (x; W) ; x > 0}  γ −1/γ1  1/γ x x W x−1/γ − W (1) γ1 Z 1   γ −1/γ1 x s−γ/γ2 −1 x1/γ W x−1/γ s − W (s) ds. + γ1 + γ2 0 In view of the previous weak approximation, the authors also  proved that if, given n = m, √ √ λ D km A∗F (m/km ) → λ, then k (b γ1 − γ1 ) → N , σ 2 , as N → ∞, where σ 2 := 1 − τ 1  γ 2 (1 + γ1 /γ2 ) 1 + (γ1 /γ2 )2 / (1 − γ1 /γ2 )3 . Recently, Benchaira et al. (2016b) followed this (W) approach to introduce a kernel estimator to γ1 which improves the bias of b γ1 we are interested in Worm’s estimator (LB) γb1 . In this paper, (tn ) , but with a threshold tn that is assumed to be random and equal to Xn−k:n . This makes the estimator more convenient for numerical implementation than the one with a deterministic threshold. In other words, we will deal with the following tail index estimator: (LB) γ1 b := k (LB) X Fn (Xn−i+1:n ) 1 (LB) nFn log Xn−i+1:n . Xn−k:n (Xn−k:n) i=1 Cn (Xn−i+1:n ) R∞ (LB) (LB) (LB) Note that Fn (∞) = 1 and write Fn (Xn−k:n ) = Xn−k:n dFn (y) . On the other hand, (LB) we have Cn (x) dFn (LB) (x) = Fn (x) dFn (x) (see, e.g., Strzalkowska-Kominiak and Stute, 2009), then (LB) Fn (Xn−k:n ) = Z ∞ Xn−k:n k 1 X Fn (Xn−i+1:n ) Fn (x) dFn (x) = . Cn (x) n i=1 Cn (Xn−i+1:n ) (LB) This allows us to rewrite the new estimator into (LB) γ1 b := k X i=1 a(i) n log Xn−i+1:n , Xn−k:n (LB) 5 where a(i) n k (LB) (LB) Fn (Xn−i+1:n ) X Fn (Xn−i+1:n ) / . := Cn (Xn−i+1:n ) i=1 Cn (Xn−i+1:n ) It is worth mentioning that for complete data, we have n≡N and Fn ≡Fn ≡Cn , it follows (i) (LB) that an ≡k −1 , i = 1, ..., k and consequently both b γ1 (W) and b γ1 reduce to the classical Hill (LB) estimator (Hill, 1975). The consistency and asymptotic normality of b γ1 will be achieved through a weak approximation of the corresponding tail Lynden-Bell process that we define by Dn(LB) (x) := √ (LB) k Fn (Xn−k:nx) − x−1/γ1 ! , x > 0. (Xn−k:n ) The rest of the paper is organized as follows. In Section 2, we provide our main results whose (LB) Fn (LB) γ1 proofs are postponed to Section 4. The finite sample behavior of the proposed estimator b is checked by simulation in Section 3, where a comparison with the one recently introduced by Benchaira et al. (2016a) is made as well. 2. Main results We basically have three main results. The first one, that we give in Theorem 2.1, consists in an asymptotic relation between the above mentioned estimators of the distribution tail, (W) namely Fn (LB) and Fn . This in turn is instrumental to the Gaussian approximation of (LB) the tail Lynden-Bell process Dn (x) stated in Theorem 2.2. Finally, in Theorem 2.3, we (LB) deduce the asymptotic behavior of the tail index estimator b γ1 . Theorem 2.1. Assume that both F and G satisfy the second-order conditions (1.2) and (1.3) respectively with γ1 < γ2 . Let k = kn be a random sequence of integers such that, given n = m, km → ∞ and km /m → 0, as N → ∞, then, for any x0 > 0, we have (W) 1/γ1 sup x x≥x0 Fn (LB) (Xn−k:n x) − Fn (Xn−k:nx) F (Xn−k:n)   γ1 /γ . = OP (k/n) Theorem 2.2. Assume that the assumptions of Theorem 2.1 hold and given n = m, and √ have 1+γ1 /(2γ) km /m → 0, (2.6) km A0 (m/km ) = O (1) , as N → ∞. Then, for any x0 > 0 and 0 < ǫ < 1/2 − γ/γ2 , we sup x(1/2−ǫ)/γ−1/γ2 Dn(LB) (x) − Γ (x; W) − x−1/γ1 x≥x0 xτ1 /γ1 − 1 √ kA0 (n/k) = oP (1) . γ1 τ1 6 Theorem 2.3. Assume that (1.1) holds with γ1 < γ2 and let k = kn be a random sequence (LB) P of integers such that given n = m, km → ∞ and km /m → 0, as N → ∞, then b γ1 Assume further that the assumptions of Theorem 2.2 hold, then  √kA (n/k) √  (LB) 0 k b γ1 − γ1 = − γW (1) 1 − τ1 Z 1 γ (γ2 − γ1 − γ log s) s−γ/γ2 −1 W (s) ds + oP (1) . + γ1 + γ2 0 √ If, in addition, we suppose that, given n = m, km A∗F (m/km ) → λ < ∞, then    √  (LB) λ D 2 , σ , as N → ∞. k γb1 − γ1 → N 1 − τ1 → γ1 . 3. Simulation study (LB) In this section, we illustrate the finite sample behavior of b γ1 we compare it with and, at the same time, (W) γb1 . To this end, we consider two sets of truncated and truncation −δ/γ1 −δ/γ2 data, both drawn from Burr’s model: F (x) = 1 + x1/δ , G (x) = 1 + x1/δ , x ≥ 0, where δ, γ1 , γ2 > 0. The corresponding percentage of observed data is equal to p = γ2 /(γ1 + γ2 ). We fix δ = 1/4 and choose the values 0.6 and 0.8 for γ1 and 55%, 70% and 90% for p. For each couple (γ1 , p) , we solve the equation p = γ2 /(γ1 +γ2 ) to get the pertaining γ2 -value. We vary the common size N of both samples (X1 , ..., XN ) and (Y1 , ..., YN ) , then for each size, we generate 1000 independent replicates. Our overall results are taken as the empirical means of the results obtained through all repetitions. To determine the optimal number of top statistics used in the computation of the tail index estimate values, we use the algorithm of Reiss and Thomas (2007), page 137. Our illustration and comparison are made with respect to the estimators absolute biases (abs bias) and the roots of their mean squared errors (rmse). We summarize the simulation results in Tables 3.1, 3.2 and 3.3 for γ1 = 0.6 and in Tables 3.4, 3.5 and 3.6 for γ1 = 0.8. After the inspection of all the tables, two conclusions can be drawn regardless of the situation. First, the estimation accuracy of both estimators decreases when the truncation percentage increases and this was quite expected. (LB) Second, we notice that the newly proposed estimator γb1 4. Proofs 4.1. Proof Theorem 2.1. For x ≥ x0 we have ( Z Fn(W) (Xn−k:n x) = exp − ∞ Xn−k:n x (W) and b γ1 dFn (y) Cn (y) ) . behave equally well. 7 γ1 = 0.6; p = 0.55 (LB) γb1 (W) rmse k∗ abs bias 0.2381 26 0.0443 0.0378 0.2610 36 165 0.0352 0.2359 500 274 0.0199 0.2290 1000 549 γ1 b rmse k∗ 0.2328 26 0.0358 0.2532 37 36 0.0323 0.2315 37 61 0.0185 0.2238 61 0.0074 0.1763 112 0.0068 0.1748 112 3000 1649 0.0036 0.0982 350 0.0037 0.0981 352 5000 2747 0.0007 0.1066 432 0.0007 0.1065 432 N n abs bias 100 54 0.0407 200 109 300 Table 3.1. Estimation results of Lynden-Bell based (leftt pannel) and Woodroofe based (right pannel) estimators of the shape parameter γ1 = 0.6 of Burr’s model through 1000 right-truncated samples with 45%-truncation rate. γ1 = 0.6; p = 0.7 (LB) γb1 (W) rmse k∗ abs bias 0.2451 25 0.0144 0.0095 0.1871 39 210 0.0085 0.1590 500 348 0.0074 0.1294 1000 699 γ1 b rmse k∗ 0.2428 25 0.0089 0.1866 39 61 0.0082 0.1587 61 76 0.0072 0.1293 76 0.0063 0.1014 124 0.0062 0.1014 124 3000 2096 0.0053 0.0962 246 0.0053 0.0962 246 5000 3498 0.0036 0.0984 400 0.0036 0.0984 400 N n abs bias 100 69 0.0158 200 140 300 Table 3.2. Estimation results of Lynden-Bell based (left pannel) and Woodroofe based (right pannel) estimators of the shape parameter γ1 = 0.6 of Burr’s model through 1000 right-truncated samples with 30%-truncation rate. 8 γ1 = 0.6; p = 0.9 (LB) γb1 (W) rmse k∗ abs bias 0.1779 21 0.0070 0.0066 0.1208 54 270 0.0055 0.1133 500 450 1000 γ1 b rmse k∗ 0.1778 21 0.0064 0.1208 54 88 0.0056 0.1133 88 0.0050 0.0864 125 0.0050 0.0863 125 898 0.0030 0.0614 189 0.0029 0.0614 189 3000 2702 0.0016 0.0494 398 0.0016 0.0494 398 5000 4496 0.0010 0.0112 467 0.0010 0.0112 467 N n abs bias 100 90 0.0073 200 180 300 Table 3.3. Estimation results of Lynden-Bell based (left pannel) and Woodroofe based (right pannel) estimators of the shape parameter γ1 = 0.6 of Burr’s model through 1000 right-truncated samples with 10%-truncation rate. γ1 = 0.8; p = 0.55 (LB) γb1 (W) rmse k∗ abs bias 0.3330 30 0.0636 0.0401 0.3604 33 164 0.0252 0.2563 500 276 1000 γ1 b rmse k∗ 0.3167 31 0.0347 0.3453 35 69 0.0272 0.2530 71 0.0227 0.1807 112 0.0216 0.1794 113 551 0.0148 0.1795 196 0.0142 0.1788 197 3000 1647 0.0124 0.1794 525 0.0121 0.1783 525 5000 2751 0.0075 0.1260 688 0.0074 0.1259 688 N n abs bias 100 55 0.0570 200 110 300 Table 3.4. Estimation results of Lynden-Bell based (left pannel) and Woodroofe based (right pannel) estimators of the shape parameter γ1 = 0.8 of Burr’s model through 1000 right-truncated samples with 45%-truncation rate. 9 γ1 = 0.8; p = 0.7 (LB) γb1 (W) rmse k∗ abs bias 0.3827 28 0.0195 0.0203 0.2918 59 210 0.0189 0.1857 500 348 1000 γ1 b rmse k∗ 0.3787 28 0.0194 0.2905 59 66 0.0184 0.1852 66 0.0143 0.1593 113 0.0140 0.1591 113 700 0.0049 0.1205 230 0.0049 0.1204 230 3000 2100 0.0037 0.0886 449 0.0038 0.0886 449 5000 3500 0.0031 0.0857 500 0.0031 0.0857 500 N n abs bias 100 69 0.0217 200 139 300 Table 3.5. Estimation results of Lynden-Bell based (left pannel) and Woodroofe based (right pannel) estimators of the shape parameter γ1 = 0.8 of Burr’s model through 1000 right-truncated samples with 30%-truncation rate. γ1 = 0.8; p = 0.9 (LB) γb1 (W) rmse k∗ abs bias 0.1833 38 0.0369 0.0345 0.1383 80 269 0.0173 0.1014 500 450 1000 γ1 b rmse k∗ 0.1827 38 0.0342 0.1383 80 99 0.0175 0.1013 99 0.0108 0.0927 143 0.0106 0.0926 143 899 0.0021 0.0729 260 0.0021 0.0729 260 3000 2697 0.0013 0.0591 443 0.0013 0.0591 443 5000 4500 0.0001 0.0309 997 0.0001 0.0309 997 N n abs bias 100 89 0.0380 200 179 300 Table 3.6. Estimation results of Lynden-Bell based (left pannel) and Woodroofe based (right pannel) estimators of the shape parameter γ1 = 0.8 of Burr’s model through 1000 right-truncated samples with 10%-truncation rate. 10 We show that the latter exponent is negligible in probability uniformly over x ≥ x0 . Indeed, note that both Fn (y) /F (y) and C (y) /Cn (y) are stochastically bounded from above on y < Xn:n (see, e.g., Shorack and Wellner, 1986, page 415 and Strzalkowska-Kominiak and Stute, 2009, respectively), it follows that Z ∞ Z ∞ dFn (y) dF (y) − = OP (1) . Xn−k:n x Cn (y) Xn−k:n x C (y) By a change of variables we have Z ∞  Z ∞ F (Xn−k:n) C (Xn−k:n ) F (Xn−k:n t) dF (y) . = d C (Xn−k:n) C (Xn−k:nt) F (Xn−k:n ) x Xn−k:n x C (y) (4.7) (4.8) P Recall that Xn−k:n → ∞ and that F is regularly varying at infinity with index −1/γ. On the other hand, from Assertion (i) of Lemma A.2 in Benchaira et al. (2016a) we deduce that 1/C is also regularly varying at infinity with index 1/γ2. Thus, we may apply Potters inequalities, see e.g. Proposition B.1.10 in de Haan and Ferreira (2006), to both F and 1/C to write: for all large N, any t ≥ x0 and any sufficiently small δ, ν > 0, with large probability, C (Xn−k:n ) F (Xn−k:n t) − t1/γ2 < δt1/γ2 ±ν , − t−1/γ < δt−1/γ±ν and C (X t) F (Xn−k:n) n−k:n (4.9) where t±a := max (ta , t−a ) . These two inequalities may be rewritten, into   F (Xn−k:nt) C (Xn−k:n ) = t−1/γ 1 + oP t±ν and = t1/γ2 1 + oP t±ν , C (Xn−k:n t) F (Xn−k:n ) uniformly on t ≥ x0 . This leads to Z ∞  C (Xn−k:n) F (Xn−k:nt) γ1 = − x−1/γ1 1 + oP x±ν . d C (Xn−k:n t) F (Xn−k:n ) γ x (4.10) In view of (1.4), Benchaira et al. (2016a) showed, in Lemma A1, that F (y) = (1 + o (1)) c1 y −1/γ and G (y) = (1 + o (1)) c2 y −1/γ2 as y → ∞, for some constants c1 , c2 > 0. In other words, UF (s) = (1 + o (1)) (c1 s)γ as s → ∞, and C (y) = (1 + o (1)) c2 y −1/γ2 as y → ∞. On the other hand, from Lemma A4 in Benchaira et al. (2016a), we have Xn−k:n = (1 + oP (1)) UF (n/k) , it follows that Xn−k:n = (1 + oP (1)) cγ1 (k/n)−γ . Note that 1 − γ/γ2 = γ/γ1 , hence F (Xn−k:n ) γ/γ γ/γ1 = (1 + oP (1)) c1 2 c−1 . 2 (k/n) C (Xn−k:n ) Plugging results (4.10) and (4.11) in equation (4.8) yields Z ∞  dF (y) γ/γ −1/γ1 = (k/n)γ/γ1 c1 2 c−1 1 + oP x±ν . 2 γ1 x Xn−k:n x C (y) (4.11) (4.12) 11 By combining equations (4.7) and (4.12), we obtain Z ∞  dFn (y) = OP (1) (k/n)γ/γ1 x−1/γ1 1 + oP x±ν , Xn−k:n x Cn (y) (4.13) which obviously tends to zero in probability (uniformly on x ≥ x0 ). We may now apply Taylor’s expansion et = 1 + t + O (t2 ) , as t → 0, to get ( Z ) !2 Z ∞ Z ∞ ∞ dFn (y) dFn (y) dFn (y) exp − =1− + OP , N → ∞. Xn−k:n x Cn (y) Xn−k:n x Cn (y) Xn−k:n x Cn (y) In other words, we have (W) Fn (Xn−k:n x) =  where Rn1 (x) := OP (k/n) (LB) Fn 2γ/γ1  Z ∞ Xn−k:n x dFn (y) + Rn1 (x) , N → ∞, Cn (y) (4.14) x−2/γ1 (1 + oP (x±ν )) . Next, we show that (Xn−k:n x) = Z ∞ Xn−k:n x dFn (y) + Rn2 (x) , N → ∞. Cn (y) (4.15) (LB) Observe that, by taking the logarithme then its exponential in the definition of Fn we have Fn(LB) (Xn−k:n x) = exp ( n X i=1    log 1 − ) 1 , nCn (Xi:n )   dFn (Xn−k:n y) . To get 1 (Xi:n > Xn−k:n x) log 1 − R∞ (x) , 1 nCn (Xn−k:n y) approximation (4.15) it suffices to apply successively, in the previous quantity, Taylor’s which may be rewritten into exp n x expansions et = 1 + t + O (t2 ) and log (1 − t) = −t + O (t2 ) (as t → 0) with similar arguments as above (we omit further details). Combining (4.14) and (4.15) and setting Rn (x) := Rn1 (x) − Rn2 (x) yield (W) Fn (LB) (Xn−k:n x) − Fn (Xn−k:n x) = Rn (x) , N → ∞. On the other hand, by once again using Taylor’s expansion, we write Z ∞ dF (y) e + Rn (x) , N → ∞. F (Xn−k:n ) = Xn−k:n C (y) 1−γ/γ1 From equation (4.12), we infer that F (Xn−k:n ) = c−1 2 c1 (k/n)γ/γ1 (1 + oP (1)) , which implies, in view of (4.16), that (LB) 1/γ1 Fn x   (Xn−k:n x) − Fn (Xn−k:n x) = OP (k/n)γ/γ1 x−1/γ1 ±ν . F (Xn−k:n ) (W) (4.16) 12 Observe now that, for a sufficiently small ν > 0, we have x−1/γ1 ±ν = OP (1) , uniformly on x ≥ x0 > 0, as sought. (W) 4.2. Proof Theorem 2.2. In a similar way to what is done with Dn (LB) Theorem 2.1 in Benchaira et al. (2016a), we decompose k −1/2 Dn (LB) −1/γ1 Fn Nn1 (x) := x F (Xn−k:nx) Fn (LB) Fn (Xn−k:n ) F (Xn−k:n x) Nn3 (x) := (LB) Fn (Xn−k:n ) (x) into the sum of (Xn−k:n x) − F (Xn−k:n) , F (Xn−k:n ) (LB) Nn2 (x) := − (x) , in the proof of −1/γ1 −x ! (Xn−k:n ) − F (Xn−k:n ) , F (Xn−k:n ) (LB) Fn (Xn−k:n x) − F (xXn−k:n ) , F (Xn−k:n x) and Nn4 (x) := F (Xn−k:n x) /F (Xn−k:n ) − x−1/γ1 . If we let (W) −1/γ1 Fn Mn1 (x) := x (Xn−k:n x) − F (Xn−k:n ) , F (Xn−k:n )   then, by applying Theorem 2.1, we have x1/γ1 Nn1 (x) = x1/γ1 Mn1 (x)+x−1/γ1 OP (k/n)γ/γ1 , P uniformly on x ≥ x0 . By assumption we have k 1+γ1 /(2γ) /n → 0, which is equivalent to √ P k (k/n)γ/γ1 → 0 as N → ∞, therefore √ √  x1/γ1 kNn1 (x) = x1/γ1 kMn1 (x) + oP x−1/γ1 . (W) In view of this representation we show that, both Dn (LB) (x) and Dn (4.17) (x) are (weakly) approximated, in the probability space (Ω, A, P) , by the same Gaussian process Γ (x; W) given in (1.5) . Indeed, for a sufficiently small ǫ > 0, and 0 < η < 1/2, Benchaira et al. (2016a) (see the beginning of the proof of Theorem 2.1 therein), showed that √  x1/γ1 kMn1 (x) = Φ (x) + oP x(1−η)/γ±ǫ ,     R 1 −γ/γ −1 γ γ −1/γ −1/γ 2 where Φ (x) := x W x + t W x t dt . Then by using repγ1 γ1 + γ2 0 √   resentation (4.17) , we get x1/γ1 kNn1 (x) = Φ (x) + oP x−1/γ1 + oP x(1−η)/γ±ǫ . In partic1/γ ular for x = 1, we have √ (LB) k Fn (Xn−k:n ) −1 F (Xn−k:n ) ! = √ kNn1 (1) = Φ (1) + oP (1) , (4.18) 13 (LB) leading to Fn P (Xn−k:n ) /F (Xn−k:n ) → 1, as N → ∞. By applying Potters inequalities to F (as it was done for F in (4.11)) together with the previous limit, we obtain F (Xn−k:nx) (LB) Fn (Xn−k:n ) = 1 + OP x±ǫ  x−1/γ1 . (4.19) √ By combining (4.18) and(4.19) , we get x1/γ1 kNn2 (x) = −Φ (1) + oP (x±ǫ ) . For the third term Nn3 (x) , we use similar arguments to show that √   x1/γ1 kNn3 (x) = oP x−1/γ1 ±ǫ + oP x−1/γ1 +(1−η)/γ±ǫ .   Observe that x1/γ1 −(1−η0 )/γ oP x−1/γ1 ±ǫ and x1/γ1 −(1−η0 )/γ oP x−1/γ1 +(1−η)/γ±ǫ respectively   equal oP x−(1−η0 )/γ±ǫ and oP x(η−η0 )/γ±ǫ , for γ/γ2 < η0 < η < 1/2, and that both the last two quantities are equal to oP (1) for any small ǫ > 0 and x ≥ x0 > 0. Finally, by following the same steps at the end of the proof of Theorem 2.1 in Benchaira et al. (2016a), we get √ kNn4 (x) = x−1/γ1  xτ1 /γ1 − 1 √ kA0 (n/k) + op x−1/γ1 +(1−η)/γ±ǫ . γ1 τ1 Consequently, we have   τ1 /γ1 − 1√ (LB) −1/γ1 x 1/γ1 −(1−η0 )/γ Dn (x) − Γ (x; W) − x x kA0 (n/k) = oP (1) , γ1 τ1 uniformly over x ≥ x0. Recall that 1/γ1 = 1/γ − 1/γ2 , then letting η0 := 1/2 − ξ yields 0 < ξ < 1/2 − γ/γ2 and achieves the proof. 4.3. Proof of Theorem 2.3. The proof is similar, mutatis mutandis, as that of Corollary 3.1 in Benchaira et al. (2016a). Therefore we omit the details. Concluding note On the basis of Lynden-Bell integration, we introduced a new estimator for the tail index of right-truncated heavy-tailed data by considering a random threshold. This estimator may be an alternative to that, based on Woodroofe integration, recently proposed by Benchaira et al. (2016a). Indeed, the simulation results show that there is an equivalence between the asymptotic behaviors of both estimators with respect to biases and rmse’s. However, from a theoritical point of view, the asymptotic normality of the former requires an additional condition on the sample fraction k of upper order statistics, namely (2.6) , which is stonger than the usual assumption in the context of extremes (k/n → 0) . 14 References Benchaira, S., Meraghni, D., Necir, A., 2015. On the asymptotic normality of the extreme value index for right-truncated data. Statist. Probab. Lett. 107, 378-384. Benchaira, S., Meraghni, D., Necir, A., 2016a. Tail product-limit process for truncated data with application to extreme value index estimation. Extremes 19, 219-251. Benchaira, S., Meraghni, D., Necir, A., 2016b. Kernel estimation of the tail index of a right-truncated Pareto-type distribution. Statist. Probab. Lett. 119, 186-193. Gardes, L., Stupfler, G., 2015. Estimating extreme quantiles under random truncation. TEST 24, 207-227. de Haan, L., Ferreira, A., 2006. Extreme Value Theory: An Introduction. Springer. Hill, B.M., 1975. A simple general approach to inference about the tail of a distribution. Ann. Statist. 3, 1163-1174. Hua, L., Joe, H., 2011. Second order regular variation and conditional tail expectation of multiple risks. Insurance Math. Econom. 49, 537-546. Lynden-Bell, D., 1971. A method of allowing for known observational selection in small samples applied to 3CR quasars. Monthly Notices Roy. Astronom. Soc. 155, 95-118. Reiss, R.D., Thomas, M., 2007. Statistical Analysis of Extreme Values with Applications to Insurance, Finance, Hydrology and Other Fields, 3rd ed. Birkhäuser. Resnick, S., 2006. Heavy-Tail Phenomena: Probabilistic and Statistical Modeling. Springer. Shorack, G.R., Wellner, J. A., 1986. Empirical processes with applications to statistics. New York: John Wiley & Sons. Strzalkowska-Kominiak, E., Stute, W., 2009. Martingale representations of the Lynden-Bell estimator with applications. Statist. Probab. Lett. 79, 814-820. Woodroofe, M., 1985. Estimating a distribution function with truncated data. Ann. Statist. 13, 163-177. Worms, J., Worms, R., 2016. A Lynden-Bell integral estimator for extremes of randomly truncated data. Statist. Probab. Lett. 109, 106-117.
10math.ST
Density estimation for β-dependent sequences Jérôme Dedeckera and Florence Merlevèdeb a arXiv:1605.05055v1 [math.ST] 17 May 2016 Université Paris Descartes, Sorbonne Paris Cité, Laboratoire MAP5 (UMR 8145). Email: [email protected] b Université Paris-Est, LAMA (UMR 8050), UPEM, CNRS, UPEC. Email: [email protected] Abstract We study the Lp -integrated risk of some classical estimators of the density, when the observations are drawn from a strictly stationary sequence. The results apply to a large class of sequences, which can be non-mixing in the sense of Rosenblatt and long-range dependent. The main probabilistic tool is a new Rosenthal-type inequality for partial sums of BV functions of the variables. As an application, we give the rates of convergence of regular Histograms, when estimating the invariant density of a class of expanding maps of the unit interval with a neutral fixed point at zero. These Histograms are plotted in the section devoted to the simulations. Key words: density estimation, stationary processes, long-range dependence, expanding maps. Mathematics Subject Classification (2010): Primary 62G07; Secondary 60G10. 1 Introduction In this paper, we have four goals: 1. We wish to extend some of the results of Viennet [16] for stationary β-mixing sequences to the much larger class of β-dependent sequences, as introduced in [7], [8]. Viennet proved that, if the β-mixing coefficients β(n) of a stationary sequence (Yi )i∈Z are such that ∞ X k p−2 β(k) < ∞ , for some p ≥ 2, (1.1) k=0 then the Lp -integrated risk of the usual estimators of the density of Yi behaves as in the independent and identically distributed (iid) case (as described in the paper by Bretagnolle and Huber [4]). For Kernel estimators, we shall obtain a complete extension of Viennet’s result (assuming only as an extra hypothesis that the Kernel has bounded variation). For projection estimators, the situation is more delicate, because our dependency coefficients cannot always give a good upper bound for the variance of the estimator (this was already pointed out in [7]). However, for estimators based on piecewise polynomials (including Histograms), the result of Viennet can again be fully extended. 1 2. We shall consider the Lp -integrated risk for any p ∈ [1, ∞), and not only for p ≥ 2 (which was the range considered in [16]). Two main reasons for this: first the case p = 1 is of particular interest, because it gives some information on the total variation between the (possibly signed) measure with density fn (the estimated density) and the distribution of Yi . The variation distance is a true distance between measures, contrary to the Lp -distance between densities, which depends on the dominating measure. Secondly, we have in mind applications to some classes of dynamical systems (see point 4 below), for which it is known either that the density has bounded variation over [0, 1] or that it is non-decreasing on (0, 1] (and blows up as x → 0). In such cases, it turns out that the bias of our estimators is well controlled in L1 ([0, 1], dx). P 3. We want to know what happens if (1.1) is not satisfied, or if k≥0 β(k) = ∞ in the case where p ∈ [1, 2]. Such results are not given in the paper [16], although Viennet could have done it by refining some computations. For β-dependent sequences and p = 2, the situation is clear (see [7]): the rate of convergence of the estimator Pn depends on the regularity of f and of the behavior of k=0 β1,Y (k) (the coefficients β1,Y (k) will be defined in the next section, and are weaker than the corresponding β-mixing coefficients). Hence, in that case, the consistency holds as soon as β1,Y (n) tends to zero as n tends to infinity, and one can compute the rates of convergence as soon as one knows the asymptotic behavior of β1,Y (n). This is the kind of result we want to extend to any p ∈ [1, ∞). Once again, we have precise motivations for this, coming from dynamical systems that can exhibit long-range dependence (see point 4 below). 4. As already mentioned, our first motivation was to study the robustness of the usual estimators of the density, showing that they apply to a larger class of dependent processes than in [16]. But our second main objective was to be able to visualize the invariant density of the iterates of expanding maps of the unit interval. For uniformly expanding maps the invariant density has bounded variation, and one can estimate it in L1 ([0, 1], dx) at the usual rate n−1/3 by using an appropriate Histogram (see Subsection 5.1). The case of the intermittent map Tγ (as defined in (5.6) for γ ∈ (0, 1)) is even more interesting. In that case, one knows that the invariant density hγ is equivalent to the density x → (1 − γ)x−γ on (0, 1) (see the inequality (6.1)). Such a map exhibits long-range dependence as soon as γ ∈ (1/2, 1), but we can use our upper bound for the random part + bias of a regular Histogram, to compute the appropriate number of breaks of the Histogram (more precisely we give the order of the number of breaks as a function of n, up to an unknown constant). In Figure 5 of Section 6, we plot the Histograms of the invariant density hγ , when γ = 1/4 (short-range dependent case), γ = 1/2 (the boundary case), and γ = 3/4 (long-range dependent case). One word about the main probabilistic tool. As shown in [16], to control the Lp integrated risks for p > 2, the appropriate tool is a precise Rosenthal-type inequality. Such an inequality is not easy to prove in the β-mixing case, and the β-dependent case is even harder to handle because we cannot use Berbee’s coupling (see [1]) as in [16]. A major step to get a good Rosenthal bound has been made by Merlevède and Peligrad [12]: they proved a very general inequality involving only conditional expectations of the random variables with respect to the past σ-algebra, which can be applied to many situations. However, it does not fit completely to our context, and leads to small losses 2 when applied to kernel estimators (see Section 5 in [12]). In Section 2, we shall prove a taylor-made inequality, in the spirit of that of Viennet but expressed in terms of our weaker coefficients. This inequality will give the complete extension of Viennet’s results for Kernel estimators and estimators based on piecewise polynomials, when p > 2. A Rosenthal inequality for β-dependent sequences 2 From now, (Yi )i∈Z is a strictly stationary sequence of real-valued random variables. We define the β-dependence coefficients of (Yi )i∈Z as in [8]: Definition 2.1. Let P be the law of Y0 and P(Yi ,Yj ) be the law of (Yi , Yj ). Let F` = σ(Yi , i ≤ `), let PYk |F` be the conditional distribution of Yk given F` , and let P(Yi ,Yj )|F` be the conditional distribution of (Yi , Yj ) given F` . Define the functions ft = 1]−∞,t] (0) and ft = ft − P (ft ) , and the the random variables b` (k) = sup PYk |F` (ft ) − P (ft ) , t∈R     (0) (0) b` (i, j) = sup P(Yi ,Yj )|F` ft ⊗ fs(0) − P(Yi ,Yj ) ft ⊗ fs(0) . (s,t)∈R2 Define now the coefficients   β1,Y (k) = E(b0 (k)) and β2,Y (k) = max β1 (k), sup E((b0 (i, j))) . i>j≥k These coefficients are weaker than the usual β-mixing coefficients of (Yi )i∈Z . Many examples of non-mixing process for which β2,Y (k) can be computed are given in [8]. Some of these examples will be studied in Sections 5 and 6. Let us now give the main probabilistic tool of the paper. It is a Rosenthal-type inequality for partial sums of BV functions of Yi (as usual, BV means “of bounded variation”). We shall use it to control the random part of the Lp integrated risk of the estimators of the density of Yi when p > 2. The proof of this inequality is given in Subsection 8.2. Is is quite delicate, and relies on two intermediate results (see Subsection 8.1). In all the paper, we shall use the notation an  bn , which means that there exists a positive constant C not depending on n such that an ≤ Cbn , for all positive integers n. Proposition 2.1. Let (Yi )i∈Z be a strictly stationary sequence of real-valued random variables. For any p > 2 and any positive integer n, thereP exists a non-negative F0 measurable random variable A0 (n, p) satisfying E(A0 (n, p)) ≤ nk=1 k p−2 β2,Y (k) and such that: for any BV function h from R to R, letting Xi = h(Yi ) − E(h(Yi )) and Sn = P n k=1 Xk , we have  E sup |Sk |p 1≤k≤n   np/2 n−1 X !p/2 + nkdhkp−1 E (|h(Y0 )|A0 (n, p)) |Cov(X0 , Xi )| i=0 + nkdhk p−1 n X E (|h(Y0 )|) (k + 1)p−2 β2,Y (k) , (2.1) k=0 where kdhk is the total variation norm of the measure dh. 3 Remark 2.1. For p = 2, using Proposition 1 in [9], the inequality can be simplified as follows. ThereP exists a non-negative F0 -measurable random variable A0 (n, 2) satisfying E(A0 (n, 2)) ≤ nk=1 β1,Y (k) and P such that: for any BV function h from R to R, letting Xi = h(Yi ) − E(h(Yi )) and Sn = nk=1 Xk , we have   2 E sup Sk  nkdhkE (|h(Y0 )|(1 + A0 (n, 2))) . (2.2) 1≤k≤n Lp-integrated risk for Kernel estimators 3 Let (Yi )i∈Z be a stationary sequence with unknown marginal density f . In this section, we wish to build an estimator of f based on the variables Y1 , . . . , Yn . Let K be a bounded-variation function in L1 (R, λ), where λ is the Lebesgue measure. Let kdKk be the variation norm of the measure dK, and kKk1,λ be the L1 -norm of K with respect to λ. Define then n 1 X −1 Xk,n (x) , Xk,n (x) = K(hn (x − Yk )) and fn (x) = nhn k=1 where (hn )n≥1 is a sequence of positive real numbers. The following proposition gives an upper bound of the term  Z p |fn (x) − E(fn (x))| dx E (3.1) R when p > 2 and f ∈ Lp (R, λ). Proposition 3.1. Let p > 2, and assume that f belongs to Lp (R, λ). Let n n X X p−2 V1,p,Y (n) = (k + 1) β1,Y (k) and V2,p,Y (n) = (k + 1)p−2 β2,Y (k) . k=0 (3.2) k=0 The following upper bounds holds Z E |fn (x) − E(fn (x))|p dx R    (p−2) (p−1) kdKkkKk1,λ kf kp,λ (V1,p,Y (n)) nhn 1 (p−1)  p2  1 kdKkp−1 kKk1,λ V2,p,Y (n) . (3.3) p−1 (nhn ) P p−2 Remark 3.1. Note that, if nhn → ∞ as n → ∞ and ∞ β2,Y (k) < ∞, then k=0 (k + 1) it follows from Proposition 3.1 that Z  p(p−2) p p 2(p−1) p/2 p 2 2 |fn (x) − E(fn (x))| dx ≤ CkdKk kKk1,λ kf kp,λ lim sup (nhn ) E , (3.4) + n→∞ R for some positive constant C. Note that (3.4) is comparable to the upper bound obtained by Viennet [16], with two differences: firstly our condition is written in terms of the coefficients β2,Y (n) (while Viennet used the usual β-mixing coefficients), and secondly we only require that f belongs to Lp (R, λ) (while Viennet assumed that f is bounded). When p ≥ 4, an upper bound similar to (3.4) is given in [12], Proposition 33 Item (2), under the slightly stronger condition β2,Y (n) = O(n−(p−1+ε) ) for some ε > 0. 4 Remark 3.2. The first term in the upper bound of Proposition 3.1 has been obtained by assuming only that f belongs to Lp (R, λ). As will be clear from the proof, a better upper bound can be obtained by assuming that f belongs to Lq (R, λ) for q > p. For instance, if f is bounded, the first term of the upper bound can be replaced by p −1 2 kf k∞  kdKkkKk1,λ nhn  p2 X n p (k + 1) 2 −1 β1,Y (k) . k=0 This can lead toP a substantial improvement of the bound of (3.1), for instance in Pupper ∞ ∞ p−2 the cases where k=0 (k + 1) β2,Y (k) = ∞ but k=0 (k + 1)p/2−1 β1,Y (k) < ∞. We now give an upper bound of the same quantity when 1 ≤ p ≤ 2. Note that the case p = 1 is of special interest, since it enables to get the rate of convergence to the unknow probability µ (with density f ) for the total variation distance. P Proposition 3.2. As in (3.2), let V1,2,Y (n) = nk=0 β1,Y (k). The following upper bounds hold Z  1 2 kdKkkKk1,λ V1,2,Y (n) . 1. For p = 2, E |fn (x) − E(fn (x))| dx  nhn R P 1 2. Let 1 ≤ p < 2 and α > 1, q > 1. Let also U1,q,Y (n) = nk=0 (k + 1) q−1 β1,Y (k). If Z Z αq(2−p) α(2−p) p Mαq,p (f ) := |x| f (x)dx < ∞ and Mα,p (K) := |x| p |K(x)|dx < ∞ , then Z E 1 q  q−1 q ! p2 kdKkkKk1,λ (Mαq,p (f )) (U1,q,Y (n)) nhn     p2 α(2−p) p Mα,p (K) V1,2,Y (n)   kdKk kKk1,λ + hn   . +  nhn |fn (x) − E(fn (x))|p dx R  Remark 3.3. Note first that Item 1 of Proposition 3.2 is due to Dedecker and Prieur [7]. For It follows from Item 2 that if E(|Y0 |αq(2−p)/p ) < ∞ for α > 1, q > 1 Pp∞ ∈ [1, 2), 1/(q−1) and if k=0 (k + 1) β1,Y (k) < ∞, then Z    p p p p p 2 lim sup(nhn ) 2 E |fn (x) − E(fn (x))| dx ≤ CkdKk 2 kKk1,λ 1 + (Mαq,p (f )) 2q n→∞ R for some positive constant C, provided nhn → ∞ and hn → 0 as n → ∞. As will be clear from P∞ the proof, this upper bound remains true when q = ∞, that is when kY0 k∞ < ∞ and k=0 β1,Y (k) < ∞. With these two propositions, one can get the rates of convergence of fn to f , when f belongs to the generalized Lipschitz spaces Lip∗ (s, Lp (R, λ)) with s > 0, as defined in [10], Chapter 2, Paragraph 9. Recall that Lip∗ (s, Lp (R, λ)) is a particular case of Besov spaces (precisely Lip∗ (s, Lp (R, λ)) = Bs,p,∞ (R)). Moreover, if s is a positive integer, Lip∗ (s, Lp (R, λ)) contains the Sobolev space W s (Lp (R, λ)) if p > 1 and W s−1 (BV ) if 5 p = 1 (see again [10], Chapter 2, paragraph 9). Recall that, if s is a positive integer the space W s (Lp (R, λ)) (resp. W s (BV )) is the space of functions for which f (s−1) is absolutely continuous, with almost everywhere derivative f (s) belonging to Lp (R, λ) (resp. f (s) has bounded variation). Let Kh (·) = h−1 K(·/h), and r be a positive integer, and assume that, for any g in r W (Lp (R, λ)), Z |g(x) − g ∗ Kh (x)|p dx ≤ C1 hpr kg (r) kpp,λ , (3.5) R for some constant C1 depending only on r. For instance, (3.5) is satisfied for any Parzen kernel of order r (see Section 4 in [4]). From (3.5) and Theorem 5.2 in [10], we infer that, for any g ∈ Lp (R, λ), Z |g(x) − g ∗ Kh (x)|p dx ≤ C2 (ωr (g, h)p )p , R for some constant C2 depending only on r, where ωr (g, ·)p is the r-th modulus of regularity of g in Lp (R, λ) as defined in [10], Chapter 2, Paragraph 7. This last inequality implies that, if g belongs to Lip∗ (s, Lp (R, λ)) for any s ∈ [r − 1, r), then Z |g(x) − g ∗ Kh (x)|p dx ≤ C2 hps kgkpLip∗ (s,Lp (R,λ)) . (3.6) R Combining Proposition 3.1 or 3.2 with the control of the bias given in (3.6), we obtain the following upper bounds for the Lp -integrated risk of the kernel estimator. Let K be a bounded variation function in L1 (R, λ), and assume that K satisfies (3.5) for some positive integer r. P • Let p ≥ 2 and assume that nk=0 (k + 1)p−2 β2,Y (k) = O(nδ(p−1) ) for some δ ∈ [0, 1). Assume that f belongs to Lip∗ (s, Lp (R, λ)) for s ∈ [r − 1, r) or to W s (Lp (R, λ)) for s = r. Then, taking hn = Cn−(1−δ)/(2s+1) ,  Z  −ps(1−δ)  p . |fn (x) − f (x)| dx = O n 2s+1 E R P∞ Hence, if k=0 (k + 1)p−2 β2,Y (k) < ∞ (case δ = 0), we obtain the same rate as in the iid situation. This result generalizes the result of Viennet [16], who obtained the P (k + 1)p−2 β(k) < ∞, where the β(k)’s are the same rates under the condition ∞ k=0 usual β-mixing coefficients. • Let 1 ≤ p < 2. Assume Pthat Y0 has a moment of order q(p − 2)/p + ε for some q > 1 and ε > 0, and that nk=0 (k + 1)1/(q−1) β1,Y (k) = O(nδq/(q−1) ) for some δ ∈ [0, 1). Assume that f belongs to Lip∗ (s, Lp (R, λ)) for s ∈ [r − 1, r) or to W s (Lp (R, λ)) for s = r. Then, taking hn = Cn−(1−δ)/(2s+1) , Z   −ps(1−δ)  p E |fn (x) − f (x)| dx = O n 2s+1 . R P∞ Hence, if k=0 (k + 1)1/(q−1) β1,Y (k) < ∞ (case δ = 0), we obtain the same rate as in the iid situation. Let us consider the particular case where p = 1. Let µ be the probability measure with density f , and let µ̂n be the random (signed) measure with density fn . We have just proved that  −s(1−δ)  Ekµ̂n − µk = O n 2s+1 6 (recall that k · k is the variation norm). It is an easy exercice to modify µ̂n in order to get a random probability measure µ∗n that converges to µ at the same rate (take the positive part of fn and renormalize). 4 Lp-integrated risk for estimators based on piecewise polynomials Let (Yi )i∈Z be a stationary sequence with unknown marginal density f . In this section, we wish to estimate f on a compact interval I with the help of the variables Y1 , . . . , Yn . Without loss of generality, we shall assume here that I = [0, 1]. We shall consider the piecewise polynomial basis on a a regular partition of [0, 1], defined as follows. Let (Qi )1≤i≤r+1 be an orthonormal basis of the space of polynomials of order r on [0, 1], and define the function Ri on R by: Ri (x) = Qi (x) if x belongs to ]0, 1] and 0 otherwise. Consider now the regular partition of ]0, 1] into mn intervals √ (](j−1)/mn , j/mn ])1≤j≤mn . Define the functions ϕi,j (x) = mn Ri (mn x−(j−1)). Clearly the family (ϕi,j )1≤i≤r+1 is an orthonormal basis of the space of polynomials of order r on the interval [(j − 1)/mn , j/mn ]. Since the supports of ϕi,j and ϕk,` are disjoints for ` 6= j, the family (ϕi,j )1≤i≤r+1,1≤j≤m is then an orthonormal system of L2 ([0, 1], λ). The case of regular Histograms corresponds to r = 0. Define then n Xi,j,n = r+1 m n XX 1X Xi,j,n ϕi,j . ϕi,j (Yk ) and fn = n k=1 i=1 j=1 The following proposition gives an upper bound of  Z 1 p |fn (x) − E(fn (x))| dx E 0 when p > 2 and f 1[0,1] ∈ Lp ([0, 1], λ). Proposition 4.1. Let p > 2, and assume that f 1[0,1] belongs to Lp ([0, 1], λ). Let C1,p = r+1 X 3p 2 kRi k∞ kdRi k p 2 and C2,p = i=1 r+1 X p−1 kRi kp+1 . ∞ kdRi k i=1 and recall that V1,p,Y (n) and V2,p,Y (n) have been defined in (3.2). The following upper bounds holds   p2 (p−2) 1 (p−1) E |fn (x) − E(fn (x))| dx  C1,p kf 1[0,1] kp,λ (V1,p,Y (n)) (p−1) n 0  m p−1 n + C2,p V2,p,Y (n) . n P p−2 Remark 4.1. Note that, if n/mn → ∞ as n → ∞ and ∞ β2,Y (k) < ∞, k=0 (k + 1) then it follows from Proposition 4.1 that   p Z 1  p(p−2) n 2 2(p−1) p lim sup E |fn (x) − E(fn (x))| dx ≤ C · C1,p kf 1[0,1] kp,λ , (4.1) mn n→∞ 0 Z 1 p   m  p2 n 7 for some positive constant C. This bound is comparable to the upper bound obtained by Viennet ([16], Theorem 3.2) for the usual β-mixing coefficients. Note however that Viennet’s results is valid for a much broader class of projection estimators. As a comparison, it seems very difficult to deal with the trigonometric basis in our setting. We now give an upper bound of the same quantity when 1 ≤ p ≤ 2. Proposition 4.2. Let 1 ≤ p ≤ 2. The following upper bounds holds Z 1   m  p2 p p n p 2 C1,2 (V1,2,Y (n)) 2 . E |fn (x) − E(fn (x))| dx  n 0 Remark 4.2. Note first that the upper bounf forPp = 2 is due to Dedecker and Prieur [7]. Note also that, if n/mn → ∞ as n → ∞ and ∞ k=0 β1,Y (k) < ∞, then it follows from Proposition 4.2 that  lim sup n→∞ n mn  p2 Z 1 p |fn (x) − E(fn (x))| dx E  p 2 , ≤ C · C1,2 (4.2) 0 for some positive constant C. With these two propositions, one can get the rates of convergence of fn to f 1[0,1] when f 1[0,1] belongs to to the generalized Lipschitz spaces Lip∗ (s, Lp ([0, 1], λ)) with s > 0. Applying the Bramble-Hilbert lemma (see [3]), we know that, for any f such that f 1[0,1] belongs to W r+1 (Lp ([0, 1], λ)) Z 1 |f (x) − E(fn (x))|p dx ≤ C1 m−p(r+1) f (r) 1[0,1] n 0 p,λ , for some constant C1 depending only on r. From [10], page 359, we know that, if f 1[0,1] belongs to Lip∗ (s, Lp ([0, 1], λ)) and if the degree r is such that r > s − 1, Z 1 ∗ |f (x) − E(fn (x))|p dx ≤ C2 m−ps (4.3) n kf 1[0,1] kLip (s,Lp ([0,1],λ)) , 0 for some constant C2 depending only on r. Combining Proposition 4.1 or 4.2 with the control of the bias given in (4.3), we obtain the following upper bounds for the Lp integrated risk. P • Let p > 2 and assume that nk=0 (k + 1)p−2 β2,Y (k) = O(nδ(p−1) ) for some δ ∈ [0, 1). Assume that f 1[0,1] belongs to Lip∗ (s, Lp ([0, 1], λ)) for s < r + 1 or to W s (Lp ([0, 1])) for s = r + 1. Then, taking mn = [Cn(1−δ)/(2s+1) ], Z 1   −ps(1−δ)  p . E |fn (x) − f (x)| dx = O n 2s+1 0 P∞ Hence, if k=0 (k + 1)p−2 β2,Y (k) < ∞ (case δ = 0), we obtain the same rate as in the iid situation. This result generalizes the result of Viennet [16], who obtained the P∞ same rates under the condition k=0 (k + 1)p−2 β(k) < ∞, where the β(k)’s are the usual β-mixing coefficients. 8 P • Let 1 ≤ p ≤ 2 and assume that nk=0 β1,Y (k) = O(nδ ) for some δ ∈ [0, 1). Assume that f 1[0,1] belongs to Lip∗ (s, Lp ([0, 1], λ)) for s < r + 1 or to W s (Lp ([0, 1], λ)) for s = r + 1. Then, taking mn = [Cn(1−δ)/(2s+1) ], Z 1   −ps(1−δ)  p E |fn (x) − f (x)| dx = O n 2s+1 . 0 P∞ Hence, if k=0 β1,Y (k) < ∞ (case δ = 0), we obtain the same rate as in the iid situation. Let us consider the particular case where p = 1 and f is supported on [0, 1]. Let µ be the probability measure with density f , and let µ̂n be the random measure with density fn . We have just proved that  −s(1−δ)  Ekµ̂n − µk = O n 2s+1 (recall that k · k is the variation norm). 5 Application to density estimation of expanding maps 5.1 Uniformly expanding maps Several classes of uniformly expanding maps of the interval are considered in the literature. We recall here the definition given in [6] (see the references therein for more informations). Definition 5.1. A map T : [0, 1] → [0, 1] is uniformly expanding, mixing and with density bounded from below if it satisfies the following properties: 1. There is a (finite or countable) partition of T into subintervals In on which T is strictly monotonic, with a C 2 extension to its closure In , satisfying Adler’s condition |T 00 |/|T 0 |2 ≤ C, and with |T 0 | ≥ λ (where C > 0 and λ > 1 do not depend on In ). 2. The length of T (In ) is bounded from below. 3. In this case, T has finitely many absolutely continuous invariant measures, and each of them is mixing up to a finite cycle. We assume that T has a single absolutely continuous invariant probability measure ν, and that it is mixing. 4. Finally, we require that the density h of ν is bounded from below on its support. From this point on, we will simply refer to such maps as uniformly expanding. It is well known, that, for such classes, the density h has bounded variation. We wish to estimates h with the help of the first iterates T, T 2 , . . . , T n . Since the bias term of a density having bounded variation is well controlled in L1 ([0, 1], λ), we shall give the rates in terms of the L1 -integrated risk. We shall use an Histogram, as defined in Section 4. More precisely, our estimator hn of h is given by hn (x, y) = mn X αi,n (y)ϕi (x) , i=1 where ϕi = √ mn 1](i−1)/mn ,i/mn ] n  1X and αi,n (y) = ϕi T k (y) . n k=1 9 (5.1) As usual, the bias term is of order   Z 1 1 . |h(x) − ν(hn (x, ·))| dx = O mn 0 On another hand, one can apply Proposition 4.2 to get r  Z 1Z 1 mn |hn (x, y) − ν(hn (x, ·))|ν(dy) dx = O . n 0 0 (5.2) (5.3) Choosing mn = [Cn1/3 ] for some C > 0, it follows from (5.2) and (5.3) that Z 1Z 1  |hn (x, y) − h(x)|ν(dy) dx = O n−1/3 . 0 0 Now, if νn (y) is the probability measure with density hn (·, y), we have just proved that Z 1  kνn (y) − νk ν(dy) = O n−1/3 . 0 Let us briefly explain how to derive (5.3) from Proposition 4.2. To do this, we go back to the Markov chain associated with T , as we describe now. Let first K be the Perron-Frobenius operator of T with respect to ν, defined as follows: for any functions u, v in L2 ([0, 1], ν) ν(u · v ◦ T ) = ν(K(u) · v) . (5.4) The relation (5.4) states that K is the adjoint operator of the isometry U : u 7→ u ◦ T acting on L2 ([0, 1], ν). It is easy to see that the operator K is a transition kernel, and that ν is invariant by K. Let now (Yi )i≥0 be a stationary Markov chain with invariant measure ν and transition kernel K. It is well known that on the probability space ([0, 1], ν), the random vector (T, T 2 , . . . , T n ) is distributed as (Yn , Yn−1 , . . . , Y1 ). Hence (5.3) is equivalent to  r Z 1    mn h̃n (x) − E h̃n (x) dx = O E (5.5) n 0 where h̃n (x) = mn X n Xi,n ϕi (x) , with Xi,n i=1 1X = ϕi (Yk ) . n k=1 Now (5.5) follows easily from Proposition 4.2 ans the fact the β1,Y (n) = O(an ) for some a ∈ (0, 1) (see Section 6.3 in [8]). 5.2 Intermittent maps For γ in (0, 1), we consider the intermittent map Tγ (or simply T ) from [0, 1] to [0, 1], introduced by Liverani, Saussol and Vaienti [11]: ( x(1 + 2γ xγ ) if x ∈ [0, 1/2[ Tγ (x) = (5.6) 2x − 1 if x ∈ [1/2, 1]. It follows from [15] that there exists a unique absolutely continuous Tγ -invariant probability measure νγ (or simply ν), with density hγ (or simply h). From [15], Theorem 1, we 10 infer that the function x 7→ xγ hγ (x) is bounded from above and below. From Lemma 2.3 in [11], we know that h is non-increasing with hγ (1) > 0, and that it is Lipshitz on any interval [a, 1] with a > 0. We wish to estimate h with the help of the first iterates T, T 2 , . . . , T n . To do this, we shall use the Histogram hn defined in (5.1). Using the properties of h, it is easy to see that   Z 1 1 . (5.7) |h(x) − ν(hn (x, ·))| dx = O m1−γ n 0 On another hand, one can apply Proposition 4.2 to get  p   O m /n  n  Z 1Z 1  p  |hn (x, y) − ν(hn (x, ·))|ν(dy) dx = O mn log(n)/n  p  0 0   O mn /n(1−γ)/γ if γ < 1/2 if γ = 1/2 (5.8) if γ > 1/2 . Starting from (5.7) and (5.8), the appropriate choices of mn lead to the rates   −(1−γ)/(3−2γ)  if γ < 1/2 O n  Z 1Z 1   −1/4 |hn (x, y) − h(x)|ν(dy) dx = O (n/ log(n))  if γ = 1/2  2 0 0  O n−(1−γ) /γ(3−2γ) if γ > 1/2 . (5.9) Keeping the same notations as in Section 5.1, the bound (5.8) follows from Proposition 4.2 by noting that the coefficients β1,Y (n) of the chain (Yi )i≥0 associated with T satisfy β1,Y (n) = O(n−(1−γ)/γ ) (see [5]). 6 6.1 Simulations Functions of an AR(1) process In this subsection, we first simulate the simple AR(1) process Xn+1 = 1 (Xn + εn+1 ) , 2 where X0 is uniformly distributed over [0, 1], and (εi )i≥1 is a sequence of iid random variables with distribution B(1/2), independent of X0 . One can check that the transition Kernel of this chain is K(f )(x) = 1 (f (x) + f (x + 1)) , 2 and that the uniform distribution on [0, 1] is the unique invariant distribution by K. Hence, the chain (Xi )i≥0 is strictly stationary. It is well known that this chain is not α-mixing in the sense of Rosenblatt [14] (see for instance [2]). In fact, the kernel K is the Perron-Frobenius operator of the uniformly expanding map T0 defined in (5.6), which is another way to see that this non-irreducible chain cannot be mixing in the sense of Rosenblatt. 11 However, one can prove that the coefficients β2,X of the chain (Xi )i≥0 are such that β2,X (k) ≤ 2−k (see for instance Section 6.1 in [8]). Let now Qµ,σ2 be the inverse of the cumulative distribution function of the law N (µ, σ 2 ). Let then Yi = Qµ,σ2 (Xi ) . True density Estimated density Estimated density 0.20 0.25 True density 0.00 0.00 0.05 0.05 0.10 0.10 0.15 0.15 0.20 0.25 The sequence (Yi )i≥0 is also a stationary Markov chain (as an invertible function of a stationary Markov chain), and one can easily check that β2,Y (k) = β2,X (k). By construction, Yi is N (µ, σ 2 )-distributed, but the sequence (Yi )i≥0 is not a Gaussian process (otherwise it would be mixing in the sense of Rosenblatt). Figure 1 shows two graphs of the kernel estimator of the density of Yi , for µ = 10 and 2 σ = 2, based on the simulated sample Y1 , . . . , Yn . The kernel K is the Epanechnikov kernel (which is a Parzen kernel of order 2, thus providing theoretically a good estimation when the density belongs to the the Sobolev space of order 2). Here we do not interfer, and let the software R choose an appropriate bandwidth, to see that the default procedure delivers a correct estimation of the density, even in this non-mixing framework. 6 8 10 12 14 16 4 6 8 10 12 14 Figure 1: Estimation of the density of Yi (µ = 10 and σ 2 = 2) via the Epanechnikov kernel: n = 1000 (left) and n = 5000 (right) We continue with another example. Let Q : [0, 1] 7→ [0, 1] be the inverse of the cumulative distribution function of the density f over [0, 1] defined by: f ≡ 1/2 on [0, 1/4] ∪ [3/4, 1] and f ≡ 3/2 on (1/4, 3/4). Let then Yi = Q(Xi ) . The same reasoning as before shows that (Yi )i≥0 is a stationary Markov chain satisfying β2,Y (k) = β2,X (k). By construction, the density of the distribution of the Xi ’s is the density f . Since f belongs to the class of bounded variation functions over [0, 1], the bias of the Histogram will be well controlled in L1 ([0, 1], λ), and the computations of Section 4 show that a reasonable choice for mn is mn = [n1/3 ]. 12 Estimated density 1.0 0.5 0.0 0.0 0.5 1.0 1.5 True density Estimated density 1.5 True density 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Figure 2: Estimation of the density f by an Histogram: n = 1000 (left) and n = 5000 (right) Figure 2 shows two Histograms based on the simulated sample Y1 , . . . , Yn , with mn = [n ] and two different values of n. We shall now study this example from a numerical point of view, by giving an estimation of the L1 -integrated risk of the Histogram. To see the asymptotic behavior, we let n run from 5000 to 110000, with an increment of size 5000. The L1 -integrated risk is estimated via a classical Monte-Carlo procedure, by averaging the variation distance between the true density and the estimated density over N = 300 independent trials. The results are given in the table below: 1/3 n L1 -integ. risk 5000 0.0477 10000 0.0381 15000 0.0265 20000 0.0316 25000 0.0293 30000 0.0292 35000 0.0207 40000 0.0277 45000 0.0245 50000 0.0191 55000 0.0251 n L1 -integ. risk 60000 0.0227 65000 0.0177 70000 0.0217 75000 0.0231 80000 0.0209 85000 0.0202 90000 0.0156 95000 0.0197 100000 0.0209 105000 0.0193 110000 0.0189 Figure 3 (left) shows the value of the L1 -integrated risk as n increases. One can see that the L1 -integrated risk is smaller for some particular sizes of n. This is due to the fact that for such n, two of the breaks of the Histogram are located precisely at 1/4 and 3/4, that is at the two discontinuity points of the density. In that case the variation distance between the Histogram and the true density is particularly small, as illustrated by Figure 3 (right). But of course, we are not supposed to know where the discontinuity are located. 13 0.045 True density 0.015 0.0 0.020 0.5 0.025 0.030 1.0 0.035 0.040 1.5 Estimated density 2e+04 4e+04 6e+04 8e+04 1e+05 0.0 0.2 0.4 0.6 0.8 1.0 Figure 3: Left: Graph of the L1 -integrated risk as a function of n. The red curve is the theoretical rate for estimating BV functions : n → n−1/3 . Right: Estimation of the density f by an Histogram: n = 15000 6.2 Intermittent maps In this section, our goal is to visualize the invariant density hγ of the intermittent maps Tγ defined in (5.6). Hence, we shall consider very large n in order to get a good picture. As indicated in Subsection 5.2, we choose mn = [n1/(3−2γ) ] if γ ∈ (0, 1/2], and mn = [n(1−γ)/(γ(3−2γ)) ] if γ ∈ (1/2, 1). We shall consider three cases: γ = 1/4, γ = 1/2 and γ = 3/4. Recall that γ < 1/2 corresponds to the short-range dependent case, γ > 1/2 to the long-range dependent case, and γ = 1/2 is the boundary case (see for instance [5]). As one can see from Figure 4, due to the behavior of Tγ around zero, the process i (Tγ )i≥0 spends much more time in the neighborhood of 0 when γ = 3/4 than when γ = 1/4. We do not have an explicit expression of the invariant density hγ , but, as already mentioned in Subsection 5.2, we know the qualitative behavior of hγ in the neighborhood of 0. More precisely, one can introduce an equivalent density fγ such that fγ (x) = (1 − γ)x−γ if x ∈ (0, 1] and fγ (x) = 0 elsewhere. By equivalent, we mean that there exists two positive constants a, b, such that, on (0, 1], 0 < a ≤ hγ /fγ ≤ b < ∞ . (6.1) Figure 5 shows three Histograms based on (Tiγ )1≤i≤n for γ = 1/4, γ = 1/2, γ = 3/4, and very large values of n. Since the rates are very slow if γ is much larger than 1/2 (see (5.9)), we have chosen n = 107 for the estimation of h3/4 . In each cases, we plotted the equivalent density on the same graph, to see that the behavior of hγ around 0 is as expected. 14 1.0 0.8 1.0 0.6 0.8 0.4 0.6 0.4 0.2 0.2 0.0 0.0 0 100 200 300 400 500 0 100 200 300 400 500 Figure 4: Graphs of 500 iterations of the map Tγ for γ = 1/4 (left) and γ = 3/4 (right) 7 Proof of the results of Sections 3 and 4 7.1 Proof of Proposition 3.1 Setting Yi,n (x) = K((x − Yi )/hn ) and Xi,n (x) = Yi,n (x) − E(Yi,n (x)), we have that p!  Z Z n X dx . (7.1) |fn (x) − E(fn (x))|p dx ≤ (nhn )−p E Xi,n (x) E R R i=1 Starting from (7.1) and applying Proposition 2.1, we get Z E  Z p 2 −p/2 |fn (x) − E(fn (x))| dx  (nhn ) R n−1 X !p/2 |Cov(X0,n (x), Xi,n (x))| dx i=0 Z + n(nhn )−p kdKkp−1 E (|Y0,n (x)|A0 (n, p)) dx Z X n −p p−1 E (|Y0,n (x)|) dx + n(nhn ) kdKk (k + 1)p−2 β2,Y (k) . (7.2) k=0 Since Z |Y0,n (x)|dx ≤ hn kKk1,λ and E(A0 (n, p)) ≤ n X k p−2 β2,Y (k) , k=1 the two last terms on the right hand side of (7.2) are bounded by the second term on the right hand side of (3.3). To complete the proof, it remains to handle the first term on the right hand side of (7.2). By Item 1 of Lemma 8.1 (see Subsection 8.2) applied to Z = X0,n (x) and 15 5 Equivalent density 2.0 Estimated density 4 Equivalent density 0.0 0 1 0.5 2 1.0 3 1.5 Estimated density 0.2 0.4 0.6 0.8 0.0 1.0 0.2 0.4 0.6 0.8 1.0 10 0.0 Equivalent density 0 2 4 6 8 Estimated density 0.0 0.2 0.4 0.6 0.8 1.0 Figure 5: Topleft: Estimation of the density h1/4 , n = 60000. Topright: Estimation of the density h1/2 , n = 40000. Bottom: Estimation of the density h3/4 , n = 107 . The equivalent density is plotted in red F0 = σ(Y0 ), Z n−1 X !p/2 |Cov(X0,n (x), Xi,n (x))| dx i=0 p/2 ≤ kdKk p/2 Z Z B(y, n)|K((x − y)/hn )|f (y)dy dx , (7.3) where B(y, n) = b(y, 0) + · · · + b(y, n − 1) and b(Y0 , n) = supt∈R |PYn |Y0 (ft ) − P (ft )| (keeping the same notations as in Definition 2.1 for the conditional probabilities). By 16 Jensen’s inequality p/2 Z B(y, n)|K((x − y)/hn )|f (y)dy p/2−1 hnp/2 kKk1,λ ≤ Z B(y, n)p/2 f (y)p/2 h−1 n |K((x − y)/hn )|dy . Integrating with respect to x, we get p/2 Z Z B(y, n)|K((x − y)/hn )|f (y)dy dx ≤ p/2 hp/2 n kKk1,λ Z B(y, n)p/2 f (y)p/2 dy . Together with (7.3), this gives (nh2n )−p/2 n−1 X Z !p/2 |Cov(X0,n (x), Xi,n (x))| dx i=0 −p/2 ≤ (nhn ) kdKk p/2 p/2 kKk1,λ Z B(y, n)p/2 f (y)p/2 dy . (7.4) Applying Hölder’s inequality, Z B(y, n) p/2 f (y) p/2 dy ≤ p(p−2)/2(p−1) kf kp,λ Z p−1 B(y, n) p/2(p−1) f (y)dy . (7.5) Now Z B(y, n) p−1 1/(p−1) f (y)dy = E B(Y0 , n)p−1 where Zn (Y0 ) = 1/(p−1) = E (Zn (Y0 )B(Y0 , n)) , B(Y0 , n)p−2 (E (B(Y0 , n)p−1 ))(p−2)/(p−1) . Note that kZn (Y0 )k(p−1)/(p−2) = 1. Arguing as in [13] (applying Remark 1.6 with g 2 (x) = Zn (x) and Inequality C.5), we infer that Z p−1 B(y, n) p/2(p−1) f (y)dy  (V1,p,Y (n))p/2(p−1) . (7.6) Combining (7.4), (7.5) and (7.6), the proof of Proposition 3.1 is complete. 7.2 Proof of Proposition 3.2 We keep the same notations as in Subsection 7.1. The case p = 2 (Item 1 of Proposition 3.2) has been treated in [7]. For p ∈ [1, 2), we start from the elementary inequality Z  Z p/2 p E |fn (x) − E(fn (x))| dx ≤ E |fn (x) − E(fn (x))|2 dx . R 17 Let α > 1. Applying Hölder’s inequality, p/2 Z  Z   p α(2−p)/p 2 . E |fn (x) − E(fn (x))| dx  |x| + 1 E |fn (x) − E(fn (x))| dx R As in (7.3), we infer that Z  p E |fn (x) − E(fn (x))| dx R −p/2  (nhn ) kdKk p/2 Z α(2−p)/p |x| E +1  B(Y0 , n)h−1 n |K((x  − Y0 )/hn )| dx p/2 . (7.7) α(2−p)/p Now |x|α(2−p)/p ≤ Chn |(x−Y0 )/hn |α(2−p)/p +C|Y0 |α(2−p)/p for some positive constant C. Plugging this upper bound in (7.7) and integrating with respect to x we get Z  p E |fn (x) − E(fn (x))| dx R p/2 p/2  (nhn )−p/2 kdKkp/2 kKk1,λ E |Y0 |α(2−p)/p B(Y0 , n)  p/2 + (nhn )−p/2 kdKkp/2 hα(2−p)/p Mα,p (K) + kKk1,λ V1,2,Y (n) . (7.8) n To complete the proof, it remains to handle the first term in the right hand side of (7.8). We use once more Hölder’s inequality: for any q > 1,  (q−1)/q E |Y0 |α(2−p)/p B(Y0 , n) ≤ (Mαq,p (f ))1/q E B(Y0 , n)q/(q−1)  (Mαq,p (f ))1/q (U1,q,Y (n))(q−1)/q , (7.9) where the last upper bound is proved as in (7.6). Combining (7.8) and (7.9), the proof of Proposition 3.2 is complete. 7.3 Proof of Proposition 4.1 We shall use the following notation n νn (g) = 1X (g(Yk ) − E(g(Y0 ))) . n k=1 With this notation, we have Z 1 Z p |fn (x) − E(fn (x))| dx = 0 0 mn X r+1 1X j=1 p νn (ϕi,j )ϕi,j (x) dx i=1 ≤ (r + 1) p−1 mn X r+1 Z X j=1 i=1 1 Now, by definition of ϕi,j , Z 1 |ϕi,j (x)|p dx ≤ kRi kp∞ mp/2−1 . n 0 18  |ϕi,j (x)| dx |νn (ϕi,j )|p . (7.10) 0 p Consequently Z 1  r+1 mn X X p p E |fn (x) − E(fn (x))| dx  mp/2−1 kR k E (|νn (ϕi,j )|p ) . i ∞ n 0 i=1 (7.11) j=1 Applying Proposition 2.1, we get E (|νn (ϕi,j )|p )  n−1 X 1 np/2 !p/2 |Cov(ϕi,j (Y0 ), ϕi,j (Yk ))| k=0 + 1 np−1 + kdϕi,j kp−1 E(ϕi,j (Y0 )A0 (n, p)) n X p−1 kdϕ k E(ϕ (Y )) (k + 1)p−2 β2,Y (k) . (7.12) i,j i,j 0 p−1 n k=0 1 Since kdϕi,j k = √ mn kdRi k , mn X |ϕi,j | ≤ √ mn kRi k∞ and E(A0 (n)) ≤ j=1 n X k p−2 β2,Y (k) , k=1 (7.13) the two last terms of the right hand side can be easily bounded, and we obtain !p/2 mn mn n−1 X X 1 X p E (|νn (ϕi,j )| )  p/2 |Cov(ϕi,j (Y0 ), ϕi,j (Yk ))| n j=1 k=0 j=1 n X mn p/2 p−1 (k + 1)p−2 β2,Y (k) . (7.14) + p−1 kdRi k kRi k∞ n k=0 It remains to control the first term on the right hand side of (7.14). Applying Lemma 8.1 as in (7.3), we get !p/2 n−1 X p/2 |Cov(ϕi,j (Y0 ), ϕi,j (Yk ))| ≤ mp/4 (E (B(Y0 , n)ϕi,j (Y0 )))p/2 , (7.15) n kdRi k k=0 where B(y, n) has been defined right after (7.3). Now, by Jensen’s inequality, Z p/2−1 Z 1 p/2 (E (B(Y0 , n)ϕi,j (Y0 ))) ≤ |ϕi,j (x)|dx B(x, n)p/2 f (x)p/2 |ϕi,j (x)|dx , 0 and consequently, using the first part of (7.13), mp/4 n mn X p/2 (E (B(Y0 , n)ϕi,j (Y0 ))) ≤ kRi kp/2 ∞ mn Z 1 B(x, n)p/2 f (x)p/2 dx . (7.16) 0 j=1 From (7.14), (7.15), (7.16) and arguing as in (7.5)-(7.6), we get that mn X j=1 E (|νn (ϕi,j )|p )  mn p(p−2)/2(p−1) kdRi kp/2 kRi kp/2 (V1,p,Y (n))p/2(p−1) ∞ kf 1[0,1] kp,λ p/2 n n X mn p/2 p−1 + p−1 kdRi k kRi k∞ (k + 1)p−2 β2,Y (k) . (7.17) n k=0 Combining (7.11) and (7.17), the result follows. 19 7.4 Proof of Proposition 4.2 If p ∈ [1, 2], the following inequality holds: Z 1  p |fn (x) − E(fn (x))| dx E  Z ≤ E 0 1 2 p/2 |fn (x) − E(fn (x))| dx . (7.18) 0 To control the right hand term of (7.18), we apply (7.11) with p = 2. For p = 2, the upper bound (7.12) becomes simply n−1 2 E |νn (ϕi,j )|  1X  |Cov(ϕi,j (Y0 ), ϕi,j (Yk ))| , n k=0 and, following the computations of Subsection 7.3, we get mn X  mn kdRi kkRi k∞ V1,2,Y (n) . E |νn (ϕi,j )|2  n j=1 (7.19) The result follows from (7.18), (7.11) with p = 2, and (7.19). 8 Deviation and Rosenthal bounds for partial sums of bounded random variables Before proving Proposition 2.1 in Subsection 8.2, we shall state and prove two intermediate results in Subsection 8.1: a deviation inequality for stationary sequences of bounded random variables (see Proposition 8.1) and a Rosenthal-type inequality in the same context (see Corollary 8.1). 8.1 A deviation inequality and a Rosenthal inequality In this subsection, (Xi )i∈Z is a strictly stationary sequence of real-valued random variables such that |X0 | ≤ M almost surely and E(X0 ) = 0. We denote by Fi the σ-algebra Fi = σ(Xk , k ≤ i), and by Ei (·) the conditional expectation with respect to Fi . P Proposition 8.1. Let Sn = nk=1 Xk . For any x ≥ M , r > 2, β ∈]r − 2, r[ and any integer q ∈ [1, n] such that qM ≤ x, one has for any x ≥ M ,  P  sup |Sk | ≥ 5x 1≤k≤n nr/2  r x q−1 X !r/2 |Cov(X0 , Xi )| i=0 2q + n kX1 krr r x n+q n X X + 2 kE0 (Xk )E0 (X` )k1 x q k=q+1 `=q+1 ( ) q i−1 X n r/2−1 X r/2−2 r/2 r/2 i ikX0 E0 (Xi )kr/2 + kE0 (Xi Xi+j ) − E(Xi Xi+j )kr/2 + rq x i=1 j=0 q−1 n n r−2−β/2 X X β/2−1 r/2 + rq j kE0 (Xj Xj+` ) − E(Xj Xj+` )kr/2 . (8.1) x `=0 j=q+1 20 As a consequence we obtain the following Rosenthal-type inequality: P Corollary 8.1. Let Sn = nk=1 Xk . For any p > 2, any r ∈]2p − 2, 2p[ and any β ∈ ]r − 2, 2p − 2[, one has !p/2   n−1 X |Cov(X0 , Xi )| E sup |Sk |p  np/2 1≤k≤n i=0 + nM p−2 n X ` X (k + 1)p−3 kE0 (Xk )E0 (X` )k1 `=0 k=0 + nM p−2 n X k p−2 kE0 (Xk )k22 + nM n X p−r i=1 k=1 + nM p−r n X r/2 ip−2 kX0 E0 (Xi )kr/2 j−1 j β/2−1 j=1 X r/2 (` + 1)p−2−β/2 kE0 (Xj Xj+` ) − E(Xj Xj+` )kr/2 . (8.2) `=0 Remark 8.1. Note that the constants that are implicitely involved in Proposition 8.1 and Corollary 8.1 depend only on r and β. Proof of Proposition 8.1. Let q ∈ [1, n] be an integer such that qM ≤ x. For any integer i, define the random variables iq X Ui = Xk . k=(i−1)q+1 Consider now the σ-algebras Gi = Fiq and define the variables Ũi as follows: Ũ2i−1 = U2i−1 − E(U2i−1 |G2(i−1)−1 ) and Ũ2i = U2i − E(U2i |G2(i−1) ). The following inequality is then valid max |Sk | ≤ 2qM + 1≤k≤n max 2≤2j≤[n/q] It follows that   P max |Sk | ≥ 5x ≤ P 1≤k≤n j X Ũ2i + i=1 max 2≤2j≤[n/q] j X max 1≤2j−1≤[n/q] j X Ũ2i−1 + max 1≤j≤[n/q] i=1 ! Ũ2i ≥ x +P i=1 +P max 1≤2j−1≤[n/q] max 1≤j≤[n/q] j X j X (Ui − Ũi ) . i=1 j X ! Ũ2i−1 ≥ x i=1 ! (Ui − Ũi ) ≥ x . (8.3) i=1 Note that the two first terms on the right hand side of (8.3) can be treated similarly, so that we shall only prove an upper bound for the first one. Let us first deal with the last term on the right hand side of (8.3). By Markov’s inequality followed by Proposition 1 in [9], we have ! [n/q] j X 4 X kE(Ui |Gi−2 )k22 P max (Ui − Ũi ) ≥ x ≤ 2 1≤j≤[n/q] x i=1 i=1   [n/q]−1 [n/q] X X 8 + 2 E(Ui |Gi−2 )E  Uj |Gi−2  . x i=1 j=i+1 1 21 Therefore, by stationarity, P max 1≤j≤[n/q] j X (Ui − Ũi ) ≥ x ! i=1 [n/q] 8 X ≤ 2 x i=1 iq X [n/q] jq X X E(i−2)q (Xk )E(i−2)q (X` ) 1 k=(i−1)q+1 j=i `=(j−1)q+1 [n/q] 2q [n/q] 8 X X X ≤ 2 x i=1 k=q+1 j=i (j−i+2)q X kE0 (Xk )E0 (X` )k1 `=(j−i)q+q+1 [n/q]−1 2q i 8 X X X ≤ 2 x i=0 k=q+1 j=0 (j+2)q X kE0 (Xk )E0 (X` )k1 . `=(j+1)q+1 So, overall, P j X max 1≤j≤[n/q] ! (Ui − Ũi ) ≥ x i=1 n+q 2q 8n X X kE0 (Xk )E0 (X` )k1 . ≤ 2 qx k=q+1 `=q+1 (8.4) Now, we handle the first term on the right hand side of (8.3). Using Markov’s inequality, we obtain ! r j j X X P max Ũ2i ≥ x ≤ x−r max Ũ2i . (8.5) 2≤2j≤[n/q] 2≤2j≤[n/q] i=1 i=1 r Note that (Ũ2i )i∈Z (resp. (Ũ2i−1 )i∈Z ) is a stationary sequence of martingale differences with respect to the filtration (G2i )i∈Z (resp. (G2i−1 )i∈Z ). Applying Theorem 6 in [12], we get max 2≤2j≤[n/q] j X Ũ2i i=1 r   [n/(2q)]  X  (n/q)1/r kŨ2 kr + (n/q)1/r  k=1 1 k 1+2δ/r E0  k X !2  Ũ2i δ    i=1 1/(2δ) , (8.6) r/2 where δ = min(1, 1/(r − 2)). Since (Ũ2i )i∈Z is a stationary sequence of martingale differences with respect to the filtration (G2i )i∈Z ,  !2  k k   X X   E0 Ũ2i = E0 Ũ2i2 . i=1 i=1 Moreover, E0 (Ũ2i2 ) ≤ E0 (U2i2 ). Therefore  !2  k k X X   E0  Ũ2i  ≤ E0 U2i2 − E U2i2 i=1 r/2 i=1 r/2 + k X i=1 22  E U2i2 . By stationarity k X  E U2i2 = kkSq k22 . i=1 Moreover kŨ2 kr ≤ 2kSq kr . From (8.6) and the computations we have made, it follows that  r/(2δ) r  r/2 [n/(2q)] j X X n n 1 n δ  kSq kr2 +  max Ũ2i  kSq krr + Dk,q , 1+2δ/r 2≤2j≤[n/q] q q q k i=1 k=1 r where Dk,q = k X   E0 U2i2 − E U2i2 r/2 . i=1 Hence, max 2≤2j≤[n/q] j X r Ũ2i i=1 r !r/2 q−1 X n |Cov(X0 , Xi )|  kSq krr + nr/2 q i=0  r/(2δ) [n/(2q)] X n 1 δ  . (8.7) +  Dk,q 1+2δ/r q k k=1 Notice that Dk,q ≤ k X 2iq X kE0 (Xj Xk ) − E(Xj Xk )kr/2 i=1 j,k=(2i−1)q+1 ≤2 2iq X k X 2iq−j X kE0 (Xj Xj+` ) − E(Xj Xj+` )kr/2 . i=1 j=(2i−1)q+1 `=0 Let η = (β − 2)/r and recall that r > 2 and r − 2 < β < r. Since η < (r − 2)/r, applying Hölder’s inequality, we then get that   Dk,q  k −η+(r−2)/r  k X    q 2−4/r k −η+(r−2)/r  q−1 X iβ/2−1  i=1  r2  r2 X  kE0 (Xj Xj+` ) − E(Xj Xj+` )kr/2   2iq j=(2i−1)q+1 `=0 k X i=1 iβ/2−1 2iq q−1 X X  r2 r/2 kE0 (Xj Xj+` ) − E(Xj Xj+` )kr/2  . j=(2i−1)q+1 `=0 Since 2δ/r > −δη + δ(r − 2)/r (indeed −η + (r − 2)/r = (r − β)/r and r − β < 2), it 23 follows that  r/(2δ) [n/(2q)] X 1  Dδ  1+2δ/r k,q k k=1 q r−2 q−1 [n/(2q)] X X `=0 q i i=1 r−β/2−1 2iq X β/2−1 r/2 kE0 (Xj Xj+` ) − E(Xj Xj+` )kr/2 j=(2i−1)q+1 q−1 [n/(2q)] X X `=0 2iq X i=1 r/2 j β/2−1 kE0 (Xj Xj+` ) − E(Xj Xj+` )kr/2 . j=(2i−1)q+1 So, overall,  r/(2δ) [n/(2q)] q−1 n X X X n 1 r/2 δ  r−β/2−2 j β/2−1 kE0 (Xj Xj+` ) − E(Xj Xj+` )kr/2 . Dk,q  nq 1+2δ/r q k k=1 `=0 j=q+1 (8.8) Combining (8.3), (8.4), (8.7) and (8.8), Proposition 8.1 will be proved if we show that !r/2 q−1 X n kSq krr  nkX1 krr + nq r/2−1 |E(X0 Xi )| q i=0 ) ( q i−1 X X r/2 r/2 + nq r/2−1 ir/2−2 ikX0 E0 (Xi )kr/2 + kE0 (Xi Xi+j ) − E(Xi Xi+j )kr/2 . (8.9) i=1 j=0 By Theorem 6 in [12] again, and taking into account their Comment 7 (Item 4) together 1/2 with the fact that kE0 (Sk )kr ≤ kE0 (Sk2 )kr/2 , we have q X kSq krr  qkX1 krr + q k=1 !r/(2δ) 1 k 1+2δ/r kE0 (Sk2 )kδr/2 , where δ = min(1/2, 1/(p − 2)). Now, E(Sk2 ) ≤ 2k k−1 X |E(X0 Xi )| . i=0 Hence, since r > 2, kSq krr  qkX1 krr + q r/2 q−1 X !r/2 |E(X0 Xi )| +q i=0 q X k=1 1 k 1+2δ/r !r/(2δ) kE0 (Sk2 ) − E(Sk2 )kδr/2 . (8.10) Now kE0 (Sk2 ) − E(Sk2 )kr/2 ≤ 2 k X k−i X kE0 (Xi Xi+j ) − E(Xi Xi+j )kr/2 i=1 j=0 ≤2 k X i−1 X kE0 (Xi Xi+j ) − E(Xi Xi+j )kr/2 + 2 i=1 j=0 k X k X i=1 j=i 24 kE0 (Xi Xi+j ) − E(Xi Xi+j )kr/2 . Note that, by stationarity, kE0 (Xi Xi+j ) − E(Xi Xi+j )kr/2 ≤ 2kXi Ei (Xi+j )kr/2 = 2kX0 E0 (Xj )kr/2 . Therefore E0 (Sk2 ) − E(Sk2 ) r/2 ≤2 k X i−1 X kE0 (Xi Xi+j ) − E(Xi Xi+j )kr/2 + 4 i=1 j=0 k X jkX0 E0 (Xj )kr/2 . j=1 Applying Hölder’s inequality, k X k X jkX0 E0 (Xj )kr/2 ≤ k j=1 !2/r r/2 j r/2−1 kX0 E0 (Xj )kr/2 , j=1 and k X i−1 X kE0 (Xi Xi+j ) − E(Xi Xi+j )kr/2 i=1 j=0  ≤ k 1−2/r  k i−1 X X i=1 kE0 (Xi Xi+j ) − E(Xi Xi+j )kr/2  j=0 k X ≤ k 1−2/r !r/2 2/r ir/2−1 i−1 X i=1 !2/r kE0 (Xi Xi+j ) − r/2 E(Xi Xi+j )kr/2 j=0 k X ≤k ir/2−2 i=1 i−1 X !2/r r/2 kE0 (Xi Xi+j ) − E(Xi Xi+j )kr/2 . j=0 So, overall, q q X !r/(2δ) 1 kE0 (Sk2 ) − E(Sk2 )kδr/2 1+2δ/r k k=1 ( q ) q i−1 X X X r/2 r/2  q r/2 j r/2−1 kX0 E0 (Xj )kr/2 + ir/2−2 kE0 (Xi Xi+j ) − E(Xi Xi+j )kr/2 . j=1 i=1 j=0 Taking into account this last upper bound in (8.10), we obtain (8.9). The proof of Proposition 8.1 is complete. Proof of Corollary 8.1. Setting s2n = max n n−1 X ! |Cov(X0 , Xi )|, M 2 , (8.11) i=0 we have   Z p E sup |Sk | = p 1≤k≤n nM x p−1  P  sup |Sk | ≥ x dx 1≤k≤n 0 p Z nM/5 =5 p x p−1  sup |Sk | ≥ 5x dx P 1≤k≤n 0 p Z ≤5 p sn x 0 p−1  P   p Z nM sup |Sk | ≥ 5x dx + 5 p 1≤k≤n x sn 25 p−1  P  sup |Sk | ≥ 5x dx . (8.12) 1≤k≤n To handle the first term on the right hand side of (8.12), we first note that sn Z p x 5p p−1   M Z p sup |Sk | ≥ 5x dx ≤ 5 p P x 1≤k≤n 0 p−1  P  sup |Sk | ≥ 5x dx 1≤k≤n 0 n−1 X + 5p np/2 !p/2 |Cov(X0 , Xi )| . i=0 Now by Markov inequality followed by Proposition 1 in [9], we have M Z p 5 x p−1   sup |Sk | ≥ 5x dx P 1≤k≤n 0 ≤ 4 × 5p−2 (p − 2)−1 M p−2  n X  E(Xi2 ) + 2 i=1 n−1 X Xi E i i=1 n X Xj !   j=i+1 1 .  Hence by stationarity p M Z x 5 p−1   p−2 sup |Sk | ≥ 5x dx ≤ 8 × 5 P −1 (p − 2) M 1≤k≤n 0 p−2 n n−1 X kX0 E0 (Xj )k1 . j=0 So, overall, p sn Z x p5 p−1  P  sup |Sk | ≥ x dx 1≤k≤n 0 ≤ 8p × 5p−2 n(p − 2)−1 M p−2 n−1 X kX0 E0 (Xj )k1 + 5p np/2 j=0 n−1 X !p/2 |Cov(X0 , Xi )| . (8.13) i=0 We handle now the last term on the right hand side of (8.12). With this aim, we use Proposition 8.1 with q = [x/M ], r ∈]2p − 2, 2p[ and β ∈]r − 2, 2p − 2[. For the first term on the right hand side of Proposition 8.1, we have nr/2 Z nM xp−1−r sn q−1 X !r/2 |Cov(X0 , Xi )| dx  np/2 i=0 n−1 X !p/2 |Cov(X0 , Xi )| , (8.14) i=0 P since s2n ≥ n n−1 i=0 |Cov(X0 , Xi )| and r > p. For the second term on the right hand side of Proposition 8.1, since r > p and sn ≥ M , Z nM r nkX1 kr xp−1−r dx  nkX1 krr sp−r  nkX1 kpp M r−p sp−r  nkX1 kpp  nM p−2 kX1 k22 . n n sn (8.15) For the third term on the right hand side of Proposition 8.1, we have to give an upper bound for Z nM 2q n+q X X p−1 1 n x kE0 (Xk )E0 (X` )k1 dx . x2 q k=q+1 `=q+1 sn 26 Write 2q n+q X X 2q n X X kE0 (Xk )E0 (X` )k1 = k=q+1 `=q+1 kE0 (Xk )E0 (X` )k1 k=q+1 `=q+1 + 2q n+q X X kE0 (Xk )E0 (X` )k1 . k=q+1 `=n+1 Here, note that 2q n+q X X 2q n+q q X q X 2 kE0 (Xk )E0 (X` )k1 ≤ kE0 (Xk )k2 + kE0 (X` )k22 . 2 2 k=q+1 `=n+1 k=q+1 `=n+1 Therefore Z nM n x p−1 x p−3 sn Z 2q n+q 2q 1 X X n nM p−3 X kE0 (Xk )E0 (X` )k1 dx ≤ x kE0 (Xk )k22 dx x2 q k=q+1 `=n+1 2 sn k=q+1 Z nM n+q X n p−3 x kE0 (X` )k22 dx . + 2 sn `=n+1 Now Z 2q X nM n sn x dx = n k=q+1 X xp−3 +n sn kE0 (Xk )k22 1q>[n/2] dx k=q+1 2q nM ≤ 2n kE0 (Xk )k22 1q≤[n/2] dx 2q nM Z Z p−3 sn k=q+1 2q X nM Z kE0 (Xk )k22 x p−3 sn X kE0 (Xk )k22 1q≤[n/2] dx + n 2 Z nM xp−3 E0 (X[n/2]+1 ) sn k=q+1 2 2 dx , where we have used the fact that q ≤ n. Hence Z nM n x p−3 sn 2q X kE0 (Xk )k22 Z nM xp−3 dx ≤ 2n sn k=q+1 + n2 Z n X kE0 (Xk )k22 1x≤kM dx k=q+1 nM xp−3 E0 (X[n/2]+1 ) sn 2 2 dx n X 2n np p−2 M k p−2 kE0 (Xk )k22 + M p−2 E0 (X[n/2]+1 ) ≤ p−2 p − 2 k=1 Now [n/2]+1 n p−1 p−1 ≤2 ([n/2] + 1) p−1 p−1 ≤2 (p − 1) X k p−2 , k=1 and therefore, n p E0 (X[n/2]+1 ) 2 2 p−1 ≤2 (p − 1)n n X k=1 27 k p−2 kE0 (Xk )k22 . 2 2 . Consequently 2q X nM Z x n p−3 sn kE0 (Xk )k22 p−2 dx  nM k=q+1 n X k p−2 kE0 (Xk )k22 . k=1 On another hand, since q ≤ n, Z nM n+q X np M p−2 p−3 n x kE0 (X` )k22 dx ≤ kE0 (Xn+1 )k22 . p − 2 sn `=n+1 Proceeding as before, we get Z nM n+q n X X xp−3 kE0 (X` )k22 dx  nM p−2 k p−2 kE0 (Xk )k22 . n sn `=n+1 k=1 So, overall, Z nM 2q n+q n X X X p−1 1 p−2 x n E0 (Xk )E0 (X` ) 1 dx  nM k p−2 E0 (Xk ) 2 x q k=q+1 `=n+1 sn k=1 2 2 . We handle now the quantity Z nM 2q n X X p−1 1 x kE0 (Xk )E0 (X` )k1 dx . n x2 q k=q+1 `=q+1 sn We note first that Z nM 2q n X X p−1 1 kE0 (Xk )E0 (X` )k1 dx n x x2 q k=q+1 `=q+1 sn Z 2q X nM ≤ 2n x p−3 sn k k=q+1 −1 n X kE0 (Xk )E0 (X` )k1 dx . `=q+1 Now 2q X k −1 k=q+1 n X kE0 (Xk )E0 (X` )k1 `=q+1 = 2q X k k=q+1 k X −1 `=q+1 2q ≤ kE0 (Xk )E0 (X` )k1 + k X X 2q X k k=q+1 −1 ` kE0 (Xk )E0 (X` )k1 `=k+1 n X kE0 (Xk )E0 (X` )k1 + k=q+1 `=q+1 n X −1 `−1 X k −1 kE0 (Xk )E0 (X` )k1 . `=q+2 k=q+1 Note that Z nM n `−1 X X n xp−3 k −1 kE0 (Xk )E0 (X` )k1 dx sn `=q+2 k=q+1 ≤n ` n X X k −1 Z nM kE0 (Xk )E0 (X` )k1 xp−3 1x≤kM dx sn `=1 k=1 ` n nM p−2 X X p−3 k kE0 (Xk )E0 (X` )k1 .  p − 2 `=1 k=1 28 On the other hand Z nM x n p−3 sn 2q k X X `−1 kE0 (Xk )E0 (X` )k1 dx k=q+1 `=q+1 2q k X X nM Z x =n p−3 sn k=q+1 `=q+1 2q k X X nM Z x +n p−3 sn Z `−1 kE0 (Xk )E0 (X` )k1 1q≤[n/2] dx `−1 kE0 (Xk )E0 (X` )k1 1q>[n/2] dx k=q+1 `=q+1 nM ≤n x p−3 sn n k X X `−1 kE0 (Xk )E0 (X` )k1 1x≤`M dx k=q+1 `=q+1 Z nM x +n p−3 sn 2q k X X `−1 kE0 (Xk )E0 (X` )k1 1[n/2]<q≤n dx . k=q+1 `=q+1 Proceeding as before Z nM n x p−3 sn k n X X `−1 kE0 (Xk )E0 (X` )k1 1x≤`M dx k=q+1 `=q+1  nM p−2 n X ` X k p−3 kE0 (Xk )E0 (X` )k1 `=1 k=1 and Z nM n x p−3 sn 2q k X X `−1 kE0 (Xk )E0 (X` )k1 1[n/2]<q≤n dx k=q+1 `=q+1 p n M p−2 E0 (X[n/2]+1 ) 2 2  nM p−2 n X k p−2 kE0 (Xk )k22 . k=1 So, overall, we obtain the following upper bound Z nM x n sn p−1 2q n+q 1 X X E0 (Xk )E0 (X` ) 1 dx x2 q k=q+1 `=q+1  nM p−2 n X ` X k p−3 E0 (Xk )E0 (X` ) + nM p−2 1 `=1 k=1 n X k p−2 E0 (Xk ) 2 2 . (8.16) k=1 For the fourth term on the right hand side of Proposition 8.1, setting r/2 a(i) = ikX0 E0 (Xi )kr/2 + i−1 X r/2 kE0 (Xi Xi+j ) − E(Xi Xi+j )kr/2 , j=0 we have Z nM Z q n X X p−1−r r/2−1 r/2−2 1−r/2 r/2−2 n x q i a(i)dx ≤ nM i a(i) sn i=1 i=1 29 nM sn xp−2−r/2 1x≥iM dx . Since r > 2p − 2 and sn ≥ M , it follows that Z nM x n p−1−r r/2−1 q sn q X n X ir/2−2 a(i)dx  nM p−r i=1 ip−3 a(i) . i=1 We note also that β/2 > r/2 − 1 > p − 2. Therefore n X i p−3 i−1 X r/2 kE0 (Xi Xi+j ) − E(Xi Xi+j )kr/2 j=0 i=1 = n X i i−1 X β/2−1+p−2−β/2 r/2 kE0 (Xi Xi+j ) − E(Xi Xi+j )kr/2 j=0 i=1 ≤ n X i β/2−1 i=1 i−1 X r/2 (j + 1)p−2−β/2 kE0 (Xi Xi+j ) − E(Xi Xi+j )kr/2 , j=0 so that Z nM n x p−1−r r/2−1 q q X sn + nM p−r i i=1 n X r/2−2 a(i)dx  nM p−r n X r/2 ip−2 kX0 E0 (Xi )kr/2 i=1 iβ/2−1 i=1 i−1 X r/2 (j + 1)p−2−β/2 kE0 (Xi Xi+j ) − E(Xi Xi+j )kr/2 . (8.17) j=0 Finally, for the fifth term on the right hand side of of Proposition 8.1, Z nM x n p−1−r r−2−β/2 q sn q−1 n X X r/2 j β/2−1 kE0 (Xj Xj+` ) − E(Xj Xj+` )kr/2 dx `=0 j=q+1 ≤ nM p−1−r Z nM q p−3−β/2 q−1 n X X sn r/2 j β/2−1 kE0 (Xj Xj+` ) − E(Xj Xj+` )kr/2 dx , `=0 j=q+1 since r > p − 1 and q < x/M . Now, since p − 3 − β/2 < −1 (indeed β/2 > r/2 − 1 and r/2 > p − 1), we get Z nM n x p−1−r r−2−β/2 q sn q−1 n X X r/2 j β/2−1 kE0 (Xj Xj+` ) − E(Xj Xj+` )kr/2 dx `=0 j=q+1 ≤ n(2M )β/2+3−p M p−1−r Z nM × x p−3−β/2 sn q−1 n X X r/2 j β/2−1 kE0 (Xj Xj+` ) − E(Xj Xj+` )kr/2 dx `=0 j=q+1 ≤ n(2M )β/2+3−p M p−1−r × n−1 X n X j β/2−1 kE0 (Xj Xj+` ) − r/2 E(Xj Xj+` )kr/2 `=0 j=`+1 30 Z nM sn xp−3−β/2 1x≥(`+1)M dx . Hence, since sn ≥ M , Z nM xp−1−r q r−2−β/2 n sn q−1 n X X r/2 j β/2−1 kE0 (Xj Xj+` ) − E(Xj Xj+` )kr/2 dx `=0 j=q+1  nM p−r n−1 X (` + 1) p−2−β/2 `=0  nM p−r n X j=1 n X r/2 j β/2−1 kE0 (Xj Xj+` ) − E(Xj Xj+` )kr/2 j=`+1 j β/2−1 j−1 X r/2 (` + 1)p−2−β/2 kE0 (Xj Xj+` ) − E(Xj Xj+` )kr/2 . (8.18) `=0 Corollary 8.1 follows from (8.12), (8.13), and Proposition 8.1 combined with the bounds (8.14), (8.15), (8.16), (8.17) and (8.18). 8.2 Proof of Proposition 2.1 The next lemma gives covariance-type inequalities in terms of the variables b` (i) and b` (i, j) of Definition 2.1. It is almost the same as Lemma 35 in [12], the only difference is that in [12], the authors used a slightly different definition of the variables b` (i, j). The proof of the version we give here can be done by following the proof of Lemma 35 in [12], and is therefore omitted. Lemma 8.1. Let Z be a F` -measurable real-valued random variable and let h and g be two BV functions (recall that kdhk is the variation norm of the measure dh). Let Z (0) = Z − E(Z), h(0) (Yi ) = h(Yi ) − E(h(Yi )) and g (0) (Yj ) = g(Yj ) − E(g(Yj )). Define the random variables b` (i) and b` (i, j) as in Definition 2.1. Then  1. E Z (0) h(0) (Yi ) = |Cov(Z, h(Yi ))| ≤ kdhk E (|Z|b` (i)) .  2. E Z (0) h(0) (Yi )g (0) (Yj ) ≤ kdhkkdgk E (|Z|b` (i, j)) . We now begin the proof of Proposition 2.1. Note first that if Xi = h(Yi ) − E(h(Yi )) for some BV function h, then |Xi | ≤ kdhk almost surely. To prove Proposition 2.1, we apply Corollary 8.1 with M = kdhk, r ∈] max(2p − 2, 4), 2p[ and β ∈]r − 2, 2p − 2[. We have to bound up the second, third, fourth and fifth terms on the right hand side of (8.2). Let us do this in that order. To control the second term, we note that, by stationarity, E |E0 (Xk )E0 (X` )| = E |E−k (X`−k )E−k (X0 )| = E (E−k (X`−k )E−k (X0 ) sign {E−k (X`−k )E−k (X0 )}) = E (X`−k E−k (X0 ) sign {E−k (X`−k )E−k (X0 )}) . Hence, applying Lemma 8.1, we get that, for any ` ≥ k ≥ 0, E |E0 (Xk )E0 (X` )| ≤ kdhkE (|E−k (X0 )| b−k (` − k)) ≤ kdhkE (|X0 |b−k (` − k)) . Let then T0 (n) = n X ` X (k + 1)p−3 b−k (` − k) , `=1 k=0 31 and note that T0 (n) is a positive random variable which is F0 -measurable and such that n X ` n X X p−3 E(T0 (n)) ≤ (k + 1) β1,Y (`) ≤ C `p−2 β1,Y (`) , `=1 k=0 `=1 for some positive constant C. Moreover nkdhkp−2 n X ` X (k + 1)p−3 kE0 (Xk )E0 (X` )k1  nkdhkp−1 E (|X0 | (1 + T0 (n))) . (8.19) `=0 k=0 To control the third term, we note that kE0 (Xk )k22 = E (E−k (X0 )X0 ) . Hence, applying Lemma 8.1, we get that kE0 (Xk )k22 ≤ kdhkE (|X0 |b−k (0)) . Let then U0 (n) = n X k p−2 b−k (0) , k=1 and note that U0 (n) is a positive random variable which is F0 -measurable and such that E(U0 (n)) ≤ n X k p−2 β1,Y (k) . k=1 Moreover nkdhk p−2 n X k p−2 kE0 (Xk )k22 ≤ nkdhkp−1 E (|X0 |U0 (n)) . (8.20) k=1 To control the fourth term, let first Z = |X0 |r/2 |E0 (Xi )|r/2−1 sign{E0 (Xi )}. Then r/2 kX0 E0 (Xi )kr/2 = E (ZXi ) = E ((Z − E(Z))Xi ) . Applying Lemma 8.1, it follows that r/2 kX0 E0 (Xi )kr/2 ≤ kdhkE(|Z|b0 (i)) ≤ kdhkr−1 E(|X0 |b0 (i)) . Let then V0 (n) = n X ip−2 b0 (i) , i=1 and note that is a positive random variable which is F0 -measurable and such that PnV0 (n) p−2 E(V0 (n)) ≤ i=1 i β2,Y (i). Moreover nkdhk p−r n X r/2 ip−2 kX0 E0 (Xi )kr/2 ≤ nkdhkp−1 E (|X0 |V0 (n)) . i=1 32 (8.21) To control the fifth term, note that, since r/2 − 1 ≥ 1, r/2 kE0 (Xi Xj+i ) − E(Xi Xj+i )kr/2   = E |E0 (Xi Xj+i ) − E(Xi Xj+i )|r/2−1 |E0 (Xi Xj+i ) − E(Xi Xj+i )|  ≤ 2r/2−2 E |Xi Xj+i |r/2−1 |E0 (Xi Xj+i ) − E(Xi Xj+i )| + 2r/2−2 |E(Xi Xj+i )|r/2−1 E (|E0 (Xi Xj+i ) − E(Xi Xj+i )|) . Now  E |Xi Xj+i |r/2−1 |E0 (Xi Xj+i ) − E(Xi Xj+i )|   ≤ E |Xi |r−2 |E0 (Xi Xj+i ) − E(Xi Xj+i )| + E |Xj+i |r−2 |E0 (Xi Xj+i ) − E(Xi Xj+i )| . Let Z = E−i (|X0 |r−2 ) sign{E−i (X0 Xj ) − E(X0 Xj )}. Notice that   E |Xi |r−2 |E0 (Xi Xj+i ) − E(Xi Xj+i )| = E |X0 |r−2 |E−i (X0 Xj ) − E(X0 Xj )|  = E E−i (|X0 |r−2 ) |E−i (X0 Xj ) − E(X0 Xj )| = E ((Z − E(Z))X0 Xj )) . Applying Lemma 8.1, it follows that  E |Xi |r−2 |E0 (Xi Xj+i ) − E(Xi Xj+i )| ≤ kdhk2 E (|Z|b−i (0, j))  ≤ kdhk2 E |X0 |r−2 b−i (0, j) ≤ kdhkr−1 E (|X0 |b−i (0, j)) . Similarly we get  E |Xi+j |r−2 |E0 (Xi Xj+i ) − E(Xi Xj+i )| ≤ kdhkr−1 E (|X0 |b−i−j (−j, 0)) . Let then W0 (n) = n X i β/2−1 i=1 i−1 X (j + 1)p−2−β/2 (b−i (0, j) + b−i−j (−j, 0)) , j=0 and note that W0 (n) is a positive random variable which is F0 -measurable and such that E(W0 (n)) = n X β/2−1 i i−1 X i=1 (j + 1)p−2−β/2 (E(b−i (0, j)) + E(b−i−j (−j, 0))) j=0 ≤2 n X i β/2−1 β2,Y (i) i=1 i−1 X (j + 1) p−2−β/2 ≤C j=0 n X ip−2 β2,Y (i) , i=1 for some positive constant C. Moreover nkdhkp−r n X i=1 iβ/2−1 i−1 X r/2 (j + 1)p−2−β/2 kE0 (Xi Xj+i ) − E(Xi Xj+i )kr/2 j=0  nkdhkp−1 E (|X0 |W0 (n)) + nkdhkp−1 E (|X0 |) E (W0 (n)) . (8.22) To conclude the proof, let B0 (n, p) = T0 (n) + U0 (n) + V0 (n) + W0 (n), and note that W0 (n) is a positive random variable which is F0 -measurable and such that E (B0 (n, p)) ≤ 33 P κ nk=1 k p−2 β2,Y (k), for some positive constant κ. From (8.2), (8.19), (8.20), (8.21) and (8.22), and since X0 = h(Y0 ) − E(h(Y0 )), we infer that  E sup |Sk |p  1≤k≤n  np/2 n−1 X !p/2 |Cov(X0 , Xi )| + nkdhkp−1 E (|h(Y0 )|B0 (n, p)) i=0 + nkdhk p−1 E (|h(Y0 )|) n X (k + 1)p−2 β2,Y (k) . k=0 P Let then A0 (n, p) = κ−1 B0 (n, p), in such a way that E (A0 (n, p)) ≤ nk=1 k p−2 β2,Y (k). The random variable A0 (n, p) satisfies the statement of Proposition 2.1, and the proof is complete. References [1] H. C. P. Berbee, Random walks with stationary increments and renewal theory, Cent. Math. Tracts, Amsterdam, 1979. [2] R. C. Bradley (1986), Basic properties of strong mixing conditions, Dependence in probability and statistics. A survey of recent results. Oberwolfach, 1985. E. Eberlein and M. S. Taquu editors, Birkäuser, 165-192. [3] J. H. Bramble and S. R. Hilbert (1970), Estimation of linear functionals on Sobolev spaces with application to Fourier transforms and spline interpolation, SIAM J. Numer. Anal. 7 112-124. [4] J. Bretagnolle and C. Huber (1979), Estimation des densités: risque minimax, Z. Wahrsch. Verw. Gebiete 47 119-137. [5] J. Dedecker, H. Dehling and M. S. Taqqu (2015), weak convergence of the empirical process of intermittent maps in L2 under long-range dependence, Stoch. Dyn. 15 29 pp. [6] J. Dedecker, S. Gouëzel and F. Merlevède (2012), The almost sure invariance principle for unbounded functions of expanding maps, ALEA Lat. Am. J. Probab. Math. Stat. 9 141-163. [7] J. Dedecker and C. Prieur (2005), New dependence coefficients. Examples and applications to statistics, Probab. Theory Related Fields 132 203-236. [8] J. Dedecker and C. Prieur (2007), An empirical central limit theorem for dependent sequences, Stochastic Process. Appl. 117 121-142. [9] J. Dedecker and E. Rio (2000), On the functional central limit theorem for stationary processes, Ann. Inst. Henri Poincaré Probab. Stat. 36 1-34. [10] R. A. DeVore and G. G. Lorentz, Constructive approximation, Springer-Verlag, Berlin Heidelberg New-York, 1993. [11] C. Liverani, B. Saussol and S. Vaienti (1999), A probabilistic approach to intermittency, Ergodic Theory Dynam. Systems 19 671-685. [12] F. Merlevède and M. Peligrad (2013), Rosenthal-type inequalities for the maximum of partial sums of stationary processes and examples, Ann. Probab. 41 914-960. 34 [13] E. Rio (2000), Théorie asymptotique des processus aléatoires faiblement dépendants, Mathématiques et Applications 31, Springer-Verlag, Berlin. [14] M. Rosenblatt (1956), A central limit theorem and a strong mixing condition, Proc. Nat. Acad. Sci. U. S. A. 42 43-47. [15] M. Thaler (1980), Estimates of the invariant densities of endomorphisms with indifferent fixed points. Israel J. Math. 37, 303–314. [16] G. Viennet (1997), Inequalities for absolutely regular sequences: application to density estimation, Probab. Theory Related Fields 107 467-492. 35
10math.ST
Combined Top-Down and Bottom-Up Approaches to Performance-guaranteed Integrated Task and Motion Planning of Cooperative Multi-agent Systems ?,1 arXiv:1607.07797v2 [cs.RO] 15 Dec 2016 Rafael Rodrigues da Silva a,2 , Bo Wu a , Jin Dai a , Hai Lin a a Department of Electrical Engineering, University of Notre Dame, Notre Dame, IN, 46556 USA. Abstract We propose a hierarchical design framework to automatically synthesize coordination schemes and control policies for cooperative multiagent systems to fulfill formal performance requirements, by associating a bottom-up reactive motion controller with a top-down mission plan. On one hand, starting from a global mission that is specified as a regular language over all the agents’ mission capabilities, a mission planning layer sits on the top of the proposed framework, decomposing the global mission into local tasks that are in consistency with each agent’s individual capabilities, and compositionally justifying whether the achievement of local tasks implies the satisfaction of the global mission via an assume-guarantee paradigm. On the other hand, bottom-up motion plans associated with each agent are synthesized corresponding to the obtained local missions by composing basic motion primitives, which are verified safe by differential dynamic logic (dL), through a Satisfiability Modulo Theories (SMT) solver that searches feasible solutions in face of constraints imposed by local task requirements and the environment description. It is shown that the proposed framework can handle dynamical environments as the motion primitives possess reactive features, making the motion plans adaptive to local environmental changes. Furthermore, on-line mission reconfiguration can be triggered by the motion planning layer once no feasible solutions can be found through the SMT solver. The effectiveness of the overall design framework is validated by an automated warehouse case study. Key words: Multi-agent systems, formal verification, motion and mission planning, differential dynamical logic, controller synthesis. 1 Introduction Cooperative multi-agent systems refer to as a class of multiagent systems in which a number of homogeneous and/or heterogeneous agents collaborating in a distributed manner via wireless communication channels in order to accomplish desirable performance objectives cooperatively. Representing a typical class of cyber-physical systems (CPS), cooperative multi-agent systems has become a powerful analysis and design tool in the interdisciplinary study of control theory and computer science due to the great potential in both academia and industry, ranging from traffic manage? This paper was not presented at any IFAC meeting. Corresponding author R. R. da Silva. Tel. +1-574-631-3736. Fax +1-574-6314393. Email addresses: [email protected] (Rafael Rodrigues da Silva), [email protected] (Bo Wu), [email protected] (Jin Dai), [email protected] (Hai Lin). 1 This work is supported by NSF-CNS-1239222, NSF-EECS1253488 and NSF-CNS-1446288 2 The first author would like to appreciate the scholarship support by CAPES/BR, BEX 13242/13-0 Preprint submitted to Automatica ment systems, power grids, robotic teams to smart manufacturing systems, see e.g. [1–5] and the references therein. Mission and motion planning are two fundamental problems in the context of cooperative multi-agent systems and have received considerable attention in recent years. To pursue satisfaction of desired performance requirements, planning methods for cooperative multi-agent systems can generally be divided into two categories: bottom-up and topdown approaches. Bottom-up approaches design local control rules and inter-agent coordination mechanisms to fulfill each agent’s individual tasks, while sophisticated collective behavior of cooperative multi-agent systems manages to ensure certain global properties. Such approaches have gained remarkable success in achieving various mission and motion planning purposes, including behavior-based coordination [1], consensus-type motion planning [29] and local high-level tasks [9]. The bottom-up approach scales well but generally lacks formal performance guarantees, except for certain properties like consensus [29], rendezvous [33] or related formation control [34]. In contrary, starting from a global mission, top-down design methods complements bottom-up ones by following a “divide-and-conquer” 16 December 2016 with a set of feasible motion plans for a fair dynamic environment, i.e. the changes in the environment do not lead any agent to a deadlock. However, if it fails to obtain feasible motion plans or an agent gets in a deadlock, feedbacks can be provided to adjust each agent’s mission plan by exploiting necessary coordinations. Our main contributions lie in Global m ission Top-dow n Not feasible M ission plan 1 Decom position ... M ission plan N Local m otion planning M otion plan 1 Bottom -up M otion plan N ... Local m otion contr oller s design M otion contr oller 1 ... (1) We apply formal methods to solve both the mission and the motion planning problems of cooperative multiagent systems, based on which provably correct mission plans are obtained and feasible motion plans are synthesized through correct-by-construction. (2) Our proposed framework shows great improvement of the scalability issues. On one hand, in the topdown mission planning stage, we use assume-guarantee paradigm [23] to compositionally verify the correctness of all the mission plans, mitigating the “state explosion” issues; on the other hand, we synthesize the corresponding motion controllers by using SMT solver and thus finite abstractions of the environment [24] is avoided. (3) Although the given global mission is not necessarily reactive, our proposed framework does provide solutions for both mission and motion plans that are reactive. First, we develop a modification of the L∗ learning algorithm [25] such that it can be applied for local mission planning even the agent’s model is not known a priori; secondly, by composing safe motion primitives, the designed motion controller can reactively interact with (possibly) uncertain environment and with other agents. For example, collisions with either obstacles or other agents are avoided. M otion contr oller N Fig. 1. Overall framework paradigm, in which the global mission is decomposed into a series of local tasks for each agent based on their individual sensing and actuating capabilities, and accomplishment of the local missions ensures the satisfaction of the global specification via synchronized [13] [14] or partiallysynchronized [15] [16] multi-agent coordination. Despite the guarantee of achieving complex high-level global mission and motion plans, top-down design methods lack flexibility and scalability in local control policy design due to their requirement for proper abstraction models. Additionally, the planning complexity quickly becomes prohibitively high as the number of partitioned regions and agents increase, which further hampers the applicability of the abstraction based methods in many practical circumstances. We are therefore motivated to combine both top-down mission planning procedure with bottom-up motion planning techniques to develop a scalable, reactive and correct-bydesign approach for cooperative multi-agent systems that accomplishes high-level global tasks in uncertain and dynamic environments. Our basic idea in this paper is illustrated by the design framework shown in Fig. 1. The remainder of this paper is organized as follows. Previous work related to multi-agent coordination and control are briefly reviewed in Section 2. After introducing necessary preliminaries in Section 3, Section 4 presents the formal statement of our problem, along with a motivating example that are used throughout the rest of the paper. Section 5 solves the top-down problem while Section 6 solves the bottom-up design problem. Section 7 concludes the paper. Given a global mission in the form of regular languages over the mission capabilities of the underlying cooperative multi-agent system, our proposed framework solves the mission planning problem by introducing a learning-based topdown mission decomposition framework [20], which decomposes the global mission into local tasks that are consistent with each agent’s capabilities. Based on the given local tasks, we solve the corresponding integrated task and motion planning problem of the multi-agent systems by extending our previous results of bottom-up compositional design approach called CoSMoP (Composition of Safe Motion Primitives) [21] from single agent to multi-agent circumstances. First, CoSMoP designs a series of motion controllers (primitives) offline that are verified safe by differential dynamic logic (dL) [22] to form necessary building blocks of complex maneuvers for each agent. Next, with the learned local task specification and a scenario map, CoSMoP synthesizes the corresponding integrated task and motion plan via appropriate composition of simple motion primitives whose correctness is justified by using the Satisfiability Modular Theories (SMT) solver and by modular incremental verification procedures. The mission and motion planning problem can be solved successfully if the motion planning layer comes up 2 Related Work In this paper, we leverage guidance from this relatively broad body of literature to develop a formal framework to solve the mission and motion planning problems of cooperative multi-agent systems. It is worth noting that the proposed framework shows great features of both bottom-up and topdown design methods. Using such a framework, we demonstrate how formal synthesis and verification techniques can facilitate the design of coordination and control protocols for cooperative multi-agent systems. 2.1 Multi-Agent Systems The increasing interest in improving the expressiveness of mission and/or motion planning specifications draws our at- 2 a computationally tractable fragment of computation tree logic (CTL) specifications were also investigated by Partovi and Lin [18]. Following a top-down architecture, Kloetzer and Belta [15] solved the multi-agent coordination problem from a global LTL specification, by model checking the composed behavior of all agents in a centralized manner; the results were extended in [19], in which optimality and robustness properties of the synthesized motion plans were taken into consideration. “Trace-closed” regular specifications were investigated in [14] [16] to automatically deploy cooperative multi-agent teams. Karaman and Frazzoli [13] addressed the mission planning and routing problems for multiple uninhabited aerial vehicles (UAV), in which the given LTL specifications can be systematically converted a set of constraints suitable to a mixed-integer linear programming (MILP) formulation. tention to specifying desired multi-agent behavior in the form of formal languages, such as regular languages and temporal logics including linear temporal logic (LTL) and computation tree logic (CTL) [10], which provide formal means of specifying high-level performance objectives due to their expressive power. A common two-layered architecture is usually deployed in the synthesis problems of the formal specifications [38] [39]. Based on constructing appropriate finite-state abstractions of not only the underlying dynamical system, but the working environment as well, a control strategy [40], usually represented by a finite state automaton, is synthesized for the satisfaction of the high-level specifications by using formal methods, including model checking [10], supervisory control theory [41] [42] and reactive synthesis [40]. This synthesis procedure leads to a hierarchical control structure with a discrete planner that is responsible for the high-level, discrete plan and a corresponding low-level continuous controller. Simulations and bisimulation relations are established [10] as a proof that the continuous execution of the low-level controller preserves the correctness of the high-level discrete plans [3] [43]. 2.2 Furthermore, even though powerful model checking tools have been exploited [24] [27] to synthesize control protocols for formal specifications, these approaches generate open-loop strategies and cannot handle reactive specifications; furthermore, those synthesis methods which work for reactive control protocols [43] are severely limited by their high computational complexity. To mitigate this problem, Wongpiromsarn et al. [49] employed a receding horizon process where a controller only repeatedly worked out a plan for a short time horizon ahead of the current status. Nevertheless, the proposed results have difficulty handling cooperative tasks for multi-agent systems that involved close inter-agent cooperation. Bottom-up Synthesis One of the most highlighted bottom-up methods in literature can be categorized as the behavior-based [1] approaches, which coordinate multiple agents by composing pre-defined behaviors or distributed learning algorithms from artificial intelligence [6]. It turns out, however, that much of this behavior-based work possesses empirical features that leads to a trial-and-error design process, and therefore lacks guarantees of high-level performance objectives. Recent studies [7] [8] have accounted for performance verification of behavior-based schemes; nevertheless, the contribution are mainly made to single-agent cases. To accomplish high-level tasks of cooperative multi-agent systems, many attempts have been made in the context of bottom-up design. Filippidis et al. [9] proposed a decentralized control architecture of multi-agent systems to address local linear temporal logic (LTL) [10] specifications while obeying inter-agent communication constraints; however, the agents therein did not impose any constraints on other agents’ behavior. Guo and Dimarogonas [11] considered the synthesis of motion plans associated with each agent to fulfill corresponding local LTL specifications by developing a partially decentralized solution which formed clusters of dependent agents such that all individual tasks can be finished in an orderly manner. To overcome the computational issues, the results were further extended in [12] by involving receding horizon planning techniques. 2.3 2.4 Symbolic Motion Planning Control theory has been widely involved to develop performance-guaranteed solutions of planning problems. The classical reach-avoid planning and point-to-point motion planning algorithms [2] [26] aim to steer an intelligent agent from a given initial position to some desirable final configuration while avoiding the collision with any obstacles along the way by utilizing various graph search techniques. Nevertheless, exact solutions to this problem are generally intractable, and various efforts have been devoted to efficiently overcoming the computational burden [27] [28]. It turns out that extension of single-agent planning algorithms to multi-agent cases can be non-trivial, whereas many attempts have been made to achieve different multi-agent coordination and control purposes, such as consensus [29] [30], flocking [31] [32], rendezvous [33] and formation control [34] of multi-agent systems. Fulfillment of these coordination goals is ensured by control theoretical analysis and deductive verification, including Lyapunov stability [29] [31] analysis, barrier certificates [35], differential dynamic logic [22], and game theory [36] [37]. However, these traditional planning and coordination approaches guarantee the steady-state performance of the underlying multi-agent systems, whereas satisfaction of more complex and temporal specifications is not considered. Top-down Synthesis Karimadini and Lin [17] studied task decomposition problems of cooperative multi-agent systems, and necessary and sufficient conditions were derived under which the global tasks can be retrieved by the assigned local specifications in the sense of bisimulation [10]. Task decomposition from 3 2.5 where Q is a finite set of states, Σ is a finite set (alphabet) of events, q0 ∈ Q is an initial state, δ : Q × Σ → Q is a partial transition function and Qm ⊆ Q is the set of the marked (accepting) states. Integrated Task and Motion Planning Traditionally, the high-level task planner for mobile robots sits on top of the motion planner [44]. The task planner sees the world as abstracted symbols and ignores details in geometric or physical constraints, which may cause infeasibility in the motion planning. Therefore, a recent trend is towards an Integrated Task and Motion Planning (ITMP). Earlier efforts in ITMP, such as Asymov [45] and SMAP [46], were still based on abstractions of the working environment and used a symbolic planner to provide a heuristic guidance to the motion planner. Recent work, such as [47] and [48], introduced a “semantic attachment,” i.e. a predicate that is solved by a motion planner, to the symbolic planner. An overview of the recent developments in the symbolic motion planning can be found in [4], where the task planning problem is reduced to model checking. Since these methods are based on abstracted symbolic models of the environments, it is a common assumption that the working environment is known or static and the robot is the only moving object (or the robot itself carries other movable objects). However, in practice, a robot often shares its workspace with others robots or even humans, and the environment often changes over time in a way that is hard to predict. The transition function δ can be generalized to δ : Q × Σ∗ → Q in the usual manner [50]. The language generated by G is defined as L(G) := {s ∈ Σ∗ |δ(q0 , s) is defined.}; while Lm (G) = {s ∈ Σ∗ |s ∈ L(G), δ(q0 , s) ∈ Qm } stands for the language that is marked by G. The language that is accepted by a DFA is called a regular language. We focus our study on regular languages in the sequel. For a non-empty subset Σ0 ⊆ Σ and a word s over Σ, we use the “natural projection” to form a word s0 over Σ0 from s by eliminating all the events in s that does not belong to Σ0 . Formally, we have Definition 2 (Natural Projection) For a non-empty subset Σ0 ⊆ Σ, the natural projection P : Σ∗ → Σ0∗ is inductively defined as P () =   P (s)σ, if σ ∈ Σ0 , ∀s ∈ Σ∗ , σ ∈ Σ, P (sσ) = P (s), otherwise. 0∗ 3 Preliminaries Given a family of event sets {Σi }, i = 1, 2, . . . , N , with their SN union Σ = i=1 Σi , we let Pi denote the natural projection from Σ to Σi . For a finite set of regular languages Li ⊆ Σ∗i , i = 1, 2, . . . , N , the synchronous product of {Li }, denoted by ||ni=1 Li , is defined as follows. In this section, we introduce the basic concepts and notations that are used throughout this paper to describe cooperative multi-agent systems and their desired properties. 3.1 ∗ The set-valued inverse projection P −1 : 2Σ → 2Σ is of P defined as P −1 (s) = {t ∈ Σ∗ : P (t) = P (s)}. Regular Languages Definition 3 (Synchronous Product) [51] For a finite set of regular languages Li ⊆ Σ∗i , i = 1, 2, . . . , N , For a finite set Σ, we let 2Σ and |Σ| denote the powerset and the cardinality of Σ, respectively; furthermore, let Σ∗ , Σ+ and Σω denote the set of finite, non-empty finite and infinite sequences that consist of elements from Σ. A finite sequence w composing of elements in Σ, i.e., w = w(0)w(1) . . . w(n), is called a word over Σ. The length of a word w ∈ Σ∗ is denoted by |w|. For two finite words w1 and w2 , let w1 w2 denote the word obtained by concatenating w1 and w2 . A finite word s ∈ Σ∗ is said to be a prefix of another word tΣ+ , written as s ≤ t, if there exists a word u such that t = su. ||ni=1 Li = {t ∈ Σ∗ |∀i : Pi (t) ∈ Li }. Equivalently, ||ni=1 Li = 3.2 Tn i=1 (1) Pi−1 (Li ). Differential Dynamic Logic The Differential Dynamic Logic dL verifies a symbolic hybrid system model, and, thus, can assist in verifying and finding symbolic parameters constraints. Most of the time, this turns into an undecidable problem for model checking [22]. Yet, the iteration between the discrete and continuous dynamics is nontrivial and leads to nonlinear parameter constraints and nonlinearities in the dynamics. Hence, the model checking approach must rely on approximations. On the other hand, the dL uses a deductive verification approach to handling infinite states, it does not rely on finitestate abstractions or approximations, and it can handle those nonlinear constraints. Given a finite event set Σ, a subset of words in Σ∗ is called a (finite) language over Σ. For a language K ⊆ Σ∗ , the set of all prefixes of words in K is said to be the prefix-closure of K, denoted by K, that is, K = {s ∈ Σ∗ |∃t ∈ Σ∗ : st ∈ K}, where st denotes the concatenation of two words s and t. K is said to be prefix-closed if K = K. In practice, we use deterministic finite automata to recognize languages. Definition 1 (Deterministic Finite Automaton) A deterministic finite automaton (DFA) is a 5-tuple The hybrid systems are embedded to the dL as hybrid programs, a compositional program notation for hybrid systems. G = (Q, Σ, q0 , δ, Qm ), 4 terms of interpretations of a finite alphabet Σ ∈ {AP, R} on finite traces over a finite sequence ρ of consecutive instants of time with length K, meaning that ρ(k) is the interpretation of Σ at instant of time k ∈ Nρ , Nρ = {0, ..., K}. Moreover, the arithmetic terms of an arithmetic constraint R ∈ R are variables x over a domain D ∈ {Z, R} valuated at instants i and, thus, are called arithmetic temporal terms a.t.t., Definition 4 (Hybrid Program) A hybrid program [22] (α and β) is defined as:  α, β ::= x1 := θ1 , ..., xn := θn |?χ | α; β | α ∪ β | α∗ | x01 := θ1 , ..., x0n := θn &χ where: • x is a state variable and θ a first-order logic term. • χ is a first-order formula. • x1 := θ1 , ..., xn := θn are discrete jumps, i.e. instantaneous assignments of values to state variables. • x01 := θ1 , ..., x0n := θn &χ is a differential equation system that represents the continuous variation in system dynamics. x0i := θi is the time derivative of state variable xi , and &χ is the evolution domain. • ?χ tests a first-order logic at current state. • α; β is a sequential composition, i.e. the hybrid program β will start after α finishes. • α ∪ β is a nondeterministic choice. • α∗ is a nondeterministic repetition, which means that α will repeat for finite times. Definition 6 (Arithmetic Temporal Term) A CLTLB(D) arithmetic temporal term (a.t.t.) ϕ is defined as: ϕ ::= x | where and −1 ϕ| −1 ϕ stands for next and previous operator. Therefore, a CLTLB(D) formula is a LTL formula over the a.t.t. defined as below. Definition 7 (Formula) A CLTLB(D) formula (φ, φ1 and φ2 ) is defined as,  φ, φ1 , φ2 ::= Thus, we can define the dL formula, which is a first-order dynamic logic over the reals for hybrid programs. p | R(ϕ1 , ..., ϕn ) | ¬φ | φ1 ∧ φ2 | φ | −1 φ | φ1 Uφ2 | φ1 Sφ2 where, Definition 5 (dL formulas) A dL formula [22] (φ and ψ) is defined as: • p ∈ AP is a atomic proposition, and R ∈ R is a relation over the a.t.t. such as, for this work, we limit itP to linear n equalities or inequalities, i.e. R(ϕ1 , ..., ϕn ) ≡ i=1 ci · ϕi #c0 , where # ≡ h=, <, ≤, >, ≥i and ci , ϕi ∈ D. • , −1 , U and S stands for usual next, previous, until and since operators on finite traces, respectively. φ, ψ ::= χ | ¬φ | φ ∧ ψ | ∀xφ | ∃xφ | [α]φ | hαiφ where: • [α]φ holds true if φ is true after all runs of α. • hαiφ holds true if φ is true after at least one runs of α. Based on this grammar, it can also use others common abbreviations, including: dL uses a compositional verification technique that permits the reduction of a complex hybrid system into several subsystems [22]. This technique divides a system ψ → [α]φ in an equivalent formula ψ1 → [α1 ]φ1 ∧ ψ2 → [α2 ]φ2 , where each ψi → [αi ]φi can be proven separately. In our approaches we use this technique backwards, we prove a set of dL formulas ψi → [αi ]φi , where each one is the ith motion primitive model, and we use the SMT to compose an equivalent ψ → [α]φ that satisfies a mission task. Therefore, the synthesized hybrid system performance is formally proven. 3.3 • Standard boolean, such as true, f alse, ∨ and →. • 3φ that stands for trueUφ, and it means that φ eventually holds before the last instant (included). • φ that stands for ¬3¬φ, and it means that φ always holds until the last instant. • Last[φ] that stands for 3(¬ true) ∧ φ, where ¬ true on finite trace is only true at last instant. Thus, it means that φ is true at the last instant of the sequence ρ. A CLTLB(D) formula is verified in a Bounded Satisfiability Checking (BSC) [53]. Hence, it is interpreted on a finite sequence ρ with length K. Therefore, ρ(k)  p means that p holds true in the sequence ρ at instant k (p ` ρ(k)). Counter Linear Temporal Logic Over Constraint System Definition 8 (Semantics) The semantics of a CLTLB(D) formula φ at an instant k ∈ Nρ is as follow: We express the specification of an autonomous mobile robot using Counter Linear Temporal Logic Over Constraint System CLTLB(D) defined in [52]. This language is interpreted over Boolean terms p ∈ AP or arithmetic constraints R ∈ R belong to a general constraint system D, where AP is a set of atomic propositions and R is a set of arithmetic constraints. Thus, the semantics of a CLTLB(D) formula is given in • • • • 5 ρ(k)  p ⇐⇒ p ` ρ(k). ρ(k)  R(ϕ1 , ..., ϕn ) ⇐⇒ R(ϕ1 , ..., ϕn ) ` ρ(k). ρ(k)  ¬φ ⇐⇒ ρ(k) 2 φ. ρ(k)  φ1 ∧ φ2 ⇐⇒ ρ(k)  φ1 ∧ ρ(k)  φ2 . • ρ(k)  • ρ(k)  φ ⇐⇒ ρ(k + 1)  φ. −1 φ ⇐⇒ ρ(k − 1)  φ.  ∃i ∈ [k, K] : ρ(i)  φ2 ∧ • ρ(k)  φ1 Uφ2 ⇐⇒ . ∀j ∈ [k, i − 1] : ρ(j)  φ1  ∃i ∈ [0, k] : ρ(i)  φ2 ∧ . • ρ(k)  φ1 Sφ2 ⇐⇒ ∀j ∈ [i + 1, k] : ρ(j)  φ1 4 4.1 Problem formulation A Motivating Example Fig. 2. Warehouse layout As a motivating example, let us consider a cooperative MRS with N robots in an automated warehouse as shown in Fig. 2. The global mission is to deploy the robots to move newly arrived goods to respectively designated workspaces. Additionally, the robots are Pioneer P3-DX robots 3 which is fully programmable and includes a dedicated motion controller with encoder feedback. Moreover, this robot can be simulated with the MobileSim 4 . This application permits to simulate all current and legacy models of MobileRobots/ActivMedia mobile robots such as Pioneer 3 DX and AT. Moreover, full source code is available under the GPL for understanding the simulation implementation, customizing and improving it. bileEye 9 which shows the sensor readings and trajectories. Hence, each robot dynamics is simulated in MobileSim, and each controller is implemented in a C++ custom application that both run on Linux Computers. These computers are connected through Ethernet, and each robot controller connects via a TCP port to MobileSim and other robot neighbors. Therefore, all examples presented in this paper can be implemented in a custom C++ application using both the Pioneer SDK and the SMT solver (e.g. Z3). This article illustrates the control system design using a simple example shown in the Fig. 2. Denote NA = {1, ..., N }, we initially assume N = 2 and all the robots Ri , i ∈ NA have the identical communication, localization and actuation capabilities. Our design framework can be extended to involve N > 2 robots with different capabilities and other scenarios like search and rescue as well, and it will be presented an example with N = 10. Furthermore, the Pioneer P3-DX robot has a software developing kit called Pioneer SDK 5 which allows developing its control system in custom C++ applications with third-part libraries such as an SMT solver. Particularly, the examples presented in this paper are implemented using two libraries from this kit: ARIA 6 and ARNL 7 . The ARIA brings an interface to control and to receive data from MobileSim accessible via a TCP port and is the foundation for all other software libraries in the SDK such as the ARNL. Moreover, the ARNL Navigation library 8 provides a MobileRobots’ proprietary navigation technology that is reliable, high quality and highly configurable and implement an intelligent navigation and positioning capabilities to this robot. Different localization (positioning) methods are available for various sensors such as LIDAR, Sonar, and GPS. Furthermore, commands can be sent to a custom application implementing those libraries by using a graphical interface called Mo- This robot team may share its workspace with humans and deal with unexpected obstacles such as a box that falls from a shelf. Some goods must be moved first before the others can be picked up, some maybe quite heavy and require two robots to move; therefore coordination between robots is needed for the safety as well as the accomplishment of the global task. 4.2 3 http://www.mobilerobots.com/ResearchRobots/PioneerP3DX.aspx, retrieved 05-18-2016. 4 http://www.mobilerobots.com/Software/MobileSim.aspx, retrieved 05-18-2016. 5 http://www.mobilerobots.com/Software.aspx, retrieved 05-182016. 6 http://www.mobilerobots.com/Software/ARIA.aspx, retrieved 05-18-2016. 7 http://www.mobilerobots.com/Software/NavigationSoftware.aspx, retrieved 05-18-2016. 8 http://www.mobilerobots.com/Software/NavigationSoftware.aspx, retrieved 05-18-2016. 6 Cooperative Mission Planning Problem Motivated by the fact that the accomplishment of missions among cooperative multi-agent systems shows strong eventdriven features, we characterize the mission planning problem within the discrete-event system (DES) formalism [50]. For a cooperative multi-agent system that consists of N interacting agents, let ΣiM I denote the set of missions that can be accomplished by the i-th agent, i ∈ NA . In practical mission planning problems, events in ΣiM I shall represent the sensing, and actuating capabilities of the underlying agent; i and execution of an event σM I indicates that the i-th agent may accomplish a certain action. The “global” missions are 9 http://www.mobilerobots.com/Software/MobileEyes.aspx, trieved 05-18-2016. re- R1 pO1 R1 dO1 aW1 r1 tion. The design objective of the mission planning is to dei compose the global mission into local tasks KM I, i ∈ NA , i i such that ||i∈NA KM I |= KM I , i.e., ||i∈NA KM I ⊆ KM I . That is, the collective team behavior should not exceed the global mission. In summary, the top-down design objective is to solve the following distributed cooperative tasking problem. start R2 dO2 aW2 R2 pO2 r2 r2 R2 pO2 R2 pO2 R1 pO1 R1 dO1 aW1 Problem 1 (Cooperative Mission Planning) Given a nonempty and prefix-closed global mission KM I and ΣM I , local mission sets ΣiM I , i ∈ NA of each robot, systematically find i locally feasible mission plans KM I for each robot such that i ||i∈NA KM I |= KM I . r1 Fig. 3. Global specification then captured by the S union of mission capabilities of all agents, i.e., ΣM I = i∈NA ΣiM I . For the clarity of presentation, we assume that the mission transition diagram of each agent Ri is given by a prefix-closed regular language i i∗ KM I ⊆ ΣM I . The team mission for the automated warehouse example is as shown in Fig. 3. All the horizontal events of the same column and all the vertical events of the same row are identical. 4.3 The mission alphabet ΣiM I , i ∈ NA of the motivating example are listed in Table 1 with an explanation of the corresponding service and mission capabilities. i Given the local mission plan KM I for each robot Ri , the underlying integrated task and motion planning problem is to implement the task with safety guarantees. Table 1 ΣiM I Event Explanation Ri pOj Robot Ri picks up object Oj . Ri dOj aWk Robot Ri drops off Oj at workspace k. ri Robot Ri returns to its original position. Oj Away Oj is moved away Integrated task and motion planning The description of the scenario environment is essential for the integrated task and motion planning problem. Hence, we first define the scene description which provides the basic information of the robot workspace. Since the Pioneer P3DX robot is a ground vehicle, its workspace can be specified in 2D. Definition 9 (Scene Description) Scene description is a tuple M = hO, A, Bi: i, j, k = 1, 2 • Obstacles O: a set of polygon obstacles described by line segments oj , j ∈ NO specified by two points oi = h(xi , yi ), (xf , yf )i, where NO = {1, ..., |O|}; • Agents A: a set of robots Ri ∈ A : Ri = hl, qr,0 i, i ∈ NA which are represented as a square described by their length l and their initial state qr,0 . • Objects B: a set of movable objects bj = hl, qb,0 i, j ∈ NB which are specified as an square described by their length bi .l and their initial state qb,0 , where NB = {1, ..., |B|}. Inter-agent communication for the purpose of multi-agent coordination are considered at this point by imposing extra constraints on events shared by more than one agent. For each agent Ri , i ∈ NA , we associate a pair of request and response communication events, respectively as follows: Σreq,i = {?σ|(∃j 6= i)σ ∈ (ΣiM I ∩ ΣjM I )}, and Σres,i = {!σ|(∃j 6= i)σ ∈ (ΣiM I ∩ ΣjM I )}, The states variables of the robots and objects are defined over instants of time indicating the execution ending events of the primitives. Those instants of time are defined by k ∈ Z≥0 , as defined in Sec. 3.3, and it denotes the time instant that the kth action has been taken. Thus, we denote the robot Ri state variables as qri , i ∈ NA : qri = hx, y, αi which represents the robot pose, where x, y ∈ Z specify the position in mm and α ∈ R is angle in degrees. Hence, a CLTLB(D) formula 2(qri .x = qri .x), for example, means that the robot state variable x value at instant k should be always equal to the value of x at k + 1. Correspondingly, the object state variables are expressed as qbj , j ∈ NB : qbj = hx, y, p, ai which describes its 2D position hx, yi : where a request event indicates that the underlying agent sends a message through the communication channel, and a response event indicates a message reception. In the warehouse example, Oj Away is a communication event where ?Oj Away denotes a request event that some robot wants the Oj to be moved away. !Oj Away denotes a response event that some robot moves Oj away and notifies the robot who made the request. The team task KM I ⊆ Σ∗M I is given in the form of a prefixclosed regular language associated with its DFA representa- 7 x, y ∈ Z, and p and a are Boolean propositions that p holds true when the robot is carrying this object, and a holds true when another robot is taking this object away from its initial position. Next, we define a scene description for the particular scenario as shown in Fig. 2 refers to actions that a robot can execute, such as moving to some place, picking up objects and so on. Such actions are designed underlying low-level control law from which the generated trajectories are guaranteed to be safe considering both the environment geometrics and kinematics. Example 1 The Fig. 2 a scene of an automated warehouse which two robots must drop two objects off in two different workspaces. Note that the origin (0, 0) is at the center of the workspace. The robots are represented as black filled squares with side length 400mm which start at bottom left of this warehouse, i.e. A = [h400, (−2000, −1000, 0.0)i, h400, (−2000, −2000, 0.0)i]. The objects are initially at bottom right of the warehouse and are depicted as black filled square too with side length 100mm, i.e. B = [h100, (2000, −1000, f alse, f alse)i, h100, (1900, −1000, f alse, f alse)i]. The obstacles refers to the four boundary lines that limits the scene which are formally specified as a set of line segments [h(−2500, −2500), (2500, −2500)i, h(2500, −2500), (2500, 2500)i, h(2500, 2500), (2500, −2500)i, h(2500, −2500), (−2500, −2500)i] ⊂ O and to the two walls that separate the workspaces shown  as gray squares, i.e. h(0, 0), (0, 2500)i, h(−1000, 0), (1000,  0)i ⊂ O. The challenge in this scene is that the objects are adjacent to each other; therefore, a plan that includes both robots picking them up at same time requires a cooperative behavior. 2 5 Top-down design and Task Decomposition This section concerns with Problem 1 and derives a systematical approach to decompose the global task into feasible local tasks. In our previous work [54], a counterexampleguided and learning-based assume-guarantee synthesis framework was proposed. We adopt this framework in the top-down layer in Fig. 1 to automatically learn the local i missions KM I. KM I Decom position ... K 1M I KNM I No Assum e-guar antee Com positional Ver ification Yes Counter exam ples? Yes M odify Assum ptions? No Problem 2 (Reactive Motion Planning) Given a team of i robots A and their mission plans KM I : i ∈ NA , the scene description M, and the trace length K i for each robot Ri , solve an integrated task and motion planning problem by splitting it into three steps. First, design a set of safe motion primitives P i for each robot Ri and respective motion primitives specification φiP (M). A safe motion primitive π i,j ∈ P i : j ∈ NPi = {1, ..., |P i |} for the robot Ri is a certified controller which guarantees a safety property and can be reactive changing its control values based on actual sensor readings. The motion primitives specification φiP (M) is a CLTLB(D) formula which specifies the safe motion primitives by defining constraints for the state variables and the given scene description M. Second, for each i robot Ri , check if the mission plans KM I are satisfiable for the scene M in a fair environment using the controllers P i for each robot Ri . An environment is fair when all moving and static obstacles that are not in the scene description do not lead any robot to a deadlock. Third, for all plans i i i KM I that are satisfiable, find a trace s with length K i i i for each robot Ri , where s (k) = hqr (k), δ (k)i at instant k ∈ N i = {1, ..., K i }. Qir is a sequence of assigned values for robot Ri states such as qri (k) ∈ Qir : qri (k) = hx, y, αi are the values at instant k. Qiπ is a sequence of assigned primitives such as δ i (k) ∈ Qiπ is a motion primitive at instant k that defines to robot Ri what primitive π i,j ∈ δ i (k) to take at qri (k − 1) to go to qri (k). • Task decomposition Obtain a prefix-closed and feasible i local mission KM I for robot Ri from the global mission KM I . • Compositional verification We determine whether or not the collective behaviors of each agent can satisfy the global mission by deploying a compositional verification [54] procedure with each behavior module being a comi ponent DFA that recognizes KM I . In particular, to mitigate the computational complexity, we adopt an assumeguarantee paradigm for the compositional verification and modify L∗ algorithm [25] to automatically learn appropriate assumptions for each agent. • Counterexample-guided synthesis If the local missions fail to satisfy the global specification jointly, the compositional verification returns a counterexample indicating i that all the KM I , i ∈ NA share a same illegal trace that violates the global mission. We present such counterexample to re-synthesize the local missions. Note that we are restricted to take at most K i actions in each i i mission plan KM I and robot Ri . The motion controller δ (k) We illustrate the task decomposition using the automated warehouse example in Section II. In the framework shown Success Fig. 4. Learning-based coordination and mission planning framework. Fig. 4 shows the flowchart of the automatic task decomposition and coordination framework that solves Problem 1 by executing the following steps iteratively. 8 R1 pO1 start R1 dO1 aW1 r1 start 1 (a) KM I for robot R1 R2 pO2 start R2 dO2 aW2 i in Fig. 4, local missions KM I , i = 1, 2 are obtained by i KM I = Pi (KM I ) as shown in Fig. 5, where Pi stands for the natural projection [50] from the global mission set ΣM I to the mission set ΣiM I of the i-th robot, i ∈ NA . Under the assumption that the global mission is feasible, i.e., KM I = K M I , we point out that every mission specification i KM I is locally feasible.  Ti (t) = 2 htrueiKM I hAi 1 1, if hDFA(t)iKM I hKM I i is true. 0. otherwise (2) where DFA(t) is a deterministic finite automaton that generates t and accepts t. In the warehouse example, an appropriate assumption A for robot R1 is depicted in Fig. 6. 2 Next, we check whether or not KM I |= A, which turns out to be true in the warehouse example. Thus one can conclude that the joint behavior of the two robots can cooperatively accomplish the global mission. i Given a series of feasible local missions KM I for i = 1, 2, the next question is whether or not the fulfillment of all local missions can imply the satisfaction of the global one. This question is addressed by deploying a compositional i verification procedure [54]. Specifically, by setting KM I as the i-th behavior module, the compositional verification justifies whether or not M1 ||M2 |= KM I using an assumeguarantee scheme. In the assume-guarantee paradigm for compositional verification, a formula to be checked is a triple hAiM hP i, where M is a module component, P is a property and A is an assumption about M ’s environment, which can also be represented by a DFA. The formula is true if whenever M is part of a system satisfying A, then the system must also guarantee the property P , i.e., ∀E, E||M |= A implies that E||M |= P . For the warehouse example, we check the achievement of KM I by following an asymmetric proof rule. 2 r2 in next conjecture by splitting states in M , and L∗ iterates the aforementioned process to update M with respect to S. For the purpose of compositional verification, we modify L∗ by using the following family of dynamical membership queries. r2 Fig. 5. Robots’ specifications 1 hAiKM I hKM I i R2 dO1 aW2 Fig. 6. Assumption A for robot R1 . 2 (b) KM I for robot R2 1 R2 pO2 S Remark 1 In case where ΣM I = i∈NA ΣiM I , the compositional verification procedure essentially justifies the separability of the global mission KM I [51] with respect to ΣiM I , i ∈ NA , i.e., KM I = ||i∈NA Pi (KM I ); while the assume-guarantee paradigm avoids “state explosion” in the compositional verification. In case KM I is not separable, the compositional verification fails and returns a counterexample t ∈ Σ∗M I indicating a violation of the global mission. We present such counterexample to re-synthesize the local i i missions by resetting KM I := KM I − Pi (t). It has been shown in [55] that, under the assumption that the independence relation induced by the distribution is transitive, KM I can always possess a non-empty separable sublanguage. 6 Bottom-up Design and Integrated Task and Motion Planning 2 1 htrueiKM I ||KM I hKM I i This section solves the Problem 2 and illustrates it through the warehouse example. This section is based on extensions of our previous work [21] to multi-robot coordinations. In [21], a bottom-up approach called CoSMoP (Composition of Safe Motion Primitives) was proposed. It features a two layer hierarchical motion planning as shown in Fig. 7 for each robot. The global layer synthesizes an integrated task and motion plan for the local layer considering only geometric constraints from a given scene description M. If this layer finds a satisfiable plan, the motion supervisor in the local layer implements a designed sequence of controller executions satisfying all kinematic and geometric constraints. Here A denotes an assumption about the environment (in2 cluding mission plan KM I performed by robot R2 ) in which robot R1 is placed. To automatically generate appropriate assumptions, we consider the L∗ learning algorithm proposed in [25]. L∗ creates a series of observation tables to incrementally record and maintain the information whether traces in Σ∗ belong to U . An observation table is a three-tuple (S, E, T ) consisting of: a non-empty finite set S of prefix-closed traces, a non-empty finite set E of suffix-closed traces and a Boolean function, called a membership query, T : (S ∪ SΣ)E → {0, 1}. Once the observation table is closed and consistent [25], a candidate DFA M (S, E, T ) = (Q, q0 , δ, Qm ) over the alphabet Σ is constructed. If L(M ) = U , where L(M )is the generated language of M [50], then the oracle returns “True” with the current DFA M ; otherwise, a counterexample c ∈ (U − L(M )) ∪ (L(M ) − U ) is generated by the oracle. L∗ then adds all its prefixes c to S, which reflects the difference CoSMoP solves Problem 2 in three stages. First, it designs offline a set of safe motion primitives P i∗ for each robot Ri to provide necessary maneuvers to complete a given task. We omit the index i from now on because the controllers are identical for all robots in this paper. Second, for each primitive π j ∈ P ∗ : j ∈ NP , it designs offline the corresponding 9 vehicle is stopped, and the obstacle runs into it. This property does not use the ICC (Inevitable Collision State) concept [57] because the limited range of the sensors readings and the limited knowledge assumed about the moving obstacles kinematics give limited awareness of the environment. Therefore, the controller cannot ensure that it will always find a collision-free motion. The robots motion σ is a sequence of arcs u ∈ σ in twodimensional space such that the translational velocity is nonnegative, the absolute value of the angular velocity is Ω and the maximum cycle time is . An arc u ∈ σ : σ = {u1 , u2 , ..., un } is specified by the translational v and angular ω velocities and cycle time T , i.e. u = hv, ω, T i. The domain of the arcs is U = {u ∈ R3 : v ≥ 0, |ω| ≤ Ω, 0 ≤ T ≤ }. Several types of robots can realize a motion σ, such as differential drive, Ackermann drive, single wheel drive, synchro drive, or omni drive robots [58]. Therefore, the trajectory realized by the Pioneer P3-DX is a motion σ. Furthermore, this motion can be modeled in dL to find a set Usaf e ⊆ U such that ensures the passive safety property. Fig. 7. CoSMoP framework. specification φjπ in CLTLB(D) formula to the global layer, where φjπ is a specification to be satisfied and the conjunction the specifications for all primitives is denominated V motion primitives specification φP (M), i.e. φP (M) ≡ j∈NP φjπ . Finally, it composes a sequence of safe motion primitives i to ensure the local mission KM I and the motion primitives specification φP (M). It is solved automatically and distributively for each robot Ri . The following subsections will formally describe each of these steps illustrating with the Example 1. 6.1 The primitive GoT o implements an extended Dynamic Window Approach [59] (DWA) algorithm to avoid not only static obstacles but the ones that can be moving at a velocity up to V . We extend a path planning algorithm implemented in the ARNL library that synthesizes and executes trajectories to a given destination based on a map that can be generated using Mapper3 10 . This algorithm synthesizes two trajectories: global and local trajectories. The global trajectory is a roadmap generated by an A* that considers only the static obstacles represented on the map, such as walls. The local trajectory is the trajectory implemented using a DWA algorithm that drives along the global trajectory while avoiding unmapped obstacles such as the other robots. Design of Safe Motion Primitives In the warehouse scenario, each robot Ri requires five primitives such that P ∗ = {π 1 , ..., π 5 }, where π 1 = GoTo, π 2 = PickUp, π 3 = DropOff, π 4 = ?ObjAway (i.e. request to take an object away), π 5 = !ObjAway (i.e. respond that an object is taken away). 6.1.1 In summary, the DWA control searches for an arc u∗ at every cycle time that maximizes towards the target while avoiding a collision with obstacles that can be moving up to velocity V . It is organized in two steps. (i) First it searches for the dynamic window Udw that is a range of admissible (v, ω) pair that results in safe trajectories that the robot can realize in a short time frame T ≤  such as Udw ⊆ Usaf e . A safe trajectory is the one that does not lead to a collision with an obstacle detected by the sensors readings. (ii) Then, it finds u∗ ∈ Udw that chooses a (v, ω) pair that maximizes the progress towards the closest next destination in the global trajectory. GoTo The controller π 1 = GoTo synthesizes trajectories towards a goal position based on the actual sensors readings to avoid static and moving obstacles. It can guarantee safety concerning collisions not only for the obstacles described in the scene description M but for other obstacles such as non-controlled agents (e.g. humans or felt down boxes) and neighbors robots. Therefore, this controller allows local and distributed trajectory synthesis that satisfies safety properties for multi-agent systems. Such control system must satisfy a safety property φ1saf e after all its executions assuming that it starts in a state that satisfies φ1pre and arrives in a state that satisfies φ1post . The Fig. 8 shows a representation of this model in a transition system. Since φ1saf e depends on the environment dynamics because it must be guaranteed after all executions of π 1 , we The Pioneer P3-DX robot implements an embedded controller for the translational v and the angular ω velocities based on the maximum acceleration A, deceleration b and angular velocity Ω. Hence, the GoTo controller is responsible for finding v ∗ and ω ∗ realizable in a cycle time T that specify a motion to drive the robot forward reducing the time to destination and guaranteeing the passive safe property [56]. This property means that the vehicle will never actively collide, i.e. the collision can only occur when the 10 http://www.mobilerobots.com/Software/Mapper3.aspx, trieved 05-18-2016. 10 re- φ1pre ∧ φ1saf e φ1saf e ν µ start φ1saf e ∧ φ1post π1 π1 ··· π1 ω start φ2pre true ν µ π2 φ2pos π2 ··· π2 ω Fig. 8. Dynamic transition of the GoTo controller. Fig. 9. Dynamic transition of the PickUp controller. call this property tight coupled. Furthermore, this formula is specified as a passive safety property defined in [60] as, PROOF. From Model 1 in [60], if a translational velocity v satisfies the condition saf e for given position and parameters, then the acceleration can be any value between −b and A. Since we assume that the minimum velocity for the robot is zero (v ≥ 0), then the saf e condition only constraint the maximum of velocity v. However, the maximum translational velocity vmax is the velocity v maximum that could be reached in the next sampling time. Thus, if saf e holds true, the robot is allowed to accelerate up to A, and the maximum velocity is vmax + A. Otherwise, the robot must brake, and the maximum velocity is vmax − b.    v2 v φ1saf e ≡ v = 0 ∨ k p − po k∞ > +V 2b b where pr , po are the closest position of the robot and the nearest obstacle, respectively. The added feature in the extended DWA is that the robot will take a circular trajectory if the condition saf e, as defined below, holds true; otherwise, it will stop. This condition is a first-order logic formula which constraints the robot state variables considering the delay caused by the cycle time. 6.1.2    A A 2 saf e ≡ kpr − po k∞ > +1  + v b 2   v2 v + A + +V + 2b b Pick Up and Leave We assume that the objects in the warehouse will be picked up and dropped off by robot’s gripper with a fixed robot pose, as presented in [21]. Hence, it must satisfy a property φ2pos that ensures that the robot is carrying the object after picking it up assuming that it starts in a state that satisfies φ2pre that guarantee that the robot is in front of the object. In contrast to the GoTo primitive, this primitive is non-tight coupled controller, meaning that φ2saf e should be guaranteed only in the last state after finite executions π 2 . The transition system of this controller is shown in Fig. 9. Therefore, these properties do not depend on the robot dynamics and do not need to be verified in dL. Finally, the controller is verified for φ1saf e . Theorem 10 [60] If the controller GoTo starts in a state that satisfies φ1saf e , it will always satisfies it. φ1pre ∧ φ1saf e → [(α1 )∗ ]φ1saf e 6.1.3 where φ1pre constraint only the parameters (e.g. A > 0, b > 0, Ω > 0 and  > 0) and does not depend on any environment state, (α1 )∗ is the hybrid program presented in Model 1 in [60], and it models the execution of the controller GoTo in dL for a dynamic environment with moving obstacles with maximum velocity V . We assume that the robot is stopped temporarily during the communication events. For the request controller π 4 , the robot sends a request to have object j moved away and waits until it receives a response message. It then continues the next planned action. The response controller π 5 means that the robot will send a message to indicate that the object j is being moved. These primitives do not require tightly coupled safety property either, so they are not verified in dL. To guarantee passive safety, we solve the condition saf e and add the velocity variation with maximum acceleration A for maximum cycle time  (i.e. A) to find the maximum value for the translational velocity setpoint v ∗ . 6.2 Corollary 10.1 A circular trajectory is safe if the controller setpoint u∗ ∈ Usaf e : u∗ = hv ∗ , ω ∗ , T ∗ i such as Usaf e = {u ∈ R3 : 0 ≤ v < ν(saf e), −Ω ≤ ω ≤ Ω, 0 ≤ T ≤ }, Design of the Motion Primitives Specification From the local layer, we need to specify constraints for each designed controller π j ∈ P ∗ : j ∈ NP to the global layer. The conjunction of these constraints is called the motion primitive specification φiP (M) and is shown in the Fig. 7 as one of the inputs for the constraint generator. These constraints are formulas φjπ in CLTLB(D) which allow the global layer to omit the kinematic constraints implemented in the controller so only geometric constraints will be considered. The CLTLB(D) is an extension of linear temporal logic (LTL) for bounded satisfiability checking (BSC) [53] that the models consist of temporal logic rather than transition systems; thus, the problem encoding can be more compact  vmax + A if saf e holds true vmax − b otherwise s   2 A V 2kpr − po k∞ 2 =b · +1  + + b b b   A −b· +1 −V b ν(saf e) = vmax Request and Response to Move Object Away 11 and elegant. Moreover, it is possible to encode CLTLB(D) into satisfiability modulo theories (SMT) [52] and use SMT solver to check if the specification can be satisfied. The constraints defined in the specifications φjπ : j ∈ NP can be modeled in the dL hybrid program using the operator ?χ. Therefore, the dL formula of resulting plan si is, The formulas φjπ are specifications which constrains the states q(k − 1)i and q(k)i generated in the robot Ri global layer. A state q(k) is assigned values for states variables in the environment at instant k and the primitive taken between instants k − 1 and k. Hence, this state is defined as q(k) ∈ [qr (k) ∈ Qr ]∪[qbj (k) ∈ Qb ]∪[π(k) ∈ Qπ ] : k ∈ Nρ , where Qr , Qb and Qπ are sequences of assigned values to robot and object states variables at each instant k and assigned motion primitive to take between instants k − 1 and k, respectively. Each φjπ must ensure that, for any plan si for the robot Ri , the following two conditions hold: δ,1 δ,1 δ,1 δ,1 ∗ φδ,1 pre ∧ φsaf e → [(α ) ; ?(φsaf e ); ?(φpost ); δ,2 δ,1 δ,2 δ,2 ∗ ?(φδ,2 saf e ∧ φpre ); (α ) ; ?(φsaf e ); ?(φpost ); ··· i δ,k δ,k The specifications φδ,k saf e , φpre and φpost are safety properties in dL formulas for the primitive assigned at instant k (i.e. δ i (k) ∈ P : k ∈ N i ). If those conditions hold true, any plan generated in the global layer that satisfies φP (M) will guarantee the safety properties. Furthermore, the reachable states after any execution of the controller π δ,k ∈ P assigned in δ(k) will be constraint to satisfies iniδ,k δ,k δ,k tially φδ,k and it pre ∧ φsaf e , φsaf e after any execution of π 6.2.1 start ν µ π δ,1 π δ,1 ··· π δ,1 υ π δ,2 ··· i i δ,K φδ,K saf e ∧ φpost π δ,K i ω Since the controllers π δ,k can be reactive, we assume that they will execute finite times until reaching the goal state δ,k that satisfies φδ,k post . Thus, the safety property φsaf e must be ensured in the intermediate states. Let αδ,k is the dL hybrid program that models π δ,k , thus, the transition system can be modeled using dL formulas as in the figure below. start i,1 φi,1 pre ∧ φsaf e i,2 i,2 φi,1 post ∧ φpre ∧ φsaf e ν µ [αδ,1∗ ]φi,1 saf e [αδ,2∗ ]φi,2 saf e Theorem 12 There exists a trajectory between q i (k−1) and q i (k) which satisfies the controller safety property φ1saf e , φi,K post ··· [αδ,K∗ ]φi,K saf e GoTo The controller π 1 requires a tightly coupled safety property; thus we need to ensure that φ1saf e is satisfiable for at least one trajectory between any planned q i (k − 1) and q i (k) states. However, we assume φ1pre ≡ true and φ1post ≡ true here because these properties do not depend on the geometry or dynamics in the environment, considering that all parameters are correctly assigned (e.g. A > 0 ≡ true). These assumptions leave the primitive free to drive the robot to the positions required by the other primitives. Note that φ1saf e is also an invariant property, as shown in Theorem 10, so we can use it to reason the existence of a safe trajectory. The global layer omits dynamic constraints; as a result, it is assumed that the minimum robot velocity is zero (v > 0), and the obstacles are static (V = 0). From the Corollary 2.1 in [21], the Go To specification φ1π in CLTLB(D) should guarantee that there exists a trajectory that the robot fits in between the initial and goal state using a linear arithmetic relation. PROOF. The transition system of the plan si is represented in the figure below. δ,1 δ,2 δ,2 φδ,1 saf e ∧ φpost ∧ φpre ∧ φsaf e i In the next subsections, the specifications φjπ for each safe motion primitive are designed. i Theorem 11 If a plan s with size K satisfies φP (M) (i.e. si  φP (M)) for a given scene description M and the safe V motion primitives are safe (i.e. ∀j∈NP φjpre ∧ φjsaf e → [(αj )∗ ]φjsaf e is valid), then this plan is also safe (i.e. si  V δ,k k∈N φsaf e ). φδ,1 saf e i V We know that ∀j∈NP φjpre ∧φjsaf e → [(αj )∗ ]φjsaf e is valid, it means that any initial state that satisfies φjpre ∧ φjsaf e can execute any finite times π j modeled as hybrid program αj that it will lead to a state that is safe, i.e. satisfies φjsaf e . Hence, it is sufficient that the global layer find a plan si that satisfies φP (M) to satisfy the Eq.3 and, consequently, the safety property of all motion primitives for the robot Ri in the scene description M. δ,k+1 δ,k+1 will satisfy φδ,k before execute the next post ∧ φsaf e ∧ φpre δ,k+1 assigned controller π . δ,1 φδ,1 pre ∧ φsaf e i By applying the rules [; ] and [?] [22], we find the equivalent formula,   δ,1 δ,1 δ,1 δ,1 ∗ φδ,1 pre ∧ φsaf e → [(α ) ](φsaf e ) → φpost →   δ,2 δ,2 δ,2 δ,2 ∗ φδ,2 saf e ∧ φpre → [(α ) ](φsaf e ) → φpost → (3) ···   i δ,K i δ,K i δ,K i δ,K i ∗ φδ,K ) ](φsaf saf e ∧ φpre → [(α e ) → φpost • For each k ∈ N i , φδ,k saf e is satisfiable for at least one i trajectory between q (k − 1) and q i (k). δ,k i • For each k ∈ N i , q i (k − 1)  φδ,k pre and q (k)  φpost . i i δ,K δ,K δ,K ∗ δ,K ?(φδ,K ) ]φsaf e → φpost saf e ∧ φpre ); (α ω 12 i,j i,j,y i,j, y i,j,x i,j, x j • rlef t,o ≡ (¬isY )?rlef t,o ∧ rlef t,o : rlef t,o ∧ rlef t,o ; i,j i,j,y i,j, y i,j,x i,j, x • rright,o ≡ (¬isY j )?rright,o ∧rright,o : rright,o ∧rright,o ; j i,j,y j j a .l • rbelow,o ≡ qri .y ≤ mk · qri .x + bk − 2i (1 + mk ); i,j, y • rbelow,o ≡ qri .y ≤ mjk · qri .x + bjk − ai .l 2 (1 + mjk ); i,j,x • rbelow,o ≡ qri .x ≤ mjk · qri .y + bjk + • • (a) (b) i,j rabove,o • i,j rbelow,o and • n i qr } • i,j rlef t,o Fig. 10. Regions and in (a) and i,j rright,o (b). a sequence of n waypoints { q i , ..., if there in exists r which the robot Ri starts at the initial state qri and reaches a goal state n qri that satisfies the following two conditions. First, all pairs of states l−1 qri and l qri in this sequence (i.e. l ∈ {1, ..., n}) are in region below, above, left or right of all objects line segments oj : j ∈ NO . Second, the environment is fair, meaning that obstacles not in the scene description do not lead the robot Ri executing the primitive GoTo (i.e. π 1 ) to a deadlock. In this definition, it is used the a.t.t. operator l as shorthands for l implications of (e.g. 2 = ), where l = 0 means no implication. • • • • • • • • • • PROOF. First, since it is a fair environment, then a trajectory that is safe for static obstacles is enough to ensure the existence a safe trajectory for a dynamic environment with moving obstacles. Second, the robot states qri and qri constrained in one of the regions below, above, left or right of a line segment oj , as shown in the Fig. 10, ensure the existence of a safe trajectory. This safe trajectory may be straight line trajectory that guarantees φ1saf e by using the Corollary 2.1 in [21]. Moreover, those regions intersect with each other, causing the existence of waypoints which is inside of more than one of these areas. Hence, it allows finding intermediate trajectories to link two states which are not in the same region. Therefore, if a sequence of waypoints { qri , ..., n qri } is found, there is a composition of two or more straight trajectories which leads a initial state qri to a goal state n qri . Furthermore, those trajectories and their composition satisfy the safety property φ1saf e when executing the primitive GoTo. Therefore, any pair of states qri and satisfy the following specification, • • • • • the operator (relation)?value1 : value2 returns value1 if relation holds true, otherwise value2. i,j i,j i,j i,j Note that if a constraint rbelow,o , rabove,o , rlef t,o or rright,o holds true, then the states qri and qri are in the regions below, above, left or right, respectively. And similarly we have φi,B GoT o to avoid colliding into objects that are not being carried (i.e. ¬qbj .p) and not away (i.e. ¬gbj .a). Thus, the initial qri and goal qri states should be to the left, right, below or above  i,j of all objects (i.e. rlef ≡ max( qri .x, qri .x) ≤   t,b  i,j qbj .x−di,j , rright,b ≡ min( qri .x, qri .x) ≥ qbj .x+di,j ,   i,j i,j rbelow,b ≡ max( qri .y, qri .y) ≤ qbj .y − di,j , rabove,b ≡   b .l+a .l j j i min( qri .y, qri .y) ≥ qb .y + di,j , where di,j = ), 2 qri for robot i should h φi,O ≡ ∀j ∈ N :2 (π = GoTo) → O GoT o i,j i,j i,j i,j rbellow,o ∨ rabove,o ∨ rlef t,o ∨ rright,o j ai .l 2 (1 + mk ); i,j, x rbelow,o ≡ qri .x ≤ mjk · qri .y + bjk + a2i .l (1 + mjk ); i,j,y rabove,o ≡ qri .y ≥ mjk · qri .x + bjk + a2i .l (1 + mjk ); i,j, y rabove,o ≡ qri .y ≥ mjk · qri .x + bjk + a2i .l (1 + mjk ); i,j,x rabove,o ≡ qri .x ≥ mjk · qri .y + bjk − a2i .l (1 + mjk ); i,j, x rabove,o ≡ qri .x ≥ mjk · qri .y + bjk − a2i .l (1 + mjk ); i,j,y j j j ai .l i i rlef t,o ≡ qr .y ≤ m⊥ · qr .x + b⊥,i − 2 (1 + m⊥ ); i,j, y j j a .l rlef t,o ≡ qri .y ≤ m⊥ · qri .x + b⊥,i − 2i (1 + mj⊥ ); i,j,x j j j ai .l i i rlef t,o ≡ qr .x ≤ m⊥ · qr .y + b⊥,i + 2 (1 + m⊥ ); i,j, x rlef qri .x ≤ mj⊥ · qri .y + bj⊥,i + a2i .l (1 + mj⊥ ); t,o ≡ i,j,y rright,o ≡ qri .y ≥ mj⊥ · qri .x + bj⊥,f + a2i .l (1 + mj⊥ ); i,j, y rright,o ≡ qri .y ≥ mj⊥ · qri .x + bj⊥,f + a2i .l (1 + mj⊥ ); i,j,x rright,o ≡ qri .x ≥ mj⊥ · qri .y + bj⊥,f − a2i .l (1 + mj⊥ ); i,j, x rright,o ≡ qri .x ≥ mj⊥ · qri .y + bj⊥,f − a2i .l (1 + mj⊥ ); j isY ≡ |oj .yf − oj .yi | ≤ |oj .xf − oj .xi |; o .x −o .x o .y −o .y mjk = (isY j )? ojj .xff −ojj .xii : ojj .yff −ojj .yii ; o .y −o .y o .x −o .x mj⊥ = (¬isY j )? − ojj .yff −ojj .yii : − ojj .xff −ojj .xii ; bjk = (isY j )?oj .yi − mjk · oj .xi : oj .xi − mjk · oj .yi ; bj⊥,i = (¬isY j )?oj .yi − mj⊥ · oj .xi : oj .xi − mj⊥ · oj .yi ; bj⊥,f = (¬isY j )?oj .yf −mj⊥ ·oj .xf : oj .xf −mj⊥ ·oj .yf ; i h φi,B ≡ ∀j ∈ N : 2 (π = GoTo) ∧ ¬qbj .p ∧ ¬qbj .a → B GoT o i i,j i,j i,j i,j rlef ∨ r ∨ r ∨ r t,b right,b bellow,b above,b , where i,j i,j,y i,j, y i,j,x i,j, x • rbelow,o ≡ (isY j )?rbelow,o ∧rbelow,o : rbelow,o ∧rbelow,o ; Finally, the robot should’t change any object state (i.e. plstatic ≡ qbl .p = qbl .p and alstatic ≡ qbl .a = qbl .a) when i,j i,j,y i,j, y i,j,x i,j, x • rabove,o ≡ (isY j )?rabove,o ∧rabove,o : rabove,o ∧rabove,o ; 13 j,l, y j,l, x j • bj,l above,o ≡ (isY )?babove,o : babove,o ; executing GoT o, so, we have, φiGoT o j,l, y j,l, x j • bj,l lef t,o ≡ (¬isY )?blef t,o : blef t,o ; i h ^  plstatic ∧ alstatic ∧ ≡2 π = GoTo → j,l, y j,l, x j • bj,l right,o ≡ (¬isY )?bright,o : bright,o ; l∈NB φi,O GoT o 6.2.2 ∧ φi,B GoT o PickUp and DropOff We assume that the robot can only pick up the object when qr2 .α = 0°. Hence, to pick an object up, the robot cannot be carrying any object (i.e. ¬qbl .p) and will carry the object j (i.e. pj,l qbl .p) ∧ (j 6= l → ¬ qbl .p)). carry ≡ (j = l → Also, the robot initial and goal states will not change (i.e. i ≡ (qri .x = qri .x) ∧ (qri .y = qri .y) ∧ (qri .α = rstatic i,j i qr .α)) and it will be posing in front of object (i.e. robject ≡ j j i i i (qr .α = 0.0) ∧ (qr .y = qb .y) ∧ (qr .x = qb .x − d)), y • bj,l, below,o ≡ qbj .y ≤ mlk · x • bj,l, below,o ≡ qbj .x ≤ mlk · y • bj,l, above,o ≡ qbj .y ≥ mlk · x • bj,l, above,o ≡ qbj .x ≥ mlk · y • bj,l, lef t,o ≡ qbj .y ≤ ml⊥ · x • bj,l, lef t,o ≡ qbj .x ≤ ml⊥ · y • bj,l, right,o ≡ qbj .y ≥ ml⊥ · x bj,l, right,o qbj .x ≥ ml⊥ · • ≡ bj .l l 2 (1 + mk ); b .l qbj .y + blk + j2 (1 + mlk ); b .l qbj .x + blk + j2 (1 + mlk ); b .l qbj .y + blk − j2 (1 + mlk ); b .l qbj .x + bl⊥,i − j2 (1 + ml⊥ ); b .l qbj .y + bl⊥,i + j2 (1 + ml⊥ ); b .l qbj .x + bl⊥,f + j2 (1 + ml⊥ ); b .l j qb .y + bl⊥,f − j2 (1 + ml⊥ ); qbj .x + blk − Therefore, h  φiDropOf f ≡ ∀j ∈ NB : 2 π = DropOffj →  i ^  i,j l l i (pj,l ) ∧ (¬ q .p) ∧ (a ) ∧ r ∧ b carry b static static lef t h  φiP ickU p ≡ ∀j ∈ NB : 2 π = P ickU pj → i ^ i,j i (¬qbl .p ∧ pj,l ) ∧ r ∧ r carry static object ∀l∈NB ∧ φi,B DropOf f ∀l∈NB Accordingly, we drop the object off at the same angle. Thus, the robot should be carrying the object j (i.e. pj,l carry ≡ (j = l → qbl .p) ∧ (j 6= l → ¬qbl .p)) and, then, not (i.e. ¬ qbl .p). Moreover, the robot will not change its the initial and final i states (i.e. rstatic ) and the object will be left next to it at 0o i,j i (i.e. blef t ≡ (qr .α = 0.0) ∧ ( qbj .y = qri .y) ∧ ( qbj .x = qri .x + d)). However, we cannot leave the object over other objects. Therefore, the next object position should be to the left, right, below or above of all other objects (i.e. bj,l lef t,b ≡    j j,l j,l j q .y ≤ qbl .y − db , bright,b ≡ qb .y ≥ qbl .y +  b  , bj,l dj,l , bj,l qbj .x ≤ qbl .x − dj,l b above,b ≡ b below,b ≡   bj .l+bl .l qbj .x ≥ qbl .x + dj,l , where dj,l ), b b = 2 ∧ φi,O DropOf f Finally, we allow changing the object position only if the robot leaves it. h φicarry ≡ ∀j ∈ NB :2 (π 6= DropOffj ) → i ( qbj .x = qbj .x) ∧ ( qbj .y = qbj .y) 6.2.3 Request and Response to Move Object Away The abstraction of request controller u4 constraints that the object state qbj .a must change from f alse to true (i.e. j aj,l qbj .a) ∧ (j 6= l → change ≡ (¬qb .a) ∧ (j = l → ¬ qbj .a)) before continuing the rest of the task. Also i the robot is static (i.e. rstatic and plstatic ) in a position that provide enough space for other robots to pick the rei,j quested object up (i.e. robot Ri away from object i, raway ≡      b .l j j qri .x ≤ qb − (bj .l + ai .l) ∨ qri .x ≥ qb + j2 ∨ qri .y ≤    qbj − a2i .l ∨ qri .y ≥ qbj + a2i .l ). Thus, φi,B DropOf f ≡ ∀j, l ∈ NB , j 6= l : h  2 (π = DropOffj ) ∧ (¬qbl .p) ∧ (¬qbl .a) →  i j,l j,l j,l bj,l ∨ b ∨ b ∨ b lef t,b right,b below,b above,b Similarly, neither over an obstacle. Hence the object should be left to the left, right, below or above of all obstacles , hh φiReq ≡ ∀j ∈ NB : 2 (π = Reqj ) →  i ^  i i,j plstatic ∧ aj,l ∧ r ∧ r static away change h φi,O ≡∀j ∈ B, l ∈ O : 2 (π = DropOffj ) → DropOf f i j,l j,l j,l bj,l lef t,o ∨ bright,o ∨ bbelow,o ∨ babove,o l∈NB For the response controller u5 , its abstraction also constraints i that the robot is static (i.e. rstatic and plstatic and alsatic ≡ l l ( qb .a = qb .a)). Furthermore, the object must already be picked up (i.e. qbj .p) and the robot state must eventually , where j,l, y j,l, x j • bj,l below,o ≡ (isY )?bbelow,o : bbelow,o ; 14 provide enough space for another robot to pick up their i,j objects (i.e. raway ). Hence,   _ (π = Reql ) U (π = GoTo) ∨ ri ≡ l∈NB   = ai .qr,0 .α) ∧ qri .x = ai .qr,0 .x) ∧ (qri .y = ai .qr,0 .y)     !Oj Away ≡ π = GoTo U (π = DropOffj )U(π = Resj ) h φiRes ≡ ∀j ∈ NB : 2 (π = Resj ) → i  ^  i i,j ∧ ♦raway plstatic ∧ alsatic ∧ rstatic qbj .p ∧ (qri .α l∈NB 6.3 Then we encode the sequential DFA mission plan with 1 nested until operator U. For example,  KM I in Fig. 5a is en coded in CLTLB(D) as (R1 pO1 )U (R1 dO1 aW1 )U(r1 ) . Composition of safe motion primitives 6.3.2 The composition of safe motion primitives is implemented in the global layer as shown in the Fig. 7 based on the i generated local mission plan KM I . Specifically, we assume that the following are given, i • a local mission KM I presented by a DFA; • a scene description M; V • a motion primitive specification φiP (M) ≡ j∈N Ui The motion primitive specifications φiP (M) for each robot Ri are the conjunctions of the specifications from each single motion primitive. For the Example 1, the specification is, φiP (M) ≡φiGoT o ∧ φiP ickU p ∧ φiLeave ∧ φicarry ∧ φΠj . φiReq ∧ φiRes Now we can compose the motion primitives by encoding the i local mission plan KM I and the motion primitive specificai tions φP (M) to Z3 SMT solver [61]. If the specifications are satisfiable, the SMT solver will output a feasible plan si . i First, we encode KM I as a CLTLB(D) specification to the SMT solver online. With these encoding, we can check if i KM I is satisfiable in the scene description M for available safe motion primitives. If yes, we find a roadmap hQir , δ i i with minimum trace length K i at the global layer that can be executed at the local layer. If the bottom-up motion planning i finds that the KM I is not feasible, it will provide feedback to require and initiate inter-agent coordination in the topdown mission planning, resulting in the re-allocation of the i local missions KM I. 6.3.1 Each state variable defined in the CLTL(D) specifications are encoded as an array of variables in the SMT solver, because Z3 is a decision procedure for the combination of quantifierfree first-order logic with theories for linear arithmetic [61]. For example, a robot Ri state qri .x is encoded as an array qr .x[k] such that k ∈ Nρ . A object state is encoded as a two dimensional array such that each element qbj .x is qb [j].x[k], where j ∈ NB and k ∈ Nρ . Further, each motion primitives π(k) ∈ Qπ will be an array such that each element is π[k], where k ∈ N because we do not assign any value at initial state. i Encoding of the local mission plan KM I We encode each event σ ∈ ΣiM I into a symbol that represents a CLTLB(D) formula that describes which reactive motion controllers can be executed. For the Example 1, the events {Ri pOj, Ri dOj aWk , ri , Oj Away} can be encoded as:  Ri pOj ≡ (π = GoTo) ∨ The a.t.t. operator can be encoded by adding or subtracting the array index, for instance, qr .x ≡ qr .x[k + 1] at instant k. Therefore, a state formula ψ, which is a formula defined as ψ ≡ p | R(ϕ1 , ϕ2 , ..., ϕn ) | ¬ψ | ψ1 ∧ ψ2 , can be encoded to quantifier-free first-order logic formulas Ψ[k], where k ∈ Nρ is the instant that ψ holds true. For instance, if ψ ≡ qb0 .p, then Ψ[2] holds true if qb0 .p holds true at instant 2.  (π = Reql ) U _ ∀l∈NB ,l6=j   π = DropOffj  Ri dOj aW1 ≡ (π = GoTo) ∨ _ Encoding to SMT solver  (π = Reql ) U Encoding temporal logic quantifiers to first order logic re quires quantifiers ∀ and ∃ in relation to the time instants. The ¬qbj .p ∧ (−1500 ≤ qbj .x ≤ −1000) ∧ (2000 ≤ qbj .y ≤ 2500) quantifier ∀k ∈ Nρ : Ψ[k] can be implemented using for   loop. The ∃k ∈ Nρ : Ψ[k] can be encoded by using an auxil_ Ri dOj aW2 ≡ (π = GoTo) ∨ (π = Reql ) U iary variable j such as ∀k ∈ Nρ : (k = j) → Ψ[k] ∧ j ∈ Nρ and, then, also encoded using a for loop. Therefore, we can ∀l∈NB ,l6=j   encode CLTLB(D) quantifiers to Z3, for example, j j j ¬qb .p ∧ (1500 ≤ qb .x ≤ 1000) ∧ (2000 ≤ qb .y ≤ 2500) ∀l∈NB ,l6=j  • 15 j ψ ⇐⇒ j ∈ Nρ ∧ Ψ[j]  V  h 2 Hence, a new plan s2 is generated for R2 that satisfies K̃M I 5 including a response primitive π , (k < j → Ψ1 [k])∧ i • ψ1 Uψ2 ⇐⇒ (k = j → Ψ2 [k]) ∧ j ∈ Nρ V • 2ψ ⇐⇒ k∈Nρ Ψ[k] h i V • ♦ψ ⇐⇒ k∈Nρ k = j → Ψ[k] ∧ j ∈ Nρ k∈Nρ s2 = {hπ1 , (1650, −1000, 0)i, hπ2 , (1650, −1000, 0)i, hπ5 , (1650, −1000, 0)i, hπ1 , (1201, 2000, 0)i, hπ3 , (1201, 2000, 0)i, hπ1 , (−2000, −2000, 0)i} • Last[ψ] ⇐⇒ Ψ[K] • ψ1 U(ψ2 ...UψN ) ⇐⇒ h V  (k < j1 → Ψ1 [k])∧  k∈N ρ     (j1 ≤ k < j2 → Ψ2 [k])∧ i · · · ∧ (k = jN → ΨN [k]) ∧     j , ..., jN ∈ Nρ ∧    1 j1 < j2 < · · · < jN Note that those plans are safe to moving obstacles including other agents. For example, when the robot R1 is executing the primitive GoTo to go to pose (1750, −1000, 0) (i.e. hπ1 , (1750, −1000, 0)i), it may encounter the robot R2 executing GoTo to go to pose (1201, 2000, 0) (i.e. hπ1 , (1201, 2000, 0)i). Thus, those robots will generate locally safe circular trajectories to avoid each other with low computation as shown in Fig. 12. Additionally, if the environment is fair, those trajectories will lead them to the goal position. If it is not and our assumption cannot be guaranteed, the robots will always be in the safe state. Hence, we can update the scene description M and search for new plans si at current state in a receding horizon strategy. Finally, let ϕ1 and ϕ2 be a.t.t.’s, the functions max(ϕ1 , ϕ2 ) and min(ϕ1 , ϕ2 ) are encoded with SMT function ite, i.e. max(ϕ1 , ϕ2 ) ≡ ite(ϕ1 > ϕ2 , ϕ1 , ϕ2 ) and min(x, y) ≡ ite(ϕ1 < ϕ2 , ϕ1 , ϕ2 ). Now, we can define a task specification in CLTLB(D) and find an integrated task and motion plan si for the scenario in the Example 1 as shown below. Example 2 If we encode the mission plans in Fig. 5 to the scene description in Example 1, the local motion plan for robots 1 and 2 will be, s1 = {hπ4 , (−2000, −2000, 0)i, hπ1 , (1750, −1000, 0)i, hπ2 , (1750, −1000, 0)i, hπ1 , (−1250, −200, 0)i, hπ1 , (−1501, 2000, 0)i, hπ3 , (−1501, 2000, 0)i, hπ1 , (−2000, −1000, 0)i} s2 = {hπ1 , (1650, −1000, 0)i, hπ2 , (1650, −1000, 0)i, hπ1 , (1201, 2000, 0)i, hπ3 , (1201, 2000, 0)i, hπ1 , (−2000, −2000, 0)i} Fig. 12. An illustration of trajectories generated by GoTo when two robots cross each other. Gray robots are initial and red are last positions. Circular trajectories are assigned towards the goal position while avoiding the collision, where the translational velocity is adjusted to ensure the safety property. However, the robot R1 plan s1 requires another robot to move the object 2 away. Therefore, the request event 1 ?O2 Away must be added to the mission plan KM I . This feedback information will be used in the mission planning level to check the feasibility of the re-allocated mission plans. To establish the inter-robot coordination, we first add a pair of request-response events (?O2 Away, !O2 Away) to the local missions in order to maintain well-posedness of the multi-robot system. The modified specifications, 1 2 deemed as K̃M I and K̃M I , are illustrated in Fig. 11, respectively. Next, we recall the compositional verification procedure stated in Section III to examine whether or not i M̃1 ||M̃2 |= KM I , where M̃i = K̃M I , i = 1, 2. It turns out that the new missions are satisfiable and the global mission can be accomplished jointly. start ?O2 Away R1 pO1 R1 dO1 aW1 Example 3 Now, we present a scenario that tests the scalability of the proposed approach. The scenario includes a square room with 10 robots and 10 objects as defined above, h O = h(−5000, −5000), (5000, −5000)i, h(5000, −5000), (5000, 5000)i, h(5000, 5000), (−5000, 5000)i, h(−5000, 5000), (−5000, −5000)i h A = h500, (−4000, 0, 0.0)i, h500, (−4000, −1000, 0.0)i, r1 h500, (−4000, −2000, 0.0)i, h500, (−4000, −3000, 0.0)i, h500, (−4000, −4000, 0.0)i, h500, (−3000, 0, 0.0)i, h500, (−3000, −1000, 0.0)i, h500, (−3000, −2000, 0.0)i, i h500, (−3000, −3000, 0.0)i, h500, (−3000, −4000, 0.0)i 1 (a) K̃M I start R2 pO2 !O2 Away R2 dO2 aW2 i r2 2 (b) K̃M I Fig. 11. New local missions for each robot. 16 h B = h100, (4000, −1000, f alse, f alse)i, ?Oi+1 Away start h100, (3800, −1000, f alse, f alse)i, h100, (3600, −1000, f alse, f alse)i, h100, (4000, −2000, f alse, f alse)i, h100, (3800, −2000, f alse, f alse)i, h100, (3600, −2000, f alse, f alse)i, h100, (4000, −3000, f alse, f alse)i, h100, (3800, −3000, f alse, f alse)i, h100, (4000, −4000, f alse, f alse)i, i h100, (3800, −4000, f alse, f alse)i . start _ ?Oi+1 Away ?Oi+1 Away Ri pOi Ri pOi !Oi−1 Away Ri pOi start Ri dOi aWi ri !Oi−1 Away Ri dOi aWi ri !Oi−2 Away Ri dOi aWi ri Finally, the robots R8 and R1 0 must respond to robots R7 and R9 , respectively. Hence, their new local missions (i.e. i = {8, 10}) are: ri start Ri pOi !Oi−1 Away Ri dOi aWi ri After synthesizing those local missions in the top-down layer and, consequently, the integrated task and motion plans in the global layer of the bottom-up layer, the robots start executing this plan. The Fig. 13 shows the initial instant, when the robots R3 , R6 , R8 and R1 0 departed from the home position to the designed objects to pick up them. Other robots are requesting them to move the corresponding objects. Subsequently, these robots have responded the moving object away for corresponding requesting robot after these objects being picked up. This communication event is shown in the Fig. 14 in the moment that robot R6 responded to robot R5 and R4 and R5 started to go pick its object up. When a robot crossed another robot way, the robot changes its trajectory reacting to the movement of the other robot every cycle time, as shown in the Fig. 15, 16 and 17. Finally, the Fig. 18 shows that all objects are dropped off to their designed position. where,  dO(i,j) ≡ (π = GoTo) ∨ ri Therefore, the robots R3 and R6 must respond to robots R1 and R2 , and to robots R1 and R2 , accordantly. Consequently, the local missions for these robots (i.e. i = {3, 6}) are: The global mission is decomposed in a set of local missions i KM I : i ∈ NA = {1, ..., 10} such as, Ri dOi aWi Ri dOi aWi Furthermore, besides to require to move other objects, the robots R2 and R5 respond a request to robots R1 and R4 , respectively. Hence, these robots local mission (i.e. i = {2, 5}) are: The main challenges added in this scenario are: first, we added strings of three objects that should require coordination with more then two robots to pick up them; second, the room is small enough to lead the robots to often cross the way of each other. Hence, we not only add number of robots, which also adds computational effort, but we add complexities in the problem. Ri pOi Ri pOi Equivalently, for robots R7 and R9 (i.e. i = {7, 9}): start start ?Oi+2 Away  (π = Reql ) ∀l∈NB ,l6=j Ri dOj aW1 ≡ dO(i,j) U(¬qbj .p ∧ qbj .(x, y) = (−4250, 4000) Ri dOj aW2 ≡ dO(i,j) U(¬qbj .p ∧ qbj .(x, y) = (−3250, 4000) Ri dOj aW3 ≡ dO(i,j) U(¬qbj .p ∧ qbj .(x, y) = (−2250, 4000) Ri dOj aW4 ≡ dO(i,j) U(¬qbj .p ∧ qbj .(x, y) = (−1250, 4000) Ri dOj aW5 ≡ dO(i,j) U(¬qbj .p ∧ qbj .(x, y) = (−250, 4000) Ri dOj aW6 ≡ dO(i,j) U(¬qbj .p ∧ qbj .(x, y) = (750, 4000) Ri dOj aW7 ≡ dO(i,j) U(¬qbj .p ∧ qbj .(x, y) = (1750, 4000) Ri dOj aW8 ≡ dO(i,j) U(¬qbj .p ∧ qbj .(x, y) = (2750, 4000) Ri dOj aW9 ≡ dO(i,j) U(¬qbj .p ∧ qbj .(x, y) = (3750, 4000) 7 Ri dOj aW10 ≡ dO(i,j) U(¬qbj .p ∧ qbj .(x, y) = (4750, 4000) Conclusion In this paper, we proposed a new framework in multi-agent system design by combining the formal top-down task decomposition and bottom up integrated task and motion planning (ITMP) approach CoSMoP in an iterative way. However, after checking the satisfiability of those local missions, it is found out that the robot R1 requires to move the objects 2 (i.e. ?O2 Away) and 3 (i.e. ?O3 Away), and, similarly, the robot R4 for its respective objects. Likewise, robots R2 requires to move the object 1, what robots R5 , R7 and R9 also requires for their corresponding objects. Thus, new local missions are generated in coordination layer coni sidering those new assumptions such as K̃M I for robots R1 and R4 (i.e. i = {1, 4}) are: Our unified framework can decompose the global mission into local missions based on which we synthesize the motion plan with pre-designed motion controllers that are proven to be safe (no active collision). Coordinations are added as necessary based on the feedbacks of CosMoP to guarantee the accomplishment of the global mission. The efficacy of the proposed method is shown in solving a warehouse example. 17 Fig. 16. This instant shows the changes in the robot R10 planned trajectory because of robot R2 movements comparing with the instant at Fig. 15. The robot R6 just drop its object off and is heading its home position, while the robot R3 is arriving at its drop off position. Thee robot R105 responded the OAway event to robot R4 . Fig. 13. Initial instant of the scenario with 10 robots and 10 objects. The robots start in their home positions, and the red robot has his planned trajectory at this instant shown in blue line. The robots that are requesting an OAway event have question marks above them. The filled dot lines in the bottom right are the objects. The others dots on top are the desired position of the objects specified in the global mission. Fig. 17. The robot R4 is avoiding others robots in its way, while the robot R10 is arriving to its drop off position. The robot R3 is heading to its home position, where the robot R6 have already arrived. Fig. 14. The instant that robot R6 picked an object up and responded the OAway event of robot R5 . The response is shown with a exclamation mark above the robot. Fig. 18. All objects where successfully left in their specified position, and the robots R1 and R4 are approaching to their home position. Fig. 15. The robot R10 in red is going to drop off position when the robot R2 is in his way. 18 References [1] R. C. Arkin, Behavior-based robotics. [21] R. Rodrigues da Silva, B. Wu, and H. Lin, “Formal design of robot integrated task and motion planning,” in Decision and Control (CDC), 2016 IEEE 55th Annual Conference on, 2016, submitted. MIT press, 1998. [22] A. Platzer, Logical analysis of hybrid systems: proving theorems for complex dynamics. Springer Science & Business Media, 2010. [2] H. Choset, K. Lynch, S. Hutchinson, G. Kantor, W. Burgard, L. Kavraki, and S. Thrun, Principles of robot motion: theory, algorithms, and implementations. MITPress, Boston, 2005. [23] C. S. Păsăreanu, D. Giannakopoulou, M. G. Bobaru, J. M. Cobleigh, and H. Barringer, “Learning to divide and conquer: applying the l* algorithm to automate assume-guarantee reasoning,” Formal Methods in System Design, vol. 32, no. 3, pp. 175–205, 2008. [3] G. E. Fainekos, A. Girard, H. Kress-Gazit, and G. J. Pappas, “Temporal logic motion planning for dynamic robots,” Automatica, vol. 45, no. 2, pp. 343–352, 2009. [4] H. Lin, “Mission accomplished: An introduction to formal methods in mobile robot motion planning and control,” Unmanned Systems, vol. 2, no. 02, pp. 201–216, 2014. [24] C. Belta, A. Bicchi, M. Egerstedt, E. Frazzoli, E. Klavins, and G. J. Pappas, “Symbolic planning and control of robot motion [grand challenges of robotics],” IEEE Robotics & Automation Magazine, vol. 14, no. 1, pp. 61–70, 2007. [5] R. R. Negenborn, B. De Schutter, and J. Hellendoorn, “Multi-agent model predictive control for transportation networks: Serial versus parallel schemes,” Engineering Applications of Artificial Intelligence, vol. 21, no. 3, pp. 353–366, 2008. [25] D. Angluin, “Learning regular sets from queries and counterexamples,” Information and computation, vol. 75, no. 2, pp. 87–106, 1987. [26] S. M. LaValle, Planning algorithms. 2006. [6] J. Ferber, Multi-agent systems: an introduction to distributed artificial intelligence. Addison-Wesley Reading, 1999, vol. 1. Cambridge university press, [27] A. Bhatia, L. E. Kavraki, and M. Y. Vardi, “Sampling-based motion planning with temporal goals,” in Robotics and Automation (ICRA), 2010 IEEE International Conference on. IEEE, 2010, pp. 2689– 2696. [7] D. M. Lyons, R. C. Arkin, P. Nirmal, and S. Jiang, “Designing autonomous robot missions with performance guarantees,” in Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on. IEEE, 2012, pp. 2583–2590. [28] S. Karaman and E. Frazzoli, “Sampling-based algorithms for optimal motion planning,” The International Journal of Robotics Research, vol. 30, no. 7, pp. 846–894, 2011. [8] D. M. Lyons, R. C. Arkin, S. Jiang, T.-M. Liu, and P. Nirmal, “Performance verification for behavior-based robot missions,” IEEE Transactions on Robotics, vol. 31, no. 3, pp. 619–636, 2015. [29] R. Olfati-Saber and R. M. Murray, “Consensus problems in networks of agents with switching topology and time-delays,” IEEE Transactions on automatic control, vol. 49, no. 9, pp. 1520–1533, 2004. [9] I. Filippidis, D. V. Dimarogonas, and K. J. Kyriakopoulos, “Decentralized multi-agent control from local ltl specifications,” in 2012 IEEE 51st IEEE Conference on Decision and Control (CDC). IEEE, 2012, pp. 6235–6240. [30] W. Ren, “On consensus algorithms for double-integrator dynamics,” Automatic Control, IEEE Transactions on, vol. 53, no. 6, pp. 1503– 1509, 2008. [10] C. Baier, J.-P. Katoen, and K. G. Larsen, Principles of model checking. MIT press, 2008. [11] M. Guo and D. V. Dimarogonas, “Multi-agent plan reconfiguration under local ltl specifications,” The International Journal of Robotics Research, vol. 34, no. 2, pp. 218–235, 2015. [31] R. Olfati-Saber, “Flocking for multi-agent dynamic systems: Algorithms and theory,” IEEE Transactions on automatic control, vol. 51, no. 3, pp. 401–420, 2006. [12] J. Tumova and D. V. Dimarogonas, “Multi-agent planning under local ltl specifications and event-based synchronization,” Automatica, vol. 70, pp. 239–248, 2016. [32] M. M. Zavlanos, H. G. Tanner, A. Jadbabaie, and G. J. Pappas, “Hybrid control for connectivity preserving flocking,” IEEE Transactions on Automatic Control, vol. 54, no. 12, pp. 2869–2875, 2009. [13] S. Karaman and E. Frazzoli, “Linear temporal logic vehicle routing with applications to multi-uav mission planning,” International Journal of Robust and Nonlinear Control, vol. 21, no. 12, pp. 1372– 1395, 2011. [33] D. V. Dimarogonas and K. J. Kyriakopoulos, “On the rendezvous problem for multiple nonholonomic agents,” IEEE Transactions on automatic control, vol. 52, no. 5, pp. 916–922, 2007. [14] Y. Chen, X. C. Ding, A. Stefanescu, and C. Belta, “Formal approach to the deployment of distributed robotic teams,” IEEE Transactions on Robotics, vol. 28, no. 1, pp. 158–171, 2012. [34] J. A. Fax and R. M. Murray, “Information flow and cooperative control of vehicle formations,” IEEE transactions on automatic control, vol. 49, no. 9, pp. 1465–1476, 2004. [15] M. Kloetzer and C. Belta, “Automatic deployment of distributed teams of robots from temporal logic motion specifications,” IEEE Transactions on Robotics, vol. 26, no. 1, pp. 48–61, 2010. [35] D. Panagou, D. M. Stipanović, and P. G. Voulgaris, “Distributed coordination control for multi-robot networks using lyapunov-like barrier functions,” IEEE Transactions on Automatic Control, vol. 61, no. 3, pp. 617–632, 2016. [16] X. C. Ding, M. Kloetzer, Y. Chen, and C. Belta, “Automatic deployment of robotic teams,” IEEE Robotics & Automation Magazine, vol. 18, no. 3, pp. 75–86, 2011. [36] E. Semsar-Kazerooni and K. Khorasani, “Multi-agent team cooperation: A game theory approach,” Automatica, vol. 45, no. 10, pp. 2205–2213, 2009. [17] M. Karimadini and H. Lin, “Guaranteed global performance through local coordinations,” Automatica, vol. 47, no. 5, pp. 890–898, 2011. [37] 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, 2009. [18] A. Partovi and H. Lin, “Assume-guarantee cooperative satisfaction of multi-agent systems,” in 2014 American Control Conference. IEEE, 2014, pp. 2053–2058. [19] A. Ulusoy, S. L. Smith, X. C. Ding, C. Belta, and D. Rus, “Optimality and robustness in multi-robot path planning with temporal logic constraints,” The International Journal of Robotics Research, vol. 32, no. 8, pp. 889–911, 2013. [38] P. Tabuada and G. J. Pappas, “Linear time logic control of discretetime linear systems,” IEEE Transactions on Automatic Control, vol. 51, no. 12, pp. 1862–1877, 2006. [39] M. Kloetzer and C. Belta, “A fully automated framework for control of linear systems from temporal logic specifications,” IEEE Transactions on Automatic Control, vol. 53, no. 1, pp. 287–297, 2008. [20] J. Dai and H. Lin, “Automatic synthesis of cooperative multi-agent systems,” in 53rd IEEE Conference on Decision and Control. IEEE, 2014, pp. 6173–6178. 19 [40] R. Bloem, B. Jobstmann, N. Piterman, A. Pnueli, and Y. Sa‘ar, “Synthesis of reactive (1) designs,” Journal of Computer and System Sciences, vol. 78, no. 3, pp. 911–938, 2012. [60] S. Mitsch, K. Ghorbal, and A. Platzer, “On provably safe obstacle avoidance for autonomous robotic ground vehicles.” in Robotics: Science and Systems, 2013. [41] P. J. Ramadge and W. M. Wonham, “Supervisory control of a class of discrete event processes,” SIAM journal on control and optimization, vol. 25, no. 1, pp. 206–230, 1987. [61] L. De Moura and N. Bjørner, “Z3: An efficient SMT solver,” in Tools and Algorithms for the Construction and Analysis of Systems. Springer, 2008, pp. 337–340. [42] C. G. Cassandras and S. Lafortune, Introduction to discrete event systems. Springer Science & Business Media, 2009. [43] H. Kress-Gazit, G. E. Fainekos, and G. J. Pappas, “Temporal-logicbased reactive mission and motion planning,” IEEE transactions on robotics, vol. 25, no. 6, pp. 1370–1381, 2009. [44] J.-C. Latombe, Robot motion planning. Springer Science & Business Media, 2012, vol. 124. [45] S. Cambon, F. Gravot, and R. Alami, “Overview of asymov: Integrating motion, manipulation and task planning,” in Intl. Conf. on Automated Planning and Scheduling Doctoral Consortium, 2003. [46] E. Plaku and G. D. Hager, “Sampling-based motion and symbolic action planning with geometric and differential constraints,” in Robotics and Automation (ICRA), 2010 IEEE International Conference on. IEEE, 2010, pp. 5002–5008. [47] Z. Littlefield, A. Krontiris, A. Kimmel, A. Dobson, R. Shome, and K. E. Bekris, “An extensible software architecture for composing motion and task planners,” in Simulation, Modeling, and Programming for Autonomous Robots. Springer, 2014, pp. 327–339. [48] C. Dornhege, P. Eyerich, T. Keller, S. Trüg, M. Brenner, and B. Nebel, “Semantic attachments for domain-independent planning systems,” in Towards Service Robots for Everyday Environments. Springer, 2012, pp. 99–115. [49] T. Wongpiromsarn, U. Topcu, and R. M. Murray, “Receding horizon temporal logic planning,” IEEE Transactions on Automatic Control, vol. 57, no. 11, pp. 2817–2830, 2012. [50] C. G. Cassandras and S. Lafortune, Introduction to discrete event systems. Springer Science & Business Media, 2008. [51] Y. Willner and M. Heymann, “Supervisory control of concurrent discrete-event systems,” International Journal of Control, vol. 54, no. 5, pp. 1143–1169, 1991. [52] M. M. Bersani, A. Frigeri, A. Morzenti, M. Pradella, M. Rossi, and P. S. Pietro, “Bounded reachability for temporal logic over constraint systems,” in Temporal Representation and Reasoning (TIME), 2010 17th International Symposium on. IEEE, 2010, pp. 43–50. [53] M. Pradella, A. Morzenti, and P. S. Pietro, “Bounded satisfiability checking of metric temporal logic specifications,” ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 22, no. 3, p. 20, 2013. [54] J. Dai and H. Lin, “Automatic synthesis of cooperative multi-agent systems,” in Decision and Control (CDC), 2014 IEEE 53rd Annual Conference on, Dec 2014, pp. 6173–6178. [55] L. Lin, A. Stefanescu, and R. Su, “On distributed and parameterized supervisor synthesis problems,” Automatic Control, IEEE Transactions on, vol. 61, no. 3, pp. 777–782, 2016. [56] K. Macek, D. A. V. Govea, T. Fraichard, and R. Siegwart, “Towards safe vehicle navigation in dynamic urban scenarios,” Automatika, 2009. [57] T. Fraichard and H. Asama, “Inevitable collision statesa step towards safer robots?” Advanced Robotics, vol. 18, no. 10, pp. 1001–1024, 2004. [58] T. Bräunl, Embedded robotics: mobile robot design and applications with embedded systems. Springer Science & Business Media, 2008. [59] D. Fox, W. Burgard, S. Thrun et al., “The dynamic window approach to collision avoidance,” IEEE Robotics & Automation Magazine, vol. 4, no. 1, pp. 23–33, 1997. 20
3cs.SY
Directional Training and Fast Sector-based Processing Schemes for mmWave Channels Zheda Li1 , Nadisanka Rupasinghe 2 , Ozgun Y. Bursalioglu3 , Chenwei Wang3 , Haralabos Papadopoulos3 , Giuseppe Caire4 1 Dept. of EE, University of Southern California, Los Angeles Dept. of ECE North Carolina State University, Raleigh, NC 3 Docomo Innovations Inc, Palo Alto, CA 4 Technische Universität Berlin, Germany [email protected], [email protected], {obursalioglu, cwang, hpapadopoulos}@docomoinnovations.com, [email protected] arXiv:1611.00453v3 [cs.IT] 19 May 2017 2 Abstract—We consider a single-cell scenario involving a single base station (BS) with a massive array serving multi-antenna terminals in the downlink of a mmWave channel. We present a class of multiuser MIMO schemes, which rely on uplink training from the user terminals, and on uplink/downlink channel reciprocity. The BS employs virtual sector-based processing according to which, user-channel estimation and data transmission are performed in parallel over non-overlapping angular sectors. The uplink training schemes we consider are non-orthogonal, that is, we allow multiple users to transmit pilots on the same pilot dimension (thereby potentially interfering with one another). Elementary processing allows each sector to determine the subset of user channels that can be resolved on the sector (effectively pilot contamination free) and, thus, the subset of users that can be served by the sector. This allows resolving multiple users on the same pilot dimension at different sectors, thereby increasing the overall multiplexing gains of the system. Our analysis and simulations reveal that, by using appropriately designed directional training beams at the user terminals, the sector-based transmission schemes we present can yield substantial spatial multiplexing and ergodic user-rates improvements with respect to their orthogonal-training counterparts. I. I NTRODUCTION 5G standardization efforts and deployments are projected to bring great performance gains with respect to their predecessors in a multitude of performance metrics, including user and cell throughput, end-to-end delay, and massive device connectivity. It is widely expected that these 5G requirements will be met by utilizing a combination of additional resources, including newly available licensed and unlicensed bands, network densification, large antenna arrays, and new PHY/network layer technologies. To meet the throughput/unit area requirements, for instance, 5G systems would need to provide much higher spatial multiplexing gains (e.g., number of users served simultaneously) than their 4G counterparts. Large antenna arrays and massive MIMO are considered as key technologies for 5G and beyond. It is expected that new generation deployments would have to utilize the cm and mmWave bands where wide chunks of spectrum are readily available. Note that the spacing of antenna arrays is proportional to the wavelength, at mmWave, so large arrays can be packed even on small footprints. Such large-size arrays will be critical in combatting with the harsher propagation characteristics experienced at mmWave. Massive MIMO, originally introduced in [1], [2], can yield large spectral efficiencies and spatial multiplexing gains through the use of a large number of antennas at the base stations (BSs). Large arrays enable focusing the radiated signal power and creating sharp beams to several users simultaneously, allowing a BS to serve them simultaneously at large spectral efficiencies. In order to achieve large spectral efficiencies in the downlink (DL) via multiuser (MU) MIMO, channel state information at the transmitter (CSIT) is needed. Following the massive MIMO approach [2], CSIT can be obtained from the users’ uplink (UL) pilots via Time-Division Duplexing (TDD) and UL/DL radio-channel reciprocity. This allows training large antenna arrays by allocating as few UL pilot dimensions as the number of single-antenna users simultaneously served. As is well known, with isotropic channels, the number of users that can be simultaneously trained (or the system multiplexing gains) is limited by the coherence time and bandwidth of the channel [3], [4]. Noting that the coherence time is inversely proportional to the carrier frequency, increasing the carrier frequency ten-fold, e.g., from 3 GHz to 30 GHz, results in a ten-fold decrease in coherence time, and, thereby, in the number of user channels that can be simultaneously trained within the coherence time of the channel. In this paper we focus on single-cell DL transmission over a mmWave channel, enabled by UL training and UL/DL channel reciprocity [5]. We take advantage of the sparsity of mmWave channels in the angular domain to devise schemes that yield increases in the system spatial multiplexing gains. Indeed, typical mmWave channels are characterized by fewer multipath components than channels at lower frequencies [6], [7], [8], [9] resulting in a sparser angular support, both at the BS and the user terminal. This channel sparsity can be exploited to train multiple user channels simultaneously, that is, training multiple users using the same pilot dimension. We consider a combination of non-orthogonal UL training from the user terminals based on pilot designs in [10] and sector-based processing and precoding from the BS with the goal to increase aggregate spatial multiplexing gains and user rates. The challenge with more than one user transmitting pilots on the same pilot dimension is pilot contamination which can substantially limit massive MIMO performance, as the beam used to send data (and therefore beamforming) to one user also beamforms unintentionally at the other (contaminating) user terminal. k is the M ˆ M̃ matrix1 [6], [13]: In this work, multiple users, each equipped with many antenna elements and a single RF chain, are scheduled to transmit beamformed pilots on the same pilot dimension, thereby increasing the number of users simultaneously transmitting pilots for training. We exploit the presence of a massive Uniform Linear Array (ULA) at the BS and a form of pre-sectorization in the Angle of Arrival (AoA) domain. Elementary processing at each sector allows determining the subset of user channels that can be resolved on the sector, effectively pilot contamination free. Each sector then serves only the subset of users whose channels it can resolve. This allows resolving multiple users on the same pilot dimension at different sectors, thereby increasing the overall multiplexing gains of the system. where Np is the number of paths, and βn and τn denote the complex gain and relative delay, respectively, associated with the n-th path2 . The M ˆ 1 vector apθq and the M̃ ˆ 1 vector ãpθq represent the array response and steering vectors, and are 1-periodic in θ. The normalized angle θ is related to the physical angle φ (measured with respect to array broadside) as θ “ D sinpφq, where D is the antenna spacing between two antenna elements normalized by the carrier wavelength. Assuming a maximally spread channel in angular domain, the support of both apθq and ãpθq are r´1{2, 1{2s, as in [6]. In this paper, we assume TDD operation and focus on DL data transmission enabled by UL pilot transmissions from the user terminals and reciprocity-based training [2]. As a result, in the case of uplink pilot (downlink data) transmission, θn and θ̃n denote the n-th path angles of arrival (departure) and departure (arrival). Spatial filtering can be applied at both the BS and the user terminal side. Given that each user terminal has a single RF chain, a user may transmit its pilot on an arbitrary M̃ ˆ 1 beam b. Letting αn pbq “ βn ãH pθ̃n qb, and using Ppbq to denote the set of indices of paths that are excited with user’s UL transmission via beam b, the physical model for the vector channel can be written as follows: ÿ hk pf q “ hk pf ; bq “ αn pbqapθn qe´j2πτn f . (1) Our approach has strong connections but also important differences with respect to joint spatial division and multiplexing (JSDM), a two-stage method proposed in [11]. JSDM partitions users into groups with approximately similar channel covariances, and exploits two-stage downlink beamforming. In particular, precoding comprises a pre-beamformer, which depends on the user-channel covariances and minimizes interference across groups, in cascade with a MU MIMO precoder, which uses instantaneous CSI to multiplex users within a group. Using JSDM, two users with no overlapping AoA support in their channels can be trained and served simultaneously. JSDM has also been studied over mmWave band channels [12]; assuming full knowledge of the angular spectra of all the users, user scheduling algorithms were devised to maximize the spatial multiplexing, or received signal power. Our work similarly harvests spatial multiplexing gains, but the support of each user’s spectra are not a priori known and no special scheduling is employed. We also study how varying the user beam width can affect these harvested multiplexing gains. Indeed, using a directional beam at a user terminal makes its user-channel sparser in terms of the number of sectors that are excited at the BS, thereby leaving more sectors available to resolve other users’ channels. Our analysis and simulations reveal that a proper choice of the user beam width can positively impact both multiplexing gains and long-term user rates. II. S YSTEM M ODEL We consider a single-cell scenario, involving a single BS serving Ktot user terminals. The BS is equipped with an M -element ULA and M RF chains (i.e., one RF chain per antenna), while each terminal is equipped with an M̃ -element ULA and a single RF chain. We assume OFDM and a quasistatic block fading channel model whereby the channel of the k-th user stays fixed within a fading block (within the coherence time and bandwidth of the channel). During a given fading block, the channel response between the BS and user Hk pf q “ Np ÿ βn apθn qãH pθ̃n qe´j2πτn f , n“1 nPPpbq ‰ “ ∆ We let Rk “ E hk pf qhH k pf q denote the k-th user channel covariance matrix and note that, due to uncorrelated scattering, Rk is independent of the tone index, f . Given that our focus is on the large M case, we will assume that the DFT matrix whitens Rk and, as a result, Rk is circulant3 . Hence, the eigendecomposition of Rk is given by Rk “ FΛk FH , with F denoting the M ˆ M DFT matrix, and Λk “ diag pλ1,k . . . , λM,k q where λ1,k . . . , λM,k are the eigenvalues of Rk . The MU MIMO schemes we consider in this paper combine a form of spatial division and multiplexing based on instantaneous CSI. The schemes rely on a form of presectorization in the AoA domain. First hk pf q is projected onto F to generate the M ˆ 1 vector of channel observations H ∆ gk pf q “ F hk pf q. Subsequently, the M entries of gk pf q are split into S non-overlaping “sector” groups. In particular, assuming without loss of generality, that g “ M {S is an integer, each sector comprises g consecutive entries of gk pf q.4 1 We assume reciprocal uplink and downlink channels hence we use H pf q k for both. See [5]. 2 For notational convenience, we have suppressed the dependence of N , p βn , τn , θn and θ̃n on the user index k. 3 Indeed, for ULAs with large M , the eigenvectors of the channel covariance matrix are accurately approximated by the columns of a DFT matrix [11]. 4 If M is not divisible by S, groups of different sizes can be arranged. We let gs,k pf q denote the g ˆ 1 vector associated with sector s for s P t1, 2, . . . , Su: gs,k pf q can be expressed as H gs,k pf q “ Fs hk pf q, (2) where the M ˆ g matrix Fs comprises the s-th set of g consecutive columns of F. It is worth “remarking that, ‰ since the entries of gk pf q are uncorrelated (E gk pf qgkH pf q “ Λk ); in this way the M ˆ 1 channel vector between a single BS and a user is turned into S orthogonal g ˆ 1 sector channels with uncorrelated entries. We define the average channel gain between a user k and a sector s as follows: sg ÿ 1 λi,k . (3) λ̄s,k “ g i“ps´1qg`1 In the schemes we consider, the UL pilot transmissions by the user terminals allow each sector to detect the subset of the users it sees with sufficiently high pilot SINR, and subsequently serve the associated user streams with a form of zero-forced beamforming. In the baseline training schemes where each user is given a dedicated UL pilot dimension and is thus not interfered by the other users’ pilots, user k is considered to have a high pilot SINR in sector s as long as λ̄s,k exceeds some predetermined threshold γ as the user’s pilot is not interfered with other users’ pilots. We also investigate the viability of non-orthogonal training schemes according to which multiple users are assigned on the same UL pilot dimension. In this case, if the pilots of multiple users using the same pilot dimension are received at sufficiently high power at a given sector (i.e., UL pilots collide at this sector), none of these user channels are resolvable. With non-orthogonal training, user k is considered resolvable in sector s if no collision is declared in its dedicated pilot dimension on sector s, and λ̄s,k exceeds γ. Details of detecting high pilot SINR (or, resolvable) users are given in Sec. IV. With non-orthogonal training, given τ dimensions per quasistatic fading block are used for UL training, each sector can at most serve simultaneously τ users per fading block. A user can be served by more than one sector at a time and each sector can serve more than one user at a time.5 The instantaneous multiplexing gain over a fading block is thus the number of users that are served (by at least one sector) in that block and can exceed the available pilot dimensions, τ . With orthogonal training, the multiplexing gains are upperbounded by the number of scheduled users τ . As (1) reveals, the choice of the beam b employed by the user terminal to transmit its UL pilot affects Ppbq, the set of indices of paths that are excited. As explained in Appendix A, different training beams may excite different paths but also different numbers of paths. In fact, the sparsity of the user channel in the AoA domain (as reflected by the number of λ̄s,k ’s exceeding γ) can be controlled by the choice of the user beam width. In Secs. III-IV we describe UL training and 5 Note that, although a user’s stream transmissions from different sectors are precoded independently, they coherently combine at the user terminal. precoding schemes and tools for analyzing their performance for the case that each user employs a fixed but arbitrary beam for UL pilot transmission (and DL data reception). Subsequently, Sec. V studies the effect of the beam width choice on multiplexing gains and user rates. It is worth noting that [12] also uses sparsity in AoA domain in the mmwave band to increase multiplexing gains. In [12], the Λk ’s are assumed to be known prior to scheduling. Indeed, various user scheduling algorithms are designed to assign users to individual eigen directions based on knowledge of the Λk ’s. In contrast, our work does not assume knowledge of the eigenvalues λi,k ’s or λ̄s,k ’s to schedule transmission of user streams in each sector. III. DL MU-MIMO P RECODING In this section we describe the DL precoding schemes under consideration. We assume wideband scheduling, according to which a scheduling slot comprises Q ą 1 concurrent fading blocks, an let τ denote the number of available orthogonal pilot dimensions per fading block. Each fading block can be viewed as spanning a contiguous set of time-frequency elements in the OFDM plane that are within the coherence bandwidth and time of the user channels. Since the fading blocks in a slot are concurrent (i.e., distinct fading blocks span distinct subbands over the same set of OFDM symbols), we index the fading blocks in a slot using a fading-block frequency index f P t1, 2, ¨ ¨ ¨ , Qu. With this interpretation gs,k pf q in (2) denotes to the channel of user k in sector s and fading block f . We assume L users (out of the total of Ktot users served by the BS) are scheduled (in round robin fashion) per slot by the BS. In the context of the baseline orthogonal training scheme, the BS schedules L “ τ users per scheduling slot for UL pilot transmission. Thus τ users send orthogonal pilots on each fading block, i.e., one user per pilot dimension (K “ 1). With non-orthogonal UL training, as in [10], the BS schedules L “ Kτ users per slot for some K ą 1. Hence, K ą 1 users send pilots per pilot dimension. We use σk to denote the pilot dimension used by user k, and Kσ to denote the indices of users assigned to pilot dimension σ for 1 ď σ ď τ . We consider DL transmission over a generic slot, and assume without loss of generality that the scheduled users have indices from 1 to L. Assuming user k uses the same beam b “ bk for UL pilot transmission and as a receive front-end in the DL MIMO phase, the received signal at user k over one channel use within fading block f is given by ? (4) rk “ ρd xT pf q hk pf q ` nk , where x is the precoded signal, and where nk represents IID noise with nk „ CN p0, 1q and ρd is the DL SNR. In the MU-MIMO schemes we consider, precoding is sector based. In particular, based on UL training, each sector resolves the channels of a subset of the L users and serves them simultaneously. We let Xs,k “ 1rγ, 8q pλ̄s,k q (5) “ ‰ where uT “ u1 u2 . . . uL is the information bearing signal with uk „ CN p0, 1q, and “ ‰ Vs pf q “ vs,1 pf q vs,2 pf q . . . vs,L pf q (11) Sec. 1 X1,1 = 1 X1,2 = 0 Sec. 2 X 2,1 = 1 X 2,2 = 1 D1,1 = 1 D2,1 = 0, D2,2 = 0 User 1 Sec. 3 D3,2 = 1 X3,1 = 0 X3,2 = 1 Sec. 4 User 2 X 4,1 = 0 X 4,2 = 0 Fig. 1. Example of resolving two user channels on a common pilot dimension on each of the first 4 sectors of a BS. denote whether or not user k is present on sector s and Xs “ tk; Xs,k “ 1u (6) denote the set of all users that are present in sector s. In the precoding schemes we consider, user k is resolved on sector s (and thus will be served by sector s) if and only if Xs,k “ 1 and there is no other user k 1 sharing the same dimension as user k for which Xs,k1 “ 1. Specifically we let Ds,k denote whether or not user k’s channel can be resolved on sector s: fi » ź p1 ´ Xs,k1 qfl , (7) Ds,k “ Xs,k – k1 PKσk ztku Ds “ tk; Ds,k “ 1u (8) be the subset of present users whose channels are resolvable in sector s. Fig. 1 shows an example, involving two users using a common pilot dimension, a BS and four of its sectors, and two scatterers. As the figure reveals, user 1 is present in sectors 1 and 2, while user 2 is present in sectors 2 and 3. As a result, the channel of user 1 is resolvable in sector 1, the channel of user 2 is resolvable in sector 3, and neither user channel is resolvable in sector 2 or 4. In general, not all present users are resolvable and we have Ds Ď Xs . Indeed, as inspection of (7) reveals if there are two users k and k 1 present in sector s (i.e., Xs,k “ Xs,k1 “ 1) that use the same pilot dimension (i.e., with σk “ σk1 ), we have Ds,k “ Ds,k1 “ 0. This is consistent with the fact that neither channel can be resolved due to the pilot collision. The number of sectors that can resolve (and thus will serve) user řS k is hence given by Nk “ s“1 Ds,k , while the number of users that are actually served in the slot is given by L1 “ |tk; Nk ą 0u| (9) and, in general, L1 ď L. In this paper we focus on a particular form of linear zeroforced beam-forming. All L1 users are given equal power, that is, power ρd {L1 . Furthermore for any served user k, the power allocated to its stream is equally split across all sectors that resolved the user’s channel. Hence, the k-th user’s stream receives power ρd {pL1 Nk q from each sector that serves the user. The precoded 1 ˆ M signal transmitted by the BS is given by S ÿ xT pf q “ uT pf qVsH pf qFH (10) s s“1 denotes the g ˆ L precoder at sector s and fading block f . In particular, vs,k pf q “ 0 for any k R Ds . For any k P Ds , vs,k pf q is in the direction of the unit-norm vector that is zeroforced to all other resolvable user-sector channel estimates, i.e., to tĝs,k1 pf q; k 1 P Ds ztku u where tĝs,k u’s denote the estimates of tgs,k u’s. Also }vs,k pf q}2 “ 1{pL1 Nk q. Note that with this type of precoding, Vs pf q is invariant to any scalar (and complex) scalings of any of the ĝs,k pf q, for k P Ds . Substituting the expression for xpf q from (10) in (4), and using the fact that hk pf q “ Fgk pf q we obtain rk “ ? ρd S ÿ uT pf qVsH pf qgs,k ` nk . s“1 IV. T RAINING , R ESOLVABLE CHANNELS AND P ERFORMANCE M ETRICS We next consider orthogonal and non-orthogonal UL training and its implications on user channel resolvability. Each scheduled user k for 1 ď k ď L is scheduled to transmit pilots on pilot dimension σk , that is, one of the τ pilot dimensions. Each pilot dimension comprises“ Q resource elements, one per ‰T fading block. We let pk “ pk p1q pk p2q ¨ ¨ ¨ pk pQq denote the UL pilot vector transmitted by user k, with pk pf q denoting the pilot value used by user k on fading block f . The received signal by the BS array that is based on the pilots transmitted by the user set Kσ on the pilot dimension σ in fading block f is given by ÿ ? hk pf qpk pf q ` wσul pf q, (12) yσul pf q “ ρp kPKσ where yσul pf q is the received vector of length M , ρp is the UL SNR, and the noise wσul is CN p0, Iq. The corresponding s-th sector observations are given by projecting yσul pf q onto Fs ÿ ? ul ul ȳs,σ pf q “ FH ρp pk pf qgs,k pf q` w̄s,σ , (13) s yσ pf q “ kPKσ ul ul H and where w̄s,σ “ FH s wσ „ CN p0, Iq, since Fs Fs “ I. A. Orthogonal training: In the orthogonal training setting, user k for 1 ď k ď τ transmits pilots on the dedicated pilot dimension σk “ k (i.e., Kσ “ tσu), and, as a result, there is no user k 1 ‰ k for which σk “ σk1 . Assuming also, without loss of generality, that pk pf q “ 1, the associated received signal in fading block f by the BS array based on the pilot transmitted by user k on the pilot dimension k (since σk “ k) from (12) is given by ? (14) ykul pf q “ ρp hk pf q ` wul pf q, while the corresponding s-th sector observations are given by ? ul ȳs,k pf q “ ρp gs,k pf q ` w̄s,k . (15) The precoder uses the following estimate of the k-th user’s instantaneous channel on fading block f and sector s: ĝs,k pf q “ ȳs,k pf q . (16) Note that this estimate does not make any use of the pilot SNR, and does not rely on knowledge of λ̄s,k . Inspection of (7) reveals, that in the orthogonal scheme, Xs,k “ Ds,k , as there is no user k 1 for which σk “ σk1 . That is, in the orthogonal scheme, a sector can resolve the channel of user k if a user is present in sector s (i.e., λ̄s,k,ě γ), and thus Xs “ Ds . Subsequently, the sector s forms Vs pf q for its resolvable user set Ds according to (11) and using ĝs,k pf q from (16) for all k P Ds . Practical schemes for detecting the set of resolvable user channels can be devised by exploiting the key fact that “ ‰ ` ˘ H E gs,k pf qgs,k pf q “ diag λps´1qg`1,k , λps´1qg`2,k , . . ., λsg,k (17) for“ each fading block ‰ ` “ f in the slot.‰˘ Noting also that E }ȳs,k pf q}2 “ tr E ȳs,k pf qȳs,k pf qH “ gpρp λ̄s,k ` 1q, we can devise simple practical detection schemes that benefit from averaging over both the g beams and the Q tones, e.g.: Q 1 1 ÿ }ȳs,k pf q}2 ´ Qρp g f “1 ρp D̂s,k “1 ¡ γ. (18) D̂s,k “0 If D̂s,k “ 1, then user k’s channel on sector s is considered as resolvable by the BS based on received UL signal. B. Non-Orthogonal training In the non-orthogonal training setting we consider, the pilots of K ą 1 users pilots are aligned on a single pilot dimension. As a result, the non-orthogonal scheme splits the L “ Kτ scheduled users uniformly across the Kσ sets, so that |Kσ | “ K for each σ P t1, 2, ¨ ¨ ¨ , τ u. It is worth noting that, given Xs (the set of present users in sector s) the set of detected and served users from sector s, Ds , is given by (8) and in general satisfies Ds Ď Xs . For example, if there is a σ for which multiple users are present in sector s, i.e., |Xs X Kσ | ą 1 then Ds Ă Xs . Such situation would correspond to a collision, that is, two or more users using the same pilot dimension are present in sector s, in which case, neither one’s channel is resolvable for transmission. Given Ds , sector s forms Vs pf q according to (11) and using ĝs,k pf q “ ȳs,σk pf q for all k P Ds where ȳs,σk pf q is given by (13). Practical detection schemes that detect which user channels are resolvable in a sector can be also readily devised. Noting ¸ ˜ ÿ “ ‰ 2 2 E }ȳs,σ pf q} “ g ρp λ̄s,k |pk pf q| ` 1 , (19) kPKσ and assuming a sufficiently large number of beams/sector, g, the RHS of (19) can be approximated by }ȳs,σ pf q}2 . This suggests that a system of Q linear equations (one per fading block on pilot dimension σ) can be used to obtain tλ̄s,k ; k P Kσ u’s. “ ‰T Letting, rs,σ “ }ȳs,σ p1q}2 }ȳs,σ p2q}2 ¨ ¨ ¨ }ȳs,σ pQq}2 , we have the following system of equations: rs,σ “ g ρp Pσ λ̄s,σ ` g1 ` noise, (20) where λ̄s,σ is a K ˆ 1 vector whose entries comprise the set tλ̄s,k ; k P Kσ u, and where row f of the Q ˆ K matrix Pσ contains the associated |pk pf q|2 values. For each k in Kσ , let also ik denote the index i for which rλ̄s,σ si “ λ̄s,k . For Q ě K, the set tpk pf q; k P Kσ , 1 ď f ď Qu can be chosen a priori so that Pσ in (20) has full column rank, and hence the presence of each user can be individually detected. One such simple detector of the presence of user k is given by 1 T 1 eik Aσ rs,σ ´ eT δσ ρp g ρ p ik X̂s,k “1 ¡ γ, X̂s,k “0 ` ˘´1 H where Aσ “ PH Pσ , and δ σ “ Aσ 1, and where en σ Pσ is the nth column of the K ˆ K identity matrix. Note that both Aσ and δ σ are independent of the user channels and can be computed offline. Subsequently user channel resolvability can be detected by substituting X̂s,m for Xs,m in (7): » fi ´ ¯ ź D̂s,k “ X̂s,k – 1 ´ X̂s,k1 fl . (21) k1 PKσk ztku Various codes can be designed when Q ě K that yield Pσ having full column rank. A full column rank matrix Pσ allows estimating each user’s large-scale response on each sector, i.e., all the tλ̄s,k u’s, thereby allowing to determine the presence of all users on all sectors. This together with (21) allows detecting the users with resolvable channels. To estimate the channels of any user k that has been resolved, however, it is also necessary that pk pf q ‰ 0, @f P t1, . . . , Qu. We remark that choosing a Pσ that is column rank allows detecting the presence of each user but is not necessary for detecting the resolvable user channels. Indeed, in the case that multiple active users (on a common pilot dimension σ) are present (i.e., collide) on a sector, the code design need only detect the collision event, and not the identities (and largescale channel gains) of the users that are present in the sector. This fact was exploited in [10] to design ON-OFF codes that are capable of resolving user channels even in cases with Q ă K (where Pσ cannot be full rank). However, pilot resource elements where a user’s pilot is OFF (i.e., the f values where where pk pf q “ 0) provide no information for channel estimation. As a result, these ON-OFF codes incur extra pilot overheads in order to enable the BS to estimate the resolved-user channels throughout the band [10]. C. Performance Metrics We consider two types of metrics in evaluating the performance of the proposed schemes. The first metric we use is the slot-averaged multiplexing gains provided by orthogonal and non-orthogonal training schemes: T ÿ y “ lim 1 L1 ptq, MG T Ñ8 T t“1 (22) where L1 ptq represents the instantaneous multiplexing gain over slot t and is given by (9). The second performance metric is based on ergodic user-rate bounds. In Appendix B, we provide closed-form rate bound expressions assuming IID channels within each sector, that is, assuming λ̄s,k “ λps´1qg`1,k “ λps´1qg`2,k “ ¨ ¨ ¨ “ λsg,k . (23) This abstraction is justified in Appendix C. D. Directional Training and Angular Spectra Sparsity As inspection of (1) reveals, the number of excited paths and thus the extent to which a trained user channel is sparse in the AoA domain depends on the choice of the user beam. Similar to the AoA domain, where projecting onto the DFT basis F both whitens and sparsifies the channel (that is, gk is both white and sparse), we consider creating the user-pilot beam as a linear combination of the AoD eigen directions,6 i.e., of the columns of the M̃ ˆ M̃ DFT matrix, F̃. In particular, we consider training beams that arise from activating a subset of eigen directions. Letting f̃i denote the i-th AoD eigen direction (i.e., the i-th column of F̃), we can describe such an M̃ ˆ 1 user training beam b in terms of an M̃ ˆ 1 vector c with zero-one entries. For each m̃, with 1 ď m̃ ď M̃ , rcsm̃ is 1 if f̃m̃ is activated (i.e., used as part of the training beam), while rcsm̃ “ 0 otherwise. We also define the training beam width as the number of activated eigen directions, that is w “ 1T c “ řM̃ corresponding training m̃“1 rcsm̃ . Consequently given c, the ? beam b is given by b “ bpcq “ F̃c{ w. Note that w “ 1 corresponds to the user training on a beam with the narrowest possible width, while w “ M̃ corresponds to omni training. V. S IMULATIONS AND C ONCLUSION In this section, we study the multiplexing gains and userthroughput performance of the proposed schemes with orthogonal training (K “ 1) and non-orthogonal training (K ą 1). In order to study the effects of user beam width on channel sparsity in the AoA domain and, subsequently, on multiplexing gains and user throughput, we consider a probabilistic connectivity channel model between each elemental training eigen direction in tf̃m̃ ; 1 ď m̃ ď M̃ u and each of the S BS sectors. Specifically, we model the connection between BS sector s and a directional beam f̃m̃ from user k as a Bernoulli random pm̃q variable Xs,k with success probability p. We also model the pm̃q Xs,k ’s as IID7 in s, k, and m̃. pm̃q In addition, we use λ̄s,k to denote the λ̄s,k induced on sector s when user k training with elemental eigen direction b “ f̃m̃ , and model it as follows: # pm̃q UrλL , λH s if Xs,k “ 1, pm̃q λ̄s,k „ pm̃q 0 if Xs,k “ 0, 6 For further details regarding how directional training sparsifies the channel in the AoA domain, see Appendix A. 7 In general, PrrX pm̃q “ 1s is, s, k, and m̃ dependent. In addition, X pm̃q ’s s,k s,k may be dependent random variables. Indeed, for two users k and k1 nearby pm̃q pm̃1 q it is possible that Xs,k and Xs,k1 are strongly correlated for some specific training directions m̃ and m̃1 . Although important in their own right, such spatial consistency investigations are beyond the scope of this paper. For spatial consistency investigations, see [14]. for some λL , λH with λH ą λL ą 0 and where U ra, bs denotes a uniform distribution in ra, bs. Consequently, using a beam bk “ bpck q with beam width wk “ wpck q results in λ̄s,k “ λ̄s,k pbk q “ M̃ 1 ÿ pm̃q λ̄ rck sm̃ . wk m̃“1 s,k (24) It can be readily verified that, by choosing as a threshold in (5) a value of γ in the range 0 ă γ ă λL {M̃ , and using λ̄s,k pbk q as in (24) the resulting Xs,k in (5) satisfies Xs,k “ pm̃q Xs,k pbk q “ ORm̃; rck sm̃ “1 Xs,k . Consequently, when user k uses a given training beam bk of beam width wk , we have P pXs,k “ 1q “ qpwk q, (25) ∆ where qpwq “ 1 ´ p1 ´ pqw . Also, the Xs,k ’s are IID in s, k. We focus on the case where all users choose beams with the same beam width w, and study the resulting multiplexing gains and user throughputs as a function of w, in the range 1 ď w ď M̃ . Note that, given a common beam width w, the average number of sectors activated by a user is given by Sqpwq. Also, the expected number of scheduled users that are not present at any of the sectors is given by Lp1 ´ qpwqqS . As expected, wider beams result in broader angular support, but wider beams also make it less likely that a user is not present at any of the sectors. Using (7), (9), and (25) yields y in (22): the following expression for MG ff « K ÿ “ 1‰ ` ˘ y MGpw, Kq “ E L “ E 1 ´ 1tN “0u (26) k “ k“1 „ ´ ¯S  K´1 K 1 ´ 1 ´ qpwq r1 ´ qpwqs . We next present a simulation-based study of the proposed schemes using the above model assuming Ktot “ 100 users terminals with M̃ “ 6 antennas each, and a BS with M “ 1000 BS antennas, using sector-based processing over S “ 25 sectors (hence g “ M {S “ 40 beams per sector). We assume p “ 0.1, and that τ “ 5 pilot dimensions are available for training per fading block. With these parameters, we have qp1q “ p “ 0.1 and qpM̃ q “ 0.47, implying that the average AoA angular support for a user ranges from 2.5 sectors (achieved with the finest-directional training, i.e., w “ 1) to about 11.72 sectors (achieved with omni-directional training i.e., w “ M̃ “ 6). A single drop is created, i.e., a single set pbq of rXs,k s’s are randomly created according to the model. For any given common beam width, w, at any given scheduling instance, each scheduled user picks a c at random (out of those c’s yielding beams with beam width w) . According to (26), Fig. 2 shows the multiplexing gains per pilot dimension as a function of K for different beam width values in the range 1 ď w ď M̃ . If orthogonal training is used (K “ 1), for any beam width the multiplexing gain is approximately equal to (and always upper-bounded by) 1. Considering all K ě 1 options, for any given training-beam opt width w, there is an optimal value of K, KMG pwq, which y maximizes MGpw, Kq. The best combination of beam width, 1 0.9 0.8 0.7 CDF 0.6 0.5 0.4 y vs. K for different values of w Fig. 2. MG 0.3 w=1,K roaptte = 11 0.2 w=3,K roaptte = 5 0.1 w=6,K roaptte = 3 w=1,K=1 w=6,K=1 0 1.2 1 Geometric mean UE throughput [bit/s/Hz] Arithmetic mean UE throughput [bit/s/Hz] 1.2 w=1 w=2 w=3 w=4 w=5 w=6 0.8 0.6 0.4 0.2 5 10 K 15 20 w=2,K roaptte = 6 0.2 0.4 0.6 0.8 1 1.2 UE throughput 1.4 1.6 1.8 1 Fig. 4. User (UE) throughput CDF: different settings of w with corresponding opt Krate pwq w=1 w=2 w=3 w=4 w=5 w=6 0.8 0.6 0.4 0.2 0 5 10 K 15 20 Fig. 3. Arithmetic/geometric mean user (UE) throughput vs. K for various settings of w w, and number of scheduled users per pilot dimension, K, is y given by pwopt , K opt q “ arg maxpw,Kq MGpw, Kq “ p1, 13q and results in a more than 6-fold increase in multiplexing gains with respect to the orthogonal training scheme. With the DL SNR ρd being 10 dB, Fig. 3a and Fig. 3b, respectively, display the arithmetic and geometric mean of user throughput as a function of K for beam widths in the range 1 ď w ď M̃ . Inspection of the two figures reveals similar trends between the arithmetic and geometric mean of the user rates as a function of K and w. Also both the arithmetic mean and the geometric mean are maximized with pw, Kq “ p1, 10q, exhibiting in each case more than a 3-fold increase with respect to the orthogonal training scheme. Fig. 4 shows the empirical user-rate CDFs for all beam widths in the range 1 ď w ď M̃ . For any w, the value of K that maximizes the user-rate arithmetic mean is used. We also plot the empirical user-rate CDF with orthogonal training, for w “ 1 and w “ 6 (omni-training). Inspection reveals that optimized non-orthogonal training uniformly outperforms orthogonal training in terms of individual user rates. Furthermore, the minimum pilot beam width is best in this example, as its user-rate CDF dominates all the others. In conclusion, non-orthogonal UL pilots and simple largearray BS processing are jointly exploited to significantly increase cell and cell-edge throughputs over sparse mmWave channels. The proposed method leverages scheduling multiple users randomly on each available pilot dimension with random (user-chosen) training directions, and coupled with low-complexity spatial processing at the BS to resolve user channels at each BS virtual sector. Although the focus of the paper is cellular transmission and, in particular, singlecell performance, the proposed methods are directly applicable to CRAN scenarios and cell-free type operation [10], [14]. Indeed, large improvements in multiplexing gains are also reported in the context of cell-free type networks in [14], based on simple, albeit spatially consistent channel models that include the effects of common scatterers and blockers. A PPENDIX A S PARSITY AND U SER B EAMS The physical model is a very accurate representation of the real physical channel which depends on a very large number of parameters. But due to finite array apertures, limited bandwidth, W , the channel that is experienced in practice can be very well approximated by a discretized approximation, which is commonly known as virtual or canonical channel model [6]. In fact, virtual channel model is discretized version of Hk pf q where uniform sampling is applied in angle-delay domains at the Nyquist rates of 1{M, 1{M̃ , 1{W . Virtual representation of Hk pf q is denoted by Ȟk pf q and is given as follows [6]: Hk pf q « Ȟk pf q M ÿ M̃ ÿ L ÿ “ (27) ` Ȟk pi, m, `qapi{M qãH pm{M̃ qe´j2π W f , i“1 m“1 `“1 where Ȟk pi, m, `q is the virtual channel coefficient and it is approximately equal to the sum of complex gains of all physical paths whose angles, delays lie within the angle delay resolution bin of size 1{M, 1{M̃ , 1{W and centered around the sampling point i{M, m{M̃ , `{W , see [6] for more details. Assuming a ULAs at both sides, it? is well known that ãpm{M̃ q “ M̃ f̃m and api{M q “ M fi , where fi is the ith column of F and f̃m is the mth column of F̃. To investigate the sparseness of the channel in the angledelay domain, the virtual representation comes handy, where paths are binned together. Although the virtual channel model provides M M̃ W many bins, and hence M M̃ W resolvable ~ 0.5 1/ M −0.5 AoD 0.5 AoA AoA AoA 1/ M AoD AoD b) c) a) Consider S BSs (sectors), where each has g antennas, serving K single-antenna UEs,8 we assume that BSs only share the transmitted data and form beamformers individually, which alleviates the burden of instantaneous CSI exchange. Let’s first investigate the phase of uplink training and channel estimation. Consider a general random pilot reuse scheme, where K UEs are randomly partitioned into τ groups and UEs in the same group share the common pilot sequence. The received g ˆ τ training matrix at the BSs is Ysul “ Fig. 5. a) An idealized sparsity pattern for AoA and AoD domain [6] b) AoA sparsity with eigen beam c) AoA sparsity with omni-directional beam paths, in reality not necessarily all of these bins have significant paths. The sparsity of a channel can be measured by the number of bins such that |Ȟk pi, m, `q| ą  for some  ą 0. In Fig. 5, we see a sparsity pattern in angle domain. In each bin, the dots show different paths come within the specific angular bin but possibly with different delays. The bins with no paths represent the bins who virtual channels absolute value is below the threshold, ie. |Ȟk pi, m, `q| ă . Next, we show how the effective sparsity of the channel is effected by the beam selection at the user side. Let b be the user beam of size M̃ ˆ 1 and unit norm, then the M ˆ M̃ physical channel Ȟk pf q effectively becomes an M ˆ 1 vector ∆ channel ȟk pf ; bq “ Ȟk pf qb. Assuming UL, we investigate the dependency of sparsity in AoA domain to the user beam b: Consider two different extreme cases: ‚ ‚ ? τ ρp K ÿ ul gs,k ϕH Gpkq ` W̄s , k“1 where gs,k „ λ̄s,k Cp0, Igˆg q is the g-by-1 transfer channel between BSs and UEk , Gpkq P r1, 2, ..., τ s denotes the group index of UEk . rϕi sτi“1 are orthogonal pilot codes and }ϕi } “ 1, @i. Entries of W̄sul P Cgˆτ are IID zero-mean unit-variance complex Gaussian variables. Multiplicative scalars τ and ρp indicate processing gain and uplink SNR, respectively. BSs projects its received training matrix on different pilot codes and obtains observations from different pilot codes as ÿ ? ul ul 4 gs,k ` w̄l,s , @l, ȳl,s “ Ysul ϕl “ τ ρp Gpkq“l ul where w̄l,s “ W̄sul ϕl „ Cp0, Igˆg q is the effective noise vector. With the IID channel assumption, we obtain the minimum mean square error (MMSE) channel estimation, its second moment and the variance of MMSE estimation error, respectively: ? τ ρp λ̄s,k γs,k Eigen beam:řb “ f̃m ř ř ĝ “ ȳul “? ȳul , ` s,k L M i ´j2π W f , ȟk pf ; bq “ i“1 ap M q `“1 Ȟk pi, m, `qe τ ρp Gpuq“Gpkq λ̄s,u ` 1 Gpkq,s τ ρp λ̄s,k Gpkq,s (28) řM̃ Omni-directional beam: b “ ?1 f̃ 2 m 2 m“1 τ ρp λ̄s,k 4 Er|ĝs,k | s M̃ ř “ , γs,k “ řM řM̃ řL ` i ´j2π W f g τ ρp Gpuq“Gpkq λ̄s,u ` 1 ȟk pf ; bq “ i“1 ap M q m“1 `“1 Ȟk pi, m, `qe . It is possible to see that in case of an eigen beam, in the AoA domain, bins are filled up with paths that fall into the mth bin in AoD. On the other hand, in case of omni-directional beam, AoA bins are filled up with paths that are coming from any angle in AoD. See Fig. 5 b) and c) for the sparsity comparison of these two cases. Vector channel is more sparse in AoA domain when eigen beam is used, compared to that of omnidirectional beam. One can also imagine other beam options which can be written as a weighted sum of DFT columns. Hence by using various beams for users, we can effectively, create different random sparsity columns in AoA. ∆ 2 δe,k,s “ Er}ês,k }2 s “ λ̄s,k ´ γs,k , g 2 where ês,k „ δe,k,s Cp0, Igˆg q is the estimation error vector. According to the principle of orthogonality, gs,k can be expressed as gs,k “ ĝs,k ` ês,k , while ĝs,k and ês,k are independent of each other. At the downlink transmission phase, the received signal rk at UEk is S S ? ÿ 12 H ? ÿ ÿ 12 H rk“ ρd ηs,k gs,k vs,k xk` ρd ηs,u gs,k vs,u xu`nk . s“1 A PPENDIX B R ATE D ERIVATION With the spatial filtering, we treat each sector as an individual virtual BS. Therefore, in this part we provide a general rate bound derivation for the multi-cell distributed MIMO. The resulting expressions provide the required ergodic-rate bounds for the single-cell sector-based schemes we consider in this paper, as a special case. s“1 u‰k (29) Since the received signal (29) is a combination of desired signal and interference plus noise, we can represent it as rk “ Dk xk ` zk , (30) 8 In our proposed system, after the phase of prebeamforming [12] channel dimension is reduced to the number of RF chains. Thus, the derivation in this part fits the scenario where UE is equipped with many antennas but a single RF chain. where Dk “ ? ρd S ÿ 1 H 2 ηs,k gs,k vs,k , where ΠpBs,k q is a projection matrix denoting the null space of Bs,k . The mean of desired signal becomes s“1 zk “ ? ρd ÿ Ik,u xu ` nk , ErDk s “ ? ρd u‰k Ik,u “ S ÿ 1 2 H ηs,u gs,k vs,u . “ ? ρd s“1 Based on (30), we develop rate bound approximations to evaluate the system performance. By assuming UE only has the knowledge of channel statistics for decoding [15], [16] utilizes (31) for rate evaluation: ` |ErDk s|2 ˘ , (31) Rk “ log p1 ` SINRq “ log 1 ` varpDk q ` δz2k where ErDk s denotes the mean of desired signal, varpDk q is the variance of Dk , indicating the self-interference brought by unknowing of instantaneous CSI, and δz2k is the variance of inter-user interference plus noise. However, in a practical system with finite array size, the self-interference, dominating at high SNR regime, will make ergodic rate approximation by (31) too conservative. Therefore, in this paper, we focus on the following rate approximation [17]: R̄k “ logp1 ` Er|Dk |2 s 1 Er|Dk |2 sTd q ´ logp1 ` q, (32) δz2k Td δz2k where Td is the coherence time. Later, we will develop expressions for the terms, including ErDk s, Er|Dk |2 s and δz2k ,which can be also used to compute the bound (31). In this paper, we consider the normalized zero-forcing beamforming (ZFBF) for downlink transmission, where }vs,u } “ 1, @s, u.9 An interesting observation of (28) is that estimated channels of different UEs from the same group align with the observation signal on the signal space. Therefore, ul τ spanprĝs,k sK k“1 q “ spanprȳl,s sl“1 q, @s, and we can directly perform ZFBF on the space spanned by training observations from different pilot codes. Without loss of generality, let’s stick with the beamforming vector vs,k formed by BSs to serve UEk . Assume that BSs uses observations from a subset of pilot codes, i.e., Ks whose cardinality is Ks “ |Ks | ď τ , to form zero-forcing precoder. Note that Ks contains pilot codes not only corresponding to served UEs of BSs but also those UEs, to whom BSs will null out leakage interference. Define matrix of interference channel ∆ ul Bs,k “ rȳlul1 ,s , ..., ȳlulKs ,s szȳl,s , s where Ks “ rli sK i“1 and l “ Gpkq P Ks . The beamforming vector vs,k becomes vs,k “ ΠpBs,k qĝs,k , }ΠpBs,k qĝs,k } ∆ ´1 H ΠpBs,k q “ Igˆg ´ Bs,k pBH Bs,k , s,k Bs,k q “ ? ρd S ÿ s“1 S ÿ s“1 S ÿ 1 H 2 ηs,k Erpĝs,k ` êH s,k q 1 2 ηs,k ErEr H ĝs,k ΠpBs,k qĝs,k |Bs,k ss }ΠpBs,k qĝs,k } (33) 1 2 ηs,k ErEr}ΠpBs,k qĝs,k }|Bs,k ss. (34) s“1 In (33), since ês,k is independent of rĝs,k sK k“1 , we strike out the term related to it and apply the chain rule of expectation. Substitute (35) into (33), we obtain (34). H H ĝs,k ΠpBs,k qĝs,k “ ĝs,k ΠpBs,k qH ΠpBs,k qĝs,k “ }ΠpBs,k qĝs,k }2 . (35) The singular value decomposition of Bs,k is Bs,k “ H Us,k Λs,k Vs,k , where Us,k P CgˆpKs ´1q is semi-unitary. We can represent ΠpBs,k q as H ΠpBs,k q “ Igˆg ´ Us,k UH s,k “ Ūs,k Ūs,k , (36) where semi-unitary matrix Ūs,k P Cgˆpg´Ks `1q indicates the complement space of Us,k . Substituting (36) into (34), we first evaluate the inner conditional expectation ˇ Er}ΠpBs,k qĝs,k ||ˇBs,k s b H ΠpB “Er ĝs,k s,k qĝs,k |Bs,k s b H Ū H “Er ĝs,k s,k Ūs,k ĝs,k |Bs,k s b H g̃ “Er g̃s,k s,k |Bs,k s “Er}g̃s,k }|Bs,k s, 4 where we define g̃s,k “ ŪH s,k ĝs,k . Since ĝs,k is independent of Bs,k , g̃s,k follows γs,k Cp0, Ipg´Ks `1qˆpg´Ks `1q q for a given Bs,k . Therefore, the conditional expectation becomes the mean of a random variable with chi-distribution: Er}ΠpBs,k qĝs,k }|Bs,k s “ ? γs,k Γpg ´ Ks ` 32 q , Γpg ´ Ks ` 1q (37) Γp¨q is the Gamma function defined as Γptq “ şwhere 8 t´1 ´x x e dx. From (37), we can observe that the conditional 0 expectation is independent of realizations of Bs,k . Therefore, we obtain the mean of desired signal ErDk s “ “ ? ? ρd ρd S ÿ s“1 S ÿ 1 1 2 2 ηs,k γs,k 1 Γpg ´ Ks ` 32 q Γpg ´ Ks ` 1q 1 2 2 ηs,k γs,k Ωpg, Ks q, s“1 9 [16] exhibits the derivations for the rate bound (31) with the normalized conjugate beamforming (CBF). ΠpBs,k qĝs,k s }ΠpBs,k qĝs,k } 4 where we define function Ωpg, Ks q “ Γpg´Ks ` 32 q Γpg´Ks `1q . For the second moment of desired signal, we have Er|Dk |2 s “ ρd Er| S ÿ 1 H 2 ηs,k pĝs,k ` êH s,k q s“1 “ ρd Er| S ÿ 1 2 ηs,k p}ΠpBs,k qĝs,k } ` s“1 S ÿ Combining (43) and (44), we develop the expression for the second moment of the useful signal ΠpBs,k qĝs,k 2 | s }ΠpBs,k qĝs,k } êH s,k ΠpBs,k qĝs,k }ΠpBs,k qĝs,k } êH s,k ḡs,k 2 q| s “ ρd Er| ηs,k p}ḡs,k } ` }ḡs,k } s“1 “ ρd 1 2 1 2 ηj,k ηi,k Er}ḡj,k }}ḡi,k } ` j“1 i“1 ηs,k tEr}ḡs,k }2 s ` Er s“1 H êH j,k ḡj,k ḡi,k êi,k }ḡj,k }}ḡi,k } s, H ḡs,k ḡs,k ês,k êH su. s,k }ḡs,k } }ḡs,k } To calculate the second term in (40), we substitute vs,k “ ḡs,k }ḡs,k } and get g H ÿ ḡs,k ḡs,k H ês,k ês,k s“ Er|vs,k pqq|2 ¨ |ês,k pqq|2 s Er }ḡs,k } }ḡj,k } q“1 2 Er|vs,k pqq|2 sEr|ês,k pqq|2 s “ σe,k,s , (42) q“1 Er|Ik,u |2 s “ Er| S ÿ where vpqq indicates the q-th element of a vector v. Substituting (41) and (42) into (40), we obtain S ÿ 1 s“1 2 ηs,k ppg ´ Ks ` 1qγs,k ` σe,k,s q. Therefore, we define RGpkq as the set of BSs that uses observations from Gpkq-th pilot code for zero-forcing, i.e., RGpkq “ ts|Gpkq P Ks u. Therefore, when Gpuq ‰ Gpkq, we have Er|Ik,u |2 s S ÿ 1 ΠpBs,u qĝs,u 2 2 ηs,u “Er| êH | ` s,k }ΠpBs,u qĝs,u } s“1 ÿ 1 ΠpBs,u qĝs,u 2 H 2 | ηs,u ĝs,k | s }ΠpBs,u qĝs,u } sRR Gpkq S ÿ S ÿ S ÿ “ρd 1 2 Let us simplify the second term in (46): ÿ “ ÿ “ S ÿ S ÿ “ρd j“1 i‰j 1 2 1 2 1 2 sRRGpkq 1 2 1 2 ηj,k ηi,k γj,k γi,k Ωpg, Kj qΩpg, Ki q. ÿ “ “ sRRGpkq 1 H 2 2 ηj,u ηi,u Erĝj,k H ḡj,u ḡi,u ĝi,k s }ḡj,u } }ḡi,u } H ḡs,u ḡs,u H ĝs,k ĝs,k s }ḡs,u } }ḡs,u } ηs,u Er H ḡs,u ḡs,u H Erĝs,k ĝs,k |ḡs,u s s }ḡs,u } }ḡs,u } ηs,u γs,k Er sRRGpkq ÿ (44) ΠpBs,u qĝs,u 2 | s }ΠpBs,u qĝs,u } ηs,u Er sRRGpkq 1 2 1 2 1 ÿ jRRGpkq iRRGpkq 1 2 1 2 1 H 2 ηs,u ĝs,k Er| “ Γpg ´ Kj ` 23 q Γpg ´ Ki ` 32 q “ρd ηj,k ηi,k γj,k γi,k Γpg ´ Kj ` 1q Γpg ´ Ki ` 1q j“1 i‰j 1 2 ΠpBs,u qĝs,u 2 | s. }ΠpBs,u qĝs,u } (46) sRRGpkq ηj,k ηi,k Er}ḡj,k }sEr}ḡi,k }s 1 H 2 ĝs,k ηs,u sRRGpkq ÿ j“1 i‰j S ÿ S ÿ ÿ 2 ηs,u σe,k,s ` Er| “ ÿ H êH j,k ḡj,k ḡi,k êi,k ρd ηj,k ηi,k Er}ḡj,k }}ḡi,k || ` s }ḡj,k }}ḡi,k } j“1 i‰j ΠpBs,u qĝs,u 2 | s, }ΠpBs,u qĝs,u } H ĝs,k ΠpBs,u qĝs,u “ 0. (43) Consider terms where i ‰ j in (39), we have 1 2 (45) where δ 2 is the variance of noise. For Er|Ik,u |2 s, let’s first consider cases when Gpuq ‰ Gpkq and Gpuq P Ks . Thus, ĝs,k and vs,u are orthogonal to each other: s“1 S ÿ S ÿ 1 H 2 pĝs,k ` êH ηs,u s,k q s“1 ρd 1 Now let’s consider interference terms. We need to find ÿ σz2k “ ρd Er|Ik,u |2 s ` δ 2 , (40) Er}ḡs,k }2 s “ ErEr}ḡs,k }2 |Bs,k ss “ pg ´ Ks ` 1qγs,k . (41) “ 1 1 2 2 2 2 ηi,k γj,k γi,k Ωpg, Kj qΩpg, Ki qs. ηj,k u‰k H Given Bs,k , ḡs,k“Ūs,k ŪH s,k ĝs,k following γs,k Cp0, Ūs,k Ūs,k q. Therefore, we have g ÿ S ÿ S ÿ (38) where we define the unnormalized beamforming vector 4 ḡs,k “ ΠpBs,k qĝs,k to obtain (38). From (38) to (39), we strike out cross terms with mean zero. Then, consider terms where i “ j in (39), we have S ÿ 2 ηs,k ppg ´ Ks ` 1qγs,k ` σe,k,s q` j“1 i‰j (39) ρd S ÿ s“1 q|2 s 1 2 S ÿ S ÿ Er|Dk |2 s “ ρd r ηs,u γs,k . H ḡs,u ḡs,u s }ḡs,u } }ḡs,u } (47) S ř ρd | 1 s“1 SINRk,ZF BF,p32q “ 2 δ ` ρd 1 2 2 ηs,k γs,k Ωpg, Ks q|2 ` ρd ř γs,k ` ρd ř r S ř S ř ηs,k γs,k pg ´ Ks ` 1 ´ Ω2 pg, Ks qq ` ρd s“1 s“1 2 ηs,k σe,k,s . 2 ηs,u σe,k,s ` u‰k s“1 sRRGpkq ρd S ř ř S ř ηs,u pg ´ Ks ` 1 ´ Ω2 pg, Ks qqγs,k s ` ρd u‰k,Gpuq“Gpkq s“1 ř | S ř u‰k,Gpuq“Gpkq s“1 1 1 2 2 γs,k Ωpg, Ks q|2 ηs,u (50) ρd | S ř s“1 SINRk,ZF BF,p32q,asy. “ ř δ 2 ` ρd S ř γs,k ` ρd s“1 sRRGpkq 1 2 S ÿ ÿ 2 ηs,u σe,k,s ` s“1 2 σe,k,s ` ρd S ÿ ηs,u γs,k . (48) sRRGpkq 2 ηs,u ppg ´ Ks ` 1qγs,k ` σe,k,s q s“1 S ÿ S ÿ 1 1 1 1 2 2 2 2 ηi,u γj,k γi,k Ωpg, Kj qΩpg, Ki q. (49) ηj,u ` j“1 i‰j To achieve (49) follows similar procedure to get (45). Combining (49) and (48), we can get the expression for the variance of interference plus noise: σz2k “ ρd S ÿ ÿ 2 ηs,u σe,k,s ` ρd u‰k s“1 ρd ÿ ÿ ηs,u γs,k ` Gpuq‰Gpkq sRRGpkq S ÿ ÿ ηs,u pg ´ Ks ` 1qγs,k ` r u‰k,Gpuq“Gpkq s“1 S ÿ S ÿ 1 1 1 1 2 2 2 2 ηi,u γj,k γi,k Ωpg, Kj qΩpg, Ki qs ` δ 2 . ηj,u j“1 i‰j The final SINR expression of (32) is exhibited in (50)10 . To investigate asymptotic analysis at the massive MIMO regime, we introduce a scalar factor n for a set of parameters g, rKs s and rηs,k s. Therefore, the number of BS antennas is ng, the number of used pilot codes by BSs is nKs , and the power η coefficients are reduced by a factor of n, i.e., r s,k n s. Therefore, let n go to infinity, we can obtain the asymptotic result of (50) as (51) shows by utilizing the following property of Gamma function lim nÑ8 ř ˇ2 ˇ | S ř u‰k,Gpuq“Gpkq s“1 1 ? 1 2 2 ηs,u g ´ Ks γs,k |2 . (51) A PPENDIX C Rflat APPROXIMATION k Then, let’s consider the case when Gpuq “ Gpkq: Er|Ik,u |2 s “ 1 2 ηs,k g ´ Ks γs,k Substituting (47) back to (46), we can get Er|Ik,u |2 s “ ? Γpn ` αq “ 1. Γpnqnα 10 Note that for (32), we can obtain its close-form expression for arbitrary settings of Td by substituting expressions of Er|Dk |2 s and δz2k . In Sec. V, we assume Td is infinite for simplicity, so that we can strike out its second term and directly use (50) for evaluation In this part, we aim to justify the assumption of IID channels within each sector in (23). IID channel assumption in each sector actually results in a piece-wise flat covariance matrix, Rflat k . Justification of this assumption will be done by rate performance comparisons between covariance matrices created by 3GPP [18] model and piece-wise flat covariance matrix. Covariance matrices of 3GPP models with finite length ULA, R3GPP ’s, are not necessarily circulant. We first k define ` a circulant˘ approximation as follows: Rk “ Fdiag eigpR3GPP q FH , where eigp¨q returns a vector conk sisting of all the eigen values. The piece-wise flat approximation of Rk is given by Rflat “ k H F , where FΛflat k ` ˘ 3GPP H Λflat “ diag λ̄3GPP 1H k 1,k g , . . . , λ̄S,k 1g , where 1g is an all-ones vector of size g ˆ 1 and λ̄3GPP ’s are s,k obtained according to (3) from the eigenvalues of R3GPP . k In this comparison, we assume ideal CSI is available for all users. As we want this comparison to be general, not specific to our scheme, we also do not use spatial filters at the receiver. We consider both ZFBF and CBF. All L users are given equal power, that is, power ρd {L. Focusing on a single fading block f , the received signal at user k P t1, . . . , Lu is given by (4), where xT pf q is the precoded vector signal of size 1 ˆ M transmitted by the BS xT pf q “ uT pf qV, “ ‰ where uT “ u1 u2 . . . uL is the information bearing signal with uk „ CN p0, 1q, and “ ‰ Vpf q “ v1 pf q v2 pf q . . . vL pf q denotes the L ˆ M precoder at fading block f . For ZFBF, vk pf q is in the direction of the unit-norm vector that is zero-forced to all other user channel estimates. For CBF, vk pf q is in the direction of the unit norm vector which is given by normalizing the conjugate of the user’s channel estimate. ZFBF CBF 80 60 40 20 0 −10 R EFERENCES 40 Ergodic sum rate [bit/s/Hz] Ergodic sum rate [bit/s/Hz] 100 R3GPP R R fl a t 0 10 SNR [dB] 20 35 30 25 20 15 −10 30 R3GPP R R fl a t 0 10 SNR [dB] 20 30 Fig. 6. Ergodic sum rate vs. SNR: for rRflat s, we have S “ 10, and g “ M “ 40 S CBF ZFBF 6.5 16 6 12 R̄ k [bit /s /Hz ] R̄ k [bit /s /Hz ] 14 10 8 6 5 4.5 4 3.5 R3GPP R R fl a t 4 2 −10 5.5 0 10 SNR [dB] 20 R3GPP R R fl a t 3 30 2.5 −10 0 10 SNR [dB] 20 30 Fig. 7. Ergodic rate of individual UE vs. SNR: for rRflat s, we have S “ 10, “ 40 and g “ M S Also }vk pf q}2 “ 1{L. We can re-write the received signal as a summation of signal and interference-noise as follows: ? ? ÿ rk “ ρd hk pf qH vk pf quk ` ρd hk pf qH vk1 pf quk1 ` nk . k1 ‰k The ergodic rate of user k is given by « ff 2 ρd |hH k pf qvk pf q| R̄k “ E log p1 ` ř q , 2 1 ρd k1 ‰k |hH k pf qvk pf q| ` 1 (52) where the expectation is to average out the randomness of hk pf q. In this section Monte Carlo simulations are used to evaluate (52) in Fig. 6, 7. Consider a single cell with M “ 400 and M̃ “ 1, we generate synthetic channel profiles for 3 UEs with line-ofsight (LOS) and 3 UEs without LOS, respectively. The large scale loss (pathloss plus shadowing) is neglected through simulations, so that we can better investigate the impact of channel covariance approximation. Simulating rhk s by original channel covariance rR3GPP s,11 circulant approximation rRk s, k and piecewise constant approximation rRflat k s, respectively, we make comparisons over ergodic rates for both ZFBF and CBF as Fig. 6, 7 show. Fig. 6 exhibits comparisons of ergodic sum rates of 6 UEs, while Fig. 7 shows the individual rate of one of UEs. For ZFBF, we can observe that in both figures the piecewise constant approximation is consistent with the original channel covariance in the sense of ergodic rate. Nevertheless, CBF is more sensitive to the piecewise constant approximation, since it may span the angular spectrum of interference signal and exaggerate its impact. 11 Details of channel covariance extraction can be found in [12]. [1] T. L. Marzetta, “How much training is required for multiuser MIMO?” in Proc. of the Fortieth Asilomar Conf. on Signals, Systems and Computers, Nov. 2006. [2] ——, “Noncooperative cellular wireless with unlimited numbers of base station antennas,” IEEE Trans. on Wireless Commun., vol. 9, no. 11, pp. 3590 –3600, Nov. 2010. [3] G. Caire, N. Jindal, M. Kobayashi, and N. Ravindran, “Multiuser MIMO achievable rates with downlink training and channel state feedback,” IEEE Trans. Inf. Theory, vol. 56, no. 6, pp. 2845–2866, Jun. 2010. [4] L. Zheng and D. N. C. Tse, “Communication on the Grassmann Manifold: A geometric approach to the noncoherent multiple-antenna channel,” IEEE Trans. Inf. Theory, vol. 48, no. 2, pp. 359–383, 2002. [5] R. Rogalin, O. Y. Bursalioglu, H. Papadopoulos, G. Caire, A. F. Molisch, A. Michaloliakos, V. Balan, and K. Psounis, “Scalable synchronization and reciprocity calibration for distributed multiuser MIMO,” IEEE Trans. on Wireless Commun., vol. 13, no. 14, Apr. 2014. [6] W. U. Bajwa, J. Haupt, A. M. Sayeed, and R. Nowak, “Compressed channel sensing: A new approach to estimating sparse multipath channels,” Proc. of the IEEE, vol. 98, no. 6, pp. 1058–1076, June 2010. [7] W. C. Ao, C. Wang, O. Y. Bursalioglu, and H. Papadopoulos, “Compressed sensing-based pilot assignment and reuse for mobile UEs in mmWave cellular systems,” in IEEE Int. Conf. on Commun., May 2016. [8] M. K. Samimi and T. S. Rapport, “3-D statistical channel model for millimeter-wave outdoor mobile broadband communications,” in IEEE Int. Conf. on Commun., June 2015. [9] K. Taejon and D. J. Love, “Virtual AoA and AoD estimation for sparse mmwave MIMO channels,” in IEEE Int. Works. on SPAWC, June 2015. [10] O. Y. Bursalioglu, C. Wang, H. Papadopoulos, and C. Caire, “RRH based massive MIMO with “on the fly” pilot contamination control,” in IEEE Int. Conf. on Commun., May 2016. [11] J. Nam, A. Adhikary, J. Y. Ahn, and G. Caire, “Joint spatial division and multiplexing: Opportunistic beamforming, user grouping and simplified downlink scheduling,” IEEE Journal of Selected Topics in Signal Proc., vol. 8, no. 5, pp. 876–890, Oct. 2014. [12] A. Adhikary, E. Al Safadi, M. K. Samimi, R. Wang, G. Caire, T. S. Rappaport, and A. F. Molisch, “Joint spatial division and multiplexing for mm-wave channels,” IEEE J. Sel. Areas Commun., vol. 32, no. 6, pp. 1239–1255, June 2014. [13] A. M. Sayeed, “Deconstructing multiantenna fading channels,” IEEE Trans. on Signal Proc., vol. 50, no. 10, pp. 2563–2579, Oct. 2002. [14] O. Y. Bursalioglu, C. Wang, H. Papadopoulos, and C. Caire, “A novel alternative to cloud RAN for throughput densification: Coded pilots and fast user-packet scheduling at remote radio heads,” in Proc. of the Fiftieth Asilomar Conf. on Signals, Systems and Computers, Nov. 2016. [15] B. Hassibi and B. M. Hochwald, “How much training is needed in multiple-antenna wireless links?” IEEE Trans. on Inform. Theory, vol. 49, no. 4, pp. 951–963, 2003. [16] G. Interdonato, H. Ngo, E. Larsson, and P. Frenger, “On the performance of cell-free massive mimo with short-term power constraints,” arXiv preprint arXiv:1608.05121, 2016. [17] E. Biglieri, J. Proakis, and S. Shamai, “Fading channels: informationtheoretic and communications aspects,” Information Theory, IEEE Transactions on, vol. 44, no. 6, pp. 2619–2692, 2002. [18] 3GPP TR 36.873 V12.2.0, “Study on 3D channel model for LTE”, Jun. 2015.
7cs.IT
Strong-consistent autoregressive predictors in abstract Banach spaces M. D. Ruiz-Medina 1 and J. Álvarez-Liébana 1 arXiv:1801.08817v1 [math.ST] 26 Jan 2018 29th January 2018 1 Department of Statistics and O. R., University of Granada, Spain. E-mail: [email protected], [email protected] Summary This work derives new results on the strong-consistency of a componentwise estimator of the autocorrelation operator, and its associated plug-in predictor, in the context of autoregressive processes of order one, in a real separable Banach space B (ARB(1) processes). For the estimator of the autocorrelation operator, strongconsistency is proved, in the norm of the space L(B) of bounded linear operators on B. The strong-consistency of the associated plug-in predictor then follows in the norm of B. The methodology applied is based on assuming suitable continuous embeddings between the Banach, Hilbert and Reproducing Kernel Hilbert spaces, involved in the construction proposed in Kuelbs [18]. This paper extends the results in [9] and [19]. Key words: ARB(1) processes; Banach spaces; continuous embeddings; strongly-consistent estimators; functional plug-in predictors 1 Introduction In the last few decades, there exists a growing interest on the functional prediction in Banach spaces. The autoregressive model in a Banach space allows, in particular, the inference on many continuous time processes sa- tisfying certain regularity conditions. This is the case of processes whose trajectories lying in a space of the scale of integer and fractional order Besov spaces (see [27]). A well-known example is constituted by processes satisfying a stochastic differential or pseudodifferential model (see [4]; [5], and the references therein). A very particular case is the Ornstein–Uhlenbeck process (see [2]). For an introduction to time series in Banach spaces, see the monograph by Bosq [9], the survey articles by Hörmann and Kokoszka [17], and Mas and Pumo [20]. In particular, strong mixing conditions and the absolute regularity of Banach-valued autoregressive processes have been studied in [1]. Empirical estimators for ARB processes are studied in [10], where, under some regularity conditions, and for the case of orthogonal innovations, the empirical mean is proved to be asymptotically optimal, with respect to almost surely 1 (a.s.) convergence, and convergence of order two. Some limit results, and, in particular, the law of the iterated logarithm were also presented. The empirical covariance operator was also interpreted as a sample mean of an autoregressive process in a suitable space of linear operators, allowing the derivation of similar results for it. The extension of these results to the case of weakly dependent innovations is obtained in [12]. A sieve estimator of the autocorrelation operator of a Banach autoregressive process is considered in [25]. The strong consistency, when the operator is 2-summing, strictly 2-integral, afterwards 2nuclear, is proved for adequate norms. Limit theorems for a seasonality estimator, in the case of Banach autoregressive perturbations, are formulated in [22]. Applying the compact iterated logarithm law, confidence regions for the periodic seasonality function, in the Banach space of continuous functions, is obtained as well. An approximation of Parzen’s optimal predictor, in the reproducing kernel Hilber space (RKHS) framework, is applied in [21], for prediction of time stochastic process in Banach spaces. The existence and uniqueness of an almost surely strictly periodically correlated solution to the first order autoregressive periodically correlated model, in Banach spaces, is derived in [24]. A Central Limit Theorem is established for the empirical mean as well. D([0, 1])-valued autoregressive processes of order one (ARD(1) processes) are studied in [15], where D([0, 1]) denotes the Skorokhod space of cádlág functions on [0, 1]. In this paper, under some regularity conditions, the law of the large numbers, the central limit theorem and the law of the iterated logarithm for ARD(1) processes are established. D([0, 1])-valued ARMA(1,1) processes are studied in [8], considering different scenarios: fixed instants with a given but unknown probability of jumps (the deterministic case), random instants with ordered intensities (the random case), and random instants with non ordered intensities (the completely random case). Necessary and sufficient conditions for the existence of strictly stationary solutions of ARMA equations in Banach spaces, with independent and identically distributed noise innovations, are derived in Spangenberg [26]. ARMA processes in Banach spaces can be applied for example in climate prediction and financial modelling (see [7]). It is well-known the key role of the space C([0, 1]), in the study of extreme value distributions in infinite-dimensional spaces (see, for example, De Haan and Lin [16], where the domain of attraction of such extreme-value distributions is analyzed). In particular, the extreme value behavior of the space-time process, with values in the Skorokhod space D([0, 1]d ) of cádlág functions on [0, 1]d , equipped with the J1 -topology, is investigated in [11]. In the derivation of strong-consistency results for ARB(1) componentwise estimators and predictors, Bosq [9] restricts his attention to the case of the Banach space C([0, 1]) of continuous functions on [0, 1]. Labbas and Mourid [19] considers an ARB(1) context, for B being an arbitrary real separable Banach e where B is continuously embedded, as given in space, under the construction of a Hilbert space H, e of the autocorrelation operator Kuelbs [18] lemma. Under the existence of a continuous extension to H 2 ρ ∈ L(B), Labbas and Mourid [19] obtain the strong-consistency of the formulated componentwise e and H, e respectively. Under estimator of ρ, and of its associated plug-in predictor, in the norms of L(H), the convergence in the B-norm of the componentwise representation of ρ, in terms of the eigenvectors of the autocovariance operator of the extended ARB(1) process, the present paper proves strong consistency, in the respective norms of L(B) and B, of this componentwise estimator, and of its associated plug-in predictor. A key assumption here is the existence of the following continuous embeddings: e ⋆ ֒→ B ⋆ ≡ B ֒→ H e ֒→ [H(X)]⋆ , H(X) ֒→ H where H(X) denotes the RKHS, generated by the autocovariance operator of the extended ARB(1) e ⋆ is the dual of the separable Hilbert space H, e process X, and [H(X)]⋆ denotes its dual Hilbert space. H appearing in the construction of Kuelbs [18] lemma. As before, in the following, B is a real separable Banach space, and B ⋆ denotes its topological dual. The outline of this paper is as follows. Notation and preliminaries are fixed in Section 2. Fundamental assumptions and some key lemmas are given in Section 3. Finally, the main results of this paper on strong-consistency are derived in Section 4. Section 5 provides some examples. Final comments are provided in Section 6. 2 Preliminaries Let (B, k·kB ) be a real separable Banach space, with the norm k·kB . Consider X = {Xn , n ∈ Z} to be a zero-mean B-valued stochastic process on the basic probability space (Ω, A, P) satisfying the following equation (see [9]): Xn = ρ (Xn−1 ) + εn , n ∈ Z, ρ ∈ L(B), (1) where ρ denotes the autocorrelation operator of X. In equation (1), the B-valued innovation process ε = {εn , n ∈ Z} on (Ω, A, P) is assumed to be strong white noise, uncorrelated with the random initial condition. Thus, ε is a zero-mean Banach-valued stationary process, with independent and identically n o 2 distributed components, and with σε2 = E kεn kB < ∞, n ∈ Z. Bosq [9] provides sufficient conditions for the existence and uniqueness of a stationary solution to equation (1). Specifically, if there exists an integer j0 ≥ 1 such that ρj0 L(B) < 1, then, equation (1) admits an unique strictly stationary solution given by Xn = (2) ∞ X j=0 3 ρj (εn−j ) , with n o 2 2 σX = E kXn kB < ∞, for each n ∈ Z. Under (2), the autocovariance operator C of an ARB(1) process X is given by the autocovariance operator of X0 ∈ L2B (Ω, A, P ), defined as C (x∗ ) = E (x∗ (X0 )X0 ) , x∗ ∈ B ∗ . (3) x∗ ∈ B. (4) The cross-covariance operator D is given by D (x∗ ) = E (x∗ (X0 )X1 ) , Then, D = ρC. (5) Since C is assumed to be a nuclear operator, there exists a sequence {xj , j ≥ 1} ⊂ B such that, for every x∗ ∈ B ∗ (see [9], Eq. (6.24), p. 156): C(x∗ ) = ∞ X x∗ (xj ) xj , ∞ X j=1 j=1 2 kxj kB < ∞. (6)  D is also assumed to be a nuclear operator. Then, there exist sequences {yj , j ≥ 1} ⊂ B and x∗∗ j , j ≥ 1 ⊂ B ∗∗ such that, for every x∗ ∈ B ∗ , D(x∗ ) = ∞ X ∗ x∗∗ j (x )yj , ∞ X j=1 j=1 x∗∗ kyj k < ∞, j (7) where k · k denotes uniform norm in B ∗∗ , the dual of B ⋆ (see also [9, Eq. (6.23), p. 156]). Empirical estimators of C and D are respectively given by (see [9, Eqs. (6.45) and (6.58), pp. 164–168]), for n ≥ 2, n Cn (x∗ ) = 1X ∗ x (Xi ) (Xi ) , n i=1 Dn (x∗ ) = n−1 1 X ∗ x (Xi ) (Xi+1 ) , n − 1 i=1 x⋆ ∈ B ⋆ . (8) 2.1 Continuous embedding from B to a Hilbert space As commented in the Introduction, the proof of the main results in this paper are based on Lemma 2.1 in [18], now summarized. Lemma 1 If B is a real separable Banach space with norm k·kB , then, there exists an inner product h·, ·i on B such that the norm k·k , generated by h·, ·i , is weaker than k·kB . The completion of B under e where B is continuously embedded. the inner product norm k·k defines the Hilbert space H, In the following, the above inner product is denoted as h·, ·iHe , and the associated norm as k·kHe . Proof. Separability of B implies the 4 existence of a dense sequence {xn , n ∈ N} ⊂ B. Let {Fn , n ∈ N} ⊂ B ∗ be a sequence of bounded linear functionals on B, satisfying Fn (xn ) = kxn kB , kFn k = 1, (9) with kxkB = sup |Fn (x)| , (10) n for any x ∈ B. Let now {tn , n ∈ N} , be a sequence of positive numbers such that following inner product: hx, yiHe = ∞ X tn Fn (x)Fn (y), n=1 Then, for any x ∈ B, 2 kxkHe = ∞ X n=1 2 tn (Fn (x)) ≤ sup (Fn (x)) n 2 ∞ X n=1 ∞ X tn = 1. Define the n=1 e x, y ∈ H. (11) 2 2 tn = sup (Fn (x)) = kxkB . (12) n  3 Main assumptions and preliminary results e satisfies a.s. In view of Lemma 1, for every n ∈ Z, Xn ∈ B ֒→ H Xn = ∞ X e H j=1 hXn , vj iHe vj , ∀n ∈ Z, (13) e orthonormal basis {vj , j ≥ 1} of H. The trace auto-covariance opei hP P∞ ∞ rator C = E e vj ⊗ e vj of the extended ARB(1) process is a trace opj=1 hXn , vj iH j=1 hXn , vj iH for any e admitting the diagonal spectral representation erator in H, C = ∞ X e H e H⊗ j=1 Cj φj ⊗ φj , (14) where {Cj , j ≥ 1} and {φj , j ≥ 1} respectively denote the system of eigenvalues and eigenvectors of C e Summarizing, the following notation will be considered, for the operators on H e: in H. C= ∞ X j=1 C(φj )(φj )φj ⊗ φj = ∞ X j=1 Cj φj ⊗ φj (15)   ∞ ∞ X ∞ ∞ X X X D(φj )(φk )φj ⊗ φk hXn+1 , vj iHe vj  = D = E  hXn , vj iHe vj ⊗ j=1 j=1 k=1 j=1 5 Cn = ∞ ∞ n−1 X X 1X Cn,j φn,j ⊗ φn,j hXi , φj iHe φj = hXi , φj iHe φj ⊗ n i=0 j=1 j=1 Cn,j = Dn = n−1 1X 2 X , n i=0 i,n,j Xi,n,j = hXi , φn,j iHe , Cn (φn,j ) = Cn,j φn,j (16) ∞ n−2 X 1 X hXi+1 , φj iHe φj hXi , φj iHe φj ⊗ n − 2 i=0 j=1 = ∞ ∞ X X j=1 k=1 Dn (φn,j )(φn,k )φn,j ⊗ φn,k , (17) e where, for n ≥ 2, {φn,j , j ≥ 1} is a complete orthonormal system in H. In the derivation of the main results in this paper the following assumptions will be considered: Assumption A1. Consider j0 = 1 in equation (2), i.e., kρkL(B) < 1. o n 4 Assumption A2. Let X0 be the random initial condition in equation (1). Assume that E kX0 kHe < ∞. Assumption A3. kX0 kHe is bounded, and the autocovariance operator C in (15) satisfies C1 > C2 > . . . > Cj > . . . > 0, ∞ X j=1 Cj < ∞. (18) Under Assumption A3, we can define the following quantities: √ a1 = 2 2 1 , C1 − C2 √ aj = 2 2 max  1 1 , Cj−1 − Cj Cj − Cj+1  , j ≥ 2. (19) Assumption A4. In equation (16), Cn,1 ≥ Cn,2 ≥ . . . ≥ Cn,kn > 0 a.s., for a suitable truncation parameter kn satisfying lim kn = ∞, n→∞ kn < 1. n (20) Remark 1 Note that, for n sufficiently large, k < kn < Ck−1 n Ckn n X 1 aj . < akn < − Ckn +1 j=1 (21) Assumption A5. The following supremum V = sup kφj kB j≥1 6 (22) is finite, and sup x∈B; kxkB ≤1 ρ(x) − k X j=1 → 0, hρ(x), φj iHe φj k → ∞. (23) B Under (23) in Assumption A5, from equation (1), ∞ X j=1 hXn , φj iHe φj = ∞ X j=1 hρ(Xn−1 ), φj iHe φj + ∞ X j=1 hεn , φj iHe φj . (24) Assumption A6. The following continuous embeddings hold: e ⋆ ֒→ B ⋆ ≡ B ֒→ H e ֒→ [H(X)]∗ , H(X) ֒→ H (25) e ⋆. where H(X) is assumed to be a dense subspace in H e ⋆ can be defined as Remark 2 Under Assumption A6, tj /Cj → 0, j → ∞, and the inner product in H follows: hf, giHe ⋆ = ∞ X 1 φj (f )φj (g), tj j=1 e ⋆. ∀f, g ∈ H (26) Assumption A7. Let {Fm , m ≥ 1} be defined as in Lemma 1. Then, e ⋆. {Fm , m ≥ 1} ⊂ H (27) Remark 3 Under Assumption A7, from equation (26), ∞ X j=1 [Fm (φj )]2 ≤ ∞ X 1 [Fm (φj )]2 = kFm k2He ⋆ = Nm < ∞. t j j=1 (28) Assumption A8. The sequence {Nm , m ≥ 1} in (28) satisfies sup Nm = N < ∞. m≥1 An upper bound for kckB×B = P∞ j=1 Cj φj ⊗ φj 7 B×B is now obtained. (29) Lemma 2 Under Assumptions A6-A8, the following inequality holds: kckB×B = sup |C (Fn ) (Fm )| ≤ N kCkL(H) e , (30) n,m≥1 e denotes the space of bounded linear operators on H, e and k·k e the usual uniform norm where L(H) L(H) on such a space. The following preliminary results are considered from [9]. Lemma 3 (see Theorem 4.1 on pp. 98–99, Corollary 4.1 on pp. 100–101 and Theorem 4.8 on pp. 116–117, in [9]) Under Assumptions A1–A2, for each β > 21 , as n → ∞, n1/4 (ln(n)) β n1/4 a.s. kCn − CX kS(H) 0, e → (ln(n)) β a.s. kDn − DX kS(H) 0, e → (31) and, if kX0 kHe is bounded, 1/2 ! ln(n) kCn − CX kS(H) a.s., e = O n 1/2 !  ln(n) a.s., kDn − DX kS(H) e = O n  (32) a.s. e where k·kS(H) denotes almost surely e is the norm of the Hilbert-Schmidt operators on H, and → convergence. Lemma 4 Under Assumptions A1–A2, consider {Cj , j ≥ 1} and {Cn,j , j ≥ 1} respectively introduced in (15) and (16), for all β > 1/2, as n → ∞, n1/4 (ln(n))β sup |Cn,j − Cj | →a.s. 0. (33) j≥1 Lemma 5 Under Assumptions A1–A5, consider Λkn Λkn = sup (Cj − Cj+1 )−1 , (34) 1≤j≤kn for Λkn a given truncation parameter kn satisfying  = o n1/2 (ln(n))2β−1 , as n → ∞, for certain β > 1/2. Then, n1/4 (ln(n))β sup kφ′n,j − φn,j kHe →a.s. 0, 1≤j≤kn 8 (20). n → ∞, Assume that (35) where, for j ≥ 1, and n ≥ 2, φ′n,j = sgn hφn,j , φj iHe φj , sgnhφn,j , φj iHe = 1hφn,j ,φj iH − 1hφn,j ,φj iH , f ≥0 f <0 (36) with 1· being the indicator function. The following spectra kernel will be considered in the next lemma: c − cn = c ∞ X Cj φ′n,j ⊗ φ′n,j − e H e H⊗ j=1 ∞ X Cj φ′n,j = e e H⊗H j=1 ⊗ φ′n,j = ∞ X j=1 ∞ X e H e H⊗ j=1 Cn,j φn,j ⊗ φn,j Cj φj ⊗ φj , cn = ∞ X e H e H⊗ j=1 Cn,j φn,j ⊗ φn,j . (37) Remark 4 Under Assumptions A1–A5, from Lemmas 3–5, for n sufficiently large, the RKHSs Hn (X) and H(X), respectively generated by kernels cn and c, have equivalent norms. Lemma 6 Under Assumptions A1–A8, for n sufficiently large such that {φn,j , j ≥ 1} is a dense system in H(X), the following a.s. inequality holds: kc − cn kB×B = sup[C − Cn ](Fk )(Fl ) ≤ M (n)N kC − Cn kL(H) e , k,l (38) where M (n) is a positive constant such that M (n) → 1, n → ∞, and N has been introduced in (29). 4 ARB(1) estimation and prediction. Strong-consistency results e the following componentwise estimator ρekn of ρ will be considered: For every x ∈ B ⊂ H,  e kn e kn Dn C −1 Π ρekn (x) = Π n   kn X 1 e kn Dn (φn,j ) , hx, φn,j iHe Π (x) =  C n,j j=1  9 (39) where Cn , Cn,j , φn,j and Dn have been introduced in equations (16) and (17), respectively. Here, e kn (x) = Π kn X j=1 e ∀x ∈ B ⊂ H. hx, φn,j iHe φn,j , As before, for each n ≥ 2, the truncation parameter kn satisfies (20). Lemma 7 Under Assumptions A1–A8, for n large enough, φn,j − φ′n,j sup 1≤j≤kn + sup kφn,j − 1≤j≤kn B h kC − Cn kS(H) ≤ 2Ck−1 e [M (n)N + V ] n φ′n,j kHe N kCkS(H) e # , a.s, (40) where V and N have respectively been introduced in (22) and (29). Lemma 8 Under Assumption A5, if kn X j=1 kφn,j − φ′n,j kB → 0, n→∞ a.s. then ρ(x) − sup x∈B; kxkB ≤1 Remark 5 Note that kn Ckn Ck−1 n ≤ Pkn =O then, sup1≤j≤kn φn,j − φ′n,j aj j=1 Ckn j=1 hρ(x), φn,j iHe φn,j → 0, n→∞ a.s. (41) B . From equation (40), if C and kn , are such that, for certain β > 1/2, n1/4 (ln(n)) B kn X β → 0, ! ,   Λkn = o n1/2 (ln(n))2β−1 , n → ∞, n → ∞, a.s. Furthermore, if C and kn , are such that, for certain β > 1/2, kn =O Ckn then, Pkn j=1 n1/4 (ln(n)) kφn,j − φ′n,j kB → 0, β ! ,   Λkn = o n1/2 (ln(n))2β−1 , n → ∞, (42) n → ∞, a.s. Proposition 1 Under Assumptions A1–A8, if Ck−1 n kn X j=1 aj = O  n1/4 [ln(n)]β  then, ke ρkn − ρkL(B) →a.s 0, 10 n → ∞, (43) where aj has been introduced in (19), for j ≥ 1. Proof. For every x ∈ B,   π kn (x) − ρ(x)]. π kn (x)] + [ρe ekn (x) − ρπ kn (x) + [ρπ kn (x) − ρe (e ρkn − ρ)(x) = ρekn π = an (x) + bn (x) + cn (x). (44) Let us first analyze ekn (x) − ρπ kn (x) = ρekn π = + e H D(φ′n,j )  kn  X 1 1 hx, φn,j iHe Dn (φn,j ) − Cn,j Cj j=1 kn X 1 hx, φn,j iHe − x, φ′n,j C j=1 j kn X 1 x, φ′n,j + C j j=1 + kn X 1 1 hx, φn,j iHe Dn (φn,j ) − x, φ′n,j C C n,j j j=1 kn X 1 x, φ′n,j C j j=1 e H Dn (φn,j ) e H Dn (φn,j − φ′n,j ) e H (Dn − D)(φ′n,j ). (45) From (45), ekn (x) − ρπ kn (x)kB ke ρkn π ≤ kn X j=1 1 1 − | hx, φn,j iHe |kDn (φn,j )kB Cn,j Cj kn X 1 | hx, φn,j iHe − x, φ′n,j + C j j=1 + kn X 1 | x, φ′n,j C j j=1 kn X 1 | x, φ′n,j + C j=1 j e H |kDn (φn,j )kB e H |kDn (φn,j − φ′n,j )kB e H |k(Dn − D)(φ′n,j )kB = an1 (x) + an2 (x) + an3 (x) + an4 (x), 11 a.s. (46) Now, applying Cauchy-Schwarz’s inequality, ∞ X ∞ X kDn (φn,j )kB = sup m = sup m ∞ X ∞ X ∞ X k=1 l=1 Dn (φn,k )(φn,l ) hφn,j , φn,l iHe Fm (φn,k ) Dn (φn,k )(φn,l )tp Fm (φn,k )Fp (φn,j )Fp (φn,l ) k=1 l=1 p=1 v v #2 u∞ " uX ∞ X ∞ uX X u∞ 2t t Dn (φn,k )(φn,l )Fm (φn,k )Fp (φn,l ) tp [Fp (φn,j )] tp sup ≤ p=1 m,p p=1 = kφn,j kHe kdn kB×B , k=1 l=1 a.s., (47) e ⊗H e as where, for n sufficiently large, dn is defined in H dn = ∞ X ∞ X k=1 l=1 Dn (φn,k )(φn,l )φn,k ⊗ φn,l , a.s. (48) The series (48) is almost surely convergent in B × B, for n sufficiently large. Namely, under A7–A8, by Cauchy-Schwarz’s inequality, from Lemma 3, kdn kB×B = sup m,p ∞ X ∞ X Dn (φn,k )(φn,l )Fm (φn,k )Fp (φn,l ) k=1 l=1 v v u∞ ∞ u∞ ∞ uX X uX X 2 [Dn (φn,k )(φn,l )] t [Fm (φn,k )Fp (φn,l )]2 ≤t k=1 l=1 k=1 l=1 ≤ N kDn kS(H) e , < ∞, a.s. (49) Note also that, from Lemma 3, N kDn kS(H) e v u u ≤ Nt v u∞ ∞ " uX X = Nt k=1 l=1 n−1 1 X hXi , φn,k iHe hXi+1 , φn,l iHe n − 1 i=1 #2 ∞ X ∞ n−1 X X n−1 X 1 2 [hXi+1 , φn,l iHe ]2 [hX , φ i ] i n,k H e 2 (n − 1) i=1 k=1 l=1 i=1 v u∞ ∞ XX n u t ≤N hCn (φn,k ), φn,k iHe hCn (φn,l ), φn,l iHe (n − 1) k=1 l=1 v u∞ ∞ uX X ≤ 2N t Cn,k Cn,l = 2N kCn kN < ∞, a.s., k=1 l=1 12 (50) for n sufficiently large. Applying again Cauchy-Schwarz’s inequality, in a similar way, we have kDn (φn,j − φ′n,j )kB = sup m ∞ X ∞ X ∞ X k=1 l=1 p=1 Dn (φn,k )(φn,l )tp Fm (φn,k )Fp (φn,j − φ′n,j )Fp (φn,l ) ≤ kφn,j − φ′n,j kHe kdn kB×B , a.s., (51) with kdn kB×B < ∞ almost surely, for n sufficiently large. One can also obtain k(Dn − D)(φ′n,j )kB = sup m ∞ X ∞ X ∞ X Dn (φn,k )(φn,l )tp Fm (φn,k )Fp (φ′n,j )Fp (φn,l ) k=1 l=1 p=1 −D(φ′n,k )(φ′n,l )tp Fm (φ′n,k )Fp (φ′n,j )Fp (φ′n,l ) ≤ kφ′n,j kHe kdn − dkB×B = kdn − dkB×B a.s. (52) We now prove that ∞ ∞ X X dn − d = e H e H⊗ k=1 l=1 Dn (φn,k )(φn,l )φn,k ⊗ φn,l − D(φ′n,k )(φ′n,l )φ′n,k ⊗ φ′n,l has B × B norm almost surely finite. Specifically, applying again Cauchy-Schwarz’s inequality, from Lemma 5, for n sufficiently large, kdn − dkB×B ∞ ∞ X X = sup Dn (φn,k )(φn,l )Fm (φn,k )Fp (φn,l ) − D(φ′n,k )(φ′n,l )Fm (φ′n,k )Fp (φ′n,l ) m,p ≤ sup m,p + k=1 l=1 ∞ X ∞ X k=1 l=1 ∞ ∞ X X k=1 l=1 + ∞ X ∞ X k=1 l=1 |Dn (φn,k )(φn,l )| |Fm (φn,k ) − Fm (φ′n,k )||Fp (φn,l )| Dn (φn,k )(φn,l ) − D(φ′n,k )(φ′n,l ) Fm (φ′n,k )Fp (φn,l ) D(φ′n,k )(φ′n,l ) Fm (φ′n,k ) |Fp (φn,l ) − Fp (φ′n,l )| v v u∞ ∞ h u∞ ∞ uX X uX X 2t t [Dn (φn,k )(φn,l )] Fm (φn,k ) − Fm (φ′ ≤ sup m,p k=1 l=1 k=1 l=1 v u∞ ∞ h uX X + sup t Dn (φn,k )(φn,l ) − D(φ′ m,p k=1 l=1 i2 ) [Fp (φn,l )]2 n,k v ∞ X ∞ i2 u uX ′ ) t [Fm (φ′n,k )Fp (φn,l )]2 )(φ n,k n,l k=1 l=1 v v u∞ ∞ h ∞ X ∞ i2 u uX X uX D(φ′n,k )(φ′n,l ) t [Fp (φn,l ) − Fp (φ′n,l )]2 [Fm (φ′n,k )]2 + sup t m,p k=1 l=1 k=1 l=1 13 i √ h O ≤ N kDn kS(H) e + kDkS(H) e  [ln n]β n1/4  + N U(n)kDn − DkS(H) e , n → ∞, a.s., (53) for β > 1/2, with U(n) → 1, n → ∞. From equation (112), in the Appendix, the last inequality in equation (53) follows, since lim n→∞ = " ∞ X l=1 n1/4 (ln(n))β " lim n→∞ #2 ∞ X l=1 n1/4 (ln(n)) β [Fp (φn,l ) − Fp (φ′n,l )]2  Fp (φn,l ) −  Fp (φ′n,l ) #2 = 0, a.s. (54) Futhermore, from Lemma 3 , a.s. kDn kS(H) kDkS(H) e → e , n → ∞, f f hence, from (53), there exists a positive constant M(n), with M(n) → 1, as n → ∞, such that f kdn − dkB×B ≤ M(n)N kDn − DkS(H) e . From equations (46)–(55), since kφn,j kHe = |φ′n,j kHe = 1, ekn (x) − ρπ kn (x)kB ke ρkn π ≤ kn X j=1 1 1 | hx, φn,j iHe |kDn (φn,j )kB − Cn,j Cj kn X 1 | hx, φn,j iHe − x, φ′n,j + C j j=1 + + kn X 1 | x, φ′n,j C j j=1 kn X 1 | x, φ′n,j C j j=1 e H |kdn kB×B e H |kdn kB×B kφn,j − φ′n,j kHe e H |kdn − dkB×B 14 (55) kn X ≤ j=1 1 1 | hx, φn,j iHe |kDn (φn,j )kB − Cn,j Cj kn X 1 | hx, φn,j iHe − x, φ′n,j + C j=1 j + + kn X 1 | x, φ′n,j C j j=1 kn X 1 | x, φ′n,j C j j=1 e H e H e H |N kDn kS(H) e ′ |N kDn kS(H) e kφn,j − φn,j kH e f |M(n)N kDn − DkS(H) e . (56) We now proceed to obtain some upper bounds for the terms appearing in equation (56). Specifically, under Assumptions A7 and A8, in a similar way to equation (50), we can derive the following inequalities: kDn (φn,j )kB = sup m≥1 ≤ 2 sup m≥1 ∞ X k=1 hDn (φn,j ), φn,k iHe Fm (φn,k ) ∞ X p p Cn,j Cn,k |Fm (φn,k )| k=1 #1/2 "∞ #1/2 " ∞ X X p 2 Cn,k |Fm (φn,k )| ≤ 2 sup Cn,j m≥1 √ p ≤ 2 N Cn,j " k=1 ∞ X k=1 Cn,k #1/2 k=1 p √ p = 2 N Cn,j kCn kN . (57) For n sufficiently large such that equation (123) holds, and from (57), Cauchy-Schwarz’s inequality, and Pkn > kn , one can get, under condition (43), for every x ∈ B aj ≥ Ck−1 Lemma 3, keeping in mind that j=1 n such that kxkB ≤ 1, kn X j=1 1 1 − | hx, φn,j iHe |kDn (φn,j )kB Cn,j Cj −1 kn1/2 kCn − CkL(H) Ck−1 ≤ Cn,k e kDn (φn,j )kB n n "∞ #1/2 X √ a.s. ≤4 N 0, Cn,k [Ckn ]−3/2 kn1/2 kCn − CkS(H) e → k=1 n → ∞. (58) In addition, applying again Cauchy-Schwarz’s inequality, under condition (43), from Lemma 3, for every 15 x ∈ B such that kxkB ≤ 1, kn X 1 | hx, φn,j iHe − x, φ′n,j C j j=1 e H |kdn kB×B kn X 1 kφn,j − φ′n,j kHe N kDn kS(H) e C j j=1   kn X 1  ≤ N kDn kS(H) aj  kCn − CkL(H) e e Ckn j=1 ≤  kn X 1 a.s.  aj  kCn − CkS(H) 0, ≤ N kDn kS(H) e → e Ckn j=1  n → ∞, a.s.. (59) One can obtain, in a similar way, under condition (43), from Lemma 3, the following two equations, for every x ∈ B such that kxkB ≤ 1, kn X 1 | x, φ′n,j C j j=1 kn X e H |kdn kB×B kφn,j − φ′n,j kHe 1 | x, φ′n,j He |kφn,j − φ′n,j kHe C j j=1   kn 1 X aj  kCn − CkS(H) ≤ N kDn kS(H) e → 0, e Ckn j=1 ≤ N kDn kS(H) e kn X 1 | x, φ′n,j C j j=1 ≤ e H kn X 1 | x, φ′n,j C j j=1 n → ∞, a.s. (60) n → ∞, a.s. (61) |kdn − dkB×B e H f |M(n)N kDn − DkS(H) e 1 f M(n)N kn1/2 kDn − DkS(H) e Ckn   kn X 1 a.s. f  ≤ M(n)N aj  kDn − DkS(H) 0, e → Ckn ≤ j=1 Under the conditions assumed, from equations (56)–(61), (43) implies sup x∈B; kxkB ≤1 ekn (x) − ρπ kn (x)kB →a.s. 0, ke ρkn π 16 n → ∞. (62) In equation (44), we now consider the norm in B of π kn (x) = ρπ kn (x) − ρe kn X j=1 x, φ′n,j − φn,j ′ e ρ(φn,j ) + H kn X j=1 hx, φn,j iHe ρ(φ′n,j − φn,j ), (63) which is upper bounded as follows. For every x ∈ B such that kxkB ≤ 1, under Assumption A5, using ρ ∈ L(B), π kn (x)kB ≤ kρπ kn (x) − ρe + kn X j=1 kn X j=1 x, φ′n,j − φn,j kρ(φ′n,j )kB e H hx, φn,j iHe kρ(φ′j − φn,j )kB ≤ V kρkL(B) kn1/2 sup kφ′j − φn,j kHe 1≤j≤kn +kn1/2 kρkL(B) sup kφ′j − φn,j kB (64) 1≤j≤kn Keeping in mind that, from Lemma 7, for n large enough, φn,j − φ′n,j sup 1≤j≤kn + sup kφn,j − 1≤j≤kn B h ≤ 2Ck−1 kC − Cn kS(H) e [M (n)N + V ] n φ′n,j kHe N kCkS(H) e # , a.s., (65) and that, under Condition (43),  n1/4 , n → ∞, β > 1/2 =o [ln(n)]β  1/4  n =o kn1/2 Ck−1 , n → ∞, β > 1/2, n [ln(n)]β  kn1/2 (66) from (64)–(66), applying Lemmas 3 and 5, sup x; kxkB ≤1 ≤ Ck−1 Since kn Ck−1 n n Pn j=1 aj = O kn X j=1 π kn (x)kB →a.s. 0, kρπ kn (x) − ρe  n1/4 (ln(n))β  n → ∞. (67) , n → ∞, applying Remark 5, kφn,j − φ′n,j kB → 0, 17 n → ∞ a.s.. (68) Under Condition (43), from equation (68), Lemma 8 leads to sup x∈B; kxkB ≤1 = kρe π kn (x) − ρ(x)kB sup x∈B; kxkB ≤1 ρ(x) − kn X j=1 →a.s. 0, hρ(x), φn,j iHe φn,j n → ∞. (69) B From equations (44), (62), (67) and (69), kρ(x) − ρekn kL(B) →a.s 0, n → ∞.  Corollary 1 Under the conditions of Proposition 1, assume that kX0 k∞,B = inf {c : P (kX0 kB > c) = 0} < ∞, then, ke ρkn (Xn ) − ρ(Xn )kB →a.s. 0, n → ∞. (70) Proof. The proof follows straightforward from Proposition 1. Specifically, from this proposition, ρkn − ρkL(B) kX0 k∞,B →a.s 0, ke ρkn (Xn ) − ρ(Xn )kB ≤ ke n → ∞. (71) Remark 6 (see p.228 in [9]) Note also that, for η > 0, applying Chebyshev’s inequality, ρkn − ρkL(B) ≥ η P (ke ρkn (Xn ) − ρ(Xn )kB ≥ η) ≤ P kXn kB ke   η + P (kXn kB ≥ A) ≤ P ke ρkn − ρkL(B) ≥ A  η  EkX0 k4B ≤ P ke ρkn − ρkL(B) ≥ + . A A4 Considering A = Proposition 1,  2EkX0 k4B ξ 1/4  (72) , for an arbitrary small ξ > 0, one can get, for n sufficiently large, from  η ξ + ≤ ξ. ρkn − ρkL(B) ≥ P (ke ρkn (Xn ) − ρ(Xn )kB ≥ η) ≤ P ke A 2 18 (73) Thus, ke ρkn (Xn ) − ρ(Xn )kB →P 0, n → ∞. Theorem 1 Let X be, as before, a standard ARB(1) process. Under the conditions of Lemmas 7 and 8,     P ke ρkn − ρkL(B) ≥ η ≤ d1 (η) exp −d2 (η)nCk2n  kn X j=1 where d1 (η) and d2 (η) are positive constants. Hence, if, as n → ∞, lnn nCk2n P kn j=1 aj −2   aj   , (74) 2 → ∞, (75) then, ke ρkn − ρkL(B) →a.s 0, n → ∞. Proof. π kn (x))kB ρkn − ρ)(e ekn (x))kB + k(e ρkn − ρ)(x − π k(e ρkn − ρ)(x)kB ≤ k(e := An (x) + Bn (x). (76) ekn (x)) = 0. Hence, from equations (124) in the proof of Lemma 7 and (126) in Note that ρekn (x − π the proof of Lemma 8 (see Appendix), denoting H(n) = M (n)N + V in equation (124), sup x∈B; kxkB ≤1 ekn (x))kB k(e ρkn − ρ)(x − π ≤ kρkL(H) e (1 + V ) kn X j=1 kφn,j − φ′n,j kB    −1 kn kC − Cn k e H(n) + N kCk e kC − Cn k e ≤ kρkL(H) e (1 + V ) 2Ckn S(H) S(H) S(H)    −1 kn H(n) + N kCk e = kC − Cn kS(H) e kρkL(H) e (1 + V ) 2Ckn S(H) ≤ kC − Cn kS(H) e kρkL(H) e (1 + V )2Ck−1 n kn X j=1 kn X j=1   . aj H(n) + N kCkS(H) e  , Q Ck−1 n kn X j=1  aj  = |ρk e (1 L(H) +V )2Ck−1 n kn X j=1 19 j=1  aj  aj   From equation (77), applying Theorem 4.2 in [9], with  kn X   , aj H(n) + N kCkS(H) e (77) we obtain P sup x∈B; kxkB ≤1  An (x) ≥ η !  nη 2   ≤ 4 exp  i − h  2 Pkn α + β , Q Ck−1 a 1 1 j=1 j n  , Q(Ck−1 n η Pkn j=1 aj )    . (78) Let us now consider Bn (x) in equation (76), which can be descomposed as follows: Bn (x) = an (x) + bn (x), with kan (x)kB ≤ P4 i=1 (79) ani (x) and bn (x) being defined as in equations (44) and (46) in Proposition 1. From equations (46) and (57), for x ∈ B, such that kxkB ≤ 1, kn X 1 1 − | hx, φn,j iHe |kDn (φn,j )kB C C n,j j j=1 "∞ #1/2 kn X X √ p |Cn,j − Cj | | hx, φn,j iHe |2 N Cn,j ≤ Cn,k Cn,j Cj j=1 k=1 p √ −1/2 . kCn kN kn1/2 Cn,kn Ck−1 ≤ 2 N kCn − CkL(H) e n an1 (x) = Applying now inequalities in (123), under the condition kCn − CkL(H) e < Ckn 2 (80) , we obtain from equation (80), for every x ∈ B, such that kxkB ≤ 1, p √ −3/2 an1 (x) ≤ 2 N Ckn kn1/2 kCn − CkL(H) kCn kN , e (81) and αn1 = sup x∈B; kxkB ≤1 p √ −3/2 kCn kN . an1 (x) ≤ 2 N Ckn kn1/2 kCn − CkL(H) e 20 (82) Thus, from equations (123)–(82),   Ckn P (αn1 ≥ η) = P αn1 ≥ η, kCn − CkL(H) ≥ e 2   Ckn +P αn1 ≥ η, kCn − CkL(H) e < 2   Ckn ≤ P kCn − CkL(H) e ≥ 2  √  p −3/2 +P 2 N kn1/2 Ckn kCn − CkS(H) kCn kN ≥ η . e (83) From equation (83), applying again Theorem 4.2 in [9], one can get, for n sufficiently large,   nCk2n   P (αn1 ≥ η) ≤ 4 exp −  C 4 α1 + β1 2kn    nη 2  ≤ 8 exp  − i2  h √ −3/2 1/2 p kCn kN 2 N Ckn kn α1 + β1      nη 2    + exp  − i h   2 p √ −3/2 1/2 η √ kCn kN α1 + β1 √ 1/2 −3/2 2 N Ckn kn 2 N kn Ckn kCn kN   −2   kn X   aj   , ≤ 8 exp −Kn[Ckn ]2   η √ √ −3/2 1/2 2 N Ckn kn kCn kN j=1 (84) with, as before, α1 and β1 being positive numbers, depending on ρ and Pε0 , introduced in Theorem 4.2 in [9], and η2  K= h √ i2 2 N kCn kN α1 + β1 3/2 ηC √ √1 2 N kCn kN . Moreover, from equation (59), applying Theorem 4.2 in [9], P (αn2 ≥ η) = P  sup x∈B: kxkB ≤1 an2 (x) ≥ η !   nη 2  ≤ 4 exp − i2  h 1 Pkn  N kDn k α1 + β1 N kDn k e Ck j=1 aj S(H) n  η f S(H) Ck n Similarly, from equation (60), 21 Pkn j=1 aj   ! .   (85) P (αn3 ≥ η) = P sup x∈B: kxkB ≤1   ≤ 4 exp  − h 1 N kDn kS(H) e Ck n an3 (x) ≥ η ! nη 2 ii2  α1 + β1 j=1 aj hP kn  η 1 N kDn kS(H) f C kn [ Pkn j=1 aj ]   . (86) Finally, from equation (61), applying Theorem 4.8 in [9], we have P (αn4 ≥ η) = P   ≤ 8 exp  − h sup x∈B: kxkB ≤1 1 f M(n)N Ck n an4 (x) ≥ η ! nη 2  i 2 Pkn γ+δ a j j=1  η 1 f M(n)N C kn Pkn j=1 aj   , (87) where γ and δ are positive numbers, depending on ρ and Pε0 , which have been introduced in Theorem 4.8 in [9]. Now, regarding the term bn (x), involved in the definition of Bn (x) in equation (79), from equation (124), applying, triangle and Cauchy-Schwarz’s inequalities, βn = sup bn (x) = x; kxkB ≤1 ≤ + sup kn X x; kxkB ≤1 j=1 kn X j=1 sup x; kxkB ≤1 x, φ′n,j − φn,j π kn (x)kB kρπ kn (x) − ρe e H hx, φn,j iHe kρ(φ′j − φn,j )kB 22 kρ(φ′n,j )kB ≤ V kρkL(B)  kn X j=1 kφ′j − φn,j kHe + ≤ kρkL(B) V kC − Cn kS(H) e  kn X kn X j=1 kρkL(B) kφ′j − φn,j kB aj j=1 kn kC − Cn k e H(n) + N kCk e kC − Cn k e +2Ck−1 S(H) S(H) S(H) n  V = kρkL(B) kC − Cn kS(H) e kn X j=1 −1 ≤ kρkL(B) kC − Cn kS(H) e 2Ckn  kn X j=1  aj   kn H(n) + N kCk e aj + 2Ck−1 S(H) n kn X j=1 i h . aj V + H(n) + N kCkS(H) e kn X j=1  aj   . (88) From equation (88), applying again Theorem 4.2 in [9], and denoting  L Ck−1 , n kn X j=1  aj  = kρkL(B) 2Ck−1 n kn X j=1 h i aj V + H(n) + N kCkS(H) , e (89) we obtain   nη  P (βn > η) ≤ 4 exp  i − h  2 Pkn α1 + β1 L aj , j=1 L Ck−1 n  2 , (Ck−1 n η Pkn j=1 aj )   . (90) From equations (76)–(90), equation (74) follows, and also, under condition (75), Borel-Cantelli lemma leads to the desired result on the a.s. convergence to zero.  Corollary 2 Under the conditions of Theorem 1, if, as n → ∞, equation (75) holds, and kX0 k∞,B = inf {c : P (kX0 kB > c) = 0} < ∞, then, ke ρkn (Xn ) − ρ(Xn )kB →a.s. 0. (91) The proof follows straightforward from Theorem 1, keeping in mind that ρkn − ρkL(B) kX0 k∞,B →a.s 0, ke ρkn (Xn ) − ρ(Xn )kB ≤ ke 23 n → ∞. (92) 5 Examples: Wavelets in Besov and Sobolev spaces It is well-known that wavelets provide orthonormal bases of L2 (R), and unconditional bases for several s function spaces including Besov spaces, Bp,q , s ∈ R, 1 ≤ p, q ≤ ∞, including as particular cases Sobolev or Hölder spaces (see [27]). Consider now orthogonal wavelets on the interval [0, 1]. Adapting wavelets to a finite interval requires some modifications as described in [13]. Let s > 0, for an [s]+1-regular Multiresolution Analysis (MRA) of L2 ([0, 1]), where [·] stands for the integer part, the father ϕ and the mother ψ wavelets satisfy ϕ, ψ ∈ C [s]+1 ([0, 1]). Also ϕ and its derivatives, up to order [s] + 1, have a fast decay. In addition, ψ has vanishing moments up to the order [s] + 1 (see Corollary 5.2 in [14]). Let 2J ≥ 2([s] + 1),  the construction in [13] starts from a finite set of 2J scaling functions ϕJ,k , k = 0, 1, . . . , 2J − 1 . For  each j ≥ J, 2j wavelet functions ψj,k , k = 0, 1, . . . , 2j − 1 are also considered. The collection of   these functions, ϕJ,k , k = 0, 1, . . . , 2J − 1 and ψj,k , k = 0, 1, . . . , 2j − 1 , j ≥ J, forms a complete orthonormal system of L2 ([0, 1]) . The associated reconstruction formula is given by: f (t) = J 2X −1 j−1 αJ,k ϕJ,k (t) + αJ,k = Z ∀f ∈ L2 ([0, 1]) , (93) f (t)ψj,k (t)dt, k = 0, . . . , 2j−1 , j ≥ J. (94) βj,k ψj,k (t), j≥J k=0 k=0 where X 2X 1 f (t)ϕJ,k (t)dt, βj,k = 0 Z 1 0 ∀t ∈ [0, 1], s The Besov spaces Bp,q ([0, 1]) can be characterized in terms of wavelets coefficients. Specifically, s denote by S ′ the dual of S, the Schwarz space, f ∈ S ′ belongs to Bp,q ([0, 1]), s ∈ R, 1 ≤ p, q ≤ ∞, if and only if kf ksp,q ≡ kψ ∗ f kp + ∞ X k=1 sk 2 kφk ∗ f kp q !1/q < ∞. (95) α Consider B to be a Besov space, in the scale {Bp,q ([0, 1]), α ∈ R, 1 ≤ p, q < ∞}, that will be specified letter. Let X be an ARB(1) process with covariance operator C having kernel c defined by: c(s, t) = J−1 2X j−1 ϕJ,k (s)ϕJ,k (t) + k=0 where, for each j ≥ J, λj > 0, and X 2X j≥J k=0 P j≥J λj ψj,k (s)ψj,k (t), s, t ∈ [0, 1], (96) λj 2j < ∞. In particular, we consider λj = 2−2js , for s > 1/2, and suppose, as before, that ϕ and ψ, the father and mother wavelets define an [s] + 1-regular MRA. Then the RKHS H(X) generated by c coincides with the Sobolev space H2s ([0, 1]) (see Proposition 2.1 in [3]). Consider this RKHS H(X) = H2s ([0, 1]) in Assumption A6. For 1/2 < β < s, let now, T : H2−β ([0, 1]) −→ H2β ([0, 1]) be a self-adjoint positive operator on L2 ([0, 1]), belonging to the unit ball of trace operators on L2 ([0, 1]). Assume that T : H2−β ([0, 1]) −→ H2β ([0, 1]) and T −1 : H2β ([0, 1]) −→ 24 H2−β ([0, 1]) are bounded linear operators. In particular, there exists an orthormal basis {vk }k≥1 of L2 ([0, 1]) such that, for every l ≥ 1, T (vl ) = tl vl , X tl = 1. (97) l≥1 In what follows, consider {vl }l≥1 to be the wavelet basis in (96), and define the kernel t of T as, for s, t ∈ [0, 1], J−1 j−1 k=0 k=0 2 2 1 X 22β − 1 X X −2jβ 2 ψj,k (s)ψj,k (t). t(s, t) = J ϕJ,k (s)ϕJ,k (t) + 2β(1−J) 2 2 j≥J (98) Note that T with kernel (98) satisfies the required conditions above. Then, for s and β sufficiently e ⋆ = H β ([0, 1]) and large, from Sobolev embedding theorems , we can consider, in Assumption A6, H 2 α B ⋆ = Bp,q ([0, 1]), with 2 ≤ p ≤ ∞, q ≥ 1, for α < β < s, sufficiently small, in relation to parameter β, such that α H2β ([0, 1]) ֒→ Bp,q ([0, 1]) (see, for example, [6] and [27]). Thus, equation (25) is satisfied, since, for 2 ≤ p ≤ ∞, q ≥ 1, for α < β < s, α H(X) = H2s ([0, 1]) ֒→ H2β ([0, 1]) ֒→ Bp,q ([0, 1]). (99) ϕ ψ In Lemma 1, we can then define {Fm } = {FJ,k , k = 0, . . . , 2j−1 } ∪ {Fj,k , k = 0, . . . , 2j−1 , j ≥ J} as follows: ϕ FJ,k = ϕJ,k , k = 0, . . . , 2j−1 ψ Fj,k = ψj,k , k = 0, . . . , 2j−1 , j ≥ J. (100) Furthermore, the sequence j−1 j−1 {tm } = {tϕ } ∪ {tψ , j ≥ J}, J,k , k = 0, . . . , 2 j,k , k = 0, . . . , 2 e is given by: involved in the definition of the inner product in H, tϕ J,k = tψ j,k = 1 , k = 0, . . . , 2j−1 . 2J 22β − 1 −2jβ 2 , k = 0, . . . , 2j−1 , 22β(1−J) j ≥ J. (101) In view of Proposition 2.1 in [3], the choice (100)–(101) of {Fm } and {tm } leads to the definition 25 e = [H β ([0, 1])]⋆ = H −β ([0, 1]), constituted by the restriction to [0, 1] of the tempered distributions of H 2 2 g ∈ S ′ (R), such that (I −∆)−β/2 g ∈ L2 (R), with (I −∆)−β/2 denoting the Bessel potential of order β (see α [27]). Note that, from Theorem 1.4 in Muramatu [23], we can consider B = [Bp,q ([0, 1])]⋆ = Bp−α ′ ,q ′ ([0, 1]), ′ constituted by the functions in Bp−α ′ ,q ′ (R), whose support is contained in [0, 1], with 1/p + 1/p = 1, 1/q + 1/q ′ = 1, and 2 ≤ p < ∞, 1 ≤ q < ∞, for α < β < s, 1/2 < β < s. From the above development, Assumption A6 holds with −β α H2s ([0, 1]) ֒→ H2β ([0, 1]) ֒→ Bp,q ([0, 1]) ≡ Bp−α ([0, 1]) ֒→ H2−s ([0, 1]), ′ ,q ′ ([0, 1]) ֒→ H2 (102) where, as before, [H(X)]⋆ = H2−s ([0, 1]) denotes the fractional Sobolev of order −s, constituted by the restriction to [0, 1] of the tempered distributions f ∈ S ′ (R), such that (I − ∆)−s/2 f ∈ L2 (R). From the condition that ϕ and ψ, the father and mother wavelets, define an MRA [s] + 1-regular (s > β), Assumption A7 is satisfied. From equation (95), since ϕ and ψ, the father and mother wavelets, define an MRA [s] + 1-regular, and B = Bp−α ′ ,q ′ ([0, 1]), the first part of Assumption A5 holds for a finite V. The [s] + 1-regularity (s > β > α) of the MRA induced by ϕ and ψ also allows that Assumption A8 holds, since the derivatives of ϕ up to order [s] + 1 have fast decay, jointly with the vanishing moment conditions of ψ, and the definition of the norm of H2β ([0, 1]) as kφkH β ([0,1]) = 2 Z 0 1 β/2 [(I − ∆) 2 (φ)(s)] ds 1/2 , ∀φ ∈ H2β ([0, 1]), where (I − ∆)β/2 denoted the inverse of the Bessel potential of order β < s. Note that the rest of assumptions A1–A4, and the second part of A5 can be easily reformulated in −β terms of the norms in the spaces L(Bp−α ([0, 1]) and Bp−α ′ ,q ′ ([0, 1])), H2 ′ ,q ′ ([0, 1]). 6 Final comments e with weaker It is well-known that Lemma 2.1 in [18] provides the construction of a Hilbert space H topology than a given real separable Banach space B with norm k · kB . This paper formulates sufficient conditions (see Assumptions A6–A8) on the elements involved in Kuelbs [18] lemma, for the strongconsistency, in the norm of L(B), of the componentwise estimator of ρ, considered in [9]. The strongconsistency of the corresponding ARB(1) plug-in predictor then follows in the norm of B. On the other hand, Section 5 illustrates the flexibility of Kuelbs [18] construction. Specifically, the abstract Banach context considered here is not only applicable for inference on continuous time stochastic processes, satisfying certain regularity conditions, like the solutions of stochastic differential equations, but also for inference on generalized singular processes, like the solutions to fractional pseudodifferential 26 equations. Acknowledgments This work was supported in part by project MTM2015–71839–P (co-funded by Feder funds), of the DGI, MINECO, Spain. Appendix. Proof of lemmas Proof of Lemma 2 Proof. Under Assumptions A6-A7, from equation (28), applying Cauchy-Schwarz inequality, for every k, l ≥ 1, |C(Fk , Fl )| = ∞ X Cj Fk (φj )Fl (φj ) j=1 v uX ∞ X u∞ ≤ t Cj [Fk (φj )]2 Cp [Fl (φp )]2 p=1 j=1 v uX ∞ X u∞ [Fl (φp )]2 ≤ sup |Cj |t [Fk (φj )]2 j j=1 p = sup |Cj | Nk Nl . p=1 (103) j Under Assumption A8, from equations (29) and (103), p kckB×B = sup |C(Fk , Fl )| ≤ sup sup |Cj | Nk Nl = N sup |Cj | = N kCkL(H) e . k,l k,l j (104) j  Proof of Lemma 4 Proof. From Lemma 3, applying Lemma 4.2 on p. 103 in [9], as n → ∞, n1/4 (ln(n))β ≤ sup |Cn,k − Ck | ≤ k≥1 n1/4 (ln(n)) β n1/4 (ln(n))β a.s. kCn − CX kS(H) 0. e → kCn − CX kL(H) e (105)  27 Proof of Lemma 5 Proof. Since kX0 kHe is bounded under Assumption A3, from equation (4.44) in Lemma 4.3, on page 104 in [9], and, from Theorem 4.2, on pages 99–100 in [9], for any β > 1/2, P n1/4 (ln(n)) β sup kφ′n,j − φn,j kHe ≥ η 1≤j≤kn β η (ln(n)) P kCn − CkS(H) e ≥ √ 2 2Λkn n1/4   2β η 2 (ln(n)) n   8Λ2kn n1/2   4 exp − , β   η (ln(n))  γ1 + δ 1 √ 2 2Λkn n1/4 ≤ ≤ ! ! (106) where γ1 and δ1 are positive numbers given in Theorem 4.2 of [9], depending only on ρ and Pε0 . Fur thermore, Λkn = o n1/2 (ln(n))2β−1 implies 1 ln(n) n η 2 (ln(n)) 8Λ2kn n1/2 2β η (ln(n)) γ1 + δ 1 √ 2 2Λkn n1/4 β → ∞, n → ∞. From (106)–(107), Borel-Cantelli Lemma leads to the a.s. convergence. (107)  Proof of Lemma 6 Proof. Under Assumptions A6–A8, applying Cauchy-Schwarz inequality, from equation (28), for n sufficiently large, |C − Cn (Fk )(Fl )| = ∞ X j=1 ≤ ∞ X j=1 Cj Fk (φ′n,j )Fl (φ′n,j ) − Cn,j Fk (φn,j )Fl (φn,j ) |Cj ||Fk (φ′n,j )||Fl (φ′n,j ) − Fl (φn,j )| + sup |Cj − Cn,j ||Fk (φ′n,j )Fl (φn,j )| j +|Cn,j Fl (φn,j )||Fk (φ′n,j ) − Fk (φn,j )| 28 v uX ∞ X u∞ Cj [Fl (φ′n,j ) − Fl (φn,j )]2 ≤t Cj [Fk (φ′n,j )]2 j=1 j=1 v uX ∞ X u∞ + sup |Cj − Cn,j |t [Fk (φ′n,j )]2 [Fl (φn,j )]2 j≥1 j=1 j=1 v uX ∞ X u∞ Cn,j [Fk (φ′n,j ) − Fk (φn,j )]2 +t Cn,j [Fl (φn,j )]2 j=1 j=1 v uX u∞ ≤ kFk kHe ⋆ t Cj [Fl (φ′n,j ) − Fl (φn,j )]2 j=1 + sup |Cj − Cn,j |kFk kHe ⋆ kFl kHe ⋆ j≥1 v uX u∞ Cn,j [Fk (φ′n,j ) − Fk (φn,j )]2 . +kFl kHe ⋆ t (108) j=1 From Lemma 5 (see equation (35)), n1/4 (ln(n)) = = which implies, β sup kφ′n,j − φn,j kHe 1≤j≤kn v u ∞ hD E D E i2 uX sup t φ′n,j , φ′n,k − φn,j , φ′n,k n1/4 (ln(n)) β 1≤j≤kn " β e H v u∞ h D E i2 uX sup t δj,k − φn,j , φ′n,k →a.s. 0, n1/4 (ln(n)) e H k=1 1≤j≤kn #2 n1/4 β (ln(n)) h e H k=1 φn,j , φ′n,k e H − δj,k i2 →a.s. 0, n → ∞, n → ∞, (109) (110) uniformly in k, j ≥ 1. That is, n1/4 β (ln(n)) φn,j , φ′n,k e H − δj,k →a.s. 0, 29 n → ∞, (111) uniformly in k, j ≥ 1. Therefore, as n → ∞, lim n→∞ = " n1/4 (ln(n)) "∞ X k=1 lim n→∞ β #2 [Fp (φn,l ) − Fp (φ′n,l )]2 n1/4 (ln(n)) β  φn,l , φ′n,k He Fp φ′n,k  −  Fp (φ′n,l ) #2 = 0, a.s., (112) uniformly in l. Thus, the following a.s. limit holds: lim n→∞ ∞ X l=1 Cl [Fp (φ′n,l ) − Fp (φn,l )]2 = ∞ X l=1 Cl lim [Fp (φ′n,l ) − Fp (φn,l )]2 = 0. n→∞ (113) In addition, from equation (33), in Lemma 4, Cn,j →a.s. Cj , n → ∞, (114) uniformly in j ≥ 1. From equations (112) and (114), as n → ∞, ∞ X j=1 Cn,j [Fl (φ′n,j ) − Fl (φn,j )]2 →a.s. 0. (115) Now, from equations (108)–(115), as n → ∞, |[C − Cn ](Fk )(Fl )| ≤ Hk,l (n), Hk,l (n) = O(sup |Cj − Cn,j |kFk kHe ⋆ kFl kHe ⋆ ). a.s (116) j≥1 Finally, under Assumption A6–A8, one can get, from equation (116), for n sufficiently large, for certain positive constant M (n); M (n) → 1, n → ∞, kc − cn kB×B = sup |[C − Cn ](Fk )(Fl )| k,l ≤ sup M (n) sup |Cj − Cn,j |kFk kHe ⋆ kFl kHe ⋆ k,l j≥1 ≤ M (n)kC − Cn kL(H) e sup kFk kH e ⋆ kFl kH e⋆ k,l ≤ M (n)N kC − Cn kL(H) e , a.s. (117)  30 Proof of Lemma 7 Proof. Let us first consider the following a.s. equalities Cn,j φn,j − φ′n,j  Cn (φn,j ) − Cn,j φ′n,j = (Cn − C) (φn,j )  C φn,j − φ′n,j + (Cj − Cn,j ) φ′n,j . = + (118) From equation(118), φn,j − φ′n,j ≤ B + + = 1 Cn,j 1 Cn,j 1 Cn,j 1 Cn,j k(Cn − C) (φn,j )kB C φn,j − φ′n,j  (Cj − Cn,j ) φ′n,j [S1 + S2 + S3 ] , B B a.s.. (119) For n sufficiently large, from Lemmas 2 and 6, keeping in mind Assumption A5, and applying Cauchy-Schwarz inequality, for every j ≥ 1, S1 = k(Cn − C) (φn,j )kB = sup m = sup m = sup m ≤ ∞ X Cn,k Fm (φn,k ) hφn,k , φn,j iHe − k=1 ∞ X ∞ X k=1 l=1 ∞ X ∞ X Ck Fm (φ′n,k ) φ′n,k , φn,j k=1 e H   tl Fl (φn,j ) Cn,k Fm (φn,k )Fl (φn,k ) − Ck Fm (φ′n,k )Fl (φ′n,k ) tl Fl (φn,j ) l=1 ∞ X k=1 Cn,k Fm (φn,k )Fl (φn,k ) − Ck Fm (φ′n,k )Fl (φ′n,k ) v u∞ uX tl [Fl (φn,j )]2 sup t m l=1 v #2 u∞ "∞ uX X t ′ ′ tl Cn,k Fm (φn,k )Fl (φn,k ) − Ck Fm (φn,k )Fl (φn,k ) × l=1 k=1 v u∞ ∞ X uX t Cn,k Fm (φn,k )Fl (φn,k ) − Ck Fm (φ′n,k )Fl (φ′n,k ) tl sup ≤ kφn,j kHe l=1 m,l k=1 = kcn − ckB×B ≤ M (n)N kC − Cn kL(H) e ≤ M (n)N kC − Cn kS(H) e , a.s. (120) 31 S2 = ≤ C φn,j − φ′n,j  B = sup m ∞ X ∞ X k=1 l=1 tl Ck Fm (φ′n,k )Fl (φ′n,k )Fl φn,j − φ′n,j v v #2 u∞ "∞ u∞ uX X uX  t ′ ′ ′ 2 t tl [Fl φn,j − φn,j ] tl Ck Fm (φn,k )Fl (φn,k ) sup m l=1 l=1 ∞ X k=1 ≤ kφn,j − φ′n,j kHe sup = kφn,j − φ′n,j kHe kckB×B ≤ kφn,j − φ′n,j kHe N kCkS(H) e , m,l k=1  Ck Fm (φ′n,k )Fl (φ′n,k ) a.s. (121) S3 ≤ sup |Cj − Cn,j | φ′n,j j≥1 B ≤ V kC − Cn kL(H) e ≤ V kC − Cn kS(H) e , a.s. (122) In addition, from Lemma 3, Cn,j →a.s. Cj , n → ∞, and a.s. kCn − CkL(H) 0, e ≤ kCn − CkS(H) e → n → ∞, for ε = Ckn /2, we can find n0 such that for n ≥ n0 , kCn − CkL(H) e ≤ ε = Ckn /2, a.s. |Cn,kn − Ckn | ≤ εe ≤ kCn − CkL(H) e Cn,kn ≥ Ckn − εe ≥ Ckn − kCn − CkL(H) e ≥ Ckn − Ckn /2 ≥ Ckn /2. (123) From equations (119)–(122), for n large enough such that equation (123) holds, the following almost surely inequalities are satisfied: For 1 ≤ j ≤ kn , 1 1 M (n)N kC − Cn kS(H) kφn,j − φ′n,j kHe N kCkS(H) e + e Cn,j Cn,j 1 1 V kC − Cn kS(H) kC − Cn kS(H) + e = e [M (n)N + V ] Cn,j Cn,j h 1 −1 + kφn,j − φ′n,j kHe N kCkS(H) e [M (n)N + V ] e ≤ 2Ckn kC − Cn kS(H) Cn,j i . +kφn,j − φ′n,j kHe N kCkS(H) e φn,j − φ′n,j B ≤ Hence, equation (40) holds. (124)  32 Proof of Lemma 8 Proof. The following identities are considered: kn X j=1 = hρ(x), φn,j iHe φn,j − kn X j=1 kn X ρ(x), φ′n,j j=1 hρ(x), φn,j iHe (φn,j − φ′n,j ) + kn X j=1 e H φ′n,j ρ(x), φn,j − φ′n,j e H φ′n,j . (125) From equation (125), applying Cauchy-Schwarz inequality, under A5, sup x∈B; kxkB ≤1 ≤ ≤ ≤ kn X j=1 sup hρ(x), φn,j iHe φn,j − kn X x∈B; kxkB ≤1 j=1 sup x∈B; kxkB ≤1 sup x∈B; kxkB ≤1 ρ(x), φ′n,j j=1 e H φ′n,j B kρ(x)kHe kφn,j kHe kφn,j − φ′n,j kB + kρ(x)kHe kφn,j − φ′n,j kHe kφ′n,j kB kρ(x)kHe kn X j=1 kφn,j − φ′n,j kB + kφn,j − φ′n,j kB sup kφ′n,j kB kρkL(H) e kxkH e (1 + V ) ≤ kρkL(H) e (1 + V ) kn X kn X j=1 j kn X j=1 kφn,j − φ′n,j kB kφn,j − φ′n,j kB → 0, n → ∞, a.s. (126)  References References [1] A. Allam and T. Mourid (2001). Propriétés de mélanges des processus autorégressifs banachiques.C.R. Acad. Sci. Paris 333 Série I, 363–368. [2] J. Álvarez-Liébana, D. Bosq and M.D. Ruiz-Medina (2016). Consistency of the plug-in functional predictor of the Ornstein-Uhlenbeck in Hilbert and Banach spaces. Statistics & Probability Letters 117, 12–22. [3] C. Angelini, D. De Canditiis and F. Leblanc (2003). Wavelet regression estimation in nonparametric mixed effect models. J. Multivariate Anal. 85, 267–291. [4] V. V. Anh, N. N. Leonenko and M. D. Ruiz-Medina (2016a) Space-time fractional stochastic equations on regular bounded open domains. Fractional Calculus and Applied Analysis 19, 1161–1199. 33 [5] V. V. Anh, N. N. Leonenko and M. D. Ruiz-Medina (2016b). Fractional-in-time and multifractionalin-space stochastic partial dierential equations. Fractional Calculus and Applied Analysis 19, 1434– 1459. [6] J. Bergh, and J. Löfstrom (1976). Interpolation Spaces. Springer, New York . [7] P. C. Besse, H. Cardot, D.B. (2000). Stephenson Autoregressive forecasting of some functional climatic variations. Scand. J. Statist. 27, 673–687. [8] D. Blanke and D. Bosq (2016). Detecting and estimating intensity of jumps for discretely observed ARMAD(1,1) processes. Journal of Multivariate Analysis 146, 119–137. [9] D. Bosq (2000). Linear Processes in Function Spaces. Springer, New York. [10] D. Bosq (2002). Estimation of mean and covariance operator of autoregressive processes in Banach spaces. Statistical Inference for Stochastic Processes 5, 287–306. [11] R. A. Davis and T. Mikoschb (2008). Extreme value theory for spacetime processes with heavy-tailed distributions. Stochastic Processes and their Applications 118, 560–584. [12] H. Dehling and O. Sh. Sharipov (2005). Estimation of mean and covariance operator for banach space valued autoregressive processes with dependent innovations. Statistical Inference for Stochastic Processes 8, 137–149. [13] A. Cohen, I. Daubechies and P. Vial (1993). Wavelets on the interval and fast wavelet transforms. Appl. Comput. Harm. Anal. 1 54–81. [14] I. Daubechies (1992). Ten Lectures on Wavelets. CBMS-NSF Regional Conference Series in Applied Mathematics. Vol. 61, SIAM. Philadelphia. [15] L. El Hajj (2011). Limit theorems for D([0, 1])-valued autoregressive processes. C.R. Acad. Sci. Paris 349, 821–825. [16] L. De Haan and T. Lin (2001). On convergence toward an extreme value distribution in C([0, 1]). The Annals of Probability 29, 467-483. [17] S. Hörmann and P. Kokoszka (2012). Functional Time Series, in Handbooks of Statistics, Eds. Subbu Rao, Subbu Rao, Rao, 30, Elsevier, Amsterdam. [18] J. Kuelbs (1970). Gaussian measures on a Banach spaces. J. Funct. Anal. 5, 354–367. [19] A. Labbas and T. Mourid (2002). Estimation et prévision d’un processus autorégressif Banach. C. R. Acad. Sci. Paris Sér. I 335, 767–772. 34 [20] A. Mas and B. Pumo (2010). Linear processes for functional data. The Oxford Handbook of Functional Data. Ferraty and Romain Eds., Oxford. [21] F. Mokhtari and T. Mourid (2003). Prediction of continuous time autoregressive processes via the reproducing kernel spaces. Statistical Inference for Stochastic Processes 6, 247–266. [22] T. Mourid (2002). Statistiques dune saisonnalité perturbée par un processus a représentation autorégressive. C. R. Acad. Sci. Paris Ser. I 334, 909–912. [23] T. Muramatu (1976). On the Dual of Besov Spaces Publ. RIMS, Kyoto Univ. 12, 123–140. [24] A. Parvardeha, N.M. Jouzdanib, S. Mahmoodib, A.R. Soltanic (2017). First order autoregressive periodically correlated model inBanach spaces: Existence and central limit theorem. Journal of Mathematical Analysis and Applications 449, 756–768. [25] F. Rachedi and T. Mourid (2003). Estimateur crible de loprateur dun processus ARB(1) Sieve estimator of the operator in ARB(1) process. C. R. Acad. Sci. Paris Ser. I 336, 605–610. [26] F. Spangenberg (2013). Strictly stationary solutions of ARMA equations in Banach spaces. Journal of Multivariate Analysis 121, 127–138. [27] H. Triebel (1983). Theory of Function Spaces II. Birkhauser, Basel. 35
10math.ST
International Journal of Computer Trends and Technology (IJCTT) – volume 7 number 2– Jan 2014 LSSVM-ABC Algorithm for Stock Price prediction Osman Hegazy 1, Omar S. Soliman 2 and Mustafa Abdul Salam3 1, 2 3 (Faculty of Computers and Informatics, Cairo University, Egypt) (Higher Technological Institute (H.T.I), 10th of Ramadan City, Egypt) ABSTRACT : In this paper, Artificial Bee Colony (ABC) algorithm which inspired from the behavior of honey bees swarm is presented. ABC is a stochastic population-based evolutionary algorithm for problem solving. ABC algorithm, which is considered one of the most recently swarm intelligent techniques, is proposed to optimize least square support vector machine (LSSVM) to predict the daily stock prices. The proposed model is based on the study of stocks historical data, technical indicators and optimizing LSSVM with ABC algorithm. ABC selects best free parameters combination for LSSVM to avoid over-fitting and local minima problems and improve prediction accuracy. LSSVM optimized by Particle swarm optimization (PSO) algorithm, LSSVM, and ANN techniques are used for comparison with proposed model. Proposed model tested with twenty datasets representing different sectors in S&P 500 stock market. Results presented in this paper show that the proposed model has fast convergence speed, and it also achieves better accuracy than compared techniques in most cases. Keywords - Least square support vector machine, Artificial Bee Colony, technical indicators, and stock price prediction. I. INTRODUCTION The stock market field is characterized by unstructured nature, data intensity, noise, and hidden relationships. Also the behavior of a stock time series is close to random. For these reasons the stock market prediction is not a simple task. In field of stock market, there are several prediction tools that have been used since years ago. Fundamental and technical analyses were the first two methods used to forecast stock prices. ARIMA (Autoregressive Integrated Moving Average) is one of the most commonly used time series prediction methods [1]. ARIMA method deals with linear, but it is difficult to deal with nonlinear feature in time series [2]. GARCH (Generalized Autoregressive Conditional Heteroskedasticity) linear time series prediction method is also used [3]. Artificial Neural Networks (ANNs) tool which is a branch of ISSN: 2231-2803 Computational Intelligence (CI) is become one of the most commonly machine learning techniques used in stock market prediction. ANNs prediction method is used to overcome the limitations of above methods. In most cases ANNs suffer from over-fitting problem due to the large number of parameters to fix, and the little prior user knowledge about the relevance of the inputs in the analyzed problem [4]. Support vector machines (SVMs) have been developed as an alternative that avoids the above prediction models limitations. Their practical successes can be attributed to solid theoretical foundations based on VC-theory [5]. SVM computes globally optimal solutions, unlike those obtained with ANN, which tend to fall into local minima [6]. Least squares support vector machine (LSSVM) method which is presented in [7], is a reformulation of the traditional SVM algorithm. LSSVM uses a regularized least squares function with equality constraints, leading to a linear system which meets the Karush-KuhnTucker (KKT) conditions for obtaining an optimal solution. Although LSSVM simplifies the SVM procedure, the regularization parameter and the kernel parameters play an important role in the regression system. Therefore, it is necessary to establish a methodology for properly selecting the LSSVM free parameters, in such a way that the regression obtained by LSSVM must be robust against noisy conditions, and it does not need priori user knowledge about the influence of the free parameters values in the problem studied [8]. The perceived advantages of evolutionary strategies as optimization methods motivated the authors to consider such stochastic methods in the context of optimizing SVM. A survey and overview of evolutionary algorithms (EAs) is found in [9]. Since 2005, D. Karaboga and his research group have been studying the Artificial Bee Colony (ABC) algorithm and its applications to real world problems. Karaboga and Basturk have investigated the performance of the ABC algorithm on unconstrained numerical optimization problems www.internationaljournalssrg.org Page 81 International Journal of Computer Trends and Technology (IJCTT) – volume 7 number 2– Jan 2014 which is found in [10], [11], [12] and its extended version for the constrained optimization problems in [13]. Neural network trained with ABC algorithm is presented in [14], [15]. ABC Algorithm based approach for structural optimization is presented in [16]. Applying ABC algorithm for optimal multi-level thresholding is introduced in [17]. ABC was used for MR brain image classification in [18], cluster analysis in [19], face pose estimation in [20], and 2D protein folding in [21]. A new hybrid ABC algorithm for robust optimal design and manufacturing is introduced in [22]. Hybrid artificial bee colony-based approach for optimization of multi-pass turning operations is used in [23]. Intrusion detection in AODV-based MANETs using ABC and negative selection algorithms is presented in [24]. A study on Particle Swarm Optimization (PSO) and ABC algorithms for multilevel thresholding is introduced in [25]. Heuristic approach for inverse kinematics of robot arms is found in [26]. A combinatorial ABC Algorithm applied for traveling salesman problem is introduced in [27]. Identifying nuclear power plant transients using the discrete binary ABC Algorithm is presented in [28]. An ABC-AIS hybrid approach to dynamic anomaly detection in AODV-based MANETs is found in [29]. Modified ABC algorithm based on fuzzy multi-objective technique for optimal power flow problem is presented in‫[ ‏‬30]. ‫‏‬ ABC optimization was used for multi-area economic dispatch in [31]. MMSE design of nonlinear volterra equalizers using ABC algorithm is introduced in‫[ ‏‬32]. ‫‏‬ Hybrid seeker optimization algorithm for global optimization is found in [33]. This paper proposes a hybrid LSSVM-ABC model. The performance of LSSVM is based on the selection of hyper parameters C (cost penalty), ϵ (insensitive-loss function) and γ (kernel parameter). ABC will be used to find the best parameter combination for LSSVM. The paper is organized as follows: Section II presents the Least square support vector machine algorithm; Section III presents the Artificial Bee Colony algorithm; Section IV is devoted for the ISSN: 2231-2803 proposed model and implementation of ABC algorithms in stock prediction; In Section V the results are discussed. The main conclusions of the work are presented in Section VI. II. LEAST SQUARE SUPPORT VECTOR MACHINE Least squares support vector machines (LSSVM) are least squares versions of support vector machines (SVM), which are a set of related supervised learning methods that analyze data and recognize patterns, and which are used for classification and regression analysis. In this version one finds the solution by solving a set of linear equations instead of a convex quadratic programming (QP) problem for classical SVMs. LSSVM classifiers, were proposed by Suykens and Vandewalle [34]. Let X is n p input data matrix and y is n  1 output vector. Given the set, where {xi , yi }in1 training data xi  R p and yi  R , the LSSVM goal is to construct the function f ( x)  y , which represents the dependence of the output y i on the input xi . This function is formulated as f ( x)  W T  ( x)  b Where W and  (x) : (1) R p  Rn are n  1 column vectors, and b  R . LSSVM algorithm [8] computes the function (1) from a similar minimization problem found in the SVM method [6]. However the main difference is that LSSVM involves equality constraints instead of inequalities, and it is based on a least square cost function. Furthermore, the LSSVM method solves a linear problem while conventional SVM solves a quadratic one. The optimization problem and the equality constraints of LSSVM are defined as follows: 1 T 1 T min j(w,e,b)  w wC e (2) 2 2 w,e,b www.internationaljournalssrg.org Page 82 International Journal of Computer Trends and Technology (IJCTT) – volume 7 number 2– Jan 2014 yi  wT  ( xi )  b  ei Where e is the n  1 error vector, 1 is a n  1  vector with all entries 1, and C  R is the tradeoff parameter between the solution size and training errors. From (2) a Lagranian is formed, w, b, e, a and differentiating with respect to ( a is Largrangian multipliers), we obtain I  0 0   Z 0 0 0 0 0 CI 1 Where I  Z T  W   0    1T  b   0      I  e   0   0   a   y  (4) I represents the identity matrix and Z  [ ( x1),  ( x2),...,  ( xn )]T From rows one and three in (3) (5) w  ZTa and Ce  a Then, by defining the kernel matrix K  ZZ , T and the parameter   C , the conditions for optimality lead to the following overall solution 1 0 1T  b   0        1 K  I  a   y  (6) Kernel function K types are as follows: K ( x, xi )  xiT x  Linear kernel  Polynomial kernel of degree K ( x, xi )  (1  xiT x / c) d   MLP kernel : ISSN: 2231-2803 / 2 ) ARTIFICIAL BEE COLONY ALGORITHM Artificial Bee Colony (ABC) algorithm was proposed by Karaboga in 2005 for real parameter optimization [35]. ABC is considered recent swarm intelligent technique. It is inspired by the intelligent behavior of honey bees. The colony of artificial bees consists of three groups of bees: employed, onlooker and scout bees. Half of the colony composed of employed bees and the rest consist of the onlooker bees. The number of food sources/nectar sources is equal with the employed bees, which means one nectar source is responsible for one employed bee. The aim of the whole colony is to maximize the nectar amount. The duty of employed bees is to search for food sources (solutions). Later, the nectars’ amount (solutions’ qualities/fitness value) is calculated. Then, the information obtained is shared with the onlooker bees which are waiting in the hive (dance area). The onlooker bees decide to exploit a nectar source depending on the information shared by the employed bees. The onlooker bees also determine the source to be abandoned and allocate its employed bee as scout bees. For the scout bees, their task is to find the new valuable food sources. They search the space near the hive randomly [36]. In ABC algorithm, suppose the solution space of the problem is D-dimensional, where D is the number of parameters to be optimized. (7) d: (8) 2 III. The fitness value of the randomly chosen site is formulated as follows: Radial basis function RBF kernel : K ( x, xi )  exp(  x  xi K ( x, xi )  tanh(kxiT x   ) (10) (3) (9) ( ) (11) The size of employed bees and onlooker bees are both SN, which is equal to the number of food sources. There is only one employed bee for each food source whose first position is randomly generated.. In each iteration of ABC algorithm, each employed bee determines a new neighboring food source of its currently associated food source www.internationaljournalssrg.org Page 83 International Journal of Computer Trends and Technology (IJCTT) – volume 7 number 2– Jan 2014 and computes the nectar amount of this new food source by Where; is random number in range [0 , 1]. ( ) (12) , are the lower and upper borders in the jth dimension of the problem space. Where; The ABC algorithm is shown in Fig. 1. [ ] If the new food source is better than that of previous one, then this employed bee moves to new food source, otherwise it continues with the old one. After all employed bees complete the search process; they share the information about their food sources with onlooker bees. An onlooker bee evaluates the nectar information taken from all employed bees and chooses a food source with a probability related to its nectar amount by Equation: (13) ∑ Where is the fitness value of the solution i which is proportional to the nectar amount of the food source in the position i and SN is the number of food sources which is equal to the number of employed bees. Later, the onlooker bee searches a new solution in the selected food source site, the same way as exploited by employed bees. After all the employed bees exploit a new solution and the onlooker bees are allocated a food source, if a source is found that the fitness hasn’t been improved for a predetermined number of cycles (limit parameter), it is abandoned, and the employed bee associated with that source becomes a scout bee. In that position, scout generates randomly a new solution by Equation: ( ISSN: 2231-2803 ) (14) Fig.1 the ABC algorithm. IV. THE PROPOSED MODEL The proposed model is based on the study of stock historical data (High, Low, Open, Close, and Volume). Then technical indicators are calculated from these historical data to be used as inputs to proposed model. After that LSSVM is optimized by ABC algorithm to be used in the prediction of daily stock prices. LSSVM optimized by PSO algorithm, standard LSSVM, and ANN trained with Scaled Conjugate gradient (SCG) algorithm, which is one of the best backpropagation derivatives, are used as benchmarks for comparison with proposed model. The proposed model architecture contains six inputs vectors represent the historical data and five derived technical indicators from raw datasets, and one output represents next price. www.internationaljournalssrg.org Page 84 International Journal of Computer Trends and Technology (IJCTT) – volume 7 number 2– Jan 2014 Proposed model phases are summarized in Fig 2.  Optimizing and training LSSVM with ABC algorithm Stochastic Oscillator (SO): The stochastic oscillator defined as a measure of the difference between the current closing price of a security and its lowest low price, relative to its highest high price for a given period of time. The formula for this computation is as follows. %K = [(CP – LP) / (HP –LP)] * 100 (20) Testing LSSVM-ABC model with new data Where, CP is Close price, LP is Lowest price, HP is Highest Price, and LP is Lowest Price. Data Acquisition and Preprocessing (Stocks Histoical data) Feature Extraction and selection (Techincal Indicators)  Computing MSE for( LSSVM-ABC, LSSVM-PSO,LSSVM and ANN) Fig. 2 the proposed model phases. The technical indicators, which are calculated from the raw datasets, are as follows:  Relative Strength Index (RSI): A technical momentum indicator that compares the magnitude of recent gains to recent losses in an attempt to determine overbought and oversold conditions of an asset. The formula for computing the Relative Strength Index is as follows. (15) RSI = 100- [100 / (1+RS)] Where RS = Avg. of x days’ up closes divided by average of x days’‫‏‬down closes.  Money Flow Index (MFI): This one measures the strength of money in and out of a security. The formula for MFI is as follows. Money Flow (MF) = TP * V (16) Where, TP is typical price, and V is money volume Money Ratio (MR) is calculated as:  MR = (Positive MF / Negative MF) (17) MFI = 100 – (100/ (1+MR)). (18) Moving Average Convergence/Divergence (MACD): This function calculates difference between a short and a long term moving average for a field. The formulas for calculating MACD and its signal as follows. MACD= [0.075*E] - [0.15*E] (21) Where, E is EMA (CP) Signal Line = 0.2*EMA of MACD (22) V. RESULTS AND DISCUSSIONS The proposed and compared models were trained and tested with datasets for twenty companies cover all sectors in S&P 500 stock market. Datasets period are from Jan 2009 to Jan 2012. All datasets are available in [37]. Datasets are divided into training part (70%) and testing part (30%). LSSVM-ABC algorithm parameters are shown in table (1). Table (1) LSSVM-ABC algorithm parameters. No. of bees epochs LSSVM kernel 20 bees 50 RBF kernel LSSVM-PSO parameters are shown in table (2). Table (2) LSSVM-PSO algorithm parameters. No. of Particles epochs LSSVM kernel 20 particles 50 RBF kernel EMA = [α *T Close] + [1-α* Y EMA]. (19) ANN parameters are found in table (3). Table (3) ANN model parameters. Training Input Hidden epochs Output algorithm layer layer layer SCG 6 11 1000 1 nodes nodes node Where T is Today’s close and Y is Yesterday’s close. Fig. 3 outlines the ANN structure used in this paper. Exponential Moving Average (EMA): This indicator returns the exponential moving average of a field over a given period of time. EMA formula is as follows. ISSN: 2231-2803 www.internationaljournalssrg.org Page 85 International Journal of Computer Trends and Technology (IJCTT) – volume 7 number 2– Jan 2014 model has little advance compared with LSSVM and ANN since the data sets is normal and have no fluctuations, but LSSVM-ABC has fast convergence speed compared to other models. Fig. 3 ANN model structure Fig. 4 to Fig. 23 outline the application of Proposed LSSVM-ABC model compared with LSSVM-PSO, LSSVM and ANN-BP algorithms at different datasets representing different stock market sectors. In Fig. 4, Fig. 7, Fig. 8 and Fig. 9 which represent results of four companies in information technology sector (Adobe, Oracle, CISCO, and HP) results show that proposed LSSVM-ABC, and LSSVM-PSO models are achieving lowest error value with little advance to proposed model. In Fig. 5, and Fig. 6 which represent results of two other companies in information technology sector (Amazon, and Apple), results show that ANN is fallen in overfitting problem, since the datasets have fluctuations. LSSVM-ABC algorithm is the best one with lowest error value and could easily overcome local minima and overfitting problems. Fig. 10, and Fig. 11 which represent results of financial sector companies (American Express, and Bank of New york), we can remark that the predicted curve using the proposed LSSVM-ABC and LSSVM-PSO are most close to the real curves which achieve best accuracy, followed by LSSVM, while ANN-BP is the worst one. Fig. 12 represents result of Honeywell company which represents industrials stock sector. Proposed model could easily overcome local minimum problem which ANN suffers from. Fig. 13 and Fig.14 outline the application of the proposed algorithm to hospera and life technologies companies in health stock sector. From figures one can remark the enhancement in the error rate achieved by the proposed model. Fig. 12, Fig.16, Fig.17, Fig.18, and Fig.19 outline the results of testing proposed model for (CocaCola, Exxon-mobile, AT&T, FMC, and duke energy) companies which represent different stock sectors. LSSVM-ABC and LSSVM-PSO can converge to global minima with lowest error value compared to LSSVM and ANN (especially in fluctuation cases). Fig. 20, Fig.21, Fig.22, and Fig.23 represent results for (Ford, FEDX, MMM, and PPL) companies in different stock sectors. The results of proposed ISSN: 2231-2803 Table 4 outlines Mean Square Error (MSE) performance function for proposed and compared models. It can be remarked that the LSSVM-ABC, and LSSVM-PSO techniques always gives an advance over LSSVM and ANN trained with SCG algorithms in all performance functions and in all trends and sectors. Fig. 24 outlines comparison between LSSVMABC, LSSVM-PSO, LSSVM and ANN algorithms according to MSE function. Fig. 4 Results for Adobe Company. Fig. 5 Results for Amazon Company. www.internationaljournalssrg.org Page 86 International Journal of Computer Trends and Technology (IJCTT) – volume 7 number 2– Jan 2014 Fig. 6 Results for Apple Company. Fig. 9 Results for HP company. Fig. 7 Results for Oracle Co. Fig. 10 Results for American Express Company Fig. 8 Results for CISCO Co. Fig. 11 Results Bank of New York company. ISSN: 2231-2803 www.internationaljournalssrg.org Page 87 International Journal of Computer Trends and Technology (IJCTT) – volume 7 number 2– Jan 2014 Fig. 12 Results for Coca-Cola company. .Fig. 15 Results for Life Tech. Company Fig. 13 Results for Honey Well company. Fig. 16 Results for Exxon-Mobile. Company. Fig. 14 Results for Hospera Co. ISSN: 2231-2803 Fig. 17 Results for AT&T. Company www.internationaljournalssrg.org Page 88 International Journal of Computer Trends and Technology (IJCTT) – volume 7 number 2– Jan 2014 Fig. 18 Results for FMC. Company. Fig. 21 Results for FEDX. Company. Fig. 19 Results for Duke. Company. Fig. 22 Results for MMM. Company. Fig. 20 Results for Ford. Company Fig. 23 Results for PPL. Company ISSN: 2231-2803 www.internationaljournalssrg.org Page 89 International Journal of Computer Trends and Technology (IJCTT) – volume 7 number 2– Jan 2014 Table (4) Mean Square Error (MSE) for proposed algorithm. Algorithm Company Adobe Amazon Apple Oracle CISCO HP Am.Expres NY Bank Coca-Cola H. Well Hospera Life Tech. Exx.Mob. AT & T FMC Duke FORD FEDX MMM PPL LSSVM -ABC LSSVM -PSO LSSVM 0.5310 4.5286 5.5915 0.6320 0.3115 0.7727 0.7904 0.4841 0.6809 0.9563 0.8695 0.7718 1.0997 0.2916 1.5881 0.1710 0.2473 1.4948 0.7718 0.2920 0.5317 4.5315 5.5924 0.6314 0.3111 0.7725 0.7905 0.4839 0.6823 0.9574 0.8694 0.7713 1.1000 0.2911 1.5881 0.1735 0.2472 1.4948 0.7713 0.2919 0.5529 6.1981 9.4863 0.6807 0.3623 0.9752 0.8761 0.9394 0.8096 1.3371 0.8936 1.0195 1.3016 0.3684 1.7529 0.3709 0.2660 1.5285 1.0195 0.2907 convergence speed and has highest error value even after training for long period (one thousand iterations). ANN 0.6979 22.015 143.01 0.7598 0.3929 1.3146 1.5116 0.9646 2.0560 2.1853 1.5162 2.4162 1.3080 0.4241 3.0843 0.5897 0.2628 1.9454 2.4162 0.3073 Fig. 25 Convergence curve of LSSVM-ABC. Fig. 26 Convergence curve of LSSVM-PSO. Fig. 24 MSE of proposed algorithm. Convergence speed of the LSSVM-ABC, LSSVMPSO, and ANN models are shown in Fig. 25, Fig. 26 and Fig. 27 respectively. From figures one can notice that the proposed model has fast convergence to global minimum after less than twenty iteration with lowest error value followed by LSSVM-PSO model, while ANN has worst ISSN: 2231-2803 Fig. 27 Convergence curve of ANN model www.internationaljournalssrg.org Page 90 International Journal of Computer Trends and Technology (IJCTT) – volume 7 number 2– Jan 2014 VI. CONCLUSION Artificial Bee Colony algorithm (ABC), a population-based iterative global optimization algorithm is used to optimize LSSVM for stock price prediction. ABC algorithm is used in selection of LSSVM free parameters C (cost penalty), ϵ (insensitive-loss function) and γ (kernel parameter). The proposed LSSVM-ABC model Convergence to a global minimum can be expected. Also proposed model overcome the overfitting problem which found in ANN, especially in case of fluctuations in stock sector. LSSVM-ABC algorithm parameters can be tuned easily. Optimum found by the proposed model is better than LSSVM-PSO and LSSVM. Proposed model converges to global minimum faster than LSSVMPSO model. LSSVM-ABC and LSSVM-PSO achieves the lowest error value followed by standard LSSVM, while ANN-BP algorithm is the worst one. REFERENCES [1] G. E. P. Box, G. M. Jenkins, and G. C. Reinsel, Time Series Analysis, Forecasting and Control (Englewood Cliffs, NJ: Prentice- Hall, 1994). [2] X. Wang and M. Meng, A Hybrid Neural Network and ARIMA Model for Energy Consumption Forecasting, Journal of computers, 7(5), 1184-1190, May 2012. [3] L. Hentschel, Nesting symmetric and asymmetric GARCH models, Journal of Financial Economics 39(1), 1995, 71104. [4] X. Leng, and H. Miller, Input dimension reduction for load forecasting based on support vector machines, IEEE International Conference on Electric Utility Deregulation, Restructuring and Power Technologies (DRPT2004), 2004, 510 - 514. V. Vapnik, The nature of statistical learning (Springer, 1999). [5] [6] V. Cherkassky, and Y. Ma, Practical Selection of SVM Parameters and Noise Estimation for SVM regression, Neural Networks, 17(1), 2004, 113-126. [7] J. Suykens, V. Gestel, and J. Brabanter, Least squares support vector machines (World Scientific, 2002). [8] M. ANDRÉS, D. CARLOS, and C. GERMÁN, Parameter Selection in Least Squares-Support Vector Machines Regression Oriented, Using Generalized Cross-Validation, Dyna journal, 79(171), 2012, 23-30. [9] A. Carlos , B. Gary , and A. David, Evolutionary Algorithms for Solving Multi-Objective Problems (Springer, 2007). [10] B. Basturk, and D. Karaboga, An Artificial Bee Colony (ABC) Algorithm for Numeric function Optimization, IEEE Swarm Intelligence Symposium, Indianapolis, Indiana, USA, 2006. ISSN: 2231-2803 [11] D. Karaboga, and B. Basturk, A Powerful And Efficient Algorithm For Numerical Function Optimization: Artificial Bee Colony (ABC) Algorithm, Journal of Global Optimization, 39(3), 2007, 459–471. [12] D. Karaboga, and B. Basturk, On The Performance Of Artificial Bee Colony (ABC) Algorithm, Applied SoftComputing journal, 8(1), 2008, 687–697. [13] D. Karaboga, and B. Basturk, Artificial Bee Colony (ABC) Optimization Algorithm for Solving Constrained Optimization Problems, Advances in SoftComputing: Foundations of Fuzzy Logic and Soft Computing, 4529, 2007, 789–798. [14] D. Karaboga, and B. Basturk, Artificial Bee Colony Algorithm on Training Artificial Neural Networks, 15th IEEE Signal Processing and Communications Applications, 2007, 1–4. [15] D. Karaboga, B. Basturk, and C. Ozturk, Artificial Bee Colony (ABC) Optimization Algorithm for Training FeedForward Neural Networks, LNCS: Modeling Decisions for Artificial Intelligence, 4617, 2007, 318–319. [16] A. Hadidi, and S. Kazemzadeh, Structural optimization using artificial bee colony algorithm, 2nd International Conference on Engineering Optimization, 2010, September 6 – 9, Lisbon, Portugal. [17] Y. Zhang and L. Wu, Optimal multi-level Thresholding based on Maximum Tsallis Entropy via an Artificial Bee Colony Approach, Entropy, 13(4), 2011, 841-859. [18] Y. Zhang, L. Wu, and S. Wang, Magnetic Resonance Brain Image Classification by an Improved Artificial Bee Colony Algorithm, Progress in Electromagnetics Research, 116, 2011, 65-79. [19] Y. Zhang, L. Wu, S. Wang, and Y. Huo, Chaotic Artificial Bee Colony used for Cluster Analysis, Communications in Computer and Information Science, 134(1), 2011, 205211. [20] Y. Zhang, and L. Wu, Face Pose Estimation by Chaotic Artificial Bee Colony, International Journal of Digital Content Technology and its Applications, 5(2), 2011, 5563. [21] Y. Zhang and L. Wu, Artificial Bee Colony for Two Dimensional Protein Folding, Advances in Electrical Engineering Systems, 1(1), 2012, 19-23. [22] A.R. Yildiz, A new hybrid artificial bee colony algorithm for robust optimal design and manufacturing, Applied Soft Computing, 13(5), 2013, 2906–2912. [23] A.R. Yildiz, Optimization of cutting parameters in multipass turning using artificial bee colony-based approach, Information Sciences: an International Journal, 220, 2013, 399-407. [24] F. Barani and M. Abadi, Intrusion Detection in AODVbased MANETs Using Artificial Bee Colony and Negative Selection Algorithms, the isc international journal of information security,4(1), 2012, 25-39. [25] B. Akay, A Study on Particle Swarm Optimization and Artificial Bee Colony Algorithms for Multilevel Thresholding, Applied Soft Computing, 13(6), 2013, 3066– 3091. [26] T. Cavdar, M. Mohammad, and R.A. Milani, A New Heuristic Approach for Inverse Kinematics of Robot Arms, Advanced Science Letters 19(1), 2013, 329-333. www.internationaljournalssrg.org Page 91 International Journal of Computer Trends and Technology (IJCTT) – volume 7 number 2– Jan 2014 [27] D. Karaboga, and B. Gorkemli, A Combinatorial Artificial Bee Colony Algorithm for Traveling Salesman Problem, International Symposium on Innovations in Intelligent Systems and Applications, Istanbul, Turkey ,2011,50-53. [28] I.M.S. Oliveira and R. Schirru, Identifying Nuclear Power Plant Transients Using The Discrete Binary Artificial Bee Colony (Dbabc) Algorithm, 2011 International Conference on Mathematics and Computational Methods Applied to Nuclear Science and Engineering (M&C 2011), Rio de Janeiro, Brazil, 2011. [29] F. Barani and M. Abadi, An ABC-AIS Hybrid Approach to Dynamic Anomaly Detection in AODV-based MANETs, International IEEE TrustCom, China , 2011. [30] A. Khorsandia, S.H. Hosseiniana, and A. Ghazanfarib, Modified artificial bee colony algorithm based on fuzzy multi-objective technique for optimal power flow problem, Electric Power Systems Research, Elsevier, 95, 2013, 206– 213. [31] M. Basu, Artificial bee colony optimization for multi-area economic dispatch, International Journal of Electrical Power & Energy Systems, (49), 2013, 181–187. [32] T. Suka, A. Chatterjee, MMSE design of nonlinear Volterra equalizers using artificial bee colony algorithm, Measurement, Elsevier, 46(1), 2013, 210–219. [33] M. Tuba, I. Brajevic, and R. Jovanovic, Hybrid seeker optimization algorithm for global optimization, An International Journal of Applied Mathematics & Information Sciences, 7(3), 2013, 867-875. [34] J. Suykens, J. Vandewalle, Least squares support vector machine classifiers, Neural Processing Letters, 9 (3), 1999, 293-300. [35] D. Karaboga, An Idea Based On Honey Bee Swarm for Numerical Optimization, Technical Report-TR06, Erciyes University, Engineering Faculty, Computer Engineering Department, 2005. [36] P. Mansouri, B. Asady, and N. Gupta, A Novel Iteration Method for solve Hard Problems (Nonlinear Equations) with Artificial Bee Colony Algorithm, World Academy of Science, Engineering and Technology, 5(11), 2011, 389 392. [37] http://finance.yahoo.com. ISSN: 2231-2803 www.internationaljournalssrg.org Page 92
5cs.CE
arXiv:1403.3724v4 [cs.CV] 7 Sep 2015 GRAY RONCAL ET AL.: VESICLE - SCALABLE SYNAPSE DETECTION 1 VESICLE: Volumetric Evaluation of Synaptic Interfaces using Computer Vision at Large Scale William Gray Roncal1,2 1 Johns Hopkins University, Department of Computer Science, Baltimore, Maryland 2 JHU Applied Physics Laboratory, Research and Exploratory Development, Laurel, Maryland 3 Harvard University, School of Engineering and Applied Sciences, Cambridge, Massachusetts 4 Johns Hopkins University, Department of Biomedical Engineering, Baltimore, Maryland 5 Johns Hopkins University, Institute for Computational Medicine, Baltimore, Maryland [email protected] Michael Pekala2 [email protected] 3 Verena Kaynig-Fittkau [email protected] Dean M Kleissas2 [email protected] Joshua T Vogelstein4,5 [email protected] Hanspeter Pfister3 [email protected] Randal Burns1 [email protected] 2 R Jacob Vogelstein [email protected] Mark A Chevillet2 [email protected] Gregory D Hager1 [email protected] Abstract An open challenge at the forefront of modern neuroscience is to obtain a comprehensive mapping of the neural pathways that underlie human brain function; an enhanced understanding of the wiring diagram of the brain promises to lead to new breakthroughs in diagnosing and treating neurological disorders. Inferring brain structure from image data, such as that obtained via electron microscopy (EM), entails solving the problem of identifying biological structures in large data volumes. Synapses, which are a key communication structure in the brain, are particularly difficult to detect due to their c 2015. The copyright of this document resides with its authors. It may be distributed unchanged freely in print or electronic forms. 2 GRAY RONCAL ET AL.: VESICLE - SCALABLE SYNAPSE DETECTION small size and limited contrast. Prior work in automated synapse detection has relied upon time-intensive, error-prone biological preparations (isotropic slicing, post-staining) in order to simplify the problem. This paper presents VESICLE, the first known approach designed for mammalian synapse detection in anisotropic, non-poststained data. Our methods explicitly leverage biological context, and the results exceed existing synapse detection methods in terms of accuracy and scalability. We provide two different approaches - a deep learning classifier (VESICLE-CNN) and a lightweight Random Forest approach (VESICLE-RF), to offer alternatives in the performance-scalability space. Addressing this synapse detection challenge enables the analysis of high-throughput imaging that is soon expected to produce petabytes of data, and provides tools for more rapid estimation of brain-graphs. Finally, to facilitate community efforts, we developed tools for large-scale object detection, and demonstrated this framework to find ≈ 50,000 synapses in 60,000 µm3 (220 GB on disk) of electron microscopy data. 1 Introduction Mammalian brains contain billions to trillions of interconnections (i.e., synapses). To date, the full reconstruction of the neuronal connections of an organism, a “connectome," has only been completed for nematodes with hundreds of neurons and thousands of synapses [4, 29]. It is generally accepted [22] that such wiring diagrams are useful for understanding brain function and contributing to medical advances. For example, many psychiatric illnesses, including autism and schizophrenia, are thought to be “connectopathies," where inappropriate wiring mediates pathological behavior [11]. Reliably and automatically identifying synaptic connections (i.e., brain graph edges) is an essential component in understanding brain networks. Although the community has made great progress towards automatically and comprehensively tracking all neuron fragments through dense electron microscopy data [12, 28], current state-of-the-art methods for finding synaptic contacts are still insufficient, especially for large-scale automated circuit reconstruction. In order to detect synapses in electron microscopy data, neuroscientists typically choose to image at ≈ 5 nm per voxel in plane, with a slice thickness of ≈ 5-70 nm. Capturing complete neurons therefore requires processing terabytes to petabytes of imaged tissue. The largest datasets currently available (and of sufficient size to begin estimating graphs) are acquired using scanning electron microscopy (SEM) or transmission electron microscopy (TEM) due to their high throughput capability [2, 17]. These methodologies scale well, but provide a challenging environment for object detection. The slices are thick relative to in-plane resolution (i.e., anisotropic), due to methodological limitations, and often do not have optimal staining to visually enhance synaptic contacts. The GRAY RONCAL ET AL.: VESICLE - SCALABLE SYNAPSE DETECTION 3 detection algorithms proposed in this paper are specifically implemented to address these challenges. We train a random forest classifier (VESICLE-RF), which leverages biological context by restricting detections to voxels that have a high probability of being membrane. This classifier also relies on the identification of neurotransmitter-containing vesicles, which are present near chemical synapses in mammalian brains. We also present a deep learning classifier (VESICLE-CNN) to find synapses, which has improved performance at the expense of additional computational complexity. Both of the VESICLE classifiers provide state-of-the-art performance, and users may choose either method, depending on their environment (e.g., the importance of performance vs. run time, computational resources, availability of human proofreaders). Our classifiers provide new opportunities to assess neuronal connectivity and can be extended to other datasets and environments. 1.1 Previous Work Previous methods for synapse detection have taken several approaches, including both manual and automated methods. Two recent approaches, Kreshuk2011 [20] and Becker2013 [1] address the synapse detection problem in post-stained, isotropic, focused ion beam scanning electron microscopy (FIBSEM) data. Kreshuk2011 uses a Random Forest voxel-based classifier and texture-based features to identify pronounced post-stained post-synaptic densities. This approach is insufficient for our application because of the anisotropy and much lower contrast of our synaptic regions (see Figure 1), as well as the computational expense. Becker2013 also uses a voxel-based classification approach and features similar to Kreshuk2011. However, Becker2013 extends the approach by considering biological context from surrounding pre- and post-synaptic regions at various sizes and locations, based on the synapse pose. This technique relies on full 3D contextual information and greatly reduces false positives compared to Kreshuk2011. Our result was directly compared to the Becker2013 method [1] (which was found to be superior to Kreshuk2011 [20]). Other work on synapse detection exists but was not used as a comparison method in this manuscript; some methods rely on post-stained data [21], post-stained data and accurate cell segmentation [23], or post-staining and tailoring for Drosophila (fly) synapses, which have a very different appearance [15]. 2 2.1 Methods Biological Context Synapses occur along cell membrane boundaries, between (at least) two neuronal processes. Although synapses occur in many different configurations, the majority 4 GRAY RONCAL ET AL.: VESICLE - SCALABLE SYNAPSE DETECTION Figure 1: Previous work on synapse detection has focused on isotropic poststained data (left), which shows crisp membranes and dark fuzzy post synaptic densities (arrows) from all orientations. The alternative imaging technique of non post-stained, anisotropic data (middle, right) promises higher throughput, lack of staining artifacts, reduction in lost slices, and less demanding data storage requirements - all critically important for high-throughput connectomics. The XZ plane of a synapse in anisotropic data is shown (right), illustrating the effect of lower resolution. We address this more challenging environment, in which membranes appear fuzzier and are harder to distinguish from synaptic contacts. Data courtesy of Graham Knott (left) and Jeff Lichtman (middle, right). of connections annotated in this dataset are axo-dendritic connections. The presynaptic axonal side is known as a bouton, characterized by a bulbous end filled with small, spherical vesicles. The synaptic interface is often characterized by a roughly ellipsoidal collection of dark, fuzzy voxels. In VESICLE-RF, we attempt to directly capture these features. Prior to feature extraction, we leverage membranes (found using the deep learning approach [9]) which greatly reduces the computational burden and provides a more targeted learning environment for the classifier (Figure 2). The membrane-finding step is computationally intensive (requiring about 3 weeks on 27 Titan GPU cards); however current approaches to neuron detection require membrane probabilities (e.g., [18, 24]) and so this is a sunk cost that leverages previously computed information. We also identify clusters of vesicles by finding maximal responses to a matched filter extracted from real data followed by clustering to suppress false positives. This detector acts as a putative bouton feature to localize regions containing synapses. The vesicles are also of biological interest (e.g., for synapse strength estimation). Vesicle detection is very lightweight and contributes negligibly to total run time (requiring only 3 hours for the entire 60,000 µm3 evaluation volume). GRAY RONCAL ET AL.: VESICLE - SCALABLE SYNAPSE DETECTION 5 Figure 2: A single cross-section of EM data is shown (upper left). The detection task is to identify synapses shown in green (upper right). These synapses are known to exist at the interface of two neurons; these boundaries can be approximated by previously computed membranes, allowing us to restrict the evaluation regions to the green pixels (lower left). Clusters of vesicles are a good indicator of an axonal bouton, suggesting that one or more synaptic sites is likely nearby. Vesicles found by our automated detection step are highlighted in green (lower right). 2.2 Random Forest Context Aware Classifier (VESICLE-RF) We opted for a random forest classifier [3] due to its robust finite sample performance in relatively high-dimensional and nonlinear settings. Furthermore, recent research suggests that this approach significantly outperforms other methods on a variety of tasks [7, 10]. The output of the random forest is a scalar probability for each pixel, which we threshold and post-process to obtain a class label, as described below. We began with a large set of potential feature descriptors (e.g., Haralick fea- 6 GRAY RONCAL ET AL.: VESICLE - SCALABLE SYNAPSE DETECTION tures, Gabor wavelets, structure tensors), and evaluated their performance based on a combination of Random Forest importance on training and validation data, computational efficiency, and ability to capture biologically significant characteristics. We pruned this feature set down to ten features, retaining state-of-the-art performance in a computationally lightweight package. For efficiency reasons, we computed features in a two-pass approach. We first computed several data transforms on the two-dimensional EM slice data (to better account for the image anisotropy). We then created our features by convolving box kernels of different bandwidths with the results from the previous step. This allows information to be summarized at different scales, as explained further in Table 1. Finally, we computed a feature capturing the minimum distance to a neurotransmitter-containing vesicle. Table 1: Description of features used in VESICLE-RF; data transforms are summarized using different kernel bandwidths: θ0 : [5, 5, 1], θ1 : [15, 15, 3], θ2 = [25, 25, 5], θ3 = [101, 101, 5], θ4 = minimum vesicle distance. Data Transform Box Kernel Intensity θ0 , θ1 Local Binary Pattern θ0 Image Gradient Magnitude θ1 , θ2 Vesicles θ2 , θ3 , θ4 Structure Tensor θ1 , θ2 We train our classifier using 200,000 samples (balanced synapse, non-synapse classes). Putative synapse candidates are fused into 3D objects by thresholding and size filtering as described in section 3.2. This method is scalable, requiring only a small amount of computational time and resources to train and test. 2.3 Deep Learning Classifier - VESICLE-CNN Deep convolutional neural networks (CNNs) have recently provided state-of-theart performance across a wide range of image and video recognition problems. These successes include a number of medical imaging applications; a small sample includes mitosis detection [8], organ segmentation [26] and membrane detection in EM data [9]. The recent success in membrane detection is particularly compelling given the common imaging modality and visual similarity between membranes and synapses. To test the hypotheses that CNNs may also provide an effective means of classifying synapses we adopt and re-implement the pixel-level classification approach of [9] suitably adapted for our application. As in section 2.2, each pixel in the EM cube is presumed to be either a synapse pixel or a non-synapse pixel. The features used for classification consist of a 65 × 65 tile centered on the pixel location of interest. For classification we use a CNN with three convolutional layers and two fully connected layers, roughly GRAY RONCAL ET AL.: VESICLE - SCALABLE SYNAPSE DETECTION 7 corresponding to the CNN designated “N3" in [9]. This CNN is implemented using the Caffe deep learning framework [16]; the full architecture specification (e.g. types of nonlinearites and specific layer parameters) is encoded in the Caffe configuration files which are provided as part of our open source code. During training we balance the synapse (target) and non-synapse (clutter) examples evenly; since synapse pixels are relatively sparse this involves substantially subsampling the majority class. To focus the training on examples that are presumably the most challenging, we threshold the membrane probabilities described above, and use the result as a bandpass filter. Negative examples are drawn randomly from the set of non-synapse membrane pixels. We also add synthetic data augmentation by rotating the tiles in each mini-batch by a random angle (the insight behind this step is that synapses may be oriented in any direction). Our test paradigm does not rely on membrane probabilities; once trained, the deep learning classifier requires only EM data as input. The neurotransmitter-containing vesicles used in VESICLE-RF are not used in VESICLE-CNN for training or test. 2.4 Scalable Processing Vision processing of large neuroscience data requires unique and well-designed infrastructure; our approach is designed to eventually process petabytes of data. Specifically, scalable computer vision requires storage and retrieval of images, annotation standards for semantic labels, and a distributed processing framework to process data and perform inference across blocks that are too large to fit in RAM on a commodity workstation. We leverage the Open Connectome Project infrastructure [5] to store and retrieve data and the Reusable Annotation Markup for Open coNnectomes (RAMON) data model [14]. We also leverage the Laboratory of Neuroimaging (LONI) Pipeline [25] workflow manager to develop solutions to object detection challenges inherent in big neuroscience. As part of this work, we built a generic object detection pipeline leveraging the Open Connectome project that can be used to train new synapse detection algorithms or detect other targets of interest. 3 Results Our VESICLE classifiers were trained and evaluated for both performance and scalability, exceeding existing state-of-the-art performance. 3.1 Data VESICLE was evaluated on an anisotropic (3 × 3 × 30 nm resolution) color- corrected [19] dataset of non-poststained mouse somatosensory cortex [17]. This is 8 GRAY RONCAL ET AL.: VESICLE - SCALABLE SYNAPSE DETECTION the largest known dataset of its kind. Prior to all processing, we downsampled the data to 6 × 6 × 30 nm resolution. The training and test volumes were extracted from this larger EM volume. For training, each method used a 1024 × 1024 × 100 µm3 region of data (denoted AC4). For testing, a non-contiguous, equally sized cube from the same dataset was evaluated (denoted AC3). For the deep learning algorithm a different size pad region was used due to training methodologies. A padded border was used on the test region for all algorithms to ensure that all labeled synapses in the volume were available for evaluation. Gold standard labels for synapses were provided by expert neurobiologist annotators. The training labels were assumed to be correct (our classification result was evaluated in an open-loop process). 3.2 Performance Evaluation We assess our performance by evaluating the precision-recall of synaptic objects. Pixel error, while potentially useful for characterizing synaptic weight and morphology, is a less urgent goal for connectomics, which must first identify the connections between neurons before ascribing attributes. A focus on pixel accuracy also can obscure the actual task of connection detection. A quantitative comparision of our performance relative to existing work is presented in Figure 3. Of particular significance is our performance at high recall operating points. For many connectomics applications, it is essential to ensure that the majority of connections are captured (i.e., low false negative rate); false positives can be remediated through a variety of approaches (e.g., biological plausiblity based on incident neurons, manual proofreading). To construct precision-recall curves from VESICLE-RF and VESICLE-CNN pixel-level classification results, we developed a procedure to sweep over probability score thresholds (0.5-1.0) and create initial objects through a connected component analysis. We generated additional operating points by varying biologically motivated size (2D: 0-200 minimum, 2500-10000 maximum; 3D: 1002000 minimum) and slice persistence (1-5 slices) requirements. For Becker2013, we ran the statically linked package provided by the author on our data volumes. We then followed their suggested method (similar to the VESICLE approach) to create synaptic objects from raw pixel probabilities by thresholding probabilities (0.0-1.0), running a connected component algorithm and rejecting all objects comprised of fewer than 1000 voxels [1]. When computing object metrics, we computed true positives, false positives, and false negatives by examining overlapping areas between truth labels and detected objects. We added the additional constraint of allowing each detection to count for only one truth detection to disallow large synapse detections that cover many true synapses and provide little intuition into connectomics questions. A version of the classifier was trained without the vesicle features to provide insight into the importance of biological context in this problem domain. GRAY RONCAL ET AL.: VESICLE - SCALABLE SYNAPSE DETECTION 9 A qualitative visualization of our VESICLE-RF performance is shown in Figure 4. Figure 3: VESICLE-RF and VESICLE-CNN significantly outperform prior stateof-the art, particularly at high recall rates. The relatively abrupt endpoint of the Becker2013 method occurs because beyond this point, thresholded probabilities group into large detected regions rather than individual synapses, which are disallowed (as described above). 3.3 Scalability Analysis VESICLE-RF enables large-scale processing because of its light computational footprint and ability to be easily parallelized in a High Performance Computing (HPC) CPU environment. Relative to Becker2013 [1], this approach is dramatically less computationally intensive for training (8 GB RAM, 10 minutes v. 20 GB RAM, 11 hours). During evaluation our approach is approximately twice as fast (10 minutes versus 20, using unoptimized MATLAB code), and has oneeighth the maximum computational load and half the maximum RAM requirement. VESICLE-CNN required 56 hours to train and 39 hours to evaluate the test cuboid on a single GPU. To demonstrate the scalability of our approach and our distributed processing framework, we applied our VESICLE-RF classifier to the largest available nonpoststained, anisotropic dataset [17]. The inscribed cuboid is ≈ 220 GB on disk; 10 GRAY RONCAL ET AL.: VESICLE - SCALABLE SYNAPSE DETECTION Figure 4: Example VESICLE result. Gold standard labels are shown in green, and VESICLE-RF detections are shown in blue. Red pixels represent True Positives (TP). Objects that are only green are False Negatives (FN) and objects that are only blue are False Positives (FP). Object detection results are analyzed in 3D and so single slices may be misleading. we downsample by a factor of two in the X and Y dimensions prior to processing (60,000 µm3 , 56GB on disk after downsampling). In Figure 5, we show a visualization of the 50,335 synapses found in this analysis. We chose the VESICLE-RF method here to emphasize the advantages of scalable classifiers; this method is ≈ 200 times faster than VESICLE-CNN (evaluated as a single job on the same data cube). When deploying our classifier at scale, we increase our pad size to be larger than a synaptic cleft, and discard border detections; this allows us to avoid boundary merge issues. We also optionally allow the detection threshold to vary based on pixel probabilities to improve robustness. Although we focus on the problem of non-poststained data, we provide additional evidence of scalability by running on an anisotropic post-stained dataset [2]. This dataset is 20 teravoxels on disk (14.5 million µm3 ). We downsampled by a factor of two in the X and Y dimensions, and ran a variant of our detector on 5 TB of data. We found approximately 11.6 million synapses, consistent with published estimates of synapse density (0.5-1 synapse/µm3 )[6]. Although our assessment is ongoing due to limited available truth, we estimate an operating point at a precision of 0.69 and a recall of 0.6, using the available labels. Because this data was poststained, we estimated membrane detections by applying GRAY RONCAL ET AL.: VESICLE - SCALABLE SYNAPSE DETECTION 11 an intensity-based bandpass filter (with cutoffs derived as the [0.02-0.80] values of the synapse training data labels). We expect that performance will improve with additional development. Figure 5: Visualization of large scale synapse detection results; we found a total of 50,000 putative synapses in our volume. An XY slice showing detected synapses is shown, and a point cloud of the synapse centroids are also visualized (inset). A full resolution version of this image is available via RESTful query as explained here: http://openconnecto.me/vesicle. Each synapse is represented by a different color label. 4 Discussion In this paper we have presented two algorithms for synapse detection in nonpoststained, anisotropic EM data, and have shown that both perform better than state-of-the-art methods. The Random Forest approach offers a scalable solution with an approach inspired by expert human annotators, while the deep learning result achieves the best overall performance. We built and demonstrated a reusable, scalable pipeline using the Open Connectome Project services and used it to find putative synapses on large cubes of mammalian EM data. We presented the largest result known by orders of magnitude (in both volume processed and synaptic detections). As future work, we 12 GRAY RONCAL ET AL.: VESICLE - SCALABLE SYNAPSE DETECTION plan to refine our estimates of synapse morphology and position by implementing a region-growing algorithm and incorporating additional contextual information. We also plan to utilize supervoxel methods in both of our approaches, and consider VESICLE-RF texture features inspired by CNN results. For the VESICLE-CNN approach, future work includes exploring alternative CNN architectures (such as the very deep networks considered in [27]), enhancing the tile-based input features (e.g. to include three dimensional context) and improving the computational complexity (through the use of sampling techniques guided by our biological priors and/or computational techniques such as those described in [13]). Our code and data are open source and available at: openconnecto.me/ vesicle. 5 Acknowledgements The authors thank Bobby Kasthuri, Daniel Berger, and Jeff Lichtman for providing electron microscopy data and truth labels, and Lindsey Fernandez for helpful discussions on algorithm development and comparison metrics. This work is partially supported by JHU Applied Physics Laboratory Internal Research and Development funds, by NIH NIBIB 1RO1EB016411-01, and by NSF grants OIA1125087 and IIS 1447344. References [1] Carlos Becker, Karim Ali, Graham Knott, and Pascal Fua. Learning context cues for synapse segmentation. IEEE Transactions on Medical Imaging, 32 (10):1864–1877, 2013. ISSN 02780062. doi: 10.1109/TMI.2013.2267747. [2] Davi D Bock, Wei-chung Allen Lee, Aaron M Kerlin, Mark L Andermann, Greg Hood, Arthur W Wetzel, Sergey Yurgenson, Edward R Soucy, Hyon Suk Kim, and R Clay Reid. Network anatomy and in vivo physiology of visual cortical neurons. Nature, 471(7337):177–182, 2011. ISSN 0028-0836. doi: 10.1038/nature09802. [3] Leo Breiman. Random forests. Machine Learning, 45(1):5–32, 2001. ISSN 08856125. doi: 10.1023/A:1010933404324. [4] Daniel J Bumbarger, Metta Riebesell, Christian Rödelsperger, and Ralf J Sommer. System-wide Rewiring Underlies Behavioral Differences in Predatory and Bacterial-Feeding Nematodes. Cell, 152(1-2):109–19, January 2013. ISSN 1097-4172. doi: 10.1016/j.cell.2012.12.013. GRAY RONCAL ET AL.: VESICLE - SCALABLE SYNAPSE DETECTION 13 [5] Randal Burns, William Gray Roncal, Dean Kleissas, Kunal Lillaney, Priya Manavalan, Karl Deisseroth, R Clay Reid, Stephen J Smith, Alexander S Szalay, and Joshua T Vogelstein. The Open Connectome Project Data Cluster : Scalable Analysis and Vision for High-Throughput Neuroscience Categories and Subject Descriptors. SSDBM, 2013. [6] Brad Busse and Stephen Smith. Automated Analysis of a Diverse Synapse Population. PLoS Computational Biology, 9(3):e1002976, March 2013. ISSN 1553-7358. doi: 10.1371/journal.pcbi.1002976. [7] Rich Caruana, Nikos Karampatziakis, and Ainur Yessenalina. An empirical evaluation of supervised learning in high dimensions. Proceedings of the 25th International Conference on Machine Learning (2008), pages 96–103, 2008. ISSN 9781605582054. doi: 10.1145/1390156.1390169. [8] Dan C Ciresan, Alessandro Giusti, Luca M Gambardella, and Jürgen Schmidhuber. Mitosis detection in breast cancer histology images with deep neural networks. In Medical Image Computing and Computer-Assisted Intervention–MICCAI 2013, pages 411–418. Springer, 2013. [9] DC Dan Ciresan, Alessandro Giusti, Luca M LM Gambardella, and Jürgen Schmidhuber. Deep neural networks segment neuronal membranes in electron microscopy images. In Advances in neural information processing systems, pages 2843–2851, 2012. [10] Manuel Fernández-Delgado, Eva Cernadas, Senén Barro, and Dinani Amorim. Do we Need Hundreds of Classifiers to Solve Real World Classification Problems? Journal of Machine Learning Research, 15:3133–3181, 2014. [11] Jennifer Fitzsimmons, Marek Kubicki, and Martha E Shenton. Review of functional and anatomical brain connectivity findings in schizophrenia. Current opinion in psychiatry, 26(2):172–87, March 2013. ISSN 1473-6578. doi: 10.1097/YCO.0b013e32835d9e6a. [12] J. Funke, B. Andres, F. a. Hamprecht, A. Cardona, and M. Cook. Efficient automatic 3D-reconstruction of branching neurons from EM data. In 2012 IEEE Conference on Computer Vision and Pattern Recognition, pages 1004– 1011. IEEE, June 2012. ISBN 978-1-4673-1228-8. doi: 10.1109/CVPR. 2012.6247777. [13] Alessandro Giusti, Dan Ciresan, Jonathan Masci, Luca Maria Gambardella, and Jurgen Schmidhuber. Fast Image Scanning with Deep Max-Pooling Convolutional Neural Networks. arXiv preprint arXiv:1302.1700, 2013. 14 GRAY RONCAL ET AL.: VESICLE - SCALABLE SYNAPSE DETECTION [14] William Gray Roncal, Dean M Kleissas, Joshua T Vogelstein, Priya Manavalan, Kunal Lillaney, Michael Pekala, Randal Burns, R Jacob Vogelstein, Carey E Priebe, Mark A Chevillet, and Gregory D Hager. An Automated Images-to-Graphs Framework for High Resolution Connectomics. Frontiers in neuroinformatics (in press), pages 1–13. [15] Gary B Huang, Stephen Plaza, and Janelia Farm. Identifying Synapses using Deep and Wide Multiscale Recursive Networks. arXiv:1409.1789, pages 1– 6, 2014. [16] Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, Trevor Darrell, and U C Berkeley Eecs. Caffe : Convolutional Architecture for Fast Feature Embedding. ACM Conference on Multimedia, 2014. [17] Narayanan Kasthuri, Ken Hayworth, Juan C Tapia, Richard Schalek, S Nundy, and Jeff W Lichtman. The brain on tape: Imaging an Ultra-Thin Section Library (UTSL). Society for Neuroscience Abstracts. Society for Neuroscience Abstract, 2009. [18] Verena Kaynig, Amelio Vazquez-Reina, Seymour Knowles-Barley, Mike Roberts, Thouis R. Jones, Narayanan Kasthuri, Eric Miller, Jeff Lichtman, and Hanspeter Pfister. Large-scale automatic reconstruction of neuronal processes from electron microscopy images. Medical Image Analysis, 2015. ISSN 13618423. [19] Michael Kazhdan, Kunal Lillaney, William Gray Roncal, Davi Bock, Joshua T. Vogelstein, and Randal Burns. Gradient-Domain Fusion for Color Correction in Large EM Image Stacks. arXiv preprint, pages 1–7, 2015. [20] Anna Kreshuk, Christoph N Straehle, Christoph Sommer, Ullrich Koethe, Marco Cantoni, Graham Knott, and Fred a Hamprecht. Automated detection and segmentation of synaptic contacts in nearly isotropic serial electron microscopy images. PloS one, 6(10):e24899, January 2011. ISSN 19326203. doi: 10.1371/journal.pone.0024899. [21] Anna Kreshuk, Ullrich Koethe, Elizabeth Pax, Davi D Bock, and Fred a Hamprecht. Automated detection of synapses in serial section transmission electron microscopy image stacks. PloS one, 9(2):e87351, January 2014. ISSN 1932-6203. doi: 10.1371/journal.pone.0087351. [22] Jeff W Lichtman and Winfried Denk. The big and the small: challenges of imaging the brain’s circuits. Science (New York, N.Y.), 334(6056):618–23, November 2011. ISSN 1095-9203. doi: 10.1126/science.1209168. GRAY RONCAL ET AL.: VESICLE - SCALABLE SYNAPSE DETECTION 15 [23] Yuriy Mishchenko, Tao Hu, Josef Spacek, John Mendenhall, Kristen M Harris, and Dmitri B Chklovskii. Ultrastructural Analysis of Hippocampal Neuropil from the Connectomics Perspective. Neuron, 67(6):1009–1020, 2010. ISSN 0896-6273. doi: 10.1016/j.neuron.2010.08.014. [24] Juan Nunez-Iglesias, Ryan Kennedy, Toufiq Parag, Jianbo Shi, and Dmitri B Chklovskii. Machine learning of hierarchical clustering to segment 2D and 3D images. PloS one, 8(8):e71715, January 2013. ISSN 1932-6203. doi: 10.1371/journal.pone.0071715. [25] David E Rex, Jeffrey Q Ma, and Arthur W Toga. The LONI Pipeline Processing Environment. NeuroImage, 19(3):1033–1048, July 2003. ISSN 10538119. doi: 10.1016/S1053-8119(03)00185-X. [26] Holger R Roth, Amal Farag, Le Lu, Evrim B Turkbey, and Ronald M Summers. Deep convolutional networks for pancreas segmentation in CT imaging. In SPIE Medical Imaging, pages 94131G—-94131G. International Society for Optics and Photonics, 2015. [27] Karen Simonyan and Andrew Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recoginition. pages 1–14, 2015. [28] Amelio Vazquez-Reina, Michael Gelbart, Daniel Huang, Jeff Lichtman, Eric Miller, and Hanspeter Pfister. Segmentation fusion for connectomics. 2011 International Conference on Computer Vision, pages 177–184, November 2011. doi: 10.1109/ICCV.2011.6126240. [29] J. G. White, E. Southgate, J. N. Thomson, and S. Brenner. The Structure of the Nervous System of the Nematode Caenorhabditis elegans. Philosophical Transactions of the Royal Society B: Biological Sciences, 314(1165):1–340, November 1986. ISSN 0962-8436. doi: 10.1098/rstb.1986.0056.
5cs.CE
arXiv:1803.00294v1 [math.GR] 1 Mar 2018 AUT-INVARIANT WORD NORM ON RIGHT ANGLED ARTIN AND RIGHT ANGLED COXETER GROUPS MICHAŁ MARCINKOWSKI Abstract. We prove that the Aut-invariant word norm on right angled Artin and right angled Coxeter groups is unbounded (except in few special cases). To prove unboundedness we exhibit certain characteristic subgroups. This allows us to find unbounded quasimorphisms which are Lipschitz with respect to the Aut-invariant word norm. Let W be a right angled Artin group or a right angled Coxeter group. The full automorphism group, AutpW q, is a classical object studied both from combinatorial and geometrical point of view ([12], [7] and references therein, for right angled Artin groups we refer to a survey [14]). The examples of AutpW q include AutpFn q and AutpZ n q “ GLn pZq. If W is a right angled Artin group, then AutpW q interpolates between these two groups. In this paper we study the standard action of AutpW q on W in the relation to the Aut-invariant word norm on W . This word norm is defined analogously to the standard word norm when one requires invariance under the full automorphism group. For free groups and surface groups such norms were already studied in [3, 2]. Theorem 0.1. Let W be a right angled Artin or a right angled Coxeter group. The Aut-invariant word norm on W is bounded if and only if n W “ Z n , n ą 1 or W “ D8 ˆ C2m , where D8 is the infinite dihedral group and C2 is the group of order 2. The outline of the proof is as follows. First we determine which special subgroups of W are (almost) characteristic. Passing to the quotients allows us to reduce the problem to simpler Artin and Coxeter groups. Unboundedness is proven by finding unbounded quasimorphism on W which are Lipschitz with respect to the Aut-invariant word 2010 Mathematics Subject Classification. 51,20. Key words and phrases. Artin groups, Coxeter groups, quasimorphisms, Autinvariant norm. 1 2 MICHAŁ MARCINKOWSKI norm. It follows that if the Aut-invariant word norm is unbounded, there exist elements w P W which are undistorted in this norm. 1. Aut-invariant word norm and quasimorphisms In this paper we are interested in the Aut-invariant word norms. However, to prove our main result, we need to introduce a slightly broader class of norms. We say that two norms |¨|1 and |¨|2 are bi-Lipschitz equivalent, if there exist C P R such that C ´1 |¨|2 ď |¨|1 ď C|¨|2 . Suppose G is a finitely generated group and H ď AutpGq. Let S Ď G be a finite set such that S̄ “ HS “ tψpsq | ψ P H, s P Su generates G. By |¨|S̄ we denote the word norm associated to the subset S̄, i.e.: |x|S̄ “ mintn | x “ s1 . . . sn , where si P S̄ for each iu. This norm is H-invariant, i.e., |x|H “ |ψpxq|H for ψ P H. We define the H-invariant word norm on G to be the bi-Lipschitz equivalence class of |¨|S̄ . It is straightforward to show that this definition does not depend on the choice of S. Usually we refer to the H-invariant norm as to a genuine norm on G, implicitly choosing a representative of the bi-Lipschitz equivalence class. Example 1.1. (1) If H “ teu, then |¨|H is the standard word norm on a finitely generated group. (2) If H “ InnpGq, then |¨|H is the bi-invariant word norm. If G is a Coxeter group, the bi-invariant norm is equivalent to the reflection norm. Bi-invariant norms were studied in [10, 4]. (3) Let H “ AutpGq. If G is a free group, then |¨|H is equivalent to the primitive norm. If G is a surface group, then |¨|H is equivalent to the simple loops norm (see [3]). We are interested in the special case when H “ AutpGq. For simplicity we write |¨|Aut “ |¨|AutpGq when the group G is understood. The norm |¨|Aut is called the Aut-invariant word norm. For more detailed discussion on H-invariant word norms we refer to [3]. Let W be a right angled Artin or Coxeter group. In what follows, we need to focus not on |¨|Aut directly, but on |¨|H0 where H0 is a certain finite index subgroup of AutpW q. Due to the following lemma, these norms are equivalent. AUT-INVARIANT WORD NORM ON GRAPH PRODUCTS 3 Lemma 1.2. Let H0 ď H ď AutpGq and let H0 be finite index in H. Then |¨|H and |¨|H0 are equivalent. Proof. Let S be a finite subset of G such that S̄ “ HS generates G. Since #pS̄{H0 q “ #pH{H0 q#pS̄{Hq, there exists a finite subset S 1 of G satisfying S̄ “ H0 S 1 . Thus |¨|S̄ can be used to define both |¨|H and |¨|H0 .  Let us recall a notion of a quasimorphism. A function q : G Ñ R is called a quasimorphism if |qpaq ´ qpabq ` qpbq| ă D for some D P R and all a, b P G. A quasimorphism is homogeneous if qpxn q “ nqpxq for all n P Z and all x P G. Homogeneous quasimorphisms are constant on conjugacy classes, i.e., qpxq “ qpyxy ´1q for all x, y P G. The homogenisation of q is defined by qpxs q q̄pxq “ lim . sÑ8 s The function q̄ is a homogeneous quasimorphism. Moreover, there exists C P R such that |qpxq ´ q̄pxq| ă C for every x P G. We refer to [5] for further details. An element x P G is undistorted in a norm |¨| if there exists a positive real number C such that |xn | ą Cn for all n P Z. Otherwise x is distorted. If x is undistorted in the Aut-invariant word norm, we call it Aut-undistorted. Otherwise x is Aut-distorted. The relation between quasimorphisms and H-invariant word norms is explained in the following Lemma. Lemma 1.3 ([3], Lemma 1.5). Let G be a group and let H ď AutpGq. Let S Ď G be a finite set such that S̄ “ HS generates G. If there exists a homogeneous quasimorphism q : G Ñ R bounded on S̄ and such that qpxq ‰ 0, then x is undistorted in |¨|H . 2. Graph products of abelian groups Right angled Coxeter groups and right angled Artin groups are graph products of abelian groups. In Section 4 we prove a more general version of Theorem 0.1 which involves all graph products of finitely generated abelian groups. This generality allows us to bring right angled Artin and Coxeter groups in a common framework. In this section we collect results on graph products of abelian groups and their automorphisms groups. We follow mainly [9]. 4 MICHAŁ MARCINKOWSKI Let Γ be a simplicial graph, V its vertex set and E its edge set. Let tGv uvPV be a collection of finitely generated abelian groups. The graph product given by Γ and tGv uvPV is the group W pΓ, tGv uq “ ˚tGv uvPV {N, where ˚tGv uvPV is the free product of groups Gv , and N is the normal subgroup generated by rGx , Gy s, px, yq P E. Let W be a graph product of finitely generated abelian groups. A cyclic group is primary if its order is a power of a prime number. It easy to see that there exists a graph Γ and a collection tGv uvPV such that W is isomorphic to W pΓ, tGv uq and each Gv is primary or infinite cyclic. Thus without loss of generality we may always assume that W is a graph product where each Gv is either primary cyclic or infinite cyclic. Throughout this section and Section 3, Γ is a finite simplicial graph, V its vertex set and tGv uvPV a collection of cyclic groups, each primary or infinite. Let WΓ “ W pΓ, tGv uq. For each v P V we fix a generator of Gv . Abusing notation, we call this generator again by v making no distinction between the generator of Gv and the vertex v. Given a vertex v P V , by Stpvq “ tw P V | rw, vs “ eu denote the star of v in Γ and by Lkpvq “ Stpvq ´ tvu the link of v in Γ. We define two partial preorders on V by: vďw v ďs w ðñ ðñ Lkpvq Ď Stpwq, Stpvq Ď Stpwq. The preorder ď was already defined in [8] (see [8, Lemma 2.1] for the proof of transitivity of ď). Following [9], we describe generators of AutpWΓ q. They are grouped in four families. Since V generates WΓ , in the definitions below it amounts to specify maps from V to WΓ . In every case it is routine to check that a given map extends to an automorphism. (1) Let γ be an automorphism of Γ such that #Gv “ #Gγpvq . The automorphisms of W defined by the permutation of V given by γ is called a labelled graph automorphism. (2) A factor automorphism is an automorphism defined by: # vm z “ v ψv pzq “ z z ‰ v, where v P V , m P Z and pm, #Gv q “ 1. Note that if #Gv “ 8, then m “ ˘1. AUT-INVARIANT WORD NORM ON GRAPH PRODUCTS 5 (3) Let v, w P V and v ‰ w. A dominated transvection is an automorphism having one of the following two forms: aq #Gv “ 8 and v ď w, then # vw z “ v τv,w pzq “ z z ‰ v, bq #Gv “ pk , #Gw “ pl , and v ďs w, then # vw q z “ v τv,w pzq “ z z ‰ v, where q “ maxt1, pl´k u and p is prime. (4) Let v P V and K a connected component of Γ´Stpvq. A partial conjugation is an automorphism defined by: # vzv ´1 z P K σv,K pzq “ z z R K. The pure automorphism group of W , denoted Aut0 pW q, is the subgroup of AutpW q generated by factor automorphisms, dominated transvections and partial conjugations. Proposition 2.1. Aut0 pW q is a normal finite index subgroup in AutpW q. Proof. Let F be a group generated by labelled graph automorphisms. It is shown in [9] that Aut0 pW q and F generate AutpW q. The group Aut0 pW q is invariant under conjugations by elements from F , thus Aut0 pW q is normal. Let F ˙ Aut0 pW q be the semidirect product defined by the conjugation action of F on Aut0 pW q. The natural homomorphism F ˙ Aut0 pW q Ñ AutpW q is onto. Since Aut0 pW q is finite index in F ˙ Aut0 pW q, it is so in AutpW q.  Due to Proposition 2.1 and Lemma 1.2 we have. Corollary 2.2. AutpWq-invariant word norm and Aut0 pW q-invariant word norm are equivalent. 3. Aut0 -invariant subgroups Assume that G is a group, H ď AutpGq and N ď G is an H-invariant subgroup. Let p : G Ñ G{N be the quotient map and let us define p˚ : H Ñ AutpG{Nq be p˚ pψqpgNq “ ψpgqN. 6 MICHAŁ MARCINKOWSKI Suppose |¨|i is a norm on Gi , i “ 1, 2. A map f : G1 Ñ G2 is Lipschitz with respect to |¨|1 and |¨|2 if there exists C P R such that |f pxq|2 ď C|x|1 for every x P G. Lemma 3.1. The quotient map p : G Ñ G{N is Lipschitz with respect to |¨|H and |¨|p˚ pHq . Proof. Let S Ď G be a finite set such that S̄ “ HS generates G. Thus ppS̄q “ p˚ pHqppSq generates G{N and we can use S̄ to define |¨|H and ppS̄q to define |¨|p˚ pHq . Since p maps generators to generators, we have  that |¨|ppS̄q ď |¨|S̄ . Corollary 3.2. Let N ď WΓ be an Aut0 pWΓ q-invariant subgroup and let p : WΓ Ñ WΓ {N. If ppxq P WΓ {N is Aut-undistorted, then x is Aut-undistorted. Proof. Let H “ Aut0 pWΓ q. Note that we always have |¨|Aut ď |¨|p˚ pHq . Due to Lemma 3.1 and Corollary 2.2, p : WΓ Ñ WΓ {N is Lipschitz with respect to the Aut-invariant word norms. A pre-image of an undistorted element by a Lipschitz function is undistorted.  Let WΓ “ W pΓ, tGv uq be a graph product of cyclic groups, where each Gv is primary or infinite. Given X Ď V , we define WX to be the subgroup of WΓ generated by X. The group WX is called a standard subgroup of WΓ and is isomorphic to W pΓpXq, tGv uvPX q, where ΓpXq is the full subgraph of Γ spanned by X. A standard retraction is the map RX : WΓ Ñ WX defined by: # z zPX RX pzq “ e z R X. By KX we denote the kernel of RX . Lemma 3.3. Let X Ď V . The group KX is invariant under factor automorphisms and partial conjugations. Proof. Let ψ P AutpWΓ q be a factor automorphism or a partial conjugation. We shall define a map ψ0 P AutpWX q such that the following diagram commutes WΓ RX ψ WΓ WX ψ0 RX WX . AUT-INVARIANT WORD NORM ON GRAPH PRODUCTS 7 Then invariance of KX under ψ follows immediately. For ψ “ φv , a factor automorphism, we define: if v R X, then ψ0 “ id; if v P X, then ψ0 “ φv P AutpWX q. For ψ “ σv,K , a partial conjugation, we define: if v R X, then ψ0 “ id; if v P X, then # vzv ´1 z P X X K ψ0 pzq “ z z R X X K. In each case it is clear that ψ0 ˝ RX pzq “ RX ˝ ψpzq for each z P V , thus the diagram commutes.  In general KX is not invariant under dominated transvections. Suppose that there exist v R X and w P X such that #Gv “ 8 and v ď w. Then τv,w is well defined and v P KX , but τv,w pvq “ vw R KX . In Lemma 3.5 we show that existence of such v and w is the only reason why KX is not invariant under dominated transvections. Let ďτ be the relation defined on V by v ďτ w ðñ τv,w is well defined, i.e.: v ďτ w if either a) #Gv “ 8 and v ď w or b) #Gv “ pk , #Gw “ pl and v ďs w. Lemma 3.4. The relation ďτ is a partial preorder. Proof. It follows from the fact that ď and ďs are partial preorders.  Let Y be a set and ď a relation on Y . A subset X of Y is called a lower cone if for every t P X and s P Y such that s ď t, we have s P X. Lemma 3.5. If X Ď V is a lower cone with respect to ďτ , then KX is Aut0 pWΓ q-invariant. Proof. Due to Lemma 3.3 it is enough to show that KX is invariant under dominated transvections. Let τv,w P AutpWΓ q be a dominated transvection. By definition v ďτ w. We follow the strategy of Lemma 3.3. If w R X then we define ψ0 “ id. If w P X, then v P X since X is a lower cone. We define ψ0 “ τv,w P AutpWX q.  Corollary 3.6. Let X Ď V be a lower cone and let RX : WΓ Ñ WX be a standard retraction. If RX pxq P WX is Aut-undistorted, then x P WΓ is Aut-undistorted. 8 MICHAŁ MARCINKOWSKI Proof. KX “ KerpRX q is Aut0 pWΓ q-invariant. We apply Corollary 3.2.  Denote v „τ w ðñ v ďτ w and w ďτ v. Since ďτ is a partial preorder, it defines a partial order on equivalence classes of „τ . We denote this partial order again by ďτ . Equivalence classes of „τ fall into 3 types which we describe below. Let X Ď V be an equivalence class of „τ . If for some v P X we have #Gv “ 8, then #Gx “ 8 for every x P X. If there exist v, w P X, v ‰ w such that w and v commute, then every two elements of X commute. In this case WX is free abelian. If there exist v, w P X such that w and v do not commute, then every two elements of X do not commute. In this case WX is a free group. If for some v P X we have #Gv “ pk , then #Gx “ plx for some lx P N for every x P X. Note that in this case WX is always abelian and finite. If X1 and X2 are equivalence classes and there exist v1 P X1 and v2 P X2 such that v1 and v2 commute, then every element of X1 commute with every element of X2 . In this case we say that X1 and X2 commute. 4. Proof of the main theorem In this section we prove the following theorem which is a generalisation of Theorem 0.1 from the introduction. Theorem 4.1. Let Γ be a finite graph, V its vertex set and let tGv uvPV be a family of finitely generated abelian groups. The Aut-invariant word m norm on WΓ is bounded if and only if WΓ “ Z n ˆ D8 ˆ F , where n ‰ 1 and F is finite. If the Aut-invariant word norm on WΓ is unbounded, then WΓ has Aut-undistorted elements. The proof of Theorem 4.1 is by induction on the number of equivalence classes of „τ and it is preceded by a number of lemmata. Lemma 4.2 and Lemma 4.3 are used for the basis of induction. In Lemma 4.4 we introduce quasimorphisms we use in the proof. Finally, in Lemma 4.5 we show the main technical result needed for the inductive step. Lemma 4.2. The Aut-invariant word norm on the infinite dihedral group D8 is bounded. AUT-INVARIANT WORD NORM ON GRAPH PRODUCTS 9 Proof. Let S “ ta, bu and S̄ “ AutpD8 qS. Let w P D8 . Then w is an alternating product of a and b. If the length of this product is odd, then w is a conjugate of a or b, and w P S̄. If the length is even, then w is a product of a or b and a conjugate of a or b, then |w|S̄ ď 2.  Lemma 4.3. Let Γ be a finite graph, V its vertex set and tGv uvPV a family of primary or infinite cyclic groups. Assume that „τ has only one equivalence class. Then there are two cases: a) WΓ “ Fn , a free group, then WΓ has Aut-undistorted elements, b) WΓ “ Z n , n ą 1 or WΓ is finite and then the Aut-invariant word norm is bounded. Proof. a) WΓ “ Fn . If n “ 1, then AutpWΓ q “ t˘1u and clearly every non-trivial element of Z is Aut-undistorted. If n ą 2, let S “ txu where x P Fn is a base element. The set S̄ “ AutpWΓ qS is the set of all primitive elements of Fn and it generates Fn . In [2] it is shown that there exist non-zero homogeneous quasimorphisms on Fn , which are bounded on S̄. Thus by Lemma 1.3, Fn has Aut-undistorted elements. b) WΓ “ Z n , n ą 1. For simplicity suppose n “ 2. If n ą 2 the proof goes along the same lines. Let S “ tp1, 0qu, then S̄ “ AutpZ 2 qS “ tpa, bq | a, b are relatively primeu. For pm, nq P Z 2 , we have pm, nq “ p1, n ´ 1q ` pm ´ 1, 1q, thus  |pm, nq|S̄ ď 2. Lemma 4.4. Let G “ G1 ˚G2 , G1 ‰ e, G2 ‰ e and G ‰ D8 . There exists a non-zero homogeneous quasimorphism on G bounded on G1 Y G2 . Proof. A function f : G Ñ R is odd if f px´1 q “ f pxq´1 for every x P G. Note that if G ‰ C2k , where C2 is the group of order 2, then there exists a non-zero odd function on G. Assume that G1 or G2 is not of the form C2k . Below we describe a construction from [13, Section 3.2] of so called split quasimorphisms. Let σ1 : G1 Ñ R and σ2 : G2 Ñ R be bounded odd functions such that one of them is non-zero. Let x P G and let x “ x1 x2 . . . xn be the normal form of x in the free product, i.e. xi P Gspiq and spiq ‰ spi ` 1q. Then σ1 ˚ σ2 pxq “ σsp1q px1 q ` . . . ` σspnq pxn q is an unbounded quasimorphism. It follows that the homogenisation of σ1 ˚ σ2 is non-zero and is bounded on G1 Y G2 . 10 MICHAŁ MARCINKOWSKI If G “ C2k1 ˚ C2k2 and k1 ą 1 or k2 ą 1, then G is non-elementary word  hyperbolic, and the lemma follows from [6, Theorem A’]. Lemma 4.5. Let Γ be a finite graph, V its vertex set and tGv uvPV a family of primary or infinite cyclic groups. Let M Ď V be an equivam lence class of „τ . Suppose WΓ “ WM ˚ pZ n ˆ D8 ˆ F q, where n ‰ 1 and F is finite. Then WΓ has Aut-undistorted elements, provided that WΓ ‰ D8 . Proof. The class M is minimal. Indeed, assume by contradiction that v P M, w P V ´ M and w ďτ v. If #Gw ă 8, then Stpwq Ď Stpvq and w commutes with v which leads to a contradiction. If #Gw “ 8, then Lkpwq Ă Stpvq and since n ą 1, there exists w 1 P Lkpwq which commutes with v, again a contradiction. Let RM : WΓ Ñ WM be a standard retraction. It follows from Corollary 3.6 that if WM has Aut-undistorted elements, then WΓ has Autundistorted elements and the lemma is proven. Let us assume that WM has no Aut-undistorted elements. Since M is an equivalence class, it follows that WM “ Z n , n ą 1 or WM is finite. Now we show that in this case M is also a maximal class. Assume by contradiction that v P M and w P V ´ M and v ďτ w. If WM is finite, then Stpvq Ď Stpwq and v commutes with w which leads to a contradiction. If WM “ Z n , then Lkpvq Ď Stpwq and there exists v 1 P Lkpvq which commutes with w, again a contradiction. We showed that M is maximal and minimal. Thus if a dominated transvection τv,w is well defined, then v, w P M or v, w P V ´ M. Let pWM Y WV ´M qWΓ “ tyxy ´1 | y P WΓ , x P WM Y WV ´M u. It is clear that pWM Y WV ´M qWΓ is preserved by dominated transvections, factor automorphisms and partial conjugations. It follows that pWM Y WV ´M qWΓ is an Aut0 pWΓ q-invariant subset. Assume that WΓ ‰ D8 and let q be a homogeneous quasimorphism from Lemma 4.4, where G1 “ WM and G2 “ WV ´M . Let S “ V and S̄ “ Aut0 pWΓ qS. If x P S̄, then x “ yx0 y ´1 , where x0 P WM Y WV ´M and y P WΓ . We have qpxq “ qpx0 q, thus q is bounded on S̄. Due to Lemma 1.3 and Corollary 2.2, WΓ has Aut-undistorted elements.  Proof of Theorem 4.1. We may assume that for every v P V the group Gv is primary or infinite cyclic (see Section 2). AUT-INVARIANT WORD NORM ON GRAPH PRODUCTS 11 m Let us first note, that if WΓ “ Z n ˆ D8 ˆ F , n ‰ 1, F finite, then the Aut-invariant word norm on WΓ is bounded. Indeed, |¨|Aut is bounded on Z n and D8 (Lemma 4.3 and Lemma 4.2) and Cartesian product of groups with bounded Aut-invariant word norms has bounded Autinvariant word norm. Now we proceed by induction on the number of equivalence classes of „τ . The case when Γ has exactly one equivalence class was considered in Lemma 4.3. Let M Ă Γ be a maximal equivalence class. Then V ´ M is a lower cone. It follows from Corollary 3.6 that if WM ´V has Aut-undistorted elements, then so has WM . Let us assume that WM ´V has no Aut-undistorted elements. Let ΓpV ´Mq be the full subgraph of Γ spanned by vertices V ´M. The relation „τ defined with respect to ΓpV ´ Mq has less equivalence classes then the relation „τ defined with respect to Γ. Thus, by induction m hypothesis, we have WV ´M “ Z n ˆ D8 ˆ F , n ‰ 1, F finite. Let us remind that if v P V ´ M commutes with some w P M, then v commutes with every element of M. We define L “ tv P V ´ M | rv, ws ‰ e for w P Mu. If L is empty, then WΓ “ WM ˆ WV ´M and the theorem easily follows. m1 Let us assume that L is non-empty. We have WL “ Z n1 ˆ D8 ˆ F 1, where F 1 is finite. Note that the set of vertices generating Z n1 is a minimal equivalence class in V , thus if n1 “ 1, then by Corollary 3.6, WΓ has Aut-undistorted elements. Thus let us assume that n1 ‰ 1. The set M Y L is a lower cone in Γ. Indeed, if v P L and w ďτ v, then Lkpwq Ă Stpvq Ă V ´ M, thus w P L. Hence WΓ has Autundistorted elements provided that WM ‰ C2 or WL ‰ C2 (Lemma 4.5 and Corollary 3.6). There is one last case to consider, namely WM “ WL “ C2 . Let v0 P V be the generator of WL and w the generator of WM . Note that v0 P F . Indeed, otherwise v0 would be a generator of a D8 factor of WV ´M . Then the other generator of D8 , say v1 , would commute with w and then Stpwq Ď Stpv1 q which gives w ďτ v1 . This contradicts maximality of w. Thus v0 P F and m m`1 WΓ “ Z n ˆ D8 ˆ xw, v0 y ˆ F {xvy “ Z n ˆ D8 ˆ F {xvy, a group with bounded Aut-invariant word norm.  12 MICHAŁ MARCINKOWSKI 5. Problems Problem 5.1. For which WΓ there exist a non-zero homogeneous Autinvariant (or Aut0 pWΓ q-invariant) quasimorphism on WΓ ? If there exists a non-zero homogeneous AutpGq-invariant quasimorphism on G, then the Aut-invariant word metric is automatically unbounded. For WΓ “ Fn , Problem 5.1 was posed by Miklós Abért (see [1, Question 47]). The answer is positive if WΓ is the free group of rank two [3, Theorem 2]. We say that x P G is Aut-bounded, if there exists C P R such that |xn |Aut ă C for every n P Z. Problem 5.2. Is every Aut-distorted element of WΓ also Aut-bounded? If x P WΓ is Aut-undistorted, does there exists a homogeneous quasimorphism q : WΓ Ñ R which is Lipschitz with respect to the Autinvariant word norm and such that qpxq ‰ 0? Problem 5.3. Characterise Aut-distorted and Aut-undistorted elements of WΓ . For free groups, Theorem 2.10 in [3] provides a simple characterisation of Aut-undistorted (or bounded) elements. References [1] Miklós Abért. Some questions. http://www.renyi.hu/„abert/questions.pdf. [2] Valery Bardakov, Vladimir Shpilrain, and Vladimir Tolstykh. On the palindromic and primitive widths of a free group. J. Algebra, 285(2):574–585, 2005. [3] M Brandenbursky and M. Marcinkowski. Aut-invariant norms and Autinvariant quasimorphisms on free and surface groups. ArXiv:1702.01662. [4] Michael Brandenbursky, Światosław R. Gal, Jarek Kędra, and MichałMarcinkowski. The cancellation norm and the geometry of bi-invariant word metrics. Glasg. Math. J., 58(1):153–176, 2016. [5] Danny Calegari. scl, volume 20 of MSJ Memoirs. Mathematical Society of Japan, Tokyo, 2009. [6] Danny Calegari and Koji Fujiwara. Stable commutator length in wordhyperbolic groups. Groups Geom. Dyn., 4(1):59–90, 2010. [7] Ruth Charney, Kim Ruane, Nathaniel Stambaugh, and Anna Vijayan. The automorphism group of a graph product with no SIL. Illinois J. Math., 54(1):249– 262, 2010. [8] Ruth Charney and Karen Vogtmann. Finiteness properties of automorphism groups of right-angled Artin groups. Bull. Lond. Math. Soc., 41(1):94–102, 2009. AUT-INVARIANT WORD NORM ON GRAPH PRODUCTS 13 [9] L. J. Corredor and M. A. Gutierrez. A generating set for the automorphism group of a graph product of abelian groups. Internat. J. Algebra Comput., 22(1):1250003, 21, 2012. [10] Światosław R. Gal and Jarek Kędra. On bi-invariant word metrics. J. Topol. Anal., 3(2):161–175, 2011. [11] Mauricio Gutierrez and Adam Piggott. Rigidity of graph products of abelian groups. Bull. Aust. Math. Soc., 77(2):187–196, 2008. [12] Mauricio Gutierrez, Adam Piggott, and Kim Ruane. On the automorphisms of a graph product of abelian groups. Groups Geom. Dyn., 6(1):125–153, 2012. [13] Cristina Pagliantini and Pascal Rolli. Relative second bounded cohomology of free groups. Geom. Dedicata, 175:267–280, 2015. [14] Karen Vogtmann. GLpn, Zq, OutpFn q and everything in between: automorphism groups of RAAGs. In Groups St Andrews 2013, volume 422 of London Math. Soc. Lecture Note Ser., pages 105–127. Cambridge Univ. Press, Cambridge, 2015. Regensburg Universität & Uniwersytet Wrocławski E-mail address: [email protected]
4math.GR
Efficiently decodable codes for the binary deletion channel ∗ arXiv:1705.01963v2 [cs.IT] 26 Jul 2017 Venkatesan Guruswami† Ray Li‡ Carnegie Mellon University Pittsburgh, PA 15213 Abstract In the random deletion channel, each bit is deleted independently with probability p. For the random deletion channel, the existence of codes of rate (1 − p)/9, and thus bounded away from 0 for any p < 1, has been known. We give an explicit construction with polynomial time encoding and deletion correction algorithms with rate c 0 (1 − p) for an absolute constant c 0 > 0. 1 Introduction We consider the problem of designing error-correcting codes for reliable and efficient communication on the binary deletion channel. The binary deletion channel (BDC) deletes each transmitted bit independently with probability p, for some p ∈ (0, 1) which we call the deletion probability. Crucially, the location of the deleted bits are not known at the decoder, who receives a subsequence of the original transmitted sequence. The loss of synchronization in symbol locations makes the noise model of deletions challenging to cope with. As one indication of this, we still do not know the channel capacity of the binary deletion channel. Quoting from the first page of Mitzenmacher’s survey [17]: “Currently, we have no closed-form expression for the capacity, nor do we have an efficient algorithmic means to numerically compute this capacity.” This is in sharp contrast with the noise model of bit erasures, where each bit is independently replaced by a ’?’ with probability p (the binary erasure channel (BEC)), or of bit errors, where each bit is flipped independently with probability p (the binary symmetric channel (BSC)). The capacity of the BEC and BSC equal 1 − p and 1 − h(p) respectively, and we know codes of polynomial complexity with rate approaching the capacity in each case. The capacity of the binary deletion channel is clearly at most 1 − p, the capacity of the simpler binary erasure channel. Diggavi and Grossglauser [3] establish that the capacity of the deletion channel for p ≤ 12 is at least 1 − h(p). Kalai, Mitzenmacher, and Sudan [11] proved this lower bound is tight as p → 0, and Kanoria and Montanari [12] determined a series expansion that can be used to determine the capacity exactly. Turning to large p, Rahmati and Duman [18] prove that the capacity is at most 0.4143(1 − p) for p ≥ 0.65. Drinea and Mitzenmacher [4, 5] proved that the capacity of the BDC is at least (1 − p)/9, which is within a constant factor of the upper bound. In particular, the capacity is positive for every p < 1, which is perhaps surprising. The asymptotic behavior of the capacity of the BDC at both extremes of p → 0 and p → 1 is thus known. ∗ Research supported in part by NSF grant CCF-1422045. [email protected] ‡ Email: [email protected] † Email: This work is concerned with constructive results for coding for the binary deletion channel. That is, we seek codes that can be constructed, encoded, and decoded from deletions caused by the BDC, in polynomial time. Recently, there has been good progress on codes for adversarial deletions, including constructive results. Here the model is that the channel can delete an arbitrary subset of pn bits in the n-bit codeword. A code capable of correcting pn worst-case deletions can clearly also correct deletions caused by a BDC with deletion probability (p − ϵ) with high probability, so one can infer results for the BDC from some results √ for worst-case deletions. For small p, Guruswami and Wang [9] constructed binary codes of rate 1 − O( p) to efficiently correct a p fraction worst-case deletions. So this also gives codes of rate approaching 1 for the BDC when p → 0. For larger p, Kash et al. [13] proved that randomly chosen codes of small enough rate R > 0 can correctly decode against pn adversarial deletions when p ≤ 0.17. Even non-constructively, this remained the best achievability result in terms of correctable deletion fraction until the recent work of Bukh, Guruswami, and Håstad [2]√who constructed codes of positive rate efficiently decodable against pn adversarial deletions for any p < 2 − 1. For adversarial deletions, it is impossible to correct a deletion fraction of 1/2, whereas the capacity of the BDC is positive for all p < 1. So solving the problem for the much harder worst-case deletions is not a viable approach to construct positive rate codes for the BDC for p > 1/2. To the best of our knowledge, explicit efficiently decodable code constructions were not available for the binary deletion channel for arbitrary p < 1. We present such a construction in this work. Our rate is worse than the (1 − p)/9 achieved non-constructively, but has asymptotically the same dependence on p for p → 1. Theorem 1.1. Let p ∈ (0, 1). There is an explicit a family of binary codes that (1) has rate (1 − p)/110, (2) is constructible in polynomial time, (3) encodable in time O(N ), and (3) decodable with high probability on the binary deletion channel with deletion probability p in time O(N 2 ). (Here N is the block length of the code) 1.1 Some other related work One work that considers efficient recovery against random deletions is by Yazdi and Dolecek [20]. In their setting, two parties Alice and Bob are connected by a two-way communication channel. Alice has a string X , Bob has string Y obtained by passing X through a binary deletion channel with deletion probability p ≪ 1, and Bob must recover X . They produce a polynomial-time synchronization scheme that transmits a total of O(pn log(1/p)) bits and allows Bob to recover X with probability exponentially approaching 1. For other models of random synchronization errors, Kirsch and Drinea [14] prove information capacity lower bounds for channels with i.i.d deletions and duplications. Fertonani et al. [6] prove capacity bounds for binary channels with i.i.d insertions, deletions, and substitutions. For deletion channels over non-binary alphabets, Rahmati and Duman [18] prove a capacity upper bound of C 2 (p) + (1 − p) log(|Σ|/2), where C 2 (p) denotes the capacity of the binary deletion channel with deletion probability p, when the alphabet size |Σ| is even. In particular, using the best known bound for C 2 (p) of C 2 (p) ≤ 0.4143(1 − p), the upper bound is (1 − p)(log |Σ| − 0.5857). In [8], the authors of this paper consider the model of oblivious deletions, which is in between the BDC and adversarial deletions in power. Here, the channel can delete any pn bits of the codeword, but must do so without knowledge of the codeword. In this model, they prove the existence of codes of positive rate for correcting any fraction p < 1 of oblivious deletions. 2 1.2 Our construction approach Our construction concatenates a high rate outer code over a large alphabet that is efficiently decodable against a small fraction of adversarial insertions and deletions, with a good inner binary code. For the outer code, we can use the recent construction of [10]. To construct the inner code, we first choose a binary code correcting a small fraction of adversarial deletions. By concentration bounds, duplicating bits of a codeword in a disciplined manner is effective against the random deletion channel, so we, for some constant B, duplicate every bit of the binary code B/(1 −p) times. We further ensure our initial binary code has only runs of length 1 and 2 to maximize the effectiveness of duplication. We add small buffers of 0s between inner codewords to facilitate decoding. One might wonder whether it would be possible to use Drinea and Mitzenmacher’s existential result [4, 5] of a (1 − p)/9 capacity lower bound as a black box inner code to achieve a better rate together with efficient decodability. We discuss this approach in §3.2 and elaborate on what makes such a construction difficult to implement. 2 Preliminaries General Notation. Throughout the paper, log x refers to the base-2 logarithm. We use interval notation [a, b] = {a, a + 1, . . . , b} to denote intervals of integers, and we use [a] = [1, a] = {1, 2, . . . , a}. Let Binomial(n, p) denote the Binomial distribution. Words. A word is a sequence of symbols from some alphabet. We denote explicit words using angle brackets, like h01011i. We denote string concatenation of two words w and w ′ with ww ′. We denote w k = ww · · · w where there are k concatenated copies of w. A subsequence of a word w is a word obtained by removing some (possibly none) of the symbols in w. Let ∆i/d (w 1 , w 2 ) denote the insertion/deletion distance between w 1 and w 2 , i.e. the minimum number of insertions and deletions needed to transform w 1 into w 2 . By a lemma due to Levenshtein [15], this is equal to |w 1 | + |w 2 | − 2 LCS(w 1 , w 2 ), where LCS denotes the length of the longest common subsequence. Define a run of a word w to be a maximal single-symbol subword. That is, a subword w ′ in w consisting of a single symbol such that any longer subword containing w ′ has at least two different symbols. Note the runs of a word partition the word. For example, 110001 has 3 runs: one run of 0s and two runs of 1s. We say that c ∈ {0, 1}m and c ′ ∈ {0, 1}m are confusable under δm deletions if it is possible to apply δm deletions to c and c ′ and obtain the same result. If δ is understood, we simply say c and c ′ are confusable. Concentration Bounds. We use the following forms of Chernoff bound. Lemma 2.1 (Chernoff). Let A1 , . . . , An be i.i.d random variables taking values in [0, 1]. Let A = and δ ∈ [0, 1]. Then   Pr[A ≤ (1 − δ ) E[A]] ≤ exp −δ 2 E[A]/2 Furthermore, Pr[A ≥ (1 + δ ) E[A]] ≤  eδ (1 + δ )1+δ  E[A] We also have the following corollary, whose proof is in Appendix A. 3 . Ín i=1 Ai (1) (2) Lemma 2.2. Let 0 < α < β. Let A1 , . . . , An be independent random variables taking values in [0, β] such that, for all i, E[Ai ] ≤ α. For γ ∈ [α, 2α], we have " n #   Õ (γ − α)2n Pr . (3) Ai ≥ nγ ≤ exp − 3α β i=1 3 Efficiently decodable codes for random deletions with p approaching 1 3.1 Construction We present a family of constant rate codes that decodes with high probability on a binary deletion channel with deletion fraction p (BDCp ). These codes have rate c 0 (1 − p) for an absolute positive constant c 0 , which is within a constant of the upper bound (1 − p), which even holds for the erasure channel. By Drinea and Mitzenmacher [4] the maximum known rate of a non-efficiently correctable binary deletion channel code is (1 − p)/9. The construction is based on the intuition that deterministic codes are better than random codes for the deletion channel. Indeed, for adversarial deletions, length n √ random codes correct at most 0.22n deletions [13], while explicitly constructed codes can correct close to ( 2 − 1)n deletions [2]. We begin by borrowing a result from [9]. Lemma 3.1 (Corollary of Lemma 2.3 of [9]). Let 0 < δ < 12 . For every binary string c ∈ {0, 1}m , there are m 2 at most δm (1−δ strings c ′ ∈ {0, 1}m such that c and c ′ are confusable under δm deletions. )m The next lemma gives codes against a small fraction of adversarial deletions with an additional run-length constraint on the codewords. Lemma 3.2. Let δ > 0. There exists a length m binary code of rate R = 0.6942 − 2h(δ ) − O(log(δm)/m) correcting a δ fraction of adversarial insertions and deletions such that each codeword contains only runs of size 1 and 2. Furthermore this code is constructible in time Õ(2(0.6942+R)m ). Proof. It is easy to show that the number of codewords with only runs of 1 and 2 is Fm , the mth Fibonacci number, and it is well known that Fm = φm + o(1) ≈ 20.6942m where φ is the golden ratio. Now we construct m 2 the code by choosing it greedily. Each codeword is confusable with at most δm (1−δ other codewords, )m so the number of codewords we can choose is at least 20.6942m δm m 2 (1−δ )m = 2m(0.6942−2h(δ )−O (log(δm)/m)) . (4) We can find all words of length m whose run lengths are only 1 and 2 by recursion in time O(Fm ) = O(20.6942m ). Running the greedy algorithm, we need to, for at most Fm · 2 Rm pairs of such words, determine whether the pair is confusable (we only need to check confusability of a candidate word with words already added to the code). Checking confusability of two words under adversarial deletions reduces to checking whether the longest common subsequence is at least (1 − δ )m, which can be done in time O(m 2 ). This gives an overall runtime of O(m 2 · Fm · 2 Rm ) = Õ(2(0.6942+R)m ).  Corollary 3.3. There exists a constant m ∗0 such that for all m ≥ m ∗0 , there exists a length m binary code of rate Rin = 0.555 correcting a δ in = 0.0083 fraction of adversarial insertions and deletions such that each 4 codeword contains runs of size 1 and 2 only and each codeword starts and ends with a 1. Furthermore this code is constructible in time O(21.25m ). Our construction utilizes the following result as a black box for efficiently coding against an arbitrary fraction of insertions and deletions with rate approaching capacity. Theorem 3.4 (Theorem 1.1 of [10]). For any 0 ≤ δ < 1 and ϵ > 0, there exists a code C over alphabet Σ, with |Σ| = poly(1/ϵ), with block length n, rate 1 − δ − ϵ, and is efficiently decodable from δn insertions and deletions. The code can be constructed in time poly(n), encoded in time O(n), and decoded in time O(n 2 ). We apply Theorem 3.4 for small δ , so we also could use the high rate binary code construction of [7] as an outer code. We now turn to our code construction for Theorem 1.1. 1 1 The code. Let B = 60, B ∗ = 1.43̄B = 86, η = 1000 , δ out = 1000 . Let m 0 = max(α log(1/δ out )/η, m ∗0 ), ∗ where α is a sufficiently large constant and where m 0 is given by Corollary 3.3. Let ϵout > 0 be small enough such that the alphabet Σ, given by Theorem 3.4 with ϵ = ϵout and δ = δ out , satisfies |Σ| ≥ m 0 , and let Cout be the corresponding code. Let Cin : |Σ| → {0, 1}m be the code given by Corollary 3.3, and let Rin = 0.555, δ in = 0.0083, and m = R1i n log |Σ| = O(log(1/ϵ)) be the rate, tolerable deletion fraction, and block length of the code, respectively (Rin and δ in are given by Corollary 3.3). Each codeword of Cin has runs of length 1 and 2 only, and each codeword starts and ends with a 1. This code is constructed greedily. Our code is a modified concatenated code. We encode our message as follows. • Outer Code. First, encode the message into the outer code, Cout , to obtain a word c (out ) = σ1 . . . σn . • Concatenation with Inner Code. Encode each outer codeword symbol σi ∈ Σ by the inner code Cin . • Buffer. Insert a buffer of ηm 0s between adjacent inner codewords. Let the resulting word be c (cat ) . Let ci(in) = Cin (σi ) denote the encoded inner codewords of c (cat ) . • Duplication. After concatenating the codes and inserting the buffers, replace each character (including characters in the buffers) with ⌈B/(1 − p)⌉ copies of itself to obtain a word of length N := Bnm/(1 −p). (dup) }. Let the resulting word be c, and the corresponding inner codewords be {ci Rate. The rate of the outer code is 1 − δ out − ϵout , the rate of the inner code is Rin , the buffer and 1 and (1 − p)/B respectively. This gives a total rate that is slightly greater duplications multiply the rate by 1+η than (1 − p)/110. Notation. Let s denote the received word after the codeword c is passed through the deletion channel. Note that (i) every bit of c can be identified with a bit in c (cat ) , and (ii) each bit in the received word s can be identified with a bit in c. Thus, we can define relations f (dup) : c (cat ) → c, and f (del) : c → s (that is, relations on the indices of the strings). These are not functions because some bits may be mapped to multiple (for f (dup) ) or zero (for f (del) ) bits. Specifically, f (del) and f (dup) are the inverses of total functions. In this way, composing these relations (i.e. composing their inverse functions) if necessary, we can speak about the image and pre-image of bits or subwords of one of c (cat ) , c, and s under these relations. For example, during the Duplication step of encoding, a bit hb j i of c (cat ) is replaced with B/(1 − p) copies of itself, so the corresponding string hb j i B/(1−p) in c forms the image of hb j i under f (dup) , and conversely the pre-image of the duplicated string hb j i B/(1−p) is that bit hb j i. Decoding algorithm. 5 • Decoding Buffer. First identify all runs of 0s in the received word with length at least Bηm/2. These are our decoding buffers that divide the word into decoding windows, which we identify with subwords of s. • Deduplication. Divide each decoding window into runs. For each run, if it has strictly more than B ∗ copies of a bit, replace it with as two copies of that bit, otherwise replace it with one copy. For example, h0i 2B gets replaced with h00i while h0i B gets replaced with h0i. For each decoding window, concatenate these runs of length 1 and 2 in their original order in the decoding window to produce a deduplicated decoding window. • Inner Decoding. For each deduplicated decoding window, decode an outer symbol σ ∈ Σout from each decoding window by running the brute force deletion correction algorithm for Cin . That is, for each deduplicated decoding window s ∗(in) , find by brute force a codeword c ∗(in) in Cin that such that ∆i/d (c ∗(in) , s ∗(in) ) ≤ δ inm. If c ∗(in) is not unique or does not exist, do not decode an outer symbol σ from this decoding window. Concatenate the decoded symbols σ in the order in which their corresponding decoding windows appear in the received word s to obtain a word s (out ) . • Outer Decoding. Decode the message m from s (out ) using the decoding algorithm of Cout in Theorem 3.4. (dup) the decoding window whose pre-image under f (del) contains indices For purposes of analysis, label as si (dup) (dup) contains bits in multiple decoding . If this decoding window is not unique (that is, the image of ci in ci (dup) arbitrarily. Note this labeling may mean some decoding windows are unlabeled, windows), then assign si and also that some decoding windows may have multiple labels. In our analysis, we show both occurrences (dup) (dup) after Deduplication to be si(in) . , denote the result of si are rare. For a decoding window si The following diagram depicts the encoding and decoding steps. The pair ({ci(in) }i , c (cat ) ) indicates that, at that step of encoding, we have produced the word c (cat ) , and the sequence {ci(in) }i are the “inner codewords” of c (cat ) (that is, the words in between what would be identified by the decoder as decoding (dup) }i , c) is used similarly. buffers). The pair ({ci Cout Ci n , Buf m −−−−→ c (out ) −−−−−−−→ o n  Dup n o  (dup) (in) ci , c (cat ) −−−→ ci ,c i i BDC DeBuf n (dup) o DeDup n (in) o Deci n (out ) Decout −−−−−→ s −−−−−→ m −−−−−−→ si s −−−−−→ si i i Runtime. The outer code is constructible in poly(n) time and the inner code is constructible in time O(21.25m ) = poly(1/ϵ), which is a constant, so the total construction time is poly(N ). Encoding in the outer code is linear time, each of the n inner encodings is constant time, and adding the buffers and applying duplications each can be done in linear time. The overall encoding time is thus O(N ). The Buffer step of the decoding takes linear time. The Deduplication step of each inner codeword takes constant time, so the entire step takes linear time. For each inner codeword, Inner Decoding takes time O(m 2 2m ) = poly(1/ϵ) by brute force search over the 2m possible codewords: checking each of the 2m codewords is a longest common subsequence computation and thus takes time O(m 2 ), giving a total decoding time of O(m 2 2m ) for each inner codeword. We need to run this inner decoding O(n) times, so the entire 6 Inner Decoding step takes linear time. The Outer Decoding step takes O(n 2 ) time by Theorem 3.4. Thus the total decoding time is O(N 2 ). Correctness. Note that, if an inner codeword is decoded incorrectly, then one of the following holds. 1. (Spurious Buffer) A spurious decoding buffer is identified in the corrupted codeword during the Buffer step. 2. (Deleted Buffer) A decoding buffer neighboring the codeword is deleted. (dup) 3. (Inner Decoding Failure) Running the Deduplication and Inner Decoding steps on si inner codeword incorrectly. computes the We show that, with high probability, the number of occurrences of each of these events is small. The last case is the most nontrivial, so we deal with it first, assuming the codeword contains no spurious decoding buffers and the neighboring decoding buffers are not deleted. In particular, we consider an i such (dup) (dup) that our decoding window si whose pre-image under f (del) only contains bits in ci (because no (dup) appear in any other decoding window (because no spurious deleted buffer) and no bits in the image of ci buffer). Recall that the inner code Cin can correct against δ in = 0.0083 fraction of adversarial insertions and deletions. Suppose an inner codeword ci(in) = r 1 . . . rk ∈ Cin has k runs r j each of length 1 or 2, so that m/2 ≤ k ≤ m. Definition 3.5. A subword of α identical bits in the received word s is • type-0 if α = 0 • type-1 if α ∈ [1, B ∗ ] • type-2 if α ∈ [B ∗ + 1, ∞). By abuse of notation, we say that a length 1 or 2 run r j of the inner codeword ci(in) has type-t j if the image of r j in s under f (del) ◦ f (dup) forms a type-t j subword. Let t 1 , . . . , tk be the types of the runs r 1 , . . . , rk , respectively. The image of a run r j under f (del) ◦ f (dup) has length distributed as Binomial(B|r j |/(1 − p), 1 − p). Let δ = 0.43̄ be such that B ∗ = (1 + δ )B. By the Chernoff bounds in Lemma 2.1, the probability that a run r j of length 1 is type-2 is Pr Z ∼Binomial(B/(1−p),1−p)  B [Z > B ∗ ] < e δ /(1 + δ )1+δ < 0.0071. (5) Similarly, the probability that a run r j of length-2 is type-1 is at most Pr Z ∼Binomial(2B/(1−p),1−p) 2B [Z ≤ B ∗ ] < e −((1−δ )/2) < 0.0081. The probability any run is type-0 is at most PrZ ∼Binomial(B/(1−p),1−p) [Z = 0] < e −B < 10−10 . (6) We now have established that, for runs r j in ci(in) , the probability that the number of bits in the image of r j in s under f (del) ◦ f (dup) is “incorrect” (between 1 and B ∗ for length 2 runs, and greater than B ∗ for length 1 runs), is at most 0.0081, which is less than δ in . If the only kinds of errors in the Local Decoding step 7 were runs of c of length 1 becoming runs of length 2 and runs of length 2 become runs of length 1, then we have that, by concentration bounds, with probability 1 − 2−Ω(m) , the number of insertions deletions needed to transform si(in) back into ci(in) is at most δ inm, in which case si(in) gets decoded to the correct outer symbol using Cin . However, we must also account for the fact that some runs r j of ci(in) may become deleted completely after duplication and passing through the deletion channel. That is, the image of r j in s under f (del) ◦ f (dup) is empty, or, in other words, r j is type-0. In this case the two neighboring runs r j−1 and r j+1 appear merged together in the Deduplication step of decoding. For example, if a run of 1s was deleted completely after duplication and deletion, its neighboring runs of 0s would be interpreted by the decoder as a single run. Fortunately, as we saw, the probability that a run is type-0 is extremely small (< 10−10 ), and we show each type-0 run only increases ∆i/d (ci(in) , si(in) ) by a constant. We show this constant is at most 6. To be precise, let Yj be a random variable that is 0 if |r j | = t j , 1 if {|r j |, t j } = {1, 2}, and 6 if t j = 0. We Í claim kj=1 Yj is an upper bound on ∆i/d (ci(in) , si(in) ). To see this, first note that if t j , 0 for all i, then the number of runs of ci(in) and si(in) are equal, so we can transform ci(in) into si(in) by adding a bit to each length-1 (in) (in) type-2 run of ci and deleting a bit from each length-2 type-1 run of si . (in) Now, if some number, ℓ, of the t j are 0, then at most 2ℓ of the runs in ci become merged with some other run (or a neighboring decoding buffer) after duplication and deletion. Each set of consecutive runs r j , r j+2 , . . . , r j+2j ′ that are merged after duplication and deletion gets replaced with 1 or 2 copies of the corresponding bit. For example, if r 1 = h11i, r 2 = h0i, r 3 = h11i, and if after duplication and deletion, 2B bits remain in the image of each of r 1 and r 3 , and r 2 is type-0, then the image of r 1r 2r 3 under f (del) ◦ f (dup) is h1i 4B , which gets decoded as h11i in the Deduplication step because h1i 4B is type-2. To account for the type-0 runs in transforming ci(in) into si(in) , we (i) delete at most two bits from each of the ℓ type-0 runs in ci(in) and (ii) delete at most two bits for each of at most 2ℓ merged runs in ci(in) . The total number of additional insertions and deletions required to account for type-0 runs of c is thus at most 6ℓ, so we need at most 6 insertions and deletions to account for each type-0 run. Our analysis covers the case when some bits in the image of ci(in) under f (del) ◦ f (dup) are interpreted as part of a decoding buffer. Recall that inner codewords start and end with a 1, so that r 1 ∈ {h1i, h11i} for every inner codeword. If, for example, t 1 = 0, that is, the image under f (del) ◦ f (dup) of the first run of 1s, r 1 , is the empty string, then the bits of r 2 are interpreted as part of the decoding buffer. In this case too, our analysis tells us that the type-0 run r 1 increases ∆i/d (ci(in) , si(in) ) by at most 6. Í We conclude kj=1 Yj is an upper bound for ∆i/d (ci(in) , si(in) ). Note that if r j has length 1, then by (5) we have E[Yj ] = 1 · Pr[r j is type-2] + 6 · Pr[r j is type-0] < 1 · 0.0071 + 6 · 10−9 < 0.0082. (7) Similarly, if r j has length 2, then by (6) we have E[Yj ] = 1 · Pr[r j is type-1] + 6 · Pr[r j is type-0] < 1 · 0.0081 + 6 · 10−9 < 0.0082. (8) Thus E[Yj ] < 0.0082 for all i. We know the word si(in) is decoded incorrectly (i.e. is not decoded as σi ) in 8 the Inner Decoding step only if ∆i/d (ci(in) , si(in) ) > δ inm. The Yj are independent, so Lemma 2.2 gives Pr[si(in) decoded incorrectly] ≤ Pr[Y1 + Y2 + · · · + Yk ≥ δ inm] ≤ Pr[Y1 + Y2 + · · · + Yk ≥ δ in k]   (δ in − 0.0082)2 k ≤ exp − 3 · 6 · δ in ≤ exp (−Ω(m)) (9) where the last inequality is given by k ≥ m/2. Since our m ≥ Ω(log(1/δ out )) is sufficiently large, we have the probability si(in) is decoded incorrectly is at most δ out /10. If we let Yj(i) denote the Yj corresponding to Í (i) (in) inner codeword ci , the events Ei given by j Yj ≥ δ inm are independent. By concentration bounds on the events Ei , we conclude the probability that there are at least δ out n/9 incorrectly decoded inner codewords that are not already affected by spurious buffers and neighboring deleted buffers is 2−Ω(n) . Our aim is to show that the number of spurious buffers, deleted buffers, and inner decoding failures is small with high probability. So far, we have shown that, with high probability, assuming a codeword is not already affected by spurious buffers and neighboring deleted buffers, the number of inner decoding failures is small. We now turn to showing the number of spurious buffers is likely to be small. A spurious buffer appears inside an inner codeword if many consecutive runs of 1s are type-0. A spurious buffer requires at least one of the following: (i) a codeword contains a sequence of at least ηm/5 consecutive type-0 runs of 1s, (ii) a codeword contains a sequence of ℓ ≤ ηm/5 consecutive type-0 runs of 1s, such that, for the ℓ + 1 consecutive runs of 0s neighboring these type-0 runs of 1s, their image under f (del) ◦ f (dup) has at least 0.5ηm 0s. We show both happen with low probability within a codeword. A set of ℓ consecutive type-0 runs of 1s occurs with probability at most 10−10ℓ . Thus the probability an inner codeword has a sequence of ηm/5 consecutive type-0 runs of 1s is at most m 2 · 10−10ηm/5 = exp(−Ω(ηm)). Now assume that in an inner codeword, each set of consecutive type-0 runs of 1s has size at most ηm/5. Each set of ℓ consecutive type-0 runs of 1s merges ℓ + 1 consecutive runs of 0s in c, so that they appear as a single longer run in s. The sum of the lengths of these ℓ + 1 runs is some number ℓ ∗ that is at most 2ℓ + 2. The number of bits in the image of these runs of ci(in) under f (del) ◦ f (dup) is distributed as Binomial(ℓ ∗B/(1 − p), 1 − p). This has expectation ℓ ∗ B ≤ 0.41Bηm, so by concentration bounds, the probability this run of s has length at least 0.5Bηm, i.e. is interpreted as a decoding buffer, is at most exp(−Ω(ηm)). Hence, conditioned on each set of consecutive type-0 runs of 1s having size at most ηm/5, the probability of having no spurious buffers in a codeword is at least 1 − exp(−Ω(ηm)). Thus the overall probability there are no spurious buffers a given inner codeword is at least (1 − exp(−Ω(ηm))(1 − exp(−Ω(ηm))) = 1 − exp(−Ω(ηm)). Since each inner codeword contains at most m candidate spurious buffers (one for each type-0 run of 1s), the expected number of spurious buffers in an inner codeword is thus at most m · exp(−Ω(ηm)). By our choice of m ≥ Ω(log(1/δ out )/η), this is at most δ out /10. The occurrence of conditions (i) and (ii) above are independent between buffers. The total number of spurious buffers thus is bounded by the sum of n independent random variables each with expectation at most δ out /10. By concentration bounds, the probability that there are at least δ out n/9 spurious buffers is 2−Ω(n) . A deleted buffer occurs only when the image of the ηm 0s in a buffer under f (del) ◦ f (dup) is at most Bηm/2. The number of such bits is distributed as Binomial(Bηm/(1 − p), 1 − p). Thus, each buffer is deleted with probability exp(−Bηm) < δ out /10 by our choice of m ≥ Ω(log(1/δ out )/η). The events of a buffer receiving too many deletions are independent across buffers. By concentration bounds, the probability that there are at least δ out n/9 deleted buffers is thus 2−Ω(n) . Each inner decoding failure, spurious buffer, and deleted buffer increases the distance ∆i/d (ci(out ) , si(out ) ) 9 by at most 3: each inner decoding failure causes up to 1 insertion and 1 deletion; each spurious buffer causes up to 1 deletion and 2 insertions; and each deleted buffer causes up to 2 deletions and 1 insertion. Our message is decoded incorrect if ∆i/d (ci(out ) , si(out ) ) > δ out n. Thus, there is a decoding error in the outer code only if at least one of (i) the number of incorrectly decoded inner codewords without spurious buffers or neighboring deleted buffers, (ii) the number of spurious buffers, or (iii) the number of deleted buffers is at least δ out n/9. However, by the above arguments, each is greater than δ out n/9 with probability 2−Ω(n) , so there is a decoding error with probability 2−Ω(n) . This concludes the proof of Theorem 1.1. 3.2 Possible Alternative Constructions As mentioned in the introduction, Drinea and Mitzenmacher [4, 5] proved that the capacity of the BDCp is at least (1 − p)/9. However, their proof is nonconstructive and they do not provide an efficient decoding algorithm. One might think it is possible to use Drinea and Mitzenmacher’s construction as a black box. We could follow the approach in this paper, concatenating an outer code given by [10] with the rate (1 − p)/9 randomdeletion-correcting code as a black box inner code. The complexity of the Drinea and Mitzenmacher’s so-called jigsaw decoding is not apparent from [5]. However, the inner code has constant length, so construction, encoding, and decoding would be constant time. Thus, the efficiency of the inner code would not affect the asymptotic runtime. The main issue with this approach is that, while the inner code can tolerate random deletions with probability p, inner codeword bits are not deleted in the concatenated construction according to a BDCp ; the 0 bits closer to the buffers between the inner codewords are deleted with higher probability because they might be “merged” with a buffer. For example, if an inner codeword is h101111i, then because the codeword is surrounded by buffers of 0s, deleting the leftmost 1 effectively deletes two bits because the 0 is interpreted as part of the buffer. While this may not be a significant issue because the distributions of deletions in this deletion process and BDCp are quite similar, much more care would be needed to prove correctness. Our construction does not run into this issue, because our transmitted codewords tend to have many 1s on the ends of the inner codewords. In particular, each inner codeword of Cin has 1s on the ends, so after the Duplication step each inner codeword has B/(1 − p) or 2B/(1 − p) 1s on the ends. The 1s on the boundary of the inner codeword will all be deleted with probability ≈ exp(−B), which is small. Thus, in our construction, it is far more unlikely that bits are merged with the neighboring decoding buffer, than if we were to use a general inner code construction. Furthermore, we believe our construction based on bit duplication of a worst-case deletion correcting code is conceptually simpler than appealing to an existential code. As a remark, we presented a construction with rate (1 −p)/110, but using a randomized encoding we can improve the constant from 1/110 to 1/60. We can modify our construction so that, during the Duplication step of decoding, instead of replacing each bit of c (cat ) with a fix number B/(1 −p) copies of itself, we instead replaced each bit independently with Poisson(B/(1 − p)) copies of itself. Then the image of a run r j under duplication and deletion is distributed as Poisson(B), which is independent of p. Because we don’t have a dependence on p, we can tighten our bounding in (5) and (6). To obtain (1 − p)/60, we can take B = 28.12 and set B ∗ = 40, where B ∗ is the threshold after which runs are decoded as two bits instead of one bit in the Deduplication step. The disadvantage of this approach is that we require our encoding to be randomized, whereas the construction presented above uses deterministic encoding. 10 4 Future work and open questions A lemma due to Levenshtein [15] states that a code C can decode against pn adversarial deletions if and only if it can decode against pn adversarial insertions and deletions. While this does not automatically preserve the efficiency of the decoding algorithms, all the recent efficient constructions of codes for worstcase deletions also extend to efficient constructions with similar parameters for recovering from insertions and deletions [1, 7]. In the random error model, decoding deletions, insertions, and insertions and deletions are not the same. Indeed, it is not even clear how to define random insertions. One could define insertions and deletions via the Poisson repeat channel where each bit is replaced with a Poisson many copies of itself (see [4, 17]). However, random insertions do not seem to share the similarity to random deletions that adversarial deletions share with adversarial insertions; we can decode against arbitrarily large Poisson duplication rates, whereas for codes of block length n we can decode against a maximum of n adversarial insertions or deletions [5]. Alternatively one can consider a model of random insertions and deletions where, for every bit, the bit is deleted with a fixed probability p1 , a bit is inserted after it with a fixed probability p2 , or it is transmitted unmodified with probability 1 − p1 − p2 [19]. One could also investigate settings involving memoryless insertions, deletions, and substitutions [16]. There remain a number of open questions even concerning codes for deletions only. Here are a few highlighted by this work. 1. Can we close the gap between deletions? √ 2 − 1 and 1 2 on the maximum correctable fraction of adversarial 2. Can we construct efficiently decodable codes for the binary deletion channel with better rate, perhaps reaching or beating the best known existential capacity lower bound of (1 − p)/9? 3. Can we construct efficient codes for the binary deletion channel with rate 1 − O(h(p)) for p → 0? References [1] Joshua Brakensiek, Venkatesan Guruswami, and Samuel Zbarsky. Efficient low-redundancy codes for correcting multiple deletions. In Proceedings of the Twenty-Seventh Annual ACM-SIAM Symposium on Discrete Algorithms, pages 1884–1892, 2016. [2] Boris Bukh, Venkatesan Guruswami, and Johan Håstad. An improved bound on the fraction of correctable deletions. IEEE Trans. Information Theory, 63(1):93–103, 2017. [3] Suhas Diggavi and Matthias Grossglauser. On transmission over deletion channels. In Proceedings of the 39th Annual Allerton Conference on Communication, Control, and Computing, pages 573–582, 2001. [4] Eleni Drinea and Michael Mitzenmacher. On lower bounds for the capacity of deletion channels. IEEE Transactions on Information Theory, 52(10):4648–4657, 2006. [5] Eleni Drinea and Michael Mitzenmacher. Improved lower bounds for the capacity of i.i.d. deletion and duplication channels. IEEE Trans. Information Theory, 53(8):2693–2714, 2007. 11 [6] Dario Fertonani, Tolga M. Duman, and M. Fatih Erden. Bounds on the capacity of channels with insertions, deletions and substitutions. IEEE Trans. Communications, 59(1):2–6, 2011. URL: http://dx.doi.org/10.1109/TCOMM.2010.110310.090039, doi:10.1109/TCOMM.2010.110310.090039. [7] Venkatesan Guruswami and Ray Li. Efficiently decodable insertion/deletion codes for high-noise and high-rate regimes. In IEEE International Symposium on Information Theory, ISIT 2016, Barcelona, Spain, July 10-15, 2016, pages 620–624, 2016. URL: http://dx.doi.org/10.1109/ISIT.2016.7541373, doi:10.1109/ISIT.2016.7541373. [8] Venkatesan Guruswami and Ray Li. Coding against deletions in oblivious and online models. abs/1612.06335, 2017. Manuscript. URL: http://arxiv.org/abs/1612.06335. [9] Venkatesan Guruswami and Carol Wang. Deletion codes in the high-noise and highrate regimes. IEEE Trans. Information Theory, 63(4):1961–1970, 2017. URL: http://dx.doi.org/10.1109/TIT.2017.2659765, doi:10.1109/TIT.2017.2659765. [10] Bernhard Haeupler and Amirbehshad Shahrasbi. Synchronization strings: codes for insertions and deletions approaching the singleton bound. In Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2017, Montreal, QC, Canada, June 19-23, 2017, pages 33–46, 2017. [11] Adam Kalai, Michael Mitzenmacher, and Madhu Sudan. Tight asymptotic bounds for the deletion channel with small deletion probabilities. In IEEE International Symposium on Information Theory, ISIT 2010, June 13-18, 2010, Austin, Texas, USA, Proceedings, pages 997–1001, 2010. URL: http://dx.doi.org/10.1109/ISIT.2010.5513746, doi:10.1109/ISIT.2010.5513746. [12] Yashodhan Kanoria and Andrea Montanari. Optimal coding for the binary deletion channel with small deletion probability. IEEE Trans. Information Theory, 59(10):6192–6219, 2013. URL: http://dx.doi.org/10.1109/TIT.2013.2262020, doi:10.1109/TIT.2013.2262020. [13] Ian Kash, Michael Mitzenmacher, Justin Thaler, and John Ullman. On the zero-error capacity threshold for deletion channels. In Information Theory and Applications Workshop (ITA), pages 1–5, January 2011. [14] Adam Kirsch and Eleni Drinea. Directly lower bounding the information capacity for channels with i.i.d.deletions and duplications. IEEE Trans. Information Theory, 56(1):86–102, 2010. URL: http://dx.doi.org/10.1109/TIT.2009.2034883, doi:10.1109/TIT.2009.2034883. [15] Vladimir I. Levenshtein. Binary codes capable of correcting deletions, insertions, and reversals. Dokl. Akad. Nauk, 163(4):845–848, 1965 (Russian). English translation in Soviet Physics Doklady, 10(8):707-710, 1966. [16] Hugues Mercier, Vahid Tarokh, and Fabrice Labeau. Bounds on the capacity of discrete memoryless channels corrupted by synchronization and substitution errors. IEEE Trans. Information Theory, 58(7):4306–4330, 2012. URL: http://dx.doi.org/10.1109/TIT.2012.2191682, doi:10.1109/TIT.2012.2191682. [17] Michael Mitzenmacher. A survey of results for deletion channels and related synchronization channels. Probability Surveys, 6:1–33, 2009. [18] Mojtaba Rahmati and Tolga M. Duman. Upper bounds on the capacity of deletion channels using channel fragmentation. IEEE Trans. Information Theory, 61(1):146–156, 2015. URL: http://dx.doi.org/10.1109/TIT.2014.2368553, doi:10.1109/TIT.2014.2368553. 12 [19] Ramji Venkataramanan, Sekhar Tatikonda, and Kannan Ramchandran. Achievable rates for channels with deletions and insertions. IEEE Trans. Information Theory, 59(11):6990–7013, 2013. URL: http://dx.doi.org/10.1109/TIT.2013.2278181, doi:10.1109/TIT.2013.2278181. [20] S. M. Sadegh Tabatabaei Yazdi and Lara Dolecek. A deterministic polynomial-time protocol for synchronizing from deletions. IEEE Trans. Information Theory, 60(1):397–409, 2014. URL: http://dx.doi.org/10.1109/TIT.2013.2279674, doi:10.1109/TIT.2013.2279674. A Proof of Lemma 2.2 Proof. For each i, we can find a random variable Bi such that Bi ≥ Ai always, Bi takes values in [0, β], and E[Bi ] = α. Applying Lemma 2.1 gives # # " n " n Õ Õ Bi ≥ nγ Ai ≥ nγ ≤ Pr Pr i=1 " i=1 n Õ   γ − α  nα Bi ≤ Pr ≥ 1+ β α β i=1 γ −α  2 nα · β ª α © ≤ exp ­− ® 3 «  ¬ 2 (γ − α) n . = exp − 3α β # (10)  13
8cs.DS
On some further properties and application of Weibull-R family of distributions arXiv:1711.00171v1 [math.ST] 1 Nov 2017 1 Indranil Ghosh1 , Saralees Nadarajah2 University of North Carolina, Wilmington, USA 2 University of Manchester, UK Abstract In this paper, we provide some new results for the Weibull-R family of distributions (Alzaghal, Ghosh and Alzaatreh (2016)). We derive some new structural properties of the Weibull-R family of distributions. We provide various characterizations of the family via conditional moments, some functions of order statistics and via record values. Keywords : Record values, Reliability parameter, Weibull-R family 1 Introduction Various well known univariate distributions have been extensively used over the past few decades for modeling data arising from different spheres such as engineering, actuarial, environmental and medical sciences, biological studies, demography, economics, finance and insurance. However, in many of these applied areas in particular lifetime analysis, finance and insurance, there is a growing demand for extended forms of these distributions. As a consequence, several methods for generating new families of distributions have been studied in the literature. The Weibull distribution is a well-known distribution due to its extensive use to model various types of data. This distribution has been widely used in survival and reliability analyses. This distribution has quite a bit of flexibility for analyzing skewed data. It allows for increasing and decreasing hazard rate functions (hrfs), depending on the shape parameters, which gives an extra edge over the exponential distribution that has only constant hrf. Since the 1970s, many extensions of the Weibull distribution have been proposed to enhance its capability to fit diverse lifetime data and Murthy et al. (2004) proposed a scheme to classify these distributions. Unfortunately Weibull distribution has certain drawbacks. Bain (1978) pointed out that the maximum likelihood estimators of the Weibull parameters may not behave properly for all parameters even when the location parameter is zero. When the shape parameter is greater than one, the hrf of the Weibull distribution increases from zero to infinity, which may not be appropriate in some scenarios. Also, the Weibull family does not enjoy the likelihood ratio ordering, as a consequence, there does not exist a uniformly most powerful test for testing one-sided hypotheses on the shape parameter. The sum of independently and identically distributed Weibull random variables is not difficult to obtain, one may use the convolution and/or characteristic approach to find the distribution of the sum which will involve some special functions. Mudholkar et al. (1995) proposed a three parameter (one scale and two shape) distribution, the exponentiated Weibull (see also Mudholkar and Srivastava (1993)) distribution. They indicated, based on certain data sets, the exponentiated Weibull distribution provides better fits than the two parameter Weibull distribution. Gupta 1 and Kundu (1997) considered a special case of the exponentiated Weibull distribution assuming location parameter to be zero. They compared its performance with the two parameter gamma family of distributions and the two parameter Weibull family, through data analysis and computer simulations. In quest for a greater applicability of the Weibull distribution many researchers have considered various types of generalizations. These generalizations include broad family of univariate distributions generated from the Weibull distribution introduced by Gurvich et al. (1997), the generalized Weibull distribution due to Mudholkar and Kollia (1994), and the beta-Weibull distribution due to Lee et al. (2007). The log-Weibull distribution has been studied in detail by many authors. For example, White (1969) studied the moments of log-Weibull order statistics, while Huillet and Raynaud (1999) studied their application in earthquake magnitude data. Ortega et al. (2013) discussed usefulness of the log-Weibull regression model to predict recurrence of prostate cancer. Generalized Weibull distributions can be constructed in many ways, as detailed in Lai et al. (2011) and references therein. Members of this family usually contain the standard Weibull distribution as a special case. Nadarajah and Kotz (2005) defined a class of extended Weibull (EW) distributions with cumulative distribution function (cdf) given by Gα,τ (t) = 1 − exp {−αH(t)}, where α > 0 and H(t) is a monotonically increasing function of t with the only limitation H(t) ≥ 0 and τ represents a vector of unknown parameters in H(t). If H(t) is a power law function, the above equation reduces to the traditional Weibull distribution. In this paper, we consider a new generalization of any absolutely continuous (R) distribution, using Weibull as a baseline distribution, called the Weibull-R family of distributions, following the technique of Alzaatreh et al. (2013b). It is to be noted here that parallel development for any discrete distribution with the baseline distribution as Weibull can also be developed. It is defined as follows: Let T ∈ (a, b), R and Y ∈ (c, d) be random variables with cdfs FT (x) = P (T ≤ x), FR (x) = P (R ≤ x) and FY (x) = P (Y ≤ x) for −∞ ≤ a < b ≤ ∞ and −∞ ≤ c < d ≤ ∞. Here, R can be a continuous or a discrete random variable. Let QT (p), QR (p) and QY (p) denote the corresponding quantile functions, where the quantile function of a random variable Z is defined as QZ (p) = inf {z : FZ (z) ≥ p}, 0 < p < 1. If the probability density functions (pdfs) of T , R and Y exist, we denote them by fT (x), fR (x) and fY (x), respectively. We define a random variable X as having the cdf Z QY (FR (x)) FX (x) = fT (t)dt = FT (QY (FR (x))) (1) a for −∞ < x < ∞. Alzaatreh et al. (2013b) referred to the distributions in (1) as the T -RY family of distributions. The pdf and hazard rate funtion (hrf) of X can be derived as fX (x) = fR (x) · fT (QY (FR (x))) fY (QY (FR (x))) hX (x) = hR (x) · hT (QY (FR (x))) . hY (QY (FR (x))) and We can rewrite (1) and (2) as FX (x) = FT (− log (1 − FR (x))) = FT (HR (x)) 2 (2) and fX (x) = fR (x) fT (− log (1 − FR (x))) = hR (x)fT (HR (x)) , 1 − FR (x) (3) where hR (x) and HR (x) = − log (1 − FR (x)), where,hR (x) is the hazard rate function for the random variable R, and HR (x) being the survival function of R. The cdf of a random variable X can take this form only if a random varibale Y is unit exponentially distributed, i.e., Y ∼ Exp(1). If T is a Weibull random variable with parameters c and γ, (3) is the pdf of the Weibull-R distribution:      c fR (x) − log (1 − FR (x)) c−1 − log (1 − FR (x)) c fX (x) = exp − (4) γ 1 − FR (x) γ γ for c > 0 and γ > 0. The cdf corresponding to (4) is    − log (1 − FR (x)) c FX (x) = 1 − exp − . γ (5) Note that if R is a Weibull random variable then (4) is the pdf of a generalized gamma distribution. Hence, the Weibull-R family is a broad class of distributions as compared to gammageneralized distributions. For details on the construction see Alzaatreh & Ghosh (2015). A particular case of the Weibull-R family that we shall study in some detail later is the WeibullLomax distribution (WLD), see Sections 3, 5 and 6. Possible shapes of the pdf and the hrf of X for the WLD are shown in Figures 1 and 2. Figure 1 shows that the pdf can be monotonically decreasing or unimodal. Both the left and right tails of the pdf decay to zero slowly, i.e., both tails are heavy. Processes commonly encountered in practice have heavy tails. So, the tails of the WLD are realistic. The right tail of the Weibull distribution decays to zero exponentially, which is not so realistic. Figure 2 shows that the hrf can be monotonically decreasing, monotonically increasing or upside down bathtub shaped. The Weibull distribution cannot exhibit upside down bathtub shaped hrfs. Reliability and survival analysis often encounter upside down bathtub hazard rates. Examples can be found in redundancy allocations in systems (Singh and Misra, 1994) and mortality modeling (Silva et al., 2010). The contents of this paper are organized as follows. Mathematical properties of the Weibull-R distribution (including characterizations, quantiles, shape properties, entropy measures, moments and reliability parameter) are derived in Sections 2 and 4. Some particular cases of the Weibull-R distribution are studied in Section 3. Finally, Section 5 concludes the paper. 2 Characterizations of the Weibull-R family It is a natural requirement that in designing a stochastic model for a particular modeling problem, an investigator will be vitally interested to know if their model fits the requirements of a specific underlying probability distribution. To this end, the investigator will rely on characterizations of the selected distribution. Generally speaking, the problem of characterizing a distribution is an important problem in various fields and has recently attracted the attention of many researchers. Consequently, various characterizations have been reported in the literature. These characterizations have been established in many different directions. Here, we present characterizations of the 3 newly introduced Weibull-R family of distributions. These characterizations are based on record values. We would like to remark here that other possible ways of characterization of this Weibull-R family might be possible, but, in this present article, we report the most interesting one. 2.1 Characterizations of the Weibull-R family via records Here, we present characterizations of the newly introduced Weibull-R family of distributions via record values. Let XU (m) and XU (n) for m < n denote the upper record values from a given family specified by pdf fX and cdf FX . The joint pdf of XU (m) and XU (n) is (Ahsanullah, 1995) [log (1 − FX (x)) − log (1 − FX (y))]n−m−1 fX (x)fX (y) [− log (1 − FX (x))]m−1 , (6) Γ(m)Γ(n − m) 1 − FX (x) fXU (m) ,XU (n) (x, y) = where −∞ < x < y < ∞ and 1 ≤ m < n. Theorem 1. If X ∼ Weibull-R(c, γ), then the pdf of XU (m) is   n−m−1 X fX (x) j n−m−1 Γ(m)Γ(n − m) (−1) γ −cj fXU (m) (x) = [1 − FX (x)] j j=0  c(n−2−j) − log (1 − FR (x)) · Γ (1 + jc, − log (1 − FR (x))) γ R∞ for −∞ < x < ∞, where Γ(a, x) = x ta−1 exp(−t)dt. (7) n h ic o R (x)) Proof. From (4), we have 1 − FX (x) = exp − − log(1−F . So, γ       n−m−1 1 − FX (x) n−m−1 − log (1 − FR (y)) c − log (1 − FR (x)) c . log = − 1 − FX (y) γ γ By (6), we can write fXU (m) ,XU (n) (x, y) =   1 fX (x)fX (y) − log (1 − FR (x)) c(m−1) Γ(m)Γ(n − m) 1 − FX (x) γ  c   n−m−1 − log (1 − FR (y)) − log (1 − FR (x)) c − · γ γ for −∞ < x < y < ∞. Therefore, the marginal pdf of XU (m) is fXU (m) (x) = =   fX (x) − log (1 − FR (x)) c(m−1) 1 Γ(m)Γ(n − m) 1 − FX (x) γ     n−m−1 Z ∞ − log (1 − FR (y)) c − log (1 − FR (x)) c · fX (y) − dy γ γ x   fX (x) − log (1 − FR (x)) c(m−1) 1 I1 , (8) Γ(m)Γ(n − m) 1 − FX (x) γ 4 where  n−m−1 − log (1 − FR (x)) c fX (y) − dy = γ x  c(n−m−1−j)   n−m−1 X n−m−1 j − log (1 − FR (x)) = (−1) γ j j=0   Z ∞ − log (1 − FR (y)) jc fX (y) · dy γ x c(n−m−1−j)    n−m−1 X n−m−1 j −cj − log (1 − FR (x)) = (−1) γ γ j Z I1 ∞  − log (1 − FR (y)) γ c  j=0 ·Γ (1 + cj, − log (1 − FR (x))) . (9) The result follows by substituting (9) in (8).  Theorem 1 can be useful for estimation based on record values. There are many situations in which only records are observed. Ultimate examples of such situations can be found from the website for Guinness World Records, see http: // www. guinnessworldrecords. com/ . Another example is the situation of testing the breaking strength of wooden beams as described in Glick (1978). 3 Some examples of the Weibull-R family k • For R a Pareto random variable with the pdf fR (x) = xkθ k > 0, we have the k+1 , x > θ, Weibull-Pareto distribution (WPD) with the pdf, cdf and the hrf given by  x ic−1 n h  x ic o βc h β log exp − β log , fX (x) = x θ θ n h  x ic o FX (x) = 1 − exp − β log θ and hX (x) =  x ic−1 βc h β log , x θ respectively, for x > θ, c > 0, θ > 0, and β = k/γ. This family has been studied by Alzaatreh et al. (2013a). −k−1 , k > 0 x > 0, we have • For R a Lomax random variable with the pdf fR (x) = kθ 1 + xθ the WLD with the pdf, cdf and the hrf given by  n h  βc h x ic−1 x ic o exp − β log 1 + fX (x) = β log 1 + , (10) x+θ θ θ n h  x ic o FX (x) = 1 − exp − β log 1 + θ 5 (11) and hX (x) =  x ic−1 βc h β log 1 + , x+θ θ respectively, for x > θ, c > 0, θ > 0 and β = k/γ. Possible shapes of fX (x) and hX (x) are shown in Figures 1 and 2. Note that the WLD is a shifted version of the WPD. When c = 1, the WLD reduces to the Lomax distribution with parameters β and θ. • For R a Cauchy random variable with the pdf fR (x) = h 1 2i , π 1+( xδ ) −∞ < x < ∞, we have the Weibull-Cauchy distribution with the pdf and cdf given by fX (x) = ( 2c h γ 1+  x 2 δ i x δ −  log π − 2 arctan ( " log 12 − π1 arctan · exp − − γ x δ 1 2 − 1 π arctan γ x δ  )c−1  #c ) and ( " FX (x) = 1 − exp − − log 1 2 − 1 π arctan γ x δ  #c ) , respectively, for −∞ < x < ∞, δ > 0, γ > 0 and c > 0. h 2 i 1 exp − 21 x−µ • For R a normal random variable with the pdf fR (x) = √2πσ , −∞ < x < ∞, σ we have the Weibull-normal distribution with the pdf and cdf given by "   # 1 x−µ 2 c 1   √ exp − fX (x) = 2 σ γ 1 − Φ x−µ 2πσ σ ( " #c ) " #  x−µ  c−1 − log 1 − Φ x−µ − log 1 − Φ σ σ · exp − γ γ and ( " − log 1 − Φ FX (x) = 1 − exp − γ #) x−µ  c σ , respectively, for −∞ < x < ∞, −∞ < µ < ∞, σ > 0, γ > 0 and c > 0, where Φ(·) denotes the standard normal cdf. Pdf graphs will be here. The WLD, the Weibull-Cauchy distribution and the Weibull-normal distribution are new and do not appear to have been studied by others. The WLD is different from the Weibull-Lomax distribution studied by Tahir et al. (2015), compare (10) with equation (2.1) in Tahir et al. (2015). 6 4 Properties of the Weibull-R family The corresponding hrf and quantile function for any u ∈ (0, 1) are   − log (1 − FR (x)) c−1 c fR (x) hX (x) = γ 1 − FR (x) γ   ∂ − log (1 − FR (x)) c = ∂x γ and  n o Q(u) = FX−1 1 − exp −γ [− log(1 − u)]1/c . Since these are in closed form, the Weibull-R family can be applied to model censored data also. One can also obtain a closed form expression for the cumulative hrf. 4.1 Shape Lemma 1 below gives the limiting behaviors of the Weibull-R pdf and its hrf. Its proof is obvious. Lemma 1. We have fX (x) ∼   c fR (x)FRc−1 (x) exp −γ −c FRc (x) c γ and hX (x) ∼ c fR (x)FRc−1 (x) γc as x → −∞. Lemma 2. The mode of the pdf of the Weibull-R family is the root of c−1 fR0 (x) fR (x) (c − 1)fR (x) fR (x) −c {− log [1 − FR (x)]} + − − cγ = 0, fR (x) 1 − FR (x) [1 − FR (x)] log [1 − FR (x)] 1 − FR (x) where fR0 (x) = dfR (x)/dx. The proof of Lemma 2 is straightforward. Analytical solutions to the mode do not appear possible, even for the four examples presented in Section 3. The mode should be computed numerically, for example, using uniroot in the R software. 4.2 Entropy measures Entropies of a random variable X are measures of variation of uncertainty. Entropies have been used in several applications in science, engineering and economics. The Shannon entropy (Shannon, 1951) of a random variable X say with pdf fX is defined by E [− log fX (X)]. Lemma 3. If X is a Weibull-R random variable then its Shannon entropy is     log ([− log (1 − FR (X))]) fR (X) − E log ηX = − log c + log γ − (c − 1)E γ 1 − FR (X)  c  − log (1 − FR (X)) +E . γ 7 Lemma 3 follows immediately from (4). The problem of testing whether some given observations can be considered as coming from one of two probability distributions is an old problem in statistics. Consider a random sample X1 , X2 , . . . , Xn of size n from a Weibull-R family. The objective is to identify a specific Weibull-R distribution in (4) that is most appropriate to describe the data X1 , X2 , . . . , Xn . Between two candidates say Weibull-R1 and Weibull-R2 distributions, with respective pdfs fR1 , fR2 and respective cdfs FR1 , FR2 , we decide in favor of one of them on the basis of the difference D1,2 = ηWeibull−R1 −ηWeibull−R2 , where ηWeibull−R1 and ηWeibull−R2 are the entropies respectively of Weibull − R1 and Weibull − R2 random variable. We see that     log (1 − FR2 (X)) fR2 (X) 1 − FR1 (X) D1,2 = (c − 1)E log + E log log (1 − FR1 (X)) 1 − FR2 (X) fR1 (X)  c    − log (1 − FR1 (X)) − log (1 − FR2 (X)) c +E −E . γ γ Large (respectively, small) values of D1,2 will support the Weibull-R1 (respectively, Weibull-R2 ) distribution. Proposition 4. For fixed c > 1, γ > 0 and Weibull-R1 stochastically larger than Weibull-R2 , D1,2 will support Weibull-R2 . Proof. Since Weibull-R1 is stochastically larger than Weibull-R2 , we can write 1 − FR1 ≥ 1 − FR2 . This implies the following c  c  − log(1−FR2 (X)) − log(1−FR1 (X)) ≤ , • γ γ • log h 1−FR2 (X) 1−FR1 (X) i ≤ 0. So, D1,2 will be small which implies the result.  4.3 Moments For any r ∈ N, we can express the rth moment of X as      c r fR (x) − log (1 − FR (x)) c−1 − log (1 − FR (x)) c E (X ) = x exp − dx 1 − FR (x) γ γ −∞ γ Z ∞ h   ir = e−u FR−1 1 − exp −γu1/c du, Z r ∞ 0 ic R (x)) where u = − log(1−F . γ Analytical expressions for the moments do not appear possible, even for the four examples presented in Section 3. The moments should be computed numerically, for example, using integrate in the R software. h 8 4.4 Reliability parameter The reliability parameter R is defined as R = P (X > Y ), where X and Y are independent random variables. Estimation of R is known as stress strength modeling. It has applications in many areas including break down of systems having two components. Other applications can be found in Weerahandi and Johnson (1992). If X and Y are independent random variables with respective cdfs F1 (x), F2 (y) and respective pdfs f1 (x), f2 (y) then R can be written as Z ∞ R = P (X > Y ) = F2 (t)f1 (t)dt. −∞ Theorem 2. Suppose X and Y are independent Weibull-R (c1 , γ) and Weibull-R (c2 , γ) random variables. Then R=1− ∞ X (−1)k k=0 k! Γ (kc2 /c1 + 1) . Proof: By (4) and (5),     Z ∞ − log (1 − FR (x)) c2 R = 1 − exp − γ −∞       − log (1 − FR (x)) c1 −1 − log (1 − FR (x)) c1 c1 fR (x) exp − dx · γ 1 − FR (x) γ γ Z ∞   = 1− exp(−u) exp −uc2 /c1 du 0 = 1− ∞ X (−1)k k=0 where u = 5 h k! − log(1−FR (x)) γ ic1 Γ (kc2 /c1 + 1) , . Hence, the proof.  Conclusions In this paper, we have introduced the Weibull-R family with a hope that it will have more flexibility in situations where Weibull and other Weibull mixture distributions do not provide satisfactory fits. For each baseline distribution of R, our results can be easily adapted to obtain main structural properties of the Weibull-R distribution. We have derived various properties of the Weibull-R distributions, including the reliability parameter and the rth generalized moment. The proposed family unifies several previously proposed families of distributions, therefore yielding a general overview of these families for theoretical studies. It also provides a rather flexible mechanism for fitting a wide spectrum of real world data sets. For example, a Weibull-R mixture distribution may be useful in the following scenarios: • To characterize end-to-end Internet delay at coarse time-scales (Hernandez et al. (2006)). 9 • It provides a suitable distributions for modeling dependent lifetimes from heterogenous populations, as mixtures of defective devices with shorter lifetimes and standard devices with longer lifetimes. • When R the baseline distribution is Gompertz, a mixture of Weibull-Gompertz (in particular, the survival function) distribution will represent a theoretically motivated model for the scenario in which death or cases of a specific disease in an actual population can be due to sufficient causes from group 1 or group 2. For details, see Levy et al. (2014). We hope that this family may attract wider applications in reliability and biology. 10 References [1] Ahsanullah, M. (1995). Record Statistics. Nova Science Publishers, Commack, New York. [2] Alzaghal, A., Ghosh, I., and Alzaatreh, A. (2016). On Shifted Weibull-Pareto Distribution. International Journal of Statistics and Probability, 5, 139-149. [3] Alzaatreh, A., and Ghosh, I. (2015). On the Weibull-X family of distributions. Journal of Statistical Theory and Applications, 14, 169-183. [4] Alzaatreh, A., Famoye, F. and Lee, C. (2013a). Weibull-Pareto distribution and its applications. Communications in Statistics - Theory and Methods, 42, 1673-1691. [5] Alzaatreh, A., Lee, C. and Famoye, F. (2013b). A new method for generating families of continuous distribution. Metron, 71, 63-79. [6] Bain, L.J. (1978). Statistical Analysis of Reliability and Life Testing Models. Marcel Dekker, Inc, New York. [7] Glick, N. (1978). Breaking record and breaking boards. American Mathematical Monthly, 85, 2-26. [8] Gupta, R.D. and Kundu, D. (1997). Exponentiated exponential family: An alternative to gamma and Weibull distribution. Technical Report, Department of Mathematics, Statistics and Computer Science, University of New Brunswick, Saint-John, NB, Canada. [9] Gurvich, M.R., Dibenedetto, A.T. and Rande, S.V. (1997). A new statistical distribution for characterizing the random strength of brittle materials. Journal of Materials Science, 32, 2559-2564. [10] Hernandez, J.A. and Phillips, I.W. (2006). Weibull mixture model to characterise end-to-end Internet delay at coarse time-scales. IEE Proceedings - Communications, 153, 295-304. [11] Huillet, T. and Raynaud, H.F. (1999). Rare events in a log-Weibull scenario: Application to earthquake magnitude data. European Physics Journal B, 12, 457-469. [12] Lai, C.D., Murthy, D.N.P. and Xie, M. (2011). Weibull distributions. Wiley Interdisciplinary Reviews, 3, 282-287. [13] Lee, C., Famoye, F., and Olumolade, O. (2007). Beta-Weibull distribution: Some properties and applications to censored data. Journal of Modern Applied Statistical Methods, 6, 173-186. [14] Levy, G. and Levin, B. (2014). The Biostatistics of aging. From Gompertzian Mortality to an Index of Aging-Relatedness. John Wiley, NY. [15] Mudholkar, G.S. and Kollia, G.D. (1994). Generalized Weibull family: A structural analysis. Communications in Statistics - Theory and Methods, 23, 1149-1171. [16] Mudholkar, G.S. and Srivastava, D.K. (1993). Exponentiated Weibull family for analyzing bathtub failure-rate data. IEEE Transactions on Reliability, 42, 299-302. 11 [17] Mudholkar, G.S., Srivastava, D.K. and Friemer, M. (1995). The exponentiated Weibull family: A reanalysis of the bus-motor-failure data. Technometrics, 37, 436-445. [18] Murthy, D.N.P., Xie, M. and Jiang, R. (2004). Weibull Models. John Wiley and Sons, New York. [19] Nadarajah, S. and Kotz, S. (2005). On some recent modifications of Weibull distribution. IEEE Transactions on Reliability, 54, 561-562. [20] Ortega, E.M.M., Cordeiro, G.M. and Kattan, M.W. (2013). The log-beta Weibull regression model with application to predict recurrence of prostate cancer. Statistical Papers, 54, 113-132. [21] Shannon, C.E. (1951). Prediction and entropy of printed English. The Bell System Technical Journal, 30, 50-64. [22] Silva, R.B., Barreto-Souza, W. and Cordeiro, G.M. (2010). A new distribution with decreasing, increasing and upside-down bathtub failure rate. Computational Statistics and Data Analysis, 54, 935-944. [23] Singh, H. and Misra, N. (1994). On redundancy allocations in systems. Journal of Applied Probability, 31, 1004-1014. [24] Tahir, M.H., Cordeiro, G.M., Mansoor, M. and Zubair, M. (2015). The Weibull-Lomax distribution: Properties and applications. Hacettepe Journal of Mathematics and Statistics, to appear. [25] Weerahandi, S. and Johnson, R.A. (1992). Testing reliability in a stress-strength model when X and Y are normally distributed. Technometrics, 38, 83-91. [26] White, J.S. (1969). The moments of log-Weibull order statistics. Technometrics, 11, 373-386. 12
10math.ST
A Foundry of Human Activities and Infrastructures Robert B. Allen, Eunsang Yang, and Tatsawan Timakum Yonsei University, Seoul, South Korea [email protected], [email protected], [email protected] Abstract. Direct representation knowledgebases can enhance and even provide an alternative to document-centered digital libraries. Here we consider realist semantic modeling of everyday activities and infrastructures in such knowledgebases. Because we want to integrate a wide variety of topics, a collection of ontologies (a foundry) and a range of other knowledge resources are needed. We first consider modeling the routine procedures that support human activities and technologies. Next, we examine the interactions of technologies with aspects of social organization. Then, we consider approaches and issues for developing and validating explanations of the relationships among various entities. Keywords: Community M odels, Digital Humanities, Direct Representation, Faceted Ontologies, Histories, Social Science, Tangible and Intangible Culture Heritage 1 Infrastructures, Human Activities, Community Models, and Cultures In [1] and related studies we explored indexing digitized historical newspapers. It was difficult to index the articles for retrieval or, even, to unambiguously identify what text should be treated as an article. Thus, we proposed the development of knowledge-rich “community models” to improve retrieval. Many aspects of infrastructure associated with everyday activities and infrastructure generally can be described with such community models. Such models would cover both tangible and intangible cultural heritage such as pottery, clothing, dance, and religious traditions. This work is parallel to a proposal we have made for direct representation of scientific research results [4]. However, there are additional challenges for descriptions of culture and history because of the lack of consensus about the definitions for social entities and because there are disagreements about the details of cultures and histories. Nonetheless, as information scientists, we believe that it is useful to develop frameworks for articulating and exploring the possibilities. Ultimately such frameworks should support tools both for the public and for scholars. 2 Ontologies and Models 2.1 Upper Ontologies and the Model Layer The knowledge representation system for direct representation must go beyond simple linked data to incorporate structured knowledge from many domains. To provide a framework we use an upper or formal ontology, specifically, the Basic Formal Ontology (BFO) [7]. BFO is widely applied for biomedical ontologies. It is a carefully designed, realist ontology which follows Aristotle in distinguishing between Universals and Particulars. BFO also distinguishes between Continuants (those Entities which are constant across time) and Occurrents (those Entities which change across time). We have proposed extending BFO with a Model Layer [5] that gives it aspects of object-oriented modeling. 1 The Model Layer considers Thick Entities, which are Independent Continuants, together with their associated Dependent Continuants, Parts, and Processes 2 . Such Thick Entities should allow for States and State Changes. Such States and State Changes would not be first-class ontology entities; rather, they can be defined as derived entities [5]. If they were formalized to include State Changes, Processes could be considered as analogous to “abstract methods” in object-oriented programming. The Model Layer would also include Mechanisms and Procedures 3 . The Model Layer should be able to show how Thick Entities interact with other Thick Entities much as the objects in an object-oriented program interact when the program is executed. 2.2 Foundries as Knowledgebases and Extended Foundries The Open Biomedical Ontology (OBO) Foundry [22] is a large curated collection of domain ontologies and partonomies based on the BFO. 4 We propose the development 1 In some cases, “object-oriented” simply means entity or object-based. We use “object-oriented” in the stronger, programming-language sense of objects that include specific processes and procedures. 2 The descriptions of Thick Entities we envision are analogous to the descriptions of M odel or Reference Organisms. The latter often includes anatomies (i.e., partonomies) and, less often, descriptions of related Procedures and M echanisms. 3 A M echanism describes how a Process is implemented. A Procedure is like a workflow with flow control and decision points. There is no direct way for BFO to represent control statements such as loops and conditionals needed for Procedures, although it is possible to represent control statements with OWL on an ad hoc basis and to use those representations in combination with BFO. A pure BFO modeling language should be developed that, like the C programming language, is self-compiling. The distinction in some object-oriented languages between “private methods” and “public methods” can also be applied to Thick Entities. Private methods are those which interact internally only with other Parts of a given Thick Entity whereas Public M ethods support interaction with other Thick Entities. 4 obofoundry.org, obofoundry.org/docs/OperationsCommittee.html 3 of a similar foundry to cover human activities and infrastructures. Because “direct representation” follows BFO as a realist approach, our focus is first on describing infrastructure objects, their use and their interaction with other objects. The role of entities in collections and records are important but secondary [6]. 3 Material Technologies and Infrastructure The contents of historical newspapers and other historical records for small towns often describe entities and activities which are routine, even mundane. A partial list of such entities and activities includes roads, farming, fishing, blacksmithing, weaving, coin minting, pottery making, and bookbinding. Each of these is associated with specific types of objects and procedures. There are many levels for representing and modeling everyday human activities. At a general level, we might describe infrastructures and technologies for supporting basic human needs such as food and shelter. Such models could be increasingly refined as they are applied to specific scenarios. While Aristotle focused on Universals as natural entities, BFO has included human artifacts related to scientific research such as flasks. We further extend the scope of Universals to include all types of human artifacts. As noted above, we also propose using model-oriented Thick Entities for these descriptions. Thick Entities would include Processes and Procedures. There is a complex web of interactions in Processes and Procedures. For instance, farming procedures are affected by the availability of different metals for plows. Similarly, the introduction of a train line may dramatically affect a community (cf., [1]). The development of a large and internally consistent collection of infrastructure entities will require a major effort that is in its early stages. Ontologies and other controlled vocabularies have been developed for many entities and functions; for instance, FGDC (fgdc.gov) provides descriptions for highways. Similarly, standard descriptions for Mechanisms and Procedures such as from the Handbook of Synthetic Organic Chemistry could also be included. Some aspects of Human Activities and Infrastructures (such as farming or silkworm cultivation) could be linked in the OBO. Ultimately the foundries should be unified. 4 Structures and Activities within a Given Social Framework While the previous section focused on material technologies and infrastructures, ultimately, it will not be possible to separate the technologies and infrastructures from their interaction with social activities. Social structures may be considered as entities in a social ontology. 5 5 Smith (Social Objects, http://ontology.buffalo.edu/socobj.htm) claims that social entities are entirely consistent with the BFO framework. There has been significant work on social ontology by some of the designers of the BFO framework but there does not yet seem to have been a concerted effort to directly integrate that work into the BFO. M uch of the discussion about social There are many examples of the interaction of material infrastructure with social entities. For example, textiles play an important role in traditional Thai society [8]; the fabrics are integral to courtship, marriage, death, and a variety of Buddhist rituals. A structured description of the materials and technologies would include aspects of fabrics and weaving tools and techniques as well as their role in society. In addition to tangible cultural heritage such as Thai silks, some cultural heritage like dance and music can be both tangible and intangible. On one hand, musical instruments are Continuants but musical performances are Occurrents. Moreover, music also has a social dimension. For example, descriptions of Korean music (gugak) need to include social distinctions between different genres (e.g., folk music vs. court music) [16]. In many contexts, the models of the social framework would generally be from the perspective of the participants. For historical local newspapers [1], we would generally follow the presentation of the newspaper editors in developing models of schools, businesses, government, churches, and families. Of course, there are frequently alternative interpretations beyond the normative descriptions. Therefore, flexible frameworks would need to be developed to present and contrast differing viewpoints. 5 Explanations and Social Science We have described how material infrastructures are interrelated and dependent on each other. Beyond those simple descriptions, we can explore claims about the relationships among components of the material and social infrastructures at the level of both Universals and Particulars. However, in many cases, the relationships are complex and not susceptible to proof. For instance, culture can be described as a web of relationships [11]. We need to develop a flexible framework for making claims and demonstrations about possible relationships and mechanisms (cf., [9, 10]) as well as showing the arguments and evidence for those claims. To understand the relationships among Universal Entities in the physical world, we turned to natural science [4]. For social entities, we could turn to social science. This is reasonable since we accept the position that social entities are “real”. Moreover, to the extent that social science makes causal predictions, we can use those predictions to confirm the validity of Entities. For physical phenomena, this type of confirmation of Entities is known as scientific warrant. Because there is more uncertainty about social science models, we may express our lower level of confidence for social entities by referring instead to consistency warrant. In sociology, there are several grand theories, or major theoretical frameworks. Social ontology is a central aspect of each of these theories because they propose theoretical constructs and relationships among the constructs. Here, we focus on Parsons’s AGIL [17] which asserts that there are four essential attributes a society must have to endure: ontologies for BFO has focused on commitments and obligations [21]. Other specific proposals have focused on contracts, economics, and social aspects of medicine [14]. 5 • Adapti ve: This describes the need to adjust to the environment. Both shelter and farming would be considered as part of the Adaptive dimension. It covers many of the human needs identified by [16]. • Goal Oriented: This requires specification and accomplishment of social goals, and would include regulations, laws, and politics. • Integration: This describes cohesion of the social group such as through family, religion, and language. • Latency: A social group must renew its customs, knowledge, and values for the next generation through education. Parsons’s work is an application of Systems Theory to sociology (cf., [5]) and is often described as structure-functionalist 6 . Following our analysis of functionality, we propose that the Function of an Independent Continuant produces (or prevents) a State Change in a specific Independent Continuant-Process pair [5]. 7 Thus, we might say: • The Function of a ladle is to carry liquids. • The Functions of Court music are to entertain and to impress guests. (Integration) • The Function of certain types of physical structures (e.g. a house) is to shelter the inhabitants. (Adaptive) • The Function of the education subsystem is to transmit knowledge. (Latency) This description of Parsons’s work just scratches the surface; for instance, he has an extensive discussion of the function of the family. It may be possible to develop a structured version of his entire framework. However, we should also note that among sociologists, there is disagreement about the value of the AGIL system. Our emphasis on realism for social entities is also relevant to anthropology. We might first focus on the social science perspective to anthropology rather than the humanities perspective [18] (cf., [20]). Thus, we might emphasize archaeology and physical anthropology. Nonetheless, many entities and social activities such as rituals and icons that are the subject of anthropology clearly have deep symbolic, aesthetic, and emotional significance which we would need to account for. 6 Models of Particulars One of the main goals of our direct representation approach is to provide highlystructured descriptions of specific cultures and histories. BFO defines Histories as a type of Occurrent [9]. Histories are said to be all the Processes associated with a given 6 A full Functionalist model could have a web of Functions that address Needs. M echanisms which satisfy Needs may themselves generate new Needs. BFO seems to lean toward a Structuralist view but its inclusion of Procedures with an object-oriented flavor suggests it could become more Functionalist. 7 For an internally consistent ontology/model, all terms in the definitions should also be included in the ontology. Continuant. This is an elegant definition but it tells us little about the relationships among those Processes. Much of the discussion about the nature of historical explanations revolves around the notion from Hempel of a “covering law” which requires that any change should be justified (i.e., covered) by a law or reason for its occurrence. The expectation that there should be broad covering laws to account for events in history and culture has been widely criticized. Instead, Roberts [19] proposes that most major historical events (e.g., revolutions) do not have a single over-arching covering theory but are composed of smaller events each of which can be accounted for with covering theories. [12] makes a similar point, that claims about causal relationships among social phenomena need to be supported by models of mechanisms for how the entities interact. 8 Because social situations are complex and because Thick Entities are generally composed of many parts it may be difficult to confirm causal processes. For instance, while it is easy to believe that the prosperity in the Roman Empire during the reign of the Antonine Emperors was due to their good policies [13], we cannot make that case with scientific rigor. After documenting the evidence, we may apply the generalization only while retaining some caution about it. 7 Repositories and Knowledgebases Just as [4] proposed a variety of interrelated repositories for scientific research, similar interlocking repositories will be needed to complement the foundry of everyday activities and infrastructures. There would be several layers of knowledge resources: • Ontology and Model Foundry: The everyday Human Activities and Infrastructures Foundry would include not only ontologies but also models of Thick Entities. The complete Foundry will require details of many different types of Procedures. In addition to the ontologies, the Foundry might include Reference Models such as of Bronze Age communities or Midwestern U.S. towns. We may not have full confidence in some of the Universals because there are competing theoretical frameworks. Thus, we may allow alternative representations using several of those frameworks. Related to this, we may apply a weaker consistency warrant rather than scientific warrant as a criterion for inclusion. Ontologies based on the BFO can be considered a type of classification system; after all, each BFO ontology is a taxonomy. A collection of BFO ontologies (i.e., a Foundry) can be viewed as an entity-based faceted classification. 9 8 M uch of what is termed systems analysis appears focused more on process re-engineering than on systematic analysis of existing systems. Case studies can support what might properly be considered as systems analysis. Specifically, convergent case studies can be useful to evaluate possible causal mechanisms [12]. 9 The links of other entities (such as Locations, Dependent Continuants, and Processes) to the Object forms a sort of faceting. Indeed, it is easy to see the similarity to Raganathan’s PM EST and to FrameNet’s Frame Elements [2]. However, such entity-based faceting should be distinguished from other faceted classification systems which are subject based. 7 • Models of Particulars: See Section 6 above. • Primary Source Materials: [3] called for cleaned and consistent repositories of historical source material. Moreover, these materials should have standard markup. In addition, databases of locations, climate, records, economic data, census reports, sports scores can also be coordinated with the Foundry ontologies and models. • Evidence, and Argumentation: The evaluation of internal and external validity was a major factor in our discussion of scientific research reports [4]. We should have a similar focus here. For instance, [12] describes issues for the use of case studies in social science; we could develop an argumentation schema to organize and save evaluations of the validity of case studies. • Annotations, Secondary Materials, and Indexes: Given that the foundry should be coordinated with other relevant repositories, we should allow annotations and include secondary materials. Potentially, structured direct representation would support many services such as supporting text and narrative generation for discourse functions such as explanation and argumentation. 8 Discussion We have examined issues for collecting and coordinating applied ontologies and models for Everyday Human Activities and Infrastructures. These ontologies and models build on the rigorous semantics of the BFO and extend the constraints of BFO to everyday infrastructures and then to social and cultural descriptions. To do that, we relax some of the constraints but we expect that these will be flagged appropriately. This effort is as much about developing a useful information resource as about maintaining the purity of the ontological framework. References 1. Allen, R.B.: Toward an Interactive Directory for Norfolk, Nebraska: 1899-1900, IFLA Newspaper and Genealogy Section M eeting, Singapore, 2013. arXiv: 1308.5395. 2. Frame-based M odels of Communities and their History. Histoinformatics, LNCS 8359, 2014, 110-119, doi: 10.1007/978-3-642-55285-4_9 3. Allen, R.B.: Issues for Direct Representation of History, ICADL, 2016, 218-224, doi: 10.1007/978-3-319-49304-6_26 4. Allen, R.B.: Rich Semantic M odels and Knowledgebases for Highly-Structured Scientific Communication, 2017, arXiv: 1708.08423 5. Allen, R.B.: Rich Semantic M odeling, in preparation. 6. Allen, R.B., Song, H., Lee, B.E., Lee, J.Y.: Describing Scholarly Information Resources with a Unified Temporal M ap, ICADL 2106, 212-217, doi: 10.1007/978-3-319-49304-6_25 7. Arp, R., Smith, B., Spear, A.D.: Building Ontologies with Basic Formal Ontology, MIT Press, Cambridge M A, 2015, also see http://purl.obolibrary.org/obo/bfo/Reference 8. Conway, S.: Thai Textiles. British M useum Press, London, 1992. 9. Chu, Y.M ., Allen. R.B.: Formal Representation of Socio-Legal Roles and Functions for the Description of History, TPDL, 2016, 379-385, doi: 10.1007/978-3-319-43997-6_30 10. Diamond, J.: Guns, Germs, and Steel, Norton, New York, 1997. 11. Gasser, L.: Information and Collaboration from a Social/Organizational Perspective, S.Y. Nof (ed.), Information and Collaboration M odels of Integration, 237-261, Kluwer, 1994. 12. George, A.L., Bennett, A.: Case Studies and Theory Development in the Social Sciences, M IT Press, Cambridge M A, 2004. 13. Gibbon, E.: The History of the Decline and Fall of the Roman Empire (1845). /www. gutenberg.org/files/731/731-h/731-h.htm 14. Jansen, L.: Four Rules for Classifying Social Entities, In: Philosophy, Computing and Information Science, 2014, London: Pickering & Chatto, pp 189-200 15. Lee, B.W., Lee Y.S.: (eds): M usic of Korea, National Center for Korean Traditional Performing Arts, Seoul, 2007. 16. M aslow, A.H.: A Theory of Human M otivation. Psychological Review, 50, 370-396, 1943. 17. Parsons, T.: The Structure of Social Action, Free Press, Boston, 1968. 18. Peregrine, P., M oses, Y.T., Goodman, A., Lamphere, L., Peacock, J..L.: What Is Science in Anthropology? American Anthropologist, 114, 593–597, doi:10.1111/j.15481433.2012.01510.x 19. Roberts, C.: The Logic of Historical Explanation. Pennsylvania State University Press, State College PA, 1995. 20. Schilbrack. K.: A Realist Social Ontology of Religion, Journal of Religion, 27, 2017, 161178, doi: 10.1080/0048721X.2016.1203834 21. Smith, B.: Searle and De Soto: The New Ontology of the Social World. In The Mystery of Capital and the Construction of Social Reality, B.Smith, D. Mark, I. Ehrlich (eds), Open Court, 2015, http://ontology.buffalo.edu/document_ontology/Searle&deSoto.pdf 22. Smith, B., Ashburner, M ., Rosse, C., Bard, J., Bug, W., Ceusters, W., Goldberg, L.J., Eilbeck, K., Ireland, A., M ungall, C. J., Leontis, N., Rocca-Serra, P., Ruttenberg, A., Sansone, S.A., Scheuermann, R.H., Shah, N., Whetzel, P.L., Lewis, S.: The OBO Foundry: Coordinated Evolution of Ontologies to Support Biomedical Data Integration, Nature Biotechnology, 25, 1251–1255, 2007. doi: 10.1038/nbt1346
2cs.AI
Listen, Attend and Spell arXiv:1508.01211v2 [cs.CL] 20 Aug 2015 William Chan Carnegie Mellon University [email protected] Navdeep Jaitly, Quoc V. Le, Oriol Vinyals Google Brain {ndjaitly,qvl,vinyals}@google.com Abstract We present Listen, Attend and Spell (LAS), a neural network that learns to transcribe speech utterances to characters. Unlike traditional DNN-HMM models, this model learns all the components of a speech recognizer jointly. Our system has two components: a listener and a speller. The listener is a pyramidal recurrent network encoder that accepts filter bank spectra as inputs. The speller is an attentionbased recurrent network decoder that emits characters as outputs. The network produces character sequences without making any independence assumptions between the characters. This is the key improvement of LAS over previous end-toend CTC models. On a subset of the Google voice search task, LAS achieves a word error rate (WER) of 14.1% without a dictionary or a language model, and 10.3% with language model rescoring over the top 32 beams. By comparison, the state-of-the-art CLDNN-HMM model achieves a WER of 8.0%. 1 Introduction Deep Neural Networks (DNNs) have led to improvements in various components of speech recognizers. They are commonly used in hybrid DNN-HMM speech recognition systems for acoustic modeling [1, 2, 3, 4, 5, 6]. DNNs have also produced significant gains in pronunciation models that map words to phoneme sequences [7, 8]. In language modeling, recurrent models have been shown to improve speech recognition accuracy by rescoring n-best lists [9]. Traditionally these components – acoustic, pronunciation and language models – have all been trained separately, each with a different objective. Recent work in this area attempts to rectify this disjoint training issue by designing models that are trained end-to-end – from speech directly to transcripts [10, 11, 12, 13, 14, 15]. Two main approaches for this are Connectionist Temporal Classification (CTC) [10] and sequence to sequence models with attention [16]. Both of these approaches have limitations that we try to address: CTC assumes that the label outputs are conditionally independent of each other; whereas the sequence to sequence approach has only been applied to phoneme sequences [14, 15], and not trained end-to-end for speech recognition. In this paper we introduce Listen, Attend and Spell (LAS), a neural network that improves upon the previous attempts [12, 14, 15]. The network learns to transcribe an audio sequence signal to a word sequence, one character at a time. Unlike previous approaches, LAS does not make independence assumptions in the label sequence and it does not rely on HMMs. LAS is based on the sequence to sequence learning framework with attention [17, 18, 16, 14, 15]. It consists of an encoder recurrent neural network (RNN), which is named the listener, and a decoder RNN, which is named the speller. The listener is a pyramidal RNN that converts low level speech signals into higher level features. The speller is an RNN that converts these higher level features into output utterances by specifying a probability distribution over sequences of characters using the attention mechanism [16, 14, 15]. The listener and the speller are trained jointly. Key to our approach is the fact that we use a pyramidal RNN model for the listener, which reduces the number of time steps that the attention model has to extract relevant information from. Rare and out-of-vocabulary (OOV) words are handled automatically, since the model outputs the character 1 sequence, one character at a time. Another advantage of modeling characters as outputs is that the network is able to generate multiple spelling variants naturally. For example, for the phrase “triple a” the model produces both “triple a” and “aaa” in the top beams (see section 4.5). A model like CTC may have trouble producing such diverse transcripts for the same utterance because of conditional independence assumptions between frames. In our experiments, we find that these components are necessary for LAS to work well. Without the attention mechanism, the model overfits the training data significantly, in spite of our large training set of three million utterances - it memorizes the training transcripts without paying attention to the acoustics. Without the pyramid structure in the encoder side, our model converges too slowly - even after a month of training, the error rates were significantly higher than the errors we report here. Both of these problems arise because the acoustic signals can have hundreds to thousands of frames which makes it difficult to train the RNNs. Finally, to reduce the overfitting of the speller to the training transcripts, we use a sampling trick during training [19]. With these improvements, LAS achieves 14.1% WER on a subset of the Google voice search task, without a dictionary or a language model. When combined with language model rescoring, LAS achieves 10.3% WER. By comparison, the Google state-of-the-art CLDNN-HMM system achieves 8.0% WER on the same data set [20]. 2 Related Work Even though deep networks have been successfully used in many applications, until recently, they have mainly been used in classification: mapping a fixed-length vector to an output category [21]. For structured problems, such as mapping one variable-length sequence to another variable-length sequence, neural networks have to be combined with other sequential models such as Hidden Markov Models (HMMs) [22] and Conditional Random Fields (CRFs) [23]. A drawback of this combining approach is that the resulting models cannot be easily trained end-to-end and they make simplistic assumptions about the probability distribution of the data. Sequence to sequence learning is a framework that attempts to address the problem of learning variable-length input and output sequences [17]. It uses an encoder RNN to map the sequential variable-length input into a fixed-length vector. A decoder RNN then uses this vector to produce the variable-length output sequence, one token at a time. During training, the model feeds the groundtruth labels as inputs to the decoder. During inference, the model performs a beam search to generate suitable candidates for next step predictions. Sequence to sequence models can be improved significantly by the use of an attention mechanism that provides the decoder RNN more information when it produces the output tokens [16]. At each output step, the last hidden state of the decoder RNN is used to generate an attention vector over the input sequence of the encoder. The attention vector is used to propagate information from the encoder to the decoder at every time step, instead of just once, as with the original sequence to sequence model [17]. This attention vector can be thought of as skip connections that allow the information and the gradients to flow more effectively in an RNN. The sequence to sequence framework has been used extensively for many applications: machine translation [24, 25], image captioning [26, 27], parsing [28] and conversational modeling [29]. The generality of this framework suggests that speech recognition can also be a direct application [14, 15]. 3 Model In this section, we will formally describe LAS which accepts acoustic features as inputs and emits English characters as outputs. Let x = (x1 , . . . , xT ) be our input sequence of filter bank spectra features, and let y = (hsosi, y1 , . . . , yS , heosi), yi ∈ {a, b, c, · · · , z, 0, · · · , 9, hspacei, hcommai, hperiodi, hapostrophei, hunki}, be the output sequence of characters. Here hsosi and heosi are the special start-of-sentence token, and end-ofsentence tokens, respectively. 2 We want to model each character output yi as a conditional distribution over the previous characters y<i and the input signal x using the chain rule: Y P (y|x) = P (yi |x, y<i ) (1) i Our Listen, Attend and Spell (LAS) model consists of two sub-modules: the listener and the speller. The listener is an acoustic model encoder, whose key operation is Listen. The speller is an attentionbased character decoder, whose key operation is AttendAndSpell. The Listen function transforms the original signal x into a high level representation h = (h1 , . . . , hU ) with U ≤ T , while the AttendAndSpell function consumes h and produces a probability distribution over character sequences: h = Listen(x) P (y|x) = AttendAndSpell(h, y) (2) (3) Figure 1 visualizes LAS with these two components. We provide more details of these components in the following sections. Speller y2 y3 y4 c1 c2 h h s1 heosi Grapheme characters yi are modelled by the CharacterDistribution AttentionContext creates context vector ci from h and si h s2 y2 hsosi yS−1 y3 h = (h1 , . . . , hU ) Long input sequence x is encoded with the pyramidal BLSTM Listen into shorter sequence h Listener h1 x1 x2 h2 x3 x4 x5 x6 hU x7 x8 xT Figure 1: Listen, Attend and Spell (LAS) model: the listener is a pyramidal BLSTM encoding our input sequence x into high level features h, the speller is an attention-based decoder generating the y characters from h. 3 3.1 Listen The Listen operation uses a Bidirectional Long Short Term Memory RNN (BLSTM) [30, 31, 12] with a pyramid structure. This modification is required to reduce the length U of h, from T , the length of the input x, because the input speech signals can be hundreds to thousands of frames long. A direct application of BLSTM for the operation Listen converged slowly and produced results inferior to those reported here, even after a month of training time. This is presumably because the operation AttendAndSpell has a hard time extracting the relevant information from a large number of input time steps. We circumvent this problem by using a pyramid BLSTM (pBLSTM) similar to the Clockwork RNN [33]. In each successive stacked pBLSTM layer, we reduce the time resolution by a factor of 2. In a typical deep BTLM architecture, the output at the i-th time step, from the j-th layer is computed as follows: hji = BLSTM(hji−1 , hij−1 ) (4) In the pBLSTM model, we concatenate the outputs at consecutive steps of each layer before feeding it to the next layer, i.e.: h i j−1 hji = pBLSTM(hji−1 , hj−1 , h 2i 2i+1 ) (5) In our model, we stack 3 pBLSTMs on top of the bottom BLSTM layer to reduce the time resolution 23 = 8 times. This allows the attention model (see next section) to extract the relevant information from a smaller number of times steps. In addition to reducing the resolution, the deep architecture allows the model to learn nonlinear feature representations of the data. See Figure 1 for a visualization of the pBLSTM. The pyramid structure also reduces the computational complexity. In the next section we show that the attention mechanism over U features has a computational complexity of O(U S). Thus, reducing U speeds up learning and inference significantly. 3.2 Attend and Spell We now describe the AttendAndSpell function. The function is computed using an attention-based LSTM transducer [16, 15]. At every output step, the transducer produces a probability distribution over the next character conditioned on all the characters seen previously. The distribution for yi is a function of the decoder state si and context ci . The decoder state si is a function of the previous state si−1 , the previously emitted character yi−1 and context ci−1 . The context vector ci is produced by an attention mechanism. Specifically, ci = AttentionContext(si , h) si = RNN(si−1 , yi−1 , ci−1 ) P (yi |x, y<i ) = CharacterDistribution(si , ci ) (6) (7) (8) where CharacterDistribution is an MLP with softmax outputs over characters, and RNN is a 2 layer LSTM. At each time step, i, the attention mechanism, AttentionContext generates a context vector, ci encapsulating the information in the acoustic signal needed to generate the next character. The attention model is content based - the contents of the decoder state si are matched to the contents of hu representing time step u of h, to generate an attention vector αi . αi is used to linearly blend vectors hu to create ci . Specifically, at each decoder timestep i, the AttentionContext function computes the scalar energy ei,u for each time step u, using vector hu ∈ h and si . The scalar energy ei,u is converted into a probability distribution over times steps (or attention) αi using a softmax function. This is used to 4 create the context vector ci by linearly blending the listener features, hu , at different time steps: ei,u = hφ(si ), ψ(hu )i exp(ei,u ) αi,u = P exp(ei,u ) Xu ci = αi,u hu (9) (10) (11) u where φ and ψ are MLP networks. On convergence, the αi distribution is typically very sharp, and focused on only a few frames of h; ci can be seen as a continuous bag of weighted features of h. Figure 1 shows LAS architecture. 3.3 Learning The Listen and AttendAndSpell functions can be trained jointly for end-to-end speech recognition. The sequence to sequence methods condition the next step prediction on the previous characters [17, 16] and maximizes the log probability: X ∗ log P (yi |x, y<i ; θ) (12) max θ where ∗ y<i i is the groundtruth of the previous characters. However during inference, the groundtruth is missing and the predictions can suffer because the model was not trained to be resilient to feeding in bad predictions at some time steps. To ameliorate this effect, we use a trick that was proposed in [19]. During training, instead of always feeding in the ground truth transcript for next step prediction, we sometimes sample from our previous character distribution and use that as the inputs in the next step predictions: ỹi ∼ CharacterDistribution(si , ci ) X log P (yi |x, ỹ<i ; θ) max θ (13) (14) i where ỹi−1 is the character chosen from the ground truth, or sampled from the model with a certain sampling rate. Unlike [19], we do not use a schedule and simply use a constant sampling rate of 10% right from the start of training. As the system is a very deep network it may appear that some type of pretraining would be required. However, in our experiments, we found no need for pretraining. In particular, we attempted to pretrain the Listen function with context independent or context dependent phonemes generated from a conventional GMM-HMM system. A softmax network was attached to the output units hu ∈ h of the listener and used to make multi-frame phoneme state predictions [34] but led to no improvements. We also attempted to use the phonemes as a joint objective target [35], but found no improvements. 3.4 Decoding and Rescoring During inference we want to find the most likely character sequence given the input acoustics: ŷ = arg max log P (y|x) y (15) Decoding is performed with a simple left-to-right beam search algorithm similar to [17]. We maintain a set of β partial hypotheses, starting with the start-of-sentence hsosi token. At each timestep, each partial hypothesis in the beam is expanded with every possible character and only the β most likely beams are kept. When the heosi token is encountered, it is removed from the beam and added to the set of complete hypothesis. A dictionary can optionally be added to constrain the search space to valid words, however we found that this was not necessary since the model learns to spell real words almost all the time. We have vast quantities of text data [36], compared to the amount of transcribed speech utterances. We can use language models trained on text corpora alone similar to conventional speech systems 5 [37]. To do so we can rescore our beams with the language model. We find that our model has a small bias for shorter utterances so we normalize our probabilities by the number of characters |y|c in the hypothesis and combine it with a language model probability PLM (y): log P (y|x) s(y|x) = + λ log PLM (y) (16) |y|c where λ is our language model weight and can be determined by a held-out validation set. 4 Experiments We used a dataset approximately three million Google voice search utterances (representing 2000 hours of data) for our experiments. Approximately 10 hours of utterances were randomly selected as a held-out validation set. Data augmentation was performed using a room simulator, adding different types of noise and reverberations; the noise sources were obtained from YouTube and environmental recordings of daily events [20]. This increased the amount of audio data by 20 times. 40-dimensional log-mel filter bank features were computed every 10ms and used as the acoustic inputs to the listener. A separate set of 22K utterances representing approximately 16 hours of data were used as the test data. A noisy test data set was also created using the same corruption strategy that was applied to the training data. All training sets are anonymized and hand-transcribed, and are representative of Googles speech traffic. The text was normalized by converting all characters to lower case English alphanumerics (including digits). The punctuations: space, comma, period and apostrophe were kept, while all other tokens were converted to the unknown hunki token. As mentioned earlier, all utterances were padded with the start-of-sentence hsosi and the end-of-sentence heosi tokens. The state-of-the-art model on this dataset is a CLDNN-HMM system that was described in [20]. The CLDNN system achieves a WER of 8.0% on the clean test set and 8.9% on the noisy test set. However, we note that the CLDNN uses unidirectional CLDNNs and would certainly benefit even further from the use of a bidirectional CLDNN architecture. For the Listen function we used 3 layers of 512 pBLSTM nodes (i.e., 256 nodes per direction) on top of a BLSTM that operates on the input. This reduced the time resolution by 8 = 23 times. The Spell function used a two layer LSTM with 512 nodes each. The weights were initialized with a uniform distribution U(−0.1, 0.1). Asynchronous Stochastic Gradient Descent (ASGD) was used for training our model [38]. A learning rate of 0.2 was used with a geometric decay of 0.98 per 3M utterances (i.e., 1/20-th of an epoch). We used the DistBelief framework [38] with 32 replicas, each with a minibatch of 32 utterances. In order to further speed up training, the sequences were grouped into buckets based on their frame length [17]. The model was trained using groundtruth previous characters until results on the validation set stopped improving. This took approximately two weeks. The model was decoded using beam width β = 32 and achieved 16.2% WER on the clean test set and 19.0% WER on the noisy test set without any dictionary or language model. We found that constraining the beam search with a dictionary had no impact on the WER. Rescoring the top 32 beams with the same n-gram language model that was used by the CLDNN system using a language model weight of λ = 0.008 improved the results for the clean and noisy test sets to 12.6% and 14.7% respectively. Note that for convenience, we did not decode with a language model, but rather only rescored the top 32 beams. It is possible that further gains could have been achieved by using the language model during decoding. As mentioned in Section 3.3, there is a mismatch between training and testing. During training the model is conditioned on the correct previous characters but during testing mistakes made by the model corrupt future predictions. We trained another model by sampling from our previous character distribution with a probability of 10% (we did not use a schedule as described in [19]). This improved our results on the clean and noisy test sets to 14.1% and 16.5% WER respectively when no language model rescoring was used. With language model rescoring, we achevied 10.3% and 12.0% WER on the clean and noisy test sets, respectively. Table 1 summarizes these results. On the clean test set, this model is within 2.5% absolute WER of the state-of-the-art CLDNN-HMM system, while on the noisy set it is less than 3.0% absolute WER worse. We suspect that convolu6 Table 1: WER comparison on the clean and noisy Google voice search task. The CLDNN-HMM system is the state-of-the-art system, the Listen, Attend and Spell (LAS) models are decoded with a beam size of 32. Language Model (LM) rescoring was applied to our beams, and a sampling trick was applied to bridge the gap between training and inference. Model CLDNN-HMM [20] LAS LAS + LM Rescoring LAS + Sampling LAS + Sampling + LM Rescoring Clean WER 8.0 16.2 12.6 14.1 10.3 Noisy WER 8.9 19.0 14.7 16.5 12.0 tional filters could lead to improved results, as they have been reported to improve performance by 5% relative WER on clean speech and 7% relative on noisy speech compared to non-convolutional architectures [20]. 4.1 Attention Visualization Figure 2: Alignments between character outputs and audio signal produced by the Listen, Attend and Spell (LAS) model for the utterance “how much would a woodchuck chuck”. The content based attention mechanism was able to identify the start position in the audio sequence for the first character correctly. The alignment produced is generally monotonic without a need for any location based priors. The content-based attention mechanism creates an explicit alignment between the characters and audio signal. We can visualize the attention mechanism by recording the attention distribution on the acoustic sequence at every character output timestep. Figure 2 visualizes the attention alignment between the characters and the filterbanks for the utterance “how much would a woodchuck chuck”. For this particular utterance, the model learnt a monotonic distribution without any location priors. The words “woodchuck” and “chuck” have acoustic similarities, the attention mechanism was slightly confused when emitting “woodchuck” with a dilution in the distribution. The attention model was also able to identify the start and end of the utterance properly. 7 In the following sections, we report results of control experiments that were conducted to understand the effects of beam widths, utterance lengths and word frequency on the WER of our model. 4.2 Effects of Beam Width We investigate the correlation between the performance of the model and the width of beam search, with and without the language model rescoring. Figure 3 shows the effect of the decode beam width, β, on the WER for the clean test set. We see consistent WER improvements by increasing the beam width up to 16, after which we observe no significant benefits. At a beam width of 32, the WER is 14.1% and 10.3% after language model rescoring. Rescoring the top 32 beams with an oracle produces a WER of 4.3% on the clean test set and 5.5% on the noisy test set. Beam Width vs. WER 20 WER WER LM WER Oracle WER 15 10 5 0 12 4 8 16 Beam Width 32 Figure 3: The effect of the decode beam width on WER for the clean Google voice search task. The reported WERs are without a dictionary or language model, with language model rescoring and the oracle WER for different beam widths. The figure shows that good results can be obtained even with a relatively small beam size. 4.3 Effects of Utterance Length We measure the performance of our model as a function of the number of words in the utterance. We expect the model to do poorly on longer utterances due to limited number of long training utterances in our distribution. Hence it is not surprising that longer utterances have a larger error rate. The deletions dominate the error for long utterances, suggesting we may be missing out on words. It is surprising that short utterances (e.g., 2 words or less) perform quite poorly. Here, the substitutions and insertions are the main sources of errors, suggesting the model may split words apart. Figure 4 also suggests that our model struggles to generalize to long utterances when trained on a distribution of shorter utterances. It is possible location-based priors may help in these situations as reported by [15]. 4.4 Word Frequency We study the performance of our model on rare words. We use the recall metric to indicate whether a word appears in the utterance regardless of position (higher is better). Figure 5 reports the recall of each word in the test distribution as a function of the word frequency in the training distribution. Rare words have higher variance and lower recall while more frequent words typically have higher 8 Utterance Length vs. Error 90 80 70 Percentage 60 Data Distribution Insertion Deletion Substitution WER WER LM WER Oracle 50 40 30 20 10 0 5 10 15 20 Number of Words in Utterance 25+ Figure 4: The correlation between error rates (insertion, deletion, substitution and WER) and the number of words in an utterance. The WER is reported without a dictionary or language model, with language model rescoring and the oracle WER for the clean Google voice search task. The data distribution with respect to the number of words in an utterance is overlaid in the figure. LAS performs poorly with short utterances despite an abundance of data. LAS also fails to generalize well on longer utterances when trained on a distribution of shorter utterances. Insertions and substitutions are the main sources of errors for short utterances, while deletions dominate the error for long utterances. recall. The word “and” occurs 85k times in the training set, however it has a recall of only 80% even after language model rescoring. The word “and” is frequently mis-transcribed as “in” (which has 95% recall). This suggests improvements are needed in the language model. By contrast, the word “walkerville” occurs just once in the training set but it has a recall of 100%. This suggests that the recall for a word depends both on its frequency in the training set and its acoustic uniqueness. 4.5 Interesting Decoding Examples In this section, we show the outputs of the model on several utterances to demonstrate the capabilities of LAS. All the results in this section are decoded without a dictionary or a language model. During our experiments, we observed that LAS can learn multiple spelling variants given the same acoustics. Table 2 shows top beams for the utterance that includes “triple a”. As can be seen, the model produces both “triple a” and “aaa” within the top four beams. The decoder is able to generate such varied parses, because the next step prediction model makes no assumptions on the probability distribution by using the chain rule decomposition. It would be difficult to produce such differing transcripts using CTC due to the conditional independence assumptions, where p(yi |x) is conditionally independent of p(yi+1 |x). Conventional DNN-HMM systems would require both spellings to be in the pronunciation dictionary to generate both spelling permutations. It can also be seen that the model produced “xxx” even though acoustically “x” is very different from “a” - this is presumably because the language model overpowers the acoustic signal in this case. In the training corpus “xxx” is a very common phrase and we suspect the language model 9 Word Recall Percentage Word Frequency vs. Recall 100 90 80 70 60 50 40 30 20 10 0 100 101 102 104 103 Word Frequency 105 106 Figure 5: The correlation between word frequency in the training distribution and recall in the test distribution. In general, rare words report worse recall compared to more frequent words. Table 2: Example 1: “triple a” vs. “aaa” spelling variants. Beam Truth 1 2 3 4 Text call aaa roadside assistance call aaa roadside assistance call triple a roadside assistance call trip way roadside assistance call xxx roadside assistance Log Probability -0.5740 -1.5399 -3.5012 -4.4375 WER 0.00 50.00 50.00 25.00 implicit in the speller learns to associate “triple” with “xxx”. We note that “triple a” occurs 4 times in the training distribution and “aaa” (when pronounced “triple a” rather than “a”-“a”-“a”) occurs only once in the training distribution. We are also surprised that the model is capable of handling utterances with repeated words despite the fact that it uses content-based attention. Table 3 shows an example of an utterance with a repeated word. Since LAS implements content-based attention, it is expected it to “lose its attention” during the decoding steps and produce a word more or less times than the number of times the word was spoken. As can be seen from this example, even though “seven” is repeated three times, the model successfully outputs “seven” three times. This hints that location-based priors (e.g., location based attention or location based regularization) may not be needed for repeated contents. Table 3: Example 2: Repeated “seven”s. Beam Truth 1 2 3 4 Text eight nine four minus seven seven seven eight nine four minus seven seven seven eight nine four nine seven seven seven eight nine four minus seven seventy seven eight nine four nine s seven seven seven 10 Log Probability -0.2145 -1.9071 -4.7316 -5.1252 WER 0.00 14.29 14.29 28.57 5 Conclusions We have presented Listen, Attend and Spell (LAS), an attention-based neural network that can directly transcribe acoustic signals to characters. LAS is based on the sequence to sequence framework with a pyramid structure in the encoder that reduces the number of timesteps that the decoder has to attend to. LAS is trained end-to-end and has two main components. The first component, the listener, is a pyramidal acoustic RNN encoder that transforms the input sequence into a high level feature representation. The second component, the speller, is an RNN decoder that attends to the high level features and spells out the transcript one character at a time. Our system does not use the concepts of phonemes, nor does it rely on pronunciation dictionaries or HMMs. We bypass the conditional independence assumptions of CTC, and show how we can learn an implicit language model that can generate multiple spelling variants given the same acoustics. To further improve the results, we used samples from the softmax classifier in the decoder as inputs to the next step prediction during training. Finally, we showed how a language model trained on additional text can be used to rerank our top hypotheses. Acknowledgements We thank Tara Sainath, Babak Damavandi for helping us with the data, language models and for helpful comments. We also thank Andrew Dai, Ashish Agarwal, Samy Bengio, Eugene Brevdo, Greg Corrado, Andrew Dai, Jeff Dean, Rajat Monga, Christopher Olah, Mike Schuster, Noam Shazeer, Ilya Sutskever, Vincent Vanhoucke and the Google Brain team for helpful comments, suggestions and technical assistance. References [1] Nathaniel Morgan and Herve Bourlard. Continuous Speech Recognition using Multilayer Perceptrons with Hidden Markov Models. In IEEE International Conference on Acoustics, Speech and Signal Processing, 1990. [2] Abdel-rahman Mohamed, George E. Dahl, and Geoffrey E. Hinton. Deep belief networks for phone recognition. In Neural Information Processing Systems: Workshop on Deep Learning for Speech Recognition and Related Applications, 2009. [3] George E. Dahl, Dong Yu, Li Deng, and Alex Acero. Large vocabulary continuous speech recognition with context-dependent dbn-hmms. In IEEE International Conference on Acoustics, Speech and Signal Processing, 2011. [4] Abdel-rahman Mohamed, George E. Dahl, and Geoffrey Hinton. Acoustic modeling using deep belief networks. IEEE Transactions on Audio, Speech, and Language Processing, 20(1):14–22, 2012. [5] Navdeep Jaitly, Patrick Nguyen, Andrew W. Senior, and Vincent Vanhoucke. Application of Pretrained Deep Neural Networks to Large Vocabulary Speech Recognition. In INTERSPEECH, 2012. [6] Tara Sainath, Abdel-rahman Mohamed, Brian Kingsbury, and Bhuvana Ramabhadran. Deep Convolutional Neural Networks for LVCSR. In IEEE International Conference on Acoustics, Speech and Signal Processing, 2013. [7] Kanishka Rao, Fuchun Peng, Hasim Sak, and Francoise Beaufays. Grapheme-to-phoneme conversion using long short-term memory recurrent neural networks. In IEEE International Conference on Acoustics, Speech and Signal Processing, 2015. [8] Kaisheng Yao and Geoffrey Zweig. Sequence-to-Sequence Neural Net Models for Graphemeto-Phoneme Conversion. 2015. [9] Tomas Mikolov, Karafiat Martin, Burget Luka, Eernocky Jan, and Khudanpur Sanjeev. Recurrent neural network based language model. In INTERSPEECH, 2010. [10] Alex Graves, Santiago Fernandez, Faustino Gomez, and Jurgen Schmiduber. Connectionist Temporal Classification: Labelling Unsegmented Sequence Data with Recurrent Neural Networks. In International Conference on Machine Learning, 2006. 11 [11] Alex Graves. Sequence Transduction with Recurrent Neural Networks. In International Conference on Machine Learning: Representation Learning Workshop, 2012. [12] Alex Graves and Navdeep Jaitly. Towards End-to-End Speech Recognition with Recurrent Neural Networks. In International Conference on Machine Learning, 2014. [13] Awni Hannun, Carl Case, Jared Casper, Bryan Catanzaro, Greg Diamos, Erich Elsen, Ryan Prenger, Sanjeev Satheesh, Shubho Sengupta, Adam Coates, and Andrew Ng. Deep Speech: Scaling up end-to-end speech recognition. In http://arxiv.org/abs/1412.5567, 2014. [14] Jan Chorowski, Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. End-to-end Continuous Speech Recognition using Attention-based Recurrent NN: First Results. In Neural Information Processing Systems: Workshop Deep Learning and Representation Learning Workshop, 2014. [15] Jan Chorowski, Dzmitry Bahdanau, Dmitriy Serdyuk, Kyunghyun Cho, and Yoshua Bengio. Attention-Based Models for Speech Recognition. In http://arxiv.org/abs/1506.07503, 2015. [16] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural Machine Translation by Jointly Learning to Align and Translate. In International Conference on Learning Representations, 2015. [17] Ilya Sutskever, Oriol Vinyals, and Quoc Le. Sequence to Sequence Learning with Neural Networks. In Neural Information Processing Systems, 2014. [18] Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwen, and Yoshua Bengio. Learning Phrase Representations using RNN EncoderDecoder for Statistical Machine Translation. In Conference on Empirical Methods in Natural Language Processing, 2014. [19] Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. Scheduled Sampling for Sequence Prediction with Recurrent Neural Networks. In http://arxiv.org/abs/1506.03099, 2015. [20] Tara N. Sainath, Oriol Vinyals, Andrew Senior, and Hasim Sak. Convolutional, Long ShortTerm Memory, Fully Connected Deep Neural Networks. In IEEE International Conference on Acoustics, Speech and Signal Processing, 2015. [21] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. ImageNet Classification with Deep Convolutional Neural Networks. In Neural Information Processing Systems, 2012. [22] Leonard E. Baum and Ted Petrie. Statistical Inference for Probabilistic Functions of Finite State Markov Chains. The Annals of Mathematical Statistics, 37:1554–1563, 1966. [23] John Lafferty, Andrew McCallum, and Fernando Pereira. Conditional Random Fields: Probabilistic Models for Segmenting and Labeling Sequence Data. In International Conference on Machine Learning, 2001. [24] Minh-Thang Luong, Ilya Sutskever, Quoc V. Le, Oriol Vinyals, and Wojciech Zaremba. Addressing the Rare Word Problem in Neural Machine Translation. In Association for Computational Linguistics, 2015. [25] Sebastien Jean, Kyunghyun Cho, Roland Memisevic, and Yoshua Bengio. On Using Very Large Target Vocabulary for Neural Machine Translation. In Association for Computational Linguistics, 2015. [26] Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and Tell: A Neural Image Caption Generator. In IEEE Conference on Computer Vision and Pattern Recognition, 2015. [27] Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhutdinov, Richard Zemel, and Yoshua Bengio. Show, Attend and Tell: Neural Image Caption Generation with Visual Attention. In International Conference on Machine Learning, 2015. [28] Oriol Vinyals, Lukasz Kaiser, Terry Koo, Slav Petrov, Ilya Sutskever, and Geoffrey E. Hinton. Grammar as a foreign language. In http://arxiv.org/abs/1412.7449, 2014. [29] Oriol Vinyals and Quoc V. Le. A Neural Conversational Model. In International Conference on Machine Learning: Deep Learning Workshop, 2015. [30] Sepp Hochreiter and Jurgen Schmidhuber. Long Short-Term Memory. Neural Computation, 9(8):1735–1780, November 1997. 12 [31] Alex Graves, Navdeep Jaitly, and Abdel-rahman Mohamed. Hybrid Speech Recognition with Bidirectional LSTM. In Automatic Speech Recognition and Understanding Workshop, 2013. [32] Salah Hihi and Yoshua Bengio. Hierarchical Recurrent Neural Networks for Long-Term Dependencies. In Neural Information Processing Systems, 1996. [33] Jan Koutnik, Klaus Greff, Faustino Gomez, and Jurgen Schmidhuber. A Clockwork RNN. In International Conference on Machine Learning, 2014. [34] Navdeep Jaitly, Vincent Vanhoucke, and Geoffrey Hinton. Autoregressive product of multiframe predictions can improve the accuracy of hybrid models. In INTERSPEECH, 2014. [35] Hasim Sak, Andrew Senior, Kanishka Rao, and Francoise Beaufays. Fast and Accurate Recurrent Neural Network Acoustic Models for Speech Recognition. In INTERSPEECH, 2015. [36] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg Corrado, and Jeffrey Dean. Distributed Representations of Words and Phrases and their Compositionality. In Neural Information Processing Systems, 2013. [37] Daniel Povey, Arnab Ghoshal, Gilles Boulianne, Lukas Burget, Ondrej Glembek, Nagendra Goel, Mirko Hannenmann, Petr Motlicek, Yanmin Qian, Petr Schwarz, Jan Silovsky, Georg Stemmer, and Karel Vesely. The Kaldi Speech Recognition Toolkit. In Automatic Speech Recognition and Understanding Workshop, 2011. [38] Jeffrey Dean, Greg S. Corrado, Rajat Monga, Kai Chen, Matthieu Devin, Quoc V. Le, Mark Z. Mao, Marc’Aurelio Ranzato, Andrew Senior, Paul Tucker, Ke Yang, and Andrew Y. Ng. Large Scale Distributed Deep Networks. In Neural Information Processing Systems, 2012. 13 A Alignment Examples In this section, we give additional visualization examples of our model and the attention distribution. Figure 6: The spelling variants of “aaa” vs “triple a” produces different attention distributions, both spelling variants appear in our top beams. The ground truth is: “aaa emergency roadside service”. 14 Figure 7: The spelling variants of “st” vs “saint” produces different attention distributions, both spelling variants appear in our top beams. The ground truth is: “st mary’s animal clinic”. 15 Figure 8: The phrase “cancel” is repeated three times. Note the parallel diagonals, the content attention mechanism gets slightly confused however the model still emits the correct hypothesis. The ground truth is: “cancel cancel cancel”. 16
9cs.NE
C LASSIFICATION AND D ISEASE L OCALIZATION IN H ISTOPATHOLOGY U SING O NLY G LOBAL L ABELS : A W EAKLY-S UPERVISED A PPROACH arXiv:1802.02212v1 [cs.CV] 1 Feb 2018 Pierre Courtiol, Eric W. Tramel, Marc Sanselme, & Gilles Wainrib Owkin, Inc. New York City, NY {firstname.lastname}@owkin.com A BSTRACT Analysis of histopathology slides is a critical step for many diagnoses, and in particular in oncology where it defines the gold standard. In the case of digital histopathological analysis, highly trained pathologists must review vast wholeslide-images of extreme digital resolution (100, 0002 pixels) across multiple zoom levels in order to locate abnormal regions of cells, or in some cases single cells, out of millions. The application of deep learning to this problem is hampered not only by small sample sizes, as typical datasets contain only a few hundred samples, but also by the generation of ground-truth localized annotations for training interpretable classification and segmentation models. We propose a method for disease localization in the context of weakly supervised learning, where only image-level labels are available during training. Even without pixel-level annotations, we are able to demonstrate performance comparable with models trained with strong annotations on the Camelyon-16 lymph node metastases detection challenge. We accomplish this through the use of pre-trained deep convolutional networks, feature embedding, as well as learning via top instances and negative evidence, a multiple instance learning technique from the field of semantic segmentation and object detection. 1 I NTRODUCTION Histopathological image analysis (HIA) is a critical element of diagnosis in many areas of medicine, and especially in oncology, where it defines the gold standard metric. Recent works have sought to leverage modern developments in machine learning (ML) to aid pathologists in disease detection tasks, but the majority of these techniques require localized annotation masks as training data. These annotations are even more costly to obtain than the original diagnosis, as pathologists must spend time to assemble pixel-by-pixel segmentation maps of diseased tissue at extreme resolution, thus HIA datasets with annotations are very limited in size. Additionally, such localized annotations may not be available when facing new problems in HIA, such as new disease subtybe classification, prognosis estimation, or drug response prediction. Thus, the critical question for HIA is: can one design a learning architecture which achieves accurate classification with no additional localized annotation? A successful technique would be able train algorithms to assist pathologists during analysis, and could also be used to identify previously unknown structures and regions of interest. Indeed, while histopathology is the gold standard diagnostic in oncology, it is extremely costly, requiring many hours of focus from pathologists to make a single diagnosis (Litjens et al., 2016; Weaver, 2010). Additionally, as correct diagnosis for certain diseases requires pathologists to identify a few cells out of millions, these tasks are akin to “finding a needle in a haystack.” Hard numbers on diagnostic error rates in histopathology are difficult to obtain, being dependent upon the disease and tissue in question as well as self-reporting by pathologists of diagnostic errors. However, as reported in the review of Santana & Ferreira (2017), false negatives in cancer diagnosis can lead not only to catastrophic consequences for the patient, but also to incredible financial risk to the pathologist. Any tool which can aid pathologists to focus their attention and effort to the must suspect regions can help reduce false-negatives and improve patient outcomes through more accurate 1 diagnoses (Djuric et al., 2017). Medical researchers have looked to computer-aided diagnosis for decades, but the lack of computational resources and data have prevented wide-spread implementation and usage of such tools (Gurcan et al., 2009). Since the advent of automated digital WSI capture in the 1990s, researchers have sought approaches for easing the pathologist’s workload and improve patient outcomes through image processing algorithms (Gurcan et al., 2009; Litjens et al., 2017). Rather than predicting final diagnosis, many of these procedures focused instead on segmentation, either for cell-counting, or for the detection of suspect regions in the WSI. Historical methods have focused on the use of hand-crafted texture or morphological (Demir & Yener, 2005) features used in conjunction with unsupervised techniques such as K-means clustering or other dimensionality reduction techniques prior to classification via k-Nearest Neighbor or a support vector machine. Over the past decade, fruitful developments in deep learning (LeCunn et al., 2015) have lead to an explosion of research into the automation of image processing tasks. While the application of such advanced ML techniques to image tasks has been successful for many consumer applications, the adoption of such approaches within the field of medical imaging has been more gradual. However, these techniques demonstrate remarkable promise in the field of HIA. Specifically, in digital pathology with whole-slide-imaging (WSI) (Yagi & Gilbertson, 2005; Snead et al., 2016), highly trained and skilled pathologists review digitally captured microscopy images from prepared and stained tissue samples in order to make diagnoses. Digital WSI are massive datasets, consisting of images captured at multiple zoom levels. At the greatest magnification levels, a WSI may have a digital resolution upwards of 100 thousand pixels in both dimensions. However, since localized annotations are very difficult to obtain, datasets may only contain WSI-level diagnosis labels, falling into the category of weakly-supervised learning. The use of DCNNs was first proposed for HIA in Cireşan et al. (2013), where the authors were able to train a model for mitosis detection in H&E stained images. A similar technique was applied for WSI for the detection of invasive ductal carcinoma in Cruz-Roa et al. (2014). These approaches demonstrated the usefulness of learned features as an effective replacement for hand-crafted image features. It is possible to train deep architectures from scratch for the classification of tile images (Wang et al., 2016; Hou et al., 2016). However, training such DCNN architectures can be extremely resource intensive. For this reason, many recent approaches applying DCNNs to HIA make use of large pre-trained networks to act as rich feature extractors for tiles (Källén et al., 2016; Kim et al., 2016; Litjens et al., 2016; Xu et al., 2017; Song et al., 2017). Such approaches have found success as aggregation of rich representations from pre-trained DCNNs has proven to be quite effective, even without from-scratch training on WSI tiles. In this paper, we propose CHOWDER1 , an approach for the interpretable prediction of general localized diseases in WSI with only weak, whole-image disease labels and without any additional expert-produced localized annotations, i.e. per-pixel segmentation maps, of diseased areas within the WSI. To accomplish this, we modify an existing architecture from the field of multiple instance learning and object region detection (Durand et al., 2016) to WSI diagnosis prediction. By modifying the pre-trained DCNN model (He et al., 2016), introducing an additional set of fully-connected layers for context-aware classification from tile instances, developing a random tile sampling scheme for efficient training over massive WSI, and enforcing a strict set of regualrizations, we are able to demonstrate performance equivalent to the best human pathologists (Bejnordi et al., 2017). Notably, while the approach we propose makes use of a pre-trained DCNN as a feature extractor, the entire procedure is a true end-to-end classification technique, and therefore the transferred pre-trained layers can be fine-tuned to the context of H&E WSI. We demonstrate, using only whole-slide labels, performance comparable to top-10 ranked methods trained with strong, pixel-level labels on the Camelyon-16 challenge dataset, while also producing disease segmentation that closely matches ground-truth annotations. We also present results for diagnosis prediction on WSI obtained from The Cancer Genome Atlas (TCGA), where strong annotations are not available and diseases may not be strongly localized within the tissue sample. 2 L EARNING W ITHOUT L OCAL A NNOTATIONS While approaches using localized annotations have shown promise for HIA, they fail to address the cost associated with the acquisition of hand-labeled datasets, as in each case these methods require 1 Classification of HistOpathology with Weak supervision via Deep fEature aggRegation 2 access to pixel-level labels. As shown with ImageNet (Deng et al., 2009), access to data drives innovation, however for HIA hand-labeled segmentation maps are costly to produce, often subject to missed diseased areas, and cannot scale to the size of datasets required for truly effective deep learning. Because of these considerations, HIA is uniquely suited to the weakly supervised learning (WSL) setting. Here, we define the WSL task for HIA to be the identification of suspect regions of WSI when the training data only contains image-wide labels of diagnoses made by expert pathologists. Since WSI are often digitally processed in small patches, or tiles, the aggregation of these tiles into groups with a single label (e.g. “healthy”, “cancer present”) can be used within the framework of multiple instance learning (MIL) (Dietterich et al., 1997; Amores, 2013; Xu et al., 2014). In MIL for binary classification, one often makes the standard multi-instance (SMI) assumption: a bag is classified as positive iff at least one instance (here, a tile) in the bag is labelled positive. The goal is to take the bag-level labels and learn a set of instance-level rules for the classification of single instances. In the case of HIA, learning such rules provides the ability to infer localized regions of abnormal cells within the large-scale WSI. In the recent work of Hou et al. (2016) for WSI classification in the WSL setting, the authors propose an EM-based method to identify discriminative patches in high resolution images automatically during patch-level CNN training. They also introduced a decision level fusion method for HIA, which is more robust than max-pooling and can be thought of as a Count-based Multiple Instance (CMI) learning method with two-level learning. While this approach was shown to be effective in the case of glioma classification and obtains the best result, it only slightly outperforms much simpler approaches presented in (Hou et al., 2016), but at much greater computational cost. In the case of natural images, the WELDON and WILDCAT techniques of Durand et al. (2016) and Durand et al. (2017), respectively, demonstrated state-of-the-art performance for object detection and localization for WSL with image-wide labels. In the case of WELDON, the authors propose an end-to-end trainable CNN model based on MIL learning with top instances (Li & Vasconcelos, 2015) as well as negative evidence, relaxing the SMI assumption. Specifically, in the case of semantic segmentation, Li & Vasconcelos (2015) argue that a target concept might not exist just at the subregion level, but that the proportion of positive and negative samples in a bag have a larger effect in the determination of label assignment. This argument also holds for the case of HIA, where pathologist diagnosis arises from a synthesis of observations across multiple resolution levels as well as the relative abundance of diseased cells. In Sec. 2.3, we will detail our proposed approach which makes a number of improvements on the framework of Durand et al. (2016), adapting it to the context of large-scale WSI for HIA. 2.1 WSI P RE -P ROCESSING Tissue Detection. As seen in Fig. 1, large regions of a WSI may contain no tissue at all, and are therefore not useful for training and inference. To extract only tiles with content relevant to the task, we use the same approach as Wang et al. (2016), namely, Otsu’s method (Otsu, 1979) applied to the hue and saturation channels of the image after transformation into the HSV color space to produce two masks which are then combined to produce the final tissue segmentation. Subsequently, only tiles within the foreground segmentation are extracted for training and inference. Color Normalization. According to Ciompi et al. (2017), stain normalization is an important step in HIA since the result of the H&E staining procedure can vary greatly between any two slides. We utilize a simple histogram equalization algorithm consisting of left-shifting RGB channels and subsequently rescaling them to [0, 255], as proposed in Nikitenko et al. (2008). In this work, we place a particular emphasis on the tile aggregation method rather than color normalization, so we did not make use of more advanced color normalization algorithms, such as Khan et al. (2014). Tiling. The tiling step is necessary in histopathology analysis. Indeed, due to the large size of the WSI, it is computationally intractable to process the slide in its entirety. For example, on the highest resolution zoom level, denoted as scale 0, for a fixed grid of non-overlapping tiles, a WSI may possess more than 200,000 tiles of 224×224 pixels. Because of the computational burden associated with processing the set of all possible tiles, we instead turn to a uniform random sampling from the space of possible tiles. Additionally, due to the large scale nature of WSI datasets, the computational 3 burden associated with sampling potentially overlapping tiles from arbitrary locations is a prohibitive cost for batch construction during training. Instead, we propose that all tiles from the non-overlapping grid should be processed and stored to disk prior to training. As the tissue structure does not exhibit any strong periodicity, we find that sampling tiles along a fixed grid without overlapping provides a reasonably representative sampling while maximizing the total sampled area. Given a target scale ` ∈ {0, 1, . . . , L}, we denote the number of possible tiles in WSI indexed by T S i ∈ {1, 2, . . . , N } as Mi,` . The number of tiles sampled for training or inference is denoted by Mi,` and is chosen according to    1 S T T Mi,` = min Mi,` , max Mmin , · M̄`T , (1) 2 P T where M̄`T = N1 i Mi,` is the empirical average of the number of tiles at scale ` over the entire set of training data. Feature Extraction. We make use of the ResNet-50 (He et al., 2016) architecture trained on the ImageNet natural image dataset. In empirical comparisons between VGG or Inception architectures, we have found that the ResNet architecture provides features more well suited for HIA. Additionally, the ResNet architecture is provided at a variety of depths (ResNet-101, ResNet-152). However, we found that ResNet-50 provides the best balance between the computational burden of forward inference and richness of representation for HIA. In our approach, for every tile we use the values of the ResNet-50 pre-output layer, a set of P = 2048 floating point values, as the feature vector for the tile. Since the fixed input resolution for ResNet-50 is 224 × 224 pixels, we set the resolution for the tiles extracted from the WSI to the same pixel resolution at every scale `. 2.2 BASELINE METHOD Given a WSI, extracting tile-level features produces a bag of feature vectors which one attempts to use for classification against the known image-wide label. The dimension of these local descriptors is M S × P , where P is the number of features output from the pre-trained image DCNN and M S is the number of sampled tiles. Approaches such as Bag-of-visual-words (BoVW) or VLAD (Jégou et al., 2010) could be chosen as a baseline aggregation method to generate a single image-wide descriptor of size P ×1, but would require a huge computational power given the dimensionality of the input. Instead, we will try two common approaches for the aggregation of local features, specifically, the MaxPool and MeanPool and subsequently apply a classifier on the aggregated features. After applying these pooling methods over the axis of tile indices, one obtains a single feature descriptor for the whole image. Other pooling approaches have been used in the context of HIA, including Fisher vector encodings (Song et al., 2017) and p−norm pooling (Xu et al., 2017). However, as the reported effect of these aggregations is quite small, we don’t consider these approaches when constructing our baseline approach. After aggregation, a classifier can be trained to produce the desired diagnosis labels given the global WSI aggregated descriptor. For our baseline method, we use a logistic regression for this final prediction layer of the model. We present a description of the baseline approach in Fig. 1. 2.3 CHOWDER M ETHOD In experimentation, we observe that the baseline approach of the previous section works well for diffuse disease, which is evidenced in the results of Table 1 for TCGA-Lung. Here, diffuse implies that the number of disease-containing tiles, pertinent to the diagnosis label, are roughly proportional to the number of tiles containing healthy tissue. However, if one applies the same approach to different WSI datasets, such as Camelyon-16, the performance significantly degrades. In the case of Camelyon-16, the diseased regions of most of the slides are highly localized, restricted to a very small area within the WSI. When presented with such imbalanced bags, simple aggregation approaches for global slide descriptors will overwhelm the features of the disease-containing tiles. 4 Figure 1: Description of the BASELINE approach for WSI classification via aggregation of tile-level features into global slide descriptors. Figure 2: Description of the CHOWDER architecture (for R = 2) for WSI classification via MLP on operating on top positive and negative instances shown for a single sample mini-batch sample. Instead, we propose an adaptation and improvement of the WELDON method (Durand et al., 2016) designed for histopathology images analysis. As in their approach, rather than creating a global slide descriptor by aggregating all tile features, instead a MIL approach is used that combines both top-instances as well as negative evidence. A visual description of approach is given in Fig. 2. Feature Embedding. First, a set of one-dimensional embeddings for the P = 2048 ResNet-50 features are calcualted via J one-dimensional convolutional layers strided across the tile index axis. For tile t with features kt , the embedding according to kernel j is calculated as ej,t = hwj , kt i. Notably, the kernels wj have dimensionality P . This one-dimensional convolution is, in essence, a shortcut for enforcing a fully-connected layer with tied weights across tiles, i.e. the same embedding for every tile (Durand et al., 2016). In our experiments, we found that the use of a single embedding, J = 1, is an appropriate choice for WSI datasets when the number of available slides is small (< 1000). In this case, choosing J > 1 will decrease training error, but will increase generalization error. Avoiding overtraining and ensuring model generality remains a major challenge for the application of WSL to WSI datasets. S Top Instances and Negative Evidence. After feature embedding, we now have a M`,i × 1 vector of local tile-level (instance) descriptors. As in (Durand et al., 2016), these instance descriptors are sorted by value. Of these sorted embedding values, only the top and bottom R entries are retained, resulting in a tensor of 2R × 1 entries to use for diagnosis classification. This can be easily accomplished through a MinMax layer on the output of the one-dimensional convolution layer. The purpose of this layer is to take not only the top instances region but also the negative evidences, that is the region which best support the absence of the class. During training, the back-propagation runs only through the selected tiles, positive and negative evidences. When applied to WSI, the MinMax serves as a powerful tile selection procedure. Multi-layer Perceptron (MLP) Classifier. In the WELDON architecture, the last layer consists of a sum applied over the 2R × 1 output from the MinMax layer. However, we find that this approach can be improved for WSI classification. We investigate the possibility of a richer interactions between the top and bottom instances by instead using an MLP as the final classifier. In our imple5 mentation of CHOWDER, we use an MLP with two fully connected layers of 200 and 100 neurons with sigmoid activations. 3 E XPERIMENTAL R ESULTS 3.1 T RAINING D ETAILS First, for pre-processing, we fix a single tile scale for all methods and datasets. We chose a fixed zoom level of 0.5 µm/pixel, which corresponds to ` = 0 for slides scanned at 20x magnification, or ` = 1 slides scanned at 40x magnification. Next, since WSI datasets often only contain a few hundred images, far from the millions images of ImageNet dataset, strong regularization required prevent over-fitting. We applied `2 -regularization of 0.5 on the convolutional feature embedding layer and dropout on the MLP with a rate of 0.5. However, these values may not be the global optimal, as we did not apply any hyper-parameter optimization to tune these values. To optimize the model parameters, we use Adam (Kingma & Ba, 2014) to minimize the binary cross-entropy loss over 30 epochs with a mini-batch size of 10 and with learning rate of 0.001. To reduce variance and prevent over-fitting, we trained an ensemble of E CHOWDER networks which only differ by their initial weights. The average of the predictions made by these E networks establishes the final prediction. Although we set E = 10 for the results presented in Table s1, we used a larger ensemble of E = 50 with R = 5 to obtain the best possible model when comparing our method to those reported in the Camelyon-16 leaderboards. We also use an ensemble of E = 10 when reporting the results for WELDON. As the training of one epoch requires about 30 seconds on our available hardware, the total training time for the ensemble took just over twelve hours. While the ResNet-50 features were extracted using a GPU for efficient feed-forward calculations, the CHOWDER network is trained on CPU in order to take advantage of larger system RAM sizes, compared to on-board GPU RAM. This allows us to store all the training tiles in memory to provide faster training compared to a GPU due to reduced transfer overhead. 3.2 TCGA The public Cancer Genome Atlas (TCGA) provides approximately 11,000 tissue slides images of cancers of various organs2 . For our first experiment, we selected 707 lung cancer WSIs (TCGA-Lung), which were downloaded in March 2017. Subsequently, a set of new lung slides have been added to TCGA, increasing the count of lung slides to 1,009. Along with the slides themselves, TCGA also provides labels representing the type of cancer present in each WSI. However, no local segmentation annotations of cancerous tissue regions are provided. The pre-processing step extracts 1,411,043 tiles and their corresponding representations from ResNet-50. The task of these experiments is then to predict which type of cancer is contained in each WSI: adenocarcinoma or squamous cell carcinoma. We evaluate the quality of the classification according to the area under the curve (AUC) of the receiver operating characteristic (ROC) curve generated using the raw output predictions. As expected in the case of diffuse disease, the advantage provided by CHOWDER is slight as compared to the MeanPool baseline, as evidenced in Table 1. Additionally, as the full aggregation techniques work quite well in this setting, the value of R does not seem to have a strong effect on the performance of CHOWDER as it increases to R = 100. In this setting of highly homogenous tissue content, we can expect that global aggregate descriptors are able to effectively separate the two classes of carcinoma. 3.3 C AMELYON -16 For our second experiment, we use the Camelyon-16 challenge dataset3 , which consists of 400 WSIs taken from sentinel lymph nodes, which are either healthy or exhibit metastases of some form. In addition to the WSIs themselves, as well as their labeling (healthy, contains-metastases), a segmentation mask is provided for each WSI which represents an 2 3 https://portal.gdc.cancer.gov/legacy-archive https://camelyon16.grand-challenge.org 6 expert analysis on the location of metastases within the WSI. Human labeling of sentinel lymph node slides is known to be quite tedious, as noted in Litjens et al. (2016); Weaver (2010). Teams participating in the challenge had access to, and utilized, the ground-truth masks when training their diagnosis prediction and tumor localization models. For our approach, we set aside the masks of metastasis locations and utilize only diagnosis labels. Furthermore, many participating teams developed a post-processing step, extracting handcrafted features from predicted metastasis maps to improve their segmentation. No post-processing is performed for the presented CHOWDER results, the score is computed directly from the raw output of the CHOWDER model. The Camelyon-16 dataset is evaluated on two different axes. First, the accuracy of the predicted label for each WSI in the test set is evaluated according to AUC. Second, the accuracy of metastasis localization is evaluated by comparing model outputs to the ground-truth expert annotations of metastasis location. This segmentation accuracy is measured according to the free ROC metric (FROC), which is the curve of metastasis detection sensitivity to the average number of also positives. As in the Camelyon challenge, we evaluate the FROC metric as the average detection sensitivity at the average false positive rates 0.25, 0.5, 1, 2, 4, and 8. Competition Split Bias. We also conduct a set of experiments on Camelyon-16 using random train-test cross-validation (CV) splits, respecting the same training set size as in the original competition split. We note distinct difference in AUC between the competition split and those obtained via random folds. This discrepancy is especially distinct for the MeanPool baseline, as reported in Table 1. We therefore note a distinct discrepancy in the data distribution between the competition test and training splits. Notably, using the MeanPool baseline architecture, we found that the competition train-test split can be predicted with an AUC of 0.75, however one only obtains an AUC of 0.55 when using random splits. Because this distribution mismatch in the competition split could produce misleading interpretations, we report 3-fold average CV results along with the results obtained on the competition split. Classification Performance. In Table 1, we see the classification performance of our proposed CHOWDER method, for E = 10, as compared to both the baseline aggregation techniques, as well as the WELDON approach. In the case of WELDON, the final MLP is not used and instead a summing is applied to the MinMax layer. The value of R retains the same meaning in both cases: the number of both high and low scoring tiles to pass on to the classification layers. We test a range of values R for both WELDON and CHOWDER. We find that over all values of R, CHOWDER provides a significant advantage over both the baseline aggregation techniques as well as WELDON. We also note that the optimal performance can be obtained without using a large number of discriminative tiles, i.e. R = 5. Of the published results on Camelyon-16, the winning approach of Wang et al. (2016) acheived an AUC of 0.9935. With CHOWDER we are able to attain an AUC of 0.8706, but without using any of the ground-truth disease segmentation maps. This is a remarkable result, as Wang et al. (2016) required tile-level disease labels derived from expert-provided annotations in order to train a full 27-layer GoogLeNet (Szegedy et al., 2015) architecture for tile-level tumor prediction. We also note that CHOWDER’s performance on this task roughly is equivalent to the best-performing human pathologist, an AUC of 0.884 as reported by Bejnordi et al. (2017), and better-than-average with respsect to human pathologist performance, an AUC of 0.810. Notably, this human-level performance is achieved without human assistance during training, beyond the diagnosis labels themselves. We present the ROC curve for this result in Fig. 3. Localization Performance. Obtaining high performance in terms of whole slide classification is well and good, but it is not worth much without an interpretable result which can be used by pathologists to aid their diagnosis. For example, the MeanPool baseline aggregation approach provides no information during inference from which one could derive tumor locations in the WSI: all locality information is lost with the aggregation. With MaxPool, one at least retains some information via the tile locations which provide each maximum aggregate feature. For CHOWDER, we propose the use of the full set of outputs from the convolutional feature embedding layer. These are then sorted and thresholded according to value τ such that tiles with an embedded value larger than τ are classified as diseased and those with lower values are classified as healthy. We show an example of disease localization produced by CHOWDER in Fig. 4. Here, 7 AUC Method CV Competition 0.749 0.802 0.655 0.530 BASELINE MaxPool MeanPool Method AUC BASELINE WELDON R=1 R = 10 R = 100 R = 300 0.782 0.832 0.809 0.761 0.765 0.670 0.600 0.573 0.809 0.903 0.900 0.870 0.837 0.821 0.858 0.843 0.775 0.652 MaxPool MeanPool CHOWDER R=1 R = 10 R = 100 CHOWDER R=1 R=5 R = 10 R = 100 R = 300 0.860 0.903 0.900 0.915 0.909 Table 1: Classification (AUC) results for the Camelyon-16 (left) and TCGA-Lung (right) datasets for CHOWDER, WELDON, and the baseline approach. For Camelyon-16, we present two scores, one for the fixed competition test split of 130 WSIs, and one for a cross-validated average over 3 folds (CV) on the 270 training WSIs. For TCGA-Lung, we present scores as a cross-validated average over 5 folds. Figure 3: Performance curves for Camelyon-16 dataset for both classification and segmentation tasks for the different tested approaches. Left: ROC curves for the classification task. Right: FROC curves for lesion detection task. we see that CHOWDER is able to very accurately localize the tumorous region in the WSI even though it has only been trained using global slide-wide labels and without any local annotations. While some potential false detections occur outside of the tumor region, we see that the strongest response occurs within the tumor region itself, and follows the border regions nicely. We present further localization results in Appendix A. Comparing to the published Camelyon-16 results, the approach of Wang et al. (2016) achieved a winning FROC of 0.8074 with strong annotations. In the weak-leaning setting, CHOWDER achieves a FROC of 0.3103. However, we note that these localization results are preliminary, as we do not conduct either a full sampling of all tiles in the WSI, nor do we apply post-processing of overlapping tiles to obtain full-resolution localization maps. While approaches are certainly possible using tile-instanace feature embeddings obtained from the trained CHOWDER architecture, we note that further innovations in post-processing are outside the scope of this work. The FROC curve is given in Fig. 3. 8 Figure 4: Visualization of metastasis detection on test image 27 of the Camelyon-16 dataset using our proposed approach. Left: Full WSI at zoom level 6 with ground truth annotation of metastases shown via black border. Tiles with positive feature embeddings are colored from white to red according to their magnitude, with red representing the largest magnitude. Right: Detail of metastases at zoom level 2 overlaid with classification output of our proposed approach. Here, the output of all tested tiles are shown and colored according to their value, from blue to white to red, with blue representing the most negative values, and red the most positive. Tiles without color were not included when randomly selecting tiles for inference. 4 D ISCUSSION We have shown that using state-of-the-art techniques from MIL in computer vision, such as the top instance and negative evidence approach of (Durand et al., 2016), one can construct an effective technique for diagnosis prediction and disease location for WSI in histopathology without the need for expensive localized annotations produced by expert pathologists. By removing this requirement, we hope to accelerate the production of computer-assistance tools for pathologists to greatly improve the turn-around time in pathology labs and help surgeons and oncologists make rapid and effective patient care decisions. This also opens the way to tackle problems where expert pathologists may not know precisely where relevant tissue is located within the slide image, for instance for prognosis estimation or prediction of drug response tasks. The ability of our approach to discover associated regions of interest without prior localized annotations hence appears as a novel discovery approach for the field of pathology. Moreover, using the suggested localization from CHOWDER, one may considerably speed up the process of obtaining ground-truth localized annotations. A number of improvements can be made in the CHOWDER method, especially in the production of disease localization maps. As presented, we use the raw values from convolutional embedding layer, which means that the resolution of the produced disease localization map is fixed to that of the sampled tiles. However, one could also sample overlapping tiles and then use a data fusion technique to generate a final localization map. Additionally, as a variety of annotations may be available, CHOWDER could be extended to the case of heterogenous annotation, e.g. some slides with expert-produced localized annotations and those with only whole-slide annotations. 9 R EFERENCES Jaume Amores. Multiple instance classification: Review, taxonomy and comparative study. Artificial Intelligence, 201:81–105, 2013. Babak Ehteshami Bejnordi, Mitko Veta, and Paul Johannes van Diest et al. Diagnostic assessment of deep learning algorithms for detection of lymph node metastases in women with breast cancer. Journal of the American Medical Association, 318(22):2199–2210, 2017. Francesco Ciompi, Oscar Guessing, Babak Ehteshami Bejnordi, Gabriel Silva de Souza, Alexi Baidoshvili, Geert Litjens, Bram van Ginneken, Iris Nagtegaal, and Jeroen van der Laak. The importance of stain normalization in colorectal tissue classification with convolutional networks. arXiv Preprint [cs.CV]:1702.05931, 2017. Dan C. Cireşan, Alessandro Giusti, Luca M. Gambardella, and Jürgen Schmidhuber. Mitosis detection in breast cancer histology images with deep neural networks. In Int. Conf. on Medical Image Computing and Computer-Assisted Intervention, pp. 411–418, 2013. Angel Cruz-Roa, Ajay Basavanhally, Fabio González, Hannah Gilmore, Michael Feldman, Shirdar Ganesan, Natalie Shih, John Tomaszewski, and Anant Madabhushi. Automatic detection of invasive ductal carcinoma in whole slide images wiht convolutional neural networks. SPIE Medical Imaging, 9041, 2014. Cigdem Demir and Bülent Yener. Automated cancer diagnosis based on histopathological images: A systematic survey. Rensselaer Polytechnique Institute, Tech. Rep., 2005. Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. ImageNet: A large-scale hierarchical image database. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition, pp. 248–255, June 2009. Thomas G. Dietterich, Richard H. Lathrop, and Tomás Lozano-Pérez. Solving the multiple instance problem with axis-parallel rectangles. Artificial Intelligence, 89(1–2):31–71, 1997. Ugljesa Djuric, Gelareh Zadeh, Kenneth Aldape, and Phedias Diamandis. Precision histology: How deep learning is poised to revitalize histomorphology for personalized cancer care. npj Precision Oncology, 1(1): 22, June 2017. Thibault Durand, Nicolas Thome, and Matthieu Cord. WELDON: Weakly supervised learning of deep convolutional neural networks. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition, pp. 4743–4752, June 2016. Thibault Durand, Taylor Mordan, Nicolas Thome, and Matthieu Cord. WILDCAT: Weakly supervised learning of deep ConvNets for image classification, pointwise localization and segmentation. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition, pp. 642–651, July 2017. Metin N. Gurcan, Laura Boucheron, Ali Can, Anant Madabhushi, Nasir Rajpoot, and Bulent Yener. Histopathological image analysis: A review. IEEE Reviews in Biomedical Engineering, 2:147–171, 2009. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition, pp. 770–778, June 2016. Le Hou, Dimitris Samaras, Tahsin M. Kurc, Yi Gao, James E. Davis, and Joel H. Saltz. Patch-based convolutional neural network for whole slide tissue image classification. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition, pp. 2424–2433, June 2016. Hervé Jégou, Matthijs Douze, Cordelia Schmid, and Patrick Pérez. Aggregating local descriptors into a compact image representation. In Proc. IEEE Conf. on Computer Vision and Pattern Reconition, pp. 3304–3311, June 2010. Hanna Källén, Jesper Molin, Anders Heyden, Claes Lundström, and Kalle Åström. Towards grading gleason score using generically trained deep convolutional neural networks. In Proc. IEEE Int. Symp. on Biomedical Imaging, pp. 1163–1167, April 2016. Adnan Mujahid Khan, Nasir Rajpoot, Darren Treanor, and Derek Magee. A nonlinear mapping approach to stain normalization in digital histopathology images using image-specific color deconvolution. IEEE Trans. Biomedical Engineering, 61(6):1729–1738, 2014. Edward Kim, Miguel Cortre-Real, and Zubair Baloch. A deep semantic mobile application for thyroid cytopathology. Proc. SPIE, 9789, 2016. Diederik P. Kingma and Jimmy Ba. [cs.LG]:1412.6980, 2014. ADAM: A method for stochastic optimization. 10 arXiv Preprint Yann LeCunn, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015. Weixin Li and Nuno Vasconcelos. Multiple instance learning for soft bags via top instances. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition, pp. 4277–4285, June 2015. Geert Litjens, Clara I. Sanchez, Nadya Timofeeva, Meyke Hermsen, Iris Nagtegaal, Iringo Kovacs, Christina Hulsbergen van de Kaa, Peter Bult, Bram van Ginneken, and Jeroen van der Laak. Deep learning as a tool for increased accuracy and efficiency of histopathological diagnosis. Scientific Reports, (6):26286, 2016. Geert Litjens, Thijs Kooi, Babak Ehteshami Bejnordi, Arnaud Arindra Adiyoso Setio, Francesco Ciompi, Mohsen Ghafoorian, Jeroen A. W. M. van der Laak, Bram van Ginneken, and Clara I. Sanchez. A survey on deep learning in medical image analysis. arXiv Preprint [cs.CV]:1702.05747, 2017. Dennis Nikitenko, Michael A. Wirth, and Kataline Trudel. Applicability of white-balancing algorithms to restoring faded colour slides: An empirical evaluation. Journal of Multimedia, 3(5):9–18, 2008. N. Otsu. A threshold selection method from gray-level histograms. IEEE Transactions on Systems, Man, and Cybernetics, 9(1):62–66, 1979. Monique F. Santana and Luiz Carlos L. Ferreira. Diagnostic errors in surgical pathology. Jornal Brasileiro de Patologia e Medicina Laboratorial, 53(2):124–129, 2017. David R J Snead, Yee-Wah Tsang, Aisha Meskiri, Peter K Kimani, Richard Crossman, Nasir M Rajpoot, Elaine Blessing, Klaus Chen, Kishore Gopalakrishnan, Paul Matthews, Navid Momtahan, Sarah Read-Jones, Shatrughan Sah, Emma Simmons, Bidisa Sinha, Sari Suortamo, Yen Yeo, Hesham El Daly, and Ian A Cree. Validation of digital pathology imaging for primary histopathological diagnosis. Histopathology, 68(7): 1063–1072, 2016. Yang Song, Ju Jia Zou, Hang Chang, and Weidong Cai. Adapting Fisher vectors for histopathology image classification. In Proc. IEEE Int. Symp. on Biomedical Imaging, pp. 600–603, April 2017. Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition, pp. 1–9, June 2015. Dayong Wang, Aditya Khosla, Rishab Gargeya, Humayun Irshad, and Andrew H. Beck. Deep learning for identifying metastatic breast cancer. arXiv Preprint [q-bio.QM]:1606.05718, 2016. Donald L. Weaver. Pathology evaluation of sentinel lymph nodes in breast cancer: Protocol recommendations and rationale. Modern Pathology, 23:S26–S32, 2010. Yan Xu, Tao Mo, Qiwei Feng, Peilin Zhong, Maode Lai, and Eric I-Chao Chang. Deep learning of feature representation with multiple instance learning for medical image analysis. In Proc. IEEE Conf. on Acoustics, Speech and Signal Processing, pp. 1626–1630, May 2014. Yan Xu, Zhipeng Jia, Liang-Bo Wang, Yuqing Ai, Fang Zhang, Maode Lai, and Eric I-Chao Chang. Large scale tissue histopathology image classification, segmentation, and visualization via deep convolutional activation features. BMC Bioinformatics, 18(281):281, 2017. Yukako Yagi and John R. Gilbertson. Digital imaging in pathology: The case for standardization. Journal of Telemedicine and Telecare, 11(3):109–116, 2005. 11 A F URTHER R ESULTS Figure 5: Visualization of metastasis detection on test image 2 of the Camelyon-16 dataset using our proposed approach. Left: Full WSI at zoom level 6 with ground truth annotation of metastases shown via black border. Tiles with positive feature embeddings are colored from white to red according to their magnitude, with red representing the largest magnitude. Right: Detail of metastases at zoom level 2 overlaid with classification output of our proposed approach. Here, the output of all tested tiles are shown and colored according to their value, from blue to white to red, with blue representing the most negative values, and red the most positive. Tiles without color were not included when randomly selecting tiles for inference. 12 Figure 6: Visualization of metastasis detection on test image 92 of the Camelyon-16 dataset using our proposed approach. Left: Full WSI at zoom level 6 with ground truth annotation of metastases shown via black border. Tiles with positive feature embeddings are colored from white to red according to their magnitude, with red representing the largest magnitude. Right: Detail of metastases at zoom level 2 overlaid with classification output of our proposed approach. Here, the output of all tested tiles are shown and colored according to their value, from blue to white to red, with blue representing the most negative values, and red the most positive. Tiles without color were not included when randomly selecting tiles for inference. 13
1cs.CV
Dropout Rademacher Complexity of Deep Neural Networks Wei Gao, Zhi-Hua Zhou∗ arXiv:1402.3811v2 [cs.NE] 2 Jul 2014 National Key Laboratory for Novel Software Technology Nanjing University, Nanjing 210093, China Abstract Great successes of deep neural networks have been witnessed in various real applications. Many algorithmic and implementation techniques have been developed; however, theoretical understanding of many aspects of deep neural networks is far from clear. A particular interesting issue is the usefulness of dropout, which was motivated from the intuition of preventing complex co-adaptation of feature detectors. In this paper, we study the Rademacher complexity of different types of dropout, and our theoretical results disclose that for shallow neural networks (with one or none hidden layer) dropout is able to reduce the Rademacher complexity in polynomial, whereas for deep neural networks it can amazingly lead to an exponential reduction. Key words: Deep learning, neural network, generalization, Rademacher complexity, overfitting Deep neural networks [HS06] has become a hot wave during the past few years, and great successes have been achieved in various applications, such as object recognition [CMGS10, CMS12, CHW+ 13], video analysis [MCW09, GLL+ 09, BLRF11], speech recognition [DYDA12, HDY+ 12, DSH13], etc. Many effective algorithmic and implementation techniques have been developed; however, theoretical understanding of many aspects of deep neural networks is far from clear. It is well known that deep neural networks are complicated models with rich representations. For really deep networks, there may be millions or even billions of parameters, and thus, there are high risks of overfitting even with large-scale training data. Indeed, controlling the overfitting risk is a long-standing topic in the research of neural networks, and various techniques have been developed, such as weight elimination [ADB91], early stopping [AMM+ 97], Bayesian control [Nea96], etc. ∗ Corresponding author. Email: [email protected] Preprint submitted for review July 3, 2014 Dropout is among the key ingredients of the success of deep neural networks. The main idea is to randomly omit some units, either hidden ones or input ones corresponding to different input features; this is executed with certain probability in the forward propagation of training phase, and the weights related to the remaining units are updated in back propagation. This technique is evidently related to overfitting control, though it was proposed with the intuition of preventing complex co-adaptations by encouraging independent contributions from different features during training phase [HSK+ 12]. Extensive empirical studies [HSK+ 12, KSH12, WZZ+ 13] verified that dropout is able to improve the performance and reduce ovefitting risk. However, theoretical understanding of dropout is far from clear. In this paper, we study the influence on Rademacher complexity by three types of dropouts, i.e., dropout of units [HSK+ 12], dropout of weights [WZZ+ 13] and dropout both. Our theoretical results disclose that for shallow neural networks with none or one hidden layer, dropout is able to reduce the Rademacher complexity in polynomial, whereas for deep neural networks it is able to reach an exponential reduction of Rademacher complexity. Related Work There are several designs of dropout, such as the fast dropout [WM13] and adaptive dropout [BF13], whereas the most fundamental dropouts are the dropout of units (hidden units, or input units corresponding to input features) [HSK+ 12] and the dropout of weights [WZZ+ 13]. Baldi and sadowski [2013] studied the average and regularizing properties of dropout, and Wager et al. [2013] showed that dropout is first-order regular equivalent to an L regularizer applied after scaling the features by an estimate of the inverse diagonal Fisher information matrix. The generalization bound of dropout has been analyzed in [McA13, WZZ+ 13]. McAllester [2013] presented PAC-Bayesian bounds, whereas Wan et al. [2013] derived Rademacher generalization bounds. Both their results show that the reduction of complexity brought by dropout is O(ρ), where ρ is the probability of keeping an element in dropout. In contrast to previous studies [McA13, WZZ+ 13], we present better generalization bounds and disclose that dropout is able to reduce the Rademacher complexity exponentially, i.e., O(ρk+1 ) or O(ρ(k+1)/2 ) for different types of dropout, where k is the number of hidden layers within neural networks. 2 Extensive work [KM97, AB09, and reference therein] studied the complexity of neural network based on VC-dimension, covering number, fat-shatter dimension, etc., and it was usually shown that these complexities are polynomial in the total number of units and weights. Note that the polynomial complexities are still very high for deep neural networks that may have million or even billions of parameters. Moreover, it is worth noting that these complexities measure the function space in the worst case, and cannot distinguish situations with/without dropouts. In contrast, we show that Radermacher complexity is proper to study the influence of dropouts, and we prove that the complexities of neural network can be bounded by the L1 or L2 -norm of weights, irrelevant to the number of units and weights. This paper is organized as follows: Section 1 introduces some preliminaries. Section 2 presents general Rademacher generalization bounds for dropout. Section 3 analyzes the usefulness of different types of dropouts on shallow as well as deep neural networks. Section 4 concludes. 1. Preliminaries Let X ⊂ Rd and Y be the input and output space, respectively, where Y ⊂ R for regression and Y = {+1, −1} for binary classification. Throughout this paper, we restrict our attention on regression and binary classification, and it is easy to make similar analysis for multi-class tasks. Let D be an unknown (underlying) distribution over X × Y. Let W be the weight space for neural network, and denote by f (w, x) the general output of a neural network with respect to input x ∈ X and weight w ∈ W. Here f depends on the structure of neural network. During training neural network, dropout randomly omits hidden units, input units corresponding to input features, and connected weights with certain probability; therefore, it is necessary to introduce another space R = {r = (r1 , r2 , . . . , rs ) : ri ∈ {0, 1}} where s depends on different neural networks and different types of dropout, and ri = 0 implies dropping out some hidden unit, input unit and weight. Here each ri is drawn independently and identically from a Bernoulli distribution with parameter ρ, denoted by Bern(ρ). Further, we denote by f (w, x, r) the dropout output of a neural network, and write FW = {f (w, x, r) : w ∈ W}, 3 as the function space for dropout. Here we just present a general output f (w, x, r) for dropout, and detailed expressions will be given for specific neural network in Section 3. An objective function (or loss function) ℓ is introduced to measure the performance of output of neural network. For example, least square loss and cross entropy are used for regression and binary classification, respectively. We define the expected risk for dropout as R(w) = Er,(x,y) [ℓ(f (w, x, r), y)]. The goal is to find a w∗ ∈ W so as to minimize the expected risk, i.e., w∗ ∈ arg minw∈W R(w). Notice that the distribution D is unknown, but it is demonstrated by a training sample Sn = {(x1 , y1 ), (x2 , y2 ), . . . , (xn , yn )} which are drawn i.i.d. from distribution D. Given sample Sn and RSn = {r1 , r2 , . . . , rn }, we define the empirical risk for dropout as n 1X R̂(w, Sn , RSn ) = ℓ(f (w, xi , ri ), yi ). n i=1 In this paper, we try to study on generalization bounds for dropouts, i.e., the gap between R(w) and R̂(w, Sn , RSn ). Rademacher complexity has always been an efficient measure for function space [BM02, KP02]. For function space H, the classical Rademacher complexity is defined by n i 1X ǫi h(xi ) R̂n (H) = E sup h∈H n h (1) i=1 where ǫ1 , . . . , ǫn are independent random variables uniformly chosen from {+1, −1}, and they are referred as Rademacher variables. Rademacher complexity has been used to develop datadependent generalization bounds in diverse learning tasks [MZ03, Mau06, CMR10]. For notational simplicity, we denote by [n] = {1, 2, . . . , n} for integer n > 0. The inner product Pd between w = (w1 , . . . , wd ) and x = (x1 , . . . , xd ) is given by hw, xi = i=1 wi xi , and write p Pd kwk = kwk2 = hw, wi and kwk1 = i=1 |wi |. Further, the entrywise product (also called Schur product or Hadamard product) is defined as w ⊙ x = (w1 x1 , . . . , wd xd ). 2. General Rademacher Generalization Bounds In conventional studies, the generalization performance is mostly affected by training sample, and thus, standard Rademacher complexity is defined on training sample only (as shown in Eq. 1). 4 For dropout, however, the generalization performance is not only relevant to training sample, but also dropout randomization; thus, we generalize the Rademacher complexity as follows: Definition 1 For spaces Z and R, let H : Z × R → R be a real-valued function space. For Sn = {z1 , . . . , zn } and RSn = {r1 , . . . , rn }, the empirical Rademacher complexity of H is defined to be n 1 X h i R̂n (H, Sn , RSn ) = Eǫ sup ǫi h(zi , ri ) h∈H n i=1 where ǫ = (ǫ1 , . . . , ǫn ) are Rademacher variables. Further, we define the Rademacher complexity of H as Rn (H) = ESn ,RSn [R̂n (H, Sn , RSn )]. Based on this definition, it is easy to get a useful lemma as follows: P P Lemma 1 For function space H, define absconv(H) = { αi hi : hi ∈ H and |αi | = 1}. Then, we have R̂n (H, Sn , RSn ) = R̂n (absconv(H), Sn , RSn ). Given a set W, we denote by composite function space for dropout as ℓ ◦ FW := {((x, y), r) → ℓ(f (w, x, r), y), w ∈ W}. Based on the generalized Rademacher complexity, we present the general Rademacher generalization bounds for dropout as follows: Theorem 1 Let Sn = {(x1 , y1 ), (x2 , y2 ), . . . , (xn , yn )} be a sample chosen i.i.d. according to distribution D, and let RSn = {r1 , r2 , . . . , rn } be random variable sample for dropout. If the loss function ℓ is bounded by B > 0, then for every δ > 0 and w ∈ W, the following holds with probability at least 1 − δ, p ln(2/δ)/n, p R(w) ≤ R̂(w, Sn , RSn ) + 2R̂n (ℓ ◦ FW , Sn , RSn ) + 3B ln(2/δ)/n. R(w) ≤ R̂(w, Sn , RSn ) + 2Rn (ℓ ◦ FW ) + B 5 (2) (3) The proof is motivated from the techniques in [BM02]. We can easily find that the difference √ between Eq. 2 and the bound without dropout from [KP02] is a constant 1/ 2. Proof: For every w ∈ W, it is easy to observe R(w) ≤ R̂(w, Sn , RSn ) + sup[R(w) − R̂(w, Sn , RSn )], w and we further denote by h n i 1X ℓ(f (w, xi , ri ), yi ) . Φ(Sn , RSn ) = sup[R(w) − R̂(w, Sn , RSn )] = sup R(w) − n w w i,(x′i ,yi′ ) Let Sn i=1 = {(x1 , y1 ), . . . , (x′i , yi′ ), . . . , (xn , yn )} be the sample whose i-th example (xi , yi ) in i,r′i Sn is replaced by (x′i , yi′ ), and RSn = {r1 , . . . , r′i , . . . , rn } be the random variable vector with i-th variable ri replaced by r′i . For bounded loss |ℓ| < B, we have i,r′ i,(x′i ,yi′ ) |Φ(Sn , RSn ) − Φ(Sn , RSn i )| ≤ B/m and |Φ(Sn , RSn ) − Φ(Sn , RSn )| ≤ B/m. Based on McDiarmid’s inequality [McD89], it holds that with probability at least 1 − δ, Φ(Sn , RSn ) ≤ ESn ,RSn [Φ(Sn , RSn )] + B p ln(2/δ)/n. fn = Define a ghost sample S̃n = {(x̃1 , ỹ1 ), . . . , (x̃n , ỹn )} and a ghost random variable vector RS {r̃1 , . . . , r̃1 }. By using the fact f Φ(Sn , RSn ) = sup[ES̃n ,RS f n [R̂(w, S̃n , RS n ) − R̂(w, Sn , RSn )]], w we have  h i f n ) − R̂(w, Sn , RSn ) ESn ,RSn [Φ(Sn , RSn )] ≤ E sup R̂(w, S̃n , RS w   Pn  i=1 ℓ(f (w, x̃i , r̃i ), ỹi ) − ℓ(f (w, xi , ri ), yi ) = E sup n w # " n 1X ǫi ℓ(f (w, xi , ri ), yi ) = 2Rn (ℓ ◦ FW ) ≤ 2E sup w n i=1 which completes the proofs of Eq. 2. Again, we apply McDiarmid’s inequality to R̂n (W, Sn , RSn ), we have Rn (ℓ ◦ FW ) ≤ R̂n (ℓ ◦ FW , Sn , RSn ) + B p ln(2/δ)/n 6 which completes the proof of Eq. 3.  The main benefit of dropout lies in the sharp reduction on Rademacher complexities of Rn (FW ) as will been shown in Section 3; on the other hand, extensive experiments show that dropout decreases the empirical risk R̂(w, Sn , RSn ) [HSK+ 12, KSH12, WZZ+ 13] because dropout intuitively prevents complex co-adaptations by encouraging independent contributions from different features during training phase [HSK+ 12]. This paper tries to present theoretical analysis on the the former, and leave the latter to future work. To efficiently estimate Rn (ℓ ◦ FW ), we introduce a concentration as follows: Lemma 2 [LT02] Let H be a bounded real-valued function space from some space Z and z1 , . . . , zn ∈ Z. Let φ : R → R be Lipschitz with constant L and φ(0) = 0. Then, we have 1 X 1 X ǫi φ(h(zi )) ≤ LEǫ sup ǫi h(zi ). h∈H n h∈H n Eǫ sup i∈[n] i∈[n] Based on this lemma, we have Lemma 3 If ℓ(·, ·) is Lipschitz with the first argument and constant L, then we have Rn (ℓ ◦ FW ) ≤ LRn (FW ). Proof: We first write ℓ′ (·, ·) = ℓ(·, ·) − ℓ(0, ·), and it is easy to get Rn (ℓ ◦ FW ) = Rn (ℓ′ ◦ FW ). This lemma holds by applying Lemma 2 to ℓ′ .  For classification, we always use the entropy loss as the loss function in neural network as follows: ℓ(f (w, x, r), y) = y ln(y/φ(f (w, x, r))) + (1 − y) ln((1 − y)/(1 − φ(f (w, x, r)))), where φ(t) = 1/(1 + e−t ). It is easy to find that ∂ℓ(f (w, x, r), y)/∂f (w, x, r) ∈ [−1, 1], and thus ℓ(·, ·) is a Lipschitz function with the first argument. For regression, we always use the square loss as the loss function in neural network as follows: ℓ(f (w, x, r), y) = (y − f (w, x, r))2 . 7 For bounded f (w, x, r) and y, it is easy to find that ℓ(·, ·) is a Lipschitz function with the first argument. Based on Lemma 3, it is easy to estimate Rn (ℓ ◦ FW ) from Rn (FW ); therefore, we will focus on how to estimate Rn (FW ) for different types of dropouts and different neural networks in the subsequent section. Finally, we introduce a useful lemma as follows: Lemma 4 Let r1 = (r11 , . . . , r1d ) and r2 = (r21 , . . . , r2d ) be two random variable vectors, and each element in r1 and r2 is drawn i.i.d. from distribution Bern(ρ). For x ∈ X , we have Er1 [hx ⊙ r1 , x ⊙ r1 i] = ρhx, xi, (4) Er1 ,r2 [hx ⊙ r1 ⊙ r2 , x ⊙ r1 ⊙ r2 i] = ρ2 hx, xi. (5) Further, let r = (r1 , . . . , rk ) be k random variables drawn i.i.d. from distribution Bern(ρ). We have E D Qk Qk Er1 ,r x ⊙ r1 i=1 ri , x ⊙ r1 i=1 ri = ρk+1 hx, xi, E D Qk Qk Er,r1 ,r2 x ⊙ r1 ⊙ r2 i=1 ri , x ⊙ r1 ⊙ r2 i=1 ri = ρk+2 hx, xi. (6) (7) Proof: Let x = (x1 , . . . , xd ). From the definitions of inner product and entrywise product, Eq. 4 holds from Er1 [hx ⊙ r1 , x ⊙ r1 i] = Er1 d hX 2 xj xj r1j j=1 i =ρ d X xj xj j=1 2 ] = ρ since r where we use the fact Er1j [r1j 1j is drawn i.i.d. from distribution Bern(ρ). In Qk 2 r 2 ] = ρ2 , E 2 1+k and a similar manner, Eqs. 5-7 hold from Er1j ,r2j [r1j r,r1j [r1j 2j i=1 (ri ) ] = ρ Qk 2 2+k , respectively. This lemma follows as desired. 2 r2  Er,r1j ,r2j [r1j 2j i=1 (ri ) ] = ρ 3. Dropouts on Different Types of Network We study the two types of most fundamental dropouts: dropout units [HSK+ 12] and dropout weights [WZZ+ 13]. In addition, we also study dropout both units and weights. For ρ ∈ [0, 1], these types of dropouts are defined as: 8 • Type I (Drp(I) ): randomly drop out each unit including input unit (corresponding to input feature) with probability 1 − ρ. • Type II (Drp(II) ): randomly drop out each weight with probability 1 − ρ. • Type III (Drp(III) ): randomly drop out each weight and unit including input unit (corresponding to input feature) with probability 1 − ρ. We assume that a full-connected neural network has k hidden layers, and the ith hidden layer has mi hidden units. The general output for this neural network is given by [k] [i−1] f (w, x) = hw1 , Ψk i with Ψi = (σ(hw1 [k−1] [k] and Ψ0 = x, where w = (w1 , w1 [i−1] , Ψi−1 i), . . . , σ(hwm , Ψi−1 i)) for i ∈ [k] i [k−1] [0] [0] [j] , . . . , wmk , . . . , w1 , . . . , wm1 ) in which each wi has the same size as Ψj and σ is an activation function. Throughout this work, we assume that activation function σ is Lipschitz with constant L and σ(0) = 0, and many commonly used activation functions satisfy such assumptions, e.g., tanh, center sigmoid, relu [NH10], etc. Formally, three types of dropouts for the full-connected network are defined as: • The output for Drp(I) (first type) is given by [k] f (I) (w, x, r) = hw1 , Ψk ⊙ r[k] i with [i−1] Ψi = (σ(hw1 (8) [i−1] , Ψi−1 ⊙ r[i−1] i), . . . , σ(hwm , Ψi−1 ⊙ r[i−1] i)) i for i ∈ [k] and Ψ0 = x. Here r = (r[k] , . . . , r[1] , r[0] ), each r[i] has the same size with Ψi and each element in r[i] is drawn i.i.d. from Bern(ρ). • The output for Drp(II) (second type) is given by [k] [k] f (II) (w, x, r) = hw1 ⊙ r1 , Ψk i with [i−1] Ψi = (σ(hw1 [i−1] ⊙ r1 [k] [k−1] for i ∈ [k] and Ψ0 = x. Here r = {r1 , r1 [j] (9) [i−1] [i−1] , Ψi−1 i), . . . , σ(hwm ⊙ rm , Ψi−1 i)) i i [k−1] [0] [0] , . . . , rmk , . . . , r1 , . . . , rm1 }, and for 0 ≤ j ≤ k, [j] ri has the same size with Ψj , and each element in ri is drawn i.i.d. from Bern(ρ). 9 • The output for Drp(III) (third type) is given by [k] [k] [k] f (III) (w, x, r) = hw1 ⊙ r1 , Ψk ⊙ r2 i with [i−1] Ψi = (σ(hw1 [i−1] ⊙ r1 [i−1] (10) [i−1] [i−1] [i−1] , Ψi−1 ⊙ rmi +1 i), . . . , σ(hwm ⊙ rm , Ψi−1 ⊙ rmi +1 i)) i i [k] [k] [0] [0] [i] for i ∈ [k] and Ψ0 = x. Here r = (r1 , r2 , . . . , r1 , . . . , rm1 +1 ), and for 0 ≤ j ≤ k, rj has [i] the same size with Ψj , and each element in rj is drawn i.i.d. from Bern(ρ). Given a set W, we denote by (I) = {f (I) (w, x, r) : w ∈ W} (11) (II) = {f (II) (w, x, r) : w ∈ W} (12) (III) = {f (III) (w, x, r) : w ∈ W} (13) FW FW FW where f (I) (w, x, r), f (II) (w, x, r) and f (III) (w, x, r) are defined in Eqs. 8-10. We will focus on full-connected neural networks, either shallow ones (with none or one hidden layer) and deep ones (with more hidden layers ). 3.1. Shallow Network without Hidden Layer We first consider the shallow network without hidden layer, and therefore, the output is a linear function, i.e., f (w, x) = hw, xi. Further, the outputs for Drp(I) , Drp(II) and Drp(III) are given, respectively, by f (I) (w, x, r) = hw, x ⊙ ri f (II) (w, x, r) = hw ⊙ r, xi f (III) (w, x, (r1 , r2 )) = hw ⊙ r1 , x ⊙ r2 i where r, r1 and r2 are of size d, and each element in r, r1 and r2 is drawn i.i.d. from Bern(ρ). The following theorem shows the Rademecher complexity for three types dropouts: (I) (II) Theorem 2 Let W = {w : kwk < B1 }, X = {x : kxk ≤ B2 }, and FW , FW defined in Eqs. 11-13. Then, we have (1) (2) Rn (FW ) = Rn (FW ) ≤ B1 B2 p ρ/n and 10 √ (3) Rn (FW ) ≤ B1 B2 ρ/ n. (III) and FW are If we do not drop out any weights and input units (corresponding to input features), i.e., ρ = 1, then the above theorem gives a similar estimation for the Rademacher complexity of linear function space as stated in [KST08, Theorem 3]. Also, these complexities are independent to feature dimension, and thus can be applied to high-dimensional data. In addition, such result has independent interests in missing feature problems. Proof: (I) (II) From hw ⊙ r, xi = hw, x ⊙ ri, it is easy to prove Rn (FW ) = Rn (FW ). For Sn = {x1 , . . . , xn } and RSn = {r1 , . . . , rn }, we have n (I) R̂n (FW , Sn , RSn ) = X 1 Eǫ sup ǫi hw, xi ⊙ ri i n w∈W i=1 where ǫ = (ǫ1 , . . . , ǫn ) are rademacher variables, and this yields that (I) R̂n (FW , Sn , RSn ) E D X 1 ǫi xi ⊙ ri . = Eǫ sup w, n w∈W n i=1 By using the Cauchy-Schwartz inequality ha, bi ≤ kakkbk and kwk ≤ B1 , we have (I) R̂n (FW , Sn , RSn ) ≤ B1 Eǫ n = B1 n ≤ n X n X i=1 j=1 n n XX i=1 j=1 n X B1 ǫi xi ⊙ ri Eǫ n i=1 1/2 ǫi ǫj hxi ⊙ ri , xj ⊙ rj i 1/2 Eǫi ,ǫj ǫi ǫj hxi ⊙ ri , xj ⊙ rj i where the last inequality holds from Jensen’s inequality. Since Eǫi ,ǫj ǫi ǫj = 0 for i 6= j and Eǫi ǫi ǫi = 1 for rademacher variables, we have (I) R̂n (FW , Sn , RSn ) n 1 B1  X 2 ≤ hxi ⊙ ri , xi ⊙ ri i . n i=1 Based on the above inequality, it holds that (I) (I) Rn (FW ) = ESn ,RSn [R̂n (FW , Sn , RSn )] n 1/2 X B1 hxi ⊙ ri , xi ⊙ ri i ≤ ESn ,RSn n i=1 ≤ B1 ESn n n X i=1 1/2 Eri hxi ⊙ ri , xi ⊙ ri i where the second inequality holds from Jensen’s inequality. Finally, we have (I) Rn (FW ) ≤ B1 B2 p ρ/n 11 (14) from kxi k ≤ B2 and Eq. 4. √ (III) In a similar manner, we have Rn (FW ) ≤ B1 B2 ρ/ n from hw ⊙ r1 , x ⊙ r2 i = hw, x ⊙ r1 ⊙ r2 i and Eq. 5. This theorem follows as desired.  3.2. Shallow Network with One Hidden Layer We consider the shallow network with only one hidden layer, and assume that the hidden layer has m hidden units. The output for such network is given by [0] [0] , x)i f (w, x) = hw[1] , Ψ(w1 , . . . , wm with [0] [0] [0] [0] , xi)) , x) = (σ(hw1 , xi), . . . , σ(hwm Ψ(w1 , . . . , wm [0] [0] (15) [0] where w = (w[1] , w1 , . . . , wm ), and w[1] and wi (i ∈ [m]) are of size m and d, respectively. From Eqs. 8-10, the outputs for Drp(I) , Drp(II) and Drp(III) are given, respectively, by [1] [0] [0] [0] f (I) (w, x, r) = hw[1] , r1 ⊙ Ψ(w1 , . . . , wm , x ⊙ r1 )i [1] [0] [0] [0] f (II) (w, x, r) = hw[1] ⊙ r1 , Ψ(w1 ⊙ r1 , . . . , wm ⊙ r[0] m , x)i and [1] [1] [0] [0] [0] [0] [0] f (III) (w, x, r) = hw[1] ⊙ r1 , r2 ⊙ Ψ(w1 ⊙ r1 , . . . , wm ⊙ r1 , x ⊙ rm+1 )i [1] [0] where Ψ is defined in Eq. 15. Here ri and rj are of size m and d, respectively, and each element [1] in ri [0] and rj is drawn i.i.d. from Bern(ρ). The following theorem shows the Rademecher complexity for three types dropouts. [0] [0] [0] Theorem 3 Let W = {(w[1] , w1 , . . . , wm ) : kw[1] k1 ≤ B1 , kwi k ≤ B0 }, X = {x ∈ Rd : kxk ≤ (I) (II) (III) B̂} and FW , FW , FW are defined in Eqs. 11-13. Suppose that the activation σ is Lipschitz with constant L and σ(0) = 0. Then, we have √ (II) (I) Rn (FW ) ≤ Rn (FW ) ≤ LB1 B0 B̂ρ/ n and 12 √ (III) Rn (FW ) ≤ LB1 B0 B̂ρ2 / n. Proof: We first have (II) (I) Rn (FW ) ≤ Rn (FW ) [0] [0] from f (II) (w, x, r) = f (I) (w, x, r′ ) by selecting r1 = · · · = rm = r′[0] and r[1] = r′[1] . In the (II) following, we will estimate Rn (FW ). Given Sn = {x1 , . . . , xn } and RSn = {r1 , . . . , rn }, it holds that (II) R̂n (FW , Sn , RSn ) [0] [0] = n X  1  [1] [1] ǫi ri ⊙ ∆i Eǫ sup w , n w i=1 [1] w n  1 X [1] , ǫ r ⊙ ∆ ≤ B1 Eǫ sup i i i kw[1] k1 n i=1 w [0]  [0] where ∆i = Ψ(w1 ⊙ ri1 , . . . , wm ⊙ rim , xi ) and Ψ is defined by Eq. 15 and the inequality holds from kw[1] k1 ≤ B. From Lemma 1, we have (II) R̂n (FW , Sn , RSn ) n X [1] B1 [0] [0] ǫi ri1 σ(hw1 ⊙ ri1 , xi i). Eǫ sup ≤ n [0] w 1 From σ(0) = 0 and [1] ri1 (16) i=1 [1] [1] ∈ {0, 1}, we have ri1 σ(t) = σ(ri1 t). Since σ(·) is Lipschitz with constant L, Lemma 2 gives n n X X [0] [0] [1] [1] [0] [0] ǫi hw1 ⊙ rij , ri1 xi i ǫi ri1 σ(hw1 ⊙ ri1 , xi i) ≤ LEǫ sup Eǫ sup [0] w1 [0] i=1 w1 i=1 Similarly to the proof of Eq. 14, we have n n 1 X X 2 [1] [0] [1] [0] [0] [1] [0] hri1 xi ⊙ ri1 , ri1 xi ⊙ ri1 i . ǫi hw1 , ri1 xi ⊙ ri1 i = B0 Eǫ sup [0] w1 i=1 i=1 Combining with the previous analysis, we have (II) (II) Rn (FW ) = E[R̂n (FW , Sn , RSn )] n 1 X LB1 B0 2 [1] [0] [1] [0] ≤ ESn ,RSn hri1 xi ⊙ ri1 , ri1 xi ⊙ ri1 i n i=1 n X LB1 B0 [1] [0] [1] [0] ESn ERSn hri1 xi ⊙ ri , ri1 xi ⊙ ri i n i=1 √ ≤ LB1 B0 B̂ρ/ n, ≤ where the last inequality holds from kxi k ≤ B̂ and Eq. 6. √ (III) In a similar way, we can prove Rn (FW ) ≤ B1 B0 B̂ρ2 / n by combining with Eqs. 6-7, and hw ⊙ r1 , x ⊙ r2 i = hw, x ⊙ r1 ⊙ r2 i. This completes the proof. 13  3.3. Deep Network with k Hidden Layers Now we consider the neural network with k (k ≥ 1) hidden layers, and the ith layer has mi hidden units (i ∈ [k]). The output for this neural network is given by [k] f (w, x) = hw1 , Ψk i with Ψ0 = x, and for i ∈ [k] [i−1] Ψi = (σ(hw1 [i−1] , Ψi−1 i), . . . , σ(hwmi , Ψi−1 i)), and three types of dropout Drp(I) , Drp(II) and Drp(III) are defined by Eqs. 8-10. The following theorem shows the Rademecher complexity for three types dropouts: [k] [k−1] Theorem 4 Let W = {(w1 , w1 [0] [0] [k−1] [0] [j] , . . . , wmk , . . . , w1 , . . . , wm2 ) : kwi k ≤ B0 , kwi k1 ≤ (I) (III) (II) Bj for j ≥ 1}, X = {x ∈ Rd : kxk ≤ B̂}, and FW , FW , and FW are defined in Eqs. 11- 13. Suppose that the activation σ is Lipschitz with constant L and σ(0) = 0. Then, we have (I) Rn (FW ) ≤ (II) Rn (FW ) k ρ(k+1)/2 k Y ≤ √ Bj L B̂ n and (III) Rn (FW ) j=0 k Y ρ(k+1) ≤ √ Lk B̂ Bj . n j=0 This theorem shows that dropout can lead to an exponential reduction of the Rademacher complexity with respect to the number of hidden layers within neural network. If we do not drop out any weights and units (including hidden units, or input units corresponding to input features), i.e., ρ = 1, then the above theorem improves the results in [Bar98, Lemma 26]. The Rademacher complexities are dependent on the norms of weights, but irrelevant to the number of units and weights in the network, as well as the dimension of input datasets. Proof: We first have (I) (II) Rn (FW ) ≤ Rn (FW ) [i] [i] from f (II) (w, x, r) = f (I) (w, x, r′ ) by selecting r1 = · · · = rmi+1 = r′[i] for 0 ≤ i ≤ k − 1 and [k] [k] r1 = r′ 1 . For any Sn = {x1 , . . . , xn } and RSn = {r1 , . . . , rn }, we will prove that (II) R̂n (FW , Sn , RSn ) ≤ k n k iY X Y Lk h [0] [0] [s] Bj ǫi w1 ⊙ ri,1 , xi ri,js+1 ,js Eǫ sup n [0] w s=1 1 j=1 i=1 14 (17) by induction on k, i.e., the number of layers in neural network, where jk+1 = 1. It is easy to find the above holds for k = 1 from Eq. 16. Assume that Eq. 17 holds for neural network within k − 1 layers (k ≥ 2), and in the following we will prove for neural network with in k layers. [k] For kw1 k1 ≤ Bk , we have (II) R̂n (FW , Sn , RSn ) n X 1 [k] [k] = Eǫ sup ǫi hw1 ⊙ ri1 , Ψik i n w i=1 n n E B D D w[k] X E X 1 [k] [k] [k] k 1 ǫi Ψik ⊙ ri1 ≤ Eǫ sup w1 , Eǫ sup ǫ Ψ ⊙ r , i ik i1 [k] n n w w kw k1 = i=1 [j−1] where Ψij = (σ(hw1 [j−1] ⊙ ri1 i=1 1 [j−1] , Ψi,j−1 i), . . . , σ(wmj [j−1] ⊙rmj , Ψi,j−1 )) for j ∈ [k] and Ψi0 = xi . From Lemma 1, we have Eǫ sup w D w[k] 1 , n X [k] kw1 k1 i=1 [k] ǫi Ψik ⊙ ri1 E ≤ Eǫ sup w n X i=1 [k] [k−1] ǫi ri,1,1 × σ(hw1 [k−1] ⊙ ri,1 , Ψi,k−1 i), which yields that n (II) R̂n (FW , Sn , RSn ) ≤ X [k] Bk [k−1] [k−1] ǫi ri,1,1 × σ(hw1 ⊙ ri,1 , Ψi,k−1 i) Eǫ sup n w i=1 Since σ(0) = 0 and σ is Lipschitz with constant L, Lemma 2 gives n (II) R̂n (FW , Sn , RSn ) ≤ [k] X [k] LBk [k−1] [k−1] ǫi ri,1,1 hw1 ⊙ ri,1 , Ψi,k−1 i. Eǫ sup n w (18) i=1 [k] By using ri,1,1 σ(t) = σ(ri,1,1 t), the term n X [k] 1 [k−1] [k−1] ǫi ri,1,1 hw1 ⊙ ri,1 , Ψi,k−1 i Eǫ sup n w i=1 can be viewed as the empirical Rademacher for another k−1 layers neural network with respect to [k] [k−1] [k] sample Sn′ = {x1 ri,1,1 , . . . , xn ri,1,1 } and RSn′ = (r1 [k−2] , r1 [k−2] [0] [0] , . . . , rmk−2 , r1 , . . . , rm1 ). Therefore, by our assumption that Eq. 17 holds for any k − 1 layers neural network, we have n X [k] 1 [k−1] [k−1] ǫi ri,1,1 hw1 ⊙ ri,1 , Ψi,k−1 i Eǫ sup n w i=1 Qk−1 k−1 n k−1 Y [s] X L [0] [0] i=1 Bi ri,js+1,js ǫi w1 ⊙ ri,1 , xi ≤ Eǫ n s=1 i=1 which proves that Eq. 17 holds for k layers neural network by combining with Eq.18. 15 Similarly to the proof of Theorem 2, the term in Eq. 17 can be further bounded by Eǫ sup [0] w1 n X [0] ǫi w 1 i=1 ≤ B0 ⊙ [0] ri,1 , xi k Y [s] ri,js+1 ,js s=1 k k 1 X Y Y 2 [s] [0] [s] [0] ri,js+1 ,js i ri,js+1,js , ri,1 ⊙ xi hri,1 ⊙ xi s=1 s=1 i which yields that, from kxi k ≤ B̂ and Eq. 6, (II) Rn (FW ) k Y 1 Bi . ≤ √ Lk ρ(k+1)/2 B̂ n i=0 In a similar manner, we can prove that (III) Rn (FW ) k Y 1 ≤ √ Lk ρk+1 B̂ Bi , n i=0 by using Eq. 7, and this completes the proof.   4. Conclusion Deep neural networks have witnessed great successes in various real applications. Many implementation techniques have been developed, however, theoretical understanding of many aspects of deep neural networks is far from clear. Dropout is an effective strategy to improve the performance as well as reduce the influence of overfitting during training of deep neural network, and it is motivated from the intuition of preventing complex co-adaptation of feature detectors. In this work, we study the Rademacher complexity of different types of dropout, and our theoretical results disclose that for shallow neural networks (with one or none hidden layer) dropout is able to reduce the Rademacher complexity in polynomial, whereas for deep neural networks it can amazingly lead to an exponential reduction of the Rademacher complexity. An interesting future work is to present tighter generalization bounds for dropouts. In this work, we focused on very fundamental types of dropouts. Analyzing other types of dropouts is another interesting issue for future work, and we believe that the current work sheds a light on the way for the analysis. 16 References [AB09] M. Anthony and P. L. Bartlett. Neural network learning: Theoretical foundations. Cambridge University Press, 2009. [ADB91] S. W. Andreas, E. R. David, and A. H. Bernardo. Generalization by weight- elimination with application to forecasting. In Advances in Neural Information Processing Systems 3, pages 875–882. MIT Press, Cambridge, MA, 1991. [AMM+ 97] S.-i. Amari, N. Murata, K.-R. Muller, M. Finke, and H. Yang. Asymptotic statistical theory of overtraining and cross-validation. IEEE Transactions on Neural Networks, 8(5):985–996, 1997. [Bar98] P. L. Bartlett. The sample complexity of pattern classification with neural networks: the size of the weights is more important than the size of the network. IEEE Transactions on Information Theory, 44(2):525–536, 1998. [BF13] J. Ba and B. Frey. Adaptive dropout for training deep neural networks. In Advances in Neural Information Processing Systems 26, pages 3084–3092. MIT Press, Cambridge, MA, 2013. [BLRF11] L. Bo, K. Lai, X. Ren, and D. Fox. Object recognition with hierarchical kernel descriptors. In IEEE Conference on Computer Vision and Pattern Recognition, pages 1729–1736, Colorado Springs, CO, 2011. [BM02] P. L Bartlett and S. Mendelson. Rademacher and gaussian complexities: Risk bounds and structural results. Journal of Machine Learning Research, 3:463–482, 2002. [CHW+ 13] A. Coates, B. Huval, T. Wang, D. Wu, A. Y. Ng, and B. Catanzaro. Deep learning with COTS HPC systems. In Proceedings of the 30th International Conference on Machine Learning, pages 1337–1345, Atlanta, GA, 2013. [CMGS10] D. C. Cireşan, U. Meier, L. M. Gambardella, and J. Schmidhuber. Deep, big, simple neural nets for handwritten digit recognition. Neural Computation, 22(12):3207–3220, 2010. 17 [CMR10] C. Cortes, M. Mohri, and A. Rostamizadeh. Generalization bounds for learning kernels. In Proceedings of the 27th International Conference on Machine Learning, pages 247–254, Haifa, Israel, 2010. [CMS12] D. C. Cireşan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 3642–3649, Providence, RI, 2012. [DSH13] G. E. Dahl, T. N. Sainath, and G. E. Hinton. Improving deep neural networks for lvcsr using rectified linear units and dropout. In IEEE International Conference on Acoustics, Speech and Signal Processing, pages 8609–8613, Vancouver, Canada, 2013. [DYDA12] G. E. Dahl, D. Yu, L. Deng, and A. Acero. Context-dependent pre-trained deep neural networks for large-vocabulary speech recognition. IEEE Transactions on Audio, Speech, and Language Processing, 20(1):30–42, 2012. [GLL+ 09] I. Goodfellow, H. Lee, Q. V. Le, A. Saxe, and A. Y Ng. Measuring invariances in deep networks. In Advances in Neural Information Processing Systems 24, pages 646–654. MIT Press, Cambridge, MA, 2009. [HDY+ 12] G. E. Hinton, L. Deng, D. Yu, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 29(6):82–97, 2012. [HS06] G. E. Hinton and R. R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, 2006. [HSK+ 12] G. E Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever, and R. R Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors. CoRR/abstract, 1207.0580, 2012. [KM97] M. Karpinski and A. Macintyre. Polynomial bounds for VC dimension of sigmoidal and general pfaffian neural networks. Journal of Computer and System Sciences, 54(1):169–176, 1997. [KP02] V. Koltchinskii and D. Panchenko. Empirical margin distributions and bounding the generalization error of combined classifiers. Annals of Statistics, 30(1):1–50, 2002. 18 [KSH12] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 25, pages 1106–1114. MIT Press, Cambridge, MA, 2012. [KST08] S. M Kakade, K. Sridharan, and A. Tewari. On the complexity of linear prediction: Risk bounds, margin bounds, and regularization. In Advances in Neural Information Processing Systems 24, pages 793–800. MIT Press, Cambridge, MA, 2008. [LT02] M. Ledoux and M. Talagrand. Probability in Banach spaces: Isoperimetry and processes. Springer, 2002. [Mau06] A. Maurer. Bounds for linear multi-task learning. Journal of Machine Learning Research, 7:117–139, 2006. [McA13] D. McAllester. A pac-bayesian tutorial with a dropout bound. CoRR/abstract, 1307.2118, 2013. [McD89] C. McDiarmid. On the method of bounded differences. In Surveys in Combinatorics, pages 148–188. Cambridge University Press, Cambridge, UK, 1989. [MCW09] H. Mobahi, R. Collobert, and J. Weston. Deep learning from temporal coherence in video. In Proceedings of the 26th International Conference on Machine Learning, pages 737–744, Montreal, Canada, 2009. [MZ03] R. Meir and T. Zhang. Generalization error bounds for bayesian mixture algorithms. Journal of Machine Learning Research, 4:839–860, 2003. [Nea96] R. M. Neal. Bayesian Learning for Neural Networks. Lecture Notes in Statistics, Springer, 1996. [NH10] V. Nair and G. E. Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th International Conference on Machine Learning, pages 807–814, Haifa, Israel, 2010. [WM13] S. I. Wang and C. D. Manning. Fast dropout training. In Proceedings of the 30th International Conference on Machine Learning, pages 118–126, Atlanta, GA, 2013. 19 [WZZ+ 13] L. Wan, M. Zeiler, S. Zhang, Y. L Cun, and R. Fergus. Regularization of neural networks using dropconnect. In Proceedings of the 30th International Conference on Machine Learning, pages 1058–1066, Atlanta, GA, 2013. 20
9cs.NE
arXiv:1709.02314v4 [cs.LG] 15 Mar 2018 1 Representation Learning for Visual-Relational Knowledge Graphs Daniel Oñoro-Rubio, Mathias Niepert, Alberto García-Durán, Roberto González-Sánchez and Roberto J. López-Sastre* NEC Labs Europe, Alcalá de Henares* {daniel.onoro, mathias.niepert, alberto.duran, roberto.gonzalez}@neclab.eu, [email protected]* Abstract. A visual-relational knowledge graph (KG) is a multi-relational graph whose entities are associated with images. We introduce ImageGraph, a KG with 1,330 relation types, 14,870 entities, and 829,931 images. Visual-relational KGs lead to novel probabilistic query types where images are treated as first-class citizens. Both the prediction of relations between unseen images and multi-relational image retrieval can be formulated as query types in a visual-relational KG. We approach the problem of answering such queries with a novel combination of deep convolutional networks and models for learning knowledge graph embeddings. The resulting models can answer queries such as “How are these two unseen images related to each other?" We also explore a zero-shot learning scenario where an image of an entirely new entity is linked with multiple relations to entities of an existing KG. The multi-relational grounding of unseen entity images into a knowledge graph serves as the description of such an entity. We conduct experiments to demonstrate that the proposed deep architectures in combination with KG embedding objectives can answer the visual-relational queries efficiently and accurately. Introduction Several application domains can be modeled with knowledge graphs where entities are represented by nodes, object attributes by node attributes, and relationships between entities by directed edges between the nodes. For instance, a product recommendation system can be represented as a knowledge graph where nodes represent customers and products and where typed edges represent customer reviews and purchasing events. In the medical domain, there are several knowledge graphs that model diseases, symptoms, drugs, genes, and their interactions (cf. [1,2,3]). Increasingly, entities in these knowledge graphs are associated with visual data. For instance, in the online retail domain, there are product and advertising images and in the medical domain, there are patient-associated imaging data sets (MRIs, CTs, and so on). The ability of knowledge graphs to compactly represent a domain, its attributes, and relations make them an important component of numerous AI systems. KGs facilitate the integration, organization, and retrieval of structured 2 Daniel Oñoro-Rubio ? (1) Tokyo Murasaki Shikibu hasArtAbout captialOf loc ate dIn Sensō-ji bornIn locate dIn Gotoh Museum locatedIn (2) ? (3) New entity Japan ? (4) Japan New entity (a) ? (b) Fig. 1. A small part of a visual-relational knowledge graph and a set of query types. data and support various forms of reasoning. In recent years KGs have been playing an increasingly crucial role in fields such as question answering [4,5], language modeling [6], and text generation [7]. Even though there is a large body of work on learning and reasoning in KGs, the setting of visual-relational KGs, where entities are associated with visual data, has not received much attention. A visual-relational KG represents entities, relations between these entities, and a large number of images associated with the entities (see Figure 1a for an example). While ImageNet [8] and the VisualGenome [9] datasets are based on KGs such as WordNet they are predominantly used as either an object classification data set as in the case of ImageNet or to facilitate scene understanding in a single image. With ImageGraph, we propose the problem of reasoning about visual concepts across a large set of images organized in a knowledge graph. The core idea is to treat images as first-class citizens both in the KG and in relational KG completion queries. In combination with the multi-relational structure of a KG, numerous more complex queries are possible. The main objective of our work is to understand to what extent visual data associated with entities of a KG can be used in conjunction with deep learning methods to answer visual-relational queries. Allowing images to be arguments of queries facilitates numerous novel query types. In Figure 1b we list some of the query types we address in this paper. In order to answer these queries, we built both on KG embedding methods as well as deep representation learning approaches for visual data. There has been a flurry of machine learning approaches tailored to specific problems such as link prediction in knowledge graphs. Examples are knowledge base factorization and embedding approaches [10,11,12,13] and random-walk based ML models [14,15]. We combine these approaches with deep neural networks to facilitate visual-relational query answering. There are numerous application domains that could benefit from query answering in visual KGs. For instance, in online retail, visual representations of novel products could be leveraged for zero-shot product recommendations. Crucially, instead of only being able to retrieve similar products, a visual-relational Representation Learning for Visual-Relational Knowledge Graphs 3 KG would support the prediction of product attributes and more specifically what attributes customers might be interested in. For instance, in the fashion industry visual attributes are crucial for product recommendations [16,17,18,19]. In general, we believe that being able to ground novel visual concepts into an existing KG with attributes and various relation types is a reasonable approach to zero-shot learning. We make the following contributions. First, we introduce ImageGraph, a visual-relational KG with 1,330 relations where 829,931 images are associated with 14,870 different entities. Second, we introduce a new set of visual-relational query types. Third, we propose a novel set of neural architectures and objectives that we use for answering these novel query types. This is the first time that deep CNNs and KG embedding learning objectives are combined into a joint model. Fourth, we show that the proposed class of deep neural networks are also successful for zero-shot learning, that is, creating relations between entirely unseen entities and the KG using only visual data at query time. 2 Related Work We discuss the relation of our contributions to previous work with an emphasis on object detection, scene understanding, existing data sets, and zero-shot learning. Relational and Visual Data Answering queries in a visual-relational knowledge graph is our main objective. Previous work on combining relational and visual data has focused on object detection [20,21,22,23,24] and scene recognition [25,26,27,28,29] which are required for more complex visual-relational reasoning. Recent years have witnessed a surge in reasoning about human-object, object-object, and object-attribute relationships [30,31,32,33,20,34,35,36]. The VisualGenome project [9] is a knowledge base that integrates language and vision modalities. The project provides a knowledge graph, based on WordNet, which provides annotations of categories, attributes, and relation types for each image. Recent work has used the dataset to focus on scene understanding in single images. For instance, Lu et al. [37] proposed a model to detect relation types between objects depicted in an image by inferring sentences such as “man riding bicycle." Veit et al. [17] propose a siamese CNN to learn a metric representation on pairs of textile products so as to learn which products have similar styles. There is a large body of work on metric learning where the objective is to generate image embeddings such that a pairwise distance-based loss is minimized [38,39,40,41,42]. Recent work has extended this idea to directly optimize a clustering quality metric [43]. Zhou et al. propose a method based on a bipartite graph that links depictions of meals to its ingredients. Johnson et al. [44] propose to use the VisualGenome data to recover images from text queries. ImageGraph is different from these data sets in that the relation types hold between different images and image annotated entities. This defines a novel class of problems where one seeks to answer queries such as “How are these two images related? " With this work, we address problems ranging from predicting the relation types for image pairs to multi-relational image retrieval. 4 Daniel Oñoro-Rubio Entities Relations Triples Images |E| |R| Train Valid Test Train Valid Test FB15k [10] 14,951 1,345 483,142 50,000 59,071 0 0 0 ImageGraph 14,870 1,330 460,406 47,533 56,071 411,306 201,832 216,793 Table 1. Statistics of the knowledge graphs used in this paper. Zero-shot Learning We focus on exploring ways in which KGs can be used to find relationships between unseen images, that is, images depicting novel entities that are not part of the KG, and visual depictions of known KG entities. This is a form of zero-shot learning (ZSL) where the objective is to generalize to novel visual concepts without seeing any training examples. Generally, ZSL methods (e.g. [45,46]) rely on an underlying embedding space, such as attributes, in order to recognize the unseen categories. However, in this paper, we do not assume the availability of such a common embedding space but we assume the existence of an external visual-relational KG. Similar to our approach, when this explicit knowledge is not encoded in the underlying embedding space, other works rely on finding the similarities through the linguistic space (e.g. [47,37]), leveraging distributional word representations so as to capture a notion of taxonomy and similarity. But these works address scene understanding in a single image, i.e. these models are able to detect the visual relationships in one given image. On the contrary, our models are able to find relationships between different images and entities. 3 ImageGraph: A Visual-Relational Knowledge Graph ImageGraph is a visual-relational KG whose relational structure is based on that of Freebase [48]. More specifically, it is based on FB15k, a subset of FreeBase, which has been used as a benchmark data set [13]. Since FB15k does not include visual data, we perform the following steps to enrich the KG entities with image data. We implemented a web crawler that is able to parse query results for the image search engines Google Images, Bing Images, and Yahoo Image Search. To minimize the amount of noise due to polysemous entity labels (for example, there are more than 100 Freebase entities with the text label “Springfield") we extracted, for each entity in FB15k, all Wikipedia URIs from the 1.9 billion triple Freebase RDF dump. For instance, for Springfield, Massachusetts, we obtained such URIs as Springfield_(Massachusetts,United_States) and Springfield_(MA). These URIs were processed and used as search queries for disambiguation purposes. We used the crawler to download more than 2.4M images (more than 462Gb of data). We removed corrupted, low quality, and duplicate images and we used the 25 top images returned by each of the image search engines whenever there were more than 25 results. The images were scaled to have a maximum height or width of 500 pixels while maintaining their aspect ratio. This resulted in 829,931 images associated with 14,870 different entities (55.8 images per entity). After filtering out triples where either the head or Triple count Representation Learning for Visual-Relational Knowledge Graphs 103 award_nominee profession disease production_company 101 100 101 102 Relation types (a) 5 Symmetric Asymmetric 8%7% tv_actor ingredient 3 10 85% Others (b) Fig. 2. 2a plots the distribution of relation type frequencies. The y-axis represents the number of occurrences and x-axis the relation type index. 2b shows the most common relation types. tail entity could not be associated with an image, the visual KG consists of 564,010 triples expressing 1,330 different relation types between 14,870 entities. We provide three sets of triples for training, validation, and testing plus three more image splits also for training, validation and test. Table 1 lists the statistics of the resulting visual KG. Any KG derived from FB15k such as FB15k-237[49] can also be associated with the crawled images. Since providing the images themselves would violate copyright law, we provide the code for the distributed crawler and the list of image URLs crawled for the experiments in this paper.1 . The distribution of relation types is depicted in the Figure 2a. We show in logarithmic scale the number of times that each relation occurs in the KG. We observe how relationships like award_nominee or profession occur quite frequently while others such as ingredient occur just a few times. 7.2% of the relation types are symmetric, 8.2% are asymmetric, and 84.6% are neither (see Figure 2b). There are 585 distinct entity types such as Person, Athlete, and City. In Figure 3a we plot he most frequent entity types. In the Figure 2b we plot the entity frequencies and some example entities. To the best of our knowledge, ImageGraph is the visual-relational KG with the most entities, relation types, and entity-level images. The main differences between ImageGraph and ImageNet are the following. ImageNet is based on WordNet a lexical database where synonymous words from the same lexical category are grouped into synsets. There are 18 relations expressing connections between synsets. In Freebase, on the other hand, there are two orders of magnitudes more relations. In FB15k, the subset we focus on, there are 1,345 relations expressing location of places, positions of basketball players, and gender of entities. Moreover, entities in ImageNet exclusively represent entity types such as Cats and Cars whereas entities in FB15k are either entity types or instances of entity types such as Albert Einstein and Paris. This renders the computer vision problems associated with ImageGraph more challenging than those for existing datasets. Moreover, with ImageGraph the focus is on learning 1 The URL of the git repository is hidden to not violate the double blind submission requirement. 6 Daniel Oñoro-Rubio 1200 1000 800 600 400 200 0 United States of America English Language 103 Triple count Entity Count 104 Executive Producer University of Oxford 102 Parlophone 101 Vigor Shipyards 10 0 (a) 101 Entities 103 (b) Fig. 3. 3b depicts the 10 most frequent entity types. 3a plots the entity distribution. The y-axis represents the total number of occurrences and the x-axis the entity indices. relational ML models that incorporate visual data both during learning and at query time. 4 Representation Learning for Visual-Relational Graphs A knowledge graph (KG) K is given by a set of triples T, that is, statements of the form (h, r, t), where h, t ∈ E are the head and tail entities, respectively, and r ∈ R is a relation type. Figure 1a depicts a small fragment of a KG with relations between entities and images associated with the entities. Prior work has not included image data and has, therefore, focused on the following two types of queries. First, the query type (h, r?, t) asks for the relations between a given pair of head and tail entities. Second, the query types (h, r, t?) and (h?, r, t), asks for entities correctly completing the triple. The latter query type is often referred to as knowledge base completion. Here, we focus on queries that involve visual data as query objects, that is, objects that are either contained in the queries, the answers to the queries, or both. 4.1 Visual-Relational Query Answering When entities are associated with image data, several completely novel query types are possible. Figure 1b lists the query types we focus on in this paper. We refer to images used during training as seen and all other images as unseen. (1) Given a pair of unseen images for which we do not know their KG entities, determine the unknown relations between the underlying entities. (2) Given an unseen image, for which we do not know the underlying KG entity, and a relation type, determine the seen images that complete the query. Representation Learning for Visual-Relational Knowledge Graphs g g (a) DistMult Japan r? op VGG16 256 VGG16 Sensō-ji 256 VGG16 7 r f VGG16 r? (b) Fig. 4. (a) Proposed architecture for query answering. (b) Illustration of two possible approaches to visual-relational query answering. One can predict relation types between two images directly (green arrow; our approach) or combine an entity classifier with a KB embedding model for relation prediction (red arrows; baseline VGG16+DistMult). (3) Given an unseen image of an entirely new entity that is not part of the KG, and an unseen image for which we do not know the underlying KG entity, determine the unknown relations between the two underlying entities. (4) Given an unseen image of an entirely new entity that is not part of the KG, and a known KG entity, determine the unknown relations between the two entities. For each of these query types, the sought-after relations between the underlying entities have never been observed during training. Query types (3) and (4) are a form of zero-shot learning since neither the new entity’s relationships with other entities nor its images have been observed during training. These considerations illustrate the novel nature of the visual query types. The machine learning models have to be able to learn the relational semantics of the KG and not simply a classifier that assigns images to entities. These query types are also motivated by the fact that for typical KGs the number of entities is orders of magnitude greater than the number of relations. 4.2 Deep Representation Learning for Query Answering We first discuss the state of the art of KG embedding methods and translate the concepts to query answering in visual-relational KGs. Let rawi be the raw feature representation for entity i ∈ R and let f and g be differentiable functions. Most KG completion methods learn an embedding of the entities in a vector space via some scoring function that is trained to assign high scores to correct triples and low scores to incorrect triples. Scoring functions have often the form fr (eh , et ) where r is a relation, eh and et are d-dimensional vectors (the embeddings of the head and tail entities, respectively), and where ei = g(rawi ) is an embedding function that maps the raw input representation of entities to the embedding space. In the case of KGs without additional visual data, the raw representation of an entity is simply its one-hot encoding. Existing KG completion methods use the embedding function g(rawh ) = raw|i W where W is a |E|×d matrix, and differ only in their scoring function, 8 Daniel Oñoro-Rubio that is, in the way that the embedding vectors of the head and tail entities are combined with the parameter vector φr : – Difference (TransE[10]): fr (eh , et ) = −||eh + φr − et ||2 where φr is a ddimensional vector; – Multiplication (DistMult[50]): fr (eh , et ) = (eh ∗ et ) · φr where ∗ is the element-wise product and φr a d-dimensional vector; – Circular correlation (HolE[51]): fr (eh , et ) = (eh ? et ) · φr where [a ? b]k = Pd−1 i=0 ai b(i+k) mod d and φr a d-dimensional vector; and – Concatenation: fr (eh , et ) = (eh et ) · φr where is the concatenation operator and φr a 2d-dimensional vector. For each of these instances, the matrix W (storing the entity embeddings) and the vectors φr are learned during training. In general, the parameters are trained such that fr (eh , et ) is high for true triples and low for triples assumed not to hold in the KG. The training objective is often based on the logistic loss, which has been shown to be superior for most of the composition functions [52], min Θ X log(1 + exp(−fr (eh , et )) + (h,r,t) ∈Tpos X log(1 + exp(fr (eh , et ))) + λ||Θ||22 , (1) (h,r,t)∈Tneg where Tpos and Tneg are the set of positive and negative training triples, respectively, Θ are the parameters trained during learning and λ is a regularization hyperparameter. For the above objective, a process for creating corrupted triples Tneg is required. This often involves sampling a random entity for either the head or tail entity. To answer queries of the types (h, r, t?) and (h?, r, t) after training, we form all possible completions of the queries and compute a ranking based on the scores assigned by the trained model to these completions. For the queries of type (h, r?, t) one typically uses the softmax activation in conjunction with the categorical cross-entropy loss, which does not require negative triples min X  − log Θ (h,r,t)∈Tpos P exp(fr (eh , et )) r∈R exp(fr (eh , et ))  + λ||Θ||22 , (2) where Θ are the parameters trained during learning. For visual-relational KGs, the input consists of raw image data instead of the one-hot encodings of entities. The approach we propose builds on the ideas and methods developed for KG completion. Instead of having a simple embedding function g that multiplies the input with a weight matrix, however, we use deep convolutional neural networks to extract meaningful visual features from the input images. For the composition function f we evaluate the four operations that were used in the KG completion literature: difference, multiplication, concatenation, and circular correlation. Figure 4a depicts the basic architecture we trained for query answering. The weights of the parts of the neural network responsible for embedding the raw image input, denoted by g, are tied. We also experimented with additional hidden layers indicated by the dashed dense layer. The composition operation op is either difference, multiplication, concatenation, Representation Learning for Visual-Relational Knowledge Graphs 9 or circular correlation. To the best of our knowledge, this is the first time that KG embedding learning and deep CNNs have been combined for visual-relationsl query answering. 5 Experiments We conduct a series of experiments to evaluate our proposed approach to visualrelational query answering. First, we describe the experimental set-up that applies to all experiments. Second, we report and interpret results for the different types of visual-relational queries. 5.1 General Set-up We used Caffe, a deep learning framework [53] for designing, training, and evaluating the proposed models. The embedding function g is based on the VGG16 model introduced in [54]. We pre-trained the VGG16 on the ILSVRC2012 data set derived from ImageNet [8] and removed the softmax layer of the original VGG16. We added a 256-dimensional layer after the last dense layer of the VGG16. The output of this layer serves as the embedding of the input images. The reason for reducing the embedding dimensionality from 4096 to 256 is motivated by the objective to obtain an efficient and compact latent representation that is feasible for KGs with billion of entities. For the composition function f, we performed either of the four operations difference, multiplication, concatenation, and circular correlation. We also experimented with an additional hidden layer with ReLu activation. Figure 4a depicts the generic network architecture. The output layer of the architecture has a softmax or sigmoid activation with cross-entropy loss. We initialized the weights of the newly added layers with the Xavier method [55]. We used a batch size of 45 which was the maximal possible fitting into GPU memory. To create the training batches, we sample a random triple uniformly at random from the training triples. For the given triple, we randomly sample one image for the head and one for the tail from the set of training images. We applied SGD with a learning rate of 10−5 for the parameters of the VGG16 and a learning rate of 10−3 for the remaining parameters. It is crucial to use two different learning rates since the large gradients in the newly added layers would lead to unreasonable changes in the pretrained part of the network. We set the weight decay to 5 × 10−4 . We reduced the learning rate by a factor of 0.1 every 40,000 iterations. Each of the models was trained for 100,000 iterations. Since the answers to all query types are either rankings of images or rankings of relations, we utilize metrics measuring the quality of rankings. In particular, we report results for hits@1 (hits@10, hits@100) measuring the percentage of times the correct relation was ranked highest (ranked in the top 10, top 100). We also compute the median of the ranks of the correct entities or relations and the Mean Reciprocal Rank (MRR) for entity and relation rankings, respectively, 10 Daniel Oñoro-Rubio Model Median Hits@1 Hits@10 MRR VGG16+DistMult 94 6.0 11.4 0.087 Prob. Baseline 35 3.7 26.5 0.104 DIFF 11 21.1 50.0 0.307 MULT 8 15.5 54.3 0.282 CAT 6 26.7 61.0 0.378 DIFF+1HL 8 22.6 55.7 0.333 MULT+1HL 9 14.8 53.4 0.273 CAT+1HL 6 25.3 60.0 0.365 Table 2. Results for the relation prediction problem. defined as follows: MRR = 1 2|T| X (h,r,t)∈T  1 1 + rankimg(h) rankimg(t)  (3) MRR = 1 |T| X (h,r,t)∈T 1 , (4) rankr where T is the set of all test triples, rankr is the rank of the correct relation, and rankimg(h) is the rank of the highest ranked image of entity h. For each query, we remove all triples that are also correct answers to the query from the ranking. All experiments were run on commodity hardware with 128GB RAM, a single 2.8 GHz CPU, and a NVIDIA 1080 Ti. 5.2 Visual Relation Prediction Given a pair of unseen images we want to determine the relations between their underlying unknown entities. This can be expressed with (imgh , r?, imgt ). Figure 1b(1) illustrates this query type which we refer to as visual relation prediction. We train the deep architectures using the training and validation triples and images, respectively. For each triple (h, r, t) in the training data set, we sample one training image uniformly at random for both the head and the tail entity. We use the architecture depicted in Figure 4a with the softmax activation and the categorical cross-entropy loss. For each test triple, we sample one image uniformly at random from the test images of the head and tail entity, respectively. We then use the pair of images to query the trained deep neural networks. To get a more robust statistical estimate of the evaluation measures, we repeat the above process three times per test triple. Again, none of the test triples and images are seen during training nor are any of the training images used during testing. Computing the answer to one query takes the model 20 ms. We compare the proposed architectures to two different baselines: one based on entity classification followed by a KB embedding method for relation prediction (VGG16+DistMult), and a probabilistic baseline (Prob. Baseline). The entity classification baseline consists of fine-tuning a pretrained VGG16 to classify images into the 14, 870 entities of ImageGraph. To obtain the relation type ranking at test time, we predict the entities for the head and the tail using the VGG16 and then use the KB embedding method DistMult[50] to return a ranking of relation types for the given (head, tail) pair. DistMult is a KB Representation Learning for Visual-Relational Knowledge Graphs 3 wonAward directedBy 2 genreOf succeededBy ... ... 11 159407 106817 Fig. 5. Example queries and results for the multi-relational image retrieval problem. embedding method that achieves state of the art results for KB completion on FB15k [56]. Therefore, for this experiment we just substitute the original output layer of the VGG16 pretrained on ImageNet with a new output layer suitable for our problem. To train, we join the train an validation splits, we set the learning rate to 10−5 for all the layers and we train following the same strategy that we use in all of our experiments. Once the system is trained, we test the model by classifying the entities of the images in the test set. To train DistMult, we sample 500 negatives triples for each positive triple and used an embedding size of 100. Figure 4b illustrates the VGG16+DistMult baseline and contrasts it with our proposed approach. The second baseline (probabilistic baseline) computes the probability of each relation type using the set of training and validation triples. The baseline ranks relation types based on these prior probabilities. Table 2 lists the results for the two baselines and the different proposed architectures. The probabilistic baseline outperforms the VGG16+DistMult baseline in 3 of the metrics. This is due to the highly skewed distribution of relation types in the training, validation, and test triples. A small number of relation types makes up a large fraction of triples. Figure 2a and 3b plots the counts of relation types and entities. Moreover, despite DistMult achieving a hits@1 value of 0.46 for the relation prediction problem between entity pairs the baseline VGG16+DistMult performs poorly. This is due to the poor entity classification performance of the VGG (accurracy: 0.082, F1: 0.068). In the remainder of the experiments, therefore, we only compare to the probabilistic baseline. In the lower part of Table 2, we lists the results of the experiments. DIFF, MULT, and CAT stand for the different possible composition operations. We omitted the composition operation circular correlation since we were not able to make the corresponding model converge, despite trying several different optimizers and hyperparameter settings. The post-fix 1HL stands for architectures where we added an additional hidden layer with ReLu activation before the softmax. The concatenation operation clearly outperforms the multiplication and difference operations. This is contrary to findings in the KG completion literature where MULT and DIFF outperformed the concatenation operation. The models with the additional hidden layer did not perform better than their shallower counterparts with the exception of the DIFF model. We hypothesize that this is due to difference being the only linear composition operation, benefiting from an additional non-linearity. Each of the proposed models outperforms the baselines. 12 Daniel Oñoro-Rubio Model Baseline DIFF MULT CAT DIFF+1HL MULT+1HL CAT+1HL CAT-SIG Median Head Tail 6504 2789 1301 877 1676 1136 1022 727 1644 1141 2004 1397 1323 919 814 540 Hits@100 Head Tail 11.9 18.4 19.6 26.3 16.8 22.9 21.4 27.5 15.9 21.9 14.6 20.5 17.8 23.6 23.2 30.1 MRR Head Tail 0.065 0.115 0.051 0.094 0.040 0.080 0.050 0.087 0.045 0.085 0.034 0.069 0.042 0.080 0.049 0.082 Table 3. Results for the multi-relational image retrieval problem. 5.3 Multi-Relational Image Retrieval Given an unseen image, for which we do not know the underlying KG entity, and a relation type, we want to retrieve existing images that complete the query. If the image for the head entity is given, we return a ranking of images for the tail entity; if the tail entity image is given we return a ranking of images for the head entity. This problem corresponds to query type (2) in Figure 1b. Note that this is equivalent to performing multi-relational metric learning which, to the best of our knowledge, has not been done before. We performed experiments with each of the three composition functions f and for two different activation/loss functions. First, we used the models trained with the softmax activation and the categorical cross-entropy loss to rank images. Second, we took the models trained with the softmax activation and substituted the softmax activation with a sigmoid activation and the corresponding binary cross-entropy loss. For each training triple (h, r, t) we then created two negative triples by sampling once the head and once the tail entity from the set of entities. The negative triples are then used in conjunction with the binary cross-entropy loss of equation 1 to refine the pretrained weights. Directly training a model with the binary cross-entropy loss was not possible since the model did not converge properly. Pretraining with the softmax activation and categorical cross-entropy loss was crucial to make the binary loss work. During testing, we used the test triples and ranked the images based on the probabilities returned by the respective models. For instance, given the query (imgSenso-ji , locatedIn, imgt ?), we substituted imgt ? with all training and validation images, one at a time, and ranked the images according to the probabilities returned by the models. We use the rank of the highest ranked image belonging to the true entity (here: Japan) to compute the values for the evaluation measures. We repeat the same experiment three times (each time randomly sampling the images) and report average values. Again, we compare the results for the different architectures with a probabilistic baseline. For the baseline, however, we compute a distribution of head and tail entities for each of the relation types. For example, for the relation type locatedIn we compute two Representation Learning for Visual-Relational Knowledge Graphs Median H T Base CAT 34 8 31 7 Base CAT 9 5 5 3 Hits@1 H T Zero-Shot 1.9 2.3 19.1 22.4 Zero-Shot 13.0 22.6 26.9 33.7 Hits@10 H T Query (3) 18.2 28.7 54.2 57.9 Query (4) 52.3 64.8 62.5 70.4 13 MRR H T 0.074 0.306 0.089 0.342 0.251 0.388 0.359 0.461 Table 4. Results for the zero-shot learning experiments. distributions, one for head and one for tail entities. We used the same measures as in the previous experiment to evaluate the returned image rankings. Table 3 lists the results of the experiments. As for relation prediction, the best performing models are based on the concatenation operation, followed by the difference and multiplication operations. The architectures with an additional hidden layer do not improve the performance. We also provide the results for the concatenation-based model with softmax activation where we refined the weights using a sigmoid activation and negative sampling as described before. This model is the best performing model. All neural network models are significantly better than the baseline with respect to the median and hits@100. However, the baseline has slightly superior results for the MRR. This is due to the skewed distribution of entities and relations in the KG (see Figure 3b and Figure 2a). This shows once more that the baseline is highly competitive for the given KG. Figure 5 visualizes the answers the CAT-SIG model provided for a set of four example queries. For the two queries on the left, the model performed well and ranked the correct entity in the top 3 (green frame). The examples on the right illustrate queries for which the model returned an inaccurate ranking. To perform query answering in a highly efficient manner, we precomputed and stored all image embeddings once, and only compute the scoring function (involving the composition operation and a dot product with φr ) at query time. Answering one multi-relational image retrieval query (which would otherwise require 613,138 individual queries, one per possible image) took only 90 ms. 5.4 Zero-Shot Visual Relation Prediction The last set of experiments addresses the problem of zero-shot learning via visual relation prediction. For both query types, we are given an new image of an entirely new entity that is not part of the KG. The first query type asks for relations between the given image and an unseen image for which we do not know the underlying KG entity. The second query type asks for the relations between the given image and an existing KG entity. We believe that creating multi-relational links to existing KG entities is a reasonable approach to zero-shot learning since an unseen entity or category is integrated into an existing KG. The relations to existing visual concepts and their attributes provide a characterization of the new 14 Daniel Oñoro-Rubio Back to the Future hasCrewJob hasGenre hasProfession Special Effects Supervisor hasNutrient filmHasLocation peopleBornHere ... Library of Congress TaxonomyHasEntry Card Game Fig. 6. Example results for zero-shot learning. For each pair of images the top three relation types (as ranked by the CAT model) are listed. For the pair of images at the top, the first relation type is correct. For the pair of images at the bottom, the correct relation type TaxonomyHasEntry is not among the top three relation types. entity/category. This problem cannot be addressed with KG embedding methods since entities need to be part of the KG during training for these models to work. For the zero-shot experiments, we generated a new set of training, validation, and test triples. We randomly sampled 500 entities that occur as head (tail) in the set of test triples. We then removed all training and validation triples whose head or tail is one of these 1000 entities. Finally, we only kept those test triples with one of the 1000 entities either as head or tail but not both. For query type (4) where we know the target entity, we sample 10 of its images and use the models 10 times to compute a probability. We use the average probabilities to rank the relations. For query type (3) we only use one image sampled randomly. As with previous experiments, we repeated procedure three times and averaged the results. For the baseline, we compute the probabilities of relation in the training and validation set (for query type (3)) and the probabilities of relations conditioned on the target entity (for query type (4)). Again, these are very competitive baselines due to the skewed distribution of relations and entities. Table 4 lists the results of the experiments. The model based on the concatenation operation (CAT) outperforms the baseline and performs surprisingly well. The deep models are able to generalize to unseen images since their performance is comparable to the performance in the relation prediction task (query type (1)) where the entity was part of the KG during training (see Table 2). Figure 6 depicts example queries for the zero-shot query type (3). For the first query example, the CAT model ranked the correct relation type first (indicated by the green bounding box). The second example is more challenging and the correct relation type was not part of the top 10 ranked relation types. 6 Conclusion KGs are at the core of numerous AI applications. Research has focused either on KG completion methods working only on the relational structure or on scene Representation Learning for Visual-Relational Knowledge Graphs 15 understanding in a single image. We present a novel visual-relational KG where the entities are enriched with visual data. We proposed several novel query types and introduce neural architectures suitable for probabilistic query answering. We propose a novel approach to zero-shot learning as the problem of visually mapping an image of an entirely new entity to a KG. We have observed that for some relation types, the proposed models tend to learn a fine-grained visual type that typically occurs as the head or tail of the relation type. In these cases, conditioning on either the head or tail entity does not influence the predictions of the models substantially. This is a potential shortcoming of the proposed methods and we believe that there is a lot of room for improvement for probabilistic query answering in visual-relational KGs. 16 Daniel Oñoro-Rubio References 1. Ashburner, M., Ball, C.A., Blake, J.A., Botstein, D., Butler, H., Cherry, J.M., Davis, A.P., Dolinski, K., Dwight, S.S., Eppig, J.T., Harris, M.A., Hill, D.P., Issel-Tarver, L., Kasarskis, A., Lewis, S., Matese, J.C., Richardson, J.E., Ringwald, M., Rubin, G.M., Sherlock, G.: Gene Ontology: tool for the unification of biology. Nat Genet 25(1) (2000) 25–29 1 2. Wishart, D.S., Knox, C., Guo, A., Cheng, D., Shrivastava, S., Tzur, D., Gautam, B., Hassanali, M.: Drugbank: a knowledgebase for drugs, drug actions and drug targets. Nucleic Acids Research 36 (2008) 901–906 1 3. Rotmensch, M., Halpern, Y., Tlimat, A., Horng, S., Sontag, D.: Learning a health knowledge graph from electronic medical records. Nature Scientific Reports 5994(7) (2017) 1 4. Bordes, A., Usunier, N., Chopra, S., Weston, J.: Large-scale simple question answering with memory networks. arXiv preprint arXiv:1506.02075 (2015) 2 5. Das, A., Kottur, S., Gupta, K., Singh, A., Yadav, D., Moura, J.M.F., Parikh, D., Batra, D.: Visual dialog. In: CVPR. (July 2017) 2 6. Ahn, S., Choi, H., Parnamaa, T., Bengio, Y.: A neural knowledge language model. arXiv preprint arXiv:1608.00318 (2016) 2 7. Serban, I.V., García-Durán, A., Gulcehre, C., Ahn, S., Chandar, S., Courville, A., Bengio, Y.: Generating factoid questions with recurrent neural networks: The 30m factoid question-answer corpus. arXiv preprint arXiv:1603.06807 (2016) 2 8. Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., Fei-Fei, L.: ImageNet: A Large-Scale Hierarchical Image Database. In: CVPR. (2009) 2, 9 9. Krishna, R., Zhu, Y., Groth, O., Johnson, J., Hata, K., Kravitz, J., Chen, S., Kalantidis, Y., Li, L.J., Shamma, D.A., Bernstein, M., Fei-Fei, L.: Visual genome: Connecting language and vision using crowdsourced dense image annotations. In: arXiv preprint arXiv:1602.07332. (2016) 2, 3 10. Bordes, A., Usunier, N., Garcia-Duran, A., Weston, J., Yakhnenko, O.: Translating embeddings for modeling multi-relational data. In: Advances in Neural Information Processing Systems. (2013) 2787–2795 2, 4, 8 11. Nickel, M., Tresp, V., Kriegel, H.P.: A three-way model for collective learning on multi-relational data. In: Proceedings of the 28th international conference on machine learning (ICML-11). (2011) 809–816 2 12. Guu, K., Miller, J., Liang, P.: Traversing knowledge graphs in vector space. arXiv preprint arXiv:1506.01094 (2015) 2 13. Nickel, M., Murphy, K., Tresp, V., Gabrilovich, E.: A review of relational machine learning for knowledge graphs. Proceedings of the IEEE 104(1) (2016) 11–33 2, 4 14. Lao, N., Mitchell, T., Cohen, W.W.: Random walk inference and learning in a large scale knowledge base. In: Proceedings of the Conference on Empirical Methods in Natural Language Processing, Association for Computational Linguistics (2011) 529–539 2 15. Gardner, M., Mitchell, T.M.: Efficient and expressive knowledge base completion using subgraph feature extraction. In: EMNLP. (2015) 1488–1498 2 16. Liu, Z., Luo, P., Qiu, S., Wang, X., Tang, X.: Deepfashion: Powering robust clothes recognition and retrieval with rich annotations. In: CVPR. (June 2016) 3 17. Veit, A., Kovacs, B., Bell, S., McAuley, J., Bala, K., Belongie, S.: Learning visual clothing style with heterogeneous dyadic co-occurrences. In: ICCV. (2015) 3 18. Simo-Serra, E., Ishikawa, H.: Fashion style in 128 floats: Joint ranking and classification using weak data for feature extraction. In: The IEEE Conference on Computer Vision and Pattern Recognition (CVPR). (June 2016) 3 Representation Learning for Visual-Relational Knowledge Graphs 17 19. Vaccaro, K., Shivakumar, S., Ding, Z., Karahalios, K., Kumar, R.: The elements of fashion style. In: Proceedings of the 29th Annual Symposium on User Interface Software and Technology, ACM (2016) 3 20. Felzenszwalb, P.F., Girshick, R.B., McAllester, D., Ramanan, D.: Object detection with discriminatively trained part-based models. IEEE transactions on pattern analysis and machine intelligence 32(9) (2010) 1627–1645 3 21. Girshick, R., Donahue, J., Darrell, T., Malik, J.: Rich feature hierarchies for accurate object detection and semantic segmentation. In: Proceedings of the 2014 IEEE Conference on Computer Vision and Pattern Recognition. (2014) 580–587 3 22. Russakovsky, O., Deng, J., Huang, Z., Berg, A.C., Fei-Fei, L.: Detecting avocados to zucchinis: what have we done, and where are we going? In: International Conference on Computer Vision (ICCV). (2013) 3 23. Marino, K., Salakhutdinov, R., Gupta, A.: The more you know: Using knowledge graphs for image classification. In: CVPR. (2017) 3 24. Li, Y., Huang, C., Tang, X., Loy, C.C.: Learning to disambiguate by asking discriminative questions. In: ICCV. (2017) 3 25. Doersch, C., Gupta, A., Efros, A.A.: Mid-level visual element discovery as discriminative mode seeking. In: Advances in Neural Information Processing Systems 26. (2013) 494–502 3 26. Pandey, M., Lazebnik, S.: Scene recognition and weakly supervised object localization with deformable part-based models. In: Computer Vision (ICCV), 2011 IEEE International Conference on. (2011) 1307–1314 3 27. Sadeghi, F., Tappen, M.F.: Latent pyramidal regions for recognizing scenes. In: Proceedings of the 12th European Conference on Computer Vision - Volume Part V. (2012) 228–241 3 28. Xiao, J., Hays, J., Ehinger, K.A., Oliva, A., Torralba, A.: SUN database: Large-scale scene recognition from abbey to zoo. In: The Twenty-Third IEEE Conference on Computer Vision and Pattern Recognition. (2010) 3485–3492 3 29. Teney, D., Liu, L., van den Hengel, A.: Graph-structured representations for visual question answering. In: CVPR. (July 2017) 3 30. Gupta, A., Kembhavi, A., Davis, L.S.: Observing human-object interactions: Using spatial and functional compatibility for recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence 31 (2009) 1775–1789 3 31. Farhadi, A., Endres, I., Hoiem, D., Forsyth, D.A.: Describing objects by their attributes. In: 2009 IEEE Computer Society Conference on Computer Vision and Pattern Recognition. (2009) 1778–1785 3 32. Malisiewicz, T., Efros, A.A.: Beyond categories: The visual memex model for reasoning about object relationships. In: Advances in Neural Information Processing Systems. (2009) 3 33. Yao, B., Fei-Fei, L.: Modeling mutual context of object and human pose in humanobject interaction activities. In: Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on. (2010) 17–24 3 34. Chen, X., Shrivastava, A., Gupta, A.: Neil: Extracting visual knowledge from web data. In: Proceedings of the IEEE International Conference on Computer Vision. (2013) 1409–1416 3 35. Izadinia, H., Sadeghi, F., Farhadi, A.: Incorporating scene context and object layout into appearance modeling. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. (2014) 232–239 3 36. Zhu, Y., Fathi, A., Fei-Fei, L.: Reasoning about object affordances in a knowledge base representation. In: European conference on computer vision. (2014) 408–424 3 18 Daniel Oñoro-Rubio 37. Lu, C., Krishna, R., Bernstein, M., Fei-Fei, L.: Visual relationship detection with language priors. In: ECCV. (2016) 3, 4 38. Schroff, F., Kalenichenko, D., Philbin, J.: Facenet: A unified embedding for face recognition and clustering. In: 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). (2015) 815–823 3 39. Bell, S., Bala, K.: Learning visual similarity for product design with convolutional neural networks. ACM Transactions on Graphics (TOG) 34(4) (2015) 98 3 40. Oh Song, H., Xiang, Y., Jegelka, S., Savarese, S.: Deep metric learning via lifted structured feature embedding. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. (2016) 4004–4012 3 41. Sohn, K.: Improved deep metric learning with multi-class n-pair loss objective. In: Advances in Neural Information Processing Systems. (2016) 1857–1865 3 42. Wang, J., Zhou, F., Wen, S., Liu, X., Lin, Y.: Deep metric learning with angular loss. In: International Conference on Computer Vision (ICCV). (2017) 3 43. Song, H.O., Jegelka, S., Rathod, V., Murphy, K.: Deep metric learning via facility location. In: Conference on Computer Vision and Pattern Recognition (CVPR). (2017) 3 44. Johnson, J., Krishna, R., Stark, M., Li, L.J., Shamma, D.A., Bernstein, M., Fei-Fei, L.: Image retrieval using scene graphs. In: CVPR. (2015) 3 45. Romera-Paredes, B., Torr, P.: An embarrassingly simple approach to zero-shot learning. In: ICML. (2015) 4 46. Zhang, Z., Saligrama, V.: Zero-shot learning via semantic similarity embedding. In: ICCV. (2015) 4 47. Ba, J., Swersky, K., Fidler, S., Salakhutdinov, R.: Predicting deep zero-shot convolutional neural networks using textual descriptions. In: CVPR. (2015) 4 48. Bollacker, K., Evans, C., Paritosh, P., Sturge, T., Taylor, J.: Freebase: A collaboratively created graph database for structuring human knowledge. In: SIGMOD. (2008) 1247–1250 4 49. Toutanova, K., Chen, D.: Observed versus latent features for knowledge base and text inference. In: Proceedings of the 3rd Workshop on Continuous Vector Space Models and their Compositionality. (2015) 57–66 5 50. Yang, B., Yih, W.t., He, X., Gao, J., Deng, L.: Learning multi-relational semantics using neural-embedding models. arXiv preprint arXiv:1411.4072 (2014) 8, 10 51. Nickel, M., Rosasco, L., Poggio, T.A.: Holographic embeddings of knowledge graphs. In: Proceedings of the Thirtieth Conference on Artificial Intelligence. (2016) 1955–1961 8 52. Trouillon, T., Welbl, J., Riedel, S., Gaussier, É., Bouchard, G.: Complex embeddings for simple link prediction. arXiv preprint arXiv:1606.06357 (2016) 8 53. Jia, Y., Shelhamer, E., Donahue, J., Karayev, S., Long, J., Girshick, R., Guadarrama, S., Darrell, T.: Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093 (2014) 9 54. Simonyan, K., Zisserman, A.: Very deep convolutional networks for large-scale image recognition. CoRR (2014) 9 55. Glorot, X., Bengio, Y.: Understanding the difficulty of training deep feedforward neural networks. In: AISTATS. (2010) 9 56. Kadlec, R., Bajgar, O., Kleindienst, J.: Knowledge base completion: Baselines strike back. arXiv preprint arXiv:1705.10744 (2017) 11
2cs.AI
COHEN-MACAULAYNESS OF NON-AFFINE NORMAL SEMIGROUPS MOHSEN ASGHARZADEH AND MEHDI DORREH arXiv:1302.5919v1 [math.AC] 24 Feb 2013 Abstract. In this paper, we study the Cohen-Macaulayness of non-affine normal semigroups in Zn . We do this by establishing the following four statements each of independent interest: 1) a Lazard type Q result on I-supported elements of N Q≥0 for an index set I ⊂ N; 2) a criterion of regularity of sequences of elements of the ring via projective dimension; 3) a direct limit of polynomial rings with toric maps; 4) any direct summand of rings of the third item is Cohen-Macaulay. To illustrate the idea, we give many examples. 1. Introduction By Gordan’s Lemma any affine and normal semigroup comes from the lattice points of a finitely generated rational cone. One of our interest in this paper is to understand homological properties of the lattice points of the intersection of half spaces. Half spaces are not necessarily closed and the number of half spaces is not necessarily finite. The intersection of two open half spaces can be represented by a direct union of rational cones. This gives a direct union of Cohen-Macaulay affine algebras. In view of Remark 8.4, Cohen-Macaulayness is not closed under taking the direct limit. In this paper we prove the following result. Theorem 1.1. (see Theorem 7.6) Let k be a field and H ⊆ Z∞ be a normal semigroup (not necessarily affine). Then any monomial strong parameter sequence of k[H] is regular. Here, Z∞ is S s∈N Zs . Also, k[H] := L h∈H kX h h′ multiplication whose table is given by X X h is the k-vector space ′ L h∈H kX h . It carries a natural := X h+h . Note that k[H] is equipped with a structure of H-graded ring defined by the semigroup H. By monomial, we mean homogenous elements of k[H]. The concept of strong parameter sequence is a non-noetherian version of system of parameters in the local algebra. It is introduced in [14]; see Definition 6.3. Theorem 1.1 drops two finiteness assumptions of [15, Theorem 1]. The proof involves on the notion of toric maps and the notion of full extensions of semigroups. Such a semigroup extension is the set of solutions of a system of homogeneous linear equations with integer coefficients. These kind of semigroups appear in many contexts. We refer the reader to [8, Theorem 9.2.9], to deduce [15, Theorem 1] as a consequence of Batyrev-Borisov vanishing Theorem. Its proof uses many things. All of them involved on certain finiteness conditions. For further references please see [18] and [12]. In Section 8, as an example in practise, we study the Cohen-Macaulayness of semigroups that arise from quasi ration plane cones. We prove this by introducing the following four classes of semigroups: (i) H := {(a, b) ∈ N20 |0 ≤ b/a < ∞} ∪ {(0, 0)}; (ii) H ′ := {(a, b) ∈ N2 |0 < b/a < ∞} ∪ {(0, 0)}; 2010 Mathematics Subject Classification. Primary: 13C14; Secondary: 14M25; 52B20; 20M14. Key words and phrases. Čech cohomology; Cohen-Macaulay ring; cohomological dimension; convex bodies; direct limit; infinite-dimensional; invariant theory; non-noetherian ring; monomial ideals; normal semigroup; Taylor resolution; pigeonhole principle; projective dimension; quasi rational cone; vanishing theorems. The research was supported by a grant from IPM, no. 91130407. 1 2 ASGHARZADEH AND DORREH (iii) H1 := {(a, b) ∈ Z2 |b ∈ N0 , if a is negative b 6= 0} ∪ {(0, 0)}; (iv) H2 := {(a, b) ∈ Z2 |b ∈ N} ∪ {(0, 0)}. For more details; see Theorem 8.17. Non-affine semigroups appear naturally in the study of the Grothendieck ring of varieties over a field k. To clarify this, let SB denote the set of stably birational equivalence classes of irreducible algebraic varieties over k. Then by [16], the Grothendieck ring of varieties mod to a line is Z[SB]. For an application of non-affine semigroups on affine semigroups, we recommend the reader to see [10]. Throughout this paper, R denote a commutative ring with identity and all modules are assumed to be left unitary. We refer the reader to the books [4] and [5] for all unexplained definitions in the sequel. 2. outline of the proof We give an outline of the proof of Theorem 1.1. The proof easily reduces to the case that H ⊆ Zn is normal (but not affine), see Lemma 7.5. Similar to the affine case, we assume that H ⊆ Zn is positive, see Lemma 6.12. Recall that H is positive if there is not any invertible element in H. Notation 2.1. Denote the set of all nonnegative rational numbers by Q≥0 . Q The first step is to understand the structure of N Q as a semigroup. To state it, let I ⊆ N be an Q infinite index set. Denote the i-th component of α ∈ N Q by αi . Then α is called I-supported if αi 6= 0 Q for all i ∈ I. Also, an element α ∈ N Q is called almost non-negative, if there exists only finitely many i ∈ N such that αi is negative. Q Lemma 2.2. (see Corollary 3.9) Let M ⊆ i∈N Q be the set of all almost non-negative and I-supported e := M ∪ {0} is a direct limit of {Qni : i ∈ J}. elements. Then the semigroup H ≥0 This Lazard-type result implies the following. Lemma 2.3. (see Theorem 4.10) Let k be a field and H ⊆ Zn be a positive and normal semigroup. Then there is a direct system {An : n ∈ N} with the following properties: (i) An is a Noetherian polynomial ring over k for all n ∈ N. (ii) An → Am is toric for all n ≤ m. (iii) k[H] is a direct summand of limn∈N An . −→ Thus, we look at the following question. Question 2.4. Let {Aγ : γ ∈ Γ} be a direct family of Noetherian regular rings and let R be a direct summand of A = limγ∈Γ Aγ . Is R Cohen-Macaulay? −→ Note that Cohen-Macaulayness is not closed under taking direct limit, see Remark 8.4. Also, Remark 8.4 provides a reason for working with Cohen-Macaulayness in the sense of [14]. We explain our method to handle Question 2.4. First, we give the following auxiliary result. Lemma 2.5. (see Theorem 5.5) Let A be a Noetherian polynomial ring over a field and x := x1 , . . . , xn a monomial sequence in A. If p. dim(A/(xi1 , . . . , xik )A) = k for all 1 ≤ i1 < . . . < ik ≤ n, then x is a regular sequence in A. Then by applying the above lemma, Theorem 1.1 follows easily by the following Lemma. Lemma 2.6. (see Theorem 6.7) Let {Aγ : γ ∈ Γ} be a direct family of Noetherian polynomial rings over a field with toric maps and let R be a direct summand of A := limγ∈Γ Aγ . Let x := x1 , . . . , xℓ be a −→ monomial strong parameter sequence in R. Then x is a regular sequence in R. COHEN-MACAULAYNESS OF NON-AFFINE NORMAL SEMIGROUPS 3 3. A Lazard type Result The main results of this section are Lemma 3.8 and Corollary 3.9. They have essential role in the next section. Recall that Q≥0 is the set of all nonnegative rational numbers. Our initial aim is to understand Q Q the structure of Q≥0 as a semigroup. Note that Q is a vector space over Q. Let J be a base for it. Q ∼ L Q L Then Q = ( Q) as Q-vector spaces. But, this isomorphism does not send Q≥0 to Q≥0 . Note J J that we are in the context of semigroups. The use of the minus is the main difficulty. We recommend the reader to see [3] for comparison-type results between product and coproduct. Definition 3.1. Let (xn )n∈N and (yn )n∈N be two sequences of rational numbers. We say (xn )n∈N ≤ (yn )n∈N , if xn ≤ yn for all n. Also, we denote the i-th component of the sequences (x)i∈N and α by (x)i and αi , respectively. Definition 3.2. Let I ⊆ N be an infinite index set. An element α ∈ αi 6= 0 for all i ∈ I. Q i∈N Q is called I-supported if When we refer to an I-supported element, we adopt that I is infinite. Lemma 3.3. Let {β1 , . . . , βn } be a set of I-supported elements of Q over Q and let α ∈ i∈N Q≥0 be I-supported. Suppose Q i∈N Q≥0 that are linearly independent α = βm + . . . + βn−1 − βn . (∗) Then there is (βm )′ ∈ Q i∈N Q≥0 such that the following I-supported set Γm := {β1 , . . . , βm−1 , βm − (βm )′ , βm+1 , . . . , βn−1 , βn − (βm )′ , (βm )′ } ⊆ Y Q≥0 i∈N is linearly independent over Q. In particular, {β1 , . . . , βn } ⊆ P γ∈Γm Q≥0 γ. ′ ′ Proof. For each i ∈ I, we look at a set {(βm )i , . . . , (βn−1 )i } of positive rational numbers with the following properties (3.3.1) (βk )i ′ < (βk )i for all m ≤ k ≤ n − 1; ′ ′ (3.3.2) (βm )i + . . . + (βn−1 )i = (βn )i . Such a thing exists, because (βn )i < (βm )i + . . . + (βn−1 )i and all of these are positive by (∗). For each m ≤ k ≤ n − 1, we bring the following claim. ′ Claim. There are infinitely many ways to choose (βk )i . Indeed, we clarify this for (βm )′i . It is enough to replace (βm )′i by (βm )′i ± 1/ℓ and (βm+1 )′i by (βm+1 )′i ∓ 1/ℓ for all sufficiently large ℓ ∈ N. Note that (βm+1 )′i ∓ 1/ℓ and (βm )′i ± 1/ℓ are positive, because (βm+1 )i , (βm )i > 0. Let m ≤ k ≤ n − 1. We want to define βk′ in the reminding components. Take i ∈ N \ I and suppose 0 < (βn )i . Then there are nonnegative (not necessarily positive) rational numbers ′ ′ {(βm )i , . . . , (βn−1 )i } (†) with the following two properties ′ • : (βk )i ≤ (βk )i (not necessarily strict inequality), and ′ ′ • : (βm )i + . . . + (βn−1 )i = (βn )i . 4 ASGHARZADEH AND DORREH ′ Note that there exists at least one choice for (βk )i . Define ((βk )i (βk )′i if (βn )i =0 if (βn )i 6=0. := define by (†) Keep in mind the above Claim, |I| = ∞ and that Q N N is uncountable. These turn out that there ′ are uncountably many ways to choose the sequence (βm )′ := ((βm )i )i∈N . We pick one of them with the following property (βm )′ ∈ / Qβ1 + . . . + Qβn . We can take such a sequence, because Qβ1 + . . . + Qβn is countable. P Look at Γm := {β1 , . . . , βm−1 , βm − (βm )′ , βm+1 , . . . , βn−1 , βn − (βm )′ , (βm )′ }. Clearly, {β1 , . . . , βn } ⊆ γ∈Γm Q≥0 γ, and so n ≤ dimQ QΓm ≤ |Γm | = n + 1. Since (βm )′ ∈ / Q{β1 , . . . , βn }, dimQ QΓm = n + 1. That is Γm is linearly independent over Q. Let i ∈ I. Then γi > 0 for all γ ∈ Γm . This finishes the proof.  The following is our key lemma. We prove it by using the reasoning of Lemma 3.3 several times. Lemma 3.4. Let {β1 , . . . , βn } be a set of I-supported elements of Q over Q and let α ∈ i∈N Q≥0 be I-supported. Suppose Q i∈N Q≥0 that are linearly independent α = η1 β1 + . . . + ηn−1 βn−1 − βn (†) where ηi ∈ {0, 1} for all 1 ≤ i ≤ n − 1. Then there exists a finite set Γ ⊆ P elements, linearly independent over Q and {α, β1 , . . . , βn } ⊆ γ∈Γ Q≥0 γ. Q i∈N Q≥0 of I-supported ck , . . . , βn , α} is the Proof. First assume that α = βk − βn for some 1 ≤ k ≤ n − 1. Then {β1 , . . . , β desirable set. Fix 1 < m < n − 1 and assume that ηi = 0 for all 1 ≤ i ≤ m − 1 and that ηi = 1 for all m ≤ i ≤ n − 1. Then, α = βm + . . . + βn−1 − βn . Let (βm )′ be as Lemma 3.3. Put αm := βm+1 + . . . + βn−1 − (βn − βm ′ ). In view of (3.3.1) and (3.3.2), αm is I-supported. Define Γm by the Lemma 3.3 and apply Lemma 3.3 for the new data {Γm , αm }. By repeating this procedure, we find an I-supported element (βn−3 )′ ∈ Q Q≥0 \ QΓn−4 and the following I-supported set Γn−3 := {β1 , . . . , βm−1 }∪ {βm − (βm )′ , . . . , βn−3 − (βn−3 )′ }∪ Pn−3 {βn−2 , βn−1 , βn − i=m (βi )′ }∪ such that dim QΓn−3 {(βm )′ , . . . , (βn−3 )′ } P = 2n − m − 2 and {β1 , . . . , βn } ⊆ γ∈Γn−3 Q≥0 γ. Look at αn−3 := βn−2 + βn−1 − (βn − βm ′ − . . . − βn−3 ′ ). Then αn−3 is I-supported. Fix the data (αn−3 , Γn−3 ) and apply the reasoning of Lemma 3.3 to find I-supported elements (βn−2 )′ , (βn−1 )′ with the following properties: (1) (βn−2 )′ + (βn−1 )′ = βn − ((βm )′ + . . . + (βn−3 )′ ); Q (2) βn−1 − (βn−1 )′ , βn−2 − (βn−2 )′ ∈ Q≥0 are I-supported; ′ ′ ′ (3) βn−2 ∈ / QΓn−3 and βn−1 ∈ / QΓn−3 ∪ Qβn−2 . COHEN-MACAULAYNESS OF NON-AFFINE NORMAL SEMIGROUPS 5 Now we define Γn−2 := {β1 , . . . , βm−1 , βm − (βm )′ , . . . , βn−1 − (βn−1 )′ , (βm )′ , . . . , (βn−1 )′ }. It has the following properties: (i) dim QΓn−2 = |Γn−2 | = 2n − m − 1, by (3); (ii) 0 < γi for all i ∈ I and γ ∈ Γ, by (2); P γ∈Γn−2 Q≥0 γ, because Pn−1 α = i=m βi − βn Pn−1 Pn−1 = i=m (βi − (βi )′ ) + i=m (βi )′ − βn (1) Pn−1 = i=m (βi − (βi )′ ) + βn − βn P ∈ γ∈Γn−2 Q≥0 γ. (iii) {β1 , . . . , βn , α} ⊆ It is now clear that Γ := Γn−2 is the set that we search for it.  Our next aim is to drop the assumption (†) of Lemma 3.4. Q Lemma 3.5. Let {β1 , . . . , βn } be a set of I-supported elements of i∈N Q≥0 that are linearly independent Q over Q and α ∈ i∈N Q≥0 be nonzero. Then there exists a finite set of I-supported elements Γ ⊆ Q P i∈N Q≥0 such that Γ is linearly independent over Q and {α, β1 , . . . , βn } ⊆ γ∈Γ Q≥0 γ. Proof. If dim(Qβ1 + . . . + Qβn + Qα) = n + 1, there is no thing to prove. Thus, we can assume that Pn−j dim(Qβ1 + . . . + Qβn + Qα) = n. There are positive rational numbers {ǫℓ } such that α = i=m ǫi βi − Pn i=n−j+1 ǫi βi . If m = n − j, the set {β1 , . . . , βm−1 , βm+1 , . . . , βn , α} is the desirable set. So we assume that m < n − j. Also, without loss of the generality, we assume that α = βm + . . . + βn−j − βn−j+1 − . . . − βn . We argue by induction on j. Lemma 3.4 yields the proof when j = 1. Now suppose j > 1 and assume inductively that the result has been proved for j − 1. Put α1 := βm + . . . + βn−j − βn−j+1 . Then by Lemma 3.4, there exists a finite set Γ1 of I-supported elements that are linearly independent over Q and {α1 , β1 , . . . , βn−j+1 } ⊆ X Q≥0 γ. γ∈Γ1 By replacing {γ1 , . . . , γℓ } with a suitable scaler multiplication, we have α1 = γ1 + . . . + γℓ for some {γi }. By the reasoning of Lemma 3.4, we have uncountable choice for each elements of Γ1 . Hence, we can choose Γ1 such that Γ2 := Γ1 ∪ {βn−j+2 , . . . , βn } is linearly independent over Q. Rewrite α = γ1 + . . . + γℓ − βn−j+2 − . . . − βn . The number of negative signs appear in this presentation is j − 1. To finish the proof, it remains to apply the induction hypothesis.  Q Corollary 3.6. Let {β1 , . . . , βn } be a set of I-supported elements of i∈N Q≥0 . Then there exists a finite Q set Γ ⊆ i∈N Q≥0 of I-supported elements such that Γ is linearly independent over Q and {β1 , . . . , βn } ⊆ P γ∈Γ Q≥0 γ. 6 ASGHARZADEH AND DORREH Proof. We use induction on n. When n = 1, there is nothing to prove. By induction hypothesis, there P Q exists a finite set ∆ ⊆ i∈N Q≥0 such that ∆ is linearly independent over Q, {β1 , . . . , βn−1 } ⊆ δ∈∆ Q≥0 δ and δi 6= 0 for all i ∈ I. Applying Lemma 3.5 for ∆ and βn , yields the claim.  Q Q is called almost non-negative, if there exists finitely many i ∈ N Q such that (α)i is negative. An almost non-negative subset of i∈N Q can be defined in a similar way. An Q element β ∈ N Q is called almost zero, if there exists finitely many i ∈ N such that βi is nonzero. Definition 3.7. An element α ∈ N Now we are ready to prove the following. Lemma 3.8. Let M ⊆ Q i∈N Q be almost non-negative and let {β1 , . . . , βn } be a subset of I-supported elements of M linearly independent over Q and let α ∈ M be I-supported. Then there exists a finite set Γ ⊆ M of I-supported elements such that Γ is linearly independent over Q and {α, β1 , . . . , βn } ⊆ P γ∈Γ Q≥0 γ. Proof. Without loss of the generality, we can assume that α = βm + . . . + βn−j − βn−j+1 − . . . − βn and that m < n − j. The reason presented in Lemma 3.5. Let 1 ≤ k ≤ s. Take the integer l be such that αi and (βk )i are nonnegative for all i > l. Define (β˙k )i := ((βk )i 0 for all i≤l (β¨k )i := and for all (0 for all i≤l (βk )i i>l for all i>l. Also, (α̇)i := (αi 0 for all i≤l and (α̈)i := for all i>l (0 αi for all i≤l for all i>l. Q Thus α̈ and β¨k belong to i∈N Q≥0 . Note that α = α̈ + α̇. The same thing holds for βi . Also, α̇ and ˙ βk are almost zero. The data {α̈, β¨1 , . . . , β¨n } satisfies in the situation of Corollary 3.6. So, there exists a Q set {γ1 , . . . , γs } ⊆ i∈N Q≥0 of I-supported and linearly independent elements over Q with the property {α̈, β¨1 , . . . , β¨n } ⊆ Q≥0 γ1 + . . . + Q≥0 γs . Furthermore, we can choose {γ1 , . . . , γs } such that (γk )i = 0 for all i ≤ l. Due to m < n − j, one gets n + 1 ≤ s. For each 1 ≤ t ≤ n, look at α̈ = X qk (0)γk 1≤k≤s X β̈t = qk (t)γk (†) 1≤k≤s where {qk (0), qk (t)}1≤k≤s ⊆ Q≥0 . Claim. There is a set {γ1′ , . . . , γs′ } ∈ following system of equations α̇ = Q i∈N X Q with (γk′ )i = 0 for all i > l of solutions of the qk (0)γk ′ 1≤k≤s β̇t = X 1≤k≤s qk (t)γk′ (∗) COHEN-MACAULAYNESS OF NON-AFFINE NORMAL SEMIGROUPS 7 for all 1 ≤ t ≤ n. Indeed, there are two possibilities. First, suppose that n + 1 < s. That is the number of equations is less than the number of indeterminates. In this case (∗) has a solution. Secondly, suppose that n + 1 = s. Note that the matrix of coefficients of (∗) and (†) are the same. Since (†) has a solution, its matrix of coefficients is invertible. The same thing holds for (∗). Thus, in both cases, (∗) has a solution set {γ1′ , . . . , γs′ }. Since (α̇)i = (β˙k )i = 0 for all i > l, we have (γk′ )i = 0 for all i > l. This yields the claim. Now the set Γ := {γ1 + γ1′ , . . . , γs + γs′ } is the set that we search for it.  Q Corollary 3.9. Let M ⊆ i∈N Q be the set of all almost non-negative and I-supported elements. Then e := M ∪ {0} is a direct limit of {Qni : i ∈ J}. the semigroup H ≥0 Proof. Look at Γ := { For each γ := Pn i=1 n X i=1 e are linearly independent over Q}. Q≥0 γi : n ∈ N|{γi } ⊆ H Q≥0 γi ∈ Γ, define Hγ by Lemma 3.8 implies that Γ is directed. Thus, Pn i=1 Q≥0 γi . Partially ordered Γ by means of inclusion. e ≃ lim Hγ . H −→ γ∈Γ Let Pn i=1 ri γi ∈ Hγ , where ri ∈ Q≥0 . The assignment ϕγ : Hγ → Qn≥0 of semigroups. Let γ ≤ γ ′ ′ ψn,n′ : Qn≥0 → Qn≥0 by ϕγ ′ ργ,γ ′ ϕ−1 γ . Then the Pn i=1 ri γi 7→ (r1 , . . . , rn ) induces an isomorphism and ργ,γ ′ : Hγ → Hγ ′ be the natural inclusion. Define e direct limit of the direct system {Qℓn , ψn,n′ } is H.  ≥0 4. A toroidal direct system Our main result in this section is Theorem 4.10. We need several auxiliary lemmas. We begin this section by recalling the following definition. Our references are [5], [6] and [11]. Also, [7] contains many homological properties of semigroups. Definition 4.1. Let C ⊆ Zn be a semigroup and k a field. (i) Recall that k[C] is the vector space k (C) . Denote the basis element of k[C] which corresponds to c ∈ C by X c . This monomial notation is suggested by the fact that k[C] carries a natural ′ ′ multiplication whose table is given by X c X c := X c+c . (ii) Recall that C is positive if there is not any invertible element in C. (iii) Recall that C ⊆ Zn is called normal, if whenever c, c′ ∈ C and there is a positive integer m such that m(c − c′ ) ∈ C, then c − c′ ∈ C. e is called full, if whenever h, h′ ∈ C and h − h′ ∈ C e (iv) Recall that a subsemigroup extension C ⊆ C then h − h′ ∈ C. (v) Let H ⊆ Qn be a Q≥0 -semigroup, i.e., a semigroup that is closed under scaler multiplication by Q≥0 . Recall that H has no line, if there is no nonzero vector in H whose additive inverse is in H. The following result plays an essential role in this paper. Lemma 4.2. (see [15]) Let V be a finite-dimensional vector space over Q, C ⊆ V is a finitely generated Q≥0 -subsemigroup and x ∈ V \ C. (i) Then there exists a linear functional that is nonnegative on C and negative on x. 8 ASGHARZADEH AND DORREH (ii) If C contains no line, one can choose L so that it is positive on all nonzero elements of C. (iii) Set C ∗ := {f ∈ Hom(V, Q)|f (C) ≥ 0}. Then C ∗ is a finitely generated Q+ -semigroup. Example 4.3. The finitely generated assumption of C in Lemma 4.2 is needed. Indeed, look at H := {(a, b) ∈ N2 : a/b > 1}. Then H is normal. The cone it generated is C := Q≥0 H = {(a, b) ∈ Q2≥0 : a/b > 1}. Look at x := (2, 2) and let f : Q2 → Q be any nonzero linear function that is nonnegative on C. Note that x ∈ / C and f is continuous via the standard topology induced from R2 , R1 . Define an := (2 + 1/n, 2). Then an ∈ C and lim an = x. So n→∞ f (x) = lim f (an ) ≥ 0. n→∞ Remark 4.4. Adopt the notation of Example 4.3. One can prove that C has not a minimal generating set as a Q≥0 -semigroup. We state the following result to demonstrate our interest on the further. Q N Q≥0 and for possible application in Remark 4.5. Let H ⊆ Zn be a positive and normal semigroup. There is an infinite index set J such that Q Q L H is full in J ( N Q ⊕ N Q≥0 ). Indeed, we assume that H − H = Zn0 . Define C := Q≥0 H ⊆ Qn0 as the Q≥0 -subsemigroup generated by H. Look at the vector spaces V = Qn0 and V ∗ = HomQ (V, Q). Clearly, C is a countable set. Consider a chain C1 ⊆ C2 ⊆ . . . ⊆ C such that Ci is nonzero finitely generated Q≥0 -subsemigroup of C and Q C ⊆ N V ∗ by S Ci = C. Now we define C := {(fn )n∈N |fn ∈ V ∗ and fn (Cn ) ≥ 0 for all n}. One may find that C is closed under sum and scaler multiplication by Q≥0 . Let {aj : j ∈ J} be the set C and denote the n-th component of aj by ajn . Note that J is an infinite index set. Fix h ∈ H and j ∈ J. Then h ∈ C and so h ∈ Cn for some n. Hence h ∈ Cm for all m ≥ n. This means that aj (h) > 0 for all m ≥ n. It turns out that M Y (ajn (h))n∈N ∈ ( Q⊕ Q≥0 ). N j N So, the assignment h 7→ (a (h))j∈J , defines a map YM Y ϕ : H −→ ( Q⊕ Q≥0 ). J N N We show that ϕ is a full embedding. To see this, let x 6= y be two distinct elements of H. Without loss of generality, we can assume that x − y ∈ / H since H is positive. Also, we can assume that x − y ∈ / C since H is normal. Then x − y ∈ / Cn for all n. In view of Lemma 4.2, there is a linear functional fn nonnegative on Cn and negative on x − y. Hence, j := (fn )n∈N ∈ C, i.e., we find j and n such that ajn (x − y) < 0. In particular, ajn (x) 6= ajn (y), i.e., ϕ is injective. QL Q We finish the proof by showing that im(ϕ) ⊆ ( Q ⊕ Q≥0 ) is full. Take x, y ∈ H be such that Q Q L ϕ(x) − ϕ(y) ∈ J ( N Q ⊕ N Q≥0 ). In order to show x − y ∈ H, its enough to prove that x − y ∈ C, because H is normal. Suppose on the contrary that x − y ∈ / C. Hence, x − y ∈ / Cn for all n. In the COHEN-MACAULAYNESS OF NON-AFFINE NORMAL SEMIGROUPS 9 light of Lemma 4.2, there is a linear functional fn that is nonnegative on Cn and negative on x − y. By definition of C, j := (fn )n∈N ∈ C. Look at j−th component of ϕ(x) − ϕ(y). It is M Y (fn (x − y))n∈N ∈ ( Q⊕ Q≥0 ). N N So fi (x − y) ≥ 0 for all but finitely many i, a contradiction that we search for it. Lemma 4.6. Let C be a normal submonoid of Zn . Then there is a direct system {(Cγ , fγδ )} of finitely generated normal submonoids of C such that C = limγ∈Γ Cγ , where fγδ : Cγ → Cδ is the inclusion map −→ for γ, δ ∈ Γ with γ ≤ δ. Proof. This is in [1, Lemma 2.2]. Recall that a set M ⊆ Q N  Q is called almost positive, if it consists of all β ∈ finitely many coordinates of β is negative. Q N Q such that only Lemma 4.7. Let H ⊆ Zn be a positive and normal semigroup and let {h1 , . . . , hs } be a finite subset of H. The following holds. (i) There is an almost positive Q+ -subsemigroup M ⊆ Q N Q and a full embedding ϕ : H → M . (ii) There is an infinite set I ⊆ N such that ϕ(hk )i > 0 for all i ∈ I and 1 ≤ k ≤ s. Proof. Denote the group that H generates by H − H and suppose H − H = Zn0 . By Lemma 4.6, H = S i∈N Hi where Hi is a finitely generated normal positive semigroup. Also, Hi ⊆ Hi+1 . Without loss of the generality, we assume that Hi − Hi = Zn0 . Define C := Q≥0 H ⊆ Qn0 and Ci := Q≥0 Hi ⊆ Qn0 as the Q≥0 -subsemigroups generated by H and Hi , respectively. Then Ci is a finitely generated Q+ -semigroup with no line and Ci ⊆ Ci+1 . Look at the vector space V := Qn0 and its dual space V ∗ := HomQ (V, Q). Set Ci∗ := {f ∈ V ∗ |f (Ci ) ≥ 0}. In view of Lemma 4.2, Ci∗ is a finitely generated Q+ -semigroup. Let {f1i , . . . , fni i } be a set of generators for Ci∗ as a Q+ -semigroup. Also, take g i ∈ Ci∗ such that g i (Ci ) > 0. Such a linear functional exists by Lemma 4.2. So, the assignment h 7→ (g 1 (h), f11 (h), . . . , fn11 (h); g 2 (h), f12 (h), . . . , fn22 (h); . . .), defines a map ψ : H −→ Y Q. N We are ready to prove the Lemma. Q (i): Denote the set of all β ∈ N Q such that only finitely many coordinates of β are negative by M . Clearly, ψ(H) ⊆ M . We now apply an idea from [15], to show that the map ϕ : H → M induced by ψ is a full embedding. Let x 6= y be two distinct elements of H. Without loss of the generality, we can assume that x − y ∈ /C since C has no any lines. Then x − y ∈ / Cm for all m. In view of Lemma 4.2, there is a linear functional fm nonnegative on Cm and negative on x − y. Hence, fm ∈ / Ci∗ . This means that fjm (x − y) < 0 for some 1 ≤ j ≤ nm . Thus ϕ(x) 6= ϕ(y) and so ϕ : H → M is an embedding. Let x, y ∈ H be such that ϕ(x) − ϕ(y) ∈ M . Suppose on the contrary that x − y ∈ / H. Then for each i, there exists 1 ≤ j ≤ ni such that fji ∈ Ci∗ and fji (x − y) < 0. This implies that ϕ(x) − ϕ(y) ∈ / M , which is a contradiction. Therefore, in view of Definition 4.1(iv), ϕ(H) is full in M . (ii): Let i be such that {h1 , . . . , hs } ⊆ Ci . Keep in mind that Cm ⊂ Cm+1 for all m. Then {g j (h) : j ≥ i} are components of ϕ(h) that are nonzero for all h ∈ {h1 , . . . , hs }.  10 ASGHARZADEH AND DORREH Lemma 4.8. Let k be a field and H be a full subsemigroup of a semigroup D. Then k[H] is a direct summand of k[D]. Proof. The proof is similar to the affine case and we leave it to the reader.  Definition 4.9. Let R and S be two polynomial rings over a filed and ϕ : R → S a ring homomorphism. Then ϕ is called a toric map if it sends a monomial to a monomial. Theorem 4.10. Let k be a field and H ⊆ Zn be a positive and normal semigroup. Then there is a direct system {An : n ∈ N} with the following properties: (i) An is a Noetherian polynomial ring over k for all n ∈ N. (ii) An → Am is toric for all n ≤ m. (iii) k[H] is a direct summand of limn∈N An . −→ Proof. First, we remark that H is countable. Thus, it has a countable generating set {hi |i ∈ N}. By Q Lemma 4.7 (i), there is a full embedding ϕ : H ֒→ M ⊂ N Q. For any finite subset X of H, by applying Lemma 4.7 (ii), there is an infinite set I ⊆ N such that X consists of I-supported elements, when we regard X as a subset of M . So, we are in the situation of Lemma 3.8. Fix n ∈ N. In view of Lemma 3.8, there is a set Γ := {γ1n , . . . , γsnn } ⊆ M of Q-linearly independent elements and that } ⊆ Q+ γ1n + . . . + Q+ γsnn . {h1 , . . . , hn }, {γ1n−1 , . . . , γsn−1 n−1 Since {h1 , . . . , hn }, {γ1n−1 , . . . , γsn−1 } are finite, we can assume that n−1 {h1 , . . . , hn }, {γ1n−1 , . . . , γsn−1 } ⊆ Nγ1n + . . . + Nγsnn . n−1 Look at Cn := Nγ1n + . . . + Nγsnn . Hence H ⊆ S n∈N Cn . This is a full embedding, because and H ⊆ M is full. Set An := k[Cn ] and denote the natural map An → An+1 by ϕn,n+1 . S n∈N Cn ⊆M Now we prove the Theorem. (i) An is a Noetherian polynomial rings over k, since Cn = Nγ1n + . . . + Nγsnn ≃ Nsn , by the assignment m1 γ1n + . . . + msn γsnn 7−→ (m1 , . . . , msn ). (ii) An → An+1 is toric, since ϕn,n+1 (Cn ) ⊂ Cn+1 . (iii) k[H] is a direct summand of limn∈N An , since H ⊆ −→ So, {An : n ∈ N} is the desirable directed system. S n∈N Cn is a full embedding.  In the following we cite a result of Teissier who studied a direct limit of a nested sequence of polynomial subalgebras with toric maps with applications on resolution of singularities. Remark 4.11. Let (R, m, k) be a valuation ring of finite Krull dimension containing k with value map v : R → Γ. The associated graded ring of R with respect to v is M grv (R) := {x ∈ R : v(x) ≥ γ}/{x ∈ R : v(x) > γ}. γ∈Γ In view of [21, Section 4], grv (R) is a direct limit of a nested sequence of polynomial subalgebras with toric maps. COHEN-MACAULAYNESS OF NON-AFFINE NORMAL SEMIGROUPS 11 5. Projective dimension and regular sequence In this section we present a criterion of regularity of sequences in the terms of projective dimension, see Theorem 5.5. We need it in Theorem 6.7. Our reference for combinatorial commutative algebra is [13]. Let R be a ring, M an R-module and x = x1 , . . . , xℓ be a system of elements of R. By K• (x), we mean the Koszul complex of R with respect to x. Also, p. dimR (M ) denotes the projective dimension of M over R. Question 5.1. Let a be an ideal of a ring R minimally generated by n elements. Suppose that p. dim(R/a) = n. Under what conditions a can be generated by a regular sequence? There are several positive answers inspired by [4, Theorem 2.2.8]: Remark 5.2. (i) Suppose a is a parameter sequence of a local ring R and R contains a filed. By using The Canonical Element Conjecture, one can find a positive answer to Question 5.1. For more details, see [2, 1.6.2, 1.6.3]. (ii) Let x be a set of generators of a. If H 1 (K• (x)) is a free R/a-module, then one can find a positive answer to Question 5.1. For more details, see [20, Proposition 25]. Lemma 5.3. Let A be a ring, x a regular element and x1 , x2 a sequence of elements of A. If xx1 , xx2 is a regular sequence, then x1 , x2 is a regular sequence and p. dim(A/(x1 , x2 )A) = p. dim(A/(xx1 , xx2 )A). Proof. Clear.  Lemma 5.4. Let A be a polynomial ring over a field and x1 , x2 be a sequence of monomials in A. If p. dim(A/(x1 , x2 )A) = 2, then x1 , x2 is a regular sequence in A. Proof. Look at the minimal free resolution of A/(x1 , x2 )A: ϕ 0 −→ P −→ A2 −→ A −→ A/(x1 , x2 ) −→ 0 (∗). Then P is free, because finitely generated projective modules on a polynomial ring over a field are free. Localize (∗) with the fraction filed of A to observe P = A. In view of Hilbert-Burch Theorem [4, Theorem 1.4.17], we see that (x1 , x2 ) = aI1 (ϕ) where a is regular and I1 (ϕ) is the first minor of ϕ. Its grade is two. Rigidity of Koszul yields the claim. But we prefer to give a more directed proof. By Lemma 5.3, we assume that (x1 , x2 ) = I1 (ϕ). Keep in mind that a monomial ideal has a unique (monomial) minimal generating set by monomials ([13, Proposition 1.1.6]). We use the proof of the converse part of the Hilbert-Bruch Theorem [4, Theorem 1.4.17] to obtain the following minimal free resolution of A/(x1 , x2 ) 2 t (xx12 ) 2 (−x x1 ) A −→ 0 −→ A −→ A −→ 0 (∗, ∗). But (∗, ∗) is the Koszul complex with respect to x1 , x2 . The acyclicity of the Koszul complex yields the claim.  Theorem 5.5. Let A be a Noetherian polynomial ring over a field and x := x1 , . . . , xn a monomial sequence in A. If p. dim(A/(xi1 , . . . , xik )A) = k for all 1 ≤ i1 < . . . < ik ≤ n, then x is a regular sequence in A. Proof. The proof is induction by on n. When n = 1 the claim is clear. The case n = 2 follows by Lemma 5.4. Let 1 ≤ i  j ≤ n. By assumption, p. dim(A/(xi , xj )A) = 2. By Lemma 5.4, xi , xj is a regular sequence in A. Denote the least common multiple of xi , xj by [xi , xj ]. Thus ([xi , xj ]/xi ) = (xj ) (⋆). 12 ASGHARZADEH AND DORREH By induction assumption, xn−1 := x1 , . . . , xn−1 is a regular sequence. Then K• (xn−1 ) is a projective resolution of A/xn−1 A. Also, K• (xn ) provides a projective resolution for A/xn A. This enable us to compute the following: Hi (K• (x)) = Hi (K• (xn−1 ) ⊗ K• (xn )) = TorA i (A/xn A, A/xn−1 A). So Hi (K• (x)) = 0 for all i > 1 and H1 (K• (x)) = TorA 1 (A/xn A, A/xn−1 A) = (xn−1 ) ∩ (xn ) . (xn−1 A)(xn A) We apply [13, Proposition 1.2.1] to conclude that (xn−1 ) ∩ (xn ) = ([xi , xn ] : 1 ≤ i ≤ n − 1). In view of (⋆), (xn−1 ) ∩ (xn ) = (xn−1 A)(xn A). Therefore, (xn−1 ) ∩ (xn ) =0 (xn−1 A)(xn A) and so K• (x) is acyclic. This means that x is a regular sequence, as claimed.  The following says that the assumptions of Theorem 5.5 are needed. Example 5.6. (Engheta [9]). Let J be an ideal of R := K[X1 , . . . , Xn ] generated by three cubic forms and denote by I the unmixed part of J. (i) If I contains a linear form, then p. dim(R/J) ≤ 3. (ii) The above bound is sharp. We use the following definition several times in the sequel. Definition 5.7. Let I be an ideal of a polynomial ring S = K[y1 , . . . , ym ] generated by monomials x := x1 , . . . , xn . Let T be a free S-module with basis {e1 , . . . , en }. Define Ti := ∧i T for i = 0, . . . , n. For each ∆ = {j1 < . . . < ji }, the set {e∆ : ∆} provides a base for Ti . Denote the least common multiple of the monomials {xi : i ∈ ∆} by x∆ . By σ(∆, i) we mean the numbers of j with j ∈ ∆ and j < i. Finally, P x∆ e∆\{i} . The Taylor complex T with respect to x is the following define ∂(e∆ ) := i∈∆ (−1)σ(∆,i) x∆\{i} complex ∂n−2 ∂ ∂n−1 0 −−−−→ T0 −−−0−→ · · · −−−−→ Tn−2 −−−−→ Tn−1 −−−−→ Tn −−−−→ 0. Remark 5.8. Here we give another proof for Theorem 5.5. Denote the Taylor resolution of x by T(x). First, we compute the (n − 1)-th homology of K• (x). We do this by looking at K0 −−−−→   ϕ0 y dn−2 dn−1 ∂n−2 ∂n−1 · · · −−−−→ Kn−2 −−−−→ Kn−1 −−−−→ Kn −−−−→ 0         ϕn y ϕn−1 y ϕn−2 y y T0 −−−−→ · · · −−−−→ Tn−2 −−−−→ Tn−1 −−−−→ Tn −−−−→ 0. The map ϕn and ϕn−1 are identity. A diagram chasing argument shows that ϕn−2 is a diagonal matrix with terms [xi , xj ]/xi xj in the diagonal. In view of (⋆) in Theorem 5.5, ϕn−2 is an isomorphism. Let a ∈ ker dn−1 . Then ϕn−1 (a) ∈ ker ∂n−1 = im ∂n−2 . There is an b such that ϕn−1 (a) = ∂n−2 (b). Take c ∈ Kn−2 be such that ϕn−2 (c) = b. Hence, dn−2 (c) − a ∈ ker ϕn−1 = 0. Thus H n−1 (K• (x))) = 0. The rigidity of the Koszul complex [4, Corollary 1.6.9], implies that x is a regular sequence. COHEN-MACAULAYNESS OF NON-AFFINE NORMAL SEMIGROUPS 13 6. Invariant of tori The main result of this section is Theorem 6.13. We start our work in this section by recalling the concept of parameter sequence from [14]. Discussion 6.1. Let R be a ring, M an R-module and x = x1 , . . . , xℓ a sequence of elements of R. For m n each m ≥ n, there is a chain map ϕm n (x) : K• (x ) −→ K• (x ), which induces via multiplication by Q m−n ( xi ) . Then x is called weak proregular if for each n > 0 there exists an m ≥ n such that the maps m n Hi (ϕm n (x)) : Hi (K• (x )) −→ Hi (K• (x )) are zero for all i ≥ 1. Notation 6.2. By Hxℓ (M ), we mean the i-th cohomology of the Čech complex of M with respect to x. Definition 6.3. ([14, Definition 3.1]) Adopt the above notation. Then x is called a parameter sequence on R, if: (1) x is a weak proregular sequence; (2) (x)R 6= R; and (3) Hxℓ (R)p 6= 0 for all p ∈ V(xR). Also, x is called a strong parameter sequence on R if x1 , . . . , xi is a parameter sequence on R for all 1 ≤ i ≤ ℓ. Notation 6.4. Let a be an ideal of a ring R with a generating set x and M an R-module. We denote sup{i ∈ Z|Hxi (M ) 6= 0} by cda (M ). By cd(a) we mean sup{cda (M )| M is an R-module}. Lemma 6.5. Let k be field and I a monomial ideal in the polynomial ring A := k[X1 , . . . , Xn ]. Then cd(I) ≤ p. dim(A/I). Proof. Let t be an integer. The assignment Xi 7→ Xit induces a ring homomorphism Ft : k[X1 , . . . , Xn ] → k[X1 , . . . , Xn ]. By Ft (A), we mean A as a group equipped with left and right scalar multiplication from A given by a.r ⋆ b = aFt (b)r, where a, b ∈ A and r ∈ Ft (A), Let (F• , d• ) be a finite free resolution of A/I with monomial maps. For example, take the Taylor resolution. Then (F• , d• ) ⊗A Ft (A) = (F• , Ft (d• )). Denote the ideal generated by the ℓ × ℓ minors of a matrix (aij ) by Iℓ ((aij )). Let ri be the expected rank of d• . For more details and definitions, see [4, Section 9.1]. Clearly, ri is the expected rank of Ft (d• ). Thus, K. gradeA (Iri (di ), A) = K. gradeA (Iri (dti ), A). In view of [4, Theorem 9.1.6], (F• , dt• ) is exact and so it is a free resolution of Ft (A/I) ≃ A/(ut : u ∈ I). It turns out that p. dim(A/I) = p. dim(Ft (A/I)) = p. dim((A/(ut : u ∈ I)). Thus, ExtiA (A/(ut : u ∈ I), −) = 0 for all i > p. dim(A/I). So, HIi (−) ≃ limt∈N ExtiA (A/(ut : u ∈ I), −) = 0, −→ which yields the claim.  Also, we need: Lemma 6.6. Let A be a ring and x := x1 , . . . , xn a sequence in A. If cd(xA) = n, then cd((xi1 , . . . , xik )A) = k for all 1 ≤ i1 < . . . < ik ≤ n. 14 ASGHARZADEH AND DORREH Proof. Set xn−1 := x1 , . . . , xn−1 and look at the exact sequence (−)xn −→ Hxn (−) −→ Hxnn−1 (−). Hxn−1 n−1 Note that Hxnn−1 (−) = 0 and Hxn (−) 6= 0. So, Hxn−1 (−) 6= 0, i.e., cd(xn−1 Aδ ) = n − 1. An easy induction n−1 yields the claim.  Theorem 6.7. Let {Aγ : γ ∈ Γ} be a direct family of Noetherian polynomial rings over a field with toric maps and let R be a direct summand of A := limγ∈Γ Aγ . Let x := x1 , . . . , xℓ be a monomial strong −→ parameter sequence in R. Then x is a regular sequence in R. Proof. By definition, Hxℓ (R)p 6= 0 for all p ∈ V(xR), and so Hxℓ (R) 6= 0. There is an R-module M such that R ⊕ M = A. Thus, Hxℓ (R) ⊕ Hxℓ (M ) ≃ Hxℓ (A). Hence, Hxℓ (A) 6= 0. Keep in mind that A = limγ∈Γ Aγ . It yields that there is a direct set Λ cofinal with respect to Γ such that Hxℓ (Aδ ) 6= 0 for all −→ δ ∈ ∆. Thus, cd(xAδ ) = ℓ. Clearly, x is monomial in Aδ . Also, the Taylor resolution provides a bound for the projective resolutions of monomial ideals. In the light of Lemma 6.5, ℓ = cd(xAδ ) ≤ p. dim(Aδ /xAδ ) ≤ ℓ. Therefore, p. dim(Aδ /xAδ ) = ℓ (∗). By Lemma 6.6, cd(xi1 , . . . , xik ) = k for all 1 ≤ i1 < . . . < ik ≤ ℓ. In view of (∗) we see p. dim(Aδ /(xi1 , . . . , xik )) = k for all 1 ≤ i1 < . . . < ik ≤ ℓ. Due to Theorem 5.5, x is a regular sequence in Aδ and so in A := limδ∈∆ Aδ . −→ Since R is pure in A, x is a regular sequence in A by [4, Lemma 6.4.4(c)] and this completes the proof.  Remark 6.8. Adopt the notation of Theorem 6.7. One can proof it by using polarization instead of the Taylor resolution. To see this, let (y) ⊆ Bδ := Aδ [Y1 , . . . , Ynδ ] be a polarization of (x)Aδ ⊆ Aδ and remark by [17] in the square-free case that the inequality of Lemma 6.5 achieved. So ℓ ≤ p. dim(Aδ /xAδ ) = p. dim(Bδ /(y)Bδ ) = cd(yBδ ) ≤ µ(yBδ ) P = j β1j (yBδ ) P = j β1j (xAδ ) ≤ ℓ. We need the following: Lemma 6.9. Let R be a ring and x := x1 , . . . , xℓ a finite sequence of elements of R. (i) Let f : R → S be a flat ring homomorphism. If x is a (strong) parameter sequence on R and S/(f (x))S 6= 0 then f (x) is a (strong) parameter sequence on S. The converse holds if f is faithfully flat. (ii) If y := y1 , . . . , yℓ is such that rad(y)R = rad(x)R, then x is a parameter sequence on R if and only if y is a parameter sequence on R. (iii) If u1 , . . . , uℓ are invertible and y := x1 u1 , . . . , xℓ uℓ , then x is a regular sequence if and only if y is a regular sequence. COHEN-MACAULAYNESS OF NON-AFFINE NORMAL SEMIGROUPS Proof. Parts (i) and (ii) are in [14, Lemma 3.3]. Part (iii) is easy and we leave it to the reader. 15  Lemma 6.10. Let A be a Zn -graded ring such that any monomial parameter sequence of A is regular. Then any monomial parameter sequence of A[X1 , . . . , Xk , X1−1 , . . . , Xk−1 ] is regular. Proof. Denote A[X1 , . . . , Xk , X1−1 , . . . , Xk−1 ] by Ae . Let x := u1 , . . . , uℓ be a monomial parameter sequence on Ae . Take vj ∈ A be such that uj = vj wj , where wj is a monomial in terms of Xi and Xi−1 and look at y := v1 , . . . , vℓ . In view of Lemma 6.9, y is a monomial parameter sequence in Ae , since rad(y)Ae = rad(x)Ae . Keep in mind that A → Ae is faithfully flat. Again, by Lemma 6.9, y is a monomial parameter sequence in A. Thus, y is a regular sequence in A. It turns out that y is a regular sequence in Ae , because A → Ae is faithfully flat. In view of Lemma 6.9, x is a regular sequence in Ae .  Lemma 6.11. Let k be a field and H ⊆ Zn a positive and normal semigroup. Then any monomial parameter sequence of k[H] is regular. Proof. In view of Theorem 4.10, there is a direct system {Aγ : γ ∈ Γ} of Noetherian regular domains containing k such that k[H] is a direct summand of limγ∈Γ Aγ . By construction, Aγ → Aδ is toric for all −→ γ ≤ δ. The claim follows by Theorem 6.7 and Lemma 6.10.  The proof of the next result is exactly similar to the affine case. For the convenience of the reader we give its proof. Lemma 6.12. Let C be a normal subsemigroup of Zn . Then C ∼ = Zk ⊕ C ′ , where C ′ is isomorphic to a positive normal semigroup. Proof. Without loss of the generality, we may assume that C − C = Zn . Let H be the set of all elements of C with additive inverse in C. Then H is a subgroup of Zn , and so H ∼ = Zk for some k ∈ N. Suppose β ∈ Zn = C − C and ℓβ ∈ H. Then ℓ(−β) ∈ H as well. Both β and −β are in Zn = C − C. It follows that β and −β are both in C. So β ∈ H, as required. Thus, Zn /H is a finitely generated torsion-free group. Conclude that it is free. Thus, 0 −→ H −→ Zn −→ Zn /H −→ 0 splits. Let H ′ be a free complement for H in Zn . Every element β ∈ C can be expressed uniquely as α + α′ where α ∈ H and α′ ∈ H ′ . But −α ∈ C, and so α′ ∈ C. Thus C = H ⊕ C ′ , where C ′ = C ∩ H ′ . An easy computation shows that C ′ is positive and normal.  Theorem 6.13. Let k be a field and H ⊆ Zn be a normal semigroup. Then any monomial parameter sequence of k[H] is a regular sequence. Proof. In view of Lemma 6.12, H ∼ = Zk ⊕ H ′ , where H ′ is isomorphic to a positive normal semigroup. It is easy to see that k[H] ∼ = k[Zk ⊕ H ′ ] ∼ = k[H ′ ][X1 , . . . , Xk , X1−1 , . . . , Xk−1 ]. By Lemma 6.11, any monomial parameter sequence is a regular sequence. We use Lemma 6.10 to deduce the claim.  16 ASGHARZADEH AND DORREH 7. All together now: The Proof of Theorem 1.1 We start this section by the following. Notation 7.1. Denote N∞ := S s∈N Ns and S s∈N Zs by Z∞ . Definition 7.2. Let H ⊆ Z∞ be a semigroup. (i) Suppose α, α′ ∈ H and there is k ∈ N such that k(α−α′ ) ∈ H. We say H is normal, if α−α′ ∈ H. (ii) Suppose α, α′ ∈ H and α − α′ ∈ N∞ . We say H is full, if α − α′ ∈ H. Definition 7.3. A ring is called Cohen-Macaulay in the sense of Hamilton-Marley, if any of its strong parameter sequence is a regular sequence. Lemma 7.4. Let {Aγ : γ ∈ Γ} be a direct family of Cohen-Macaulay rings in the sense of HamiltonMarley. If Aδ → Aγ is pure for all δ ≤ γ, then A := limγ∈Γ Aγ is a Cohen-Macaulay ring in the sense of −→ Hamilton-Marley. Proof. Let x := x1 , . . . , xn be a strong parameter sequence on A. Take γ ∈ Γ be such that x ∈ Aδ for all δ ≥ γ. There exists an integer m ≥ n such that the maps m n ϕm,n,A := Hi (ϕm n (x; A)) : Hi (K• (x ; A)) −→ Hi (K• (x ; A)) are zero for all i ≥ 1. By purity and in view of [4, Ex. 10.3.31], there is the following commutative diagram 0 −→ Hi (K• (xm ; Aδ )) −−−−→ Hi (K• (xm ; A))     ϕm,n,Aδ y ϕm,n,A y 0 −→ Hi (K• (xn ; Aδ )) −−−−→ Hi (K• (xn ; A)) with exact rows. Thus, m n Hi (ϕm n (x; Aδ )) : Hi (K• (x ; Aδ )) −→ Hi (K• (x ; Aδ )) are zero for all i ≥ 1, i.e., x is a weak proregular sequence on Aδ . Let p ∈ Var(xAδ ). There is q ∈ Spec(A) such that q ∩ Aδ = p, because Aδ ֒→ A is pure (note that the lying over property is true for pure morphisms). Then, Hxn (A)q n ∼ (Aq ) = HxA n ∼ = Hx(Aδ )p (Aq ) ∼ = H n ((Aδ )p ) ⊗(A x It yields that Hxn ((Aδ )p ) δ )p Aq . 6= 0. Hence x is a strong parameter sequence on Aδ . So x is a regular sequence on Aδ . Therefore, x is a regular sequence on A = limγ∈Γ Aγ . −→  Lemma 7.5. Let {Aγ : γ ∈ Γ} be a direct family of Cohen-Macaulay graded rings with pure morphisms such that their monomial parameter sequences are regular sequences. Then any monomial parameter sequence of A := limγ∈Γ Aγ is a regular sequence. −→ Proof. The proof is similar to the proof of Lemma 7.4.  The preparation of Theorem 1.1 in the introduction is finished. Now, we proceed to the proof of it. We repeat Theorem 1.1 to give its proof. Theorem 7.6. Let k be a field and H ⊆ Z∞ be a normal semigroup. Then any monomial parameter sequence of k[H] is a regular sequence. COHEN-MACAULAYNESS OF NON-AFFINE NORMAL SEMIGROUPS 17 Proof. For each n, define H(n) := H ∩ Zn . In view of Definition 7.2, H(n) ⊆ H(n + 1) is full. This yields that k[H(n)] ⊆ k[H(n + 1)] is pure. Clearly, H(n) ⊆ Zn is normal. By Theorem 6.13, any monomial parameter sequence of K[H(n)] is a regular sequence. Thus, we are in the situation of Lemma 7.5, and so any monomial parameter sequence of k[H] is a regular sequence.  Remark 7.7. In the proof of Theorem 7.6 we use only the properties 1) and 3) of Definition 6.3 but not 2). 8. An example in practise: quasi rational plane cones One source of producing 2-dimensional Cohen-Macaulay rings is the Serre’s characterization of normality in terms of his conditions (S2 ) and (R1 ). Let C ⊆ Z2 be a normal semigroup. It implies that k[C] is Cohen-Macaulay. Note that Serre’s characterization of normality is a result about noetherian rings. In fact there are 2-dimensional non-noetherian normal integral domains that they are not Cohen-Macaulay in a sense. We can take such rings that come from a normal semigroup C ⊆ Z2 . Subsection 8.1: Convenience Discussion 8.1. Let f : R2 → R be a linear form. The open half space associated to f defined by Hf> := {x ∈ R2 : f (x) > 0}. The closed half space associated to f defined by Hf≥ := {x ∈ R2 : f (x) ≥ 0}. Let L1 and L2 be two half spaces define by the linear forms l1 and l2 with rational slopes. Half spaces are not necessarily closed. By a quasi-rational plane cone, we mean L1 ∩ L2 . We assume that L1 ∩ L2 is positive. Through this section D is the lattice point of a quasi-rational plane cone. We are interested on semigroups C ⊆ D such that the extension is full and integral. The reason of this interest is because of the Subsection 8.5. Notation 8.2. Let l1 and l2 be two half-lines in the plane cross to origin. We denote the convex section that l1 and l2 generate by Conv(l1 , l2 ). We denote the anti-clock angel from l2 to l1 by ∠(l2 , l1 ). Proposition 8.3. Let C be a normal submonoid of Z2 defined by Discussion 8.1 and suppose that C is not finitely generated and C − C = Z2 . Then C is isomorph to one of the following semigroups. (i) H := {(a, b) ∈ N20 |0 ≤ b/a < ∞} ∪ {(0, 0)} or a full semigroup M of H such that for each (a, b) ∈ H, there exists k ∈ N such that k(a, b) ∈ M . (ii) H ′ := {(a, b) ∈ N2 |0 < b/a < ∞} ∪ {(0, 0)} or a full semigroup N of H ′ such that for each (a, b) ∈ H ′ , there exists k ∈ N such that k(a, b) ∈ N . (iii) H1 := {(a, b) ∈ Z2 |b ∈ N0 , if a is negative b 6= 0} ∪ {(0, 0)} or a full semigroup M of Hi such that for each (a, b) ∈ H1 , there exists k ∈ N such that k(a, b) ∈ M . (iv) H2 := {(a, b) ∈ Z2 |b ∈ N} ∪ {(0, 0)}, or a full semigroup M of H2 such that for each (a, b) ∈ H2 , there exists k ∈ N such that k(a, b) ∈ M . Proof. First suppose that π/2 < ∠(l2 , l1 ) < π. Set M := Conv(l1 , l2 ) ∩ Z2 . Then by [5, Corollary 2.10], M is finitely generated. Choose pi in M with the property that they are first integer point of li from the origin. Note that M ⊂ Q+ p1 + Q+ p2 . So there is an n ∈ N such that for each point P of M , nP ∈ Np1 + Np2 . Define the linear map ψ : Q2 → Q2 18 ASGHARZADEH AND DORREH via the assignments p1 7→ n(1, 0) and p2 7→ n(0, 1). Then ψ is an isomorphism. For each m ∈ M , write m = q1 p1 + q2 p2 with nq1 , nq2 ∈ N. Hence ψ(nm) = n2 q1 (1, 0) + q2 n2 (0, 1). Conclude that ψ(M ) ⊆ N2 . Furthermore, at least one of the axes dose’nt intersect with ψ(C). Without loss of the generality, we may assume that this axis is the y-axis. Thus we are in the situation of (i) and (ii) Secondly, suppose that 0 < ∠(l2 , l1 ) < π/2. In this case, similar as the first case, we achieve the above items (i) and (ii). Thirdly, suppose that ∠(l2 , l1 ) is π radian. In this case, similar as above, there exists a linear assignment η such that Conv(l1 , l2 ) maps isomorphically to W := {(α, β) ∈ Z2 |β ≥ 0}. Thus we are in the situation of (iii) and (iv).  Subsection 8.2. Preliminary lemmas We start with the following. Remark 8.4. Let H be the normal semigroup {(a, b) ∈ N20 |0 ≤ b/a < ∞} ∪ {(0, 0)} and let k be a field. Note that H is normal. In view of [1] (i) k[H] is not Cohen-Macaulay in the sense of ideals. This means that there is an ideal a such that ht(a) 6= p. grade(a, k[H]), where p. grade(a, k[H]) is the polynomial grade of a. (ii) k[H] is not weak Bourbaki unmixed. This means that there is a finitely generated ideal a of height greater or equal than the minimal number of its generator such that minimal prime ideals a does not coincide with the set of all weak associated prime ideals of k[H]/a. (iii) k[H] is Cohen-Macaulay in the sense of Hamilton-Marley. Also, Cohen-Macaulayness is not closed under taking the direct limit, if we adopt each of the above notion as a candida for definition of non-Noetherian Cohen-Macaulay rings. For more details see [1]. We use the following several times in this paper. Lemma 8.5. (see [11, Theorems 21.4 and 17.1]) Let H ⊆ Zn be a semigroup with Zn as a group that it generates. Then dim k[H] = dim k[Zn ] = n. Lemma 8.6. Let H be as Remark 8.4 and let f ∈ k[H] be such that f (0) 6= 0. If p ∈ Vark[x,y] (f ) is of height one, then there is f1 ∈ k[H] such that p = f1 k[x, y] and f1 (0) 6= 0. Also, f k[H] = (f )k[x, y] ∩ k[H]. Proof. This is in [1, Lemma 4.9] and the proof of [1, Theorem 4.10].  Lemma 8.7. Let x := x1 , . . . , xn be a parameter sequence. Then ht(x) ≥ n. Proof. See [14, Proposition 3.6].  Subsection 8.3: Certain Cohen-Macaulay rings Notation 8.8. Let f ∈ k[H] and h ∈ H. By fh we mean the coefficient of X h in f . Discussion 8.9. In this subsection we show all semigroups appear in Proposition 8.3 are Cohen-Macaulay. The proofs have the same sprit, but different details. The strategy is as follows. Take f, g be a parameter sequence. Combining Lemmas 8.7 and 8.5 we have ht(f, g)k[C] = 2. Without loss of the generality, we COHEN-MACAULAYNESS OF NON-AFFINE NORMAL SEMIGROUPS 19 assume that f(0,0) 6= 0. Then we construct a ring homomorphism from our affine toric ring A to a ring B with the property f A = (f )B ∩ A and f, g is a regular sequence in B. Then our proofs become complete, by showing that the same thing holds in A. To find a contradiction of certain contrary, one of our tricks is to find an element h such that Var(f, g) = Var(h). Lemma 8.10. Let C ⊆ Z2 be a semigroup which is isomorph to H := {(a, b) ∈ N20 |0 ≤ b/a < ∞}∪{(0, 0)} or a full semigroup M of H such that for each (a, b) ∈ H, there exists t ∈ N such that t(a, b) ∈ M . Then k[C] is Cohen-Macaulay in the sense of Hamilton-Marley. Proof. If C is isomorph to H then by Remark 8.4, k[C] is Cohen-Macaulay. Thus C is isomorph to M . Note that m := {h ∈ k[C]|h(0, 0) = 0} is a maximal ideal of k[C]. Take f, g ∈ m. There exists k ∈ N such that xk ∈ k[C]. If xl y d ∈ k[C], then there exists t ∈ N such that (2lkt − kt, 2dkt) ∈ C. So (xl y d )2kt = xkt (x2lkt−kt y 2kdt ) ∈ p for all p ∈ Var(xk ). This implies that Var(f, g) = Var(xk ). In view of [14, Proposition 2.1(e)] 2 Hf,g (k[C])m = Hx2k (k[C])m = 0. Then f, g isn’t a parameter sequence. Now we assume that f, g is a parameter sequence such that f (0, 0) 6= 0. Since C is full in H, k[C] is direct summand of k[H]. Furthermore, for each xl y d ∈ k[H], there is t ∈ N such that (xl y d )t ∈ k[C]. Therefore k[H] is integral over k[C]. Note that k[C] is normal. This implies that the inclusion map k[C] → k[H] has the going down and going up property. Since f, g is a parameter sequence on k[C], combining Lemmas 8.7 and 8.5 we have ht(f, g)k[C] = 2. We claim that ht(f, g)k[x, y] = 2. Else, by Lemma 8.6, there is f1 ∈ k[H] such that f1 k[x, y] ∈ Vark[x,y] (f, g). Suppose f1 = c + xh where 0 6= c ∈ k, h ∈ k[x, y]. Thus (f1 , hxy)k[x, y] is proper in k[x, y]. Suppose on the contrary that there are f ′ , g ′ ∈ k[x, y] such that f ′ (c + xh) + g ′ (hxy) = 1. Then f ′ = 1/c and 1/cx + g ′ xy = 0, that’s impossible. Hence f1 k[H] ⊆ (f1 , hxy)k[x, y] ∩ k[H] $ k[H]. Besides hxy ∈ / f1 k[H], ht(f1 k[H]) = 1. Thus ht(f1 k[H] ∩ k[C]) = 1 and f, g ∈ ht(f1 k[H] ∩ k[C]). This is a contradiction. So ht(f, g)k[x, y] = 2. In particular, f, g is a regular sequence in k[x, y]. By Lemma 8.6, f k[H] = f k[x, y] ∩ A. Therefore f, g is a regular sequence in k[H]. By purity of the inclusion map k[C] → k[H], f, g is a regular sequence in k[C]. This finishes the proof.  Lemma 8.11. Let H ′ := {(a, b) ∈ N2 |0 < b/a < ∞} ∪ {(0, 0)}. Then k[H ′ ] is Cohen-Macaulay in the sense of Hamilton-Marley. Proof. Note that m := {h ∈ k[H ′ ]|h(0, 0) = 0} is a maximal ideal of k[H ′ ] and take f, g ∈ m. An easy computation implies that Var(xy) = m. Therefore 2 2 Hf,g (k[H ′ ])m = Hxy (k[H ′ ])m = 0. So f, g can’t be a parameter sequence. Now we assume that f, g is a parameter sequence in k[H ′ ] such that f (0, 0) 6= 0. Since f, g is a parameter sequence on k[H ′ ], we have ht(f, g)k[H ′ ] = 2. We bring the following: Claim. ht(f, g)k[x, y] = 2. 20 ASGHARZADEH AND DORREH Indeed, else, by Lemma 8.6, there is f1 ∈ k[H] such that f1 k[x, y] ∈ Vark[x,y] (f, g). Let k[Ĥ] := k + yk[x, y]. The assignment m + xn 7→ m + yn gives us an isomorphism φ : k[H] → k[Ĥ]. Apply this to the reasoning of Lemma 8.6, we have f1 ∈ k[Ĥ], and f1 k[x, y] ∩ k[Ĥ] = f1 k[Ĥ]. (†) So f1 ∈ k[H ′ ]. Again, by Lemma 8.6, f1 k[x, y] ∩ k[H] = f1 k[H]. Keep in mind that k[H ′ ] = k[H] ∩ k[Ĥ]. Therefore q := f1 k[x, y] ∩ k[H ′ ] = f1 k[H ′ ]. So 2 Hf,g (k[H ′ ])q = Hf21 (k[H ′ ])q = 0. This contradiction says that ht(f, g)k[x, y] = 2. Thus f, g is a regular sequence in k[x, y]. Note that f k[H ′ ] = f k[x, y] ∩ k[H ′ ]. So f, g is a regular sequence in k[H ′ ].  Lemma 8.12. Let C ⊆ Z2 be a semigroup isomorph to a full semigroup N of H ′ such that for each (a, b) ∈ H ′ , there exists k ∈ N such that k(a, b) ∈ N . Then k[C] is Cohen-Macaulay in the sense of Hamilton-Marley. Proof. Recall that m := {h ∈ k[H ′ ]|h(0,0) = 0} is a maximal ideal of k[H ′ ] and take f, g ∈ m. Let xi y j ∈ k[C] where i > 0 and j > 0. Let (l, k) ∈ C. We multiply (l, k) by t to obtain lt > i, kt > j. Then (lt, kt) = (i, j) + (lt − i, kt − j). We find m ∈ N such that m(lt − i, kt − j) ∈ C. Therefore (xl y k )mt = (xmi y mj )(xmlt−mi y mkt−mj ) ∈ p 2 for all p ∈ Var(xi y j ). Thus Var(xi y j ) = m. Therefore Hf,g (k[C])m = Hx2i yj (k[C])m = 0. So f, g can’t be a parameter sequence. Now we assume that f, g is a parameter sequence in k[C] such that f(0,0) 6= 0. One can find easily that k[C] is direct summand of k[H ′ ] and k[H ′ ] is integral over k[C]. If ht(f, g)k[x, y] = 1 were be the case, then by the reasoning of Lemma 8.11, there should find f1 ∈ k[H ′ ] with the property f1 k[x, y] ∈ Vark[x,y] (f, g). Write f1 = c+xyh where 0 6= c ∈ k, h ∈ k[x, y]. Take i ∈ N0 be the maximum integer that h divides (xy)i . Note that (f1 , hxi+2 y i+2 )k[x, y] is proper in k[x, y]. Suppose on the contrary that there are f ′ , g ′ ∈ k[x, y] such that f ′ (c + xyh) + g ′ (hxi+2 y i+2 ) = 1. This implies that f ′ = 1/c and xy/c + g ′ xi+2 y i+2 = 0. This is impossible. Hence f1 k[H ′ ] ⊆ (f1 , xi+2 y i+2 )k[x, y] ∩ k[H ′ ] $ k[H ′ ]. Besides hxi+2 y i+2 ∈ / f1 k[H], ht(f1 k[H ′ ]) = 1. So ht(f1 k[H ′ ] ∩ k[C]) = 1 and f, g ∈ f1 k[H ′ ] ∩ k[C]. This contradiction says that ht(f, g)k[x, y] = 2. Clearly, f, g is a regular sequence in k[x, y]. Look at (†) in Lemma 8.11. That is f k[x, y] ∩ k[Ĥ] = f k[Ĥ]. This implies that f k[H ′ ] = f k[x, y] ∩ k[H ′ ]. Therefore f, g is a regular sequence in k[H ′ ]. By the purity of the inclusion map k[C] → k[H ′ ], f, g is a regular sequence in k[C].  Lemma 8.13. Let H1 := {(a, b) ∈ Z2 |b ∈ N0 , and if a is negative b 6= 0} ∪ {(0, 0)}. Then k[H1 ] is Cohen-Macaulay in the sense of Hamilton-Marley. COHEN-MACAULAYNESS OF NON-AFFINE NORMAL SEMIGROUPS 21 P Proof. Let m := {f ∈ k[H1 ]|f(0,0) = 0}. Note that m is a maximal ideal of k[H1 ]. Let (i,j)∈H1 ai,j xi y j ∈ P P m. Then (i,j)∈H1 ai,j xi y j = x( (i,j)∈H1 ai,j xi−1 y j ). This says that m = xk[H]. Let f, g ∈ m. Then 2 Hf,g (k[H1 ])m = Hx2 (k[H1 ])m = 0. Therefore, f, g can’t be a parameter sequence in k[H1 ]. Set A := k[x, y, x−1 ] and consider the localization map k[H1 ] → k[x, y, x−1 ]. Let f, g be a parameter sequence in k[H1 ] such that f(0,0) 6= 0. Hence htk[H1 ] (f, g) = 2. Consider the case (f, g)k[H1 ] ∩ {xn |n ∈ N0 } 6= ∅. Then, for all p ∈ Vark[H1 ] ((f, g)k[H1 ]), we have x ∈ p. This implies that Vark[H1 ] ((f, g)k[H1 ]) = m. So 2 Hf,g (k[H1 ])m = Hx2 (k[H1 ])m = 0. This contradiction implies that (f, g)k[H1 ]∩{xn |n ∈ N0 } = ∅. From this, we conclude that htA ((f, g)A) = 2. Therefore f, g is a regular sequence in A. We show that f, g is a regular sequence in k[H1 ]. Suppose hg = h1 f where h, h1 ∈ k[H1 ]. So h = f v P P for some v ∈ A. We need to show v ∈ k[H1 ]. Note that 06=(i,j)∈H1 fi,j xi y j = x( 06=(i,j)∈H1 fi,j xi−1 y j ). That is f = c + xb where c ∈ k and b ∈ k[H1 ]. If v ∈ k[H1 ] were not be the case, then we should have v = c0 + c1 x−1 + . . . + cn x−n + a where a ∈ k[H1 ] and n > 0. Thus h = (cc0 + cc1 x−1 + . . . + ccn x−n ) + b(c0 x + c1 + . . . + cn x−n+1 ) ∈ k[H1 ]. But the coefficient of x−n in h is ccn which is nonzero and (−n, 0) ∈ / H1 . This is a contradiction. So v ∈ k[H1 ] and this finishes proof.  Lemma 8.14. Let C ⊆ Z2 be a semigroup isomorph to a full semigroup M of H1 such that for each (a, b) ∈ H1 , there exists k ∈ N such that k(a, b) ∈ M . Then k[C] is Cohen-Macaulay in the sense of Hamilton-Marley. Proof. First recall that k[C] is a direct summand of k[H1 ] and k[H1 ] is integral over k[C]. Look at m1 := {f ∈ k[C]|f(0,0) = 0} and take f, g ∈ m1 . Then m1 is a maximal ideal of k[C]. There exists k ∈ N such that xk ∈ k[C]. It turns out that Var(xk ) = m1 . Therefore 2 Hf,g (k[C])m1 = Hx2k (k[C])m1 = 0. Then f, g isn’t a parameter sequence. Now suppose f, g is a parameter sequence and f(0,0) 6= 0. Thus htk[C] (f, g) = 2. We deduce from this to observe htk[H1 ] (f, g) = 2. If (f, g)k[H1 ] ∩ {xn |n ∈ N0 } 6= ∅, then for all p ∈ Vark[H1 ] ((f, g)k[H1 ]), we have x ∈ p. This implies that Vark[H1 ] ((f, g)k[H1 ]) = m. But f ∈ / m. In view of this contradiction, (f, g)k[H1 ] ∩ {xn |n ∈ N0 } = ∅. Now conclude that htA ((f, g)A) = 2. Therefore f, g is a regular sequence in A. So f, g is a regular sequence in k[H1 ]. In view of the purity, f, g is a regular sequence in k[C].  Lemma 8.15. Let H2 := {(a, b) ∈ Z2 |b ∈ N} ∪ {(0, 0)}. Then k[H2 ] is Cohen-Macaulay in the sense of Hamilton-Marley. 22 ASGHARZADEH AND DORREH Proof. Let m := {f ∈ k[H2 ]|f(0,0) = 0} and take f, g ∈ m. Then m is a maximal ideal of k[H2 ]. Let xa y b ∈ m. Then (xa y b )2 = (xy)(x2a−1 y 2b−1 ) ∈ p for all p ∈ Vark[H2 ] (xyk[H2 ]). This implies that Vark[H2 ] (xyk[H2 ]) = m. Therefore, 2 2 Hf,g (k[H2 ])m = Hxy (k[H2 ])m = 0. So f, g can’t be a parameter sequence in k[H2 ]. Let f, g be a parameter sequence in k[H2 ] such that f(0,0) 6= 0. Then htk[H2 ] (f, g) = 2. Consider the ring A := k[x, y, x−1 ]. Suppose on the contrary that htA ((f, g)A) = 1. Since A is a unique factorization domain, there is a prime ideal p in A such that p is minimal over (f, g)A and p = f1 A for some f1 ∈ A. We show that one can choose f1 ∈ k[H2 ]. Look at f2 ∈ k[x, x−1 ] and f3 ∈ k[H2 ] with the properties f1 = f2 +f3 and (f3 )(0,0) = 0. There is h ∈ A such that f1 h = f . We choose h2 ∈ k[x, x−1 ] and h3 ∈ k[H2 ] such that h = h2 + h3 and (h3 )(0,0) = 0. Keep in mind that f3 h1 , f3 h3 and f2 h3 are in m. Also, recall that f2 , h2 ∈ k[x, x−1 ]. Since monomials in k[H2 ] are not involved on x±n , then f2 h2 = f(0,0) ∈ k[H2 ]. Remark that f2 must be an invertible element in k[x, x−1 ]. If f2 ∈ k, then f1 ∈ k[H2 ]. Else if f2 = axn where n ∈ Z and a ∈ k, then x−n f1 ∈ k[H2 ]. Thus f1 A = x−n f1 A. Replacing f1 by x−n f1 , we assume that f1 ∈ k[H2 ]. Clearly, f1 k[H2 ] ⊆ f1 A ∩ k[H2 ]. We show that this is an equality. Write f1 = c + f2 for c ∈ k and f2 ∈ m. Also, take h ∈ A and write it as h = h1 + h2 where h1 ∈ k[x, x−1 ] and h2 ∈ m. Assume that f1 h ∈ k[H2 ]. Hence ch1 ∈ k[H2 ]. Thus h1 ∈ k and h ∈ k[H2 ]. Therefore, f1 k[H2 ] = f1 A ∩ k[H2 ]. So f1 k[H2 ] ∈ Vark[H2 ] ((f, g)k[H2 ]). Then 2 Hf,g (k[H2 ])f1 k[H2 ] = Hf21 (k[H2 ])f1 k[H2 ] = 0. This contradiction says that htA ((f, g)A) = 2. Thus f, g is a regular sequence in A. Since f A ∩ k[H2 ] = f k[H2 ], f, g is a regular sequence in k[H2 ].  Lemma 8.16. Let C ⊆ Z2 be a semigroup isomorph to a full semigroup M of H2 and for each (a, b) ∈ H2 there exists k ∈ N such that k(a, b) ∈ M . Then k[C] is Cohen-Macaulay in the sense of Hamilton-Marley. Proof. Clearly, k[C] is a direct summand of k[H2 ] and k[H2 ] is integral over k[C]. Look at the maximal ideal m1 := {f ∈ k[C]|f(0,0) = 0} and take f, g ∈ m1 . Let i ∈ Z and j ∈ N be such that xi y j ∈ k[C]. An 2 (k[C])m = Hx2i yj (k[H2 ])m = 0. easy computation shows that Vark[C] ((xi y j )k[C]) = m1 . Therefore, Hf,g So f, g can’t be a parameter sequence in k[C]. Let f, g be a parameter sequence in k[C] such that f(0,0) 6= 0. Recall that htk[C] (f, g) = 2 and htk[H2 ] (f, g) = 2. Set A := k[x, y, x−1 ]. If htA ((f, g)A) = 1, then by the reasoning of Lemma 8.15, there exists f1 ∈ k[H2 ] such that f1 k[H2 ] ∈ Vark[H2 ] ((f, g)k[H2 ]). Write f1 = c + f2 , where c ∈ k and f2 ∈ m. Assume that the maximum degree of y in f2 is n. Then y n+1 ∈ / f1 k[H2 ] and (f1 , y n+1 )k[H2 ] is a proper ideal of k[H2 ]. So htk[H2 ] (f1 k[H2 ]) = 1. This contradiction implies that htA ((f, g)A) = 2. Thus f, g is a regular sequence in A. So f, g is a regular sequence in k[H2 ]. By the purity, f, g is a regular sequence in k[C].  Subsection 8.4: Cohen-Macaulayness of quasi rational plane cones COHEN-MACAULAYNESS OF NON-AFFINE NORMAL SEMIGROUPS 23 The following is our main result of this section. Theorem 8.17. Let C be the normal submonoid of Z2 defined by Discussion 8.1. Then any parameter sequence of k[C] is a regular sequence. Proof. Without loss of the generality we can assume that C is positive. By the Proposition 8.3, C is full in {H, H ′ , H1 , H2 } and the extension is integral. We showed by lemmas of subsection 8.3 that all of these are Cohen-Macaulay in the sense of Hamilton-Marley. This completes the proof.  Subsection 8.5: Toward the classification Discussion 8.18. Let C ⊆ Z2 be a positive normal semigroup such that C is not finitely generated and assume that C − C = Z2 . (i) There are two elements a, b ∈ C linearly independent over Q and QC = Q2 = Qa + Qb. Take the integer t ∈ N be such that t(1, 0), t(0, 1) ∈ Za + Zb. Define the linear map ϕ : Q2 → Q2 via the assignments ϕ(a) = t(1, 0) and ϕ(b) = t(0, 1). Note that ϕ is an isomorphism. Thus, ϕ(C) is normal and positive. Claim. ϕ(C) ⊆ Z2 . Indeed, let c := (m, n) ∈ C. Take the integers {m′ , m′′ , n′ , n′′ } be such that tc = tm(1, 0) + tn(0, 1) = m(m′ a + m′′ b) + n(n′ a + n′′ b). Hence ϕ(tc) = (mm′ + nn′ )t(0, 1) + (nn′ + mm′′ )t(1, 0). So ϕ(c) = (mm′ + nn′ )(0, 1) + (nn′ + mm′′ )(1, 0) ∈ Z2 . (ii) If P ∈ N2 , then tP ∈ ϕ(C). This follows by t(1, 0), t(0, 1) ∈ ϕ(C). (iii) Let P be a point in the third quarter of the plane. Then P ∈ / ϕ(C), because of (ii) and the positivity of ϕ(C). Notation 8.19. Denote the origin by o. → Denote the half line beginning by p and path through the q by − pq. Lemma 8.20. Adopt the notation of Discussion 8.18 and let i = 1, 2. Then there are half-lines li in the 2i-th quarter both cross through the origin with the following properties: (1) ϕ(C) ⊆ Conv(l1 , l2 ) ∩ Z2 . (2) Let P be in the interior of Conv(l1 , l2 ) or probably on the one of these half-lines. Then tP ∈ ϕ(C) for some t ∈ N. (3) The anti-clock angel from l2 to l1 is either π radian or less than π radian. −−−→ → − Proof. Define α := sup{∠(− ox, o(1, 0))|x ∈ ϕ(C) is in the forth quarter}, and take l2 be the half line path −−−−→ through the origin such that α = ∠(l2 , o(1, 0)). Also, define −−−−→ → − β := inf{∠(− ox, o(−1, 0))|x ∈ ϕ(C) is in the second quarter}, −−−−−→ and take l1 be the half line path through the origin such that β = ∠(l1 , o(−1, 0)). → ∩ Z2 . Let t be as Discussion 8.18. Let p1 := (a1 , b1 ) ∈ ϕ(C) be in the second quarter and (a2 , b2 ) ∈ − op 1 Look at the following observations. 24 ASGHARZADEH AND DORREH (i): One has t(a2 , b2 ) ∈ ϕ(C). Indeed, first note that t(a2 , b2 ) is in the group that ϕ(C) generates. Because, t(a2 , b2 ) ∈ Zϕ(a) + Zϕ(b). Also, there exists a positive rational number q = m/n such that qta2 = a1 and qtb2 = b1 . So mt(a2 , b2 ) = n(a1 , b1 ) ∈ ϕ(C). Since ϕ(C) is normal, t(a2 , b2 ) ∈ ϕ(C). → ∩ Z2 . Then by the (i)’: Suppose that q1 := (c1 , d1 ) ∈ ϕ(C) is in the forth quarter and (c2 , d2 ) ∈ − oq 1 symmetry of the above item, t(c2 , d2 ) ∈ ϕ(C). −−−−→ −−−−−→ (ii): Suppose (a3 , b3 ) ∈ Z2 is in the interior of Conv(o(0, 1), o(a2 , b2 )). Then t(a3 , b3 ) ∈ ϕ(C). Indeed, first note that (a3 /a2 ).b2 < b3 . Set 0 < q1 := b3 − (a3 /a2 ).b2 and q2 := a3 /a2 . Hence t(a3 , b3 ) = tq2 (a2 , b2 ) + q1 (0, t). Also [ t(a2 , b2 ) ∈ Zϕ(a) + Zϕ(b) ⊆ ϕ(C) ϕ(C)−ϕ(C) . [ [ So t(a3 , b3 ) ∈ ϕ(C) ϕ(C)−ϕ(C) , since ϕ(C)ϕ(C)−ϕ(C) is a semigroup. The normality of ϕ(C) implies that t(a3 , b3 ) ∈ ϕ(C). (ii)’: Having (c2 , d2 ) as in the item (i)’ and suppose that (c3 , d3 ) ∈ Z2 is in the interior of −−−−→ −−−−−→ Conv(o(1, 0), o(c2 , d2 )). Then by the symmetry of the above item, t(a3 , b3 ) ∈ ϕ(C). We are in the position to prove the Lemma. (1) ϕ(C) ⊆ Conv(l1 , l2 ) ∩ Z2 . This is clear by definition of li and Discussion 8.18(iii). (2) Let P be in the interior of Conv(l1 , l2 ) or probably on the one of these half-lines. Then tP ∈ ϕ(C) for some t ∈ N. Indeed, if P is in the first quadrant, this follows by Discussion 8.18 (ii). If P is in the second quadrant, this follows by the above observations (i) and (ii). If P is in the forth quadrant, see (i)’ and (ii)’. (3) ∠(l2 , l1 ) is less or equal than π radian, because of the positivity of ϕ(C) and (2).  Lemma 8.21. Adopt the above notation. Let M be the set consists of all P in the interior of Conv(l1 , l2 ) or probably on the one of these half-lines. Then ϕ(C) is full in M . Proof. Take h, h′ ∈ ϕ(C) with the property that h − h′ ∈ M . Look at P := h − h′ . Due to (2) in Lemma 8.20, we have tP ∈ ϕ(C) for some t ∈ N. By the normality of ϕ(C), P ∈ ϕ(C). In view of Definition, ϕ(C) is full in M .  Corollary 8.22. Adopt the above notation. Then ϕ(C) intersects at most one of the {l1 , l2 }. Proof. Suppose on the contrary that ϕ(C) intersects nontrivially with l1 and l2 . Then by the reasoning of Lemma 8.21, ϕ(C) is full in Conv(l1 , l2 ). In view of [5, Corollary 2.10], the integer points of Conv(l1 , l2 ) is a finitely generated semigroup. Recall that k[ϕ(C)] ⊆ K[Conv(l1 , l2 )] is pure, because of the fullness. Thus K[ϕ(C)] is affine. So ϕ(C) is finitely generated. This is a contradiction.  References [1] M. Asgharzadeh, M. Dorreh and M. Tousi, Direct limit of Cohen-Macaulay rings, submitted. [2] Luchezar L. Avramov and S. Iyengar, Gaps in Hochschild cohomology imply smoothness for commutative algebras, Math. Res. Lett. 12 (2005), 789-804. [3] George M. Bergman, Two statements about infinite products that are not quite true, Groups, rings and algebras, Contemp. Math., 420, Amer. Math. Soc., Providence, RI, 35-58, (2006). [4] W. Bruns and J. Herzog, Cohen-Macaulay rings, Cambridge University Press, 39, Cambridge, (1998). [5] W. Bruns and J. Gubeladze, Polytopes, rings and K-theory, Springer Monographs in Mathematics, Springer, Dordrecht, (2009). COHEN-MACAULAYNESS OF NON-AFFINE NORMAL SEMIGROUPS 25 [6] W. Bruns and J. Gubeladze, Semigroup algebras and discrete geometry, Geometry of toric varieties, 43-127, Smin. Congr., 6, Soc. Math. France, Paris, (2002). [7] W. Bruns, J. Gubeladze, Ng Vit Trung, Normal polytopes, triangulations, and Koszul algebras, J. Reine Angew. Math. 485 (1997), 123-160. [8] David A. Cox, John B. Little and Henry K. Schenck, Toric varieties, Graduate Studies in Mathematics, 124, American Mathematical Society, Providence, RI, (2011). [9] B. Engheta, Bounds on projective dimension, Ph.D. thesis, University of Kansas, (2005). [10] J. Gubeladze, The Anderson conjecture and a maximal class of monoids over which projective modules are free (Russian) Mat. Sb. (N.S.) 135 (177) (1988), no. 2, 169–185, 271; translation in Math. USSR-Sb. 63 (1989), no. 1, 165-180. [11] R. Gilmer, Commutative semigroup rings, Chicago Lectures in Mathematics, University of Chicago Press, Chicago, IL, (1984). [12] S. Goto and K. Watanabe, On graded rings, II (Zn -graded rings), Tokyo J. Math., 1 (1978), 237–261. [13] J. Herzog and T. Hibi, Monomial ideals, Graduate Texts in Mathematics, 260, Springer-Verlag London, Ltd., London, (2011). [14] T.D. Hamilton and T. Marley, Non-Noetherian Cohen-Macaulay rings, J. Algebra, 307 (2007), 343-360. [15] M. Hochster, Rings of invariants of tori, Cohen-Macaulay rings generated by monomials, and polytopes, Ann. of Math., 96, (1972), 318-337. [16] M. Larsen and V. A. Lunts, Motivic measures and stable birational geometry, Mosc. Math. J. 3, (2003), 85–95. [17] G. Lyubeznik, On the arithmetic rank of monomial ideals, J. Alg. 112, (1988), 86–89. [18] e. Miller, Cohen-Macaulay quotients of normal semigroup rings via irreducible resolutions Math. Res. Lett. 9, (2002), 117-128. [19] H. Matsumura, Commutative Ring Theory, Cambridge Studies in Advanced Math, 8, (1986). [20] Jose J. M. Soto, Finite complete intersection dimension and vanishing of Andre-Quillen homology, J. Pure Appl. Algebra 146, (2000), 197-207. [21] B. Teissier, Valuations, deformations, and toric geometry, Valuation theory and its applications, Vol. II (Saskatoon, SK, 1999), 361–459, Fields Inst. Commun., 33, Amer. Math. Soc., Providence, RI, 2003. [22] Ngo Viet Trung and Le Tuan Hoa, Affine semigroup rings and Cohen-Macaulay rings generated by monomials, Trans. Amer. Math. Soc. 298 (1986), 145-167. M. Asgharzadeh, School of Mathematics, Institute for Research in Fundamental Sciences (IPM), P. O. Box 19395-5746, Tehran, Iran. E-mail address: [email protected] M. Dorreh, Department of Mathematics Shahid Beheshti University Tehran, Iran. E-mail address: [email protected]
0math.AC
Rank and select: Another lesson learned arXiv:1605.01539v2 [cs.DS] 12 May 2016 Szymon Grabowski and Marcin Raniszewski Lodz University of Technology, Institute of Applied Computer Science, Al. Politechniki 11, 90–924 Lódź, Poland {sgrabow|mranisz}@kis.p.lodz.pl Abstract. Rank and select queries on bitmaps are essential building bricks of many compressed data structures, including text indexes, membership and range supporting spatial data structures, compressed graphs, and more. Theoretically considered yet in 1980s, these primitives have also been a subject of vivid research concerning their practical incarnations in the last decade. We present a few novel rank/select variants, focusing mostly on speed, obtaining competitive space-time results in the compressed setting. Our findings can be summarized as follows: (i) no single rank/select solution works best on any kind of data (ours are optimized for concatenated bit arrays obtained from wavelet trees for real text datasets), (ii) it pays to efficiently handle blocks consisting of all 0 or all 1 bits, (iii) compressed select does not have to be significantly slower than compressed rank at a comparable memory use. 1 Introduction Rank and select are essential building bricks of many compressed data structures, and text indexes in particular. In their most frequently used binary incarnation, they can be defined as follows: given a bit-vector B[0 . . . n−1], rankb (B, i) returns the number of occurrences of symbol b in the prefix B[0 . . . i] and selectb (B, i) returns the position of the i-th occurrence of symbol b in B, where b ∈ {0, 1}. Note that rank0 (B, i) = i−rank1 (B, i), hence it is enough to directly support the rank only for one binary symbol (e.g., 1). There is no similar relation binding the values of select0 (B, i) and select1 (B, i). It is known for at least two decades [7,2,9] that these operations can be performed in constant time, using the extra space of o(n) bits. Raman et al. [12] showed how to compress the vector B to nH0 (B) + o(n) bits, where H0 (B) is the order-0 entropy of B, and still support rank and select in constant time. Much research has been dedicated to construct rank and select solutions, both compressed and non-compressed, to answer the queries possibly fast in practice. Especially in the compressed setting also the lower-order terms of the space matter, hence the practical questions involve two aspects: the query time and the space used by the data structure. The next section briefly recalls the history of practical solutions for rank and select, starting from the non-compressed ones. 2 Related work The original rank solution, by Jacobson [7], which needs O(n log log n/ log n) bits of space1 apart from the original bit-vector, performs three memory accesses (to one superblock counter and one block counter, plus a lookup into a table with precomputed popcount answers), which often translates into three cache misses, a significant penalty. González et al. [5] proposed a scheme with one level of blocks followed by sequential scan. In theoretical terms, this solution no longer obtains both constant time and sublinear extra space, yet it fares well practically and is very simple. Vigna [13] interleaved data from different levels to improve access locality. Gog and Petri [4] carried this idea even further, interleaving the precomputed rank values and the bit-vector data. The sequential scans over small blocks of data are performed with an efficient 64-bit hardware popcount instruction (popcnt), available in Intel and AMD processors since 2008. In the manner of the González et al. solution, Gog and Petri store only one level of precomputed ranks, yet data from two successive cache lines can be sometimes read in their scheme. In a recent work, Grabowski et al. [6] showed a solution with one cache miss in the worst case. They achieve it with interleaving 64-bit precomputed rank fields with 512 − 64 = 448 bits of data. As 64 bits per rank is more than needed, part of this field stores popcount values for some prefixes of the following block, thus saving on the popcnt invocations. Kärkkäinen et al. [8] proposed a hybrid scheme for the compressed rank, where the bit-vector is divided into blocks and each block is encoded separately, choosing one of a few different methods, depending on its “local” performance. This general approach was implemented in a version with three encodings: no compression (i.e., the block kept verbatim), storing the positions of the minority bits (zeros or ones, whichever have fewer occurrences in the block), and runlength encoding for runs of zeros and ones. To make the data structure even more compact, blocks are grouped into superblocks. Thanks to it, the blocks’ header data store ranks and offsets to the beginnings of the encoded block bodies with respect to the beginning of the superblock rather than the beginning of the whole structure. Only the rank operation is supported, yet the authors mention briefly a possibility to extend their scheme in order to support selects too. As it can be implied from the literature, an efficient select is harder to design than an efficient rank, even in the non-compressed variant. Clark [2] was the first to show a constant-time select with 3n/⌈log log n⌉ + O(n1/2 log n log log n) bits of extra space. The solution is relatively complicated and needs at least 60% space overhead. González et al. [5] noticed that implementing select with binary search over a rank structure is often superior (in spite of having O(log n) time complexity), both in execution times and the space overhead. Yet, for large inputs or for low densities of set bits (assuming that we focus on the select1 query), Clark’s solution dominates. More recently, Gog and Petri [4] presented a 1 Logarithms of base 2 are used throughout the paper. practical implementation of the Clark select idea, reducing its worst-case space overhead to less than 29%. Okanohara and Sadakane [11] were the first to consider practical compressed implementations of rank/select structures and they introduced four novel r/s dictionaries (each of which was based on different ideas), reaching different space/time tradeoffs in theory and in practice. For example, they offer to answer rank or select queries in a few tenths of a microsecond (on a 3.4 GHz Intel Xeon) spending about 25% of extra space for densely (50%) populated bit-vectors. Vigna [13] obtained similar times, yet with about twice smaller space overhead. Navarro and Providel [10] raised the bar even higher (or, should we say, lower?), reducing the space overhead to about 10% of the original bit-vector on top of the entropy, solving in this space both rank and select. Their rank queries are handled within about 0.4 µsec and select queries within 1 µsec. They also show how to reuse sampling data between the rank and the select in a non-compressed scenario, with a benefit in space, which allows to answer these queries within around 0.2 µsec, using only 3% of extra space on top of the plain bit-vector. A unique approach was taken by Beskers and Fischer [1], who focus on sequences with low higher-order entropies. Their solutions are likely to be competitive e.g. for representing wavelet trees for repetitive collections of strings, like individual genomes of the same species. 3 Our algorithms In the two following subsections we present our compressed rank and select variants. 3.1 Compressed rank The input bit-vector B is conceptually divided into blocks of k bytes, and each run of h successive blocks is grouped in a superblock. For each superblock a fixed-size header is stored, having h ranks of the prefix of B up to the current block and h offsets to the areas storing the successive blocks. Popcounting over a block (or its prefix), with a 64-bit built-in instruction, is used in the final phase of the operation. Several variants were implemented, depending on the header and block representations. One important optimization is used in all the variants: a block consisting entirely of zero or one bits is not stored, as, during the query, such a case is easily recognized from checking two adjacent rank values. Such a block will be called a mono-block. Our variants are presented in the successive paragraphs. basic We have uncompressed rank and offsets in the superblock, each stored on 4 bytes, and uncompressed bit data. (Note that the notion of a superblock is artificial for this variant, but we keep it for consistency.) bch (basic with compressed headers) The first rank and the first offset in a superblock are stored on 4 bytes, while the following h − 1 ranks are stored differentially with respect to the first rank, using 2 bytes each. Additionally, we keep h − 1 bits (rounded up to a multiple of 16 bits) to tell which blocks are mono-blocks. If the query falls into a non-mono-block, knowing the first offset and checking how many mono-blocks in the superblock precede the block in question, we immediately obtain the desired offset. mpe1 (mono-pair elimination v1) The bit data are compressed in a simple manner. The input block of size k bytes is divided into 2-byte chunks and the chunks consisting of all zeros (i.e., two bytes 0) or all ones (i.e., two bytes 255) are not stored in the block. Such chunks are called mono-pairs. To made decoding possible, the block is prepended with two fields of k/2 bits each (both rounded up to the nearest multiple of 16 bits), where the bits from the first field denote if the successive 2-byte chunks are stored in the block or not, and the bits from the second field distinguish between mono-pairs with zeros and mono-pairs with ones. (Note that this encoding is somewhat redundant, as e.g. k/2 trits would be enough, but we preferred convenience over striving for maximum compression.) Some blocks are however not (well) compressible, that is, the number of monopairs in them is less than k/16. In such cases, compression is not applied to the block. The header contains one verbatim rank and one verbatim offset value, each stored on 4 bytes, while the following h − 1 ranks and h − 1 offsets are stored differentially, with respect to the first rank/offset, using 2 bytes each. One bit out of the 2 bytes per differentially encoded offset is spent for the flag informing if compression is applied to the block. mpe2 This is a little refinement of the previous variant. We separately check if it pays to remove mono-pairs of zeros, and mono-pairs of ones from the block. There are four possible cases: no compression, eliminate only mono-pairs of zeros, eliminate only mono-pairs of ones, eliminate all mono-pairs, hence the choice is marked with 2 bits (again, taken from the differentially encoded offsets). mpe3 The rank variants involving block compression are slower than basic or bch, due to the necessity to decode a compressed block before popcounting. To alleviate this penalty, in the current variant we apply compression only to the blocks which are reduced to at most half of their original size (we have not tried to tune this criterion). In this way, weakly compressible blocks are stored verbatim and querying them is fast. cf (cache-friendly) In all the variants above, answering the rank query boils down to either noticing that the query falls into a mono-block, where the answer is immediate, or not, when the data block has to be accessed and processed appropriately. The latter case is slower, partly because it typically involves another cache miss. Therefore, if the fraction of mono-blocks in a dataset is 0 ≤ f ≤ 1, we may expect about 2 − f cache misses per rank query, on average. The current variant aims to reduce the average number of cache misses. Let us have b blocks in the input, m of which are mono-blocks; the value of m is found in the first pass over the data in the construction phase. We need another scan over the blocks, and let us denote the number of mono-blocks among the first j blocks with mj (that is, m = mb ). We stop after such j-th block that mj = (b − j) − (mb − mj ). This divides B into its left (the first j blocks) and right part (the remaining b − j blocks), in such a way that the number of mono-blocks in the left part is equal to the number of non-mono-blocks in the right part. The data layout is now like that. The blocks from the left part are located sequentially, each prepended with the 4-byte rank of the prefix of the sequence. The right part stores 8 bytes per block in a contiguous area: 4 bytes are for the rank and the other 4 bytes are for the offset. These offset values point to the mono-blocks from the left part. Assuming that the mono-blocks are uniformly distributed over the whole dataset, the expected number of cache misses (or non-contiguous memory accesses) per query is f × 1 + (1 − f )(1 − f ) × 1 + f (1 − f ) × 2 = 1 + f − f 2 ≤ 2 − f , where the equality holds only for f = 1. 3.2 Compressed select The proposed select variants are related to the rank ones. On a high level, our solutions make use of two integer parameters, ℓ and thr, and the sel1 (B, j) values for all j being a multiple of ℓ are stored directly. Moreover, we distinguish between sparse blocks, that is such for which sel1 (B, (i + 1)ℓ)− sel1 (B, iℓ) > thr, and dense blocks for which the shown condition is not fulfilled. If a block is sparse, the select values for all j inside it, i.e., such that iℓ < j < (i + 1)ℓ, are stored directly. For dense blocks we store the bits B[sel1 (B, iℓ)+1 . . . sel1 (B, (i+1)ℓ)−1], possibly in a compressed form. Again, block headers consist of precomputed select values and offsets to block data, and blocks are grouped into superblocks. The particular variants: basic, bch, mpe1, mpe2 and mpe3, mimic the corresponding rank variants, with some exceptions. The main difference is that the select values in superblocks are never compressed (as opposed to rank values in several rank variants). Additionally, select-bch differs to its rank counterpart in having its offsets encoded differentially (on 2 bytes) with respect to the first offset in the superblock. Such a representation for select is needed to handle varying-length blocks. Note also that the differential offset encoding enforces some restrictions on the ℓ and thr parameters. 4 Experimental results All experiments were run on a machine equipped with a 6-core Intel i7 CPU (4930K) clocked at 3.4 GHz, with 64 GB of RAM, running Ubuntu 15.10 64bit. The RAM modules were 8 × 8 GB DDR3-1600 with the timings 11-11-11 (Kingston KVR16R11D4K4/64). The CPU cache sizes were: 6 × 32 KB (data) and 6 × 32 KB (instructions) in the L1 level, 6 × 256 KB in L2 and 12 MB in L3. One CPU core was used for the computations. All codes were written in C++ and time (ns / query) basic bch cf mpe1 80 60 40 20 60 40 0 0.2 0.4 0.6 0.8 1.0 1.2 space (bits per input bit) english200-huff 140 time (ns / query) time (ns / query) 40 20 80 60 40 20 0.2 0 0.4 0.6 0.8 1.0 1.2 space (bits per input bit) proteins200-bal 100 0.2 0.4 0.6 0.8 1.0 1.2 space (bits per input bit) proteins200-huff 140 120 80 time (ns / query) time (ns / query) 80 100 60 100 60 40 20 80 60 40 20 0.2 0 0.4 0.6 0.8 1.0 1.2 space (bits per input bit) xml200-bal 100 0.2 0.4 0.6 0.8 1.0 1.2 space (bits per input bit) xml200-huff 140 120 time (ns / query) 80 100 60 40 20 0 100 120 80 0 120 0.4 0.6 0.8 1.0 1.2 space (bits per input bit) english200-bal 100 0 dna200-huff 140 20 0 0.2 time (ns / query) mpe2 mpe3 hyb rank-V time (ns / query) dna200-bal 100 80 60 40 20 0.2 0.4 0.6 0.8 1.0 1.2 space (bits per input bit) 0 0.2 0.4 0.6 0.8 1.0 1.2 space (bits per input bit) Fig. 1. Rank query times (in ns), averaged over 100M random queries, and used spaces for real data. The datasets on the left: concatenated balanced WTs, on the right: concatenated Huffman-shaped WTs. The hyb series parameters: 8, 16, 32 and 64. compiled with 64-bit gcc 5.2.1, with -O3 and -mpopcnt options. Our source codes are available at http://ranisz.iis.p.lodz.pl/indexes/ranks&selects/. The test datasets comprise concatenated bit-vectors from binary wavelet trees built over four 200 MB Pizza & Chili site2 texts, in two versions, with standard (balanced) and Huffman-shaped WT layout. Additionally, we used random bit-vectors with density of set bits equal to 0.05 or 0.2, respectively. For comparisons, we took a number of rank and select variants from the well-known sdsl library [3]. In particular, for the rank experiments we used: – hyb, the hybrid rank from [8], with the superblock sizes of 8, 16, 32 and 64, – rank-V, a variant from [13] (called rank9 therein), – our variants: basic, bch, mpe1, mpe2, mpe3 and cf, as described in Section 3.1. For the select experiments we took: – Clark’s algorithm [2] in an implementation proposed in [4], called sel-mcl, – sel-RRR [10], called sel-R3 K in [4], where K is the block size, – our variants: basic, bch, mpe1, mpe2 and mpe3, as described in Section 3.2. The block size in the rank variants basic, bch and cf was set to k = 64 and to k = 128 in the remaining ones. The number of blocks per superblock, h, was set to 32 for bch and to 16 for the other rank variants and to all select variants. From Fig. 1 we can see that our ranks mpe1, mpe2 and mpe3 offer similar (or slightly better) compression as hyb at a significantly higher speed. If even more speed is preferred, then bch or cf is the method of choice. Another Pareto-optimal variant is (in most cases) basic. Not surprisingly, the only non-compressed solution in the comparison, rank-V, is the fastest, yet the gap between it and the other top contenders is often more striking in space than in time. The implementation of cf is slightly more complicated (e.g., it has the extra, non-predictable, comparison at the start, to check if the parameter points to the left or to the right part of the bit-vector), and this is why it cannot beat basic in speed for the concatenated balanced WTs. Table 1 shows how the fraction of mono-blocks f affects the average number of memory accesses per query and the total query times in the rank variants basic and cf. The gap in the average number of memory accesses gets large for most Huffman-shaped WTs and there cf takes the lead in speed. The proposed select variants (Fig. 2) are about 3–4 times faster than selRRR63 (and even 6–7 times faster on both XML datasets), yet offering worse compression. The numbers in the names of our variants are the used parameters, e.g., variant-128-4K denotes ℓ = 128 and thr = 4096. Compared to the noncompressed select variant, sel-mcl, whose space requirement is about 1.13n in all the cases, our solutions are both more compact and faster in six cases out of eight and obtain mixed results in the remaining two cases. Finally, we run the rank and select algorithms on uniformly random bitvectors of size 200 MB, with the density of bits 1 set to 5% (random-5) or 20% (random-20), as presented in Fig. 3. Our rank results (the top row) in the 20% 2 http://pizzachili.dcc.uchile.cl/ dna200-bal 500 time (ns / query) time (ns / query) 400 300 300 200 200 100 0.2 0.4 0.6 0.8 1.0 space (bits per input bit) time (ns / query) time (ns / query) 200 100 0.2 0.4 0.6 0.8 1.0 space (bits per input bit) 1.2 0.4 0.6 0.8 1.0 space (bits per input bit) 1.2 0.4 0.6 0.8 1.0 space (bits per input bit) 1.2 300 200 100 0.2 proteins200-huff 600 time (ns / query) 400 time (ns / query) 0.4 0.6 0.8 1.0 space (bits per input bit) 500 0 1.2 proteins200-bal 500 500 400 300 200 100 0.2 0.4 0.6 0.8 1.0 space (bits per input bit) 300 200 100 0 1.2 xml200-bal 500 0.2 xml200-huff 600 time (ns / query) 400 time (ns / query) 1.2 400 300 500 400 300 200 100 0 0.4 0.6 0.8 1.0 space (bits per input bit) english200-huff 600 400 0 100 0 0.2 1.2 english200-bal 500 0 basic-128-4K basic-1K-8K bch-128-4K bch-1K-8K mpe1-128-4K mpe2-128-4K mpe3-128-4K sel-RRR63 sel-mcl 500 400 0 dna200-huff 600 0.2 0.4 0.6 0.8 1.0 space (bits per input bit) 1.2 300 200 100 0 0.2 Fig. 2. Select query times (in ns), averaged over 100M random queries, and used spaces for real data. The datasets on the left: concatenated balanced WTs, on the right: concatenated Huffman-shaped WTs. Table 1. The impact of the fraction of mono-blocks f on the average number of memory accesses per query and the total query times in the rank variants basic and cf. The block size is 64 bytes. The numbers of memory accesses are calculated from the formulas on f given in Section 3.1, in the paragraph on the cf variant. The times are expressed in nanoseconds. dataset fraction of mono-bl. [%] dna200-bal english200-bal proteins200-bal xml200-bal dna200-huff english200-huff proteins200-huff xml200-huff 73.60 52.95 45.66 78.50 9.03 23.74 3.84 68.35 basic, accesses cf, accesses basic, time cf, time 1.2640 1.4705 1.5434 1.2150 1.9097 1.7626 1.9616 1.3165 1.1943 1.2491 1.2481 1.1688 1.0822 1.1811 1.0370 1.2163 24.73 34.47 38.89 23.16 38.25 42.72 45.86 25.51 27.97 36.89 39.14 26.34 32.06 37.31 32.87 29.44 rank, random-5 time (ns / query) 800 700 600 500 400 300 200 100 0 select, random-5 basic-128-4K basic-1K-8K bch-128-4K bch-1K-8K mpe1-128-4K mpe2-128-4K mpe3-128-4K sel-RRR63 sel-mcl 0.5 1.0 1.5 2.0 space (bits per input bit) rank, random-20 time (ns / query) 160 140 120 100 80 60 40 20 0 800 700 600 500 400 300 200 100 0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 space (bits per input bit) select, random-20 time (ns / query) time (ns / query) 160 basic mpe2 140 bch mpe3 cf hyb 120 mpe1 rank-V 100 80 60 40 20 0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 space (bits per input bit) 0.5 1.0 1.5 2.0 space (bits per input bit) Fig. 3. Rank (top) and select (bottom) query times (in ns), averaged over 100M random queries, and used spaces for random data with density of set bit 0.05 or 0.2. The four points in a hyb series in the top figures correspond to parameters: 8, 16, 32 and 64. case are quite competitive (especially the variant cf), but they are less attractive when the set bit density is lower. The select query times (the bottom row) vary a lot for the low density case, with major differences in space as well, but our solutions are Pareto-optimal only if practically all the blocks are sparse, which is obviously not interesting. There is nothing to boast about the 20% case either. Overall, we can conclude that no single rank or select solution dominates over a large range of data characteristics. For random data with low density, the rank hyb [8] may be the winner. For bit-vectors with higher-order redundancies, the Beskers and Fischer [1] algorithms are the most competitive ones. Finally, for real data from FM-indexes (concatenated binary wavelet trees) the solutions proposed in this paper tend to win, sometimes by a large margin. 5 Conclusion Rank and select are major components of many compressed data structures. In spite of a great progress in their implementations in recent years, the “ultimate” variants have not yet been found, as this paper tries to demonstrate. Not claiming big originality of our techniques, we have to point out that a number of the proposed variants represent new Pareto frontiers for query time and data structure size for real data. One of our achievements is a (moderately) compressed select variant answering queries in about 100 ns. The key idea used in our algorithms is efficient handling of aligned runs of zeros and ones of specified size: either relatively large blocks (the technique used in all our variants) or 16-bit chunks (all the mpe variants). On the other hand, reducing the number of memory accesses, a leitmotif in rank/select research for many years, still has some potential, as demonstrated by the cf variant. Several aspects of our ideas require further research. The cf variant for the rank operation could be modified to handle compressed blocks. The proposed select solutions work for only one binary digit (e.g., 1) and the current data structures would have to be doubled to handle both digits. Yet, it may be possible to modify them for data reuse, without a large drop in performance. Finally, the rank variants have to be embedded in a full FM-index. According to our preliminary experiments, an FM-index with Huffman-shaped binary wavelet tree and the rank-mpe2 variant performs the count query in time shorter by about 7– 11% than the FM-hybrid with the superblock size 8. If the hybrid’s superblock is increased to 64 (when the FM-index with rank-mpe2 still wins in compression), the gap grows to 27–37%. Acknowledgement The work was supported by the Polish National Science Centre under the project DEC-2013/09/B/ST6/03117 (both authors). References 1. K. Beskers and J. Fischer. High-order entropy compressed bit vectors with rank/select. Algorithms, 7(4):608–620, 2014. 2. D. Clark. Compact Pat Trees. PhD thesis, University of Waterloo, Ontario, Canada, 1996. 3. S. Gog, T. Beller, A. Moffat, and M. Petri. From theory to practice: Plug and play with succinct data structures. In Proc. 13th International Symposium on Experimental Algorithms (SEA), LNCS 8504, pages 326–337. Springer, 2014. 4. S. Gog and M. Petri. Optimized succinct data structures for massive data. Software–Practice and Experience, 44(11):1287–1314, 2014. 5. R. González, S. Grabowski, V. Mäkinen, and G. Navarro. Practical implementation of rank and select queries. In Poster Proc. 4th International Workshop on Efficient and Experimental Algorithms (WEA), pages 27–38. CTI Press and Ellinika Grammata, 2005. 6. S. Grabowski, M. Raniszewski, and S. Deorowicz. FM-index for dummies. CoRR, abs/1506.04896, 2015. 7. G. Jacobson. Space-efficient static trees and graphs. In Proc. 30th Annual Symposium on Foundations of Computer Science (FOCS), pages 549–554. IEEE Computer Society, 1989. 8. J. Kärkkäinen, D. Kempa, and S. J. Puglisi. Hybrid compression of bitvectors for the FM-index. In Proc. Data Compression Conference (DCC), pages 302–311. IEEE, 2014. 9. J. I. Munro. Tables. In Proc. 16th Conference on Foundations of Software Technology and Theoretical Computer Science, LNCS 1180, pages 37–42. Springer, 1996. 10. G. Navarro and E. Providel. Fast, small, simple rank/select on bitmaps. In Proc. 11th International Symposium on Experimental Algorithms (SEA), LNCS 7276, pages 295–306. Springer, 2012. 11. D. Okanohara and K. Sadakane. Practical entropy-compressed rank/select dictionary. In Proc. 9th Workshop on Algorithm Engineering and Experiments (ALENEX). SIAM, 2007. 12. R. Raman, V. Raman, and S. S. Rao. Succinct indexable dictionaries with applications to encoding k-ary trees and multisets. In Proc. 13th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 233–242. ACM/SIAM, 2002. 13. S. Vigna. Broadword implementation of rank/select queries. In Proc. 7th International Workshop on Efficient and Experimental Algorithms (WEA), LNCS 5038, pages 154–168. Springer, 2008.
8cs.DS
REPRESENTATION RINGS FOR FUSION SYSTEMS AND DIMENSION FUNCTIONS arXiv:1603.08237v2 [math.AT] 13 Jun 2016 SUNE PRECHT REEH AND ERGÜN YALÇIN Abstract. We define the representation ring of a saturated fusion system F as the Grothendieck ring of the semiring of F-stable representations, and study the dimension functions of F-stable representations using the transfer map induced by the characteristic idempotent of F. We find a list of conditions for an F-stable super class function to be realized as the dimension function of an F-stable virtual representation. We also give an application of our results to constructions of finite group actions on homotopy spheres. 1. Introduction Let G be a finite group and K be a subfield of the complex numbers. The representation ring RK (G) is defined as the Grothendieck ring of the semiring of the isomorphism classes of finite dimensional G-representations over K. The addition is given by direct sum and the multiplication is given by tensor product over K. The elements of the representation ring can be taken as virtual representations U − V up to isomorphism. The dimension function associated to a G-representation V over K is a function DimV : Sub(G) → Z, from subgroups of G to integers, defined by (DimV )(H) = dimK V H for every H ≤ G. Extending the dimension function linearly, we obtain a group homomorphism Dim : RK (G) → C(G), where C(G) denotes the group of super class functions, i.e. functions f : Sub(G) → Z that are constant on conjugacy classes. When K = R, the real numbers, and G is nilpotent, the image of the Dim homomorphism is equal to the group of Borel-Smith functions Cb (G). This is the subgroup of C(G) formed by super class functions satisfying certain conditions known as Borel-Smith conditions (see Definition 4.6 and Theorem 4.8). If we restrict a G-representation to a Sylow p-subgroup S of G, we obtain an Srepresentation which respects fusion in G, i.e. character values for G-conjugate elements of S are equal. Similarly the restriction of a Borel-Smith function f ∈ Cb (G) to a Sylow pgroup S gives a Borel-Smith function f ∈ Cb (S) which is constant on G-conjugacy classes of subgroups of S. The question we would like to answer is the following: Question 1.1. Given a Borel-Smith function f ∈ Cb (S) that is constant on G-conjugacy classes of subgroups of S, under what conditions can we find a real S-representation V such that V respects fusion in G and DimV = f ? To study this problem we introduce representation rings for abstract fusion systems and study the dimension homomorphism for fusion systems. Let F be a (saturated) fusion system on a finite p-group S (see Section 2 for a definition). We define the representation The first author is supported by the Danish Council for Independent Research’s Sapere Aude program (DFF–4002-00224). The second author is partially supported by the Scientific and Technological Research Council of Turkey (TÜBİTAK) through the research program BİDEB-2219. 1 2 S. P. REEH AND E. YALÇIN ring RK (F) as the subring of RK (S) formed by virtual representations that are F-stable. A (virtual) S-representation V is said to be F-stable if for every morphism ϕ : P → S in the fusion system F, we have resSP V = resϕ V where resϕ V is the P -representation with the left P -action given by p · v = ϕ(p)v for every v ∈V. We prove that RK (F) is equal to the Grothendieck ring of the semiring of F-stable S-representations over K (Proposition 3.4). This allows us to define the dimension homomorphism Dim : RK (F) → C(F) as the restriction of the dimension homomorphism for S. Here C(F) denotes the group of super class functions f : Sub(S) → Z that are constant on F-conjugacy classes of subgroups of S. In a similar way, we define Cb (F) as the group of Borel-Smith functions which are constant on F-conjugacy classes of subgroups of S. Our first observation is that after localizing at p, the dimension homomorphism for fusion systems Dim : RR (F)(p) → Cb (F)(p) is surjective (see Proposition 4.9). This follows from a more general result on short exact sequences of biset functors (see Proposition 2.6). To obtain a surjectivity result for the dimension homomorphism in integer coefficients, we consider a result due to S. Bauer [2] for realization of Borel-Smith functions defined on subgroups of prime power order in a finite group G. In his paper Bauer introduces a new condition in addition to the Borel-Smith conditions. We introduce a similar condition for fusion systems (see Definition 5.3). The group of Borel-Smith functions for F which satisfy this extra condition is denoted by Cba (F). We prove the following theorem which is one of the main results of this paper. Theorem A. Let F be a saturated fusion system on a p-group S. Then Dim : RR (F) → Cba (F) is surjective. We prove this theorem in Section 5 as Theorem 5.5. If instead of virtual representations we wish to find an actual representation realizing a given F-stable super class function, we first observe that such a function must be monotone, meaning that for every K ≤ H ≤ S, we must have f (K) ≥ f (H) ≥ 0. It is an interesting question if every monotone super class function f ∈ Cba (F) is realized as the dimension function of an actual F-stable S-representation. We answer this question up to multiplication with a positive integer. Theorem B. Let F be a saturated fusion system on a p-group S. For every monotone Borel-Smith function f ∈ Cb (F), there exists an integer N ≥ 1 and an F-stable rational S-representation V such that DimV = N f . This theorem is proved as Theorem 6.1 in the paper. From the proof of this theorem we observe that it is possible to choose the integer N independent from the super class function f . We also note that it is enough that the function f only satisfies the condition (ii) of the Borel-Smith conditions given in Definition 4.6 for the conclusion of the theorem to hold. In the rest of the paper we give some applications of our results to constructing finite group actions on finite homotopy spheres. Note that if X is a finite-dimensional G-CWcomplex which is homotopy equivalent to a sphere, then by Smith theory, for each p-group REPRESENTATION RINGS FOR FUSION SYSTEMS AND DIMENSION FUNCTIONS 3 H ≤ G, the fixed point subspace X H has mod-p homology of a sphere S n(H) . We define the dimension function of X to be the super class function DimP X : P → Z such that (DimP X)(H) = n(H) + 1 for every p-subgroup H ≤ G, over all primes dividing the order of G. We prove the following theorem. Theorem C. Let G be a finite group, and let f : P → Z be a monotone Borel-Smith function. Then there is an integer N ≥ 1 and a finite G-CW-complex X ' S n , with prime power isotropy, such that DimP X = N f . This theorem is proved as Theorem 7.5 in the paper. Up to multiplying with an integer, Theorem C answers the question of when a monotone Borel-Smith function defined on subgroups of prime power order can be realized. We believe this is a useful result for constructing finite homotopy G-spheres with certain restrictions on isotropy subgroups (for example rank restrictions). We also prove a similar result (Theorem 7.8) on algebraic homotopy G-spheres providing a partial answer to a question of Grodal and Smith [9]. The paper is organized as follows: In Section 2 we introduce basic definitions of biset functors and fusion systems, and prove Proposition 2.6 which is one of the key results for the rest of the paper. In Section 3, we introduce representation rings and dimension homomorphisms for fusion systems. In Section 4, we define Borel-Smith functions and prove Proposition 4.9 which states that the dimension homomorphism is surjective in plocal coefficients. In Section 5, we consider a theorem of Bauer for finite groups and prove Theorem A using Bauer’s theorem and its proof. Theorem B is proved in Section 6 using some results on rational representation rings for finite groups. In the last section, Section 7, we give some applications of our results to constructions of finite group actions on homotopy spheres. Throughout the paper we assume all the fusion systems are saturated unless otherwise is stated clearly. Acknowledgement. We thank Matthew Gelvin, Jesper Grodal, and Bob Oliver for many helpful comments on the first version of the paper. Most of the work in this paper was carried out in May-June 2015 when the authors were visiting McMaster University. Both authors thank Ian Hambleton for hosting them at McMaster University. The second author would like to thank McMaster University for the support provided by a H. L. Hooker Visiting Fellowship. 2. Biset functors and fusion systems Let P and Q be finite groups. A (finite) (P, Q)-set is a finite set X equipped with a left action of P and a right action of Q, and such that the two actions commute. The isomorphism classes of (P, Q)-bisets form a monoid with disjoint union as addition, and we denote the group completion of this monoid by A(P, Q). The group A(P, Q) is the Burnside biset module for P and Q, and it consists of virtual (P, Q)-bisets X − Y where X, Y are actual (P, Q)-bisets (up to isomorphism). The biset module A(P, Q) is a free abelian group generated by the transitive (P, Q)bisets (P × Q)/D where the subgroup D ≤ P × Q is determined up to conjugation in P × Q. A special class of transitive (P, Q)-bisets are the ones where the right Q-action is free. These Q-free basis elements are determined by a subgroup R ≤ P and a group homomorphism ϕ : R → Q, and the corresponding transitive biset is denoted [R, ϕ]Q P := (P × Q)/(pr, q) ∼ (p, ϕ(r)q) for p ∈ P , q ∈ Q and r ∈ R. We write [R, ϕ] whenever the groups Q, P are clear from the context. 4 S. P. REEH AND E. YALÇIN The biset modules form a category A whose objects are finite groups, and the morphisms are given by HomA (P, Q) = A(P, Q) with the associative composition ◦ : A(Q, R)× A(P, Q) → A(P, R) defined by Y ◦ X := X ×Q Y ∈ A(P, R) for bisets X ∈ A(P, Q) and Y ∈ A(Q, R), and then extended bilinearly to all virtual bisets. Note that this category is the opposite category of the biset category for finite groups defined in [3, Definition 3.1.1]. Given any commutative ring R with identity, we also have an R-linear category RA with morphism sets MorRA (G, H) = R ⊗ A(G, H). Definition 2.1. Let C be a collection of finite groups closed under taking subgroups and quotients, and let R be a commutative ring with identity (R = Z unless specified otherwise). A biset functor on C and over R is an R-linear contravariant functor from RAC to R-mod. Here RAC is the full subcategory of the biset category RA restricted to groups in C, i.e. the set of morphisms between P, Q ∈ C is the Burnside biset module R ⊗ A(P, Q). In particular a biset functor has restrictions, inductions, isomorphisms, inflations and deflations between the groups in C. A global Mackey functor on C and over R is an R-linear contravariant functor from RAbifree to R-mod, where RAbifree has just the bifree (virtual) bisets for groups in C, C C bifree i.e. for the morphism sets R ⊗ A (P, Q) with P, Q ∈ C. A global Mackey functor has restrictions, inductions and isomorphisms between the groups in C. For Q ≤ P in C and a given biset functor/global Mackey functor M , we use the following notation for restriction and induction maps: [Q,incl]P Q resPQ : M (P ) −−−−−→ M (Q), [Q,id]Q P indPQ : M (Q) −−−−→ M (P ). Similarly for a homomorphism ϕ : R → P , we denote the restriction along ϕ by [R,ϕ]P R resϕ : M (P ) −−−−→ M (R). By a biset functor/global Mackey functor defined on a p-group S, we mean a biset functor/global Mackey functor on some collection C containing S. A fusion system is an algebraic structure that emulates the p-structure of a finite group: We take a finite p-group S to play the role of a Sylow p-subgroup and endow S with additional conjugation structure. To be precise a fusion system on S is a category F where the objects are the subgroups P ≤ S and the morphisms F(P, Q) satisfy two properties: • For all P, Q ≤ S we have HomS (P, Q) ⊆ F(P, Q) ⊆ Inj(P, Q), where Inj(P, Q) are the injective group homomorphisms and HomS (P, Q) are all homomorphisms P → Q induced by conjugation with elements of S. ϕ • Every morphism ϕ ∈ F(P, Q) can be factored as P − → ϕP ,→ Q in F, and the inverse homomorphism ϕ−1 : ϕP → P is also in F. We think of the morphisms in F as conjugation maps to the point that we say that subgroups of S or elements in S are F-conjugate whenever they are connected by an isomorphism in F. There are many examples of fusion systems: Whenever S is a p-subgroup in an ambient group G, we get a fusion system FS (G) by defining HomFS (G) (P, Q) := HomG (P, Q) as the set of all homomorphisms P → Q induced by conjugation with elements of G. To capture the “nice” fusion systems that emulate the case when S is Sylow in G, we need two additional axioms. These axioms require a couple of additional notions: We say that a subgroup P ≤ S is fully F-centralized if |CS (P )| ≥ |CS (P 0 )| whenever P and P 0 are REPRESENTATION RINGS FOR FUSION SYSTEMS AND DIMENSION FUNCTIONS 5 conjugate in F. Similarly, P ≤ S is fully F-normalized if |NS (P )| ≥ |NS (P 0 )| when P, P 0 are conjugate in F. We say that a fusion system F on a p-group S is saturated if it has the following properties: • If P ≤ S is fully F-normalized, then P is also fully F-centralized and AutS (P ) is a Sylow p-subgroup of AutF (P ). • If ϕ ∈ F(P, S) is such that the image ϕP is fully F-centralized, then ϕ extends to a map ϕ e ∈ F(Nϕ , S) where Nϕ := {x ∈ NS (P ) | ∃y ∈ NS (ϕP ) : ϕ ◦ cx = cy ◦ ϕ ∈ F(P, S)}. The main examples of saturated fusion systems are FS (G) whenever S is a Sylow psubgroup of G, however, other exotic saturated fusion systems exist. For a bisets functor or global Mackey functor M that is defined on S, we can evaluate M on any fusion system F over S according to the following definition: Definition 2.2. Let F be a fusion system on S, and let M be a biset functor/global Mackey functor defined on S. We define M (F) to be the set of F-stable elements in M (S): M (F) := {X ∈ M (S) | resϕ X = resP X for all P ≤ S and ϕ ∈ F(P, S)}. There is a close relationship between saturated fusion systems on S and certain bisets in the double Burnside ring A(S, S): Definition 2.3. A virtual (S, S)-biset X ∈ A(S, S) (or more generally in A(S, S)(p) or A(S, S)∧ p ) is said to be F-characteristic if • X is a linear combination of the transitive bisets on the form [P, ϕ]SS with P ≤ S and ϕ ∈ F(P, S). • X is F-stable for the left and the right actions of S. If we consider A(S, S) as a biset functor in both variables, the requirement is that X ∈ A(F, F), cf. Definition 2.2. • |X|/|S| is not divisible by p. There are a couple of particular F-characteristic elements ΩF and ωF that we shall make use of, and that are reasonably well behaved: ΩF is an actual biset, and ωF is idempotent. These particular elements have been studied in a series of papers [8, 14–16], and we gather their defining properties in the following proposition: Proposition 2.4 ([8, 14, 15]). A fusion system F on S has characteristic elements in A(S, S)∧ p only if F is saturated (see [15, Corollary 6.7]). Let F be a saturated fusion system on S. F has a unique minimal F-characteristic actual biset ΩF which is contained in all other F-characteristic actual bisets (see [8, Theorem A]). Inside A(S, S)(p) there is an idempotent ωF that is also F-characteristic. This Fcharacteristic idempotent is unique in A(S, S)(p) and even A(S, S)∧ p (see [14, Proposition 5.6], or [16, Theorem B] for a more explicit construction). It is possible to reconstruct the saturated fusion system F from any F-characteristic element, in particular from ΩF or ωF (see [15, Proposition 6.5]). Using the characteristic idempotent ωF it becomes rather straightforward to calculate the F-stable elements for any biset functor/global Mackey functor after p-localization. 6 S. P. REEH AND E. YALÇIN Proposition 2.5. Let F be a saturated fusion system on S, and let M be a biset functor/global Mackey functor defined on S. We then obtain M (F)(p) = ωF · M (S)(p) , ω F F F and writing trF −→ M (F), resF S : M (S) − S : M (F) ,→ M (S), we have trS ◦ resS = id. Proof. The inclusion ωF · M (S)(p) ≤ M (F)(p) follows immediately from the fact that ωF is F-stable: For each X ∈ M (S)(p) , P ≤ S and ϕ ∈ F(P, S), we get resϕ (ωF · X) = (ωF ◦ [P, ϕ]SP ) · X = (ωF ◦ [P, incl]SP ) · X = resP (ωF · X); hence ωF · X ∈ M (F)(p) . It remains to show that ωF · X = X for all X ∈ M (F)(p) . The following is essentially the proof by Kári Ragnarsson of a similar result [14, Corollary 6.4] for maps of spectra. We write ωF as a linear combination of (S, S)-biset orbits: X ωF = cQ,ψ [Q, ψ]SS . (Q,ψ)S,S Suppose then that X ∈ M (F)(p) , and we calculate ωF · X using the decomposition of ωF above:   X ωF · X =  cQ,ψ [Q, ψ]SS  · X (Q,ψ)S,S = X cQ,ψ indSQ resψ X (Q,ψ)S,S = X cQ,ψ indSQ resSQ X (Q,ψ)S,S  = X  X  (Q)S cQ,ψ  indSQ resSQ X (ψ)NS (Q),S P According to [14, Lemma 5.5] and [16, 4.7 and 5.10], the sum of coefficients (ψ)N (Q),S cQ,ψ S equals 1 for Q = S and 0 otherwise, hence we conclude   X X  ωF · X = cQ,ψ  indSQ resSQ X = indSS resSS X = X.  (Q)S (ψ)NS (Q),S Proposition 2.6. Let F be a saturated fusion system on S. If 0 → M 1 → M2 → M3 → 0 is a short-exact sequence of biset functors/global Mackey functors defined on S, then the induced sequence 0 → M1 (F)(p) → M2 (F)(p) → M3 (F)(p) → 0 is exact. Proof. Note that exactness of 0 → M1 → M2 → M3 → 0 implies that 0 → (M1 )(p) → (M2 )(p) → (M3 )(p) → 0 REPRESENTATION RINGS FOR FUSION SYSTEMS AND DIMENSION FUNCTIONS 7 is exact as well. Additionally we have a sequence of inclusions 0 M1 (F)(p) M2 (F)(p) M3 (F)(p) 0 0 M1 (S)(p) M2 (S)(p) M3 (S)(p) 0 We start with proving injectivity and suppose that X ∈ M1 (F)(p) maps to 0 in M2 (F)(p) . Considered as an element of M1 (S)(p) , then X also maps to 0 in M2 (S)(p) , hence by injectivity of M1 (S)(p) → M2 (S)(p) , X = 0. Next up is surjectivity, so we consider an arbitrary X ∈ M3 (F)(p) . By surjectivity of M2 (S)(p) → M3 (S)(p) we can find Y ∈ M2 (S)(p) that maps to X. Then ωF · Y ∈ M2 (F)(p) maps to ωF · X, and since X is F-stable, ωF · X equals X. Finally we consider the middle of the sequence and suppose that X ∈ M2 (F)(p) maps to 0 in M3 (F)(p) . Then there exists a Y ∈ M1 (S)(p) that maps to X. Similarly to above, ωF · Y ∈ M1 (F)(p) then maps to ωF · X = X ∈ M2 (F)(p) .  3. Representation rings Throughout this entire section we use K to denote a subfield of the complex numbers. In applications further on, K will be one of Q, R and C. + (S) consists Definition 3.1. Let S be a finite p-group. The representation semiring RK of the isomorphism classes of finite dimensional representations of S over K; addition is given by direct sum ⊕ and multiplication by tensor product ⊗K . + (S), and The representation ring RK (S) is the Grothendieck ring of the semiring RK + consists of virtual representations X = U − V ∈ RK (S) with U, V ∈ RK (S). + Additively RK (S) is a free abelian monoid, so it has the cancellation property and + (S) → RK (S) in injective. In particular for all representations U1 , U2 , V1 , V2 ∈ RK we have U1 − V1 = U2 − V2 in the representation ring if and only if U1 ⊕ V2 and U2 ⊕ V1 are isomorphic representations. + (S) RK Remark 3.2. The representation ring RK (−) has the structure of a biset functor over all finite groups. For a (G, H)-biset X and an H-representation V , the product K[X] ⊗K[H] V is a K-vector space on which G acts linearly, and we define X ∗ (V ) := K[X] ⊗K[H] V ∈ RK (G), which extends linearly to all virtual representations V ∈ RK (H) and virtual bisets X ∈ A(G, H). If K ≤ H is a subgroup, then H as a (K, H)-biset gives restriction resH K of represenH tations from H to K, while H as a (H, K)-biset gives induction indK of representations from K to H. Definition 3.3. Let F be a saturated fusion system on S. As described in Definition 2.2, we define the representation ring RK (F) as the ring of F-stable virtual S-representations, i.e. virtual representations V satisfying resϕ V ∼ = resP V for all P ≤ S and homomorphisms ϕ ∈ F(P, S). To see that RK (F) is a subring and closed under multiplication, note that resϕ respects tensor products ⊗K , so tensor products of F-stable representations are again F-stable. 8 S. P. REEH AND E. YALÇIN As the restriction of any actual representation is a representation again, the definition + + above makes sense in RK (S) as well, and we define the representation semiring RK (F) to consist of all the F-stable representations of S. Proposition 3.4. Let F be a saturation fusion system on S. The representation ring + RK (F) for F is the Grothendieck ring of the representation semiring RK (F). + + Proof. The inclusion of semirings RK (F) ,→ RK (S) induces a homomorphism between + the Grothendieck rings f : Gr(RK (F)) → RK (S). The image of this map is the sub+ + group hRK (F)i ≤ RK (S) generated by RK (F). Because RK (S) has cancellation, the map + + + + f : Gr(RK (F)) → hRK (F)i ≤ RK (S) is in fact injective, so hRK (F)i ∼ (F)). = Gr(RK Since all F-stable representations are in particular F-stable virtual representations, the + inclusion hRK (F)i ≤ RK (F) is immediate. It remains to show that RK (F) is contained in + hRK (F)i. Let X ∈ RK (F) be an arbitrary F-stable virtual representation, and suppose that X = U − V where U, V are actual S-representations that are not necessarily F-stable. Let ΩF be the minimal characteristic biset for F, and note that ΩF has an orbit of the type [S, id] (see [8, Theorem 5.3]), so ΩF − [S, id] is an actual biset. We can then write X as X = U − V = (U + (ΩF − [S, id])∗ V ) − (V + (ΩF − [S, id])∗ V ) = (U + (ΩF − [S, id])∗ V ) − (ΩF )∗ V. (3.1) The F-stability of the biset ΩF implies that (ΩF )∗ V is F-stable. Since X is also F-stable, the sum X + (ΩF )∗ V = U + (ΩF − [S, id])∗ V has to be F-stable as well. Hence (3.1) expresses X as a difference of F-stable represen+ tations, so X ∈ hRK (F)i as we wanted.  Using the biset functor structure of RK (−), we note the following special case of Proposition 2.5 for future reference: Proposition 3.5. Let F be a saturation fusion system on S. After p-localizing the representation rings, we have RK (F)(p) = ωF · RK (S)(p) , and ωF sends each F-stable virtual representation to itself. The character ring RK (S) over K embeds in the complex representation ring RC (S) by the map C[S]⊗K[S] − RK (S) −−−−−−−→ RC (S), which is injective according to [17, page 91]. If we identify RC (S) with the ring of complex characters, the map sends each virtual representation V ∈ RK (S) to its character χV : S → K ≤ C defined as χV (s) := Trace(ρV (s)) ∈ K. While the complex character for each K[S]-representation only takes values in K, it is not true that a complex representation with K-valued character has to come from a representation over K. Definition 3.6. We define RK (S) to be the subring of RC (S) consisting of complex characters that take all of their values in the subfield K ≤ C. Fact 3.7. The inclusion of rings RK (S) ≤ RK (S) is of finite index. A proof of this fact can be found in [17, Proposition 34]. REPRESENTATION RINGS FOR FUSION SYSTEMS AND DIMENSION FUNCTIONS 9 Definition 3.8. Let L := K(ζ) ≤ C be the extension of K by some (pn )th root of unity such that all irreducible complex characters for S take their values in L. If all elements of S have order at most pr , then taking ζ as a (pr )th root of unity will work. Given any irreducible character χ and automorphism σ ∈ Gal(L/K), we define σχ : S → L as (σχ)(s) := σ(χ(s)) for s ∈ S, which is another irreducible character of S. Taking the sum over all σ ∈ Gal(L/K) gives a character with values in the Galois fixed points, i.e. in K, so we define a transfer map tr : RC (S) → RK (S) by X σ χ. tr(χ) := σ∈Gal(L/K) Subsequently multiplying with index of RK (S) in RK (S) gives a transfer map RC (S) → RK (S). Characters of S-representations are in particular class functions on S, i.e. functions defined on the conjugacy classes of S. Definition 3.9. We denote the set of all complex valued class functions on S by c(S; C). Remark 3.10. The set of complex class functions c(−; C) is a biset functor over all finite groups (see [3, Lemma 7.1.3]). Suppose X is a (G, H)-biset and χ ∈ c(H; C) is a complex class function. The induced class function X ∗ (χ) is then given by X 1 χ(h) X ∗ (χ)(g) = |G| x∈X,h∈H s.t. gx=xh for g ∈ G. For complex characters χ ∈ RC (H) the formula above coincides with the biset structure on representation rings (see [3, Lemma 7.1.3]). Note that in the special case of restriction along a homomorphism ϕ : G → H, we just have resϕ (χ)(g) = χ(ϕ(g)) as we would expect. Lemma 3.11. Let F be a saturated fusion system on S, and let χ ∈ c(S; C) be any class function. Then χ is F-stable if and only if χ(s) = χ(t) for all s, t ∈ S that are conjugate in F (meaning that t = ϕ(s) for some ϕ ∈ F). Proof. For every homomorphism ϕ : P → S, we have resϕ (χ) = χ ◦ ϕ. F-stability of χ is therefore the question whether χ ◦ ϕ = χ|P for all P ≤ S and ϕ ∈ F(P, S), which on elements becomes χ(ϕ(s)) = χ(s) for all s ∈ P . We immediately conclude that χ is F-stable if and only if χ(ϕ(s)) = χ(s) for all s ∈ P , P ≤ S and ϕ ∈ F(P, S). By restricting each ϕ to the cyclic subgroup hsi ≤ P , it is enough to check that χ(ϕ(s)) = χ(s) for all s ∈ S and ϕ ∈ F(hsi, S), i.e. that χ is constant on F-conjugacy classes of elements in S.  Proposition 3.12. Let L be as in Definition 3.8, and let χ ∈ RC (F) be any F-stable complex character. For every Galois automorphism σ ∈ Gal(L/K) the character σχ is again F-stable, and the transfer map tr : RC (S) → RK (S) restricts to a map tr : RC (F) → RK (F). 10 S. P. REEH AND E. YALÇIN Proof. According to Definition 3.8 the character σχ is given by σχ(s) = σ(χ(s)) for s ∈ S. That χ is F-stable means, according to Lemma 3.11, that χ(ϕ(s)) = χ(s) for all s ∈ S and ϕ ∈ F(hsi, S). This clearly implies that σ χ(ϕ(s)) = σ(χ(ϕ(s))) = σ(χ(s)) = σχ(s) for all s ∈ S and ϕ ∈ F(hsi, S), so σχ is F-stable as well. Consequently, the transfer map applied to χ is X σ tr(χ) = χ σ∈Gal(L/K) which is a sum of F-stable characters and thus F-stable.  4. Borel-Smith functions for fusion systems Let G be a finite group. A super class function defined on G is a function f from the set of all subgroups of G to integers that is constant on G-conjugacy classes of subgroups. The set of super class functions for G, denoted by C(G), is a ring with the usual addition and multiplication of integer valued functions. As an abelian group, C(G) is a free abelian group with basis {εH | H ∈ Cl(G)}, where εH (K) = 1 if K is conjugate to H, and zero otherwise. Here Cl(G) denotes a set of representatives of conjugacy classes of subgroups of G. We often identify C(G) with the dual of the Burnside group A∗ (G) := Hom(A(G), Z), where a super class function f is identified with the group homomorphism A(G) → Z which takes G/H to f (H) for every H ≤ G. This identification also gives a biset functor structure on C(−) as the dual of the biset functor structure on the Burnside group functor A(−). Given an (K, H)-biset U , the induced homomorphism C(U ) : C(H) → C(K) is defined by setting (U · f )(X) = f (U op ×K X) for every f ∈ C(H) and K-set X. For example, if K ≤ H and U = H as a (K, H) biset with the usual left and right multiplication maps, then (U · f )(K/L) = f (H/L) for every L ≤ K. So, in this case U · f is the usual restriction of the super class function f from H to K, denoted by resH K f. Remark 4.1. The biset structure on super class functions described above is the correct structure to use when considering dimension functions of representations as super class functions. However super class functions also play a role as the codomain for the so-called homomorphism of marks Φ : A(G) → C(G) for the Burnside ring. Φ takes each finite G-set X to the super class function H 7→ |X H | counting fixed points. As a word of caution we note that, with the biset structure on C(−) given above, the mark homomorphism Φ is not a natural transformation of biset functors. There is another structure of C(−) as a biset functor, where Φ is a natural transformation, but that would be the wrong one for the purposes of this paper. Definition 4.2. Let F be a fusion system on a p-group S. A super class function defined on F is a function f from the set of subgroups of S to integers that is constant on Fconjugacy classes of subgroups. Let us denote the set of super class functions for the fusion system F by C 0 (F). As in the case of super class functions for groups, the set C 0 (F) is also a ring with addition and multiplication of integer valued functions. Note that since C(−) is a biset functor (with REPRESENTATION RINGS FOR FUSION SYSTEMS AND DIMENSION FUNCTIONS 11 the biset structure described above), we have an alternative definition for C(F) coming from Definition 2.2 as follows: C(F) := {f ∈ C(S) | resϕ f = resP f for all P ≤ S and ϕ ∈ F(P, S)}. Our first observation is that these two definitions coincide. Lemma 4.3. Let F be a fusion system on a p-group S. Then C 0 (F) = C(F) as subrings of C(S). Proof. Let f ∈ C 0 (F). Then for every ϕ ∈ F(P, S) and L ≤ P , we have (resϕ f )(P/L) = f (indϕ (P/L)) = f (S/ϕ(L)) = f (S/L) = (resP f )(P/L) where indϕ : A(P ) → A(S) is the homomorphism induced by the biset ([P, ϕ]SP )op = [ϕ(P ), ϕ−1 ]PS . This calculation shows that f ∈ C(F). The converse is also clear from the same calculation.  The main purpose of this paper is to understand the dimension functions for representations in the context of fusion systems. Now we introduce the dimension function of a representation. Let G be a finite group, and K be a subfield of complex numbers C. As before let RK (G) denote the ring of K-linear representations of G (see Definition 3.1). Recall that RK (G) is a free abelian group generated by isomorphism classes of irreducible representations of G and the elements of RK (G) are virtual representations V − W . The dimension function of a virtual representation X = V − W is defined as the super class function Dim(X) defined by Dim(X)(H) = dimK (V H ) − dimK (W H ) for every subgroup H ≤ G. This gives a group homomorphism Dim : RK (G) → C(G) which takes a virtual representation X = V − W in RK (G) to its dimension function Dim(X) ∈ C(G). Lemma 4.4. The dimension homomorphism Dim : RK (G) → C(G) is a natural transformation of biset functors. Proof. Note that for a K-linear G-representation V , we have dimK V H = dimC (C ⊗K V )H , so we can assume K = C. Consider the usual inner product in RC (G) defined by hV, W i = dimC HomC[G] (V, W ). Since G dimC V H = hresG H V, 1H i = hV, indH 1H i = hV, C[G/H]i, it is enough to show that for every (K, H)-biset U , the equality hC[U ] ⊗C[H] V, C[K/L]i = hV, C[U op ×K (K/L)]i holds for every H-representation V and subgroup L ≤ K. By Lemma [3, Lemma 2.3.26], every (K, H)-biset is a composition of 5 types of bisets. For the induction biset the above formula follows from Frobenius reciprocity, for the other bisets the formula holds for obvious reasons.  12 S. P. REEH AND E. YALÇIN If F is a fusion system on a p-group S, then recall (Proposition 3.4) that every element X ∈ RK (F) ⊆ RK (S) can be written as X = V − W for two K-linear representations that are both F-stable. This implies that for every X ∈ RK (F), we have Dim(X) ∈ C(F) since Dim(X)(P ) = Dim(X)(Q) for every F-conjugate subgroups P and Q in S. Hence we conclude the following: Lemma 4.5. Let F be a saturated fusion system on a p-group S. Then the dimension homomorphism Dim for S induces a dimension homomorphism Dim : RK (F) → C(F) for the fusion system F. For the rest of this section we assume K = R, the field of real numbers. The dimension function of a real representation of a finite group G satisfies certain relations called Artin relations. These relations come from the fact that for a real represention V , the dimension of the fixed point set V G is determined by the dimensions of the fixed point sets V C for cyclic subgroups C ≤ G (see [7, Theorem 0.1]). In particular, the homomorphism Dim is not surjective in general. It is easy to see that in general Dim is not injective either. For example, when G = Cp , the cyclic group of order p where p ≥ 5, all two dimensional irreducible real representations of G have the same dimension function (f (1) = 2 and f (Cp ) = 0). For a finite nilpotent group G, it is possible to explain the image of the homomorphism Dim : RR (G) → C(G) explicitly as the set of super class functions satisfying certain conditions. These conditions are called Borel-Smith conditions and the functions satisfying these conditions are called Borel-Smith functions (see [4, Def. 3.1] or [5, Def. 5.1]). Definition 4.6. Let G be finite group. A function f ∈ C(G) is called a Borel-Smith function if it satisfies the following conditions: (i) If L C H ≤ G, H/L ∼ = Z/p, and p is odd, then f (L) − f (H) is even. (ii) If L C H ≤ G, H/L ∼ = Z/p × Z/p, and Hi /L are all the subgroups of order p in H/L, then p X f (L) − f (H) = (f (Hi ) − f (H)). i=0 (iii) If L C H C N ≤ NG (L) and H/L ∼ = Z/2, then f (L) − f (H) is even if N/L ∼ = Z/4, and f (L) − f (H) is divisible by 4 if N/L is the quaternion group Q8 of order 8. These conditions were introduced as conditions satisfied by dimension functions of pgroup actions on mod-p homology spheres and they play an important role understanding p-group actions on homotopy spheres (see [6]). Remark 4.7. The condition (iii) is stated differently in [5, Def. 5.1] but as it was explained in [4, Remark 3.2] we can change this condition to hold only for Q8 because every generalized quaternion group includes a Q8 as a subgroup. The set of Borel-Smith functions is an additive subgroup of C(G) which we denote by Cb (G). For p-groups, the assignment P → Cb (P ) is a subfunctor of the biset functor C (see [3, Theorem 12.8.7] or [4, Proposition 3.7]). The biset functor Cb plays an interesting role in understanding the Dade group of a p-group (see [4, Theorem 1.2]). We now quote the following result for finite nilpotent groups. REPRESENTATION RINGS FOR FUSION SYSTEMS AND DIMENSION FUNCTIONS 13 Theorem 4.8 (Theorem 5.4 on page 211 of [5]). Let G be a finite nilpotent group, and let RR (G) denote the real representation ring of G. Then, the image of Dim : RR (G) → C(G) is equal to the group of Borel-Smith functions Cb (G). If F is a saturated fusion system on a p-group S, then we can define Borel-Smith functions for F as super class functions that are both F-stable and satisfy the BorelSmith conditions. Note that the group of Borel-Smith functions for F is equal to the group Cb (F) := {f ∈ Cb (S) | resϕ f = resP f for all P ≤ S and ϕ ∈ F(P, S)}. From this we obtain the following surjectivity result. Proposition 4.9. Let F be a saturated fusion system on a p-group S. Then the dimension function in Z(p) -coefficients Dim : RR (F)(p) → Cb (F)(p) is surjective. Proof. This follows from Proposition 2.6 since Dim : RR (P ) → Cb (P ) is surjective for all P ≤ S by Theorem 4.8.  In general the dimension homomorphism Dim : RR (F) → Cb (F) for fusion systems is not surjective. Example 4.10. Let G = Z/p o (Z/p)× denote the semidirect product where the unit group (Z/p)× acts on Z/p by multiplication. Let F denote the fusion system on S = Z/p induced by G. All F-stable real representations of S are linear combinations of the trivial representation 1 and the augmentation representation IS . This implies that all super class functions in the image of Dim must satisfy f (1)−f (S) ≡ 0 (mod p−1). But Cb (F) = Cb (S) is formed by super class functions which satisfy f (1) − f (S) ≡ 0 (mod 2). Hence the homomorphism Dim is not surjective. 5. Bauer’s surjectivity theorem To obtain a surjectivity theorem for dimension homomorphism in integer coefficients we need to add new conditions to the Borel-Smith conditions. S. Bauer [2, Theorem 1.3] proved that under an additional condition there is a surjectivity result similar to Theorem 4.8 for the dimension functions defined on prime power subgroups of any finite group. Bauer considers the following situation: Let G be a finite group and let P denote the family of all subgroups of G with prime power order. Let DP (G) denote the group of functions f : P → Z, constant on conjugacy classes, which satisfy the Borel-Smith conditions (i)-(iii) on Sylow subgroups and also satisfy the following additional condition: (iv) Let p and q be prime numbers, and let L C H C M ≤ NG (L) be subgroups of G such that H/L ∼ = Z/p and H a p-group. Then f (L) ≡ f (H) (mod q r−l ) if M/H ∼ = Z/q r acts on H/L with kernel of prime power order q l . The Borel-Smith conditions (i)-(iii) together with this last condition (iv) are all satisfied by the dimension function of an equivariant Z/|G|-homology sphere (see [2, Proposition 1.2]). Note that a topological space X is called a Z/|G|-homology sphere if its homology in Z/|G|-coefficients is isomorphic to the homology of a sphere with the same coefficients. 14 S. P. REEH AND E. YALÇIN Note that if X is an equivariant Z/|G|-homology sphere, then for every p-subgroup H of G, the fixed point set X H is a Z/p-homology sphere of dimension n(H). The function n : P → Z is constant on G-conjugacy classes of subgroups in P, and we define the dimension function of X to be the function DimP X : P → Z defined by (DimP X)(H) = n(H) + 1 for all H ∈ P. For a real representation V of G, let DimP V : P → Z denote the function defined by (DimP V )(H) = dimR V H on subgroups H ∈ P. Note that DimP V is equal to the dimension function of the unit sphere X = S(V ). Since X = S(V ) is a finite G-CWcomplex that is a homology sphere, the function satisfies all the conditions (i)-(iv) by [2, Proposition 1.2]. Hence we have DimP V ∈ DP (G). Bauer proves that the image of DimP is exactly equal to DP (G). Theorem 5.1 (Bauer [2, Theorem 1.3]). Let G be a finite group, and let DimP be the dimension homomorphism defined above. Then DimP : RR (G) → DP (G) is surjective. Remark 5.2. Note that Bauer’s theorem gives an answer for Question 1.1 for virtual representations. To see this, let S be a Sylow p-subgroup of a finite group G. Given a Borel-Smith function f ∈ Cb (S) which respects fusion in G, then we can define a function f 0 ∈ DP (G) by taking f 0 (Q) = f (1) for every subgroup of order q m with q 6= p. For p-subgroups P ≤ G, we take f 0 (P ) = f (P g ) where P g is a conjugate of P which lies in S. If f satisfies the additional condition (iv) for subgroups of S, then by Theorem 5.1 there is a virtual representation V of G such that DimP V = f 0 . The restriction of V to S gives the desired real S-representation which respects fusion in G. To obtain a similar theorem for fusion systems, we need to introduce a version of Bauer’s Artin condition for Borel-Smith functions of fusion systems. Definition 5.3. Let F be a fusion system on a p-group S. We say a Borel-Smith function f ∈ Cb (S) satisfies Bauer’s Artin relation if it satisfies the following condition: (∗∗) Let L C H ≤ S with H/L ∼ = Z/p, and let ϕ ∈ AutF (H) be an automorphism of H with ϕ(L) = L and such that the induced automorphism of H/L has order m. Then f (L) ≡ f (H) (mod m). The group of Borel-Smith functions for F which satisfy this extra condition is denoted by Cba (F). In the proof of Theorem 5.5 we only ever use Condition (∗∗) when H is cyclic, so we could require (∗∗) only for cyclic subgroups and still get the same collection Cba (F). We first observe that F-stable representations satisfy this additional condition. Lemma 5.4. Let V be an F-stable real S-representation. Then the dimension function DimV satisfies Bauer’s Artin condition (∗∗) given in Definition 5.3. Proof. Let V be an F-stable real S-representation and let L C H ≤ S and ϕ ∈ AutF (H) be as in (∗∗). If f = DimV , then f (L) − f (H) = hresSH V, IH/L i where IH/L = R[H/L] − R[H/H] is the augmentation module of the quotient group H/L, considered as an Hmodule via quotient map H → H/L. Here the inner product is the inner product of the complexifications of the given real representations. Since H/L ∼ = Z/p, there is a onedimensional character χ : H → C× with kernel L such that X IH/L = χi i∈(Z/p)× REPRESENTATION RINGS FOR FUSION SYSTEMS AND DIMENSION FUNCTIONS 15 where χi (h) = χ(h)i = χ(hi ) for all h ∈ H. Hence we can write X f (L) − f (H) = hresSH V, χi i. i∈(Z/p)× Since V is F-stable, we have ϕ∗ resSH V = resSH V which gives that hresSH V, χi i = hresSH V, (ϕ−1 )∗ χi i for every i ∈ (Z/p)× . Let J ≤ (Z/p)× denote the cyclic subgroup of order m generated by the image of ϕ in (Z/p)× = Aut(Z/p). For every j ∈ J and i ∈ (Z/p)× , we have hresSH V, χi i = hresSH V, χij i, hence f (L) − f (H) is divisible by m.  The main theorem of this section is the following result: Theorem 5.5. Let F be a saturated fusion system on a p-group S. Then Dim : RR (F) → Cba (F) is surjective. Proof. We will follow Bauer’s argument given in the proof of [2, Theorem 1.3]. First note that a Borel-Smith function is uniquely determined by its values on cyclic subgroups of S. This is because if P has a normal subgroup N ≤ G such that P/N is isomorphic to Z/p × Z/p, then by condition (ii) of the Borel-Smith conditions, the value of a BorelSmith function f at P is determined by its values on proper subgroups Q < P . When P is a noncyclic subgroup, the existence of a normal subgroup N ≤ P such that P/N is isomorphic to Z/p × Z/p follows from the Burnside basis theorem, [18, Theorem 1.16]. Let f ∈ Cba (F). We will show that there is a virtual representation x ∈ RR (F) such that Dim(x)(H) = f (H) for all cyclic subgroups H ≤ S. In this case we say f is realized over the family Hcyc of all cyclic subgroups in S. Note that f is realizable at the trivial subgroup 1 ≤ S since we can take f (1) many copies of the trivial representation, and then it will realize f at 1. Suppose that f is realized over some nonempty family H of cyclic subgroups of S. When we say a family of subgroups, we always mean that H is closed under conjugation and taking subgroups: if K ∈ H and L is conjugate to a subgroup of K, then L ∈ H. Let H0 be an adjacent family of H, a family obtained from H by adding the conjugacy class of a cyclic subgroup H ≤ S. We will show that f is realizable also over H0 . By induction this will give us the realizability of f over all cyclic subgroups. Since f is realizable over H, there is an element x ∈ RR (F) such that Dim(x)(J) = f (J) for every J ∈ H. By replacing f with f − Dim(x), we assume that f (J) = 0 for every J ∈ H. To prove that f is realizable over the larger family H0 , we will show that for every prime q, there is an integer nq coprime to q such that nq f is realizable over H0 by some virtual representation xq ∈ RR (F). This will be enough by the following argument: If q1 , . . . , qt are prime divisors of np , then np , nq1 , . . . , nqt have no common divisors, so we can find integers m0 , . . . , mt such that m0 np + m1 nq1 + · · · + mt nqt = 1. Using these integers, we obtain that x = m0 xp + m1 xq1 + · · · + mt xqt realizes f over the family H0 . If q = p, then by Proposition 4.9, there is an integer np , coprime to p, such that np f is realized by an element in xp ∈ RR (F). So, assume now that q is a fixed prime such that q 6= p. By [13, Theorem 1], there is a finite group Γ such that S ≤ Γ and the fusion system FS (Γ) induced by conjugations in Γ, is equal to the fusion system F. In particular, for every p-group P ≤ S, we have NΓ (P )/CΓ (P ) ∼ = AutF (P ). Let H be a cyclic subgroup in H0 \H, and let L ≤ H be the maximal proper subgroup of H. To show that there is an integer nq such that nq f is realizable over H0 , we can use 16 S. P. REEH AND E. YALÇIN the construction of a virtual representation xq given in [2], specifically the second case in Bauer’s proof of Theorem 1.3 that constructs the representation Vq , which we denote xq instead. Note that for this construction to work, we need to show Bauer’s condition that f (H) ≡ 0 (mod q r−l ) if there is a H C K ≤ Γ such that K/H ∼ = Z/q r is acting on H/L ∼ = Z/p with kernel of order q l . Suppose we have such a subgroup K. Then K/H induces a cyclic subgroup of Aut(H/L) ∼ = Aut(Z/p) of size q r−l , and we can choose an element k ∈ K that induces an automorphism of H/L of order q r−l . We have F = FS (Γ), so conjugation by k ∈ K gives an automorphism ck ∈ AutF (H) such that ck induces an automorphism of H/L of order q r−l . By Condition (∗∗) in Definition 5.3, we then have f (H) ≡ 0 (mod q r−l ) as wanted. Hence we can apply Bauer’s contruction of xq for primes q 6= p. This completes the proof.  Remark 5.6. Note that in the above proof we could not apply Bauer’s theorem directly to the group Γ that realizes the fusion system on S. This is because Γ often has a Sylow p-subgroup much bigger than S and it is not clear if a given Borel-Smith function defined on S can be extended to a Borel-Smith function defined on the Sylow p-subgroup of Γ. Example 5.7. Let F = FS (G) with G = A4 and S = C2 × C2 , then the group Γ constructed in [13] is isomorphic to the semidirect product (S × S × S) o Σ3 . The Sylow 2-subgroup of Γ is the group T = (S × S × S) o C2 and S is imbedded into T by the map s → (s, ϕ(s), ϕ2 (s)) where ϕ : S → S is the automorphism of S induced by G/S ∼ = C3 acting on S. Note that if we extend a Borel-Smith function f defined in Cb (S) to a function defined on subgroups of T by taking f (H) = 0 for all H which is not subconjugate to S, then such a super class function would not be a Borel-Smith function in general (for example, when f (S) 6= 0). 6. Realizing monotone Borel-Smith functions Let F be a saturated fusion system on a p-group S. A class function f ∈ C(F) is said to be monotone if for every K ≤ H ≤ S, we have f (K) ≥ f (H) ≥ 0. The main purpose of this section is to prove the following theorem. Theorem 6.1. For every monotone Borel-Smith function f ∈ Cb (F), there exists an integer N ≥ 1 and an F-stable rational S-representation V such that DimV = N f . For a p-group S, it is known that every monotone Borel-Smith function f ∈ Cb (S) is realizable as the dimension function of a real S-representation. This is proved by DotzelHamrick in [6] (see also [5, Theorem 5.13]). Hence Theorem 6.1 holds for a trivial fusion system without multiplying with a positive integer. Question 6.2. Is every a monotone function f ∈ Cba (F) realizable as the dimension function of an F-stable real S-representation? We leave this as an open problem. Note that we know from Theorem 5.5 that f can be realized by a virtual real representation, and Theorem 6.1 says that a multiple N f is realized by an actual representation. We have so far found that Question 6.2 has positive answer for all saturated fusion systems on Cp (p prime) and D8 , and for the fusion system induced by P GL3 (F3 ) on SD16 . Note also that Bauer’s theorem (Theorem 5.1) for general finite groups cannot be refined to realize a monotone function by an actual representation, as shown by the following example. REPRESENTATION RINGS FOR FUSION SYSTEMS AND DIMENSION FUNCTIONS 17 Example 6.3. Let G = S3 be the symmetric group on 3 elements. In this case P is the set of subgroups {1, C3 , C21 , C22 , C23 } where C3 is the subgroup generated by (123) and C2i is the subgroup generated by the transposition fixing i. Consider the class function f : P → Z with values f (1) = f (C2i ) = 2, f (C3 ) = 0 for all i. The function f satisfies all the Borel-Smith conditions and Bauer’s Artin condition (iv), hence f ∈ DP (G). By Bauer’s theorem f is realizable by a virtual representation. In fact, it is realized by the virtual representation 1G − σ + χ where 1G is the 1-dimensional trivial representation, σ is the 1-dimensional sign representation with kernel C3 , and χ is the unique 2-dimensional irreducible representation. The function f is a monotone function, but there is no actual real G-representation V such that DimV = f . This can be easily seen by calculating dimension functions of these irreducible real representations. In fact, for any N ≥ 1, the function N f is not realizable by an actual real G-representation. On the other hand, it is easy to see that the restrictions of f to Sylow p-subgroups of G for p = 2, 3 give monotone functions in Cba (F) and these functions are realized by F-stable real representations. So the function f does not give a counterexample to Question 6.2. To prove Theorem 6.1, we use the theorem by Dotzel-Hamrick [6] and some additional properties of rational representations. One of the key observations for rational representations that we use is the following. Lemma 6.4. Let G be a finite group and V and W be two rational representations of G. Then V ∼ = W if and only if for every cyclic subgroup C ≤ G, the equality dim V C = C dim W holds. Proof. See Corollary on page 104 in [17].  This implies, in particular, that the dimension function Dim : RQ (S) → Cb (S) is injective. Another important theorem on rational representations is the the Ritter-Segal theorem. We state here a version by Bouc (see [3, Section 9.2]). Note that if G/N is a quotient group of G, then a G/N -representation V can be considered a G-representation via the quotient map G → G/N . In this case this G-representation is called the inflation of V and it is denoted by inf G G/N V . Theorem 6.5 (Ritter-Segal). Let S be a finite p-group. If V is a non-trivial simple QSmodule, then there exist subgroups Q ≤ P of S, with |P : Q| = p, such that V ∼ = indSP inf PP/Q IP/Q where IP/Q is the augmentation ideal of the group algebra Q[P/Q]. For any field K, there is a linearization map LinK : A(G) → RK (G) from the Burnside ring A(G) to the representation ring of KG-modules, which is defined as the homomorphism that takes a G-set X to the permutation KG-module KX. It follows from the Ritter-Segal theorem that the linearization map LinQ : A(S) → RQ (S) is surjective when S is a p-group. Note this is not true in general for finite groups (see [1]). For fusion systems we have p-local versions of these theorems. Proposition 6.6. Let F be a fusion system on a p-group S. Then the dimension homomorphism Dim : RQ (F)(p) → Cb (F)(p) is injective, and the linearization map LinQ : A(F)(p) → RQ (F)(p) is surjective. 18 S. P. REEH AND E. YALÇIN Proof. This follows from Proposition 2.6 once we apply it to the injectivity and surjectivity results for p-groups stated above.  Now we are ready to prove Theorem 6.1. Proof of Theorem 6.1. Let f ∈ Cb (F) be a monotone Borel-Smith function. By DotzelHamrick theorem, there is a real S-representation V such that DimV = f . Let χ denote the character for V and L = Q(χ) denote the field of character values of χ. The transfer X σ tr(χ) = χ σ∈Gal(L/Q) gives a rational valued character. Hence there is an integer m such that m tr(χ) is the character of a rational S-representation W . Note that DimW = N f in Cb (F), where N = m deg(L : Q). Let ϕ : Q → S be a morphism in F. Note that since f is F-stable, we have Dim resϕ W = N resϕ f = N resQ f = Dim resQ W. The dimension function Dim is injective for rational representations by Lemma 6.4, we obtain that resϕ W = resQ W for every morphism ϕ : Q → S. Therefore W is an F-stable rational representation. This completes the proof.  Remark 6.7. In Theorem 6.1, the integer N ≥ 1 can be chosen independent from f . Note in the proof that the number m only depends on S (by Fact 3.7), and L is contained in the extension L0 of Q by roots of unity for the maximal element order in S, so if we take N = m deg(L0 : Q), the conclusion of the theorem will hold for every f ∈ Cb (F) using this particular N . Note also that Theorem 6.1 will still hold if f is an F-stable super class function which satisfies only the condition (ii) of the Borel-Smith conditions since the other conditions will be automatically satisfied by a multiple of f . This formulation is more useful for the applications for constructing group actions. 7. Applications to constructions of group actions In this section we discuss some applications of Theorem 6.1 to some problems related to finite group actions on homotopy spheres. If a finite group G acts freely on a sphere S n , for some n ≥ 1, then by P.A. Smith theory G can not include Z/p × Z/p as a subgroup for any prime p. The p-rank rkp (G) of a finite group G is defined to be the largest integer s such that (Z/p)s ≤ G. The rank of G, denoted by rk(G), is the maximum of the p-ranks rkp (G) over all primes p dividing the order of G. It is known, by a theorem of Swan [19], that a finite group G acts freely and cellularly on a finite CW-complex X homotopy equivalent to a sphere if and only if rk(G) ≤ 1. Recently Ian Hambleton and the second author were able to prove a similar theorem for rank two finite group actions on finite complexes homotopy equivalent to spheres (see [11, Theorem A]). For rank two groups the classification involves the group Qd(p) which is defined as the semidirect product Qd(p) = (Z/p × Z/p) o SL2 (p) with the obvious action of SL2 (p) on Z/p × Z/p. We say Qd(p) is p0 -involved in G if there exists a subgroup K ≤ G, of order prime to p, such that NG (K)/K contains a subgroup isomorphic to Qd(p). A finite group G is Qd(p)-free if it does not p0 -involve Qd(p) for any odd prime p. REPRESENTATION RINGS FOR FUSION SYSTEMS AND DIMENSION FUNCTIONS 19 Theorem 7.1 (Hambleton-Yalçın). Let G be a finite group of rank two. If G admits a finite G-CW-complex X ' S n with rank one isotropy then G is Qd(p)-free. Conversely, if G is Qd(p)-free, then there exists a finite G-CW-complex X ' S n with rank one prime power isotropy. The proof of Theorem 7.1 uses a more technical gluing theorem (see Theorem 7.3 below). In this theorem the input is a collection of G-invariant family of Sylow representations. Let G be a finite group. For every prime p dividing the order of G, let Gp be a fixed Sylow p-subgroup of G. A G-invariant family of representations is defined as follows. Definition 7.2. Let {Vp } be a family of (complex) representations defined on Sylow psubgroups Gp , over all primes p. We say the family {Vp } is G-invariant if (i) Vp respects fusion in G, i.e., the character χp of Vp satisfies χp (gxg −1 ) = χp (x) whenever gxg −1 ∈ Gp for some g ∈ G and x ∈ Gp ; and (ii) for all p, dim Vp is equal to a fixed positive integer n. Note that if {Vp } is a G-invariant family of representations of G, then for each p, the representation Vp is an F-stable representation for the fusion system F = FGp (G) induced by G. The theorem [11, Theorem B] which allows us to glue such a family together is the following. Theorem 7.3 (Hambleton-Yalçın). Let G be a finite group. Suppose that {Vp : Gp → U (n)} is a G-invariant family of Sylow representations. Then there exists a positive integer k ≥ 1 and a finite G-CW-complex X ' S 2kn−1 with prime power isotropy, such that the ⊕k Gp -CW-complex resG Gp X is p-locally Gp -equivalent to S(Vp ), for every prime p | |G|, The exact definition of p-local Gp -equivalence can be found in [11, Definition 3.6]. It ⊕k says in particular that as Gp -spaces, the fixed point subspaces of resG Gp X and S(Vp ) have isomorphic p-local homology. From this we can conclude that for every p-subgroup H ≤ G, ˙ H −1. the fixed point set X H has mod-p homology of a sphere S n(H) , where n(H) = 2k dimV p Theorem 7.1 is proved by combining Theorem 7.3 with a theorem of Jackson [12, Theorem 47] which states that if G is a rank two finite group which is Qd(p)-free, then it has a G-invariant family of Sylow representations {Vp } such that for every elementary abelian p-subgroup E with rkE = 2, we have VpE = 0. The last condition is necessary to obtain an action on X with the property that all isotropy subgroups are rank one subgroups. Note that all isotropy subgroups having rank ≤ 1 is equivalent to saying that X E = ∅ for every elementary abelian p-subgroups E ≤ G with rkE = 2. We can rephrase this condition in terms of the dimension function of a homotopy G-sphere, which we describe now. Let G be finite group and P denote the collection of all subgroups of prime power order in G. Definition 7.4. Let X be a finite (or finite dimensional) G-CW-complex such that X is homotopy equivalent to a sphere. By Smith theory, for each p-group H ≤ G, the fixed point subspace X H has mod-p homology of a sphere S n(H) . We define DimP X : P → Z as the super class function with values (DimP X)(H) = n(H) + 1 for every p-subgroup H ≤ G, over all primes dividing the order of G. Using the results of this paper we can now prove the following theorem. Theorem 7.5. Let G be a finite group, and let f : P → Z be a monotone Borel-Smith function. Then there is an integer N ≥ 1 and a finite G-CW-complex X ' S n , with prime power isotropy, such that DimP X = N f . 20 S. P. REEH AND E. YALÇIN Proof. For each prime p dividing the order of G, let Fp = FGp (G) denote the fusion system induced by G on the fixed Sylow p-subgroup Gp . By Theorem 6.1 there is an integer Np and an Fp -stable rational Gp -representation Vp such that DimVp = Np f . Taking N 0 as the least common multiple of Np ’s, over all primes dividing the order of G, we see that N 0 f is realized by a G-invariant family of Sylow representations {Wp } where Wp is equal to the complexification of (N 0 /Np )-copies of Vp . By Theorem 7.3, there is an integer k ≥ 1 and a finite G-CW-complex X, with prime power isotropy, such that DimP X = 2kN 0 f . This completes the proof.  Example 7.6. While the monotone Borel-Smith function f for Σ3 in Example 6.3 has no multiple that is realized by a real Σ3 -representation, Theorem 7.5 states that a multiple of f is still realized by a homotopy Σ3 -sphere – just not coming from a representation. Theorem 7.5 reduces the question of finding actions on homotopy spheres with restrictions on the rank of isotropy subgroups, to finding Borel-Smith functions that satisfy certain conditions. For example, using this theorem one can prove Theorem 7.1 directly now by showing that for every rank two finite group G that is Qd(p)-free, there is a monotone Borel-Smith function f : P → Z such that f (H) = 0 for every H ≤ G with rkH = 2. Showing the existence of such a Borel-Smith function still involves quite a bit group theory, and the proof we could find runs through a lot of the same subcases as Jackson in [12, Theorem 47], but with Borel-Smith functions instead of characters. Theorem 7.5 is also related to a question of Grodal and Smith on algebraic models for homotopy G-spheres. In [9, after Thm 2], it was asked if a given Borel-Smith function, defined on p-subgroups of a finite group G, can be realized as the dimension function of an algebraic homotopy G-sphere. We describe the necessary terminology to state this problem. Let G be a finite group and Hp denote the family of all p-subgroups in G. The orbit category ΓG := Orp (G) is defined to be the category with objects P ∈ Hp , whose morphisms HomΓG (P, Q) are given by G-maps G/P → G/Q. For a commutative ring R, we define an RΓG -module as a contravariant functor M from ΓG to the category of R-modules. A chain complex C∗ of RΓG -modules is called perfect if it is finite dimensional with Ci a finitely generated projective RΓG -module for each i. A chain complex of RΓG -modules is said to be an R-homology n-sphere if for each H ∈ Hp , the complex C∗ (H) is an Rhomology sphere of dimension n(H). The dimension function of an R-homology n-sphere C∗ over RΓG is defined as a function DimC∗ : Hp → Z such that (DimC∗ )(H) = n(H) + 1 for all H ∈ Hp . It was mentioned in [9], and shown in [10] that if C∗ is a perfect complex which is an Fp -homology n-sphere, then the dimension function DimC∗ satisfies the Borel-Smith conditions (see [10, Theorem C]). Grodal and Smith [9, after Thm 2] suggests that the converse also holds. Question 7.7 (Grodal-Smith). Let G be a finite group, and let f be a monotone BorelSmith function defined on p-subgroups of G. Is there then a perfect Fp ΓG -complex C∗ which is an Fp -homology n-sphere with dimension function DimC∗ = f ? The motivation of Grodal-Smith for studying Fp -homology n-spheres is that they are good algebraic models for Fp -complete homotopy G-spheres. The main claim of [9] is that there is a one-to-one correspondence between Fp -complete homotopy G-spheres and Fp -homology spheres, with obvious low dimensional restrictions, and that Fp -homology spheres are determined by their dimension functions with an additional orientation [9, REPRESENTATION RINGS FOR FUSION SYSTEMS AND DIMENSION FUNCTIONS 21 Thms 2 and 3]. Based on [9] Question 7.7 will then play a big part of determining all possible Fp -complete G-spheres. We now show that Theorem 7.5 can be used to give a partial answer to this question. Given a G-CW-complex X, associated to it there is chain complex of RΓG -modules C∗ defined by taking C∗ (H) = C∗ (X H ; R) for every H ∈ Hp with associated induced maps. If R = Fp and if X has only prime power isotropy then this chain complex is a chain complex of projective RΓG -modules. This follows from the fact that for a q-subgroup Q, with q 6= p, the permutation group Fp [G/Q] is a projective Fp G-module. In addition if X is a finite complex, then C∗ is a perfect Fp ΓG -complex. So we can use Theorem 7.5 to prove the following. Theorem 7.8. Let G be a finite group, and f be a Borel-Smith function defined on psubgroups of G. Then there exists an integer N ≥ 1 and a perfect Fp ΓG -complex C∗ which is an Fp -homology n-sphere with dimension function DimC∗ = N f . Proof. Let f 0 be a Borel-Smith function defined on subgroups of G with prime power order such that f 0 (H) = f (H) for every p-subgroup H ≤ G. Such a function can be found by taking f 0 (K) = f (1) for all q-subgroups K with q 6= p. Then by Theorem 7.5, there is an N ≥ 1 such that N f is realizable as the dimension function of a finite G-CW-complex X ' S n , with prime power isotropy. The chain complex C∗ = C∗ (X (−) ; R) is a perfect Fp ΓG -complex which is an R-homology n-sphere and we have DimC∗ = N f .  References [1] A. Bartel and T. Dokchitser, Rational representations and permutation representations of finite groups, Math. Ann. 364 (2016), no. 1-2, 539–558. MR3451397 [2] S. Bauer, A linearity theorem for group actions on spheres with applications to homotopy representations, Comment. Math. Helv. 64 (1989), no. 1, 167–172. MR982565 (90e:57067) [3] S. Bouc, Biset functors for finite groups, Lecture Notes in Mathematics, vol. 1990, Springer-Verlag, Berlin, 2010. MR2598185 (2011d:20098) [4] S. Bouc and E. Yalçın, Borel-Smith functions and the Dade group, J. Algebra 311 (2007), no. 2, 821–839. MR2314737 [5] T. tom Dieck, Transformation groups, de Gruyter Studies in Mathematics, vol. 8, Walter de Gruyter & Co., Berlin, 1987. MR889050 (89c:57048) [6] R. M. Dotzel and G. C. Hamrick, p-group actions on homology spheres, Invent. Math. 62 (1981), no. 3, 437–442. MR604837 (82j:57037) [7] K. H. Dovermann and T. Petrie, Artin relation for smooth representations, Proc. Nat. Acad. Sci. U.S.A. 77 (1980), no. 10, 5620–5621. MR589277 [8] M. Gelvin and S. P. Reeh, Minimal characteristic bisets for fusion systems, J. Algebra 427 (2015), 345–374. MR3312309 [9] J. Grodal and J. H. Smith, Algebraic models for finite G-spaces, Oberwolfach report (2006). [10] I. Hambleton and E. Yalçın, Homotopy representations over the orbit category, Homology Homotopy Appl. 16 (2014), no. 2, 345–369. MR3280988 , Group actions on spheres with rank one prime power isotropy, 16 pp., preprint, available at [11] arXiv:1503.06298. [12] M. A. Jackson, Qd(p)-free rank two finite groups act freely on a homotopy product of two spheres, J. Pure Appl. Algebra 208 (2007), no. 3, 821–831. MR2283428 [13] S. Park, Realizing a fusion system by a single finite group, Arch. Math. (Basel) 94 (2010), no. 5, 405–410. MR2643975 [14] K. Ragnarsson, Classifying spectra of saturated fusion systems, Algebr. Geom. Topol. 6 (2006), 195– 252. MR2199459 (2007f:55013) [15] K. Ragnarsson and R. Stancu, Saturated fusion systems as idempotents in the double Burnside ring, Geom. Topol. 17 (2013), no. 2, 839–904. MR3070516 [16] S. P. Reeh, Transfer and characteristic idempotents for saturated fusion systems, Adv. Math. 289 (2016), 161–211. MR3439684 22 S. P. REEH AND E. YALÇIN [17] J.-P. Serre, Linear representations of finite groups, Springer-Verlag, New York-Heidelberg, 1977. Translated from the second French edition by Leonard L. Scott; Graduate Texts in Mathematics, Vol. 42. MR0450380 (56 #8675) [18] M. Suzuki, Group theory. I, Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences], vol. 247, Springer-Verlag, Berlin-New York, 1982. Translated from the Japanese by the author. MR648772 [19] R. G. Swan, Periodic resolutions for finite groups, Ann. of Math. (2) 72 (1960), 267–291. MR0124895 Department of Mathematics, Massachusetts Institute of Technology, Cambridge, MA, USA E-mail address: [email protected] Department of Mathematics, Bilkent University, 06800 Bilkent, Ankara, Turkey E-mail address: [email protected]
4math.GR
arXiv:1604.07133v1 [math.GR] 25 Apr 2016 Spectrum of commuting graphs of some classes of finite groups Jutirekha Dutta and Rajat Kanti Nath∗ Department of Mathematical Sciences, Tezpur University, Napaam-784028, Sonitpur, Assam, India. Emails: [email protected], [email protected] Abstract: In this paper, we initiate the study of spectrum of the commuting graphs of finite non-abelian groups. We first compute the spectrum of this graph for several classes of finite groups, in particular AC-groups. We show that the commuting graphs of finite non-abelian AC-groups are integral. We also show that the commuting graph of a finite non-abelian group G is integral if G is not isomorphic to the symmetric group of degree 4 and the commuting graph of G is planar. Further it is shown that the commuting graph of G is integral if the commuting graph of G is toroidal. Key words: commuting graph, spectrum, integral graph, finite group. 2010 Mathematics Subject Classification: 20D99; 05C50, 15A18, 05C25. 1 Introduction Let G be a finite group with centre Z(G). The commuting graph of a non-abelian group G, denoted by ΓG , is a simple undirected graph whose vertex set is G\Z(G), and two vertices x and y are adjacent if and only if xy = yx. Various aspects of commuting graphs of different finite groups can be found in [3, 6, 10, 11, 12, 13]. In this paper, we initiate the study of spectrum of commuting graphs of finite nonabelian groups. Recall that the spectrum of a graph G denoted by Spec(G) is the set {λk11 , λk22 , . . . , λknn }, where λ1 , λ2 , . . . , λn are the eigenvalues of the adjacency matrix of G with multiplicities k1 , k2 , . . . , kn respectively. A graph G is called integral if Spec(G) contains only integers. It is well known that the complete graph ∗ Corresponding author 1 Kn on n vertices is integral. Moreover, if G is the disjoint union of some complete graphs then also it is integral. The notion of integral graph was introduced by Harary and Schwenk [9] in the year 1974. A very impressive survey on integral graphs can be found in [5]. We observe that the commuting graph of a non abelian finite AC-group is disjoint union of some complete graphs. Therefore, commuting graphs of such groups are integral. In general it is difficult to classify all finite non-abelian groups whose commuting graphs are integral. As applications of our results together with some other known results, in Section 3, we show that the commuting graph of a finite non-abelian group G is integral if G is not isomorphic to S4 , the symmetric group of degree 4, and the commuting graph of G is planar. We also show that the commuting graph of a finite non-abelian group G is integral if the commuting graph of G is toroidal. Recall that the genus of a graph is the smallest nonnegative integer n such that the graph can be embedded on the surface obtained by attaching n handles to a sphere. A graph is said to be planar or toroidal if the genus of the graph is zero or one respectively. It is worth mentioning that Afkhami et al. [2] and Das et al. [7] have classified all finite non-abelian groups whose commuting graphs are planar or toroidal recently. 2 Computing spectrum It is well known that the complete graph Kn on n vertices is integral and Spec(Kn ) is given by {(−1)n−1 , (n − 1)1 }. Further, if G = Km1 ⊔ Km2 ⊔ · · · ⊔ Kml , where Kmi are complete graphs on mi vertices for 1 ≤ i ≤ l, then Spec(G) = {(−1) l P i=1 mi −l , (m1 − 1)1 , (m2 − 1)1 , . . . , (ml − 1)1 }. (2.1) If m1 = m2 = · · · = ml = m then we write G = lKm and in that case Spec(G) = {(−1)l(m−1) , (m − 1)l }. In this section, we compute the spectrum of the commuting graphs of different families of finite non-abelian AC-groups. A group G is called an AC-group if CG (x) is abelian for all x ∈ G \ Z(G). Various aspects of AC-groups can be found in [1, 7, 14]. The following lemma plays an important role in computing spectrum of commuting graphs of AC-groups. Lemma 2.1. Let G be a finite non-abelian AC-group. Then the commuting graph of G is given by n ΓG = ⊔ K|Xi |−|Z(G)| i=1 where X1 , . . . , Xn are the distinct centralizers of non-central elements of G. 2 Proof. Let G be a finite non-abelian AC-group and X1 , . . . , Xn be the distinct centralizers of non-central elements of G. Let Xi = CG (xi ) where xi ∈ G \ Z(G) and 1 ≤ i ≤ n. Let x, y ∈ Xi \ Z(G) for some i and x 6= y then, since G an AC-group, there is an edge between x and y in the commuting graph of G. Suppose that x ∈ (Xi ∩ Xj ) \ Z(G) for some 1 ≤ i 6= j ≤ n. Then [x, xi ] = 1 and [x, xj ] = 1. Hence, by Lemma 3.6 of [1] we have CG (x) = CG (xi ) = CG (xj ), a contradiction. Therefore, Xi ∩ Xj = Z(G) for any 1 ≤ i 6= j ≤ n. This shows that n ΓG = ⊔ K|Xi |−|Z(G)| . i=1 Theorem 2.2. Let G be a finite non-abelian AC-group. Then the spectrum of the commuting graph of G is given by n P {(−1)i=1 |Xi |−n(|Z(G)|+1) , (|X1 | − |Z(G)| − 1)1 , . . . , (|Xn | − |Z(G)| − 1)1 } where X1 , . . . , Xn are the distinct centralizers of non-central elements of G. Proof. The proof follows from Lemma 2.1 and (2.1). Corollary 2.3. Let G be a finite non-abelian AC-group and A be any finite abelian group. Then the spectrum of the commuting graph of G × A is given by n P {(−1)i=1 |A|(|Xi |−n|Z(G)|)−n , (|A|(|X1 | − |Z(G)|)−1))1 , . . . , (|A|(|Xn | − |Z(G)|) − 1))1 } where X1 , . . . , Xn are the distinct centralizers of non-central elements of G. Proof. It is easy to see that Z(G × A) = Z(G) × A and X1 × A, X2 × A, . . . , Xn × A are the distinct centralizers of non-central elements of G × A. Therefore, if G is an AC-group then G×A is also an AC-group. Hence, the result follows from Theorem 2.2. Now we compute the spectrum of the commuting graphs of some particular families of AC-groups. We begin with the well-known family of quasidihedral groups. Proposition 2.4. The spectrum of the commuting graph of the quasidihedral group n−2 n−1 = b2 = 1, bab−1 = a2 −1 i, where n ≥ 4, is given by QD2n = ha, b : a2 n −2n−2 −3 Spec(ΓQD2n ) = {(−1)2 3 n−2 , 12 , (2n−1 − 3)1 }. n−2 Proof. It is well-known that Z(QD2n ) = {1, a2 }. Also CQD2n (a) = CQD2n (ai ) = hai for 1 ≤ i ≤ 2n−1 − 1, i 6= 2n−2 and n−2 CQD2n (aj b) = {1, a2 n−2 , ai b, ai+2 b} for 1 ≤ j ≤ 2n−2 are the only centralizers of non-central elements of QD2n . Note that these centralizers are abelian subgroups of QD2n . Therefore, by Lemma 2.1 ΓQD2n = K|CQD 2n−2 (a)\Z(QD2n )| 2n ⊔ ( ⊔ K|CQD j=1 (aj b)\Z(QD2n )| 2n ). That is, ΓQD2n = K2n−1 −2 ⊔ 2n−2 K2 , since |CQD2n (a)| = 2n−1 , |CQD2n (aj b)| = 4 for 1 ≤ j ≤ 2n−2 and |Z(QD2n )| = 2. Hence, the result follows from (2.1). Proposition 2.5. The spectrum of the commuting graph of the projective special linear group P SL(2, 2k ), where k ≥ 2, is given by 3k −22k −2k+1 −2 {(−1)2 k−1 (2k −1) , (2k − 1)2 k +1 , (2k − 2)2 k−1 (2k +1) , (2k − 3)2 }. Proof. We know that P SL(2, 2k ) is a non-abelian group of order 2k (22k − 1) with trivial center. By Proposition 3.21 of [1], the set of centralizers of non-trivial elements of P SL(2, 2k ) is given by {xP x−1 , xAx−1 , xBx−1 : x ∈ P SL(2, 2k )} where P is an elementary abelian 2-subgroup and A, B are cyclic subgroups of P SL(2, 2k ) having order 2k , 2k − 1 and 2k + 1 respectively. Also the number of conjugates of P, A and B in P SL(2, 2k ) are 2k + 1, 2k−1 (2k + 1) and 2k−1 (2k − 1) respectively. Note that P SL(2, 2k ) is a AC-group and so, by Lemma 2.1, the commuting graph of P SL(2, 2k ) is given by (2k + 1)K|xP x−1 |−1 ⊔ 2k−1 (2k + 1)K|xAx−1 |−1 ⊔ 2k−1 (2k − 1)K|xBx−1 |−1 . That is, ΓP SL(2,2k ) = (2k + 1)K2k −1 ⊔ 2k−1 (2k + 1)K2k −2 ⊔ 2k−1 (2k − 1)K2k . Hence, the result follows from (2.1). Proposition 2.6. The spectrum of the commuting graph of the general linear group GL(2, q), where q = pn > 2 and p is a prime integer, is given by {(−1)q 4 −q 3 −2q 2 −q , (q 2 − 3q + 1) q(q+1) 2 4 , (q 2 − q − 1) q(q−1) 2 , (q 2 − 2q)q+1 }. Proof. We have |GL(2, q)| = (q 2 − 1)(q 2 − q) and |Z(GL(2, q))| = q − 1. By Proposition 3.26 of [1], the set of centralizers of non-central elements of GL(2, q) is given by {xDx−1 , xIx−1 , xP Z(GL(2, q))x−1 : x ∈ GL(2, q)} where D is the subgroup of GL(2, q) consisting of all diagonal matrices, I is a cyclic subgroup of GL(2, q) having order q 2 − 1 and P is the Sylow p-subgroup of GL(2, q) consisting of all upper triangular matrices with 1 in the diagonal. The orders of D and P Z(GL(2, q)) are (q − 1)2 and q(q − 1) respectively. Also the q(q−1) and number of conjugates of D, I and P Z(GL(2, q)) in GL(2, q) are q(q+1) 2 , 2 q +1 respectively. Since GL(2, q) is an AC-group (see Lemma 3.5 of [1]), by Lemma 2.1 we have ΓGL(2,q) = q(q − 1) q(q + 1) K|xDx−1 |−q+1 ⊔ K|xIx−1 |−q+1 ⊔ (q + 1)K|xP Z(GL(2,q))x−1 |−q+1 . 2 2 That is, ΓGL(2,q) = q(q+1) 2 Kq 2 −3q+2 ⊔ result follows from (2.1). q(q−1) 2 Kq 2 −q ⊔ (q + 1)Kq2 −2q+1 . Hence, the G ∼ Theorem 2.7. Let G be a finite group and Z(G) = Sz(2), where Sz(2) is the 5 4 −1 Suzuki group presented by ha, b : a = b = 1, b ab = a2 i. Then Spec(ΓG ) = {(−1)19|Z(G)|−6 , (4|Z(G)| − 1)1 , (3|Z(G)| − 1)5 }. Proof. We have G = haZ(G), bZ(G) : a5 Z(G) = b4 Z(G) = Z(G), b−1 abZ(G) = a2 Z(G)i. Z(G) Observe that CG (a) CG (ab) CG (a2 b) CG (a2 b3 ) CG (b) CG (a3 b) = Z(G) ⊔ aZ(G) ⊔ a2 Z(G) ⊔ a3 Z(G) ⊔ a4 Z(G), = Z(G) ⊔ abZ(G) ⊔ a4 b2 Z(G) ⊔ a3 b3 Z(G), = Z(G) ⊔ a2 bZ(G) ⊔ a3 b2 Z(G) ⊔ ab3 Z(G), = Z(G) ⊔ a2 b3 Z(G) ⊔ ab2 Z(G) ⊔ a4 bZ(G), = Z(G) ⊔ bZ(G) ⊔ b2 Z(G) ⊔ b3 Z(G) and = Z(G) ⊔ a3 bZ(G) ⊔ a2 b2 Z(G) ⊔ a4 b3 Z(G) are the only centralizers of non-central elements of G. Also note that these centralizers are abelian subgroups of G. Thus G is an AC-group. By Lemma 2.1, we have ΓG = K4|Z(G)| ⊔ 5K3|Z(G)| since |CG (a)| = 5|Z(G)| and |CG (ab)| = |CG (a2 b)| = |CG (a2 b3 )| = |CG (b)| = |CG (a3 b)| = 4|Z(G)|. Therefore, by (2.1), the result follows. 5 Proposition 2.8. Let F = GF (2n ), n ≥ 2 and ϑ be the Frobenius automorphism of F , i. e., ϑ(x) = x2 for all x ∈ F . Then the spectrum of the commuting graph of the group     1 0 0   A(n, ϑ) = U (a, b) = a 1 0 : a, b ∈ F .   b ϑ(a) 1 under matrix multiplication given by U (a, b)U (a′ , b′ ) = U (a + a′ , b + b′ + a′ ϑ(a)) is n −1)2 ΓA(n,ϑ) = {(−1)(2 n −1 , (2n − 1)2 }. Proof. Note that Z(A(n, ϑ)) = {U (0, b) : b ∈ F } and so |Z(A(n, ϑ))| = 2n − 1. Let U (a, b) be a non-central element of A(n, ϑ). It can be seen that the centralizer of U (a, b) in A(n, ϑ) is Z(A(n, ϑ)) ⊔ U (a, 0)Z(A(n, ϑ)). Clearly A(n, ϑ) is an ACgroup and so by Lemma 2.1 we have ΓA(n,ϑ) = (2n − 1)K2n . Hence the result follows by (2.1). Proposition 2.9. Let F = GF (pn ), p be commuting graph of the group   1  A(n, p) = V (a, b, c) = a  b a prime. Then the spectrum of the   0 0  1 0 : a, b, c ∈ F .  c 1 under matrix multiplication V (a, b, c)V (a′ , b′ , c′ ) = V (a + a′ , b + b′ + ca′ , c + c′ ) is ΓA(n,p) = {(−1)p 3n −2pn −1 , (p2n − pn − 1)p n +1 }. Proof. We have Z(A(n, p)) = {V (0, b, 0) : b ∈ F } and so |Z(A(n, p))| = pn . The centralizers of non-central elements of A(n, p) are given by (i) If b, c ∈ F and c 6= 0 then the centralizer of V (0, b, c) in A(n, p) is {V (0, b′ , c′ ) : b′ , c′ ∈ F } having order |p2n |. (ii) If a, b ∈ F and a 6= 0 then the centralizer of V (a, b, 0) in A(n, p) is {V (a′ , b′ , 0) : a′ , b′ ∈ F } having order |p2n |. (iii) If a, b, c ∈ F and a 6= 0, c 6= 0 then the centralizer of V (a, b, c) in A(n, p) is {V (a′ , b′ , ca′ a−1 ) : a′ , b′ ∈ F } having order |p2n |. It can be seen that all the centralizers of non-central elements of A(n, p) are abelian. Hence A(n, p) is an AC-group and so ΓA(n,p) = Kp2n −pn ⊔ Kp2n −pn ⊔ (pn − 1)Kp2n −pn = (pn + 1)Kp2n −pn . Hence the result follows from (2.1). 6 We would like to mention here that the groups considered in Proposition 2.82.9 are constructed by Hanaki (see [8]). These groups are also considered in [4], in order to compute their numbers of distinct centralizers. 3 Some applications In this section, we show that the commuting graph of a finite non-abelian group G is integral if G is not isomorphic to S4 and the commuting graph of G is planar. We also show that the commuting graph of a finite non-abelian group G is integral if the commuting graph of G is toroidal. We shall use the following results. Theorem 3.1. Let G be a finite group such that prime integer. Then Spec(ΓG ) = {(−1)(p 2 −1)|Z(G)|−p−1 G Z(G) ∼ = Zp × Zp , where p is a , ((p − 1)|Z(G)| − 1)p+1 }. Proof. The result follows from Theorem 2.2 noting that G is an AC-group with p+1 distinct centralizers of non-central elements and all of them have order p|Z(G)|. Proposition 3.2. Let D2m = ha, b : am = b2 = 1, bab−1 = a−1 i be the dihedral group of order 2m, where m > 2. Then ( {(−1)m−2 , 0m , (m − 2)1 } if m is odd Spec(ΓD2m ) = m 3m {(−1) 2 −3 , 1 2 , (m − 3)1 } if m is even. Proof. Note that D2m is a non-abelian AC-group. If m is even then |Z(D2m )| = 2 and D2m has m 2 + 1 distinct centralizers of non-central elements. Out of these centralizers one has order m and the rests have order 4. Therefore ΓD2m = Km−2 ⊔ m 2 K2 . If m is odd then |Z(D2m )| = 1 and D2m has m + 1 distinct centralizers of non-central elements. In this case, one centralizer has order m and the rests have order 2. Therefore ΓD2m = Km−1 ⊔ mK1 . Hence the result follows from (2.1). Proposition 3.3. The spectrum of the commuting graph of the generalized quaternion group Q4n = hx, y : y 2n = 1, x2 = y n , yxy −1 = y −1 i, where n ≥ 2, is given by Spec(ΓQ4n ) = {(−1)3n−3 , 1n , (2n − 3)1 }. Proof. Note that Q4n is a non-abelian AC-group with n + 1 distinct centralizers of non-central elements. Out of these centralizers one has order 2n and the rests have order 4. Also |Z(Q4n )| = 2. Therefore ΓQ4n = K2n−2 ⊔ nK2 . Hence the result follows from (2.1). 7 As an application of Theorem 3.1 we have the following lemma. Lemma 3.4. Let G be a group isomorphic to any of the following groups (i) Z2 × D8 (ii) Z2 × Q8 (iii) M16 = ha, b : a8 = b2 = 1, bab = a5 i (iv) Z4 ⋊ Z4 = ha, b : a4 = b4 = 1, bab−1 = a−1 i (v) D8 ∗ Z4 = ha, b, c : a4 = b2 = c2 = 1, ab = ba, ac = ca, bc = a2 cbi (vi) SG(16, 3) = ha, b : a4 = b4 = 1, ab = b−1 a−1 , ab−1 = ba−1 i. Then Spec(ΓG ) = {(−1)9 , 33 }. Proof. If G is isomorphic to any of the above listed groups, then |G| = 16 and G ∼ |Z(G)| = 4. Therefore, Z(G) = Z2 × Z2 . Thus the result follows from Theorem 3.1. The next lemma is also useful in this section. Lemma 3.5. Let G be a non-abelian group of order pq, where p and q are primes with p | (q − 1). Then Spec(ΓG ) = {(−1)pq−q−1 , (p − 2)q , (q − 2)1 }. Proof. It is easy to see that |Z(G)| = 1 and G is an AC-group. Also the centralizers of non-central elements of G are precisely the Sylow subgroups of G. The number of Sylow q-subgroups and Sylow p-subgroups of G are one and q respectively. Therefore, by Lemma 2.1 we have ΓG = Kq−1 ⊔ qKp−1 . Hence, the result follows from (2.1). Now we state and proof the main results of this section. Theorem 3.6. Let ΓG be the commuting graph of a finite non-abelian group G. If G is not isomorphic to S4 and ΓG is planar then ΓG is integral. Proof. By Theorem 2.2 of [2] we have that ΓG is planar if and only if G is isomorphic to either D6 , D8 , D10 , D12 , Q8 , Q12 , Z2 × D8 , Z2 × Q8 , M16 , Z4 ⋊ Z4 , D8 ∗ Z4 , SG(16, 3), A4 , A5 , S4 , SL(2, 3) or Sz(2) = ha, b : a5 = b4 = 1, b−1 ab = a3 i. If G ∼ = D6 , D8 , D10 or D12 then by Proposition 3.2, one may conclude that ΓG is integral. If G ∼ = Q8 or Q12 then by Proposition 3.3, ΓG becomes integral. If 8 G∼ = Z2 × D8 , Z2 × Q8 , M16 , Z4 ⋊ Z4 , D8 ∗ Z4 or SG(16, 3) then by Lemma 3.4, ΓG becomes integral. If G ∼ = A4 = ha, b : a2 = b3 = (ab)3 = 1i then the distinct centralizers of non-central elements of G are CG (a) = {1, a, bab2 , b2 ab}, CG (b) = {1, b, b2 }, CG (ab) = {1, ab, b2 a}, CG (ba) = {1, ba, ab2 } and CG (aba) = {1, aba, bab}. Note that these centralizers are abelian subgroups of G. Therefore, ΓG = K3 ⊔ 4K2 and Spec(ΓG ) = {(−1)6 , 21 , 14 }. Thus ΓG is integral. If G ∼ = Sz(2) then by Theorem 2.7, we have ΓG = {(−1)13 , (3)1 , (2)5 }. Hence, ΓG is integral. If G is isomorphic to SL(2, 3) = ha, b, c : a3 = b4 = 1,b2 = c2 , c−1 bc = b−1 , a−1 ba = b−1 c−1 , a−1 ca = b−1 i then Z(G) = {1, b2 }. It can be seen that CG (b) CG (c) CG (bc) CG (a2 b2 ) CG (ac) CG (ca) CG (a2 b) = {1, b, b2 , b3 } = hbi, = {1, c, c2 , c3 } = hci, = {1, b2 , bc, cb} = hbci, = {1, b2 , a, a2 , a2 b2 , ab2 } = ha2 b2 i, = {1, b2 , ac, ca2 , a2 bc, ab2 c} = haci, = {1, b2 , ca, a2 c, ba2 , ab} = hcai and = {1, b2 , a2 b, ba, b3 a, (ba)2 } = ha2 bi are the only distinct centralizers of non-central elements of G. Note that these centralizers are abelian subgroups of G. Therefore, ΓG = 3K2 ⊔ 4K4 and Spec(ΓG ) = {(−1)15 , 13 , 34 }. Thus ΓG is integral. If G ∼ = A5 then by Proposition 2.5, we have Spec(ΓG ) = {(−1)38 , 110 , 25 , 36 } noting that P SL(2, 4) ∼ = A5 . Thus ΓG is integral. 9 Finally, if G ∼ = S4 then it can be seen that the characteristic polynomial of ΓG is (x − 1)7 (x + 1)10 (x2 − 5)2 (x2 − 3x − 2) and so   √ !1 √ !1   √ √ 3 + 17 3 − 17 Spec(ΓG ) = 17 , (−1)10 , ( 5)2 , (− 5)2 , . ,   2 2 Hence, ΓG is not integral. This completes the proof. In [2, Theorem 2.3], Afkhami et al. have classified all finite non-abelian groups whose commuting graphs are toroidal. Unfortunately, the statement of Theorem 2.3 in [2] is printed incorrectly. We list the correct version of [2, Theorem 2.3] below, since we are going to use it. Theorem 3.7. Let G be a finite non-abelian group. Then ΓG is toroidal if and only if ΓG is projective if and only if G is isomorphic to either D14 , D16 , Q16 , QD16 , D6 × Z3 , A4 × Z2 or Z7 ⋊ Z3 . Theorem 3.8. Let ΓG be the commuting graph of a finite non-abelian group G. Then ΓG is integral if ΓG is toroidal. Proof. By Theorem 3.7 we have that ΓG is toroidal if and only if G is isomorphic to either D14 , D16 , Q16 , QD16 , D6 × Z3 , A4 × Z2 or Z7 ⋊ Z3 . If G ∼ = D14 or D16 then by Proposition 3.2, one may conclude that ΓG is integral. If G ∼ = Q16 then by Proposition 3.3, ΓG becomes integral. If G ∼ = QD16 ∼ then by Proposition 2.4, ΓG becomes integral. If G = Z7 ⋊ Z3 then ΓG is integral, by Lemma 3.5. If G is isomorphic to D6 × Z3 or A4 × Z2 then ΓG becomes integral by Corollary 2.3, since D6 and A4 are AC-groups. This completes the proof. We shall conclude the paper with the following result. Proposition 3.9. Let ΓG be the commuting graph of a finite non-abelian group G. Then ΓG is integral if the complement of ΓG is planar. Proof. If the complement of ΓG is planar then by Proposition 2.3 of [1] we have that G is isomorphic to either D6 , D8 or Q8 . If G ∼ = D6 or D8 then by Proposition 3.2, ΓG is integral. If G ∼ = Q8 then by Proposition 3.3, ΓG becomes integral. This completes the proof. 10 References [1] A. Abdollahi, S. Akbari and H. R. Maimani, Non-commuting graph of a group, J. Algebra, 298, 468–492 (2006). [2] M. Afkhami, M. Farrokhi D. G. and K. Khashyarmanesh, Planar, toroidal, and projective commuting and non-commuting graphs, Comm. Algebra, 43(7), 2964–2970 (2015). [3] S. Akbari, A. Mohammadian, H. Radjavi and P. Raja, On the diameters of commuting graphs, Linear Algebra Appl., 418, 161–176 (2006). [4] A. R. Ashrafi, On finite groups with a given number of centralizers, Algebra Colloq., 7(2), 139–146 (2000). [5] K. Balińska, D. Cvetković, Z. Radosavljević, S. Simić and D. Stevanović, A survey on integral graphs, Univ. Beograd. Publ. Elektrotehn. Fak. Ser. Mat. 13, 42–65 (2003). [6] C. Bates, D. Bundy, S. Hart and P. Rowley, A Note on Commuting Graphs for Symmetric Groups, Electron. J. Combin. 16, 1–13 (2009). [7] A. K. Das and D. Nongsiang, On the genus of the commuting graphs of finite non-abelian groups, preprint, arXiv:1311.6324vl [8] A. Hanaki, A condition of lengths of conjugacy classes and character degree, Osaka J. Math 33, 207–216 (1996). [9] F. Harary and A. J. Schwenk, Which graphs have integral spectra?, Graphs and Combin., Lect. Notes Math., Vol 406, Springer-Verlag, Berlin, 45–51 (1974). [10] A. Iranmanesh and A. Jafarzadeh, Characterization of finite groups by their commuting graph, Acta Mathematica Academiae Paedagogicae Nyiregyhaziensis, 23(1), 7–13 (2007). [11] A. Iranmanesh and A. Jafarzadeh, On the commuting graph associated with the symmetric and alternating groups, J. Algebra Appl., 7(1), 129–146 (2008). [12] G. L. Morgan and C. W. Parker, The diameter of the commuting graph of a finite group with trivial center, J. Algebra 393(1), 41–59 (2013). [13] C. Parker, The commuting graph of a soluble group, Bull. London Math. Soc., 45(4), 839–848 (2013). [14] D. M. Rocke, p-groups with abelian centralizers, Proc. London Math. Soc. 30(3), 55–75 (1975). 11
4math.GR
Paper 04 An Event-driven Operator Model for Dynamic Simulation of Construction Machinery Reno Filla VOLVO WHEEL LOADERS AB, ESKILSTUNA, SWEDEN Abstract Prediction and optimisation of a wheel loader’s dynamic behaviour is a challenge due to tightly coupled, non-linear subsystems of different technical domains. Furthermore, a simulation regarding performance, efficiency, and operability cannot be limited to the machine itself, but has to include operator, environment, and work task. This paper presents some results of our approach to an event-driven simulation model of a human operator. Describing the task and the operator model independently of the machine’s technical parameters, gives the possibility to change whole sub-system characteristics without compromising the relevance and validity of the simulation. Keywords: discrete simulation, continuous simulation, complex systems, operator model, driver model Every passing minute is another chance to turn it all around. (from the film “Vanilla Sky”) This paper has been published as: Filla, R. (2005) “An Event-driven Operator Model for Dynamic Simulation of Construction Machinery”. The Ninth Scandinavian International Conference on Fluid Power, Linköping, Sweden. http://www.arxiv.org/abs/cs.CE/0506033 (Internet link refers to a Technical Report of the original paper) An Event-driven Operator Model… 3 1 Introduction In the development of off-road machinery, dynamic simulation of large and complex technical systems is being increasingly practised. In the case of a wheel loader, most subsystems are non-linear and tightly coupled, which makes prediction and optimisation of the complete system’s dynamic behaviour a challenge. Both drive train and hydraulics are competing for the limited engine torque. As described in [1], the momentary power distribution is specific for the task at hand and is controlled by the operator, who ultimately balances the complete system. Figure 1 shows how power is transferred through all relevant wheel loader subsystems, with the machine being used in the typical work task of loading gravel. Figure 1. Simplified power transfer scheme of a wheel loader loading gravel So-called full vehicle models can be useful in various types of simulation. How the model needs to be controlled and subjected to virtual loads is very much dependent on the purpose of the simulation. Paper [2] gives examples and reasons of different approaches. Our work aims to simulate a wheel loader’s total performance, efficiency, and operability, and to investigate the robustness of these three important product properties. Because a human operator adapts to the machine and the work situation, assessing the above mentioned properties by means of simulation also requires modelling operator, environment, and task at an appropriate level of detail. Traditional backwards simulation forces a technical system to follow a prescribed cycle, which can result in physically erroneous results. Forward simulation with fixed operator input would use each machine in the same way, producing physically correct but irrelevant results. An experienced operator can adapt to a new machine in order to achieve the highest possible performance. Being able to simulate this adaptation to a certain degree is a necessary first step towards optimisation of the complete system. 4 Paper 04 Paper [2] describes the initial results of our work on an operator model, with a focus on the bucket filling phase. Since the complete loader was modelled in a program for multi-body simulation (Figure 2), our first approach was to also realise the operator model in this simulation package. As noted in the discussion section of that paper, this proved to be possible but cumbersome. It seemed that for this type of problem, realisation as a finite state machine in a discrete-event simulation program (in co-simulation with the multi-body simulation package) would have been better. Consequently, this was our next step. Choosing a program suite that supports both continuous and discrete event simulation, the operator can now be modelled with a variety of control strategies, completely separate from the machine. A simulation can be performed as either co-simulation (where both sides solve their own equations and communicate the results) or as a plant import into the multi-body simulation program (where the operator model has been compiled into an executable file, which is referenced as a General State Equation). Figure 2. Models of the wheel loader and its environment With the bucket filling phase already covered in [2], this paper focuses on the remaining essential elements of a wheel loader working cycle. 2 Loading Cycle Description Wheel loaders are highly versatile machines, and with each task and workplace being unique, it is difficult to define a standard test cycle that covers every possible aspect. However, tasks do exist that are more common than others. Figure 3 shows a so-called short loading cycle, sometimes also dubbed V-cycle or Y-cycle for its characteristic driving pattern. Typical for this cycle is the loading of some kind of granular material on an adjacent load receiver (e.g. a dump truck). An Event-driven Operator Model… 5 Figure 3. Short loading cycle In paper [3], such a short loading cycle is divided into different phases, and some examples are given for especially interesting situations that occur in some phases. Phase 1, Bucket filling, begins as soon as the bucket’s cutting edge is in contact with the material. The operator then uses the kick-down function to shift into the lowest gear. Lifting the loading unit somewhat increases force on the front axle, which improves traction. The operator then simultaneously controls the machine speed (via the engine throttle) and lift and tilt function (via hydraulic levers) in order to fill the bucket. Again, this has already been covered in [2] and will not be considered in this paper. Phase 2, Leaving bank, begins after the bucket is fully tilted back. The lift function is activated, the transmission is put into reverse, and the engine speed is increased. After leaving the pile, the machine is steered to the side in the characteristic V-pattern. The lifting function is activated all the time until reaching the load receiver at the end of phase 5. Phase 3, Retardation, begins when the operator judges that the remaining distance to the load receiver is sufficient for the lift hydraulics to accomplish the necessary bucket height while driving (operators usually prefer driving a longer distance to waiting in front of the load receiver for a sufficient bucket clearance). Most operators use engine braking for retardation. Reversing in phase 4 is unfortunately usually accomplished by putting the transmission into forward while the machine is still moving backwards. This is convenient, but increases fuel consumption, since the torque converter’s turbine wheel is forced to rotate backwards until enough torque has been built up and the machine is moving forwards. 6 Paper 04 Phase 5, Towards load receiver, begins when the machine speed is positive, i.e. the machine is moving forward. The operator steers the loader to achieve the V-pattern that is characteristic for a short loading cycle. At the end of this phase, the loader arrives perpendicularly at the load receiver. If the operator judged correctly in phase 3, then the bucket has reached a sufficient height to begin unloading. Usually this is the case, because an experienced operator is able to adapt to any machine very quickly. In phase 6, Bucket emptying, the operator often drives forward very slowly while at the same time raising the loading unit and tilting the bucket forward. This gives the possibility to not just dump the material on the load receiver, but actually place it so that after 3 to 4 buckets a dump truck is evenly loaded without any material being spilled. In paper [3], the short loading cycle continues with phases 7-10: Leaving load receiver, Retardation and reversing, Towards bank, and Retardation at bank (the last is often combined with the next bucket filling by using the machine’s momentum to drive the bucket into the gravel pile, rather than applying traction with the wheels). In this stage of our work, however, only phases 1-6 are covered, because of the significant interaction between all main subsystems. The challenge in such a short loading cycle, from a manufacturer’s point of view, is to find an appropriate, robust, and maintainable balance between productivity (material loaded per time), efficiency (fuel consumed per load), and operability over the complete cycle. Productivity and efficiency are well-defined, but a generally agreed definition of operability has still to be found. In [4], a definition is offered, that also works well even for construction machinery: “Operability is the ease with which a system operator can perform the assigned mission with a system when that system is functioning as designed”. The limitation to states where the system is functioning as designed, effectively excludes properties like robustness and reliability. But this still gives no explanation as to how to quantify operability; instead, the concept “ease of performance” is introduced. Paper [3] briefly discusses some ways of visualising operability-related, measurable state variables in a wheel loader cycle. Amongst others, a diagram displaying bucket height over integrated machine speed (i.e. the machine’s travelling distance) is introduced (Figure 4). The ratio of lift speed to machine speed, which is crucial to how long the loader needs to be driven backwards until reversing, can here be seen as the curve’s slope. In the diagram in Figure 4 the curve is fairly straight from the beginning of phase 2 (where the loader leaves the bank) to the end of phase 5 (where the loader arrives at the load receiver). This indicates that the operator judged very well when to reverse. Otherwise, the slope would become steeper at the end of phase 5, indicating that the operator needed to slow down or even stop the loader in order for the bucket to reach sufficient height for emptying. An Event-driven Operator Model… 7 The distance between the point of reversing and the bank (or load receiver) is an indication of how well a balance between the two motions of lifting and driving has been achieved. Because such a diagram points out any imbalance, engineers at Volvo CE have begun to call it Machine harmony diagram. Figure 4. Bucket height over integrated machine speed in a short loading cycle Another interesting aspect is the visualisation of the operator’s technique for bucket filling and bucket emptying. For this, the machine harmony diagram is preferably accompanied by another diagram displaying bucket height over bucket angle (Figure 5). This additional diagram also indicates the loader linkage’s capability for parallel alignment (i.e. how much the bucket angle changes during raising and lowering of the loading unit). Figure 5. Example of bucket handling in a short loading cycle The chosen bucket filling technique indirectly influences where the loader needs to reverse: Leaving the bank at the beginning of phase 2 with a higher bucket means that it will take less time to raise it from there to a sufficient height for emptying. As explained before, an experienced operator chooses the point of reversing so that the bucket will have the necessary height approximately when the loader reaches the load receiver. This 8 Paper 04 means that in theory the point of reversing will be nearer to the bank when leaving with a higher bucket position, because the operator adapts to the machine. It can be easily shown that this is the case also in practice. Figure 6 shows three selected short loading cycles, originating from a non-stop recording of a longer period, during which the operator changed his bucket filling technique. As can be seen, the bucket height when leaving the bank varies, but the operator managed very well to chose a reversing point in order to reach the load receiver with the bucket at a sufficient height for emptying. Figure 6. Recorded short loading cycles with different bucket filling techniques Again, it is this kind of human adaptation to the machine which is the reason for our work on operator models: we want to be able to assess a new machine’s productivity, efficiency, operability, and their robustness by means of simulation. 3 Simulation Setup In previous work, the author and two colleagues modelled a wheel loader in a simulation suite for continuous multi-body simulation. The model features a detailed hydraulic system, connected to a fairly detailed mechanical model (rigid bodies) and drive train. The engine, with engine controller and gas dynamics, was realised as state variables, enhanced by user-written subroutines that are linked to the numerical solver. The environment is represented as a model of a gravel pile [5], and as a standard tyre/road model. Since using the loader model for the simulations presented in [2], the interface to the operator model has been enhanced. Already in the previous version, the operator model was logically separated from the machine model, which was controlled through variables representing the functions engine throttle, brake, steering, lift, and tilt. However, An Event-driven Operator Model… 9 everything was still located within one model space. Now, by using co-simulation, the separation is complete: the wheel loader is modelled and simulated in the multi-body simulation program, while the operator is completely modelled and simulated in the previously mentioned package that supports both continuous and discrete event simulation. The operator model sends commands through the machine controls, which the loader model receives, uses and answers with e.g. loader position and orientation, and engine speed (Figure 7). Some additional elements have been added to simplify debugging. Figure 7. Simulation setup (overall view) Both sides act as black box models towards each other. No internal states are sent, because the intention is to model human-machine interaction, which naturally occurs through a limited number of channels. As long as the interface is unchanged, the models on either side can be replaced by just copying a different file into the simulation's work directory. In the near future, our ambition is to compile operator models into executable files that can be imported as General State Equations into the multi-body simulation program. This will significantly simplify the simulation process. Initial tests in that respect have shown very promising results. 10 Paper 04 4 Event-based Operator Model Figure 8 shows the overall view of the operator model, where each phase has been modelled as a state containing several substates. Figure 8. Operator model (top level view) Paper [2] mainly focussed on modelling one bucket filling technique, with encouraging results. Therefore, the operator model presented in this paper has been designed to begin where the bucket filling phase in [2] ended, immediately before tilting back the bucket and leaving the gravel pile. An initialisation phase has been modelled (Figure 9), during which the bucket is lifted and tilted to the same position that resulted in [2]. The engine is also set to the same speed. Already during model preparation the loader has been moved to the same position it had at the end of bucket filling in [2]. Figure 9. Initialisation phase As described earlier, at the end of phase 1, Bucket filling, the operator tilts the loader's bucket back as far as possible. In the model, this is done in the intermediate phase 1a. An Event-driven Operator Model… 11 In the next phases the operator will begin by calculating and following a theoretical path, which is only defined by the location of bank and load receiver. Later on, the operator model will diverge from this path to react to certain events. For all calculations of position and orientation, a global co-ordinate system with its origin in the intersection of bank and load receiver is used (Figure 10a). Figure 10a. V-pattern, theoretical Figure 10b. Theoretical path solutions The theoretical path begins with a straight line that is perpendicular to the bank. It also ends with a straight line, this one perpendicular to the load receiver. In between, the path consists of two circular arcs that are tangential to each other and the two lines. Such a geometrical figure has one degree of freedom, which can be expressed as the angle of the tangent that is shared by the arcs. Figure 10b shows four possible solutions. Which solution to take is dependent on how much space the workplace offers. For a given angle α the circular arcs’ radii ra and rb result in: ra = 1 ⎛ (a + b ) (1 + cos α ) ⎞ − (a − b )⎟ ⎜ 2⎝ sin α ⎠ (1) ⎞ 1 ⎛ (a + b ) cos α ⎜⎜ + (a − b )⎟⎟ 2 ⎝ (1 − sin α ) ⎠ (2) rb = Many operators prefer to steer the loader approximately equally much to the right as to the left. This corresponds to Figure 3 in which the global tangent orientation is stated to be α ≈ 45°. Equations 1 and 2 can then be simplified to: ra = a+b 2 +b (3) 12 Paper 04 rb = ( a − b 1− 2 ) 2− 2 (4) However, for the model presented in this paper, the reasoning was that an operator prefers to aim at a fixed point while reversing. This is easier to accomplish and also results in a 45 degree angle when the global origin is used as fixed point and when, as in most cases, load receiver and bank are located equidistantly from the global origin. The circular arcs’ radii and the global tangent orientation can be calculated as: ra = b + rb = a + (a + b ) (a + b )2 + 4ab − (a 2 − b 2 ) 4a (a + b ) (a + b )2 + 4ab + (a 2 − b 2 ) 4b a + ra cos α = ra + rb (5) (6) (7) The case of “aiming at the origin” can easily be checked by comparing β, the loader’s bearing to the origin with θ, its orientation in the global co-ordinate system (Figure 11). Figure 11. Global position, orientation θ and bearing β Phase 2, Leaving bank, begins with putting the transmission into reverse. Then, full lift and the machine’s steering function are activated until an articulation angle is reached that corresponds to a radius according to Eq. 5 (i.e. plan to reverse with aim at An Event-driven Operator Model… 13 origin). However, due to the lack of feed-back path control in this version of the operator model, the machine model will not follow the theoretical path exactly. But this is not necessary either, because another rule is activated when the machine prematurely aims at the origin. This rule overrides the original path and steers the machine to drive along the new-found bearing line. As soon as the loader passes the load receiver, an estimation routine begins to continuously extrapolate the current lifting/driving ratio in order to determine whether the reversing phase can be entered. The remaining distance to the load receiver is calculated as a combination of a circular arc with radius rc and a straight line (Figure 12). Figure 12. Path to load receiver Knowing the machine’s current position (x, z) and global orientation θ, the turning radius rc and the remaining travelling distance L can be found as: rc = d 1− sin θ (8) ⎛π ⎞ Lc = rc ⎜ − θ ⎟ 2 ⎝ ⎠ (9) Ld = z − rc cos θ (10) L = Lc + Ld (11) However, most wheel loaders have a maximum articulation angle of 35-40 degrees and might therefore not be able to achieve the currently required turning radius rc. To handle this situation in a simulation, an intermediate phase 2a is activated. During this phase, the operator model continues the V-pattern from phase 2 and conducts calculations according to Eq. 8-11. As soon as the required turning radius rc is actually achievable, phase 2a is left. It is advantageous to handle this situation in a special phase; otherwise, an extended phase 2 might be interpreted as a limited lifting speed of the loader 14 Paper 04 rather than a limited turning capability. Immediately after activation of phase 3, Retardation, the engine throttle is released and the articulation steered back to zero. In addition to the engine, the service brakes are also used to decrease the machine’s speed. Phase 4, Reversing, begins when the machine’s speed has decreased to a level that where setting the transmission to forward is safe. The brakes are released, the engine throttle is activated again, and lifting is stopped until sufficient speed has been built up. In phase 5, Towards load receiver, the required turning radius rc is again calculated with Eq. 8. However, a theoretically correct but impractical solution to Eq. 8-11 might be found that yields a negative value for Ld, the length of the straight line between load receiver and circular arc (Figure 12). One possible strategy is to just move forward in a straight line until the current machine position and global orientation result in a positive value for Ld. When the machine finally reaches the load receiver, the articulation angle is adjusted so that the bucket is parallel to the load receiver, regardless of the wheel loaders orientation. However, in a loading cycle that is not too short, the complete wheel loader should arrive with zero articulation and perpendicular to the load receiver. During phase 5, the lifting function is activated until the bucket is at a sufficient height for emptying. If this is not the case when the machine reaches the load receiver, an intermediate phase 5a is started before the bucket is emptied in phase 6. In this intermediate phase, the operator model is using the lift function to reach a bucket height that is sufficient for emptying into the load receiver. In phase 6, Bucket emptying, the operator model uses engine throttle, lift, and tilt function simultaneously in order to simulate a human operator’s strategy of placing material so that the load receiver is evenly loaded after three to four short loading cycles. As explained earlier, a short loading cycle continues with phases 7-10, Leaving load receiver, Retardation and reversing, Towards bank, and Retardation at bank, which are not covered yet in the presented operator model. 5 Simulation Results In order to give answers with respect to a simulated wheel loader’s productivity, efficiency, and operability, the operator model needs to be updated to include all phases of a short loading cycle, most importantly bucket filling. Until this is done, simulation results in respect of engine load duty and fuel consumption should be considered with care. For this reason this paper will only present how the operator model succeeded in adapting to variations in workplace layout and machine properties. Figure 13 shows the results of a short loading cycle that has the same workplace layout as the cycle presented in paper [2]. Compared to the model in [2], this one represents an operator with a very rough operating style; most control inputs are either on or off, and the engine throttle is very often at maximum value. An Event-driven Operator Model… 15 Figure 13. Control input signals from the operator model The diagram on the bottom displays the current cycle phase (#0 is the initialisation phase). 16 Paper 04 Figure 14 displays the machine movement from the cycle above in both a location plot and a harmony diagram. Since phase 1, Bucket filling, is not included in the current version of the operator model, the cycle in the harmony diagram starts with a vertical line that shows how the loader model lifts the bucket in the simulation’s initialisation phase. Figure 14. Machine location plot and harmony diagram Because the operator model has not been hard-coded with fixed locations for bank and load receiver, but designed parametrically, it is able to adapt. Figure 15 shows this for two different load receiver positions. In the initial simulation setup (Figure 13 and Figure 14) the machine’s movement was more restricted by its limited turning capability, rather by its lifting speed. The simulated wheel loader’s control signal has therefore been artificially decreased by 50%, which results in a slower lifting speed. Figure 16 shows how the operator model adapts to this situation by choosing a different reversing point. An Event-driven Operator Model… 17 Figure 15. Adaptation to workplace layout Figure 16. Adaptation to lifting speed 18 Paper 04 Finally, as already explained earlier and shown in Figure 6, an operator’s bucket filling technique has an indirect influence on the location of the reversing point. With a higher bucket position at the beginning of phase 2, the point of reversing can be chosen nearer to the load receiver. Figure 17 presents results of two simulations that start with different bucket heights (in both cases the loader model with artificially decreased lifting speed was used). Figure 17. Influence of bucket filling technique 6 Discussion While the operator model presented in paper [2] focussed on the bucket filling phase and used min/max relationships reminiscent of fuzzy-sets, the operator model presented here focuses on the remaining elements of a short loading cycle and uses a pure discrete-event approach. It is advantageous to use this modelling paradigm, but certain elements such as path control are probably best modelled with a simple PI-controller. Therefore, in the next version of this operator model the possibility of combining these An Event-driven Operator Model… 19 approaches needs to be explored. Because the chosen simulation package supports both continuous and discrete-event simulation, this is a feasible prospect. As mentioned earlier, one interesting aspect is the possibility of compiling the operator model into an executable file, which is referenced as a General State Equation in the multi-body simulation program. With this, the engineer conducting a simulation can focus on the wheel loader, rather than having to spend time defining how it needs to be controlled to mimic reality. 7 Conclusion An event-driven operator model has been developed, which is able to adapt to basic variations in workplace layout and machine capability. With this, a “human element” can be introduced into dynamic simulation of complete wheel loaders, giving more relevant answers with respect to total machine performance, fuel efficiency, and possibly even operability in complete loading cycles. Acknowledgements The financial support of Volvo Wheel Loaders AB and PFF, the Swedish Program Board for Automotive Research, is hereby gratefully acknowledged. References [1] Filla, R. and Palmberg, J.-O. (2003) “Using Dynamic Simulation in the Development of Construction Machinery”. The Eighth Scandinavian International Conference on Fluid Power, Tampere, Finland, Vol. 1, pp 651-667. http://www.arxiv.org/abs/cs.CE/0305036 [2] Filla, R., Ericsson, A. and Palmberg, J.-O. (2005) “Dynamic Simulation of Construction Machinery: Towards an Operator Model”. IFPE 2005 Technical Conference, Las Vegas (NV), USA, pp 429-438. http://www.arxiv.org/abs/cs.CE/0503087 [3] Filla, R. (2003) “Anläggningsmaskiner: Hydrauliksystem i multidomäna miljöer”. Hydraulikdagar 2003, Linköping, Sweden. http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-13371 [4] Uwohali Inc. (1996) “Operability in Systems Concept and Design: Survey, Assessment, and Implementation”. Final Report, Website of Kennedy Space Center, NASA, USA. http://science.ksc.nasa.gov/shuttle/nexgen/Nexgen_Downloads/ Ops_Survey_of_Tools_Report_by_MSFC_1996.pdf 20 Paper 04 [5] Ericsson, A. and Slättengren, J. (2000) “A model for predicting digging forces when working in gravel or other granulated material”. 15th European ADAMS Users' Conference, Rome, Italy. http://www.mscsoftware.com/support/library/conf/adams/euro/2000/ Volvo_Predicting_Digging.pdf (Internet links updated and verified on August 18, 2011)
5cs.CE
arXiv:1202.0386v2 [math.RA] 15 Oct 2012 On rings each of whose finitely generated modules is a direct sum of cyclic modules ∗†‡ M. Behboodia,b§and G. Behboodi Eskandaria a Department of Mathematical Sciences, Isfahan University of Technology P.O.Box: 84156-83111, Isfahan, Iran b School of Mathematics, Institute for Research in Fundamental Sciences (IPM) P.O.Box: 19395-5746, Tehran, Iran [email protected], [email protected] Abstract In this paper we study (non-commutative) rings R over which every finitely generated left module is a direct sum of cyclic modules (called left FGC-rings). The commutative case was a well-known problem studied and solved in 1970s by various authors. It is shown that a Noetherian local left FGC-ring is either an Artinian principal left ideal ring, or an Artinian principal right ideal ring, or a prime ring over which every two-sided ideal is principal as a left and a right ideal. In particular, it is shown that a Noetherian local duo-ring R is a left FGC-ring if and only if R is a right FGC-ring, if and only if, R is a principal ideal ring. Moreover, we obtain that if R = Πni=1 Ri is a finite product of Noetherian duo-rings Ri where each Ri is prime or local, then R is a left FGC-ring if and only if R is a principal ideal ring. 1. Introduction The question of which commutative rings have the property that every finitely generated module is a direct sum of cyclic modules has been around for many years. We will call these rings FGC-rings. The problem originated in I. Kaplanskys papers ∗ The research of the second author was in part supported by a grant from IPM (No. 91130413). Key Words: Cyclic modules; FGC-rings; duo-rings; principal ideal rings. ‡ 2010 Mathematics Subject Classification.Primary 16D10, 16D70, 16P20, Secondary 16N60. § Corresponding author; † 1 [13] and [14], in which it was shown that a local domain is FGC if and only if it is an almost maximal valuation ring. For several years, this is one of the major open problems in the theory. R. S. Pierce [19] showed that the only commutative FGCrings among the commutative (von Neumann) regular rings are the finite products of fields. A deep and difficult study was made by Brandal [3], Shores-R. Wiegand [22], S. Wiegand [24], Brandal-R. Wiegand [4] and Vámos [23], leading to a complete solution of the problem in the commutative case. To show that a commutative FGC-ring cannot have an infinite number of minimal prime ideals required the study of topological properties (so-called Zariski and patch topologies). For complete and more leisurely treatment of this subject, see Brandal [2]. It gives a clear and detailed exposition for the reader wanting to study the subject. The main result reads as follows: A commutative ring R is an FGC-ring exactly if it is a finite direct sum of commutative rings of the following kinds: (i) maximal valuation rings; (ii) almost maximal Bézout domains; (iii) so-called torch rings (see [2] or [8] for more details on the torch rings). The corresponding problem in the non-commutative case is still open; see [21, Appendix B. Dniester Notebook: Unsolved Problems in the Theory of Rings and Modules. Pages 461-516] in which the following problem is considered. [21, Problem 2.45] (I. Kaplansky, reported by A. A. Tuganbaev): Describe the rings in which every one-sided ideal is two-sided and over which every finitely generated module can be decomposed as a direct sum of cyclic modules. Through this paper, all rings have identity elements and all modules are unital. A left FGC-ring is a ring R such that each finitely generated left R-module is a direct sum of cyclic submodules. A right FGC-ring is defined similarly, by replacing the word left with right above. A ring R is called a FGC-ring if it is a both left and right FGC-ring. Also, a ring R is called duo-ring if each one-sided ideal of R is two-sided. Therefore, the Kaplansky problem is: Describe the FGC-duo-rings. In this paper, we study left FGC-rings and, among other results, we will present a partial solution to the above problem of Kaplansky. 2. On Left FGC-Rings A ring R is local in case R has a unique left maximal ideal. An Artinian (resp. Noetherian) ring is a ring which is both left and right Artinian (resp. Noetherian). A principal ideal ring is a ring which is both left and right principal ideal ring. Also, for a subset S of R M, we denote by l.AnnR (S), the left annihilator of S in R. A left R-module M which has a composition series is called a module of finite length. The 2 length of a composition series of R M is said to be the length of R M and denoted by length(R M). Note that in the sequel, if we have proved certain results for rings or modules “on the left,” then we shall use such results freely also “on the right,” provided that these results can indeed be proved by the same arguments applied “to the other side.” We begin with the following lemma which is an associative, non-commutative version of Brandal [2, Proposition 4.3] for local rings (R, M) with M2 = (0). Also, the proof is based on a slight modification of the proof of [1, Theorem 3.1]. Lemma 2.1. Let (R, M) be a local ring with M2 = (0) and R M = Ry1 ⊕ . . . ⊕ Ryt such that t ≥ 2 and each Ryi is a minimal left ideal of R. If there exist 0 6= x1 , x2 ∈ M such that x1 R ∩ x2 R = (0), then the left R-module (R ⊕ R)/R(x1 , x2 ) is not a direct sum of cyclic modules. Proof. Since R M = Ry1 ⊕ . . . ⊕ Ryt and each Ryi is a minimal left ideal of R, we conclude that R is of finite composition length and length(R R) = t + 1. We put R G = (R ⊕ R)/R(x1 , x2 ). Since x1 , x2 ∈ M and M2 = (0), we conclude that l.AnnR (R(x1 , x2 )) = M. Thus R(x1 , x2 ) is simple and hence length(R G) = 2 × length(R R) − length(R R(x1 , x2 )) = 2(t + 1) − 1. We claim that every non-zero cyclic submodule Rz of G has length 1 or t + 1. If Mz = 0, then length(Rz) = 1 since Rz ≃ R/M. Suppose that Mz 6= 0, then there exist c1 , c2 ∈ R such that z = (c1 , c2 ) + R(x1 , x2 ). If c1 , c2 ∈ M, then Mz = 0, since M2 = 0. Thus without loss of generality, we can assume that z = (1, c2 ) + R(x1 , x2 ) (since if c1 6∈ M, then c1 is unit). Now let r ∈ l.AnnR (z), then r(1, c2) = t(x1 , x2 ) for some t ∈ R. It follows that r = tx1 and rc2 = tx2 . Thus tx2 = tx1 c2 . If t ∈ / M, then t is unit and so x2 = x1 c2 that it is contradiction (since x1 R ∩ x2 R = (0)). Thus t ∈ M and so r = tx1 = 0. Therefore, l.AnnR (z) = 0 and so Rz ∼ = R. It follows that length(Rz) = t + 1. Now suppose the assertion of the lemma is false. Then R G is a direct sum of cyclic modules and since R G is of finite length, we have G = Rw1 ⊕ . . . ⊕ Rwk ⊕ Rv1 ⊕ . . . ⊕ Rvl , where l, k ≥ 0, and each Rwi is of length t + 1 and each Rvj is of length 1. Clearly M ⊕ M is not a simple left R-module. Since R(x1 , x2 ) is simple, MG = (M ⊕ M)/R(x1 , x2 ) 6= 0. It follows that k ≥ 1. Also, length(R G) = 2(t+1)−1 = k(t+1)+l and this implies that k = 1 and l = t. Since Mvi = 0 for each i, MG = Mw1 and hence 3 G/MG ≃ Rw1 /Mw1 ⊕ Rv1 ⊕ . . . ⊕ Rvt . It follows that length(R G/MG) = 1 + t. On the other hand, we have G/MG ∼ = R/M ⊕ R/M and so length(R G/MG) = 2 and so t = 1, a contradiction. Thus the left R-module (R ⊕ R)/R(x1 , x2 ) is not a direct sum of cyclic modules.  We recall that the socle soc(R M) of a left module M over a ring R is defined to be the sum of all simple submodules of M. Theorem 2.4. Let (R, M) be a local ring such that R M and MR are finitely generated. If every left R-module with two generators is a direct sum of cyclic modules, then either M is a principal left ideal or M is a principal right ideal. Proof. We can assume that M is not a principal left ideal of R. One can easily see that MR is generated by {x1 , · · · , xn } if and only if M/M2 is generated by the set {x1 + M2 , · · · , xn + M2 } as a right ideal of R/M2 . Thus it suffices to show that M/M2 is a principal right ideal of R/M2 . Since every left R-module with two generators is a direct sum of cyclic modules, we conclude that every left R/M2 -module with two generators is also a direct sum of cyclic modules. Therefore, without loss of generality we can assume that M2 = (0). It follows that soc(R R) = soc(RR ) = M. Since R M is finitely generated, R M = Ry1 ⊕ . . . ⊕ Ryt such that t ≥ 2 and each Ryi is a minimal left ideal of R. We claim that MR = xR, for if not, then we can assume that MR = ⊕i∈I xi R where |I| ≥ 2 and each xi R is a minimal right ideal of R. We can assume that {1, 2} ⊆ I and so 0 6= x1 , x2 ∈ M and x1 R ∩ x2 R = (0). Now by Lemma 2.1, the left R-module (R ⊕ R)/R(x1 , x2 ) is not a direct sum of cyclic modules, a contradiction. Thus M is principal as a right ideal of R.  A ring whose lattice of left ideals is linearly ordered under inclusion, is called a left uniserial ring. A uniserial ring is a ring which is both left and right uniserial. Note that left and right uniserial rings are in particular local rings and commutative uniserial rings are also known as valuation rings. Next, we need the following lemma from [18]. Lemma 2.5. (See Nicholson and Sánchez-Campos [18, Theorem 9]) For any ring R, the following statements are equivalent: (1) R is local, J(R) = Rx for some x ∈ R and xk = 0 for some k ∈ N. (2) There exist x ∈ R and k ∈ N such that xk−1 6= 0 and R ⊃ Rx ⊃ . . . ⊃ Rxk = (0) are the only left ideals of R. 4 (3) R is left uniserial of finite composition length. Theorem 2.6. Let (R, M) be a local ring such that R M and MR are finitely generated and Mk = (0) for some k ∈ N. If every left R-module with two generators is a direct sum of cyclic modules, then either R is a left Artinian principal left ideal ring or R is a right Artinian principal right ideal ring. Proof. Assume that every left R-module with two generators is a direct sum of cyclic modules. Then by Theorem 2.4, either M is a principal left ideal or M is a principal right ideal. If M is a principal left ideal, then by Lemma 2.5, R is a left Artinian principal left ideal ring. Thus we can assume that M is a principal right ideal. Then by using Lemma 2.5 to the right side, R is a right Artinian principal right ideal ring.  Next, we need the following lemma from Mohamed H. Fahmy-Susan Fahmy[9]. We note that their definition of a local ring is slightly different than ours; they defined a local ring (resp. scalar local ring) as a ring R such that it contains a unique maximal ideal M and R/M is an Artinian ring (resp. division ring). Thus our definition of a local ring and the scalar local ring coincide. Lemma 2.7. (See [9, Theorem 3.2] Let (R, M) be non-Artinian Noetherian local ring. Then the following conditions are equivalent: (1) (2) (3) (4) M is principal as a right ideal. M is principal as a left ideal. Every two-sided ideal of R is principal as a left ideal. Every two-sided ideal of R is principal as a right ideal. Moreover, R is a prime ring. Now we are in a position to prove the main theorem of this section. Theorem 2.8. Let (R, M) be a Noetherian local ring. If every left R-module with two generators is a direct sum of cyclic modules, then one of the following holds: (a) R is an Artinian principal left ideal ring. (b) R is an Artinian principal right ideal ring. (c) R is a prime ring and every two-sided ideal of R is principal as both left and right ideals. Proof. First we assume that R is an Artinian ring. Thus by Theorem 2.6, either R is an Artinian principal left ideal ring or R is an Artinian principal right ideal ring. Now we assume that R is not an Artinian ring. By Theorem 2.4, either M is a principal left ideal or M is a principal right ideal. Thus by Lemma 2.7, R is a 5 prime ring and every two-sided ideal of R is principal as both left and right ideals.  4. A Partial Solution of Kaplansky’s Problem on Duo-Rings A ring R is said to be left (resp. right) hereditary if every left (resp. right) ideal of R is projective as a left (resp. right) R-module. If R is both left and right hereditary, we say that R is hereditary. Recall that a PID is a domain R in which any left and any right ideal of R is principal. Clearly, any PID is hereditary. Let R be an hereditary prime ring with quotient ring Q and A be a left Rmodule. Following Levy [17], we say that a ∈ A is a torsion element if there is a regular element r ∈ R such that ra = 0. Since, by Goldie’s theorem, R satisfies the Ore condition, the set of torsion elements of A is a submodule t(A) ⊆ A. A/t(A) is evidently torsion free (has no torsion elements). Lemma 3.1. (Eisenbud-Robson [6, Theorem 2.1]) Let R be an hereditary Noetherian prime ring, and let A be a finitely generated left R-module. Then A/t(A) is projective and A ∼ = t(A) ⊕ A/t(A). A Dedekind prime ring [20] is an hereditary Noetherian prime ring with no proper idempotent two-sided ideals (see [7]). Clearly if a duo-ring R is a PID, then R is a Dedekind prime ring. Lemma 3.2. (Eisenbud-Robson [6, Theorem 3.11]) Let R be a Dedekind prime ring. Then every finitely generated torsion left R-module A is a direct sum of cyclic modules. Lemma 3.3. (Eisenbud-Robson [6, Theorem 2.4]) Let R be a Dedekind prime ring, and let A be a projective left R-module. Then: (i) If A is finitely generated, then A ∼ = F ⊕ I where F is a finitely generated free module and I is a left ideal of R. (ii) If A is not finitely generated, then A is free. Proposition 3.4. Let R be a Dedekind prime ring. If R is a left principal ideal ring, then R is a left FGC-ring. Proof. Suppose that A is a finitely generated left R-module. Since R is a Dedekind prime ring, R is Noetherian and so A is also a Noetherian left R-module. Thus by Lemma 3.1, A/t(A) is projective and A ∼ = t(A) ⊕ A/t(A). By Lemma 3.2, t(A) is a direct sum of cyclic modules. Also by Lemma 3.3, A/t(A) ∼ = F ⊕ I where F is a free module and I is a left ideal of R. Since R is a principal left ideal ring, I is a cyclic left R-module, i.e., A/t(A) is a direct sum of cyclic modules. Thus, A ∼ = t(A) ⊕ A/t(A) is a direct sum of cyclic modules. Therefore, R is a left FGC-ring.  6 The following proposition is an answer to the question: “What is the class of FGC Noetherian prime duo-rings?” Proposition 3.5. (See also Jacobson [11, Page 44, Theorems 18 and 19]) Let R be a Noetherian prime duo-ring (i.e., R is a Noetherian duo-domain). Then the following statements are equivalents: (1) R is an FGC-ring. (2) R is a left FGC-ring. (3) R is a principal ideal ring. The same characterizations also apply for right R-modules. Proof. (1) ⇒ (2) is clear. (2) ⇒ (3). Suppose that I is an ideal of R. Since I is a direct sum of principal ideals of R and R is a domain, we conclude that I is principal. Thus, R is a principle ideal ring. (3) ⇒ (1) is by Proposition 3.4.  A left (resp., right) Köthe ring is a ring R such that each left (resp., right) R-module is a direct sum of cyclic submodules. A ring R is called a Köthe ring if it is a both left and right Köthe ring. In [16] Köthe proved that an Artinian principal ideal ring is a Köthe ring. Furthermore, a commutative ring R is a Köthe ring if and only if R is an Artinian principal ideal ring (see Cohen and Kaplansky [5]). The corresponding problem in the non-commutative case is still open (see [21, Appendix B, Problem 2.48] or Jain-Srivastava [12, Page 40, Problem 1]. Recently, a generalization of the Köthe-Cohen-Kaplansky theorem is given in [1]. In fact: in [1, Corollary 3.3.], it is shown that if R is a ring in which all idempotents are central, then R is a Köthe ring if and only if R is an Artinian principal ideal ring. Next, the following theorem is an answer to the question: “What is the class of FGC Noetherian local duo-rings?” Theorem 3.6. Let (R, M) be a Noetherian local duo-ring. Then the following statements are equivalent: (1) (2) (3) (4) (5) R is an FGC-ring. R is a left FGC-ring. Every left R-module with two generators is a direct sum of cyclic modules. Either R is an Artinian principal ideal ring or R is a principal ideal domain. R is a principal ideal ring. The same characterizations also apply for right R-modules. Proof. (1) ⇒ (2) ⇒ (3) is clear. 7 (3) ⇒ (4). Suppose that every left R-module with two generators is a direct sum of cyclic modules. Thus by Theorem 2.4, M is principal as both left and right ideals. If R is Artinian, then by Theorem 2.6, R is an Artinian principal ideal ring. If R is not Artinian, then by Lemma 2.7, R is a principal ideal domain. (4) ⇒ (1). If R is an Artinian principal ideal ring, then by the Köthe result, each left, and each right R-module is a direct sum of cyclic modules. Thus R is an FGCring. Now assume that R is a principal ideal domain. Then by Proposition 3.5, R is an FGC-ring. (4) ⇒ (5) is clear. (5) ⇒ (4). Assume that R is a principal ideal ring. Then M is principal as both left and right ideals. If R is Artinian, then Lemma 2.5, R is an Artinian principal ideal ring. If R is not Artinian, then by Lemma 2.7, R is a principal ideal domain.  Let R = Πni=1 Ri be a finite product of rings Ri . Clearly R is a principal ideal ring if and only if each Ri is a principal ideal ring. On the other hand if R is a left FGC-ring, then each Ri is also a left FGC-ring. Thus as a corollary of Proposition 3.5 and 3.6, we have the following result. Corollary 3.7. Let R = Πni=1 Ri be a finite product of Noetherian duo-rings Ri such that each Ri is a domain or a local ring. Then the following statements are equivalent: (1) R is an FGC-ring. (2) R is a left FGC-ring. (3) R is a principal ideal ring. The same characterizations also apply for right R-modules. Next, we need the following lemma from [10] about Artinian duo-rings (its proof is worthwhile even in the commutative case (see [10, Corollary 4] or [15, Lemma 4.2]) Lemma 3.8. Let R be an Artinian duo-ring. Then R is a finite direct product of Artinian local duo rings. Next, we give the following characterizations of an Artinian FGC duo-ring. In fact, on Artinian duo-rings, the notions “FGC” and “Köthe” coincide. Theorem 3.9. Let R be an Artinian Duo-ring. Then the following statements are equivalent: (1) R is a left FGC-ring (2) R is an FGC-ring (3) Every left R-module with two generators is a direct sum of cyclic modules. 8 (4) R is a left Köthe-ring (5) R is a Köthe-ring (6) R is a principal ideal ring. The same characterizations also apply for right R-modules. Proof. Since R is an Artinian duo-ring, by Lemma 3.8, R = Πni=1 Ri such that each Ri is an Artinian local duo-ring. Thus by the Köthe result and Corollary 3.7, the proof is complete.  References [1] M. Behboodi, A. Ghorbani, A. Moradzadeh-Dehkordi and S. H. Shojaee, On left Köthe rings and a generalization of the Köthe-Cohen-Kaplansky theorem, Proc. Amer. Math. Soc. (to appear). [2] W. Brandal, Commutative Rings Whose Finitely Generated Modules decompose, Lecture Notes in Mathematics, Vol. 723 (Springer, 1979). [3] W. Brandal, Almost maximal integral domains and finitely generated modules. Trans. Amer. Math. Soc. 183 (1973), 203-222. [4] W. Brandal and R. Wiegand, Reduced rings whose finitely generated modules decompose. Comm. Algebra 6(2) (1978), 195-201. [5] I. S. Cohen and I. Kaplansky, Rings for which every module is a direct sum of cyclic modules, Math. Z. 54 (1951), 97-101. [6] D. Eisenbud and J. C. Robson, Modules over Dedekind prime rings, J. Algebra 16 (1970), 67-85. [7] D. Eisenbud and J. C. Robson, Hereditary Noetherian prime rings, J. Algebra 16 (1970), 86-104. [8] A. Facchini, On the structure of torch rings. Rocky Mountain J. Math. 13(3) (1983), 423-428. [9] M. H. Fahmy and S. Fahmy, On non-commutative noetherian local rings, noncommutative geometry and particle physics, Chaos, Solitons and Fractals 14 (2002), 1353-1359. [10] J. M. Habeb, A note on zero commutative and duo rings, Math. J. Okayama Univ 32 (1990), 73-76. [11] N. Jacobson, The Theorey of Rings, Amerian Mathematical Society Mathematical Syrveys, vol. I, American Mathematical Society, New York, 1943. 9 [12] S. K. Jain and Ashish K. Srivastava, Rings by their cyclic modules and right ideals: A http://euler.slu.edu/∼srivastava/articles.html). characterized survey-I.(See [13] I. Kaplansky, Elementary divisors and modules. Trans. Amer. Math. Soc. 66, (1949). 464-491. [14] I. Kaplansky, Modules over Dedekind rings and valuation rings. Trans. Amer. Math. Soc. 72 (1952), 327-340. [15] N. S. Karamzadeh and O. A. S. Karamzadeh, On artinian modules over Duo rings, Comm. Algebra 38 (2010), 3521-3531. [16] G. Köthe, Verallgemeinerte abelsche gruppen mit hyperkomplexem operatorenring, Math. Z. 39 (1935), 31-44. [17] L. Levy, Torsion-Free and divisible modules over non-integral domains, Canad. J. Math. 15 (1963), 132-151. [18] W. K. Nicholson and E. Sánchez-Campos, Rings with the dual of the isomorphism theorem, J. Algebra 271(1) (2004), 391-406. [19] R. S. Pierce, Modules over commutative regular rings. Mem. Amer. Math. Soc. 70 (1967). [20] J. C. Robson, Non-commutative Dedekind rings, J. Algebra 9 (1968), 249-265. [21] L. Sabinin, L. Sbitneva and I. Shestakov, Non-associative algebra and its applications, Lecture Notes in Pure and Applied Mathematics 246. Chapman and Hall/CRC 2006. [22] T. S. Shores and R. Wiegand, Rings whose finitely generated modules are direct sums of cyclics. J. Algebra 32 (1974), 152-172. [23] P. Vámos, The decomposition of finitely generated modules and fractionally self-injective rings. J. London Math. Soc. 16 (1977), 209-220. [24] R. Wiegand and S. Wiegand, Commutative rings whose finitely generated modules are direct sums of cyclics. Abelian group theory (Proc. Second New Mexico State Univ. Conf., Las Cruces, N.M., 1976), pp. 406423. Lecture Notes in Math., Vol. 616, Springer, Berlin, 1977. 10
0math.AC
Non-Malleable Codes for Small-Depth Circuits Marshall Ball∗ Dana Dachman-Soled † Siyao Guo‡ Tal Malkin§ Li-Yang Tan¶ arXiv:1802.07673v1 [cs.CC] 21 Feb 2018 February 22, 2018 Abstract We construct efficient, unconditional non-malleable codes that are secure against tampering functions computed by small-depth circuits. For constant-depth circuits of polynomial size (i.e. AC0 tampering functions), our codes have codeword length n = k 1+o(1) for a k-bit message. This is an exponential improvement of the previous√best construction due to Chattopadhyay and Li (STOC 2017), which had codeword length 2O( k) . Our construction remains efficient for circuit depths as large as Θ(log(n)/ log log(n)) (indeed, our codeword length remains n ≤ k 1+ε ), and extending our result beyond this would require separating P from NC1 . We obtain our codes via a new efficient non-malleable reduction from small-depth tampering to split-state tampering. A novel aspect of our work is the incorporation of techniques from unconditional derandomization into the framework of non-malleable reductions. In particular, a key ingredient in our analysis is a recent pseudorandom switching lemma of Trevisan and Xue (CCC 2013), a derandomization of the influential switching lemma from circuit complexity; the randomness-efficiency of this switching lemma translates into the rate-efficiency of our codes via our non-malleable reduction. ∗ [email protected], Columbia University. Supported in part by the Defense Advanced Research Project Agency (DARPA) and Army Research Office (ARO) under Contract W911NF-15-C-0236, NSF grants CNS1445424 and CCF-1423306, ISF grant no. 1790/13, the Leona M. & Harry B. Helmsley Charitable Trust, and the Check Point Institute for Information Security. Part of this research was done while visiting the FACT Center at IDC Herzliya. Any opinions, findings and conclusions or recommendations expressed are those of the authors and do not necessarily reflect the views of the Defense Advanced Research Projects Agency, Army Research Office, the National Science Foundation, or the U.S. Government. † [email protected], University of Maryland. Supported in part by an NSF CAREER Award #CNS-1453045, by a research partnership award from Cisco and by financial assistance award 70NANB15H328 from the U.S. Department of Commerce, National Institute of Standards and Technology. ‡ [email protected], Northeastern University. Supported by NSF grants CNS1314722 and CNS-1413964 § [email protected], Columbia University. Supported in part by the Defense Advanced Research Project Agency (DARPA) and Army Research Office (ARO) under Contract W911NF-15-C-0236, NSF grants CNS1445424 and CCF-1423306, and the Leona M. & Harry B. Helmsley Charitable Trust. ¶ [email protected], Toyota Technological Institute. Supported by NSF grant CCF 1563122. 1 Introduction Non-malleable codes were introduced in the seminal work of Dziembowski, Pietrzak, and Wichs as a natural generalization of error correcting codes [DPW10, DPW18]. Non-malleability against a class T is defined via the following “tampering” experiment: Let t ∈ T denote an “adversarial channel,” i.e. the channel modifies the transmitted bits via the application of t. 1. Encode message m using a (public) randomized encoding algorithm: c ← E(m), 2. Tamper the codeword: c̃ = t(c), 3. Decode the tampered codeword (with public decoder): m̃ = D(c̃). Roughly, the encoding scheme, (E, D), is non-malleable against a class T , if for any t ∈ T the result of the above experiment, m̃, is either identical to the original message, or completely unrelated. More precisely, the outcome of a t-tampering experiment should be simulatable without knowledge of the message m (using a special flag “same” to capture the case of unchanged message). In contrast to error correcting codes, the original message m is only guaranteed to be recovered if no tampering occurs. On the other hand, non-malleability can be achieved against a much wider variety of adversarial channels than those that support error detection/correction. As an example, a channel implementing a constant function (overwriting the codeword with some fixed codeword) is impossible to error correct (or even detect) over, but is non-malleable with respect to any encoding scheme. Any construction of non-malleable codes must make some restriction on the adversarial channel, or else the channel that decodes, modifies the message to a related one, and re-encodes, will break the non-malleability requirement. Using the probabilistic method, non-malleable codes have been αn shown to exist against any class of functions that is not too large (|T | ≤ 22 for α < 1) [DPW10, CG16]. (Here, and throughout the paper, we use k to denote the length of the message, and n to denote the length of the codeword.) A large body of work has been dedicated to the explicit construction of codes for a variety of tampering classes: for example, functions that tamper each half (or smaller portions) of the codeword arbitrarily but independently [DKO13, CG16, CZ14, ADL14, Agg15, Li17, Li18], and tampering by flipping bits and permuting the result [AGM+ 15]. In this paper, we extend a recent line of work that focuses on explicit constructions of nonmalleable codes that are secure against adversaries whose computational strength correspond to well-studied complexity-theoretic classes. Since non-malleable codes for a tampering class T yields lower bounds against T (see Remark 2), a broad goal in this line of work is to construct efficient non-malleable codes whose security (in terms of computational strength of the adversary) matches the current state of the art in computational lower bounds.1 Prior work on complexity-theoretic tampering classes. In [BDKM16], Ball et al. constructed efficient non-malleable codes against the class of ℓ-local functions, where each output bit is a function of ℓ input bits, and ℓ can be as large as Ω(n1−ε ) for constant ε > 0.2 This class can be thought of as NC (circuits of fan-in 2) of almost logarithmic depth, < (1 − ε) log n, and in particular, contains NC0 . In [CL17], Chattopadhyay and Li, using new constructions of non-malleable 1 In this paper we focus on constructing explicit, unconditional codes; see Section 1.3 for a discussion on a different line of work on conditional constructions in various models: access to common reference strings, random oracles, or under cryptographic/computational assumptions. 2 They give constructions even for o(n/ log n)-local tampering, but the code rate is inversely proportional to locality, so the codes become inefficient for this locality. 1 extractors, gave explicit constructions of non-malleable codes against AC0 and affine tampering functions. These are the first constructions of information-theoretic non-malleable codes in the standard model where each tampered bit may depend on all the √ input bits. However, their con0 struction for AC circuits has exponentially small rate Ω(k/2 k ) (equivalently, codeword length √ O( k) 2 for a k-bit message), yielding an encoding procedure that is not efficient. 1.1 This work: Efficient non-malleable codes for small-depth circuits In this work, we address the main open problem from [CL17]: we give the first explicit construction of non-malleable codes for small-depth circuits achieving polynomial rate: Theorem 1 (Non-malleable codes for small-depth circuits; informal version). For any δ ∈ (0, 1), there is a constant c ∈ (0, 1) such that there is an explicit and efficient non-malleable code that is unconditionally secure against polynomial-size unbounded fan-in circuits of depth c log(n)/ log log(n) with codeword length n = k 1+δ for a k-bit message and negligible error. Extending Theorem 1 to circuits of depth ω(log(n)/ log log(n)) would require separating P from see Remark 2. Therefore, in this respect the parameters that we achieve in Theorem 1 bring the security of our codes (in terms of computational strength of the adversary) into alignment with the current state of the art in circuit lower bounds.3 For the special case of AC0 circuits, our techniques lead to a non-malleable code with subpolynomial rate (indeed, we achieve this for all depths o(log(n)/ log log(n))): NC1 ; Theorem 2 (Non-malleable codes for AC0 circuits; informal version). There is an explicit and efficient non-malleable code that is unconditionally secure against AC0 circuits with codeword length n = k1+o(1) for a k-bit message and negligible error. Prior to our work, there were no known constructions of polynomial-rate non-malleable codes even for depth-2 circuits (i.e. polynomial-size DNF and CNF formulas). We describe our proof and the new ideas underlying it in Section 1.2. At a high level, we proceed by designing a new efficient non-malleable reduction from small-depth tampering to splitstate tampering. Our main theorem thus follows by combining this non-malleable reduction with the best known construction of split-state non-malleable codes [Li18]. The flurry of work on non-malleable codes has yielded many surprising connections to other areas of theoretical computer science, including additive combinatorics [ADKO15], two-source extractors [Li12, Li13, CZ16], and non-malleable encryption/commitment [CMTV15, CDTV16, GPR16]. As we discuss in Section 1.2, our work establishes yet another connection—to techniques in unconditional derandomization. While we focus exclusively on small-depth adversaries in this work, we are optimistic that the techniques we develop will lead to further work on non-malleable codes against other complexity-theoretic tampering classes (see Remark 3 for a discussion on the possible applicability of our techniques to other classes). Remark 1 (On the efficiency of non-malleable codes). A few previous works on non-malleable codes use a non-standard definition of efficiency, only requiring encoding/decoding to take time that is polynomial in the length of the codeword (namely, the output of the encoding algorithm), thus allowing a codeword and computational complexity that is super-polynomial in the message length. In contrast, we use the standard definition of efficiency—running time that is polynomial 3 Although [CL17] state their results in terms of AC0 circuits, an inspection of their proof shows that their construction also extends to handle circuits of depth as large as Θ(log(n)/ log log(n)). However, for such circuits their codeword length becomes 2O(k/ log(k)) . 2 in the length of the input. While the non-standard definition is appropriate in some settings, we argue that the standard definition is the right one in the context of non-malleable codes. Indeed, many error-correcting codes in the literature fall under the category of block codes—codes that act on a block of k bits of input data to produce n bits of output data, where n is known as the block size. To encode messages m with length greater than k, m is split into blocks of length k and the error-correcting code is applied to each block at a time, yielding a code of rate k/n. For block codes, the block size n can be fixed first and then k can be set as a function of n. A non-malleable code, however, cannot be a block code: If m is encoded block-by-block, the tampering function can simply “destroy” some blocks while leaving the other blocks untouched, thus breaking nonmalleability. Instead, non-malleable codes take the entire message m as input and encodes it in a single shot. So in the non-malleable codes setting, we must assume that k is fixed first and that n is set as a function of k. Thus, in order to obtain efficient codes, the parameters of the code must be polynomial in terms of k. Remark 2 (On the limits of extending our result). Because any function in NC1 can be computed by a polynomial-size unbounded fan-in circuit of depth O(log(n)/ log log(n)) (see e.g. [KPPY84, Val83]), any non-trivial non-malleable code for larger depth circuits would yield a separation of NC1 from P. Here, we take non-trivial to mean that error is bounded away from 1 and encoding/decoding run in time polynomial in the codeword length (namely, even an inefficient code, as per the discussion above, can be non-trivial). This follows from the fact (noted in many previous works) that any explicit, non-trivial code is vulnerable to the simple P-tampering attack: decode, flip a bit, reencode. Hence, in this respect Theorem 1 is the limit of what we can hope to establish given the current state of the art in circuit and complexity theory. 1.2 Our Techniques At a high level, we use the non-malleable reduction framework introduced by Aggarwal et al. [ADKO15]. Loosely speaking, an encoding scheme (E, D) non-malleably reduces a “complex” tampering class, F, to a “simpler” tampering class, G, if the tampering experiment (encode, tamper, decode) behaves like the “simple” tampering (for any f ∈ F, D(f (E(·))) ≈ Gf , a distribution over G). [ADKO15] showed that a non-malleable code for the simpler G, when concatenated with an (inner) non-malleable reduction (E, D) from F to G, yields a non-malleable code for the more “complex” F. (See Remark 4 for a comparison of our approach to that of [CL17].) Our main technical lemma is a new non-malleable reduction from small-depth tampering to split-state tampering, where left and right halves of a codeword may be tampered arbitrarily, but independently. We achieve this reduction in two main conceptual steps. We first design a nonmalleable reduction from small-depth tampering to a variant of local tampering that we call leaky local, where the choice of local tampering may depend on leakage from the codeword. This step involves a careful design of pseudorandom restrictions with extractable seeds, which we use in conjunction with the pseudorandom switching lemma of Trevisan and Xue [TX13] to show that small-depth circuits “collapse” to local functions under such restrictions. In the second (and more straightforward) step, we reduce leaky-local tampering to split-state tampering using techniques from [BDKM16]. We now describe both steps in more detail. Small-Depth Circuits to Leaky Local Functions. To highlight some of the new ideas underlying our non-malleable reduction, we first consider the simpler case of reducing w-DNFs (each clause contains at most w literals) to the family of leaky local functions. The reduction for general small-depth circuits will follow from a recursive composition of this reduction. 3 A non-malleable reduction (E, D) reducing DNF-tampering to (leaky) local-tampering needs to satisfy two conditions (i) Pr[D(E(x)) = x] = 1 for any x and, (ii) D ◦ f ◦ E is a distribution over (leaky) local functions for any width-w DNF f . A classic result from circuit complexity, the switching lemma [FSS84, Ajt89, Yao85, Hås86], states that DNFs collapse to local functions under fully random restrictions (“killing” input variables by independently fixing them to a random value with some probability).4 Thus a natural choice of E for satisfying (ii) is to simply sample from the generating distribution of restrictions and embed the message in the surviving variable locations (fixing the rest according to restriction). However, although f ◦E becomes local, it is not at all clear how to decode and fails even (i). To satisfy (i), a naive idea is to simply append the “survivor” location information to the encoding. However, this is now far from a fully random restriction (which requires among other things that the surviving variables are chosen independently of the random values used to fix the killed variables) is no longer guaranteed to “switch” the DNFs to Local functions with overwhelming probability. To overcome these challenges, we employ pseudorandom switching lemmas, usually arising in the context of unconditional derandomization, to relax the stringent properties of the distribution of random restrictions needed for classical switching lemmas. In particular, we invoke a recent pseudorandom switching lemma of Trevisan and Xue [TX13], which reduces DNFs to local functions (with parameters matching those of [Hås86]) while only requiring that randomness specifying survivors and fixed values be σ-wise independent5 . This allows us to avoid problems with independence arising in the naive solution above. Now, we can append a σ-wise independent encoding of the (short) random seed that specifies the surviving variables. This gives us a generating distribution of random restrictions such that (a) DNFs are switched to Local functions, and (b) the seed can be decoded and used to extract the input locations. At this point, we can satisfy (i) easily: D decodes the seed (whose encoding is always in, say, the first m coordinates), then uses the seed to specify the surviving variable locations and extract the original message. In addition to correctness, f ◦ E becomes a distribution over local functions where the distribution only depends on f (not the message). However, composing D with f ◦ E induces dependence on underlying message: tampered encoding of the seed, may depend on the message in the survivor locations. The encoded seed is comparatively small and thus (assuming the restricted DNF collapses to a local function) requires a comparatively small number of bits to be leaked from the message in order to simulate the tampering of the encoded seed. Given a well simulated seed we can accurately specify the local functions that will tamper the input (the restricted DNFs whose output locations coincide with the survivors specified by the tampered seed). This is the intermediate leaky local tampering class we reduce to, which can be described via the following adversarial game: (1) the adversary commits to N local functions, (2) the adversary can select m of the functions to get leakage from, (3) the adversary then selects the actual tampering function to apply from the remaining local functions. To deal with depth d circuits, we recursively apply this restriction-embedding scheme d times. Each recursive application allows us to trade a layer of gates for another (adaptive) round of m bits of leakage in the leaky local game. One can think of the recursively composed simulator as applying the composed random restrictions to collapse the circuit to local functions and then, working inwardly, sampling all the seeds and the corresponding survivor locations until the final survivor locations can be used to specify the local tampering. 4 The switching lemma actually shows that DNFs become small-depth decision trees under random restrictions. However, it is this (straightforward) consequence of the switching lemma that we will use in our reduction. 5 Although this is not stated explicitly in [TX13], as we show, it follows immediately by combining their main lemma with results on bounded independence fooling CNF formulas [Baz09, Raz09]. 4 Leaky Local Functions to Split State. Ball et al. [BDKM16] gave non-malleable codes for local functions via a non-malleable reduction to split state. We make a simple modification to a construction with deterministic decoding from the appendix of the paper to show leaky local functions (the class specified by the above game) can be reduced to split state. Loosely, we can think of the reduction in the following manner. First, the left and right states are given leakage-resilient properties via σL -wise and σR -wise independent encodings. These encodings have the property that any small set (here, a constant fraction of the length of the encoding) of bits will be uniformly distributed, regardless of the message inside. This will allow us, in some sense, to leak bits from the underlying encoding to (a) specify the local tampering functions, and (b) aid in subsequent stages of the reduction. Second, we take the right encoding to be much longer than the left encoding. Because the tampering will be local, this means that the values of the bits on the right used to tamper the left encoding will be uniformly distributed, regardless of the message. This follows from the fact that there aren’t too many such bits relative to the length of the right, given that there significantly fewer output bits on the left and these outputs are each dependent on relatively few bits in general. Third, we embed the left encoding pseudorandomly in a string that is much longer than the right encoding. This means that with overwhelming probability the bits of the left encoding that affect the tampering of the right will be uniformly distributed. (The rest we can take to be uniformly distributed as well.) Note that although here we use a σ-wise independent generator, an unconditional PRG for small space, as is used in [BDKM16], would have worked as well. Finally, we prepend to the embedding itself, the short seed used to generate the embedding, after encoding it in a leakage resilient manner (as above). (This is in fact the only significant difference with construction in [BDKM16].) The presence of the seed allows us to determine the embedding locations in the absence of tampering and simulate the embedding locations in the presence of tampering without violating the leakage-resilient properties of the left and right state encodings. The leakage-resilience of the seeds encoding allows a simulator to sample the seed after leaking bits to specify a local tampering. Remark 3 (On the possible applicability of our techniques to other tampering classes). While we focus exclusively on on small-depth adversaries in this work, we remark that analogous pseudorandom switching lemmas have been developed for many other function classes in the context of unconditional derandomization: various types of formulas and branching programs [IMZ12], low sensitivity functions [HT18], read-once branching programs [RSV13, CHRT18] and CNF formulas [GMR+ 12], sparse F2 formulas [ST18], etc. In addition to being of fundamental interest in complexity theory, these function classes are also natural tampering classes to consider in the context of non-malleable codes, as they capture basic types of computationally-bounded adversaries. We are optimistic that the techniques we develop in this paper—specifically, the connection between pseudorandom switching lemmas and non-malleable reductions, and the new notion of pseudorandom restrictions with extractable seeds—will lead to constructions of efficient non-malleable codes against other tampering classes, and we leave this is an interesting avenue for future work. Remark 4 (Relation to the techniques of [CL17].). Although Chattopadhyay and Li [CL17] also use the switching lemma in their work, our overall approach is essentially orthogonal to theirs. At a high level, [CL17] uses a framework of Cheraghchi and Guruswami [CG16] to derive nonmalleable codes from non-malleable extractors. In this framework, the rate of the code is directly tied to the error of the extractor; roughly speaking, as the parameters of the switching lemma can be at best inverse-quasipolynomial when reducing to local functions, this unfortunately translates (via the [CG16] framework) into codes with at best exponentially small rate (see pg. 10 of [CL17] for a discussion of this issue). Circumventing this limitation therefore necessitates a significantly 5 different approach, and indeed, as discussed above we construct our non-malleable codes without using extractors as an intermediary. (On a more technical level, we remark that [CL17] uses the classic switching lemma of Håstad [Hås86] for fully random restrictions, whereas our work employs a recent extension of this switching lemma to pseudorandom restrictions [TX13].) 1.3 Related Work Non-malleable codes were introduced by Dziembowski, Pietrzak, and Wichs [DPW10, DPW18]. Various subsequent works re-formulated the definition [ADKO15], or considered extensions of the notion [FMNV14, DLSZ15, CGL16, CGM+ 16]. The original work of [DPW10] presented a construction of non-malleable codes against bit-wise tampering, and used the probabilistic method to prove the existence of non-malleable codes against tampering classes F of bounded size (this result gives rise to constructions for the same tampering classes F in the random oracle model). A sequence of works starting from the work of Liu and Lysyanskaya [LL12] presented constructions of non-malleable codes secure against split-state tampering. The original work and some subsequent works [AAG+ 16, KLT16] required an untamperable common reference string (CRS) and/or computational assumptions. Other works removed these restrictions and achieved unconditionally nonmalleable codes against split-state tampering with no CRS [ADL14, ADKO15, Li17, Li18]. Among these works, the construction of Li [Li18] currently achieves the best rate of Ω(log log n/ log n) for two states. Constructions requiring more than two split-states, and which achieve constant rate, were also given in [CZ14, KOS14]. Conditional results on complexity-based tampering. In this paper we work within the standard model and focus on explicit, unconditional non-malleable codes. A variety of non-malleable codes against complexity-based tampering classes have been constructed in other models. These constructions require either common randomness (CRS), access to a public random oracle, and/or computational/cryptographic assumptions. Faust et al. [FMVW14] presented an efficient non-malleable code, in the CRS model, against tampering function families F of bounded size, improving upon the original work of [DPW10]. Since the size of the CRS grows with the size of the function family, this approach cannot be used to obtain efficient constructions of non-malleable codes against tampering classes that contain circuits of unbounded polynomial size (e.g., AC0 circuits). Cheraghchi and Guruswami [CG16] in an independent work showed the existence of unconditionally secure non-malleable codes (with no CRS) against tampering families F of bounded size via a randomized construction. However their construction is inefficient for negligible error (and also does not apply to AC0 due to the requirement of bounded size). Faust et al. [FHMV17] gave constructions of (a weaker notion of) non-malleable codes against space-bounded tampering in the random oracle model. In very recent work, Ball et al. [BDKM17] presented a general framework for converting averagecase bounds for a class C into efficient non-malleable codes against the same class C in the CRS model and under cryptographic assumptions. Among several applications of their framework, they give a construction of non-malleable codes against AC0 tampering circuits in the CRS model under these assumptions (in fact, circuits of depth up to Θ(log(n)/ log log(n)), like in our work). In contrast, our constructions are unconditional. 6 2 Preliminaries 2.1 Basic Notation For a positive integer n, let [n] to denote {1, . . . , n}. For x = (x1 , . . . , xn ) ∈ {0, 1}n , kxk0 denotes the number of 1’s in x. For i ≤ j ∈ [n], we define xi:j := (xi , . . . , xj ). For a set S ⊆ [n], xS denotes the projection of x to S. For S ∈ [n]m , xS := (xS1 , . . . , xSm ). For x, y ∈ {0, 1}n , if they disagree on at least ε · n indices, we say they are ε-far, otherwise, they are ε-close to each other. For a set Σ, we use ΣΣ to denote the set of all functions from Σ to Σ. Given a distribution D, z ← D denotes sample z accordingPto D. For two distributions D1 , D2 over Σ, their statistical distance is defined as ∆(D1 , D2 ) := 12 z∈Σ |D1 (z) − D2 (z)|. We say g(n) = Õ(f (n)) if g(n) = O(nε f (n)) for all ε > 0. 2.2 Non-malleable Reductions and Codes Definition 1 (Coding Scheme). [DPW10] A Coding scheme, (E, D), consists of a randomized encoding function E : {0, 1}k 7→ {0, 1}n and a decoding function D : {0, 1}n 7→ {0, 1}k ∪ {⊥} such that ∀x ∈ {0, 1}k , Pr[D(E(x)) = x] = 1 (over randomness of E). Non-malleable codes were first defined in [DPW10]. Here we use a simpler, but equivalent, definition based on the following notion of non-malleable reduction by Aggarwal et al. [ADKO15]. Definition 2 (Non-Malleable Reduction). [ADKO15] Let F ⊂ AA and G ⊂ B B be some classes of functions. We say F reduces to G, (F ⇒ G, ε), if there exists an efficient (randomized) encoding function E : B → A, and an efficient decoding function D : A → B, such that (a) ∀x ∈ B, Pr[D(E(x)) = x] = 1 (over the randomness of E). (b) ∀f ∈ F, ∃G s.t. ∀x ∈ B, ∆(D(f (E(x))); G(x)) ≤ ε, where G is a distribution over G and G(x) denotes the distribution g(x), where g ← G. If the above holds, then (E, D) is an (F, G, ε)-non-malleable reduction. Definition 3 (Non-Malleable Code). [ADKO15] Let NMk denote the set of trivial manipulation functions on k-bit strings, consisting of the identity function id(x) = x and all constant functions fc (x) = c, where c ∈ {0, 1}k . A coding scheme (E, D) defines an (Fn(k) , k, ε)-non-malleable code, if it defines an (Fn(k) , NMk , ε)non-malleable reduction. Moreover, the rate of such a code is taken to be k/n(k). The following useful theorem allows us to compose non-malleable reductions. Theorem 3 (Composition). [ADKO15] If (F ⇒ G, ε1 ) and (G ⇒ H, ε2 ), then (F ⇒ H, ε1 + ε2 ). 2.3 2.3.1 Tampering Function Families Split-State and Local Functions Definition 4 (Split-State Model). [DPW10] The split-state model, SSk , denotes the set of all functions: {f = (f1 , f2 ) : f (x) = (f1 (x1:k ) ∈ {0, 1}k , f2 (xk+1:2k ) ∈ {0, 1}k ) for x ∈ {0, 1}2k }. 7 Theorem 4 (Split-State NMC). [Li18] For any n ∈ N, there exists an explicit, efficient nonmalleable code in the 2-split-state model (SSn ) with rate k/n = Ω(log log n/ log n) and error 2−Ω(k) Definition 5 (Local Functions). Let f : {0, 1}n → {0, 1}m be a function. We say output j of f depends on input i if there exists x, x′ ∈ {0, 1}n that differ only in the ith coordinate such that f (x)j 6= f (x′ )j . We say f is ℓ-local or in the class Localℓ , if every output bit fj depends on at most ℓ input bits. 2.3.2 Small-Depth Circuits and Decision Trees Let ACd (S) denote alternating depth d circuits of size at most S with unbounded fan-in. Let w-ACd (S) denote alternating depth d circuits of size at most S with fan-in at most w at the first level and unbounded fan-in elsewhere. For depth 2 circuits, a DNF is an OR of ANDs (terms) and a CNF is an AND or ORs (clauses). The width of a DNF (respectively, CNF) is the maximum number of variables that occur in any of its terms (respectively, clauses). We use w-DNF to denote the set of DNFs with width at most w. Let DT(t) denote decision trees with depth at most t. We say that a multiple output function f = (f1 , . . . , fm ) is in C if fi ∈ C for any i ∈ [m]. 2.3.3 Leaky Function Families Given an arbitrary class of tampering functions, we consider a variant of the class of tampering functions which may depend in some limited way on limited leakage from the underlying code word. Definition 6 (Leaky Function Families). Let LLi,m,N [C] denote tampering functions generated via the following game: 1. The adversary first commits to N functions from a class C, F1 , . . . , FN = F . (Note: Fj : {0, 1}N → {0, 1} for all j ∈ [N ].) 2. The adversary then has i-adaptive rounds of leakage. In each round j ∈ [i], • the adversary selects s indices from [N ], denoted Sj , • the adversary receives F (x)Sj . Formally, we take hj : {0, 1}m(j−1) → [N ]m to be the selection function such that hj (F (X)S1 , . . . , F (X)Sj−1 ) = Sj . Let h1 be the constant function that outputs S1 . 3. Finally, selects a sequence of n functions (Ft1 , . . . , Ftn ) (T = {t1 , . . . , tn } ⊆ [N ] such that t1 < t2 < · · · < tn ) to tamper with. Formally, we take h : {0, 1}mi → [N ]n such that h(F (X)S1 , . . . , F (X)Si ) = T . Thus, any τ ∈ LLi,m,N [C] can be described via (F , h1 , · · · , hi , h). In particular, we take τ = Eval(F , h1 , · · · , hi , h) to denote the function whose output given input X is T (X), where T is, in turn, outputted by the above game given input X and adversarial strategy (F , h1 , · · · , hi , h). 8 2.4 2.4.1 Pseudorandom Ingredients A Binary Reconstructible Probabilistic Encoding Scheme Reconstructable Probabilistic Encoding (RPE) schemes were first introduced by Choi et al. [CDMW08, CDMW16]. Informally, RPE is a combination of error correcting code and secret sharing, in particular, it is an error correcting code with an additional secrecy property and reconstruction property. Definition 7 (Binary Reconstructable Probabilistic Encoding). [CDMW08, CDMW16] We say a triple (E, D, R) is a binary reconstructable probabilistic encoding scheme with parameters (k, n, cerr , csec ), where k, n ∈ N, 0 ≤ cerr , csec < 1, if it satisfies the following properties: 1. Error correction. E : {0, 1}k → {0, 1}n is an efficient probabilistic procedure, which maps a message x ∈ {0, 1}k to a distribution over {0, 1}n . If we let C denote the support of E, any two strings in C are 2cerr -far. Moreover, D is an efficient procedure that given any w′ ∈ {0, 1}n that is ε-close to some string w in C for any ε ≤ cerr , outputs w along with a consistent x. 2. Secrecy of partial views. For all x ∈ {0, 1}k and any non-empty set S ⊂ [n] of size ≤ ⌊csec · n⌋, E(x)S is identically distributed to the uniform distribution over {0, 1}|S| . 3. Reconstruction from partial views. R is an efficient procedure that given any set S ⊂ [n] of size ≤ ⌊csec · n⌋, any ĉ ∈ {0, 1}n , and any x ∈ {0, 1}k , samples from the distribution E(x) with the constraint E(x)S = ĉS . Lemma 1. [CDMW08, CDMW16] For any k ∈ N, there exist constants 0 < crate , cerr , csec < 1 such that there is a binary RPE scheme with parameters (k, crate k, cerr , csec ). To achieve longer encoding lengths n, with the same cerr , csec parameters, one can simply pad the message to an appropriate length. RPE was been used in Ball et al.[BDKM16] for building non-malleable reductions from local functions to split state functions. However, for all reductions in our paper, error correction property is not necessary (RPE cerr = 0 is adequate). In addition, we observe that RPEs with parameters (k, n, 0, csec ) are implied by any linear error correcting code with parameters (k, n, d) where k is the message length, n is the codeword length, d := csec · n + 1 is the minimal distance. Lemma 2. Suppose there exists a binary linear error correcting code with parameters (k, n, d), then there is a binary RPE scheme with parameters (k, n, 0, (d − 1)/n). Proof. For a linear error correcting code with (k, n, d), let A denote its encoding matrix, H denote its parity check matrix. Let B be a matrix so that BA = I where I is the k × k identity matrix (such B exists because A has rank k and can be found efficiently). By property of parity check matrix, HA = 0 and Hs 6= 0 for any 0 < ||s||0 < d where 0 is the (n − k) × k all 0 matrix. We define (E, D, R) as follows: for x ∈ {0, 1}k and randomness r ∈ {0, 1}n−k , E(x; r) := T B x + H T r, for c ∈ {0, 1}n ; D(c) := AT c; given S ⊂ [n] of size ≤ d − 1 , ĉ ∈ {0, 1}n , x ∈ {0, 1}k , R samples r uniformly from the set of solutions to (H T r)S = (ĉ − B T x)S then outputs E(x; r). (E, D) is an encoding scheme because D ◦ E = AT B T = I T = I. For secrecy property, note that for any non-empty S ⊆ [n] of size at most d − 1, (Hr)S is distributed uniformly over {0, 1}|S| , because for any a ∈ {0, 1}|S| , 1 + (−1)(H Pr[(H r)S = a] = E[Πi∈S r 2 T T r) +a i i ] = 2−|S| X S ′ ⊆S 9 E[Πi∈S ′ (−1)(H T r) +a i i ] = 2−|S| , P where the last equality is because the only surviving term is S ′ = ∅ and for other S ′ , i∈S ′ HiT 6= T 0 so E[Πi∈S ′ (−1)(H r)i ] = 0. It implies E(x)S is also distributed uniformly over {0, 1}S . By definition, R satisfies reconstruction property. Hence (E, D, R) is a binary RPE with parameters (k, n, 0, (d − 1)/n). 2.4.2 A Simple σ-wise Independent Generator Definition 8 (Bounded-independent Generator). We say a distribution D over {0, 1}n is σ-wise independent if for any S ⊆ [n] of size at most σ, DS distributes identically to the uniform distribution over {0, 1}|S| . We say function G : {0, 1}s → {0, 1}n is a σ-wise independent generator if G(ζ) is σ-wise independent where ζ is uniformly distributed over {0, 1}s . The simple Carter-Wegman hashing construction based on random polynomials suffices for our purposes. Lemma 3. [WC81] There exists an (explicit) σ-wise independent generator: G : {0, 1}(σ+1) log n → {0, 1}n , computable in time Õ(σn). Moreover, G : {0, 1}(σ+1)m → {0, 1}n can be constructed such that for an subset S ⊆ [n] of size σ, G(ζ)S ≡ X1 , . . . , Xσ (for uniformly chosen ζ) where (1) Xi ’s are independent Bernoullis with Pr[Xi = 1] = q/d for q ∈ {0, . . . , d}, and (2) m = max{log n, log d}. Let Gσ,p denote a σ-wise independent Carter-Wegman generator with bias p, and Gσ such a generator with p = 1/2 The following useful theorem gives Chernoff-type concentration bounds for σ-wise independent distributions. Theorem 5 ([SSS95]). If X is a sum of σ-wise independent random indicator variables with µ = E[X], then ∀ε : 0 < ε ≤ 1, σ ≤ ε2 µe−1/3 , Pr[|X − µ| > εµ] < exp(−⌊σ/2⌋). 2.4.3 The Pseudorandom Switching Lemma of Trevisan and Xue Definition 9. Fix p ∈ (0, 1). A string s ∈ {0, 1}n×log(1/p) encodes a subset L(s) ⊆ [n] as follows: for each i ∈ [n], i ∈ L(s) ⇐⇒ si,1 = · · · = si,log(1/p) = 1. Definition 10. Let D be a distribution over {0, 1}n log(1/p) × {0, 1}n . This distribution defines a distribution R(D) over restrictions {0, 1, ∗}n , where a draw ρ ← R(D) is sampled as follows: 1. Sample (s, y) ← R(D), where s ∈ {0, 1}n log(1/p) , y ∈ {0, 1}n . 2. Output ρ where ρi :=  yi if i ∈ / L(s) ∗ otherwise Theorem 6 (Polylogarithmic independence fools CNF formulas [Baz09, Raz09]). The class of M -clause CNF formulas is ε-fooled by O((log(M/ε))2 )-wise independence. 10 Theorem 7 (A Pseudorandom version of Håstad’s switching lemma [TX13]). Fix p, δ ∈ (0, 1) and w, S, t ∈ N. There exists a value r ∈ N, r = poly(t, w, log(S), log(1/δ), log(1/p)), 6 such that the following holds. Let D be any r-wise independent distribution over {0, 1}n×log(1/p) × {0, 1}n If F : {0, 1}n → {0, 1} is a size-S depth-2 circuit with bottom fan-in w, then   Pr DT(F ↾ ρ) ≥ t ≤ 2w+t+1 (5pw)t + δ, where the probability is taken with respect to a pseudorandom restriction ρ ← R(D). Proof. By Lemma 7 of [TX13], any distribution D ′ over {0, 1}n×log(1/p) × {0, 1}n that ε-fools the class of all (S · 2w(log(1/p)+1) )-clause CNFs satisfies   Pr DT(F ↾ ρ) ≥ t ≤ 2w+t+1 (5pw)t + ε · 2(t+1)(2w+log S) , where the probability is taken with respect to a pseudorandom restriction ρ ← R(D ′ ). By Theorem 6, the class of M := (S · 2w(log(1/p)+1) )-clause CNF formulas is ε := δ · 2−(t+1)(2w+log S) fooled by r-wise independence where r = O((log(M/ε))2 ) = poly(t, w, log(S), log(1/δ), log(1/p)), and the proof is complete. Taking a union bound we get the following corollary. Corollary 1. Fix p, δ ∈ (0, 1) and w, S, t ∈ N. There exists a value r ∈ N, r = poly(t, w, log(S), log(1/δ), log(1/p)), such that the following holds. Let D be any r-wise independent distribution over {0, 1}n×log(1/p) × {0, 1}n . Let F1 , . . . , FM be M many size-S depth-2 circuits with bottom fan-in w. Then h i  (1) Pr ∃ j ∈ [M ] such that DT(Fj ↾ ρ) ≥ t ≤ M · 2w+t+1 (5pw)t + δ . ρ←Rp 2.4.4 Helpful Functions. Lastly, we define some convient functions. For a random restriction ρ = (ρ(1) , ρ(2) ) ∈ {0, 1}n × {0, 1}n , ExtIndices(ρ(1) ) := (i1 , . . . , ik ) ∈ [n + 1]k are the last k indices of 1s in ρ(1) where i1 ≤ i2 · · · ≤ ik and ij = n + 1 for j ∈ [k] if such index doesn’t exist (k should be obvious from context unless otherwise noted). We define a pair of functions for embedding and extracting a string x according to a random restriction, ρ. Let Embed : {0, 1}k+2n → {0, 1}n , such that for ρ = (ρ(1) , ρ(2) ) ∈ {0, 1}n × {0, 1}n and x ∈ {0, 1}k , and i ∈ [n], ( xj if ∃j ∈ [k] : i = ExtIndices(ρ(1) )j Embed(x, ρ)i = (2) ρi otherwise And, let Extract : {0, 1}2n → {0, 1}k × {⊥} be such that if c ∈ {0, 1}n , ρ(1) ∈ {0, 1}n , and kρ(1) k0 ≥ k, then Extract(c, ρ(1) ) = cExtIndices(ρ(1) ) . Otherwise, Extract(c, ρ(1) ) = ⊥. Note that, for any ρ such that kρ(1) k0 ≥ k, Extract(Embed(x, (ρ(1) , ρ(2) )), ρ(1) ) = x. 6 The exponent of this polynomial is a fixed absolute constant independent of all other parameters. 11 3 Non-Malleable Codes for Small-Depth Circuits 3.1 NM-Reducing Small-Depth Circuits to Leaky Local Functions Lemma 4. For S, d, n, ℓ ∈ N, p, δ ∈ (0, 1), there exist σ = poly(log ℓ, log(ℓS), log(1/δ), log(1/p)) and m = O(σ log n) such that, for any 2m ≤ k ≤ n(p/4)d , (ACd (S) =⇒ LLd,m,n [Localℓ ], dε) where   ε = nS 22 log ℓ+1 (5p log ℓ)log ℓ + δ + exp(− σ ). 2 log(1/p) We define a simple encoding and decoding scheme (See Figure 1 in below) and show this scheme is a non-malleable reduction from (leaky) class F to (leaky) class G with an additional round of leakage if functions in F reduce to G under a suitable notion pseudorandom restrictions (recall definitions 9 & 10). Lemma 5. Let F and G be two classes of functions. Suppose for n ∈ N, p ∈ (0, 1) and any σ-wise independent distribution D over {0, 1}n log(1/p) × {0, 1}n , it holds that for any F : {0, 1}n → {0, 1} ∈ F, Pr [Fρ is not in G] ≤ ε. ρ←R(D) Then for i, N, k ∈ N, (E⋆k,n,p,σ , D⋆k,n,p,σ ) defined in Figure 1 is an (LLi,m,N [F] =⇒ LLi+1,m,N [G], N ε + exp(− σ )) 2 log(1/p) non-malleable reduction when (4σ/ log(1/p)) ≤ k ≤ (n − m)p/2. To prove Lemma 4, we instantiate Lemma 5 using the pseudorandom switching lemma of Theorem 7 (in fact, Corollary 1) and iteratively reduce ACd (S) to leaky local functions. Each application of the reduction, after the first, will allow us to trade a level of depth in the circuit for an additional round of leakage until we are left with a depth-2 circuit. The final application of the reduction will allow us to convert this circuit to local functions at the expense of a final round of leakage. 3.1.1 Proof of Lemma 5 The simple encoding and decoding scheme based on the pseudorandom switching lemma is defined in Figure 1. The Lemma follows immediately from Claims 1, 2, and 3 below. Claim 1. For any x ∈ {0, 1}k , Pr[D∗ (E∗ (x)) = x] = 1. Proof. The second step of E∗ guarantees that ExtIndices(L(G(ζ)))1 > m and kL(G(ζ)k0 ≥ k. Therefore, ER (ζ) is located in the first m bits of c and the entire x is embedded inside the remaining n − m bits of c according to L(G(ζ)). By the decoding property of RPE from lemma 1, Pr[DR (c, . . . , cm ) = ζ] = 1, namely, Pr[ζ̃ = ζ] = 1. Conditioned on ζ̃ = ζ, because kL(G(ζ)k0 ≥ k, D∗ (E∗ (x)) = Extract(c, L(G(ζ))) = x holds. The desired conclusion follows. Claim 2. Given any τ = Eval(F , h1 , . . . , hi , h) ∈ LLi,m,N [F], there is a distribution Sτ over τ ′ ∈ LLi+1,m,N [G], such that for any x ∈ {0, 1}k , D⋆ ◦ τ ◦ E⋆ (x) is δ-close to τ ′ (x) where τ ′ ← Sτ and δ ≤ Pr[F ◦ E∗ is not in G]. 12 Take k, n, p, σ to be parameters. Let G = Gσ : {0, 1}s(σ) → {0, 1}n log 1/p be an σ-wise independent generator from Lemma 3. Let (ER , DR , RR ) denote the RPE from lemma 1 with codewords of length m(s) ≥ σ/csec . Let ζ ∗ ∈ {0, 1}s(σ) be some fixed string such that kL(G(ζ ∗ ))n−m+1,...,n k0 ≥ k. (For our choice of G, such a ζ ∗ can be found efficiently via interpolation.) E⋆ (x): 1. Draw (uniformly) random seed ζ ← {0, 1}s and (uniformly) random string U ← {0, 1}n−m. 2. Generate pseudorandom restriction, ρ = (ρ(1) , ρ(2) ): ρ(1) ← L(G(ζ)); (∗) If kL(G(ζ))n−m+1,...,n k0 < k, set ζ = ζ ∗ . ρ(2) ← ER (ζ)kU . 3. Output c = Embed(x, ρ). D⋆ (c̃): 1. Recover tampered seed: ζ̃ ← DR (c̃1 , . . . , c̃m ). If kL(G(ζ̃))n−m+1:n k0 < k,output ⊥ and halt. 2. Output Extract c̃, L(G(ζ̃)) . Figure 1: A Pseudorandom Restriction Based Non-Malleable Reduction, (E⋆k,n,p,σ , D⋆k,n,p,σ ) given LLi,m,N [F ] tampering τ = (F , h1 , . . . , hi , h) output τ ′ = (F ′ , h′1 , . . . , h′i+1 , h′ ): 1. Draw (uniformly) random seed ζ ← {0, 1}s and (uniformly) random string R ← {0, 1}n−m. 2. Generate pseudorandom restriction, ρ = (ρ(1) , ρ(2) ): ρ(1) ← L(G(ζ)). (∗) If kL(G(ζ))n−m+1,...,n k0 < k, set ζ = ζ ∗ . ρ(2) ← ER (ζ)kR 3. Apply (constructive) switching lemma with pseudorandom restriction to get function F ′ ≡ F |ρ (n-bit output). If F is not in G, halt and output some constant function. 4. For j ∈ [i], h′j ≡ hj . 5. h′i+1 (y1′ , . . . , yi′ ) := h(y1′ , . . . , yi′ )[m] . ′ ′ 6. h′ (y1′ , . . . , yi+1 ) := h(y1′ , . . . , yi′ )ExtIndices(L(G(DR (yi+1 )))) . 7. Finally, output τ ′ = (F ′ , h′1 , . . . , h′i+1 , h′ ). Figure 2: Simulator, S, for (E⋆ , D⋆ ) Proof. Recall that a function τ in LLi,m,N [F] can be described via (F , h1 , . . . , hi , h) where F is a function in F from {0, 1}k to {0, 1}N and for every x ∈ {0, 1}k , h takes F (x)S1 , . . . , F (x)Si (where Sj are sets adaptively chosen by hj for j ∈ [i]) as input and outputs a set T of size k. And the evaluation of τ on x is F (x)T . Let Sτ be defined in Figure 2. We call a chocie of randomness ζ, U, r “good for F = (F1 , · · · , FN )” (where r is the randomness for ER ) if F ◦ E⋆ (·; ζ, U, r) is in G. We will show for any good ζ, U, r for F , D⋆ ◦ τ ◦ E⋆ (·; ζ, U, r) ≡ τ ′ (·), where τ ′ = Sτ (ζ, U, r). For good ζ, U, r, note that (1) F ′ ≡ F |ρ and (2) ρ was used in both E⋆ and Sτ . It follows that for all x, F ′ (x) = F |ρ (x) = F (E⋆ (x; ζ, R, r)). Because h′j ≡ hj for j ∈ [i], it follows by induction that 13 yj′ = yj (the output of each h′j and hj respectively, j ∈ [i]). Therefore, h(y1 , · · · , yi ) = h(y1′ , · · · , yi′ ). ′ ′ ))) = L(G(ζ̃)). Consequently, h′ (y ′ , · · · , y ′ ) outputs It follows that c̃[m] = yi+1 and L(G(DR (yi+1 1 i+1 that exact same indices that the decoding algorithm, D⋆ , will extract its output from. Thus, τ ′ (x) = D⋆ ◦ τ ◦ E⋆ (x; ζ, R, r) for any x. Because S and E⋆ sample their randomness identically, the distributions are identical, conditioned on the randomness being “good.” Hence δ is at most the probability that ζ, U, r are not “good for F ”, i.e., Pr[F ◦ E∗ is not in G]. Claim 3. Pr[F ◦ E∗ is not in G] ≤ N ε + exp(−σ/2 log(1/p)). Proof. We first show D = G(ζ)kER (ζ)kU is σ-wise independent when ζ ← {0, 1}s and U ← {0, 1}n−m . As U is uniform and independent of the rest, it suffices to simply consider Z = G(ζ)kER (ζ). Fix some S ⊆ [n log(1/p) + m] such that |S| ≤ σ. By the secrecy property of the RPE and m · csec ≥ σ, conditioned on any fixed ζ, ZS∩{n log(1/p)+1,...,n log(1/p)+m} is distributed uniformly. Therefore, ζ is independent of ZS∩{n log(1/p)+1,...,n log(1/p)+m} , so G guarantees that ZS∩{1,...,n log(1/p)} is independently of S ∩ {n log(1/p) + 1, . . . , n log(1/p) + m} and also distributed uniformly. Therefore, ZS is distributed uniformly. Note that ρ in E∗ is distributed identically to R(D), except when ζ ∗ is used. Hence Pr[F ◦ E∗ is not in G] ≤ Pr ρ←R(D) [Fρ is not in G] + Pr[kL(G(ζ))n−m+1,...,n k0 < k]. By our assumption and a union bound over the N boolean functions, Fρ ∈ / G happens with probaσ -wise independent bility at most N ε when ρ ← R(D). Observe that L(G(ζ))n−m+1,...,n is a log(1/p) n−m distribution over {0, 1} and each coordinate is 1 with probability p. Let µ = (n − m)p denote the expected number of 1’s in L(G(ζ))n−m+1,...,n . By linearity of expectation µ = (n − m)p. For σ k ≤ µ/2 and log(1/p) ≤ µ/8, we can use the concentration bound from Theorem 5 to conclude σ that kL(G(ζ))n−m+1,...,n k0 < k happens with probability at most exp(− 2 log(1/p) ). The desired conclusion follows. 3.1.2 Proof of Lemma 4 To prove Lemma 4, we instantiate Lemma 5 using the pseudorandom switching lemma of Theorem 7 (in fact, Corollary 1) and iteratively reduce ACd (S) to leaky local functions. Each application of the reduction, after the first, will allow us to trade a level of depth in the circuit for an additional round of leakage until we are left with a depth-2 circuit. The final application of the reduction will allow us to convert this circuit to local functions at the expense of a final round of leakage. Let t := log(ℓ) and let σ := poly(t, log(2t S), log(1/δ), log(1/p)) as in Corollary 1 so that any depth-2 circuits with bottom fan-in t become depth t decision trees with probability at least 1 − (22t+1 (5pt)t + δ) under pseudorandom restrictions drawn from σ-wise independent distribution. We use ACd (S) ◦ DT(t) to denote alternating (unbounded fan-in) circuits of depth d, size S that take the output of depth t decision trees as input. (Note may contain up to S decision trees.) Similarly it is helpful to decompose an alternating circuit (from w-ACd ) into a base layer of CNFs or DNFs and the rest of the circuit, ACd−2 (S) ◦ w-AC2 (S ′ ). (Again, the base may contain up to S CNFs/DNFs of size S ′ .) Claim 4. (ACd (S) =⇒ LL1,m,n [ACd−2 (S) ◦ t-AC2 (2t S)], ε). 14 Proof. Let F ∈ ACd (S) be a boolean function. Note that Theorem 7 and Corollary 1 are only useful for bounded width DNF and CNF. So, we view F as having an additional layer of fanin 1 AND/OR gates, namely, as a function in 1-ACd+1 (S). Because there are at most S DNFs (or CNFs) of size S at the bottom layers of F, by Corollary 1, the probability that F is not in ACd−1 (S) ◦ DT(t) is at most S 2t+2 (5p)t + δ under the pseudorandom switching lemma with parameters p, δ, σ. So by Corollary 1, (E⋆ , D⋆ ) reduces ACd (S) to LL1,m,n [ACd−1 (S) ◦ DT(t)] with σ )) ≤ ε. error n(S 2t+2 (5p)t + δ ) + exp(−Ω( log(1/p) By the fact that DT(t) can be computed either by width-t DNFs or width-t CNFs of size at most 2t , any circuit in ACd−1 (S) ◦ DT(t) is equivalent to a circuit in ACd−2 (S) ◦ t-AC2 (2t S), in other words, a depth d circuit with at most S width-t size-S2t DNFs or CNFs at the bottom. Hence, ACd−1 (S) ◦ DT(t) is a subclass of ACd−2 (S) ◦ t-AC2 (2t S) and the claim follows. Claim 5. (LLi,m,n [ACd−i−1 (S) ◦ t-AC2 (2t S)] =⇒ LLi+1,m,n [ACd−i−2 (S) ◦ t-AC2 (2t S)], ε). Proof. For a boolean function F ∈ ACd−i−1 (S) ◦ t-AC2 (2t S), because there are at most S DNFs (or CNFs) of size 2t S at the bottom layersof F , Corollary 1 shows F is not in ACd−i−1 (S) ◦ DT(t) with probability at most S 22t+2 (5pt)t + δ under a pseudorandom switching lemma with parameters p, δ, σ. So by Lemma 5, (E⋆ , D⋆ ) reduces (LLi,m,n [ACd−i−1 (S)◦t-AC2 (2t S)] to LLi+1,m,n [ACd−i−2 (S)◦ DT(t)] with error at most ε. Similarly as the previous proof, because ACd−i−1 (S) ◦ DT(t) is a subclass of ACd−i−2 (S) ◦ t-AC2 (2t S), the claim follows. t Claim 6. (LLd−1,m,n [t-AC2 (2t S)] =⇒ LLd,m,n [Local2 ], ε) Proof. Finally, for a boolean function F ∈ t-AC2 (2t S), Corollary 1 shows F is not in DT(t) with probability at most S 22t+2 (5pt)t + δ . So by Lemma 5, (E⋆ , D⋆ ) reduces LLd−1,m,n [t-AC2 (2t S)] to LLd,m,n [DT(t)] with error at most ε. The desired conclusion follows from the fact that DT(t) is t a subclass of Local2 . By applying Claim 4 once, then Claim 5 (d − 2) times and Claim 6 once, ACd (S) reduces to t LLd,m,n [Local2 ] with error at most dε. Note that m = O(σ log n) throughout, and during each application of above claims, given a codeword of length n′ ≥ k ≥ 2m, Lemma 5 holds for messages of length (n′ − m)p/2 ≥ n′ (p/4). Therefore, the composed reduction works for any 2m ≤ k ≤ n(p/4)d . 3.2 NM-Reducing Leaky Local to Split State Simple modifications to construction from the appendix of [BDKM16] yield a (LLd,s,N [Localℓ ], SSk , negl(k))non-malleable reduction. Lemma 6. There exists a constant c ∈ (0, 1), such that for any m, q, ℓ satisfying mqℓ3 ≤ cn there is a (LLq,m,N [Localℓ ] =⇒ SSk , exp(−Ω(k/ log n)))-non-malleable reduction with rate Ω(1/ℓ2 ). Note that we do not actually require any restrictions on N . We construct an encoding scheme (E, D), summarized in Figure 3, adapted from the appendix of [BDKM16]. We then show that the pair (E, D) is a (LLd,s,N [Localℓ ], SSk , negl(k))-non-malleable reduction. 15 L Let G = Gp,σ : {0, 1}s(σ) → {0, 1}τ be a σ-wise independent generator with bias p = 3n 2τ (see Lemma 3, s = s(σ) = σ log(2τ ) = O(σ log n)), with inputs of length s and outputs of length τ . Let (EL , DL ), (EZ , DZ ), (ER , DR ) be RPEs with parameters (k, nL , csec , cerr ), (s, nZ , csec , cerr ), and (k, nR , csec , cerr ) respectively. Assume ℓ > 1/csec . Define feasible parameters according to the following: nZ ≥ max{mqℓ/csec , s(σ)crate } (Take nZ = θ(mqℓ + s(σ))), nL ≥ kcrate (Take nL = θ(k)), ℓ (nL + nZ + mq) (Take nR = θ(ℓ(k + mqℓ + s(σ)))), nR ≥ csec 9ℓ τ ≥ 4csec (nR + nZ + mq) (Take = θ(ℓ2 (k + mqℓ + s(σ)))), n := nZ + τ + nR (n = θ(ℓ2 (k + mqℓ + s(σ))). L R R R E(xL := xL 1 , . . . , xk , x := x1 , . . . , xk ): 1. Let sL := EL (xL ), SR := ER (xR ). 2. Choose ζ ← {0, 1}s uniformly at random. Compute ρ(1) := G(ζ). Choose ρ(2) ← {0, 1}τ uniformly at random. Let ρ := (ρ(1) , ρ(2) ); (∗) If ρ(1) has less than nL 1s, take ρ(1) := G(ζ ∗ ) for some ζ ∗ such that G(ζ ∗ ) has nL ones. 3. Let XL := Embed(sL , ρ). 4. Let Z ← EL (ζ); Output the encoding (Z, XL , SR ). e X fL , Sf D(Z, R ): 1. Let ρe := G(DL (ZeL )). (∗) If ρe contains less than nL 1s, output ⊥. 2. sf e). L := Extract(XL , ρ f f L = D (f R = D (S L f R f 3. Let xf s ), x L L R R ); Output (x , x ). Figure 3: A non-malleable reduction of LLq,m,N [Localℓ ] to Split State SSk with deterministic decoding 16 Security. Before formalizing, we will briefly describe why the construction works. We will reduce the leaky local tampering to split-state tampering using the encoding and decoding algorithms. Given that encoding/decoding on the left (xL and Z, XL , respectively) is independent of encoding/decoding on the right (xR and SR , respectively), all of non-split state behavior is derived from the tampering function. We will show how to essentially sample all of the information necessary to tamper independently on each side without looking at the inputs. Then, using the reconstruction properties of the RPEs we will be able to generate encodings on each side consistent with these common random bits that we have sampled. Conditioned on a simple event happening, composition of these modified encoding, tampering, and decoding algorithms will be identical to the normal tampering experiment. The key observation, is that all of the leakage is under the privacy threshold of any of the RPEs. In particular, this means that after calculating all of the leakage to define which functions will be applied to the codeword, both left and right inputs remain private, as well as the seed, ζ. Moreover, the leakage is far enough below the privacy thresholds on the inputs that we may leak more bits. Given the local functions that will be applied to the codeword, the bits that will affect either the tampered seed, or the right side, or were used to calculate the leakage from XL have all been defined (and there aren’t too many relative to the length of XL ). As the seed, ζ, is still uniformly distributed at this point we can sample it and apply a pseudorandom chernoff bound to show that, with overwhelming probability, relatively few of these locations will overlap with embedding locations for the (RPE encoding of the ) left side input, this is the “simple event” mention above. (We additionally require that the embedding has enough space for the RPE encoding.) Consequently, we can safely sample all these locations in XL . Additionally, at this point we have totally defined the RPE of the seed, Z. Now, because the RPE of the seed is significantly shorter than RPE of the right input, we can safely sample all the locations in SR that affect Z̃. Moreover, the tampering resulting in Z̃ is now a constant function (given all the sampled bits), which allows us to simulate the tampered seed, ζ̃. Then, we can use the tampered seed to determine decoding locations for extracting the RPE of the left input from XL . As these are the only locations that the output of decoding depends on, we only are concerned with the bits that affect these (few) locations. As there are less than security threshold bits in SR that affect these locations (in conjunction with bits that affect Z̃), we can sample all of these locations uniformly at random. At this point we can now output the left-side tampering function: given left input xL , reconstruct an RPE to be consistent with the bits of sL sampled above, apply tampering function (given by simulated exacted locations and restricted according to all the sampled bits above that is only dependent on sL ), decode the result. Also note that at this point the tampered RPE of the right input, S̃R , is simply a function of random bits (sampled independently of the input) and the RPE SR . Thus, we can similarly output the right-side tampering function: given right input xR , reconstruct an RPE to be consistent with the bits of SR sampled above, apply tampering function (restricted according to all the sampled bits above: only depends on SR ), decode the result of tampering. Proof of Lemma 6. We begin by formally defining a simulator in Figure 4. We additionally consider the following “bad events”: 1. G(ζ) contains at least nL 1s. (Condition ∗ does not occur.) 2. Given (h1 , . . . , hk )-leakage, denoted (y1 , . . . , yk ), the resulting tampering function Fh(y1 ,...,yk ) is such that the intersection of the set V ′ (defined as in figure 4) with {i + nZ : i ∈ ExtIndices(G(ζ))} is less than csec · nL . (Condition ∗∗ does not happen.) 17 Given LLq,m,N [Localℓ ] tampering t = (F , h1 , . . . , hq , h) output (fL , fR ): Let AF (S) denote the indices (in [n]) of inputs that affect FS for S ⊆ [N ]. Let IZ = {1, . . . , nZ }, IL = {nZ + 1, . . . , nZ + τ }, and IR = {nZ + τ + 1, . . . , nZ + τ + nR }. 1. Sample uniform r ∈ {0, 1}n . 2. (Sample leakage) Let S1 = h1 . Let U1 = (rj )j∈S1 For i = 1 to q: Let Si := hi (Y1 , . . . , Yi−1 ), Ui := A(Si ), Yi := FSi (r). 3. Let (TZ , TX , TR ) := h(Y1 , . . . , Yq ). S 4. Let VZ := AF (TZ ) ∩ (IL ∪ IR ), VR := AF (TR ) ∩ IL , and V ′ := VZ ∪ VR ∪ U where U = Ui . 5. Let µ′ ∈ {0, 1, ⋆}n denote the string where ∀i ∈ V ′ : µ′i = ri , and ∀i ∈ / V ′ : µ′i = ⋆. s (1) 6. (Sample seed) ζ ← {0, 1} uniformly at random. Compute ρ := Gp,q (ζ). Let ρ := (1) (1) (1) (ρ , r{nZ +1,...,nZ +τ } ). For i ∈ [τ ], let ρi denote the i-th bit of ρ . (∗) If ρ(1) has less than nL 1s, take ρ(1) := G(ζ ∗ ) for some ζ ∗ such that G(ζ ∗ ) has nL ones. P (1) (∗∗) If i∈V ′ ρi−nZ > csec nL (if ρ(1) has too many 1s with indices in V ′ , after shifting), output some constant function and halt. Let IL′ := (i1 + nZ , . . . , inL + nZ ), where (i1 , . . . , inL ) := ExtIndices(ρ(1) ). Let B := IL′ ∩ V ′ (i.e. the embedding locations that are also in V ′ ). 7. (Reconstruct encodings consistent with µ′ ) Let C := IZ ∩ V ′ . Z ← RZ (C, µ′IZ , ζ). 8. (Recover tampered seed) ζ̃ := DZ ◦ FTZ |µ′ (Z), and ρ̃ := G(ζ̃). (By definition, TZ |µ′ is only a function of the variables in IZ .) 9. (Recover tampered extraction locations) Let J = (j1 , · · · , jnL ) denote the set of elements in ExtIndices(ρ̃). If nL elements cannot be recovered, output ⊥ and halt. Let TL := TX,j1 , · · · , TX,jnL (where TX,v denotes the v-th element in TX ), and VL := AF (TL ) ∩ (IZ ∪ IR ). 10. (Extend µ′ to µ) Let V := V ′ ∪ VL ∪ IZ and ∀i ∈ V \ IZ : µi = ri , ∀i ∈ IZ : µi = Zi , and ∀i ∈ / V : µi = ⋆. (Note that ∀i ∈ V ′ , µi = µ′i , and, consequently, FTZ |µ′ (Z) ≡ FTZ |µ (Z).) 11. Output: fL : On input x, (a) (b) (c) (d) (Reconstruct encodings consistent with µ) sL ← RL (B, µIL , xL ), (Embed reconstructed encoding) XL := Embed(sL , ρ) (Tamper) c̃L := TL |µ (XL ) (Decode) Output x̃L := DL (c̃L ). fR : On input y (a) (Reconstruct encodings consistent with µ) Let A := {i − (τ + nZ ) : i ∈ V ∩ IR } SR ← RR (A, µIR , xR ). (b) (Tamper) c̃R := TR |µ (SR ). (c) (Decode) Output x̃R := DR (c̃R ). Figure 4: Simulator, S, for (E, D) Next we argue, via a sequence of hybrids, that for any fixed input (xL , xR ) and tampering function t, ∆(D(f (E(xL , xR ))); G(xL , xR )) ≤ exp(−σ/2 + 1), where G denotes the distribution over split-state functions (fL , fR ) induced by the simulator S. Hybrid H0 (The real experiment): Outputs D ◦ t ◦ E(xL , xR ). Hybrid H1 (Alternate RPE encoding): 18 In this hybrid, we change the order of sampling in the encoding procedure: We first sample ζ, ρ, µ′ , Z as in S and then reconstruct RPEs sL and SR to be consistent with µ′ . Specifically, replace the encoding procedure E with the following: On input (xL , xR ), first execute S steps 1-7, then sample sL ← RL (B, µ′IL , xL ), XL := Embed(sL , ρ), and SR ← RR (A, µ′IR , xR ) and output (Z, XL , SR ). Hybrid H2 (Simulate tampered seed/“Alternate” Left-side decoding): In this hybrid, we modify the decoding procedure to simulate tampered seed, ζ̃ using Z, µ′ sampled as in the previous experiment. We then use its extracted locations ρ̃ to extract the embedded RPE encoding sL . e X fL , Sf Specifically, on input (Z, R ), we replace steps 1 and 2 in decoding procedure D with steps 8,9 in S. Hybrid H3 (Alternate Alternate RPE encoding): In this hybrid we again change the order of sampling in the encoding procedure. This time we sample Z, µ′ , ρ̃ as in the previous hybrid, and then sample µ and reconstruct sL , SR as in S. Specifically, on input (xL , xR ), sample Z, µ′ , ρ̃ as before and sample µ as in Step 10 of S. Then, set sL ← RL (B, µIL , xL ), XL := Embed(sL , ρ), SR ← RR (A, µIR , xR ) and output (Z, XL , SR ) as the output of the encoding procedure. Hybrid H4 (The split-state simulation): In this hybrid, instead of applying the actual tampering function t = (F , h1 , . . . , hq , h) to the output of the encoding procedure from H4 and then applying the decoding procedure from H4 , we instead simply output fL (xL ), fR (xR ), where fL , fR are defined as in S. We will show that, H0 ≈negl(n) H1 , and, in fact, H1 ≡ H2 ≡ H3 ≡ H4 . kH0 − H1 k ≤ exp(−σ/2 + 1): It is sufficient to show that: (1) conditioned on ∗ and ∗∗ not occurring, experiments H0 and H1 are identical (2) the probability of ∗ or ∗∗ occurring is at most exp(−σ/2 + 1). Notation. For every variable x that is set during experiments H0 , H1 , let x denote the corresponding random variable. Given a string µ′ of length n and a set S ⊆ [n], define the n-bit string µ′ (S) as µ′ (S)i = µ′i , i ∈ S and µ′ (S)i = 0, i ∈ / S. For (1), it is sufficient to show that (ζ, µ′ (V ′ )) are identically distributed in H0 , H1 , conditioned on ∗ and ∗∗ not occurring, where µ′ is the random variable denoting the outcome of (Z, XL , SR ). In order to compute steps 2 − S 4, 6, 7 of S, we need only (adaptively) fix the bits (Z, XL , SR )U corresponding to the set U = Ui . Since |U | ≤ ℓmq ≤ csec min{nL , nR , nZ }, by the properties of the RPE, this means that (ζ, µ′ (U )) are identically distributed in H0 and H1 . Since ∗ and ∗∗ depend only on ζ and µ′ (U ), it is sufficient to show that, for every ζ, µ′ (U ) for which ∗ and ∗∗ do not occur, the distributions over µ′ (V ′ ), conditioned on (ζ = ζ)∧(µ′ (U ) = µ′ (U )) are identical in H1 and H2 . Due to independence of ζ, sL , SR , the fact that µ′V ′ ∩(IL \I ′ ) is uniL form random in both experiments, and since V ′ ∩ IZ = U ∩ IZ , it remains to show that each of ′ ) | µ′ (U ) = µ′ (U )) and (µ′ (V ′ ∩ I ) | µ′ (U ) = µ′ (U )) are identically distributed in (µ′ (V ′ ∩ IL R both experiments. 19 Since ∗∗ does not occur, the total size of IL′ ∩ V ′ = B is at most csec · nL and the total size of IR ∩ V ′ is at most |VZ | + |U | ≤ ℓ · (nZ + mq) ≤ csec · nR . Therefore, by the properties of the RPE, the corresponding distributions in H0 and H1 are identical. We now turn to proving (2). To bound the probability of ∗, note that the expected number of 1’s in G(ζ) is τ · p = 3τ2τnL = 3n2L . Invoking Theorem 5, item (1) with k = σ, µ = 3n2L and ε = 21 , it follows that Pr[∗] ≤ exp(−σ/2). To bound the probability of ∗∗, note that given fixed set V ′ , the expected size of V ′ ∩ {i + nZ : ′ 2csec |V ′ |nL . Now, |V ′ | ≤ ℓ(nR + nZ + mq). i ∈ ExtIndices(G(ζ))} is at most |V ′ | · p = 3|V2τ|nL = 3ℓ(n R +nZ +mq) ′ 2csec |V |nL So 3ℓ(n ≤ 2csec3 nL . Invoking Theorem 5, item (1) with k = σ, µ = R +nZ +mq) follows that Pr[∗∗] ≤ exp(−σ/2). The conclusion follows from a union bound. kH1 − H2 k = 0: 2csec nL 3 and ε = 31 , it By inspection, it can be seen that the two experiments are, in fact, identical. kH2 − H3 k = 0: Note that the distribution over Z, XL does not change from the previous hybrid (since all of Z is sampled based on µ′ and since µ does not fix additional bits from IL ). The total number of bits of SR fixed by µ is at most |VL | + |VZ | + |U | ≤ ℓ · (nL + nZ + mq) ≤ csec · nR , where the last inequality is by choice of parameters. Therefore, by the properties of the RPE (ER , DR ), the distribution over (Z, XL , SR ) is identical in H1 and H2 . kH3 − H4 k = 0: Correctness. 3.3 By inspection, these experiments are also identical. By the definitions of (Embed, Extract) and RPE, Pr[D(E(x)) = x] = 1. Putting It All Together In this section, we put things together and show our main results. By composing the non-malleable reductions from Lemma 4 and Lemma 6, we obtain a non-malleable reduction which reduces smalldepth circuits to split state. Lemma 7. For S, d, n, ℓ ∈ N, p, δ ∈ (0, 1), there exists σ = poly(log ℓ, log(ℓS), log(1/δ), log(1/p)) such that for k that k ≥ O(σ log n) and k = Ω(n(p/4)d /ℓ2 ), (ACd (S) =⇒ SSk , dε + exp(−σ/2)) where   ε = nS 22 log ℓ+1 (5p log ℓ)log ℓ + δ + exp(− σ ). 2 log(1/p) For constant-depth polynomial-size circuits (i.e. AC0 ), we obtain the following corollary by log(n) setting ℓ = n1/ log log log(n) , δ = n− log log(n) and p = log1 ℓ · log1 n = log log , log2 n   1−o(1) for n = k1+o(1) . Corollary 2. AC0 =⇒ SSk , n−(log log n) The same setting of parameters works for depth as large as Θ(log(n)/ log log(n)) with n = k1+c where constant 0 < c < 1 can be arbitrary small. We remark that one can improve the error to n−Ω(log(n)) by using a smaller p (e.g. p = n−1/100d ) thus a worse rate (but still n = k1+ε ). Combining the non-malleable code for split state from Theorem 4 with rate Ω(log log n/ log(n)), we obtain our main theorem. 20 Theorem 8. There exists an explicit, efficient, information theoretic non-malleable code for any polynomial-size, constant-depth circuits with error negl(n) and encoding length n = k1+o(1) . Moreover, for any constant c ∈ (0, 1), there exists another constant c′ ∈ (0, 1) and an explicit, efficient, information theoretic non-malleable code for any polynomial-size, (c′ log n/ log log n)-depth circuits with error negl(n) and encoding length n = k1+c . References [AAG+ 16] Divesh Aggarwal, Shashank Agrawal, Divya Gupta, Hemanta K. Maji, Omkant Pandey, and Manoj Prabhakaran. Optimal computational split-state non-malleable codes. In Theory of Cryptography - 13th International Conference, TCC 2016-A, Tel Aviv, Israel, January 10-13, 2016, Proceedings, Part II, pages 393–417, 2016. [ADKO15] Divesh Aggarwal, Yevgeniy Dodis, Tomasz Kazana, and Maciej Obremski. Nonmalleable reductions and applications. In Rocco A. Servedio and Ronitt Rubinfeld, editors, Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, STOC 2015, Portland, OR, USA, June 14-17, 2015, pages 459–468. ACM, 2015. [ADL14] Divesh Aggarwal, Yevgeniy Dodis, and Shachar Lovett. Non-malleable codes from additive combinatorics. In David B. Shmoys, editor, Symposium on Theory of Computing, STOC 2014, New York, NY, USA, May 31 - June 03, 2014, pages 774–783. ACM, 2014. [Agg15] Divesh Aggarwal. Affine-evasive sets modulo a prime. Inf. Process. Lett., 115(2):382– 385, 2015. [AGM+ 15] Shashank Agrawal, Divya Gupta, Hemanta K. Maji, Omkant Pandey, and Manoj Prabhakaran. Explicit non-malleable codes against bit-wise tampering and permutations. In Advances in Cryptology - CRYPTO 2015 - 35th Annual Cryptology Conference, Santa Barbara, CA, USA, August 16-20, 2015, Proceedings, Part I, pages 538–557, 2015. [Ajt89] Miklós Ajtai. First-order definability on finite structures. Ann. Pure Appl. Logic, 45(3):211–225, 1989. [Baz09] Louay M. J. Bazzi. Polylogarithmic independence can fool DNF formulas. SIAM J. Comput., 38(6):2220–2272, 2009. [BDKM16] Marshall Ball, Dana Dachman-Soled, Mukul Kulkarni, and Tal Malkin. Non-malleable codes for bounded depth, bounded fan-in circuits. In Advances in Cryptology - EUROCRYPT 2016 - 35th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Vienna, Austria, May 8-12, 2016, Proceedings, Part II, pages 881–908, 2016. [BDKM17] Marshall Ball, Dana Dachman-Soled, Mukul Kulkarni, and Tal Malkin. Nonmalleable codes from average-case hardness: AC0, decision trees, and streaming space-bounded tampering. Cryptology ePrint Archive, Report 2017/1061, 2017. http://eprint.iacr.org/2017/1061. 21 [CDMW08] Seung Geol Choi, Dana Dachman-Soled, Tal Malkin, and Hoeteck Wee. Black-box construction of a non-malleable encryption scheme from any semantically secure one. In Ran Canetti, editor, Theory of Cryptography, Fifth Theory of Cryptography Conference, TCC 2008, New York, USA, March 19-21, 2008., volume 4948 of Lecture Notes in Computer Science, pages 427–444. Springer, 2008. [CDMW16] Seung Geol Choi, Dana Dachman-Soled, Tal Malkin, and Hoeteck Wee. A black-box construction of non-malleable encryption from semantically secure encryption. IACR Cryptology ePrint Archive, 2016:720, 2016. [CDTV16] Sandro Coretti, Yevgeniy Dodis, Björn Tackmann, and Daniele Venturi. Non-malleable encryption: Simpler, shorter, stronger. In Theory of Cryptography - 13th International Conference, TCC 2016-A, Tel Aviv, Israel, January 10-13, 2016, Proceedings, Part I, pages 306–335, 2016. [CG16] Mahdi Cheraghchi and Venkatesan Guruswami. Capacity of non-malleable codes. IEEE Trans. Information Theory, 62(3):1097–1118, 2016. [CGL16] Eshan Chattopadhyay, Vipul Goyal, and Xin Li. Non-malleable extractors and codes, with their many tampered extensions. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2016, Cambridge, MA, USA, June 18-21, 2016, pages 285–298, 2016. [CGM+ 16] Nishanth Chandran, Vipul Goyal, Pratyay Mukherjee, Omkant Pandey, and Jalaj Upadhyay. Block-wise non-malleable codes. In 43rd International Colloquium on Automata, Languages, and Programming, ICALP 2016, July 11-15, 2016, Rome, Italy, pages 31:1–31:14, 2016. [CHRT18] Eshan Chattopadhyay, Pooya Hatami, Omer Reingold, and Avishay Tal. Improved pseudorandomness for unordered branching programs through local monotonicity. In Proceedings of the 50th Annual ACM Symposium on the Theory of Computing (STOC), 2018. [CL17] Eshan Chattopadhyay and Xin Li. Non-malleable codes and extractors for smalldepth circuits, and affine functions. In Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2017, Montreal, QC, Canada, June 19-23, 2017, pages 1171–1184, 2017. [CMTV15] Sandro Coretti, Ueli Maurer, Björn Tackmann, and Daniele Venturi. From single-bit to multi-bit public-key encryption via non-malleable codes. In Theory of Cryptography - 12th Theory of Cryptography Conference, TCC 2015, Warsaw, Poland, March 23-25, 2015, Proceedings, Part I, pages 532–560, 2015. [CZ14] Eshan Chattopadhyay and David Zuckerman. Non-malleable codes against constant split-state tampering. In 55th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2014, Philadelphia, PA, USA, October 18-21, 2014, pages 306–315. IEEE Computer Society, 2014. [CZ16] Eshan Chattopadhyay and David Zuckerman. Explicit two-source extractors and resilient functions. In Daniel Wichs and Yishay Mansour, editors, Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2016, Cambridge, MA, USA, June 18-21, 2016, pages 670–683. ACM, 2016. 22 [DKO13] Stefan Dziembowski, Tomasz Kazana, and Maciej Obremski. Non-malleable codes from two-source extractors. In Ran Canetti and Juan A. Garay, editors, Advances in Cryptology - CRYPTO 2013 - 33rd Annual Cryptology Conference, Santa Barbara, CA, USA, August 18-22, 2013. Proceedings, Part II, volume 8043 of Lecture Notes in Computer Science, pages 239–257. Springer, 2013. [DLSZ15] Dana Dachman-Soled, Feng-Hao Liu, Elaine Shi, and Hong-Sheng Zhou. Locally decodable and updatable non-malleable codes and their applications. In Theory of Cryptography - 12th Theory of Cryptography Conference, TCC 2015, Warsaw, Poland, March 23-25, 2015, Proceedings, Part I, pages 427–450, 2015. [DPW10] Stefan Dziembowski, Krzysztof Pietrzak, and Daniel Wichs. Non-malleable codes. In Andrew Chi-Chih Yao, editor, Innovations in Computer Science - ICS 2010, Tsinghua University, Beijing, China, January 5-7, 2010. Proceedings, pages 434–452. Tsinghua University Press, 2010. [DPW18] Stefan Dziembowski, Krzysztof Pietrzak, and Daniel Wichs. Non-Malleable Codes. Journal of the ACM, 2018. [FHMV17] Sebastian Faust, Kristina Hostáková, Pratyay Mukherjee, and Daniele Venturi. Nonmalleable codes for space-bounded tampering. In Advances in Cryptology - CRYPTO 2017 - 37th Annual International Cryptology Conference, Santa Barbara, CA, USA, August 20-24, 2017, Proceedings, Part II, pages 95–126, 2017. [FMNV14] Sebastian Faust, Pratyay Mukherjee, Jesper Buus Nielsen, and Daniele Venturi. Continuous non-malleable codes. In Theory of Cryptography - 11th Theory of Cryptography Conference, TCC 2014, San Diego, CA, USA, February 24-26, 2014. Proceedings, pages 465–488, 2014. [FMVW14] Sebastian Faust, Pratyay Mukherjee, Daniele Venturi, and Daniel Wichs. Efficient non-malleable codes and key-derivation for poly-size tampering circuits. In Advances in Cryptology - EUROCRYPT 2014 - 33rd Annual International Conference on the Theory and Applications of Cryptographic Techniques, Copenhagen, Denmark, May 11-15, 2014. Proceedings, pages 111–128, 2014. [FSS84] Merrick L. Furst, James B. Saxe, and Michael Sipser. Parity, circuits, and the polynomial-time hierarchy. Mathematical Systems Theory, 17(1):13–27, 1984. [GMR+ 12] Parikshit Gopalan, Raghu Meka, Omer Reingold, Luca Trevisan, and Salil P. Vadhan. Better pseudorandom generators from milder pseudorandom restrictions. In Proceedings of the 53rd Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 120–129, 2012. [GPR16] Vipul Goyal, Omkant Pandey, and Silas Richelson. Textbook non-malleable commitments. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2016, Cambridge, MA, USA, June 18-21, 2016, pages 1128–1141, 2016. [Hås86] Johan Håstad. Almost optimal lower bounds for small depth circuits. In Proceedings of the 18th Annual ACM Symposium on Theory of Computing, May 28-30, 1986, Berkeley, California, USA, pages 6–20, 1986. 23 [HT18] Pooya Hatami and Avishay Tal. Pseudorandom generators for low sensitivity functions. In 9th Innovations in Theoretical Computer Science Conference (ITCS), pages 29:1– 29:13, 2018. [IMZ12] Russell Impagliazzo, Raghu Meka, and David Zuckerman. Pseudorandomness from shrinkage. In Proceedings of the 53rd Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 111–119, 2012. [KLT16] Aggelos Kiayias, Feng-Hao Liu, and Yiannis Tselekounis. Practical non-malleable codes from l-more extractable hash functions. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, Vienna, Austria, October 2428, 2016, pages 1317–1328, 2016. [KOS14] Bhavana Kanukurthi, Lakshmibhavana Obbattu, and Sruthi Sekar. Four-state nonmalleable codes with explicit constant rate. Theory of Cryptography - 15th Theory of Cryptography Conference, TCC 2017, Baltimore, MD, USA, November 12-15, 2017, to appear, 2014. [KPPY84] Maria M. Klawe, Wolfgang J. Paul, Nicholas Pippenger, and Mihalis Yannakakis. On monotone formulae with restricted depth (preliminary version). In Richard A. DeMillo, editor, Proceedings of the 16th Annual ACM Symposium on Theory of Computing, April 30 - May 2, 1984, Washington, DC, USA, pages 480–487. ACM, 1984. [Li12] Xin Li. Non-malleable extractors, two-source extractors and privacy amplification. In 53rd Annual IEEE Symposium on Foundations of Computer Science, FOCS 2012, New Brunswick, NJ, USA, October 20-23, 2012, pages 688–697. IEEE Computer Society, 2012. [Li13] Xin Li. New independent source extractors with exponential improvement. In Dan Boneh, Tim Roughgarden, and Joan Feigenbaum, editors, Symposium on Theory of Computing Conference, STOC’13, Palo Alto, CA, USA, June 1-4, 2013, pages 783– 792. ACM, 2013. [Li17] Xin Li. Improved non-malleable extractors, non-malleable codes and independent source extractors. In Hamed Hatami, Pierre McKenzie, and Valerie King, editors, Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2017, Montreal, QC, Canada, June 19-23, 2017, pages 1144–1156. ACM, 2017. [Li18] Xin Li. Pseudorandom correlation breakers, independence preserving mergers and their applications. Electronic Colloquium on Computational Complexity (ECCC), 25:28, 2018. [LL12] Feng-Hao Liu and Anna Lysyanskaya. Tamper and leakage resilience in the splitstate model. In Advances in Cryptology - CRYPTO 2012 - 32nd Annual Cryptology Conference, Santa Barbara, CA, USA, August 19-23, 2012. Proceedings, pages 517– 532, 2012. [Raz09] Alexander Razborov. A simple proof of bazzis theorem. ACM Transactions on Computation Theory (TOCT), 1(1):3, 2009. [RSV13] Omer Reingold, Thomas Steinke, and Salil Vadhan. Pseudorandomness for regular branching programs via Fourier analysis. In Proceedings of the 17th International Workshop on Randomization and Computation (RANDOM), pages 655–670, 2013. 24 [SSS95] Jeanette P. Schmidt, Alan Siegel, and Aravind Srinivasan. Chernoff-hoeffding bounds for applications with limited independence. SIAM J. Discrete Math., 8(2):223–250, 1995. [ST18] Rocco A. Servedio and Li-Yang Tan. Improved pseudorandom generators from pseudorandom multi-switching lemmas. CoRR, abs/1801.03590, 2018. [TX13] Luca Trevisan and Tongke Xue. A derandomized switching lemma and an improved derandomization of AC0. In Proceedings of the 28th Conference on Computational Complexity, CCC 2013, K.lo Alto, California, USA, 5-7 June, 2013, pages 242–247. IEEE Computer Society, 2013. [Val83] Leslie G. Valiant. Exponential lower bounds for restricted monotone circuits. In David S. Johnson, Ronald Fagin, Michael L. Fredman, David Harel, Richard M. Karp, Nancy A. Lynch, Christos H. Papadimitriou, Ronald L. Rivest, Walter L. Ruzzo, and Joel I. Seiferas, editors, Proceedings of the 15th Annual ACM Symposium on Theory of Computing, 25-27 April, 1983, Boston, Massachusetts, USA, pages 110–117. ACM, 1983. [WC81] Mark N. Wegman and Larry Carter. New hash functions and their use in authentication and set equality. J. Comput. Syst. Sci., 22(3):265–279, 1981. [Yao85] Andrew Chi-Chih Yao. Separating the polynomial-time hierarchy by oracles (preliminary version). In 26th Annual Symposium on Foundations of Computer Science, Portland, Oregon, USA, 21-23 October 1985, pages 1–10, 1985. 25
7cs.IT
Ensemble Framework for Real-time Decision Making Philip Rodgers and John Levine arXiv:1706.06952v1 [cs.AI] 21 Jun 2017 Department of Computer and Information Sciences University of Strathclyde Glasgow, UK Email: {philip.rodgers, john.levine}@strath.ac.uk Abstract—This paper introduces a new framework for realtime decision making in video games. An Ensemble agent is a compound agent composed of multiple agents, each with its own tasks or goals to achieve. Usually when dealing with real-time decision making, reactive agents are used; that is agents that return a decision based on the current state. While reactive agents are very fast, most games require more than just a rule-based agent to achieve good results. Deliberative agents— agents that use a forward model to search future states—are very useful in games with no hard time limit, such as Go or Backgammon, but generally take too long for real-time games. The Ensemble framework addresses this issue by allowing the agent to be both deliberative and reactive at the same time. This is achieved by breaking up the game-play into logical roles and having highly focused components for each role, with each component disregarding anything outwith its own role. Reactive agents can be used where a reactive agent is suited to the role, and where a deliberative approach is required, branching is kept to a minimum by the removal of all extraneous factors, enabling an informed decision to be made within a much smaller timeframe. An Arbiter is used to combine the component results, allowing high performing agents to be created from simple, efficient components. I. I NTRODUCTION A. Ensemble Systems Ensemble based systems have been used for classification problems since the late 1970s [1], partitioning the features and using multiple classifiers. A modern example of a powerful ensemble system is IBM’s Watson [2]. Watson was originally created to play the TV quiz show Jeopardy, but has since been opened up for general use. It uses natural language recognition to analyse questions and generate queries. It then sends the queries to multiple sources of answers–known as many experts—and combining the answers, calculating confidence levels for each of the answers. An important thing to note is that adding a new answer source does not affect the other sources or the logic of the system, it simply adds another answer to the set of all answers. B. Real-time Ensemble Agents Most AI for decision making is based on some form of ‘if this, then that’ model, using finite-state machines or decision trees. The idea behind the Ensemble framework is to take the concept of feature partitioning from classification systems and apply it to real-time games. The Ensemble framework is used to build complex agents out of simple components, or voices, each with a simple goal or agenda. At the heart of the framework is an Arbiter which takes the outputs, or opinions, of the voices and generates the final decision. The Ensemble Agent Voice State Pre-filter Voice Arbiter Decision Voice Fig. 1: Ensemble Agent concept sounds similar to that of a subsumption architecture, but it differs significantly in that the decision making is not being deferred from one component to the next. Instead, all of the voices have an opinion all of the time and each voice contributes to the end result, even if only slightly. The Ensemble framework is far more akin to the classification ensemble systems than subsumption architectures. The basic idea behind the Ensemble framework is to take simple, efficient and highly focused AI components and combine them to create complex behaviour. This framework allows AI components to be easily added, removed or replaced without altering the behaviour of the other components or requiring the alteration of the Ensemble algorithm. It also allows for a set of general purpose, reusable AI components to be created and used across multiple domains. For example, Monte-Carlo Tree-Search [3]. The Ensemble algorithm takes in the current game state, pre-filters the possible moves, sends this information to each of the component voices and combines the opinions of each voice into a single decision. See figure 1. The pre-filtering of moves allows for greater efficiency of the voices by removing any moves known to be invalid or known to be bad from previous iterations. In its simplest form, the Ensemble was envisioned to have three primary components, with short-, middle- and long-range goals. These can be seen as survival, tactics and strategy, respectively. This idea is by no means a requirement, and the Ms. Pac-Man agent described in this paper does not strictly adhere to this structure. For example, if the framework was to be used in a racing simulator, the components could be following the racing line, overtaking, defending your position and avoiding obstacles. C. Pac-Man The original Pac-Man is an arcade machine from 1980, created by game designer Toru Iwatani of Namco and considered one of the first examples of what would later become known as the survival horror genre. The game was hugely popular, and it was released in the United States in October 1980 by Midway Manufacturing Corporation of Illinois, USA. In Pac-Man, the player controls the main character around a maze using a four-way joystick. The aim of the game is to complete each level by eating all the pills dotted around the maze whist avoiding the four antagonistic ghosts. Each level also has four power-pills that allow the main character to become energised for a short period of time, during which the ghosts can be eaten. Eating a power-pill also has the effect of making the ghosts reverse direction. In later levels the time that the ghosts are edible drops to zero, so the reversal is the only effect of eating a power-pill. Two bonus items also appear per level. Points are scored by eating normal pills (10 points each), power pills (50 points each), ghosts (200, 400, 800 and 1600 points if eaten in succession) and bonuses (100, 300, 500, 700, 1000, 2000, 3000 or 5000, depending on the bonus). From level 13 onwards, the bonus is always worth 5000 points. D. Ms. Pac-Man Ms. Pac-Man is a sequel to Pac-Man. It has the same game mechanics but with several enhancements over the original game. There are four mazes, as opposed to the single maze of Pac-Man, and the bonuses now move around the maze, rather than appearing stationary in the centre of the maze, and in the later levels the bonus is random. The main difference, and what makes Ms. Pac-Man more appealing to players and AI developers alike, is the behaviour of the ghosts. The original Pac-Man game is entirely deterministic, so players can learn patterns to complete each level. The game can be beaten over and over by the simple repetition of the correct pattern. Ms. Pac-Man introduced enough random ghost behaviour to allow for general strategies but not patterns. Ms. Pac-Man was chosen for this project as it is well known and there is a lot of prior work. Most of the prior work has been done using either the screen-capture Ms. Pac-Man competition framework [4], or the Ms. Pac-Man vs. GhostTeam framework. This project uses our own emulator, written in Java and capable of playing the original Ms. Pac-Man code. The emulator is described in section III. The original game has more complexity than the Ms. Pac-Man vs. Ghost-Team framework, and while the screencapture framework is true to the original game, it has the computational overhead of converting the visible screen into usable information. The use of an emulator enabled the agent to play the original game using an API that maps directly onto the emulator’s RAM. Ms. Pac-Man is a good benchmark of an AI system as it combines simplicity with high difficulty. There are at most four possible options to choose from for any given state and the search space is confined to a single-screen maze. Despite this simplicity, Ms. Pac-Man remains a hard problem for AI agents. This is primarily because of the enclosed nature of the game space and the four-to-one ghost ratio. Simply trying to keep a certain distance from the ghosts is likely to end up with Ms. Pac-Man being trapped. Understanding how the ghosts will react to a particular move, and so avoiding being trapped, is the key to survival in Ms. Pac-Man. Ms. Pac-Man is not as simple as it first appears, mostly due the relative speeds and positions of the agents. In the early levels, Ms. Pac-Man is approximately 25% faster than the ghosts. This speed ratio changes as the game progresses through the levels until level 21, where Ms. Pac-Man is approximately 25% slower that the ghosts. Whenever Ms. Pac-Man eats a pill she pauses for a single frame, so paths with pills are slower to traverse than clear paths, potentially allowing a ghost to catch up. Ms. Pac-Man corners much faster than the ghosts; the ghosts always travel through the centre of each tile but Ms. Pac-Man has the ability to travel diagonally across corners, halving the distance travelled through that tile. Three of the ghosts make their decisions based partly on which direction Ms. Pac-Man is facing, so a change in direction can have a significant effect on the behaviour of the ghosts. When a ghost is eaten, all agents freeze momentarily, except the dead ghost eyes returning to base. All these details must be taken into consideration when playing the game. E. High Scores The highest published score for an AI playing the original Ms. Pac-Man is 44,630 [5]. This score was the maximum of 100 games, with level six being the highest reached. This would be considered a good score for a human, but the best human players can reach scores in excess of 900,000, clearing more than 130 levels [6]. The highest score recorded by the Ensemble agent is currently 162,280 at level 24, but this result was achieved while recording a video and is not part of the experimental data [7]. Ms. Pac-Man was recently released on Steam. The leader board would suggest 30,000 to be a reasonable average score for a human. In discussion with Patrick Scott Patterson— a video game advocate, journalist and record holder—Mr. Patterson suggested that six-figure scores were rare, and that only a handful of players in the world are capable of playing the game at this level. The current human world record is 933,580, set by Abdner Ashman in 2006. Only five people have officially reached over 900,000 points. II. M S . PAC -M AN VS . G HOST-T EAM Initial experiments for this project were done using the Ms. Pac-Man vs. Ghost-Team framework. This led to some useful insights and a very capable agent—usually reaching the global time-limit at around level 12, often without losing a life. The agent played especially well against highly predictable ghosts, such as the aggressive ghost team, where it could group the ghosts together, eat a power-pill and then eat all the ghosts in quick succession. To find out how the agent would fare against a top-ranking ghost team, we contacted the author of the Memetix ghost team, Daryl Tose, who very graciously sent us his code. As it turned out, despite the Memetix ghost team being almost completely deterministic, the Ensemble agent rarely got past the first level. The conclusion being that however strong the Ms. Pac-Man agent is, the ghosts can always win if they work as a team. Unfortunately, the Ms. Pac-Man vs. Ghost-Team competition is no longer running and the website is down. We were unable to see how the agent compared to other competition agents. III. JAMES James was written from the ground up to be an objectoriented Ms. Pac-Man emulator. Large sections of the code came from the ArcadeFlex project [8] [9]. The code was constructed as a core emulator, with a full emulator built around it. The core emulator emulates the CPU, RAM and I/O. The full emulator adds windowing, graphics and keyboard support. This allows the core emulator to be used as a forward model not tied to the 60 frames per second of the full emulator. An API for agents to interact with the game was created. Game state information is obtained by interpreting the contents of specific memory locations within the emulator. Actions are performed by setting the values of the memory-mapped I/O ports. A graph data structure was also created for mazebased queries. All-pairs tile distances were pre-calculated using the Floyd-Warshall algorithm [10]. In addition to the all-pairs distances, every tile stores the distance to every other tile for each available move. These directional distances were precalculated using A* search with the true minimum distance as the heuristic. Using the emulated Ms. Pac-Man code as a forward model is extremely accurate1 , but very inefficient. To counter this, an alternative forward model—the simulator—was created. The simulator is a native Java partial model of the game. A lot of work went into making the simulator as accurate as possible, especially with regard to ghost behaviour. Although the simulator it is not 100% accurate, it is generally accurate enough if synchronised with the emulator before each use. The simulator is very fast compared to the emulator, more than making up for the loss of accuracy. IV. E NSEMBLE AGENT FOR M S . PAC -M AN For the Ms. Pac-Man agent, the tasks were defined as: • Eat pills. This scores a modest amount of points, but its primary purpose is to finish the level. This is both a short and long range goal. Eating the next pill is a short range goal, eating all the pills is a long range goal. • Eat fruit. This scores quite a lot of extra points, depending on the fruit, but is not essential. Medium range goal. • Eat ghosts. This is a great way to score extra points during the early levels, but becomes impossible in the later levels. Medium range goal. • Avoid ghosts. Staying alive is, obviously, of primary concern. The ghosts are the only adversarial agents in the game, so knowing how not to get caught is key to survival. Short to medium range goal. It became apparent during initial experiments that simply having each voice offering its preferred move at any given point lead to a lot of deadlocks. The voices would often have 1 Too accurate, in fact. The pseudo-random number generator has to be reseeded in order to make the forward model non-deterministic. Fig. 2: Opposing opinions opposing opinions due to the completely disparate nature of their goals. In figure 2, Ms. Pac-Man is approaching a junction with three options: UP, LEFT or DOWN. The pill eating voice will vote to go DOWN, the ghost eating voice will vote to go LEFT and the fruit eating voice will vote to go UP. No reward is worth dying for, so the ghost avoiding voice will veto DOWN, leaving a deadlock between UP and LEFT. The move could be picked at random, or the arbiter could be crafted with some domain knowledge to make a more informed decision, but the Ensemble framework allows the use of fuzzy logic where the voices rate each available move according to its goal. Using the same scenario as in Figure 2, with DOWN vetoed by the ghost avoiding voice, the other three voices need to present their ratings for UP and LEFT. As the voices are all distance based, the ratings will be the inverse of the distance to the goal in each available direction. If the voices are weighted equally, the resulting move would be UP. An approximation of the calculation can be seen in Table I. Pill eater Fruit eater Ghost eater Sum (approx.) UP 1/7 1/3 1/24 1/2 LEFT 1/7 1/24 1/4 2/5 TABLE I: Calculating move values This solution is far less likely to lead to a tie-break situation, and it is also more flexible in terms of weighting each voice. In the above example the agent decided to go UP, essentially because the fruit is closer than the edible ghost. But it was a close call. Generally, there is likely to be more chance of eating the fruit in the future than the ghost, so LEFT would probably have been a better choice. Weighting the ghost eater higher than the fruit eater would have changed the decision to LEFT. Rating the pill eater low—because pills are low value and static—would likely make the agent head towards the fruit after eating the ghost, and so a powerful strategy is emerging from the simple rules. The arbiter never actually targets anything, or makes any sort of plan, it simply chooses the highest combined-rated move at any given point. The final Ensemble agent for Ms. Pac-Man in James is composed of four voices, with an arbiter taking the opinions of each voice and combining them to make the final decision. • Ghost Dodger. Avoiding ghosts is the most important aspect of the game, and is also the hardest to do, computationally. This voice is discussed in detail later. • Pill Muncher. This voice rates each move as the inverse of the tile distance to the nearest pill in that direction. Pills near ghosts are artificially made to look further away, meaning that the pill muncher will rate safe pills higher than those with ghosts near by. • • Fruit Muncher. This voice has no opinion unless there is a fruit bonus on the screen. If a fruit is on the screen, the voice will attempt to intercept it. It rates the available moves as the inverse of the tile distance to the fruit. Ghost Muncher. This voice only has an opinion if Ms. Pac-Man is energised. It rates each move based on the distance to the nearest edible ghost in that direction. It also tries to avoid eating a power-pill until all ghosts are out of their base. A. Arbitration The arbiter holds weights for each voice, and the rating for each move is calculated as the sum of each voice, not including Ghost Dodger, multiplied by its weight. This sum is then multiplied by Ghost Dodgers rating, which is also multiplied by its weight for normalising the overall rating, to give the final rating for the move. Rm = ( i=n X Vi,m Wi )V1,m n=2 R is a vector of move ratings, V is a matrix of voice move ratings where V1 always the Ghost Dodger, W is a vector of voice weights, m is the move being rated and n is the total number of voices. The arbiter will choose the move corresponding to the highest value in R. If more than one move has the highest rating, the arbiter will select at random from the highest rated moves. As a proof of concept, a simple one-plus-one evolutionary strategy was used to optimise the weights of the various voices. A baseline score was recorded over 100 games, then the weights were adjusted by a small random amount. Another 100 games were played with the new weights, with the new weights being kept if the average score improved. This was done 1000 times, for a total of 100,000 games. An early version of the ensemble AI was used for this experiment, and it showed the ability to increase the ability of that player. In this experiment, a modest but noticeable increase in average score of approximately 30% was achieved. Unfortunately this technique takes a very long time, and it was not used in any of the final agents. Dynamic weighting is also a possibility, combining the Ensemble arbiter with a finite-state machine. Using such a technique would allow the agent to adjust the voice weights depending on the situation. This could be of use in, for example, stealth games. One set of weights could be used during stealthy missions or portions of missions, with another set of weights used in situations where the player’s stealth has been compromised. Dynamic weighting could also be used in general video games playing (GVGP) [11], especially when combined with general-purpose components. B. Ghost Dodging The final Ghost Dodger algorithm uses the simulator for depth limited search, but rates each move based on random sampling. This algorithm is closely related to the averaged depth-limited search technique applied to the game 2048, as demonstrated at the IEEE CIG2014 conference in Dortmund [12]. The algorithm is given 10ms in which to make random depth-limited samples through the maze. Every time it reaches its depth limit of 8 without dying, the initial move’s score gets incremented. At the end of the 10ms, the voice returns its rating for each move, based on how many times it reached the depth limit. The depth of 8 was chosen as a trade-off between depth and the number of samples. For this algorithm, a move is a straight line from the current position to the next corner or junction. This simplifies the algorithm as Ms. PacMan’s direction does not need to be re-calculated mid-move for cornering. V. M ONTE -C ARLO T REE -S EARCH The Monte-Carlo Tree-Search (MCTS) based agent was created to set a benchmark for the Ensemble agent. This agent sets a target tile in the maze that is the next decision point2 in the current direction. The MCTS algorithm then utilises the time it takes to reach the target to calculate what the best move and new target will be when it gets there, thus giving the algorithm hundreds of milliseconds to deliberate on each move. The searching is done using the simulator, with the nodes in the tree storing the move needed to advance the simulation to that point. Initially, a full snapshot of the game-state was stored in the nodes, with the simulator being synchronised to that snapshot each time the root node has the selectAction() method called. Storing just the move turned out to be more efficient, and also more accurate when the ghost movements are random, than storing whole snapshots at the nodes. The simulator includes a scoring system, and score deltas are used in place of roll-outs. Because of this, the agent is not strictly MCTS. Using a standard roll-out meant playing to either death or a win. Wins are easy to reward, but how do you reward death, given that most roll-outs end in death? A standard MCTS player with roll-outs was tested, but it performed badly, even when using a depth-limited roll-out. 2 The initial ‘bootstrap’ target is (14,24) with the move set as LEFT. The tile (15,24) is always Ms. Pac-Man’s starting position, and LEFT to (14,24) is a valid safe move in all four mazes. It is worth pointing out that the MCTS agent ignores the fruit bonuses as they are not modelled in the simulator. This causes the agent to miss out on a lot of extra points. Another experiment was run using the Ensemble agent with the fruit munching voice disabled for more comparable results. Using the UCT algorithm unmodified lead to the MCTS creating highly asymmetric trees, so the UCT algorithm was adjusted to create more symmetric trees. Experiment runs were made using both configurations. VI. E XPERIMENTS For the experiments, each player played 100 full games. With the exception of the one-tenth speed experiment with the emulator, all games were run at normal game speed. The experiments run were: • Hello World AI. This is a purely reactive agent based on the Hello World agent from the Ms. Pac-Man vs. Ghost Team framework • Ensemble agent using the emulator and the safe-path ghost avoidance algorithm to a depth of three • Ensemble agent using the emulator and the safe-path ghost avoidance algorithm to a depth of three at onetenth speed • Ensemble agent using the simulator and the safe-path ghost avoidance algorithm to a depth of three • Ensemble agent using the simulator and the safe-path ghost avoidance algorithm to a depth of eight • Ensemble agent using the simulator and the safe-path ghost avoidance algorithm to a depth of twenty • MCTS agent with the UCT formula adjusted for symmetric trees • MCTS agent with the UCT formula adjusted for asymmetric trees • Final Ensemble agent with the fruit munching component removed to better match the MCTS agents • Final Ensemble agent • Final Ensemble agent with the ability to use the emulator removed A. Hello World AI The Hello World agent is a reactive agent with a simple behaviour tree (see figure 3). It is based off the Hello World agent from the Ms. Pac-Man vs. Ghost-Team framework. It covers all four key behaviours required for playing Ms. Pac-Man, but it does so in order of precedence. The ghost avoidance is weaker than that of the other agents, as it only knows where the ghosts are, not where they are going to be. B. Single Safe Path The first Ghost Dodger technique used the core emulator as a forward model. Running the full game on emulated hardware is very inefficient, but extremely accurate. This produced an agent that was short sighted, but very good at exploiting the Fig. 3: Hello World AI Behaviour Tree so called walk-through bug when trapped in a corner3 . The emulator forward model is too inefficient to use as a means of rating each move, so instead it was used to veto any moves leading to a quick death. The algorithm used had to be very efficient because the emulator is not. The algorithm is a depth-limited search of just three moves, where a move is travelling from one decision point to the next. A decision point is either a junction in the maze, a power pill or an artificial decision point used to break up a path that would otherwise be too long. For speed, the algorithm both fails fast and succeeds fast. As soon as a single safe path of three moves is found, the algorithm returns true. For greater efficiency, the simulator was used in place of the emulator. Over 100 games, the simulator-based agent did better than the ‘perfect’ emulator-based agent. The reason for this would appear to be timing. The game and the AI run asynchronously in separate threads, with the game advancing at 60 frames per second. If the AI agent takes longer than 16ms to make its decision, the game state will have changed; not by much, but possibly significantly. To account for this, and to set a benchmark, we ran another experiment of 100 games using the emulator-based agent but with the game slowed down to one-tenth speed, giving the agent 160ms between frames. Because the simulator is so much faster than the emulator, we ran experiments using the same algorithm but searching to a depth of 8 and to a depth of 20, both of which returned 3 The walk-through bug—also exploited by the best human players—is the result of how the original game detects collisions. Ms. Pac-Man and a ghost only collide if their centre points are in the same 8x8 pixel tile at the same time. If a ghost is in tile X, and Ms. Pac-Man is in tile Y in one frame, and in the next frame Ms. Pac-Man is in tile X and the ghost in tile Y, no collision is detected and Ms. Pac-Man is free to continue on her way. Player Mean Min. Max. Std. Dev. Player Mean Min. Max. Mode Median Hello World AI 12735 3290 32780 6759 Hello World AI 2.09 1 5 2 2 Ensemble (Emu 3 safe) 39297 4540 68910 14943 Ensemble (Emu 3 safe) 5.83 1 10 6 6 Ensemble (Emu 3 slow) 71259 9360 136310 26383 Ensemble (Emu 3 slow) 9.76 2 21 7 9 Ensemble (Sim 3 safe) 46672 6250 109190 21528 Ensemble (Sim 3 safe) 6.67 2 15 6 6 Ensemble (Sim 8 safe) 51447 13600 105440 19175 Ensemble (Sim 8 safe) 7.4 3 14 8 7 Ensemble (Sim 20 safe) 55843 15350 101660 21258 Ensemble (Sim 20 safe) 8.04 3 16 8 8 MCTS (symmetric) 57151 5260 95560 17068 MCTS (symmetric) 9.83 1 17 9 9 MCTS (asymmetric) 58058 19500 96120 16155 MCTS (asymmetric) 15.21 6 22 15 15.5 No Fruit Ensemble 69779 21990 105770 22236 No Fruit Ensemble 14.55 4 23 21 15 Final Ensemble 102238 8060 155640 29520 Final Ensemble 15.68 1 22 21 16.5 Sim Only Ensemble 74820 9160 124440 25573 Sim only Ensemble 11.21 2 22 9 10 TABLE II: Agent scores over 100 games TABLE III: Levels reached over 100 games Final Ensemble 100 results well within 16ms. While searching deeper did show an improvement, it was negligible. C. MCTS 90 Sim Only Ensemble 80 No Fruit Ensemble 70 MCTS 60 The MCTS player was developed to set a high bar and demonstrate a purely deliberative agent. Despite using only the simulator and hence no knowledge of fruit, the MCTS players managed to play to a high standard. The asymmetric MCTS did a much better job of surviving than the more symmetric version. Both, however, scored roughly the same. This would suggest that the symmetric version was better at scoring points, but more likely to get killed doing so. % 50 40 30 20 10 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Level Reached Fig. 4: Survival rates We are confident that the MCTS player is a reasonable benchmark and a powerful example of a deliberative agent D. Final Ensemble Along with the final Ensemble agent, two variants were also used in the experiments. The ‘no fruit’ version was created for a fairer comparison with the MCTS agent. Not trying to get the fruit should, in theory, make the agent score fewer points per level but survive longer as the agent will not be lured into dangerous situations by the prospect of eating fruit. The ‘simulator only’ version was created to see what effect not having access to the emulator would have. The final Ensemble agent uses the emulator as an extremely short range forward model to see the immediate outcome of the current move. Although this look-ahead is only eight frames, it allows the agent to better handle close-quarters interaction with the ghosts. The simulator is good, but not perfect. Being out by a couple of pixels makes little difference at long range, but it can make all the difference at close range. reached and is only beaten by the ‘no fruit’ Ensemble for highest level reached. A comparison of level reached between final Ensemble and the simulator only Ensemble can be seen in figure 5. This chart shows that emulator does provide a powerful tool to the Ensemble in terms of level reached. There is a peak at levels 8 and 9 that is far greater for the ‘simulator only’ Ensemble. The emulator helps the final Ensemble through these early levels on its way to a large peak at level 21. Although the sim-only % VII. R ESULTS Table II shows the results of the experiments in terms of points scored. Table III shows the results in terms of levels reached. Figure 4 shows the relative survivability of the four top agents. It shows the percentage that an agent reached a particular level during the experiment. Although not a clean sweep for the final Ensemble, it is the clear winner. It has much higher mean and maximum scores, it has the highest mean, mode and median in terms of level 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Final Ensemble Sim Only Ensemble 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Level Reached Fig. 5: With and without access to the emulator 22 23 % 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Ensemble no Fruit ACKNOWLEDGEMENTS MCTS George Moralis and the ArcadeFlex developers. Scott Lawrence for the Ms. Pac-Man disassembly. R EFERENCES [1] [2] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Level Reached Fig. 6: Ensemble (no fruit) vs. MCTS [3] [4] Ensemble has a very respectable high score and highest level, the averages are significantly lower. The ‘no fruit’ variant performed mostly as expected. It did not score as well as the final Ensemble, but it did get higher minimum and maximum levels reached. Figure 6 shows a comparison of levels reached for the ‘no fruit’ Ensemble and the MCTS agent. From this we can see that the MCTS agent coped better during the earlier levels, but the ‘no fruit’ Ensemble fared better in the later levels. Overall, the ‘no fruit’ Ensemble agent scored modestly better than the MCTS agent. It also has a much higher mode level of 21, compared to 15 for the MCTS agent, but the deaths in the early levels brings the mean level reached to just below that of the MCTS agent. VIII. C ONCLUSION The results in this paper show that, for Ms. Pac-Man at least, the Ensemble framework can be used to create real-time agents that perform as well as, if not better than, deliberative agents. The separation of components that can be purely reactive from those requiring deliberation allows the deliberative components to be as efficient as possible. Combining the fuzzy logic opinions of the component voices in a non-sequential manner does seem to generate deliberative level behaviour in a far more reactive time frame. IX. F UTURE W ORK The simple arbiter could be replaced by something more sophisticated and dynamic; possibly a trained neural network or a genetic algorithm to learn a strategic sense of the game. The experiments evolving the voice weights of the ensemble were mildly successful, but slow and tedious. It does, however, leave open the possibility of using deep reinforcement learning techniques to develop bigger picture strategies. The results for Ms. Pac-Man are better than anticipated, but it is a sample of one. The Ensemble framework needs to be applied to more and varied games before it can can be fully justified as a general framework for real-time decision making. X. C ODE The code used in this project can be downloaded from GitHub at https://github.com/philrod1/james [5] [6] [7] [8] [9] [10] [11] [12] B. Dasarathy and B. V. Sheela, “A composite classifier system design: Concepts and methodology,” Proceedings of the IEEE, vol. 67, no. 5, pp. 708–713, May 1979. D. Ferrucci, E. Brown, J. Chu-Carroll, J. Fan, D. Gondek, A. A. Kalyanpur, A. Lally, J. W. Murdock, E. Nyberg, J. Prager et al., “Building watson: An overview of the deepqa project,” AI magazine, vol. 31, no. 3, pp. 59–79, 2010. G. Chaslot, S. Bakkes, I. Szita, and P. Spronck, “Monte-carlo tree search: A new framework for game ai.” in AIIDE, 2008. S. Lucas. Ms pac-man competition. [Online]. Available: http: //csee.essex.ac.uk/staff/sml/pacman/PacManContest.html G. Foderaro, A. Swingler, and S. Ferrari, “A model-based cell decomposition approach to on-line pursuit-evasion path planning and the video game ms. pac-man,” in 2012 IEEE Conference on Computational Intelligence and Games (CIG), Sept 2012, pp. 281–287. Ms. Pac-Man top 10. [Online]. Available: http://www.twingalaxies. com/scores.php?scores=1386 “Ms. Pac-Man AI. New high score.” [Online]. Available: https: //youtu.be/Y9YazqWaEAM G. Moralis. Arcadeflex. [Online]. Available: http://www.arcadeflex.com ——. Arcadeflex code. [Online]. Available: https://github.com/ georgemoralis/arcadeflex036 S. Warshall, “A theorem on boolean matrices,” J. ACM, vol. 9, no. 1, pp. 11–12, Jan. 1962. [Online]. Available: http://doi.acm.org/10.1145/ 321105.321107 J. Levine, C. B. Congdon, M. Ebner, G. Kendall, S. M. Lucas, R. Miikkulainen, T. Schaul, and T. Thompson, “General video game playing,” Dagstuhl Follow-Ups, vol. 6, 2013. P. Rodgers and J. Levine, “An investigation into 2048 AI strategies,” in 2014 IEEE Conference on Computational Intelligence and Games, CIG 2014, Dortmund, Germany, August 26-29, 2014. IEEE, 2014, pp. 1–2. [Online]. Available: http://dx.doi.org/10.1109/CIG.2014.6932920
2cs.AI
arXiv:1706.06632v1 [math.ST] 20 Jun 2017 On the joint asymptotic distribution of the restricted estimators in multivariate regression model Sévérien Nkurunziza∗ and Youzhi Yu † Abstract The main Theorem of Jain et al.[Jain, K., Singh, S., and Sharma, S. (2011), Restricted estimation in multivariate measurement error regression model; JMVA, 102, 2, 264–280] is established in its full generality. Namely, we derive the joint asymptotic normality of the unrestricted estimator (UE) and the restricted estimators of the matrix of the regression coefficients. The derived result holds under the hypothesized restriction as well as under the sequence of alternative restrictions. In addition, we establish Asymptotic Distributional Risk for the estimators and compare their relative performance. It is established that near the restriction, the restricted estimators (REs) perform better than the UE. But the REs perform worse than the unrestricted estimator when one moves far away from the restriction. Keywords: ADR; Asymptotic normality; Measurement error; Multivariate regression model; Restricted estimator; Unrestricted estimator. 1 Introduction In this paper, we are interested in an estimation problem in multivariate ultrastructural measurement error model with more than one response variable. In particular, as in Jain et al. (2011), we consider the case where the regression coefficients may satisfy some linear restriction. It is practical to use such models in the real world if there is at least two ∗ University of Windsor, department of Mathematics and Statistics, 401 Sunset Avenue, Windsor, Ontario, N9B 3P4. Email: [email protected] † University of Windsor, 401 Sunset Avenue, Windsor, Ontario, N9B 3P4. Email: [email protected] correlated response variables. For example, in the field of medical sciences (see Dolby , 1976), more than one body index is often recorded and the interest is to relate these measurements to the amount of different nutrients in the daily diet. Similarly, as described in Bertsch et al. (1974), in the air pollution studies , the observed chemical elements contained in the polluted air are lead, thorium and Uranium etc. It is highly likely that the variables involved in the study may possess some measurement errors. Following Mardia (1980), multivariate regression is applicable in a wide range of situations, such as Economics (see Meeusen, 1997) and Biology (see Mcardle, 1988). We also refer to Stevens (2012) for a discussion about the importance of regression models in education and social-sciences. In this paper, we derive the asymptotic properties of the unrestricted and the restricted estimators of the regression coefficients in the multivariate regression models with measurement errors, when the coefficients satisfy some restrictions. To give a close reference, we quote Jain et al. (2011) who derived the unrestricted and three restricted estimators for the regression coefficients, and derived a theorem (see Jain et al., Theorem 4.1) which gives the marginal asymptotic distributions of the estimators under the restriction. To summarize the contribution of this paper, we generalize Theorem 4.1 of Jain et al. (2011) in three ways. First, we derive the joint asymptotic distribution of the unrestricted estimator and any member of the class of the restricted estimators under the restriction. Second, we derive the joint asymptotic distribution of the unrestricted estimator and any member of the class of the restricted estimators under the sequence of local alternative restrictions. Third, we derive the joint asymptotic distribution between the UE and all three restricted estimators given in Jain et al. (2011), under the restriction and under the sequence of local alternative restrictions. In addition, we establish the Asymptotic Distributional Risk (ADR) for the UE and the ADR of any member of the class of restricted estimators. We also compare the relative performance of the proposed estimators. In particular, we prove that in the neighborhood of the restriction, the restricted estimators dominate the unrestricted estimator. We also prove that as one moves far away from the restriction, the unrestricted estimator dominates the restricted estimators. Finally, we generalize Proposition A.10 and Corollary A.2 in Chen and Nkurunziza (2016). The rest of this paper is organized as follows. Section 2 outlines some preliminary results given in Jain et al. (2011). In Section 3, we present the main results of this paper. 2 More specifically, in Subsection 3.1, we establish the joint asymptotic distribution between the unrestricted estimator (UE) and any member of the restricted estimators under the restriction. In Subsection 3.2, we derive the joint asymptotic distributions between all estimators under the sequence of the local alternative restrictions. In Subsection 3.3, we derive ADR for the UE and restricted estimators and in Subsection 3.4, we analyse the relative performance of the UE and the restricted estimators. Finally, Section 4 gives some the concluding remark of this paper, and for the convenience of the reader, some technical results are given in the appendix. 2 Model Specifications and preliminary results In this section, we describe the multivariate regression model with measurement error as well as the assumptions used in order to establish the results of this paper. Following Jain et al. (2011), we consider the multivariate regression model given by Z = DB + E, where Z is a n × q matrix, D is a n × p matrix, B is p × q matrix of the regression coefficients and E is a n × q matrix of error terms. We assume that Z is observable but D is not observable and can be observed only through X with additional measurement error ∆ as X = D + ∆, where X and ∆ are n × p-random matrices. Further, we suppose that D = M + Ψ, where M is a n × p-matrix of fixed components and Ψ is a n × p-matrix of random components. We also suppose that some prior information about the regression coefficient B is available. In particular, for known matrices R1 , R2 and θ, we suppose that R1 BR2 = θ, (2.1) where R1 is r1 × p matrix, R2 is a q × r2 matrix and θ is r1 × r2 matrix. For the interpretation of the restriction in (2.1), R1 imposes a linear restriction on the parameters of 3 individual equations while R2 imposes a linear restriction across equations. For more details about the interpretation of this restriction, we refer for example to Izenman (2008), Jain et ′ al. (2011) and the references therein. To introduce some notations, let Z(i) = [z1i , z2i , ..., zni ] , ′ ′ let E(i) = [ǫi1 , ǫi2 , ...ǫiq ] , let Z = [Z(1) , Z(2) , ..., Z(q) ], E = [E(1) , E(2) , ..., E(n) ] . Further, ′ ′ let ∆ = [∆(1) , ∆(2) , ..., ∆(n) ] and let ∆(j) = [δj1 , δj2 , ..., δjp ] for j = 1, 2, ..., n, let M = ′ ′ ′ [M(1) , M(2) , ..., M(n) ] with M(j) = [Mj1 , M(j2) , ..., M(jp) ] , and let Ψ(j) = [ψj1 , ψj2 , ..., ψjp ] , j = 1, 2, ..., n. We also let Ip to stand for the p-dimensional identity matrix. The following assumptions are made in order to derive the proposed estimators and their asymptotic properties. Note that these conditions are similar to that in Jain et al. (2011). Assumption 1. (A1 ) Elements of vector E(i) = [ǫ1i , ǫ21 , ..., ǫni ] are independent with mean 0, variance σǫ2 , third moment γ1ǫ σǫ3 and fourth moment (γ2ǫ + 3)σǫ4 ; (A2 ) δij are independent and identically distributed random variables with mean 0, variance σδ 2 , third moment γ1δ σδ 3 and fourth moment (γ2δ + 3)σδ 4 ; (A3 ) Ψij are independent and identically distributed random variables with mean 0, variance σΨ 2 , third moment γ1Ψ σΨ 3 and fourth moment (γ2Ψ + 3)σΨ 4 ; (A4 ) ∆,Ψ, and E are mutually independent; (A5 ) M(n) → σM as n → ∞ and σM is finite; (A6 ) Rank(X)=p, Rank(R1 )=r1 and Rank(R2 )=r2 . 2.1 Estimation methods In this subsection, we outline some results given in Jain et al. (2011) which are used to derive the main results of this paper. Namely, we present the unrestricted estimator (UE) and three restricted estimators (REs) of the regression coefficients. By using the class of objective functions given in Jain et al. (2011), we also present a class of the restricted estimators which includes the three REs. For more details about the content of this subsection, we refer to Jain et al. (2011). 4 2.1.1 The unrestricted estimator As in Jain et al. (2011), one considers first the following objective function ′ G1 = tr((Z − XB) (Z − XB)), which leads to the least squares estimators (LSE) ′ ′ B̂ = (X X)−1 X Z. (2.2) Under parts (A1 ) − (A5 ) of Assumption 1, one can verify that B̂ converges in probability  ′ to KB 6= B, where K = Σ−1 Σ − σδ2 Ip with Σ = σM σM + σψ2 Ip + σδ2 Ip , and thus, B̂ is not a consistent estimator. Because of that, as in Jain et al. (2011), one replaces B̂ by −1 B̂1 = KX B̂, (2.3) −1 M ′ M + σ 2 I + σ 2 I , Σ −1 M ′ M + σ 2 I . where KX = Σ−1 D = n ψ p δ p ψ p X ΣD with ΣX = n Further, as in Jain et al. (2011), one can verify that p ΣX −−−→ Σ, n→∞ and p ΣD −−−→ Σ − σδ2 Ip n→∞ ′ where Σ = [σM σM + σψ2 Ip + σδ 2 Ip ]. As given in Jain et al. (2011), note that the estimator B̂1 can be obtained directly by minimizing the objective function ′ Ĝ2 = G1 − tr[B (nΣX )(Ip − KX )B]. (2.4) For more details, we refer to Jain et al. (2011). In the quoted paper, the authors prove that B1 is a consistent estimator for B. They also derive the following theorem which gives the √ asymptotic distribution of n(B̂1 − B). To introduce some notations, let 1 1 ′ 1 ′ 1 −2 K̄X = (ΣX − ΣD ) Σ−1 X X − n 2 ΣX , h = n− 2 (X [E − ∆B]) + n 2 σδ 2 B, X , H = n ′ ′ ′ ′ ′ Λ = lim E{[vec(h ) + vec(B K¯X H)][vec(h ) + vec(B K¯X H)] } and let 0 be a zero-matrix. n→∞ The existence of this matrix is established in Jain et al. (2011). Theorem 2.1. Suppose that Assumptions (A1 )-(A6 ) hold hold, we have d 1 n 2 (B̂1 − B) −−−→ η1 ∼ Np×q (0, A1 ΛA′1 ), where A1 = (ΣK)−1 ⊗ Iq . n→∞ The proof is similar to that given in Jain et al. (2011, see the proof of Theorem 4.1). 2.1.2 A class of restricted estimators In this subsection, we present a class of estimators of B which are consistent and satisfy the restriction in (2.1). As commonly the case in constrained estimation, this is obtained by 5 minimizing a certain objective function subject to the constraint. In particular, since the objective function Ĝ2 given in (2.4) leads to a consistent estimator, the RE can be obtained by minimizing Ĝ2 subject to the constraint R1 BR2 = θ. The following proposition shows that the above objective function can be seen as a member of a certain class of objective functions. For more details, we refer to Jain et al. (2011). ′ ′ ′ Proposition 2.1. We have Ĝ2 = tr(Z Z) + tr[(B̂1 − B) (X X)KX (B̂1 − B)]. The proof follows directly from algebraic computations. From Proposition 2.1, as in Jain et al. (2011) one considers below a more general class of objective functions. To this end, let Pp×p denote the set of all observable p × p-symmetric and positive definite matrices and let n   o ′ Ĝ3 Σ̂ = tr((B̂1 − B) Σ̂(B̂1 − B)) : Σ̂ ∈ Pp×p . (2.5) ′ Thus, Ĝ2 is a member of this class with Σ̂ = (X X)KX . Other members of objective ′ functions correspond to the cases where Σ̂ = S = X X and Σ̂ = n Ip . For further details about the objective function in (2.5), we refer to Jain et al. (2011). From the above class of objective function, one obtains a class of restricted estimators {B̃(Σ̂) : Σ̂ ∈ Pp×p } which satisfies the constraint R1 BR2 = θ. Namely, by using the Lagrangian method, we get i−1   ′ h ′ ′ R1 B̂1 R2 − θ (R2 R2 )−1 R2 , B̃(Σ̂) = B̂1 − (Σ̂)−1 R1 R1 (Σ̂)−1 R1 (2.6) where Σ̂ is a known symmetric and positive definite matrix. In particular, from (2.6), by ′ ′ replacing Σ̂ by (X X)KX , X X and nIp , respectively, one gets ′ ′ ′ ′ ′ ′ B̂2 = B̂1 − (X XKX )−1 R1 [R1 (X XKX )−1 R1 ]−1 (R1 B̂1 R2 − θ)(R2 R2 )−1 R2 , (2.7) i   ′ h ′ ′ ′ −1 ′ ′ R1 B̂1 R2 − θ (R2 R2 )−1 R2 , B̂3 = B̂1 − (X X)−1 R1 R1 (X X)−1 R1 (2.8) −1   ′  ′ ′ ′ R1 B̂1 R2 − θ (R2 R2 )−1 R2 . B̂4 = B̂1 − R1 R1 R1 (2.9) Note that the estimators B̂2 , B̂3 and B̂4 are derived in Jain et al. (2011). Here, their derivation is given for the paper to be self-contained. 6 3 Main results In this section, we derive the joint asymptotic distribution of all estimators, under the restriction as well as under the sequence of local alternative restrictions. In particular, we generalize Theorem 4.1 in Jain et al. (2011) which gives the marginal asymptotic distributions under the restriction. 3.1 Asymptotic properties under the restriction In this subsection, we derive the joint asymptotic normality of the UE and any member of the restricted estimators, under the restriction. We suppose that the weighting matrix Σ̂ satisfies the following assumption. Assumption 2. Σ̂ is such that 1 P Σ̂ −−−→ Q0 where Q0 is nonrandom and positive definite n n→∞ matrix. ′ ′ Note that the matrices X XKX , X X and nIp satisfy Assumption 2 with the matrix Q0 equals to ΣK, Σ and Ip respectively. To set up some notations, let A1 = (ΣK)−1 ⊗ Iq , let ′ ′ A2 (Q0 ) = A1 − (Q0 )−1 R1 (R1 (Q0 )−1 R1 )−1 R1 (ΣK)−1 ⊗ R2 (R2′ R2 )−1 R2′ , ′ ′ Σ11 = A1 ΛA′1 , Σ22 (Q0 ) = A2 (Q0 ) ΛA2 (Q0 ) , Σ21 (Q0 ) = Σ12 (Q0 ) , (3.1) ′ Σ12 (Q0 ) = A1 ΛA2 (Q0 ) . Theorem 3.1. If Assumptions 1-2hold and R1 BR2 = θ, we have    ′ ′ ′   1 1 ′ ′ d −−−→ η1′ , ζ ∗ where n 2 B̂1 − B , n 2 B̃(Σ̂) − B n→∞   η1 ζ∗    ∼ N2p×q  0 0   , Σ11 Σ12 (Q0 ) Σ21 (Q0 ) Σ22 (Q0 )   , (3.2) where Σ11 , Σ12 (Q0 ), Σ21 (Q0 ) and Σ22 (Q0 ) are defined in (3.1). The proof of this theorem is given in the Appendix. The above theorem generalizes Theorem 4.1 in Jain et al. (2011) in two ways. First, the estimator B̂(Σ̂) encloses as special cases the restricted estimators B̂2 , B̂3 and B̂4 . Second, the above result gives the joint asymptotic distribution between the UE and any member of the class of restricted 7 estimators; from which the marginal asymptotic distribution follows directly. Indeed, if Q0 is taken as KΣ, Σ and Ip , respectively, the above result gives the asymptotic distribution       of n1/2 B̂2 − B , n1/2 B̂3 − B , and n1/2 B̂4 − B given in Jain et al. (2011). Below, we give another generalization of the limiting distributions given in Jain et al. (2011). In particular, we establish the joint asymptotic normality between the estimators B̂1 , B̂2 , B̂3 and B̂4 , under the sequence of local alternative restrictions. On the top of this result, as intermediate step, we also generalize Proposition A.10 and Corollary A.2 in Chen and Nkurunziza (2016). 3.2 Asymptotic results under local alternative In this subsection, we present the asymptotic properties of the UE and the restricted estimators under the following sequence of local alternative restrictions θ0 R1 BR2 = θ + √ , n (3.3) n = 1, 2, .... where θ0 is fixed with ||θ0 || < ∞. Note that if θ0 = 0 in (3.3), then (3.3) becomes (2.1). Thus, the results established under (3.3) generalize the results given in Jain et al. (2011), which are established under (2.1). Theorem 3.2. Suppose that Assumptions 1 and 2 holdalong with the sequence of local  ′   ′ ′  1 ′ ′ d B̂1 − B , B̃(Σ̂) − B where alternative in (3.3), then n 2 −−−→ η1′ , η ∗ n→∞   η1 η∗    ∼ N2p×q  ′ 0 µ (Q0 ) ′   , ′ Σ11 Σ12 (Q0 ) Σ21 (Q0 ) Σ22 (Q0 )   , (3.4) ′ −1 −1 −1 where µ (Q0 ) = −Q−1 0 R1 (R1 Q0 R1 ) θ0 (R2 R2 ) R2 ,, Σ11 , Σ12 (Q0 ), Σ21 (Q0 ) and Σ12 (Q0 ) are defined as in Theorem 3.1. The proof of this theorem is given in the Appendix. By using the similar techniques, we establish the joint distribution of the UE and the restricted estimators given in (2.7), (2.8) 8 and (2.9). To introduce some notations, let ′ ′ A2 = A1 − (ΣK)−1 R1 (R1 (ΣK)−1 R1 )−1 R1 (ΣK)−1 ⊗ R2 (R2′ R2 )−1 R2′ , ′ ′ A3 = A1 − (Σ)−1 R1 (R1 (Σ)−1 R1 )−1 R1 (ΣK)−1 ⊗ R2 (R2′ R2 )−1 R2′ , ′ ′ A4 = A1 − R1 (R1 R1 )−1 R1 (ΣK)−1 ⊗ R2 (R2′ R2 )−1 R2′ , ′ Σij = Ai ΛAj , i = 1, 2, 3, 4, j = 1, 2, 3, 4, ′ ′ ′ ′ µ2 = −(ΣK)−1 R1 (R1 (ΣK)−1 R1 )−1 θ0 (R2 R2 )−1 R2 , ′ ′ ′ ′ ′ ′ ′ ′ µ3 = −Σ−1 R1 (R1 Σ−1 R1 )−1 θ0 (R2 R2 )−1 R2 , µ4 = −R1 (R1 R1 )−1 θ0 (R2 R2 )−1 R2 . Theorem 3.3. If Assumption 1 holds along with (3.3), we have       ′ ′ ′ ′ ′ 1 1 1 1 d 2 2 2 2 n B̂1 − B , n B̂2 − B , n B̂3 − B , n B̂4 − B −−−→ η where n→∞  η1   0   Σ11 Σ12 Σ13 Σ14            η2   µ2   Σ21 Σ22 Σ23 Σ24     ,  η=  ∼ N4p×q     η3   µ3   Σ31 Σ32 Σ33 Σ34      η4 µ4 Σ41 Σ32 Σ43 Σ44      .    (3.5) The proof of this theorem is given in the Appendix. Since the sequence of local alternative includes as a special case the restriction, one deduces the following corollary. Corollary 3.1. If Assumption 1 holds and R1 BR2 =  θ, we have  ′  ′  ′  ′ ′ 1 d B̂1 − B , B̂2 − B , B̂3 − B , B̂4 − B −−−→ (η1′ , ζ2′ , ζ3′ , ζ4′ )′ where n2 n→∞  η1   0   Σ11 Σ12 Σ13 Σ14            0   Σ  ζ2  Σ22 Σ23 Σ24  ∼ N4p×q   ,  21        0   Σ31 Σ32 Σ33 Σ34  ζ3       ζ4 Σ41 Σ32 Σ43 Σ44 0      .    (3.6) The proof follows directly from Theorem 3.3 by taking θ0 = 0. 3.3 Asymptotic Distributional Risk Asymptotic Distributional Risk (ADR) is one of the important statistical tools to compare different estimators. In this subsection, we derive ADR of the UE and that of any member of the proposed class of the restricted estimators, i.e. ADR of B̂1 and B̃(Σ̂). Recall that, 9 if √ d n(θ̂ − θ) −−−→ U , where θ̂, θ and U are matrices. The ADR is defined as n→∞ ′ ADR(θ̂, θ; W ) = E[tr(U W U )], where W is a weighting matrix. For more details about the ADR, we refer for example to Saleh (2006), Chen and Nkurunziza (2015, 2016) and ′ ′ −1 −1 references therein. To introduce some notations, let C3 (Q0 ) = Q−1 0 R1 (R1 Q0 R1 ) , C4 = ′ ′ (R2 R2 )−1 R2 , J1 (Q0 ) = C3 (Q0 )R1 Q−1 0 and J = R2 C4 . Theorem 3.4. Suppose that the conditions of Theorem 3.2 hold, then ADR(B̂1 , B; W ) = tr((W ⊗ Iq )(A1 ΛA′1 )), ′ ADR(B̃(Σ̂), B, W ) = ADR(B̂1 , B, W ) − f1 (Q0 ) + (vec(θ0 )) F1 (Q0 )vec(θ0 ), with ′ ′ f1 (Q0 ) = tr(((J1 (Q0 )W ⊗ J) ⊗ Ipq )vec(((ΣK)−1 ⊗ Iq ))(vec(Λ)) ) ′ and ′ F1 (Q0 ) = C3 (Q0 )W C3 (Q0 ) ⊗ (R2 R2 )−1 . The proof of this theorem follows from Theorem 3.1. For the convenience of the reader, it is also outlined in the Appendix. 3.4 Risk Analysis In this section, we compare ADR(B̃(Σ̂), B, W ) and ADR(B̂1 , B; W ) in order to evaluate the relative performance of B̃(Σ̂) and B̂1 . To simply some notations, for a given symmetric matrix A, let chmin (A) and chmax (A) be, respectively, the smallest and largest eigenvalues of A. Theorem 3.5. Suppose that the conditions of Theorem 3.4 hold. If ||θ0 ||2 < then ADR(B̃(Σ̂), B, W ) ≤ ADR(B̂1 , B; W ). If ||θ0 ||2 > f1 (Q0 ) , chmax (F1 (Q0 )) f1 (Q0 ) , chmin (F1 (Q0 )) then ADR(B̃(Σ̂), B, W ) > ADR(B̂1 , B; W ). The proof of this theorem is given in the Appendix. Remark 3.1. Since ADR(B̃(Σ̂), B, W ) and ADR(B̂1 , B; W ) are positive real numbers,  ADR(B̃(Σ̂), B, W ) ≤ ADR(B̂1 , B; W ) iff ADR(B̂1 , B; W ) ADR(B̃(Σ̂), B, W ) > 1. This ratio is known as the mean squares relative efficiency (RE). In presenting the simulation results, we compare the estimators by using the RE. 10 4 Concluding Remarks In this paper, we study the asymptotic properties of the UE and the restricted estimators of the regression coefficients of multivariate regression model with measurement errors, when the coefficients may satisfy some restrictions. In comparison with the findings in literature, we generalize Proposition A.10 and Corollary A.2 in Chen and Nkurunziza (2016). Further, we generalize Theorem 4.1 of Jain et al. (2011) in three ways. First, we derive the joint asymptotic distribution between the UE and any member of the class of the restricted estimators under the restriction. Recall that, in the quoted paper, only the marginal asymptotic normality is derived under the restriction. Second, we derive the joint asymptotic normality between the UE and any member of the class of the restricted estimators under the sequence of local alternative restrictions. Third, we establish the joint asymptotic distribution between the UE and the three restricted estimators, given in Jain et al. (2011), under the restriction and under the sequence of local alternative restrictions. Further, we establish the ADR of the UE and the ADR of any member of the class of restricted estimators under the sequence of local alternative restrictions. We also study the risk analysis and establish that the restricted estimators perform better than the unrestricted estimator in the neighborhood of the restriction. Acknowledgement The authors would like to acknowledge the financial support received from the Natural Sciences and Engineering Research Council of Canada (NSERC). A Some technical results In this appendix, we give technical results and proofs which are underlying the established results. The following lemma is useful in establishing the asymptotic distributions. Lemma A.1. Let Y be a p × q random matrix and Y ∼ Np×q (O, Λ), with Λ a pq × pq matrix. For j = 1, 2, . . . , m, let κj and αj be p × p− nonrandom matrices, let ιj and βj be q × q-nonrandom matrices, and let ̺j be p × q-nonrandom matrices. Then 11          κ1 Y ι1 + α1 Y β1 + ̺1 κ2 Y ι2 + α2 Y β2 + ̺2 .. . κm Y ιm + αm Y βm + ̺m ′ where     ∼ Nmq×p    Aji = (Aij ) , i, j = 1, 2, . . . , m, and         ̺1 ̺2 .. . ̺m   A11 A12 ···       A21 A22 · · · ,   ..   . ··· ···   Am1 Am2 · · · A1m A2m .. . Amm      ,    ′ Aij = (κi ⊗ ι′i )Λ(κ′j ⊗ ιj ) + (κi ⊗ ι′i )Λ(α′j ⊗ βj ) + (αi ⊗ βi′ )Λ(αj ⊗ βj ) ′ ′ + (αi ⊗ βi )Λ(αj ⊗ βj ). Proof. We have κ1 Y ι1 + α1 Y β1 + ̺1    κ2 Y ι2 + α2 Y β2 + ̺2  vec  ..  .           =        ′ κ1 ⊗ ι′1 + α1 ⊗ β1   vec(̺1 )         vec(̺2 )  κ2 ⊗ + α2 ⊗ β2   vec(Y ) +      .. ..    . .    ′ ′ κm Y ιm + αm Y βm + ̺m κm ⊗ ιm + αm ⊗ βm vec(̺m ) then the rest of the proof follows from the properties of normal random vectors along with ι′2 ′ some algebraic computations, this completes the proof. Note that this result is more general than Corollary A.2 in Chen and Nkurunziza (2016). By using this lemma, we establish the following lemma, which is more general than Proposition A.10 and Corollary A.2 in Chen and Nkurunziza (2016).The established lemma is particularly useful in deriving the joint asymptotic normality between B̂1 , B̂2 ,B̂3 and B̂4 . ∞ ∞ ∞ ∞ Lemma A.2. For j = 1, 2, . . . , m, let {κjn }∞ n=1 , {ιjn }n=1 {αjn }n=1 ,{βjn }n=1 , {̺jn }n=1 , P P P n→∞ n→∞ n→∞ be sequences of random matrices such that κjn −−−→ κj , ιjn −−−→ ιj , αjn −−−→ αj , P P n→∞ n→∞ βjn −−−→ βj , ̺jn −−−→ ̺j , where, for j = 1, 2, . . . , m, κj , αj , ιj and βj ,̺j , are nonrandom matrices as defined in Lemma A.1. If a sequence of p × q random matrices {Yn }∞ n=1 d is such that Yn −−−→ Y ∼ Np×q (0, Λ), where Λ is a pq × pq matrix. We have n→∞   κ1n Yn ι1n + α1n Yn β1n + ̺1n      κ2n Yn ι2n + α2n Yn β2n + ̺2n  d  −−−→ U ∼ Nmq×p (̺, A)   n→∞ ..   .   κmn Yn ιmn + αmn Yn βmn + ̺mn 12     with ̺ =     ̺1   A11 A12 ··· A1m            A21 A22 · · · A2m  , A =     .. .. ,   .  · · · · · · .    ̺m Am1 Am2 · · · Amm where Aij , i = 1, 2, . . . , m; j = 1, 2, . . . , m are as defined in Lemma A.1. ̺2 .. . Proof. We have  vec(κ1n Yn ι1n + α1n Yn β1n + ̺1n )    vec(κ2n Yn ι2n + α2n Yn β2n + ̺2n )   ..  .  vec(κmn Yn ιmn + αmn Yn βmn + ̺mn )       =       ′ κ1n ⊗ ι′1n + α1n ⊗ β1n κ2n ⊗ ι′2n ′ + α2n ⊗ β2n .. . ′      vec(Yn )    κmn ⊗ ι′mn + αmn ⊗ βmn  vec(̺1n )    vec(̺2n ) +  ..  .  vec(̺mn )  vec(̺1n )   vec(̺1 )        vec(̺2n )  P  vec(̺2 ) d   where vec(Yn ) −−−→ vec(Y ) ∼ Npq (0, Λ),  −−→  −  .. .. n→∞ n→∞    . .    vec(̺mn ) vec(̺m )     ′ ′ κ1n ⊗ ι′1n + α1n ⊗ β1n κ1 ⊗ ι′1 + α1 ⊗ β1     ′ ′      κ2n ⊗ ι′2n + α2n ⊗ β2n  P  κ2 ⊗ ι′2 + α2 ⊗ β2     . and  −−→ −  .. .. n→∞      . .     ′     ,        ,    ′ κmn ⊗ ι′mn + αmn ⊗ βmn κm ⊗ ι′m + αm ⊗ βm Then, have   by using Slutsky’s theorem, we  κ1 Y ι1 + α1 Y β1 + ̺1 κ1n Yn ι1n + α1n Yn β1n + ̺1n        κ2 Y ι2 + α2 Y β2 + ̺2  κ2n Yn ι2n + α2n Yn β2n + ̺2n  d  −−−→ vec  vec  n→∞   .. ..    . .    κm Y ιm + αm Y βm + ̺m κmn Yn ιmn + αmn Yn βmn + ̺mn 13      and then      κ1n Yn ι1n + α1n Yn β1n + ̺1n              d  −−−→   n→∞      κ2n Yn ι2n + α2n Yn β2n + ̺2n .. .  κ1 Y ι1 + α1 Y β1 + ̺1 κ2 Y ι2 + α2 Y β2 + ̺2 .. . κmn Yn ιmn + αmn Yn βmn + ̺mn κm Y ιm + αm Y βm + ̺m Then, the proof follows directly from Lemma A.1.     ≡ U.    From this lemma, we establish the following corollary. Corollary A.1. Suppose that the conditions Lemma A.2 hold. We have ′ d ′ ′ ′ ′ ′ (Yn , (Yn + α2n Yn β2n + ̺2n ) ) −−−→ (Y , (Y + α2 Y β2 + ̺2 ) ) , with n→∞   where V11 = Λ; Y Y + α2 Y β2 + ̺2    ∼ N2q×p  ′ V12 = Λ + Λ(α2 ⊗ β2 ); ′ 0 ̺2   , V11 V12 V21 V22   ′ V21 = (V12 ) ; ′ V22 = (Ipq + α2 ⊗ β2 )Λ(Ipq + α2 ⊗ β2 ). The proof follows directly from Lemma A.2 by taking m = 2, κjn = Ip , ιjn = Iq , α1n = 0, β1n = 0 and ̺1n = 0. Proof of Theorem 3.2. We have ′ ′ ′ ′ (B̂(Σ̂) − B) = (B̂1 − B) + (Σ̂)−1 R1 [R1 (Σ̂)−1 R1 ]−1 (θ − R1 B̂1 R2 )(R2 R2 )−1 R2   = (B̂1 − B) − G2n (W0 )R1 B̂1 − B R2 Pn + G2n (W0 )(θ − R1 B1 R2 )Pn . ′ ′ ′ ′ with G2n (W0 ) = (Σ̂)−1 R1 [R1 (Σ̂)−1 R1 ]−1 and Pn = (R2 R2 )−1 R2 . Then, since √ R1 BR2 = θ + θ0 n, this last relation gives  1  1 1 n 2 (B̂(Σ̂) − B) = n 2 (B̂1 − B) − G2n (W0 )R1 n 2 (B̂1 − B) R2 Pn − G2n (W0 )θ0 Pn . Hence,  √    1 2 n (B̂1 − B) n(B̂1 − B)  =   1  1 √ 2 2 n (B̂1 − B) − G2n (W0 )R1 n (B̂1 − B) R2 Pn n(B̂(Σ̂) − B)   0 . + −G2n (W0 )θ0 Pn 14 P P ′ ′ Note that G2n −−−→ G2 (Q0 ) and Pn −−−→ P , with G2 (Q0 ) = (Q0 )−1 R1 (R1 (Q0 )−1 R1 )−1 and P = n→∞ ′ ′ (R2 R2 )−1 R2 . n→∞ Further, let α = G2 (Q0 )R1 , let β = R2 P and let ̺ = G2 (Q0 )θ0 P . By using Corollary A.1, we have   √   n(B̂1 − B) Y  −−d−→    √ n→∞ n(B̂(Σ̂) − B) Y + αY β + ̺     Σ11 Σ12 (Q0 ) 0  , , ∼ N2q×p  Σ21 (Q0 ) Σ22 (Q0 ) µ (Q0 ) this completes the proof. Proof of Theorem 3.1. The proof follows from Theorem 3.2 by taking µ (Q0 ) = 0. Proof of Theorem 3.3. From (2.7), (2.8) and (2.9), we have 1 1 1 1 n 2 (B̂2 − B) = n 2 (B̂1 − B) − n 2 G2n R1 (B̂1 − B)R2 Pn + n 2 G2n (θ − R1 BR2 )Pn 1 1 1 n 2 (B̂3 − B) = n 2 (B̂1 − B) + n 2 G3n (θ − R1 B̂1 R2 )Pn 1 1 1 1 n 2 (B̂4 − B) = n 2 (B̂1 − B) − n 2 G4n R1 (B̂1 − B)R2 Pn + n 2 G4n (θ − R1 BR2 )Pn . ′ ′ ′ ′ with G2n = (SKX )−1 R1 [R1 (SKX )−1 R1 ]−1 , S = X ′ X, G3n = S −1 R1 [R1 S −1 R1 ]−1 , √ ′ ′ ′ ′ G4n = R1 [R1 R1 ]−1 , Pn = (R2 R2 )−1 R2 . Then, since R1 BR2 = θ + θ0 / n, we have 1 1 1 n 2 (B̂2 − B) = n 2 (B̂1 − B) − n 2 G2n R1 (B̂1 − B)R2 Pn + G2n θ0 Pn 1 1 1 1 1 1 n 2 (B̂3 − B) = n 2 (B̂1 − B) − n 2 G3n R1 (B̂1 − B)R2 Pn + G3n θ0 Pn . n 2 (B̂4 − B) = n 2 (B̂1 − B) − n 2 G4n R1 (B̂1 − B)R2 Pn + G4n θ0 Pn . Therefore,  1 n 2 (B̂1 − B)   1  n 2 (B̂2 − B)   1  n 2 (B̂3 − B)  1 n 2 (B̂4 − B) 1   1 2 n (B̂1 − B)      1   n 2 (B̂ − B) − G R n 21 (B̂ − B) R P + G θ P   1 2n 1 1 2 n 2n 0 n =  1    1   n 2 (B̂1 − B) − G3n R1 n 2 (B̂1 − B) R2 Pn + G3n θ0 Pn    1  1 n 2 (B̂1 − B) − G4n R1 n 2 (B̂1 − B) R2 Pn + G4n θ0 Pn      ,    d with n 2 (B̂1 − B) −−−→ η1 ∼ Np×q (O, Σ11 ), n→∞ P ′ ′ P ′ ′ G2n −−−→ G2 = (ΣK)−1 R1 (R1 (ΣK)−1 R1 )−1 , G3n −−−→ G3 = Σ−1 R1 (R1 Σ−1 R1 )−1 , n→∞ P n→∞ ′ ′ P ′ ′ G4n −−−→ G4 = R1 (R1 R1 )−1 , Pn −−−→ P = (R2 R2 )−1 R2 . n→∞ n→∞ Lemma A.2, we get the statement of the proposition. 15 Therefore, by using Proof of Theorem 3.4. The first statement follows from Theorem 3.2. Further, we have,      ADR B̃(Σ̂), B, W = tr (W ⊗ Iq )E vec(η ∗ ) (vec(η ∗ ))′  = tr((W ⊗ Iq )(Σ22 (Q0 ))) + tr µ′ (Q0 )W µ(Q0 ) . This gives ′ ADR(B̃(Σ̂), B, W ) = ADR(B̂1 , B; W ) − tr((W ⊗ Iq )(A1 Λ(J1 (Q0 ) ⊗ J)) ′ −tr((W ⊗ Iq )((J1 (Q0 ) ⊗ J)ΛA′1 ) + tr((W ⊗ Iq )((J1 (Q0 ) ⊗ J)Λ(J1 (Q0 ) ⊗ J))) ′ ′ ′ +tr((C4 C4 ) ⊗ (C3 (Q0 )W C3 (Q0 ))vec(θ0 )(vec(θ0 )) ). Further, one can verify that vec(J1 (Q0 ) ⊗ J) = vec((ΣK)−1 ⊗ Iq ). Then, the rest of the proof follows from some algebraic computations. Proof of Theorem 3.5. From Theorem 3.4, we have ′ ADR(B̃(Σ̂), B, W ) = ADR(B̂1 , B, W ) − f1 (Q0 ) + (vec(θ0 )) F1 (Q0 )vec(θ0 ). (A.1) Note that f1 (Q0 ) > 0 and obviously, if f1 (Q0 ) = 0, ADR(B̃(Σ̂), B; W ) >ADR(B̂1 , B, W ) ′ provided that (vec(θ0 )) F1 (Q0 )vec(θ0 ) > 0. Thus, we only consider the case where f1 (Q0 ) > 0. From (A.1), ADR(B̃(Σ̂), B; W ) >ADR(B̂1 , B, W ) if and only if ′ ′ −f1 (Q0 ) + (vec(θ0 )) F1 (Q0 )vec(θ0 ) > 0. If f1 (Q0 ) < (vec(θ0 )) F1 (Q0 )vec(θ0 ), we have ′ f1 (Q0 ) f1 (Q0 ) < 1, and (vec(θ0 )) vec(θ0 ) < ||θ0 ||2 . ′ (vec(θ0 )) F1 (Q0 )vec(θ0 ) (vec(θ0 ))′ F1 (Q0 )vec(θ0 ) Further, since f1 (Q0 ) > 0, we have ′ 1 (vec(θ0 )) F1 (Q0 )vec(θ0 ) > . ′ (vec(θ0 )) vec(θ0 )f1 ||θ0 ||2 (A.2) Further, by using Courant Theorem, we have ′ (vec(θ0 )) F1 (Q0 )vec(θ0 ) chmin (F1 (Q0 )) < < chmax (F1 (Q0 )). (vec(θ0 ))′ vec(θ0 ) (A.3) Therefore, for the inequality in (A.2) to hold, it suffices to have 1 chmin (F1 (Q0 )) < . 2 ||θ0 || f1 (Q0 ) f1 (Q0 ) , we have ADR(B̃(Σ̂), B, W ) > ADR(B̂1 , B; W ). Furchmin (F1 (Q0 )) ′ ther, if f1 (Q0 ) > (vec(θ0 )) F1 (Q0 )vec(θ0 ), by using (A.3), we establish the condition that if f1 (Q0 ) , then ADR(B̃(Σ̂), B, W ) < ADR(B̂1 , B; W ), this completes the ||θ0 ||2 < chmax (F1 (Q0 )) proof. That is if ||θ0 ||2 > 16 References [1] Bertsch, W., Chang, R. C, and Zlatkis, A. (1974). The determination of organic volatiles in air pollution studies: characterization of proles. Journal of chromatographic science, 12(4):175–182. [2] Chen, F., and Nkurunziza, S. (2015). Optimal method in multiple regression with structural changes. Bernoulli, 21(4):2217–2241. [3] Chen, F., and Nkurunziza, S. (2016). A class of Stein-rules in Multivariate Regression Model with Structural Changes. Scandinavian Journal of Statistics, 43:83–102. [4] Dolby, G. R. (1976). The ultrastructural relation: a synthesis of the functional and structural relations. Biometrika, 63(1): 39–50. [5] Izenman, A. J. (2008). Modern multivariate statistical techniques: Regression, classification and manifold learning. Springer Science+Business Media, LLC, New York. [6] Jain, K., Singh, S., and Sharma, S. (2011). Restricted estimation in multivariate measurement error regression model. Journal of Multivariate Analysis, 102(2):264–280. [7] Mardia, K. V., Kent, J. T., and Bibby, J. M. (1980). Multivariate analysis, 1st edition, Academic press. [8] McArdle, B. H. (1988). The structural relationship: regression in biology. Canadian Journal of Zoology, 66(11): 2329–2339. [9] Saleh, A.K. Md E. (2006). Theory of preliminary test and Stein-type estimation with applications, volume 517. John Wiley & Sons. [10] Stevens, J., P. (2012). Applied multivariate statistics for the social sciences. Routledge. 17
10math.ST
Antunes, R., Gonzalez, V., and Walsh, K. 2015. “Identification of repetitive processes at steady- and unsteadystate: Transfer function” Proc. 23rd Ann. Conf. of the Int’l. Group for Lean Construction, 28-31 July, Perth, Australia, pp. 793-802, available at www.iglc.net IDENTIFICATION OF REPETITIVE PROCESSES AT STEADY- AND UNSTEADYSTATE: TRANSFER FUNCTION Ricardo Antunes1, Vicente A. González 2 , and Kenneth Walsh 3 ABSTRACT Projects are finite terminating endeavors with distinctive outcomes, usually, occurring under transient conditions. Nevertheless, most estimation, planning, and scheduling approaches overlook the dynamics of project-based systems in construction. These approaches underestimate the influence of process repetitiveness, the variation of learning curves and the conservation of processes’ properties. So far, estimation and modeling approaches have enabled a comprehensive understanding of repetitive processes in projects at steady-state. However, there has been little research to understand and develop an integrated and explicit representation of the dynamics of these processes in either transient, steady or unsteady conditions. This study evaluates the transfer function in its capability of simultaneously identifying and representing the production behavior of repetitive processes in different state conditions. The sample data for this research comes from the construction of an offshore oil well and describes the performance of a particular process by considering the inputs necessary to produce the outputs. The result is a concise mathematical model that satisfactorily reproduces the process’ behavior. Identifying suitable modeling methods, which accurately represent the dynamic conditions of production in repetitive processes, may provide more robust means to plan and control construction projects based on a mathematically driven production theory. KEYWORDS Production, process, system identification, transfer function, system model, theory; INTRODUCTION Construction management practices often lack the appropriate level of ability to handle uncertainty and complexity (Abdelhamid, 2004; McCray and Purvis, 2002) involved in project-based systems resulting in projects failures in terms of projects schedule and budget performance, among other measures (Mills, 2001). Traditional scheduling approaches in construction, such as critical path method, have been unrestrictedly used producing unfinished and erratic plans (Abdelhamid, 2004, Bertelsen, 2003a) consequently creating distrust, and often being abandoned by those conducting project work. Even more recent 1 Ph.D. candidate, Department of Civil and Environmental Engineering - University of Auckland, New Zealand, [email protected] 2 Senior Lecturer, Department of Civil and Environmental Engineering - University of Auckland, New Zealand, [email protected] 3 Dean, SDSU-Georgia, San Diego State University, Tbilisi, Georgia, [email protected] 793 Proceedings IGLC-23, July 2015 | Perth, Australia scheduling approaches, such as the ones based on the line-of-balance method, assume that the production in construction operates at steady-state with constant production rates (Arditi et al. 2001; Lumsden, 1968), where any deviation is understood as variability (Poshdar et al. 2014). However, “the assumption that production rates of construction projects and processes are linear may be erroneous” (Lutz and Hijazi, 1993). Production throughput is highly variable in construction projects (Gonzalez et al. 2009), has transients (Lutz and Hijazi, 1993), occasionally is at unsteady-state (Bernold, 1989, Walsh et al. 2007) and frequently is nonlinear (Bertelsen, 2003b). As such, approaches that depend on constant production rates, i.e., a steady system, possibly produce erroneous and imprecise outcomes. The dynamics of the production system in construction is frequently overlooked (Bertelsen, 2003b), and the transient phase is ignored (Lutz and Hijazi, 1993). The general construction management makes no distinction between the production dynamics and disturbance, considering both as variability (Poshdar et al. 2014). However, dynamics, disturbance, and variability have different meanings and action approaches. The dynamics is an essential characteristic of any process, representing the effects of the interaction of components in a system. Process dynamics should be understood, managed and optimized. External factors cause disturbance, which must be filtered, mitigated and avoided consequently reducing any impact on the process, e.g., risk management (Antunes and Gonzalez, 2015). The understanding of these concepts is fundamental to the development of mathematical relations and laws suitable to the construction production system. At this time, construction adopts the manufacturing model, dismissing the application of mathematical approaches to model and manage its production system (Bertelsen, 2003a, Laufer, 1997, McCray and Purvis, 2002). Although much work has been done to date on production estimates of repetitive processes, more studies need to be conducted to understand and develop the dynamics of these processes. The purpose of this study is to evaluate the transfer function in its capability of identifying and describing the dynamics of project-driven systems in repetitive processes in construction. This topic was identified as being of importance to point out a unique mathematical representation of project-based systems process in transient, unsteady-, and steady-state, furthermore, overcoming a major limitation of fixed production rates estimation approaches. The understanding of project dynamics should improve estimation accuracy approaches and support suitable derivations of manufacturing management practices in order to increase productivity in construction projects. This study is a step towards the development of a mathematically driven production theory for construction. A SYSTEM VIEW Mathematical models have enabled a comprehensive understanding of production mechanisms supporting practices to improve production in manufacturing. Hopp and Spearman (1996) committed to the comprehension of the manufacturing production system. The system approach or system analysis was the problem-solving methodology of choice (Hopp and Spearman, 1996). The first step of this methodology is a system view. In the system view, the problem is observed as a system established by a set of subsystems that interact with each other. Using the system approach, Hopp and Spearman elaborated significant laws to queue systems and the general production in manufacturing. The conservation of material (Wallace J Hopp; Mark L Spearman; Richard Hercher 1996) and capacity laws (Hopp and Spearman, 1996) are particularly attractive, not only according to ! 794 Proceedings IGLC-23, July 2015 | Perth, Australia their importance, but also because they explicitly state one or more system restrictions. These laws place reliance on stable systems, with long runs and at steady-state conditions. However, production in project-based systems, such as construction, involves a mix of processes in steady- and unsteady-state, short and long production runs, and different learning curves (Antunes and Gonzalez, 2015). Hence, unless a construction process fulfills the stability and steady-state conditions, the manufacturing model and, consequently, the laws do not accurately represent production in construction. Alternatively, variants of manufacturing laws must be developed to production in project-based systems that not fulfill those requirements. In this scenario of variety, it is crucial distinguishing between project-based systems conditions, comprehending process dynamics and its behavior. SYSTEM IDENTIFICATION The objective of system identification is to build mathematical models of dynamic systems using measured data from a system (Ljung, 1998). There are several system identification approaches to model different systems, for instance, transfer function. The transfer function is particularly useful because it provides an algebraic description of a system as well means to calculate parameters of the system dynamics and stability. Nevertheless, the modeling capability of the transfer function in construction must be evaluated and tested. In this study, the modeling approach, i.e., transfer function, focuses on replicating the input/output “mapping” observed in a sample data. When the primary goal is the most accurate replication of data, regardless of the mathematical model structure, a black-box modeling approach is useful. Additionally, black-box modeling supports a variety of models (Bapat, 2011; Billings, 2013), which have traditionally been practical for representing dynamic systems. It means that at the end of the modeling, a mathematical description represents the actual process performance rather than a structure biased by assumptions and restrictions. Black-box modeling is a trial-and-error method, where parameters of various models are estimated, and the output from those models is compared to the results with the opportunity for further refinement. The resulting models vary in complexity depending on the flexibility needed to account for both the dynamics and any disturbance in the data. The transfer function is used in order to show the system dynamics explicitly. TRANSFER FUNCTION The transfer function of a system, G, is a transformation from an input function into an output function, capable of describing an output (or multiple outputs) by an input (or multiple inputs) change, y(t) = G(t)⋆u(t). Although generic, the application of the transfer function concept is restricted to systems that are represented by ordinary differential equations (Mandal, 2006). Ordinary differential equations can represent most dynamic systems in its entirety or at least in determined operational regions producing accurate results (Altmann and Macdonald, 2005; Mandal, 2006). As a consequence, the transfer function modeling is extensively applied in the analysis and design of systems (Ogata, 2010). A generic transfer function makes possible representing the system dynamics by algebraic equations in the frequency domain, s. In the frequency domain, the convolution operation transforms into an algebraic multiplication in s, which is simpler to manipulate. Mathematically, “the transfer function of a linear system is defined as the ratio of the Laplace transform of the output, y(t), to the Laplace transform of the input, u(t), under the assumption that all initial conditions are ! 795 Proceedings IGLC-23, July 2015 | Perth, Australia zero” (Mandal, 2006), Equation 1. Where the highest power of s in the denominator of the transfer function is equal to n, the system is called a nth-order system. ! Equation 1: Transfer function TRANSIENT STATE, STEADY-STATE, AND UNSTEADY-STATE RESPONSE Two parts compose a system response in the time domain, transient, and steady- or unsteadystate. Transient is the immediate system response to an input from an equilibrium state. After the transient state, a system response can assume a steady- or unsteady-state. In a stable system, the output tends to a constant value when t→∞ (Mandal, 2006). When the system response enters and stays in the threshold around the constant value the system reached the steady-state (Mandal, 2006). The time the stable system takes to reach the steady-state is the settling time, ts. On the other hand, if the response never reaches a final value or oscillates surpassing the threshold when t→∞ the system is then at unsteady-state. Consequently, the system outputs at unsteady-state vary with time during the on-time interval even induced by an invariable input. METHODOLOGY A sample of 395 meters of continuous drilling was randomly selected from the project of an offshore oil well construction, constituting the process to be modeled. The information containing the drill ahead goal and the current process duration was collected from operational reports and resampled to 181 samples representing the hourly process behavior when commanded by the input, establishing a system. Next, the estimation of a transfer function was used for the determination of a model that represents the dynamics of the system-based process. The estimation uses nine partitions of the dataset creating models based on different data sizes. The best model from each of the nine partitions presenting the lowest estimation unfitness value were selected and cross-validated by the remaining data. Later, the system response of the best model was analyzed. CASE STUDY: DRILLING AS A SYSTEM The subject of this study is the drilling process on a particular offshore well construction project in Brazilian pre-salt. This process was chosen given its high level of repetitiveness. The vertical dimension of repetitiveness is the repetition of the process in the project, i.e., the drilling occurs more than one time in the construction of a well. The horizontal dimension is the repetition of the process in different projects, i.e., the drilling occurs on every well construction project. Such degree of repetitiveness eases comparison and data validation because a repetitive process tends to present patterns in smaller data portions. The case documentation provides details about inputs, outputs and brief explanations of the process parameters. Nonetheless, the documentation does not include any mathematical representation of the processes other than the drilling parameters and other activities performed while drilling, which constitute subsystems. For instance, the work instructions to drill a segment of 28 meters on seabed: • Drill ahead 8 1/2" hole from 3684 m to 3712 m with 480 gpm, 1850 psi, 15-25k WOB, 120 rpm, 15-20 kft.lbs torq. Perform surveys and downlinks as per directional ! 796 Proceedings IGLC-23, July 2015 | Perth, Australia driller instructions. Pump 15 bbl fine pill and 50 bbl hi-vis pill every two stand as per mud engineer instructions. The primary input, ‘drill ahead from 3684 m to 3712 m’, and the parameters, such as torque and rpm, directly affect the drilling process. However, the system view unifies the different parts of the system, i.e., the subsystems, into an effectual unit using a holistic perspective. The holistic perspective allows the creation of a system driven by a primary input while all others variables interact as subsystems of the main system. To fully establish a system, an input has to be applied to the process in order produce an output. Accordingly, the input, u(t), consists of a drilling ahead depth goal, e.g., 3712 meters, that is applied to the drilling process, producing the output, y(t), that is the actual depth, in meters. In the process, G(t), the drilling crew responds to the drilling ahead goal by drilling and performing related tasks, which increases the actual well depth over time until reaching the drilling depth goal. Then, a new drill ahead goal is set, and the process performs the cycle. The sample data corresponds with a well depth increase from 3305 to 3700 meters at a variable rate based on operational choices. The 181 samples represent the hourly input and process behavior response, i.e., output. The input and output data are cumulative due to physical restrictions. In other words, it is impossible to drill from 3435 meters without prior drilling from the seabed at 924 meters from water level to 3435 meters in the hole. Consequently the drill ahead goal as well as the actual depth values are always greater than the previous values. Figure 1 displays the general system representation of the process with its measured input and output, drill ahead goal and actual depth respectively. Two criteria guided the choice of drilling goal as input. The first criterion is that the drill ahead goal is the primarily directive to achieve the objective of the project, setting the peace to build the well. The drill ahead goal is an adaptive plan in which the team has to examine the current conditions of the well and determine the best drill ahead goal. It relies on guidelines and procedures but in the end its a human decision. The second criterion is that this particular arrangement illustrates the number of items arriving in a queuing system at time t. Additionally, the output represents the number of items departing in the queuing system at time t. Such input-output arrangement is instrumental to adapt manufacturing-based models such as the Little’s Law (Little, 1961) to construction in further research. ! Figure 1: System representation of the case study INITIAL MODELING APPROACH A simple model is attempted initially before progressing to more complex structures until reaching the required model accuracy. Simpler models are easier to interpret, a desired feature in this study. However, if that model unsatisfactorily simulates the measured data, it may be necessary to use more complex models. The simpler system identification approach is the transfer function. Hence, transfer function might be a good starting point in order to ! 797 Proceedings IGLC-23, July 2015 | Perth, Australia identify, model and understand the behavior of a system. The sample data was partitioned in nine combinations representing nine stages in time, as shown in Figure 1. The first partition is at the 20th hour. Therefore, the data from zero to 20 hours was used as estimation data for G1, and from 21 to 181 hours as the validation data. The second partition happens at 40 hours mark. In the same way, the estimation for G2 is composed of the data from zero to 40 hours mark, and the validation is from the 41st to the 181st hour. This pattern repeats until the 180time stamp. At this partition, almost the whole sample constitutes the estimation data, and only one sample is left for validation of G9. The model from this partition, G9, merely fits the estimation data once there is virtually no data that could be used to validate the model. Based on black-box trial-and-error approach, the model parameters of the transfer function of firstorder (Ogata, 2010) were generated for each partition using the iterative prediction-error minimization algorithm (Ljung, 2010) from MATLAB’s System Identification Toolbox. A first-order transfer function eases the model interpretability. MODEL DEVELOPMENT Three transfer functions, which showed the lowest unfitness values, calculated by 100% – normalized root mean square (NRMSE) (Armstrong and Collopy, 1992; Ljung, 2010), were selected for each of the nine data partitions, constituting the best models. A perfect fit corresponds to zero meaning that the simulated or predicted model output is exactly the same as the measured data. MODEL QUALITY ASSESSMENT The initial models were later refined using the prediction-error minimization algorithm (Ljung, 1998). After refinement, the models that achieved the lowest unfitness values to each estimation data partition that they derived from were then validated using the remaining data of their partition. Figure 2 shows the quality measurements of the best models for each partition. The quality measurements are the percentage of validation and estimation data unfitness, Akaike's Final Prediction Error (FPE) (Jones, 1975), loss function (Berger, 1985) and mean squared normalized error performance function (MSE) (Poli and Cirillo, 1993). The quality measurements are represented in the graph by ‘Val unfit’, ‘Est unfit’, FPE, ‘Loss Fcn’, and MSE respectively. Although, the model choice in this study is not mathematically based on FPE, loss function and MSE their values were calculated and shown providing an extra measurement of model quality. A variety of measurements is useful for comparing different models as well as comparing the models with different modeling approaches. Differently from the models one to seven, the models for the segments eight and nine present high unfit levels to their validation segments, 72,64% and impossible to calculate, respectively. For G8, the input-output relation of the validation data, shown in the segment eight to nine in Figure 1, is extremely distinct from the data used in the estimation, segment one to eight. For G9, there is only one sample remaining to validate the model. Hence, the model G9(s) = 0.6646 / (s + 0.6687) corresponds to the structure that better reproduces the sample data with about 93% fitness. Accordingly, G9 is used later to demonstrated the step response. ! 798 Proceedings IGLC-23, July 2015 | Perth, Australia ! Figure 2: Quality comparison of the models Despite the model G9 has the lowest unfitted data, ‘Est unfit’, almost the whole sample data was used to estimate G9. Hence, G9 already ‘knows’ the data sample and for this reason cannot be used as a predictor. In order to illustrate the prediction accuracy of the models, the model with the largest ‘unknown’ data, i.e., G1 is used. Figure 3 shows the comparison of the measured data and model G 1 (t), result of inverse Laplace Transform of G1(s) = 0.4193 / (s + 0.4103); the solid line is the measured output and the dashed line the model response with 9.5% unfitness. The transfer function G1(t), can represent the process input-output relationship with sufficient precision. Furthermore, the model is estimated at an early stage, around the initial 10% duration, independently of any previous process knowledge. 3700 y (t ) = 0.4193e Actual depth (meters) 3650 Estimation 3600 Prediction −0.4103 t * u (t ) 3550 3500 3450 Actual output 3400 Model response 3350 3300 ! 0 20 40 60 80 100 120 140 160 180 Time (hours) Figure 3: Comparison between the G1 response and measured data STEP RESPONSE Figure 4(a) shows the step response for the model G9. The model reaches steady-state about the sixth hour for a threshold of absolute two percent about the final value. The step amplitude used as input, 2.06, is the average drilling goal ahead. The system responds to this input reaching and staying steady at the output peak, yp = 2.05, about the 16th hour, tp. In this case, the steady-state value is the peak value because it is the value that the system tends to when t→∞ (Mandal, 2006). The average drilling rate from the measured output data is 2.1 meters per hour approximately the model output at steady-state, with a three percent error. Consequently, the model represents the system at steady-state. Although, the transient response stands for a significant part of the system dynamics. The system has a transient response every time it starts or stops. Although it stays at the transient state when it need small corrections, as, for instance, to fit a casing pipe to secure the well. In this case, the system also has inputs as small as one. For this input, the average response of the system is 0.55 meters per hour. In order to assess the system transient response, a unitary step unit was introduced to the system producing the system response, as shown in Figure 4(b). The average response for the unitary input is achieved around one hour by the system indicating that the system is performing in the transient state. ! 799 Proceedings IGLC-23, July 2015 | Perth, Australia ! Figure 4: (a) 2.06 step response (b) Unit step response CONCLUSIONS The results of the model’s accuracy were explicit. The models were consistent with the modeling approach and methodology. The valid transfer functions obtained reliably described the process behavior and presented evidence of their accuracy using a range of model quality measurements. These findings thus lend support to the use of transfer function as a valid model approach and analytical technique in order to describe the dynamic conditions of production in repetitive processes in projects. Accounting for transient responses, transfer function fulfills a gap left by network scheduling and queueing theory as well as linear and dynamic programming, which ignore the transient stage and assume that the process is at steady-state. Moreover, a transfer functions may act as a multi-level management tool. Because transfer functions provide an output function from an input function, they enable the creation of accurate plans rather than single actions and a throughput function, instead of a system position. Transfer functions may be used by site managers as a process descriptor to monitor and control low-level activities, as shown in Figure 3. Dynamic and accurate plans that respond to actual inputs can regain the trust of those conducting the project work on planning and scheduling. Moreover, the model simulation may be used in a means-ends analysis determining the best solution to a construction process, which frequently requires the optimization of resources to the detriment of shorter duration. In other words, managers may use the model adjusting the drill ahead goal plan until attaining the defined goal, supporting managers’ decision-making process. Once the managers are satisfied with both the drill ahead goal plan and the system’s outcome, the plan is executed. A transfer function may also be applied to represent higher levels, providing project managers a holistic view. Reliance on this method must be tempered, however because the case does not represent the general conditions of repetitive process in construction. There is a variety of construction processes that happen in different states, production runs, and different learning curves creating unique process’ characteristics. For instance, this study presents the analysis of system’s transient and steady-state response, but not unsteady-state because the case scenario does not have this characteristic. Although the model can be reused in similar processes as an initial model, a limitation places on the existence of the process’ input-output data. It means that the model accuracy cannot be evaluated until some data has been produced. Finally, the study explores several concepts that are unfamiliar to general construction managers at this point restricting its audience. Nevertheless, the search for and the aggregation of knowledge ! 800 Proceedings IGLC-23, July 2015 | Perth, Australia and expertise from different disciplines and technical fields constitutes the foremost forces driving the evolution in managerial sciences. FUTURE OUTCOMES Different system identification approaches can write equations for practically any process. However, only after extensive research about the dynamic conditions of production in project-driven systems the lack of knowledge about the transient and unsteady-state responses can be replaced by explanatory and mathematical laws to production in projects. In a further horizon, processes transient and unsteady-state will be understood and managed to generate an optimum process outcome. Being it reducing the transient time, and fastermoving processes to steady-state or applying unsteady-state processing techniques producing an average output above steady-state levels and then creating high-performance processes. REFERENCES Abdelhamid, T.S. 2004. The self-destruction and renewal of lean construction theory: A prediction from Boyd-s theory. 12th Annual Conference of the International Group for Lean Construction. Helsingør, Denmark, 3-5 August 2004. Altmann, W. and Macdonald, D. 2005. Practical Process Control for Engineers and Technicians. Burlington, MA: Elsevier. Antunes, R. and Gonzalez, V. 2015. A production model for construction: A theoretical framework. Buildings 5(1) 209-228. Arditi, D., Tokdemir, O.B. and Suh, K. 2001. Effect of learning on line-of-balance scheduling. International Journal of Project Management 19(5) 265-277. Armstrong, J.S. and Collopy, F. 1992. Error measures for generalizing about forecasting methods: Empirical comparisons. International Journal of Forecasting 8(1) 69-80. Bapat, R.B. 2011. Linear Algebra and Linear Models. 3rd ed. New Delhi, India: Springer. Berger, J.O. 1985. Statistical Decision Theory and Bayesian Analysis. Springer Series in Statistics,. New York, NY, Springer New York. Bernold, L.E. 1989. Simulation of Nonsteady Construction Processes. Journal of Construction Engineering and Management 115(2) 163-178. Bertelsen, S. 2003a. Complexity- Construction in a New Perspective. 11th Annual Meeting of the International Groupfor Lean Construction. Blacksburg, USA, 21-24 July 2003. Bertelsen, S. 2003b. Construction as a Complex System. 11th Annual Conference of the International Group for Lean Construction. Blacksburg, USA, 21-24 July 2003. Billings, S.A. 2013. Nonlinear System Identification Narmax Methods in the Time, Frequency, and Spatio-Temporal Domains. West Sussex, England: John Wiley & Sons. Garnier, H. and Wang, L. Eds. 2008. Identification of Continuous-time Models from Sampled Data. London, England: Springer-Verlag. González, V., Alarcón, L.F. and Molenaar, K. 2009. Multiobjective Design of Work-InProcess Buffer for Scheduling Repetitive Building Projects. Automation in Construction 18(2) 95-108. Hopp, W.J. and Spearman, M.L. 1996. Factory Physics: Foundations of Manufacturing Management. 2nd ed. New York, NY: Irwin McGraw-Hill. Jones, R.H. 1975. Fitting Autoregressions. Journal of the American Statistical Association 70(351) 590-592. ! 801 Proceedings IGLC-23, July 2015 | Perth, Australia Laufer, A. 1997. Simultaneous management: Managing projects in a dynamic environment. New York, NY: American Management Association. Little, J.D.C. 1961. A Proof for the Queuing Formula: L= λ W. Operations Research 9(3) 383-387. Ljung, L. 1998. System Identification: Theory for the User. Upper Saddle River, NJ: Pearson Education. Ljung, L. 2010. System Identification Toolbox 7. Reference. Natick, MA, Mathworks. Lumsden, P. 1968. The Line-of-balance method: Pergamon Press, Industrial Training Division. Lutz, J.D. and Hijazi, A. 1993. Planning repetitive construction: Current practice. Construction Management and Economics 11(2) 99-110. Mandal, A.K. 2006. Introduction to Control Engineering: Modeling, Analysis and Design. New Delhi, India: New Age International Publishers. McCray, G.E. and Purvis, R.L. 2002. Project management under uncertainty: the impact of heuristics and biases. Project Management Journal 33(1) 49-57. Mills, A. 2001. A systematic approach to risk management for construction. Structural Survey 19(5) 245-252. Ogata, K. 2010. Modern Control Engineering. 5th ed. Upper Saddle River, NJ: Prentice Hall. Poli, A.A. and Cirillo, M.C. 1993. On the use of the normalized mean square error in evaluating dispersion model performance. Atmospheric Environment. Part A. General Topics 27(15) 2427-2434. Poshdar, M., González, V.A., Raftery, G. and Orozco, F. 2014. Characterization of Process Variability in Construction. Journal of Construction Engineering and Management 140(11) 05014009. Walsh, K.D., Sawhney, A. and Bashford, H.H. 2007. Production Equations for UnsteadyState Construction Processes. Journal of Construction Engineering and Management 133(3) 245-261. ! 802 Proceedings IGLC-23, July 2015 | Perth, Australia
3cs.SY
Lens Depth Function and k-Relative Neighborhood Graph: Versatile Tools for Ordinal Data Analysis arXiv:1602.07194v2 [stat.ML] 24 Jul 2017 Matthäus Kleindessner Ulrike von Luxburg [email protected] [email protected] Department of Computer Science University of Tübingen Sand 14, 72076 Tübingen, Germany Abstract In recent years it has become popular to study machine learning problems in a setting of ordinal distance information rather than numerical distance measurements. By ordinal distance information we refer to binary answers to distance comparisons such as d(A, B) < d(C, D). For many problems in machine learning and statistics it is unclear how to solve them in such a scenario. Up to now, the main approach is to explicitly construct an ordinal embedding of the data points in the Euclidean space, an approach that has a number of drawbacks. In this paper, we propose algorithms for the problems of medoid estimation, outlier identification, classification, and clustering when given only ordinal data. They are based on estimating the lens depth function and the k-relative neighborhood graph on a data set. Our algorithms are simple, are much faster than an ordinal embedding approach and avoid some of its drawbacks, and can easily be parallelized. Keywords: ordinal data, ordinal distance information, comparison-based algorithms, lens depth function, k-relative neighborhood graph, ordinal embedding, non-metric multidimensional scaling 1. Introduction In a typical machine learning setting we are given a data set D of objects together with a dissimilarity function d (or a similarity function s) quantifying how “close” objects are to each other. The machine learning rationale is that objects that are close to each other tend to have the same class label, belong to the same clusters, and so on. However, in recent years a whole new branch of the machine learning literature has emerged that relaxes this scenario (e.g., Agarwal et al., 2007, Jamieson and Nowak, 2011, van der Maaten and Weinberger, 2012, Heikinheimo and Ukkonen, 2013, Kleindessner and von Luxburg, 2014, Terada and von Luxburg, 2014, Jain et al., 2016; see Section 5.1 for a discussion of related work). Instead of being able to evaluate the dissimilarity function d itself, we only get to see binary answers to some comparisons of dissimilarity values such as ? d(A, B) < d(C, D), (1) where A, B, C, D ∈ D. We refer to any collection of answers to such comparisons, some of them possibly being incorrect, as ordinal distance information or ordinal data. 1 Kleindessner and von Luxburg Besides theoretical interest, there are several real-life motivations for studying machine learning tasks in a setting of ordinal distance information: • Human-based computation / crowdsourcing: In complex tasks, such as estimating the value of a car shown in an image or clustering biographies of celebrities, it can be hard to come up with a meaningful dissimilarity function that can be evaluated automatically, while humans often have a good sense of which objects should be considered (dis-)similar. It is then natural to incorporate the human expertise into the machine learning process. As it is a general phenomenon that humans are significantly better at comparing stimuli than at identifying a single one (Stewart et al., 2005), it is widely believed and accepted that humans are also better and more reliable in assessing dissimilarity on a relative scale (“Movie A is more similar to movie B than movie C is to movie D”) than on an absolute one (“The dissimilarity between A and B is 0.3 and the dissimilarity between C and D is 0.8”). For this reason, ordinal questions are often used whenever humans are involved in gathering distance information. In addition to obtaining more robust results, this also has the advantage that one does not need to align people’s different assessment scales. • There are situations where ordinal distance information is readily available, but the underlying dissimilarity function is completely in the dark. Schultz and Joachims (2003) provide the example of search-engine query logs: if a user clicks on two search results, say A and B, but not on a third result C, then A and B can be assumed to be semantically more similar than A and C, or B and C, are. • There are several applications where actual dissimilarity values between objects can be collected, but it is clear to the practitioner that these values only reflect a rough picture and should be considered informative only on an ordinal scale level. In this case, feeding the numerical scores to a machine learning algorithm can offer the problem that the algorithm interprets them stronger than they are meant to be. For example, discarding the actual values of signal strength measurements but only keeping their order can help to reduce the influence of measurement errors and thus bring some benefit in sensor localization (Liu et al., 2004; Xiao et al., 2006). A big part of the literature on ordinal data deals with the problem of ordinal embedding. Given a data set D together with ordinal relationships, the goal is to map the objects in D to points in a Euclidean space Rm such that the ordinal relationships are preserved, with respect to the Euclidean interpoint distances, as well as possible. Clearly, ordinal embedding is a way of transforming ordinal data back to a standard setting: once D is represented by points in Rm , we can apply any machine learning algorithm for vector-valued data. However, such a two-step approach comes with a number of problems, among them the high running time of ordinal embedding algorithms and the necessity to choose a dimension m for the space of the embedding (to name just two—see Section 5.1.2 for a complete discussion). Our aim is to solve machine learning problems in a setting of ordinal distance information directly, without constructing an ordinal embedding as an intermediate step. There exist several different approaches in which ordinal relationships can be evaluated (see Section 5.1.1 for more discussion and references). While comparisons of the form 2 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis ? d(A, B) < d(C, D) as in (1) are the most general form, there are other forms that, depending on the application, are of higher relevance. In particular in scenarios of human-based computation and crowdsourcing it is popular to show three objects A, B, and C at a time ? and to ask for information on d(A, B) < d(A, C), that is, compared to (1), object D equals object A (“Which of the bottom two images is more similar to the top one?”). Recently, Heikinheimo and Ukkonen (2013) proposed an algorithm for estimating a medoid of a data set D based on statements of the form Object A is the outlier within the triple of objects (A, B, C), () where A, B, C are pairwise distinct objects in D and such a statement formally means that   d(A, B) > d(B, C) ∧ d(A, C) > d(B, C) . Statements of the kind () can easily be collected via crowdsourcing too (“Which among the following three images is the odd one out?”). In this paper, we suggest and study a similar but subtly different kind of question. Given three objects, we ask which of the objects is “the most central” object in the sense that it is the best representative for the three objects. The answers then have the form Object A is the most central object within the triple of objects (A, B, C) (?) with the formal interpretation that  d(A, B) < d(B, C) ∧  d(A, C) < d(B, C) . An illustration of the meaning of a statement of the kind (?) is provided in Figure 1 (left) by an example of a triple of cars consisting of a sports car, a fire truck, and an off-road vehicle: the sports car and the fire truck are rather different, but the off-road vehicle is not so different from either of them and can most likely be taken for a representative of the three cars—the off-road vehicle is the most central object within the triple. Considering machine learning problems when given only ordinal data, in many cases it is pretty unclear how to solve them other than by constructing an ordinal embedding. For example, how can we construct a classifier based solely on a collection of answers to distance comparisons of the form (1)? The most important insight of this paper is that ordinal distance information in the form (?) (but not in other forms—in particular, not in the form ()) can immediately be related to two very helpful tools: depth functions and relative neighborhood graphs. In a nutshell, depth functions (see, e.g., Mosler, 2013) come from multivariate statistics and are a means to generalize the concept of a univariate median to multivariate distributions and to quantify “centrality” of points with respect to such a distribution. The relative neigborhood graph (RNG; Toussaint, 1980) and its generalization, the k-RNG, are examples of proximity graphs, which play a prominent role in computer vision. In a proximity graph two vertices are connected by an edge if and only if the two vertices are in some sense close to each other. It is known from the literature that both depth functions and relative neigborhood graphs can be used to solve various machine learning problems. Our contribution is 3 Kleindessner and von Luxburg A B C Figure 1: Illustration of the meaning of statement of the kind (?). Left: Within the three cars shown at the top, the off-road vehicle shown at the bottom a second time is the most central/best representative one. Right: A more formal approach: we have d(A, B) < d(A, C) < d(B, C), and hence A is the most central data point within (A, B, C). to establish that one particular depth function, the lens depth function (Liu and Modarres, 2011), as well as the k-RNG can be computed given the correct statements of the kind (?) for every triple of objects of D, but nothing else. More importantly, the lens depth function and the k-RNG can be estimated when given not all but only some of possibly incorrect statements of the kind (?). This leads to algorithms solely based on ordinal data for four common machine learning problems, namely the problems of medoid estimation, outlier identification, classification, and clustering. Our algorithms are simple and can easily and highly efficiently be parallelized. We ran several experiments to compare our algorithms to competitors, in particular to the approach of first solving the ordinal embedding problem and then applying vector-based algorithms. We find that in situations with small sample size and small dimensions, the embedding approach tends to be superior to our algorithms in terms of error rates, while our algorithms are highly superior in terms of computing time (even without parallelization). The strength of our algorithms lies in the regime where the ordinal embedding algorithms break down due to computational complexity, but our algorithms still yield useful results. In any situation, our methods avoid some of the drawbacks inherent in an embedding approach. The paper is organized as follows: We start with the setup including assumptions on the dissimilarity function d in Section 2. In Section 3 we formally define the lens depth function and the k-RNG and establish their relationships to ordinal data of the form (?). Furthermore, we motivate how we can make use of these relationships in order to solve the machine learning problems of medoid estimation, outlier identification, classification, and clustering when the only available information about a data set D is an arbitrary collection of statements of the kind (?). We formally state our proposed algorithms and discuss their running times, space requirements, and some implementation aspects in Section 4. Related work and further background are presented in Section 5. In Section 6 we present experiments on both artificial and real data. The paper concludes with a discussion and several directions to future work in Section 7. 4 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis 2. Setup Let X be an arbitrary set and d : X × X → R be a dissimilarity function on X : a higher value of d means that two elements of X are more dissimilar to each other. The terms dissimilarity and distance are used synonymously. We assume d to satisfy the following properties for all x, y ∈ X : • d(x, y) ≥ 0 • d(x, y) = 0 if and only if x = y • d(x, y) = d(y, x), that is d is symmetric. With these properties, (X , d) is a semimetric space. Note that we do not require d to satisfy the triangle inequality, and hence (X , d) is not necessarily a metric space. In the following, we consider a finite subset D ⊆ X and refer to D as a data set and to the elements of D as objects or data points. We do not have access to d for evaluating dissimilarities between objects directly. Instead, we are only given an arbitrary collection S of statements Object A is the most central object within the triple of objects (A, B, C), (?) where (A, B, C) could be any triple of pairwise distinct objects in D. At this point we do not make any assumptions on how S is related to the set of all statements, that is the set of statements of the kind (?) for all triples of objects (e.g., sampled uniformly at random). However, we need to make some assumptions if we want to provide a theoretical justification for our proposed algorithms (compare with Section 3.1 and Section 3.2.1). Statement (?) is equivalent to   d(A, B) < d(B, C) ∧ d(A, C) < d(B, C) . (2) Hence, the most central data point within a triple of data points is the data point opposite to the longest side in the triangle spanned by the three data points. An illustration of this can be seen in Figure 1 (right). Note that if we assume that there are no ties in the total order of all dissimilarities between objects, there is a unique most central object within every triple of objects. Also note that (2) is equivalent to     d(A, B) + d(A, C) < d(B, A) + d(B, C) ∧ d(A, B) + d(A, C) < d(C, A) + d(C, B) , and thus A is the medoid of {A, B, C} (see Section 3.1 if you want to recall the definition of a medoid). Statements might be repeatedly present in S. More importantly, we allow S to be noisy due to errors in the measurement process and even inconsistent. Noisy means that S might comprise incorrect statements claiming that, for example, object A is the most central object within (A, B, C) although in fact object B is the most central one. Inconsistent means that we might have contradicting statements: one statement claims that object A is the most central object within (A, B, C), but another one claims that object B is. Noisy and inconsistent ordinal data is likely to be encountered in any real-world problem—think of a crowdsourcing setting, where different users will have different opinions from time to time. 5 Kleindessner and von Luxburg xi xj Figure 2: Left: Illustration of Lens(xi , xj ) in case of the Euclidean plane. The lens is shown in grey. Middle: The pink point at the center is contained in almost every lens spanned by any of two data points, while the orange one located at the bottom right edge of the point set is not contained in a single lens. Right: Heat map of the lens depth function for a data set of 18 points (in red) in the unit square of the Euclidean plane. 3. Lens Depth Function and k-Relative Neighborhood Graph and Motivation for our Algorithms The most important geometric object in the following is the lens spanned by two points xi , xj ∈ X . Consider a ball of radius d(xi , xj ) centered at xi , and similarly a ball of the same radius centered at xj . The lens spanned by xi and xj consists of all those points of X that are located in the intersection of these two balls. Formally, Lens(xi , xj ) = {x ∈ X : d(x, xi ) < d(xi , xj )} ∩ {x ∈ X : d(x, xj ) < d(xi , xj )}  = x ∈ X : max{d(x, xi ), d(x, xj )} < d(xi , xj ) . An illustration of Lens(xi , xj ) in case of the Euclidean plane can be seen on the left side of Figure 2. The key insight for us are the following equivalences: x ∈ Lens(xi , xj ) ⇔ d(x, xi ) < d(xi , xj ) and d(x, xj ) < d(xi , xj ) ⇔ (3) x is the most central point within (x, xi , xj ). In particular, if we had knowledge of all ordinal relationships of type (?) for a data set D ⊆ X , we could check for any data point xk and any two data points xi , xj whether xk is contained in Lens(xi , xj ) or not. 3.1 Lens Depth Function The lens depth function (Liu and Modarres, 2011) is an instance of a statistical depth function. These functions are a widely known tool in multivariate statistics. They have been designed to measure centrality with respect to point clouds or probability distributions. We will provide more information about statistical depth functions in general, including references, in Section 5.2. What makes the lens depth function special for us is that it does not rely on Euclidean structures or numeric distance values. This is in contrast to all other 6 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis depth functions from the literature. Given a data set D = {x1 , . . . , xn } ⊆ X , the lens depth function LD( · ; D) : X → N0 is defined as LD(x; D) = {(xi , xj ) : xi , xj ∈ D, i < j, x ∈ Lens(xi , xj )} , x ∈ X. To understand its meaning, consider a set of data points in the Euclidean plane. A point located at the “heart of the set” will lie in the lenses of many pairs of data points. Thus the lens depth function will attain a high value at this point, indicating its high centrality. In contrast, points at the boundary of the point cloud will lie in only a few lenses and will have a low lens depth value, indicating their low centrality. See the middle sketch of Figure 2 for an illustration. The right side of Figure 2 shows a heat map of the lens depth function for a data set consisting of 18 points in the Euclidean plane as an example. Exploiting (3) we can see immediately how easily the lens depth function can be evaluated based on statements of the kind (?). Given all statements of the kind (?) for a data set D = {x1 , . . . , xn }, that is one statement for every unordered triple (xi , xj , xk ) of pairwise distinct objects in D, we can immediately evaluate LD(xt ; D) for any t ∈ {1, . . . , n}. It simply holds that LD(xt ; D) = number of statements comprising xt as most central data point. (4) We note that LD(xt ; D) as given in (4) can be considered, up to a normalizing constant of 1/ n−1 2 , as probability of the fixed data point xt being the most central data point in a triple comprising xt and two data points drawn uniformly at random without replacement from D \ {xt }. This insight gives us a handle for the realistic situation that we are not given all statements of the kind (?), but only an arbitrary collection S of statements, some of them possibly being incorrect. Namely, we can still estimate LD(xt ; D) by estimating the probability of the described event by its relative frequency: · LD(xt ; D) ≈ number of statements in S that comprise xt as most central data point . number of statements in S that comprise xt (5) This estimate will be reasonable whenever statements in S comprising xt appear to be sampled approximately uniformly at random from the set of all statements that comprise xt , the number of statements in S comprising xt is large enough, and the proportion of incorrect statements is sufficiently small. Note that if we assume S to be sampled uniformly at random from the set of all statements, this will imply that for every xt ∈ D statements in S comprising xt are a uniform sample from the set of all statements that comprise xt . We now explain how we can use our insights to devise algorithms for the machine learning problems of medoid estimation, outlier identification, and classification when only given a collection of statements of the kind (?) for a data set (the algorithms are formally stated in Section 4). The basic principle is that we replace the true lens depth function with its estimate according to (5) in the following existing approaches to these problems (see Section 5.2 for further information and references): 7 Kleindessner and von Luxburg • Medoid estimation (cf. Algorithm 1 in Section 4): A medoid OMED of a data set D is a most central object in the sense that it has minimal total distance to all other objects, that is it minimizes X D(O) = d(O, Oi ), O ∈ D. (6) Oi ∈D Since the lens depth function provides a measure of centrality too, even though in a different sense, a maximizer of the lens depth function (restricted to D) is a natural candidate for an estimate of a medoid. • Outlier identification (cf. Algorithm 2 in Section 4): An outlier in a data set D is “an observation . . . which appears to be inconsistent with the remainder of that set of data” (Barnett and Lewis, 1978, Chapter 1). Points with a low lens depth value are non-central points according to the lens depth function and thus are natural candidates for outliers. We will see in the experiments in Section 6.1.2 that this approach works well for data sets with a uni-modal structure, but can fail in multi-modal cases. • Classification (cf. Algorithm 3 in Section 4): The simplest approach to classification based on the lens depth function is to assign a test point to that class in which it is a more central point: For each of the classes we could compute a separate lens depth function and evaluate a test point’s corresponding depth value. The test point is then classified as belonging to the class that gives rise to the highest lens depth value. However, it has been found that such a max-depth approach has some severe limitations (compare with Section 5.2). To overcome these limitations, we use a feature-based approach. When dealing with a K-class classification problem, we consider the data-dependent feature map x 7→ (LD(x; Class1 ), LD(x; Class2 ), . . . , LD(x; ClassK )) ∈ RK , x ∈ X, (7) and then apply an out-of-the-box classification algorithm to the K-dimensional representation of the data set. 3.2 k-Relative Neighborhood Graph We now use the lenses spanned by two data points in order to define the k-relative neighborhood graph (k-RNG). In our language, for a data set D = {x1 , . . . , xn } ⊆ X and a parameter k ∈ N the k-RNG on D is the graph with vertex set D in which two distinct vertices xi and xj are connected by an undirected edge if and only if the lens spanned by these points contains fewer than k data points from D: xi ∼ xj ⇔ |Lens(xi , xj ) ∩ D| < k. (8) The rationale behind this definition is that two data points may be considered close to each other whenever the lens spanned by them contains only a few data points. The krelative neighborhood graph is best known when k = 1. In this form it is simply called relative neighborhood graph (RNG) and has already been introduced in Toussaint (1980). The general k-RNG has been defined by Chang et al. (1992). Examples for a data set in 8 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis RNG (k-RNG, k=1) k-RNG, k=3 k-RNG, k=5 2 2 2 1 1 1 0 0 0 -1 -1 -1 -2 -2 -5 -4 -3 -2 -1 0 1 2 3 4 -2 -5 -4 Symmetric kNN-graph, k=1 -3 -2 -1 0 1 2 3 4 -5 Symmetric kNN-graph, k=3 2 2 1 1 1 0 0 0 -1 -1 -1 -2 -2 -4 -3 -2 -1 0 1 2 3 4 -3 -2 -1 0 1 2 3 4 3 4 Symmetric kNN-graph, k=5 2 -5 -4 -2 -5 -4 -3 -2 -1 0 1 2 3 4 -5 -4 -3 -2 -1 0 1 2 Figure 3: k-relative neighborhood graphs (1st row) and symmetric k-nearest neighbor graphs (2nd row) on 80 points from a mixture of two Gaussians. Note that as opposed to the k-NN graphs, the k-relative neighborhood graphs tend to have more connections between points from the different mixture components. In fact, a k-RNG is always connected (see Section 5.3). This might be desirable in some situations, but undesirable in others. the Euclidean plane can be seen in Figure 3. For comparison, we also also show symmetric k-nearest neighbor graphs on the data set. The symmetric k-nearest neighbor graph or k-NN graph for short, also with parameter k ∈ N, is more popular in machine learning. In that graph two vertices are connected by an undirected edge whenever one of them is among the k closest data points to the other one (with respect to the distance function d). Given all statements of the kind (?) for a data set D, it is straightforward to build the true k-RNG on D similarly to the exact evaluation of the lens depth function (4). Below, we will discuss how to build an estimate of the k-RNG on D when given only an arbitrary collection of statements, some of them possibly being incorrect, and a problem involved in Section 3.2.1. Before, let us explain how k-relative neighborhood graphs can be used for classification and clustering. • Classification (cf. Algorithm 4 in Section 4): Given a set of labeled points and an additional test point that we would like to classify, we can construct the k-RNG on the union of the set of labeled points and the singleton of the test point and take a majority vote of the test point’s neighbors in the graph. There is no need to construct the whole graph. We just have to find the test point’s neighbors in the graph. Note that the basic principle is the same as for the well-known k-NN classifier (e.g., Shalev-Shwartz and Ben-David, 2014, Chapter 19), replacing the directed k-NN graph by the k-RNG. • Clustering (cf. Algorithm 5 in Section 4): As we can do with the symmetric k-NN graph, it is straightforward to apply spectral clustering to the k-RNG on a data set D (see von Luxburg, 2007, for a comprehensive introduction to spectral clustering—that work suggests the symmetric k-NN graph as one of a few graphs that can be used). We propose 9 Kleindessner and von Luxburg two versions: one is to simply work with an estimate of the ordinary unweighted k-RNG, the other one is to use an estimate of a k-RNG in which an edge between connected vertices xi and xj is weighted by   1 |Lens(xi , xj ) ∩ D|2 (9) exp − 2 · σ (|D| − 2)2 for a scaling parameter σ > 0. 3.2.1 The Problem of Estimating the k-RNG from Noisy Ordinal Data The key insight for estimating the k-RNG on a data set D from ordinal distance information of type (?) is similar to the one for estimating the lens depth function: the characterization (8) is equivalent to two distinct, fixed data points xi and xj being connected in the k-RNG if and only if the probability of a data point drawn uniformly at random from D \ {xi , xj } lying in Lens(xi , xj ) is smaller than k/(|D| − 2). Given a collection S of statements of the kind (?), this probability can be estimated by V (xi , xj ) = N (xi , xj ) , D(xi , xj ) (10) where N (xi , xj ) = number of statements in S comprising both xi and xj and another data point as most central data point, (11) D(xi , xj ) = number of statements in S comprising both xi and xj . Thus our strategy to estimate the k-RNG on D is the following: we connect two data points xi and xj with i 6= j by an undirected edge if and only if V (xi , xj ) < k . |D| − 2 (12) If all statements in S are correct and, for every xi and xj with i 6= j, there are sufficiently many statements in S that comprise both xi and xj and these statements appear to be sampled approximately uniformly at random from the set of all statements that comprise xi and xj , we can expect our estimate of the k-RNG to be reasonable. However, incorrect statements in S create a problem for our strategy. Usually, we are interested in a k-RNG for a small value of the parameter k, aiming at connecting only data points that are close to each other. Consequently, according to (12), in order that the data points xi and xj are connected in our estimate of the k-RNG, the estimated probability V (xi , xj ) has to be small. However, in case of erroneous ordinal data comprising sufficiently many incorrect statements, there will always be statements wrongly indicating that there are some data points in Lens(xi , xj ) that in fact are not, and thus V (xi , xj ) will always be somewhat large. Hence, many of the edges of the true k-RNG on D will not be present in our estimate. To make this formal, consider the following simple noise model: Statements of the kind (?) are incorrect, independently of each other, with some fixed probability errorprob. In an 10 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis incorrect statement the two data points that are not most central appear to be most central with probability 1/2 each. In our experiments in Section 6.1, this noise model is referred to as Noise model I. Assume S to be sampled uniformly at random from all statements. Denote by p = p(xi , xj ) the probability that a data point drawn uniformly at random from D \ {xi , xj } lies in Lens(xi , xj ), that is p = |Lens(xi , xj ) ∩ D|/(|D| − 2). Denote by p̃ = p̃(xi , xj ) the probability that the following experiment yields a positive result: A data point is drawn uniformly at random from D \ {xi , xj }. Independently, a Bernoulli trial with a probability of success equaling errorprob is performed. If the Bernoulli trial fails, the experiment yields a positive result if and only if the drawn data point falls into Lens(xi , xj ). If the Bernoulli trial succeeds, the experiment yields a positive result if and only if the data point does not fall into Lens(xi , xj ) and another Bernoulli trial, with a probability of success of one half and performed independently, succeeds. It is clear that under the considered model, V (xi , xj ) as given in (10) and (11) is an estimate of p̃ rather than of p. Assuming that errorprob is less than 2/3, we can relate p̃ and p via 1 p̃ = p · (1 − errorprob) + (1 − p) · errorprob · , 2 (13) or equivalently p= p̃ − 1− 1 2 3 2 · errorprob . · errorprob (14) The probability p̃ is obtained from p by applying an affine transformation and vice versa. It follows from (13) that our strategy yields an estimate of the k 0 -RNG with k0 = k− 1 2 · errorprob · (|D| − 2) 1 − 32 · errorprob (15) rather than of the intended k-RNG. In particular, we have k 0 < k for k < 13 (|D| − 2) and k 0 ≤ 0 for k ≤ 12 · errorprob · (|D| − 2). This means that whenever k < 31 (|D| − 2), our strategy produces an estimate containing fewer edges than we would like to have, and whenever k ≤ 21 · errorprob · (|D| − 2), it even produces an estimate of an empty graph, that is a graph without any edges at all. These findings might seem worse than they actually are: using our estimated graph for classification or clustering, we do not care whether we work with the estimate of a k 0 -RNG instead of a k-RNG, but only whether our classification or clustering result is useful. However, we have to bear them in mind when choosing the parameter k in our algorithms: Using cross-validation for choosing k for Algorithm 4 (classification by means of a majority vote of neighbors in the graph), we may only use Leave-one-out cross-validation variants since we have to ensure roughly the same size of the training set during cross-validation and the training set in the ultimate classification task. Otherwise, a value of k that is optimal during cross-validation will not be optimal in the ultimate classification problem since k 0 depends on |D| as stated in (15). Applying Algorithm 5 (spectral clustering on the estimated k-RNG), we have to choose k so large that the constructed graph is connected. This is not only required by some versions of spectral clustering, but also indicates that the graph is indeed an estimate of a true k 0 -RNG with k 0 ≥ 1 rather than of an empty graph. 11 Kleindessner and von Luxburg If we know the value of errorprob, or have at least an estimate of it, we can correct for the bias of our strategy. In order to estimate the k-RNG on a data set D for the intended value of k, according to (14), two data points xi and xj with i 6= j should be connected if and only if V (xi , xj ) − 21 · errorprob k < , 3 |D| − 2 1 − 2 · errorprob (16) which equals (12) if errorprob = 0. Note that although the left-hand side of equation (16) is an unbiased estimator of p(xi , xj ) for every xi and xj with i 6= j (assuming S to be sampled uniformly at random from all statements), due to the thresholding step in (16) our estimation strategy is still not an unbiased estimator of the intended k-RNG. 4. Algorithms for Medoid Estimation, Outlier Identification, Classification, and Clustering In this section we formally state our algorithms for the problems of medoid estimation, outlier identification, classification, and clustering when the only available information about a data set D is a collection S of statements of the kind (?). Furthermore, we discuss running times, space requirements, and some implementation aspects. 4.1 Medoid Estimation The following Algorithm 1 returns as output an estimate of a medoid of D as motivated in Section 3.1. The estimate is given by an object that maximizes the estimated lens depth function on D. By setting the estimated lens depth value LD(O) to zero for objects O that do not appear in any statement in S, which means that we do not have any information about O, we ensure that such an object is never returned as output (unless there is no available information about D at all, i.e. S = ∅). Algorithm 1 Estimating a medoid Input: a collection S of statements of the kind (?) for some data set D Output: an estimate of a medoid of D 1: for every object O in D compute LD(O) := 2: number of statements comprising O as most central object number of statements comprising O  if the denominator equals zero, set LD(O) = 0 return an object O for which LD(O) is maximal If we assume that every object in D can be identified by a unique index from {1, . . . , |D|} and, given a statement in S, the indices of the three objects involved can be accessed in constant time, then Algorithm 1 can be implemented with O(|D| + |S|) time and O(|D|) space in addition to storing S. This can be done by going through S only once and updating counters for the three objects found in a statement. If the objects in D are not indexed by 12 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis 1, . . . , |D|, we can use minimal perfect hashing in order to first create such an indexing. This requires about O(|D|) time and space (Hagerup and Tholey, 2001; Botelho et al., 2007), so the overall requirements remain unaffected by this additional step. An important feature of Algorithm 1 is that it can easily be parallelized by partitioning S into several subsets that may be processed independently. Since one usually may expect that |S|  |D|, such a parallelization has almost ideal speedup, that is doubling the number of processing elements leads to almost only half of the running time. 4.2 Outlier Identification By means of the following Algorithm 2 we can identify outliers in D given as input only a collection S of statements of the kind (?). Outlier candidates are data points with low estimated lens depth values LD(O). By setting LD(O) to zero for objects O that do not appear in any statement we guarantee that such objects are identified as outliers. Algorithm 2 Identifying outlier candididates Input: a collection S of statements of the kind (?) for some data set D Output: a subset of D containing objects that are outlier candidates 1: for every object O in D compute LD(O) := number of statements comprising O as most central object number of statements comprising O  if the denominator equals zero, set LD(O) = 0 identify objects with exceptionally small values of LD(O) 3: return the set of identified objects 2: The only difference between Algorithm 2 and Algorithm 1 is that instead of returning the object with the highest value of LD(O) as estimate of a medoid we return objects with exceptionally small values as outlier candidates. The running time of Algorithm 2 depends on the identification strategy in Step 2, but if one simply identifies c objects with smallest values (1 ≤ c ≤ |D|), then Algorithm 2 can be implemented with O(|D| + |S|) time and O(|D|) space in addition to storing S analogously to Algorithm 1. Here we make use of the fact that the selection of the c-th smallest value in an array of length |D| can be done in O(|D|) time and space (Blum et al., 1973). Just as for Algorithm 1, the first step of Algorithm 2 can easily be parallelized. 4.3 Classification We propose two different algorithms for dealing with K-class classification in a data set D consisting of a subset L of labeled objects and a subset U of unlabeled objects when given no more information than the class labels for the objects in L and a collection S of statements of the kind (?) for D. Our goal is to predict a class label for every object in U. Our first proposed algorithm, Algorithm 3, is based on the lens depth function and has been motivated in Section 3.1. It consists of computing a feature embedding of D into 13 Kleindessner and von Luxburg [0, 1]K ⊆ RK , in which each feature corresponds to the estimated lens depth value with respect to one class, and subsequently applying a classification algorithm that is suitable for K-class classification on RK to this embedding. Algorithm 3 K-class classification I Input: a collection S of statements of the kind (?) for some data set D comprising a set L of labeled objects and a set U of unlabeled objects; a class label for every labeled object in L according to its membership in one of K classes (referred to as Class1 , . . . , ClassK )  note that we have D = L ∪˙ U and L = Class1 ∪˙ Class2 ∪˙ . . . ∪˙ ClassK Output: an inferred class label for every unlabeled object in U 1: for every object O in D and i ∈ {1, . . . , K} compute NCi (O) := number of statements comprising O and two labeled objects from Classi with O as most central object DCi (O) := number of statements comprising O and two labeled objects from Classi NCi (O) LDCi (O) := DCi (O) 2:  if DCi (O) equals zero, set LDCi (O) = 0 train an arbitrary classifier (suitable for K-class classification on RK ) with training data {(LDC1 (Ol ), LDC2 (Ol ), . . . , LDCK (Ol )) : Ol ∈ L} ⊆ RK where the label of (LDC1 (Ol ), LDC2 (Ol ), . . . , LDCK (Ol )) equals the label of Ol 3: return as inferred class label of every unlabeled object Ou ∈ U the label predicted by the classifier applied to (LDC1 (Ou ), LDC2 (Ou ), . . . , LDCK (Ou )) ∈ RK Assuming that the number of classes K is bounded by a constant, the first step of Algorithm 3 requires O(|D| + |S|) operations and O(|D|) space in addition to storing S. This is the same as for Algorithm 1 and Algorithm 2. As before, this step can easily and highly efficiently be parallelized (assuming that |S|  |D|). The time and space complexities of the remaining steps depend on the generic classifier that is used. Our second proposed algorithm, Algorithm 4, is based on the k-RNG and has been motivated in Section 3.2. It is an instance-based learning method like the well-known k-NN classifier: There is no explicit training phase involved. An unlabeled object is readily classified by assigning the label that is most frequently encountered among the neighbors of the unlabeled object in the estimated k-RNG. Assuming that the number of classes K is bounded by a constant, Algorithm 4 can be implemented with O(|D|+|U|·|L|+|S|) = O(|U|·|L|+|S|) time and O(|D|+|U|·|L|) = O(|U|·|L|) space in addition to storing S. Here we have to assign to each labeled object a unique identifier in {1, . . . , |L|} and to each unlabeled object a unique identifier in {1, . . . , |U|} that can be looked up in constant time. This allows us to increment a value of N (Ou , Ol ) or D(Ou , Ol ) for (Ou , Ol ) ∈ U ×L stored in an array of size |U|×|L| within constant time. Once 14 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis Algorithm 4 K-class classification II Input: a collection S of statements of the kind (?) for some data set D comprising a set L of labeled objects and a set U of unlabeled objects; a class label for every labeled object in L according to its membership in one of K classes (referred to as Class1 , . . . , ClassK ); an integer parameter k  note that we have D = L ∪˙ U and L = Class1 ∪˙ Class2 ∪˙ . . . ∪˙ ClassK Output: an inferred class label for every unlabeled object in U 1: for every unlabeled object Ou ∈ U and every labeled object Ol ∈ L compute N (Ou , Ol ) := number of statements comprising both Ou and Ol and another labeled object as most central object D(Ou , Ol ) := number of statements comprising both Ou and Ol and another labeled object N (Ou , Ol ) V (Ou , Ol ) := D(Ou , Ol )  if D(Ou , Ol ) equals zero, set V (Ou , Ol ) = ∞ 2: return as inferred class label of every unlabeled object Ou ∈ U the majority vote (ties broken randomly) of the labels of those objects Ol ∈ L that satisfy V (Ou , Ol ) < k |L| − 1 the objects are indexed by 1, . . . , |D| (compare with Section 4.1), we can easily assign such identifiers in O(|D|) time and space. Again, it is straightforward to parallelize Algorithm 4 by partitioning S. 4.4 Clustering Our proposed Algorithm 5 for clustering a data set D when only given a collection S of statements of the kind (?) as input consists of estimating the k-RNG on D and applying spectral clustering to the estimate. Note that some versions of spectral clustering require the underlying similarity graph not to contain isolated vertices. A true k-RNG never contains isolated vertices since a k-RNG is always connected (compare with Section 5.3), but if k is chosen too small, an estimated k-RNG might contain isolated vertices (compare with Section 3.2.1). The first step of Algorithm 5 can be implemented with O(|D|2 + |S|) time and O(|D|2 ) space in addition to storing S. It can be parallelized in the same way as the corresponding parts of the previous algorithms. However, here we achieve almost ideal speedup only in case |S|  |D|2 . The second step can be implemented with O(|D|2 ) time and O(|D|2 ) space. The complexity of Step 3 is the one of spectral clustering after the construction of a similarity graph. Its costs are dominated by the complexity of eigenvector computations and are 15 Kleindessner and von Luxburg Algorithm 5 Clustering Input: a collection S of statements of the kind (?) for some data set D = {O1 , . . . , On }; an integer parameter k; number l of clusters to construct; a parameter σ > 0 in case of weighted version Output: a hard clustering C1 , . . . , Cl ⊆ D with C1 ∪˙ C2 ∪˙ . . . ∪˙ Cl = D 1: for every pair (Oi , Oj ) of objects in D compute N (Oi , Oj ) := number of statements comprising both Oi and Oj and another object as most central object D(Oi , Oj ) := number of statements comprising both Oi and Oj N (Oi , Oj ) V (Oi , Oj ) := D(Oi , Oj ) 2:  if D(Oi , Oj ) = 0, set V (Oi , Oj ) = ∞ (in particular, V (Oi , Oi ) = ∞ for i = 1, . . . , n) let W = (wij )i,j=1,...,n be a (n, n)-matrix and either set ( 1 if V (Oi , Oj ) < k/(|D| − 2) Wij =  unweighted version 0 else or  2 j)  − V (Oi ,O 2 σ Wij = e 0 3: 4: if V (Oi , Oj ) < k/(|D| − 2) else  weighted version apply spectral clustering to W with l as input parameter for the number of clusters return clusters C1 , . . . , Cl according to the clusters produced in Step 3 commonly stated to be in general in O(n3 ) = O(|D|3 ) regarding time and O(n2 ) = O(|D|2 ) regarding space for an arbitrary number of clusters l, unless approximations are applied (Yan et al., 2009; Li et al., 2011). In many cases the estimate of the k-RNG constructed by Algorithm 5 might be sparse (compare with Section 5.3), and then the eigenvector computations can be done much more efficiently (Bai et al., 2000). However, in the worst case the overall running time of Algorithm 5 can be up to O(|D|3 + |S|). The overall space requirements are O(|D|2 ) in addition to storing S. 5. Related Work and Further Background In this section we present related work and further background on ordinal data analysis, statistical depth functions, and the k-relative neighborhood graph. In a first reading, the reader may skip this part and go to the experimental Section 6 immediately. 16 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis 5.1 Machine Learning in a Setting of Ordinal Distance Information We have mentioned in Section 1 that ordinal data can be distinguished with respect to the kind of ordinal relationships that it consists of and that ordinal embedding is a general approach to machine learning in a setting of ordinal distance information. Here we discuss these two topics in more detail. 5.1.1 Different Types of Ordinal Data The most general form of ordinal distance information consists of binary answers to some dissimilarity comparisons ? d(A, B) < d(C, D), (17) where A, B, C, D could be any objects of some data set. In the machine learning literature, this very general type of ordinal data has been studied in Agarwal et al. (2007), Kleindessner and von Luxburg (2014), Terada and von Luxburg (2014), and Arias-Castro (2015). The type most often studied in the literature is the one of similarity triplets (Jamieson and Nowak, 2011; Tamuz et al., 2011; van der Maaten and Weinberger, 2012; Wilber et al., 2014; Amid and Ukkonen, 2015; Heim et al., 2015; Amid et al., 2016; Jain et al., 2016; Haghiri et al., 2017). Similarity triplets are answers to dissimilarity comparisons of the restricted form ? d(A, B) < d(A, C). (18) Compared to (17), A equals D and serves as an anchor point. Another well-known type of ordinal data is the directed, but unweighted k-nearest neighbor graph on a data set (Shaw and Jebara, 2009; von Luxburg and Alamgir, 2013; Terada and von Luxburg, 2014; Hashimoto et al., 2015; Kleindessner and von Luxburg, 2015). This graph provides the ordinal dissimilarity relationships d(V, N ) < d(V, O) for objects V , N , and O such that N is adjacent to V in the graph, but O is not. Ordinal distance information in the form (?), which we consider in this work, is similar to statements of the form (compare with Section 1) Object A is the outlier within the triple of objects (A, B, C). () This type of ordinal data has been studied by Heikinheimo and Ukkonen (2013) and also by Ukkonen et al. (2015). Heikinheimo and Ukkonen (2013) proposed an algorithm for estimating a medoid of a data set based on statements of the kind (). Their approach is closely related to ours (compare with Algorithm 1): For every fixed data point, they estimate the probability that the data point is the outlier within a triple of three data points containing the fixed data point and two data points chosen uniformly at random from the remaining ones. Then they take the data point with minimal estimated probability as an 17 Kleindessner and von Luxburg estimate of a medoid. However, the conceptual problem with their approach is that the function that it is based on, F (x; P ) = 1 − P robability(x is the outlier within the triple of points (x, X, Y )), (19) is not a valid statistical depth function. It does not satisfy one of the most crucial properties of statistical depth functions, namely maximality at the center for symmetric distributions (see Section 5.2). As a consequence, their approach always fails to return a true medoid for certain data sets, even though given access to the correct statements of the kind () for all triples of data points. As we will see in the experiments in Section 6.1.1, Algorithm 1 consistently achieves better results in recovering a true medoid of a data set compared to the method by Heikinheimo and Ukkonen when both methods are given the same number of statements, either of the kind (?) or of the kind (), as input. As Heikinheimo and Ukkonen remark, one can adapt their method to the problem of outlier identification by considering data points with high estimated probabilities as outlier candidates—in the same way as Algorithm 2 is related to Algorithm 1. In the experiments in Section 6.1.2 we will compare Algorithm 2 to such an approach. Dealing with ordinal distance information comes with a critical drawback compared to a standard setting of cardinal distance information. While for a data set comprising n objects there are in total “only” Θ(n2 ) distances between objects, there are Θ(n4 ) different distance comparisons of the form (17). If one only allows for comparisons of the form (18), that is one considers similarity triplets, there are still Θ(n3 ) different comparisons. This is also the order of magnitude for the number of all statements of the kind (?) or (). Unless n is rather small, in practice it is prohibitive to collect all statements or answers to all different distance comparisons. The hope is that much fewer statements or answers already contain the bulk of usable information due to high redundancy in the ordinal data. This gives rise to distinguishing between a batch setting and an active setting in the study of algorithms for ordinal distance information: while in a batch setting we are given the ordinal data a priori, in an active setting we are allowed to query ordinal relationships, trying to do it in such a way as to exploit redundancy (Jamieson and Nowak, 2011; Tamuz et al., 2011). Our Algorithms 1 to 5 are designed for the general batch setting. We leave it for future work to devise algorithms for the considered problems in an active setting (see Section 7). 5.1.2 Ordinal Embedding One important and general approach to machine learning in a setting of ordinal distance information is to construct an ordinal embedding of the data set, that is to map data points to points in a Euclidean space Rm such that the embedding (with respect to the Euclidean interpoint distances) preserves the given ordinal data as well as possible. After doing so, one can simply apply any algorithm designed for vector-valued data to the embedding for solving the task at hand. This approach is justified by theoretical results showing that for a sufficiently large number of given ordinal relationships and data sets that can be perfectly embedded (this means that all available ordinal relationships are preserved) the embedding is uniquely determined up to similarity transformations as the size of the data set goes to 18 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis infinity (Kleindessner and von Luxburg, 2014; Arias-Castro, 2015). The problem of ordinal embedding dates back to the development of ordinal multidimensional scaling in the 1960s (also known as non-metric multidimensional scaling; Shepard, 1962a,b, and Kruskal, 1964a,b, also see the monograph Borg and Groenen, 2005). More recently, it has been studied in the machine learning community resulting in a number of algorithms (Agarwal et al., 2007; Shaw and Jebara, 2009; Tamuz et al., 2011; van der Maaten and Weinberger, 2012; Terada and von Luxburg, 2014; Amid and Ukkonen, 2015; Heim et al., 2015; Amid et al., 2016; Jain et al., 2016). For none of these algorithms theoretical bounds for their complexity are available in the literature, but it is widely known that they are utterly slow and not appropriate when dealing with large data sets and/or many ordinal relationships (this is confirmed by our experiments in Section 6.1.1). Furthermore, these algorithms either solve a non-convex optimization problem or a relaxed version of such one, in both cases involving the risk of finding only a suboptimal solution. Often, their outcome depends on a random initialization of the ordinal embedding. Moreover, the choice of the dimension of the space of the embedding can be crucial and highly influences the running time of the algorithms, as does the amount of noise in the available ordinal data. All these are strong arguments for aiming to solve machine learning problems in a setting of ordinal distance information directly, that is without constructing an ordinal embedding as an intermediate step, and thus for our proposed Algorithms 1 to 5. 5.2 Statistical Depth Functions and Lens Depth Function Statistical depth functions (see, e.g., Serfling, 2006, Cascos, 2009, Mosler, 2013, or the introduction of the dissertation of Van Bever, 2013, for basic reviews) have been developed to generalize the concept of the univariate median to multivariate distributions. To this end, a depth function is supposed to measure the centrality of all points x ∈ Rm with respect to a probability distribution, in the sense that the depth value at x is high if x resides in the “middle” of the distribution and that it is lower the more distant from the mass of the distribution x is located. The first statistical depth function has been proposed by Tukey (1974). Given a probability distribution P on Rm , the seminal halfspace depth function HD maps every point x ∈ Rm to the smallest probability of a closed halfspace containing x, that is HD(x; P ) = inf u∈S m−1 P ({y ∈ Rm : uT (y − x) ≥ 0}), where S m−1 = {u ∈ Rm : uT u = 1} denotes the unit sphere in Rm . The intuition behind this definition is simplest to understand in case of an absolutely continuous distribution P : in this case HD(x; P ) ≤ 1/2, x ∈ Rm , and in order for a point x to be considered central with respect to P it should hold that any hyperplane passing through x splits Rm into two halfspaces of almost equal probability 1/2. Hence, points x are considered more central the higher their halfspace depth value HD(x; P ) is, and any point maximizing HD( · ; P ) is called a Tukey median. Figure 4 shows examples of the halfspace depth function for two absolutely continuous distributions on R2 . Note that a depth function can resemble the density function of the underlying distribution only in case of a unimodal distribution—as 19 Kleindessner and von Luxburg Figure 4: Illustration of the halfspace depth function. Mesh plot of the density and the halfspace depth function of a product of two Beta(2, 4)-distributions (1st & 2nd plot) and a mixture of two Gaussians (3rd & 4th plot), respectively. a measure of global centrality depth functions are intended to be unimodal. We will take this up again in Section 6.1.2 and Section 7. For a univariate and continuous distribution any ordinary median is also a Tukey median. In addition, the halfspace depth function HD satisfies a number of desirable properties: 1. Affine invariance: HD considered as a function in both x and P is invariant under affine transformations. 2. Maximality at the center: for a (halfspace) symmetric distribution the center of symmetry is a Tukey median. 3. Monotonicity with respect to the deepest point: if there is a unique Tukey median µ, HD(x; P ) decreases as x moves away along a ray from µ. 4. Vanishing at infinity: HD(x; P ) → 0 as kxk → ∞. Even though there is not a unique definition of a statistical depth function, these or closely related properties are typically requested for a function to qualify as depth function. Beside Tukey’s halfspace depth, prominent examples of depth functions are simplicial depth (Liu, 1988, 1990), majority depth, projection depth, or Mahalanobis depth (Liu, 1992; Zuo and Serfling, 2000). To the best of our knowledge, the lens depth function (Liu and Modarres, 2011) is the only statistical depth function from the literature that can be evaluated given only ordinal distance information about a data set in an arbitrary semimetric space. Note that the function F defined in (19), which the approach by Heikinheimo and Ukkonen (2013) is based on, is provably not a statistical depth function. It does not satisfy the property of maximality at the center for symmetric distributions. Indeed, as Heikinheimo and Ukkonen observe, in case of a symmetric bimodal distribution in one dimension with the two modes sufficiently far apart, the center of symmetry is in fact a minimizer of F . We provide some references related to our Algorithms 2 and 3: The idea of considering data points with a small depth value as outliers has been thoroughly studied in the setting of a contamination model in Chen et al. (2009) and Dang and Serfling (2010). In particular, they deal with the question of determining what a small depth value is. The simple max-depth approach to binary classification outlined in Section 3.1 has already been proposed by Liu (1990), using simplicial depth instead of the lens depth function. 20 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis It has been theoretically studied in Ghosh and Chaudhuri (2005). Ghosh and Chaudhuri were able to prove that the max-depth approach is consistent, that is it asymptotically achieves Bayes risk, for equally probable and elliptically symmetric classes that only differ in location when using one of several depth functions and dealing with general K-class problems. Working not too well when these assumptions are not satisfied, the max-depth approach has been refined by Li et al. (2012) by allowing for more general classifiers on the DD-plot, thus overcoming some of its original limitations. The DD-plot (depth vs. depth plot; introduced by Liu et al., 1999) is the image of the data under the feature map x 7→ (DF (x; Class1 ), DF (x; Class2 )) ∈ R2 , where DF denotes the depth function under consideration. Interestingly, Li et al. again only consider the 2-class case and propose a one-vs-one approach for the general case, which is different from our strategy of simply considering x 7→ (DF (x; Class1 ), DF (x; Class2 ), . . . , DF (x; ClassK )) ∈ RK as feature map and subsequently performing classification on RK . We conclude this section with some comments about the lens depth function. An early version of the lens depth function has already been mentioned, but not seriously studied, by Lawrence (1996, Section 2.3) and by Bartoszynski et al. (1997). The main reference for the lens depth function is Liu and Modarres (2011), where the lens depth function has been defined and systematically investigated. However, after reading the proofs in detail, we found that there is still an important gap. Liu and Modarres (2011) claim that the lens depth function satisfies the property of maximality at the center for centrally symmetric distributions on Rm (Theorem 6 in their paper). However, there is an error in their proof. It is not true that, conditioning on X1 , the probability of X2 falling into a region such that t ∈ Lens(X1 , X2 ) holds decreases as t ∈ Rm moves away from the center for all values of X1 , and hence the monotonicity of the integral is not guaranteed. The same mistake appears in Elmore et al. (2006) and in Section 2.5 of Yang (2014) when showing the property for the spherical depth function and the β-skeleton depth function, respectively. So it has not yet been established that the lens depth function satisfies this essential property of statistical depth functions. We were not able to fix the proof, but we still believe that the statement is correct. At least, unlike for the function F defined in (19), we have not been able to construct any example of a symmetric distribution for which the lens depth function does not attain its maximum at the center. 5.3 k-Relative Neighborhood Graph The k-RNG belongs to the class of proximity graphs: two vertices are connected if they are in some sense close to each other (see Jaromczyk and Toussaint, 1992, for a basic survey or Bose et al., 2012, for a more recent paper). Beside the k-RNG, Gabriel graphs (Gabriel and Sokal, 1969) and k-NN graphs are prominent examples of proximity graphs. The 1-RNG, which is simply known as RNG, has been used in a wide range of applications (see Toussaint, 2014, for a review and detailed references). Most interesting for us are its use in classification and clustering as related to our Algorithms 4 and 5, respectively: 21 Kleindessner and von Luxburg Instance-based classification based on the RNG neighborhood, that is inferring a point’s label by taking a majority vote of the point’s neighbors in the RNG, has been empirically shown to be competitive with the k-NN classifier in Sánchez et al. (1997a) and Toussaint and Berzan (2012). Instance-based classification based on the RNG neighborhood has also been used for prototype selection for the 1-NN classifier (Toussaint et al., 1984; Sánchez et al., 1997b). The RNG has been used for spectral clustering in Correa and Lindstrom (2012) with a strategy of assigning locally adapted edge weights. Our experiments in Section 6.1.4 show that such a strategy is dispensable and that using the k-RNG weighted as in (9), or also unweighted, yields reasonable results as well. We have mentioned in Section 3.2 and Section 4.4 that a true k-RNG (not an estimated one) is always connected. This follows from the fact that the RNG on a data set D contains the minimal spanning tree on D as a subgraph. By minimal spanning tree we mean the minimal spanning tree of the complete graph on D in which an edge is weighted with the distance between two points. A proof of this property for data points in the Euclidean plane, which readily generalizes to data sets in arbitrary semimetric spaces, can be found in Toussaint (1980). The RNG is guaranteed to be sparse for data sets in the 2-dimensional or 3-dimensional Euclidean space, but it can be dense in higher-dimensional spaces or if d is induced by the 1-norm or the maximum norm (Jaromczyk and Toussaint, 1992). There is a large literature on the question how to efficiently compute a k-RNG on a data set, mainly for data sets in R2 or R3 (see the references in Toussaint, 2014), and how to approximate the RNG by a graph that is easier to compute (Andrade and de Figueiredo, 2001). We are not aware of any work that deals with estimating the k-RNG as we do in this paper. 6. Experiments We performed several experiments for examining the performance of our proposed Algorithms 1 to 5 and compared them to ordinal embedding approaches. In case of Algorithm 1 and Algorithm 2 we also made a comparison with the methods proposed by Heikinheimo and Ukkonen (2013) explained in Section 5.1.1. Recall that an ordinal embedding approach consists of first constructing an ordinal embedding of a data set D based on the given ordinal distance information and then solving the problem on the embedding by applying a standard algorithm. For example, in the case of medoid estimation a medoid of an ordinal embedding is computed and the corresponding object is returned as an estimate of a medoid of D. For constructing an ordinal embedding we tried several algorithms: the GNMDS (generalized non-metric multidimensional scaling) algorithm by Agarwal et al. (2007), the SOE (soft ordinal embedding) algorithm by Terada and von Luxburg (2014), and the STE (stochastic triplet embedding) and t-STE (t-distributed stochastic triplet embedding) algorithms by van der Maaten and Weinberger (2012). The GNMDS algorithm and the SOE algorithm can take answers to arbitrary dissimilarity comparisons of the form (17) as input, while the STE and t-STE algorithms are designed only for similarity triplets, that is answers to comparisons (18). The ordinal data that we gave to the embedding algorithms were all the similarity triplets obtained via (2) from a collection of statements of the kind (?) that we provided as input to one of our algorithms. We used the Matlab implementations of GNMDS, STE, and t-STE provided by van der Maaten and Weinberger (2012) and the 22 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis R implementation of SOE provided by Terada and von Luxburg (2014). We set all parameters except the dimension m of the space of the embedding to the provided default parameters (for all algorithms the default dimension is two). Note that all algorithms try to iteratively minimize an objective function that measures the amount of violated ordinal relationships, and in doing so their results depend on a random initialization of the ordinal embedding. We start with presenting experiments on artificial data in Section 6.1. In Section 6.2 we deal with real data consisting of 60 images of cars and ordinal distance information of the kind (?) that we have collected via crowdsourcing in an online survey. 6.1 Artificial Data In the following, except the plots in Figures 8 and 9, where outliers have to be identified by visual inspection, and one plot in Figure 5, which provides a visualization of available statements per data point, all plots of this section show results averaged over running the experiments for 100 times. We primarily study the performance of the considered methods with respect to the number of provided input statements, but also with respect to the amount of noise in the provided ordinal data. We consider two different noise models: Noise model I (with parameter 0 ≤ errorprob ≤ 1) equals the one described in Section 3.2.1, that is a statement of the kind (?) is incorrect, independently of other statements, with some fixed error probability errorprob. In an incorrect statement the two data points that are not most central appear to be most central with probability 1/2 each. In Noise model II (with parameter noiseparam ≥ 0) we distort the dissimilarity values d(A, B), which then induces a distortion of statements. Concretely, we add Gaussian noise with mean zero and standard deviation noiseparam · SD, where SD denotes the standard deviation of all true dissimilarity values d(A, B), A 6= B ∈ D, independently to each dissimilarity value d(A, B). For choosing input statements we essentially consider two sampling strategies: The first one, referred to as uniform sampling, is to choose input statements uniformly at random without replacement from the set of all statements, that is the set of statements for all triples of data points, which were generated according to the noise model under consideration. When applying this sampling strategy and studying performance as a function of the number of input statements, the rightmost measurement in a plot corresponds to the case that all statements are provided as input. In the experiment presented in Figure 7 the provided statements are chosen uniformly at random with replacement from the set of all statements, but there the set of all statements is so large that in fact this does not make any difference. In these plots the rightmost measurement corresponds to a number of input statements of less than one permil of the number of all statements. In order to illustrate our claim that our algorithms require statements to be sampled only approximately uniformly with respect to a fixed data point (Algorithms 1 to 3), or a fixed pair of data points (Algorithms 4 and 5), we also consider a second sampling strategy, referred to as Sampling II. When sampling according to this strategy, we partition the data set into ten groups. For each group we form a set consisting of all statements, generated according to the noise model under considera23 Kleindessner and von Luxburg tion, that comprise at least one data point from the corresponding group. We thenPsample 2 with replacement by selecting one of the ten sets according to probabilities i2 / 10 j=1 j , i = 1, . . . , 10, and choosing a statement from the selected set uniformly at random. When comparing Algorithm 1 or Algorithm 2 to the corresponding methods by Heikinheimo and Ukkonen (2013) in Sections 6.1.1 and 6.1.2, their methods are given a collection of statements of the kind () as input that contains as many statements as the input to our algorithm and is created in a completely analogous way. 6.1.1 Medoid Estimation We measure performance of a method for medoid estimation by the relative error in the objective D (given in (6)), which is given by relative error = D(estimated medoid) − D(true medoid) . D(true medoid) (20) Figure 5 shows in the first two rows the relative error of Algorithm 1, the method by Heikinheimo and Ukkonen (2013), and the embedding approach, using the various embedding algorithms, as a function of the number of provided input statements and as a function of errorprob (Noise model I) for 100 points from a 2-dimensional Gaussian N2 (0, I2 ) and d being the Euclidean metric. Obviously, the embedding approach outperforms Algorithm 1 and the method by Heikinheimo and Ukkonen when dealing only with correct statements, that is errorprob = 0, and embedding into the true dimension (1st row, 1st plot). However, it is not superior over Algorithm 1 anymore when errorprob = 0.3 and the dimension of the embedding is chosen as five (2nd row, 1st plot). Algorithm 1 consistently outperforms the method by Heikinheimo and Ukkonen. All methods show a similar behavior with respect to errorprob (2nd row, 2nd & 3rd plot). Interestingly, the strongest incline in the error does not occur until the transition from errorprob = 0.6 to errorprob = 0.7. The bottom row of Figure 5 also shows the relative error of the various methods as a function of the number of provided input statements, but here input statements were sampled according to the strategy Sampling II. Compared to the strategy of sampling statements uniformly at random without replacement from the set of all statements, Algorithm 1 performs slightly worse, but we consider the difference to be negligible. The last plot of the bottom row shows the difference in the two sampling strategies: while in the uniform case, for all data points there is almost the same number of input statements comprising the data point, when sampling according to Sampling II there are data points for which this number is twice as large as for others (the plot is based on a total of 4500 input statements corresponding to the third measurement in the first and second plot of the bottom row). The biggest advantage of Algorithm 1 (in fact of all our proposed algorithms) compared to an ordinal embedding approach becomes obvious from the plots in the third and fourth row of Figure 5, which show the running times of the experiments shown in the plots in the two top rows: For a fixed size |D| of the data set, like the running times of our proposed algorithms and the method by Heikinheimo and Ukkonen, the running time of the embedding approach with any of the considered embedding algorithms also grows linearly with the number |S| of input statements (indicated by the orange curves). However, in practice Algorithm 1 and the method by Heikinheimo and Ukkonen are vastly superior in 24 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis errorprob=0, embedding dim=2 0.1 0.03 0.02 Relative error 0.01 0 10 3 0.05 0.08 0.06 0.04 0.02 10 4 10 5 10 6 10 4 # input statements 0.1 errorprob=0.3, embedding dim=5 10 5 0 10 3 10 6 0.08 0.025 0.4 0.02 0.04 0.01 0.005 0 0 0.1 0.2 0.3 0.4 0.2 10 5 0 10 6 errorprob=0, embedding dim=2 0 0.2 0.4 0.6 errorprob 50 0 10 3 10 4 10 5 errorprob=0.3, embedding dim=5 10 5 150 100 0 10 3 10 4 10 4 10 5 10 5 0 0.2 0.5 0.4 0.6 errorprob 0.8 1 errorprob=0, embedding dim=5 250 200 150 100 0 10 3 10 6 10 4 10 5 10 6 25% of all statements, embedding dim=2 ALL statements, embedding dim=2 150 20 15 10 0 10 6 errorprob=0, embedding dim=2 0 0.2 100 50 0.04 0.4 0.6 errorprob 0.8 0 1 0 0.2 0.4 0.6 errorprob 0.8 1 errorprob=0.3, embedding dim=2 0.12 Algorithm 1 Heik.&Ukko. GNMDS SOE STE t-STE 0.1 Relative error Relative error 0.4 5 0.05 0.03 0.02 0.01 0 3 10 0.3 # input statements # input statements 0.06 0.2 # input statements Running time [sec] Running time [sec] Running time [sec] 200 0.1 50 25 250 0 350 15 30 300 0 0.2 300 # input statements 350 0.01 0.005 0 1 20 0 10 3 10 6 0.8 errorprob=0.3, embedding dim=2 25 Algorithm 1 Heik.&Ukko. GNMDS SOE STE t-STE Linear fit 0.015 0.3 0.1 Running time [sec] 100 0.5 0.1 Running time [sec] Running time [sec] 150 Relative error Relative error Relative error 0.02 0.3 10 6 0.03 0.015 0.06 10 5 ALL statements, embedding dim=2 0.5 0.025 0.4 10 4 10 4 # input statements 25% of all statements, embedding dim=2 0.5 # input statements Running time 0.02 0.03 0 10 3 Rel. error / sampling 0.03 # input statements 50 Sampling II 0.04 0.01 0 10 3 0.02 Noise model I Uniform sampling 0.04 errorprob=0, embedding dim=5 0.06 Relative error Relative error 0.05 errorprob=0.3, embedding dim=2 0.12 Algorithm 1 Heik.&Ukko. GNMDS SOE STE t-STE Relative error 0.06 0.08 0.06 0.04 0.02 10 4 10 5 10 6 0 3 10 # input statements 10 4 10 5 10 6 # input statements Figure 5: Medoid estimation — 100 points from a 2-dim Gaussian N2 (0, I2 ) with Euclidean metric. Relative error (20) and running time as a function of the number of provided statements of the kind (?) or of the kind () and as a function of errorprob for Algorithm 1, for the method by Heikinheimo and Ukkonen, and for the embedding approach using the various embedding methods. 25 errorprob=0, embedding dim=20 0.015 0.01 0.06 10 4 10 5 10 6 errorprob=0.3, embedding dim=10 0.06 0.04 0.02 0.005 0 10 3 0.08 Relative error Relative error 0.02 errorprob=0.3, embedding dim=20 0.08 Algorithm 1 Heik.&Ukko. GNMDS SOE STE t-STE Relative error 0.025 Relative error Noise model I Uniform sampling Kleindessner and von Luxburg 0.04 0.02 0 10 3 # input statements 10 4 10 5 # input statements 10 6 0 10 3 10 4 10 5 10 6 # input statements Figure 6: Medoid estimation — 100 points from a 20-dim Gaussian N20 (0, I20 ) with Euclidean metric. Relative error (20) as a function of the number of provided statements of the kind (?) or of the kind () for Algorithm 1, for the method by Heikinheimo and Ukkonen, and for the embedding approach using the various embedding methods. terms of running time compared to the embedding approach, even without making use of their potential of simple and highly efficient parallelization. For example, when all statements are provided as input, errorprob = 0, and the embedding dimension is chosen as two, the running time of the embedding approach is between 10 seconds (when using the SOE algorithm) and 141 seconds (when using the t-STE algorithm), while Algorithm 1 or the method by Heikinheimo and Ukkonen only run for 0.01 seconds (3rd row, 1st plot). Note that the running times of Algorithm 1 and the method by Heikinheimo and Ukkonen are independent of errorprob and, of course, of the choice of a dimension of the space of the embedding. The running times of the embedding algorithms tend to increase with the embedding dimension (e.g., differences between the first and the third plot in the third row). The running time of the SOE algorithm also increases with errorprob (4th row, 2nd & 3rd plot). For the GNMDS algorithm this holds for errorprob ≥ 0.1. The running times of the STE and t-STE algorithms vary non-monotonically with errorprob. All experiments shown in Figure 5 were performed in Matlab R2015a on a MacBook Pro with 2.6 GHz Intel Core i7 and 8 GB 1600 MHz DDR3. Within Matlab we invoked R 3.2.2 for computing the SOE embedding. In order to make a fair comparison we did not use MEX files in the implementation of Algorithm 1 or the method by Heikinheimo and Ukkonen. Figure 6 shows almost the same experiments as Figure 5, but this time dealing with 100 points from a 20-dimensional Gaussian N20 (0, I20 ). The distance function d again equals the Euclidean metric. In this high-dimensional case the embedding approach cannot be considered superior anymore. In fact, when errorprob = 0.3 and the number of input statements is small, Algorithm 1 performs best (2nd plot). We omit to show plots of the relative error as a function of errorprob since they look very similar to the ones in Figure 5. Time measurements show that the differences in running times between the embedding approach and Algorithm 1 or the method by Heikinheimo and Ukkonen are even more severe compared to Figure 5, as to be expected because of the high embedding dimensions (plots omitted). 26 Relative error with min/max --- errorprob=0 1 0.8 0.6 0.4 0.2 0 10 4 8 1 0.8 0.6 0.4 10 5 10 6 10 7 10 8 # input statements Algorithm 1 Heik.&Ukko. Linear fit 6 4 2 0.2 0 10 4 Running time 10 1.2 Relative error Relative error Relative error with min/max --- errorprob=0.3 1.4 Algorithm 1 Heik.&Ukko. GNMDS 1.2 Running time [sec] 1.4 Relative error / running time Noise model I Unif. sampling WR Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis 10 5 10 6 # input statements 10 7 10 8 0 10 4 10 5 10 6 10 7 10 8 # input statements Figure 7: Medoid estimation — 8638 vertices in a collaboration network with shortestpath-distance. 1st & 2nd plot: Relative error (20) as a function of the number of provided statements of the kind (?) or of the kind () for Algorithm 1, for the method by Heikinheimo and Ukkonen, and for the embedding approach using GNMDS (for the first three measurements). Average over 100 runs together with the minimum and the maximum of the 100 runs. 3rd plot: The corresponding running times with fitted linear functions. Finally, we applied Algorithm 1 and the method by Heikinheimo and Ukkonen to a large network with the dissimilarity function d equaling the shortest-path-distance. In this context, a medoid is usually referred to as a “most central point with respect to the closeness centrality measure” (Freeman, 1978). Our data set consists of 8638 vertices, which form the largest connected component of a collaboration network with 9877 vertices that represent authors of papers submitted to arXiv in the High Energy Physics - Theory category and with two vertices being connected if the authors co-authored at least one paper (Leskovec et al., 2007). Comparing against the embedding methods as in the previous experiments on this large data set would have taken months (considering various numbers of input statements and averaging over 100 runs), so we only compared against GNMDS (embedding dimension chosen to equal two) for a small number of input statements. The first and the second plot of Figure 7 show the relative error of Algorithm 1 and the method by Heikinheimo and Ukkonen as a function of the number of provided statements of the kind (?) or 7 . The of the kind (). The number of provided statements varies between 104 and  8 · 10 8638 latter is less than one permil of the number of all statements, which is 3 ≈ 1011 . This number is so large that the set of all statements does by no means fit into the main memory of a single machine. The plots also show the relative error of the embedding approach using the GNMDS algorithm for 10000, 27144, and 73680 input statements. As in the previous experiments, the shown error is the average over 100 runs of the experiment, but here the data set is fixed and the only sort of randomness comes from the input statements (and the random initialization of the ordinal embedding in case of GNMDS). In addition to the average error the plots show the minimum and maximum error of the 100 runs for illustrating the variance in the methods. In both the cases of errorprob = 0 (1st plot) and errorprob = 0.3 (2nd plot), when the number of input statements is small, Algorithm 1 outperforms the method by Heikinheimo and Ukkonen. Both methods outperform the embedding approach, which might have difficulties due to the data set being non-Euclidean or might struggle with a too small embedding dimension. For comparison, a strategy of 27 Kleindessner and von Luxburg choosing a data point uniformly at random as medoid estimate incurs a relative error of 0.47 in expectation. Even when given only 10000 input statements, when errorprob = 0, the error of Algorithm 1 is only about one half of this. The variance seems to be similar for both Algorithm 1 and the method by Heikinheimo and Ukkonen and seems to be significantly larger for the embedding approach. As expected, it decreases as the number of input statements increases. In case of errorprob = 0, we also applied GNMDS to the data set providing 10857670 statements as input (corresponding to the eighth measurement in the plots): averaging over 10 runs we obtained an average relative error of 0.28 (which is more than six times larger than the error of Algorithm 1 or the method by Heikinheimo and Ukkonen), where computation took 2.84 hours on average. The third plot of Figure 7 shows the running times of Algorithm 1 and the method by Heikinheimo and Ukkonen as a function of the number of input statements. Both methods have the same running time, which is linear in the number of input statements. The plot does not show the running times of GNMDS at the first three measurements. These were 110, 860, and 879 seconds in case of errorprob = 0 and 92, 848, and 898 seconds in case of errorprob = 0.3. 6.1.2 Outlier Identification We started with testing Algorithm 2 and the corresponding method by Heikinheimo and Ukkonen (2013) by applying them to two visualizable data sets containing some obvious outliers. Both of the Figures 8 and 9 show a scatterplot of the points of a data set D in the Euclidean plane with the “regular” points in black and the outliers in color. For assessing the performance of the two considered methods we plotted the sorted values of LD(O), O ∈ D, as needed for Algorithm 2 as well as the sorted values of estimated probabilities of being an outlier within a triple of objects as needed for the method by Heikinheimo and Ukkonen (compare with Section 5.1.1). Both methods were provided with the same number of statements as input, either of the kind (?) or of the kind (). Both Figure 8 and Figure 9 provide several such plots, varying with this number of input statements as well as with the error probability errorprob (we generated statements according to Noise model I). In all the plots, values belonging to outliers have the same color as the corresponding outlier in the scatterplot. The methods are successful if these colored values appear at the very end of the sorted values, either at the lower end for Algorithm 2 or at the upper end for the method by Heikinheimo and Ukkonen, and there is a (preferably large) gap between the colored values and the remaining ones since then it is easy to correctly identify the outliers. There are inlay plots showing the bottom or top ten values for more precise inspection. Note that there is no averaging involved in creating these plots and they may change with every run of the experiment since they depend on the random data set, the random choice of statements that are provided as input, and the random occurrence of incorrect statements. In Figure 8 the data set consists of 100 points that were drawn from a 2-dimensional Gaussian N2 (0, I2 ) and three outliers added by hand. The dissimilarity function d equals the Euclidean metric. We can see that for both methods the values corresponding to the outliers appear at the right place when given all correct statements as input (top row). However, when given only 25 percent of all statements and errorprob = 0.3, for Algorithm 2 the estimated lens depth value of the pink outlier ranks only sixth smallest, and thus this outlier 28 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis errorprob=0, all statements 0.6 errorprob=0, all statements 1 1 0.5 0.8 Point cloud / sorted values Noise model I Uniform sampling 0.8 0.4 0.6 100 "regular" points and 3 outliers 0.3 0.6 0.1 95 100 0.4 3 0.2 2 0.1 0.05 0.2 0 1 0 20 40 60 5 80 10 100 0 20 40 60 80 100 0 -1 0.5 -2 errorprob=0.3, 25% of all statements 0.7 errorprob=0.3, 25% of all statements 0.7 0.45 -3 0.4 -4 -2 0 2 4 0.35 0.3 0.25 0.25 0.2 0.2 0.15 0.15 0.1 0.1 20 40 60 0.6 0.6 0.5 0.5 95 100 0.4 0.3 5 80 10 100 0.2 20 40 60 80 100 Figure 8: Outlier identification — 100 points from a 2-dim Gaussian N2 (0, I2 ) and three outliers added by hand with Euclidean metric. Data set and sorted values of LD(O) as needed for Algorithm 2 (left; in blue) and of estimated probabilities as needed for the method by Heikinheimo and Ukkonen (right; in red). might not be identified (bottom left). Furthermore, even in the previous situation it might not be possible to correctly infer the number of outliers based on the plot corresponding to Algorithm 2 due to the lack of a clear gap, whereas in both situations this can easily be done for the method by Heikinheimo and Ukkonen. We made similar observations for smaller numbers of provided input statements and other values of errorprob too (plots omitted). In Figure 9 the data set consists of 200 points from a Two-moons data set and four outliers added by hand. Again, d equals the Euclidean metric. Both methods correctly identify the three outliers located quite far apart from the bulk of the data points, and the gap between their values and values belonging to the “regular” data points is large enough to be easily spotted. However, both methods fail to identify the outlier located in-between the two moons (yellow point). The estimated lens depth values or probabilities indicate that this outlier might be the unique medoid—which is indeed the case. For Algorithm 2 this has to be expected and stresses the inherent property of the lens depth function, and statistical depth functions in general, of globally measuring centrality. In doing so, it ignores multimodal aspects of the data (compare with Section 5.2 and Section 7) and cannot be used for identifying outliers that are globally seen at the heart of a data set. At least for the data set of Figure 9 this also holds for the function F defined in (19), which the method by Heikinheimo and Ukkonen is based on. However, for the function F this behavior is not systematic as the example of a symmetric bimodal distribution in one dimension as mentioned in Section 5.2 shows. 29 Kleindessner and von Luxburg errorprob=0, 25% of all statements 0.6 0.9 0.15 Point cloud / sorted values Noise model I Uniform sampling 0.5 0.8 0.05 0.7 0.6 0 0.6 0.4 195 0.1 0.4 200 "regular" points and 4 outliers 5 0.3 4 errorprob=0, 25% of all statements 0.8 10 200 0.5 3 0.2 2 0.1 1 0 0.4 0.3 50 100 150 200 0.2 50 100 150 200 0 -1 -2 0.5 -3 0.45 -4 0.4 -5 0 5 errorprob=0.3, all statements 0.35 0.6 0.6 0.55 0.5 0.5 0.4 0.45 0.25 0.3 195 200 0.4 0.2 0.25 0.2 0.15 errorprob=0.3, all statements 0.65 0.35 0.3 0.15 50 100 5 150 10 200 0.25 50 100 150 200 Figure 9: Outlier identification — 200 points from a Two-moons data set and four outliers added by hand with Euclidean metric. Data set and sorted values of LD(O) as needed for Algorithm 2 (left; in blue) and of estimated probabilities as needed for the method by Heikinheimo and Ukkonen (right; in red). In the last experiment of this section we study Algorithm 2 and the method by Heikinheimo and Ukkonen by using them for outlier identification in a data set consisting of USPS digits. The data set consists of 500 digits chosen uniformly at random from digits 6 and ten outlier digits chosen uniformly at random from the remaining digits. The dissimilarity function d equals the Euclidean metric. We assess the performance of Algorithm 2 and the method by Heikinheimo and Ukkonen by counting how many of the ten outliers are among the ten digits ranked lowest or highest according to the values of LD(O) and estimated probabilities, respectively. Figure 10 shows these numbers as a function of the number of provided input statements in case of uniform sampling and statements generated according to Noise model I (1st row) and in case of Sampling II and statements generated according to Noise model II (2nd row), for errorprob = 0 / noiseparam = 1 (1st plot), errorprob = 0.1 / noiseparam = 1.5 (2nd plot), and errorprob = 0.3 / noiseparam = 2 (3rd plot). We can see that the method by Heikinheimo and Ukkonen performs slightly better in the setting of the first row and that the performance of both methods is essentially the same in the setting of the second row. Most often, the methods can identify three to five outliers, which we consider to be not bad, but not good either. Choosing another digit than 6 for defining the bulk of “regular” points leads to similar results (plots omitted). To sum up the insights from the experiments shown in Figures 8 to 10, we may conclude that both methods are capable of identifying outliers located lonely and far apart from the bulk of a data set, but should be used with some care in general. The method by Heikinheimo and Ukkonen seems to be superior—which is not very surprising since statements of the 30 500+10 points --- errorprob=0 5 # correctly identified # correctly identified 4 3.5 3 2.5 Algorithm 2 Heik.&Ukko. 2 1.5 10 4 500+10 points --- errorprob=0.1 10 5 10 6 10 7 4 3.5 3 2.5 2 10 10 3 10 6 5 10 6 10 7 10 1.5 10 4 8 10 7 10 8 500+10 points --- noiseparam=1.5 4 3.5 3 2.5 10 4 10 5 # input statements 10 6 # input statements 10 5 10 6 10 7 10 8 # input statements # correctly identified 4 # correctly identified # correctly identified 500+10 points --- noiseparam=1 10 5 3 2.5 # input statements 3.5 2.5 10 4 4 3.5 2 1.5 10 4 8 500+10 points --- errorprob=0.3 4.5 # input statements 4 5 4.5 # correctly identified 5 4.5 # correctly identified Noise model I Noise model II Sampling II Uniform sampling Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis 10 7 10 8 500+10 points --- noiseparam=2 3.5 3 2.5 10 4 10 5 10 6 10 7 10 8 # input statements Figure 10: Outlier identification — 500 points from the subset of USPS digits 6 and ten outlier digits with Euclidean metric. Number of correctly ranked outliers as a function of the number of provided statements of the kind (?) or of the kind () for Algorithm 2 and for the method by Heikinheimo and Ukkonen. kind () readily inform about outliers within triples of data points. It produces larger and thus easier to spot gaps than Algorithm 2, but is less understood theoretically. 6.1.3 Classification We compared Algorithms 3 and 4 to an ordinal embedding approach that consists of embedding a data set D comprising a set L of labeled data points and a set U of unlabeled data points into Rm using the given ordinal distance information and applying a classification algorithm to the embedding. Note that this approach is semi-supervised since it makes use of answers to dissimilarity comparisons involving data points of U for constructing the embedding of D. Algorithm 3, in contrast, only uses ordinal distance information involving data points of L for approximately evaluating the feature map (7) on L and hence is a supervised technique as long as the classifier on top is. Algorithm 4 is a supervised instance-based learning method. Algorithm 3 as well as the embedding approach require an ordinary classifier on top, that is a classifier appropriate for real-valued feature vectors. For simplicity, in the experiments presented here we either used the k-NN classifier or the SVM (support vector machine) algorithm with the standard linear kernel (e.g., Cristianini and Shawe-Taylor, 2000). Both these classification algorithms require to set parameters, which we did by means of 10-fold cross-validation: the parameter k for the k-NN classifier was chosen from the range 1, 3, 5, 7, 11, 15, 23 and the regularization parameter for the SVM algorithm was chosen from 0.01, 0.05, 0.1, 0.5, 1, 5, 10, 50, 100, 500, 1000. The ordinal embedding algorithms produce embeddings on an arbitrary scale. Before applying the classification algorithms, we rescaled an ordinal embedding to have diameter 2. The feature embedding 31 errorprob=0, embedding dim=2 errorprob=0.3, embedding dim=2 0.14 0.5 0.12 0.2 0.1 0.4 0.15 0.15 0.08 0.3 0.06 0 0.1 0.2 0.3 0.4 0.5 0.2 0.1 0.1 0.05 0.05 0.1 0.35 10 4 10 5 10 6 10 4 10 5 0 10 6 0 0.2 0.4 0.6 errorprob # input statements noiseparam=1.5, embedding dim=2 0.35 noiseparam=3, embedding dim=2 0.8 1 25% of all statements, embedding dim=2 0.25 0.105 0.3 0.3 0.1 0.095 0.2 0.09 0.25 0.2 0.085 0-1 loss 0-1 loss 0-1 loss 0.25 0.2 0.15 0.15 0.1 0.1 0.08 0.075 0.15 0.07 0 0.5 1 1.5 0.1 0.05 10 4 10 5 0.05 10 6 10 4 # input statements 10 5 10 6 0.05 0 1 2 # input statements errorprob=0, embedding dim=2 0.25 3 4 noiseparam errorprob=0.3, embedding dim=2 25% of all statements, embedding dim=2 0.6 0.16 0.5 0.2 0.14 0.2 0.12 0-1 loss 0.4 0-1 loss 0-1 loss Noise model II 25% of all statements, embedding dim=2 0.6 0-1 loss 0.2 0-1 loss 0.25 Algorithm 3 Algorithm 4 GNMDS SOE STE t-STE 0-1 loss Noise model I 0.25 # input statements Noise model I Sampling II Uniform sampling Kleindessner and von Luxburg 0.15 0.1 0.08 0.15 0.3 0.06 0 0.1 0.2 0.3 0.4 0.5 0.2 0.1 0.1 0.1 10 4 10 5 10 6 0.05 10 # input statements 4 10 5 # input statements 10 6 0 0 0.2 0.4 0.6 0.8 1 errorprob Figure 11: Classification — 100 labeled and 40 unlabeled points from a mixture of two equally probable 2-dim Gaussians N2 (0, I2 ) and N2 ((3, 0)T , I2 ) with Euclidean metric. SVM algorithm with linear kernel on top of Algorithm 3 as well as on the embedding approach. 0-1 loss (21) as a function of the number of provided statements of the kind (?) and as a function of errorprob / noiseparam for Algorithm 3, for Algorithm 4, and for the embedding approach using the various embedding methods. constructed by Algorithm 3 always resides in [0, 1]K for a K-class classification problem and no rescaling was done here. Algorithm 4 requires to set the parameter k describing which k-RNG it is based on, but this is more subtle: As we have seen in Section 3.2.1, when input statements are incorrect with some error probability errorprob > 0 (Noise model I), then our estimation strategy does not estimate the k-RNG anymore, but rather a k 0 -RNG with k 0 = k 0 (k, errorprob, |D|) depending on the size of the data set as given in (15). We thus have to choose the range of possible values for the parameter k in Algorithm 4 depending on |D|. Furthermore, we cannot use 10-fold cross-validation for choosing the best value within this range since, roughly speaking, this would lead to choosing the best parameter for a data set of size of only 90 percent of |D|. Instead, we used a non-exhaustive variant of leave-one-out cross-validation: we randomly selected a single training point as validation set and repeated this procedure for 20 times, and finally chose the parameter that showed the best performance on average. 32 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis errorprob=0.1 0-1 loss 0-1 loss 0.4 0.2 0 0.8 0.6 0.6 0.4 0.2 10 6 10 7 0 10 8 0.4 0.2 10 6 # input statements 10 7 0 10 8 noiseparam=1 0.6 0.6 0-1 loss 0.6 0-1 loss 0.8 0.2 0.4 0.2 10 6 10 7 10 8 0 10 8 noiseparam=1.5 0.8 0.4 10 7 # input statements 0.8 0 10 6 # input statements noiseparam=0.5 0-1 loss errorprob=0.3 0.8 0-1 loss Algorithm 3 Algorithm 4 0.6 0-1 loss Noise model I Noise model II Uniform sampling errorprob=0 0.8 0.4 0.2 10 6 # input statements 10 7 # input statements 10 8 0 10 6 10 7 10 8 # input statements Figure 12: Classification — 300 labeled and 500 unlabeled USPS digits with Euclidean metric. k-NN classifier on top of Algorithm 3. 0-1 loss (21) as a function of the number of provided statements of the kind (?) for Algorithm 3 and for Algorithm 4. We measure performance of Algorithms 3 and 4 and the embedding approach by considering their incurred 0-1 loss given by 1 X 0-1 loss = · 1{predicted label(O) 6= true label(O)}. (21) |U| O∈U Figure 11 shows the results for a data set consisting of 100 labeled and 40 unlabeled points from a mixture of two equally probable 2-dimensional Gaussians N2 (0, I2 ) and N2 ((3, 0)T , I2 ) and d being the Euclidean metric. True class labels of the points correspond to which Gaussian they come from. On top of Algorithm 3 as well as on the embedding methods we used the SVM algorithm with the linear kernel. The parameter k for Algorithm 4 was chosen from the range 1, 2, 3, 5, 7, 15, 25, 45, 70. The dimension of the space of the ordinal embedding was chosen to equal the true dimension two, but we observed similar results when we chose it as five instead (plots omitted). The embedding approach outperforms both Algorithm 3 and Algorithm 4, but their results appear to be acceptable too. Interestingly, other than for Algorithm 4 and the embedding approach, the 0-1 loss incurred by Algorithm 3 studied as a function of errorprob (1st & 3rd row, 3rd plot) increases only up to errorprob = 0.7 and then drops again, finally yielding almost the same result for errorprob = 1 as for errorprob = 0. In hindsight, this is not surprising: If errorprob = 1, and thus every statement is incorrect, and the two possibilities of an incorrect statement are equally likely, as it is the case under Noise model I, then Algorithm 3 approximately evaluates the feature map   1 1 1 1 1 1 x 7→ − LD(x; Class1 ), − LD(x; Class2 ), . . . , − LD(x; ClassK ) ∈ RK . 2 2 2 2 2 2 33 Kleindessner and von Luxburg This feature map coincides with the original one given in (7) up to a similarity transformation and hence gives rise to the same classification results. In Figure 12 we study the performance of Algorithms 3 and 4 when used for classifying USPS digits. We deal with 800 digits chosen uniformly at random from the set of all USPS digits and randomly split into 300 labeled and 500 unlabeled data points. The dissimilarity function d equals the Euclidean metric. We chose input statements uniformly at random without replacement from the set of all statements, which we generated according to Noise model I (1st row) or Noise model II (2nd row). On top of Algorithm 3 we used the k-NN classifier. The parameter k for Algorithm 4 was chosen from 1, 2, 3, 5, 7, 15, 25, 45, 70, 100, 150, 230, 350. For small values of errorprob or noiseparam we consider the results of our proposed algorithms to be satisfactory and useful. Note that in this 10-class classification problem a strategy of random guessing would yield a 0-1 loss of about 0.9. Not surprisingly, we obtained slightly better results when the ratio between labeled and unlabeled data points was chosen as 400/400 instead of 300/500 and slightly worse results when it was chosen as 200/600 (plots omitted). 6.1.4 Clustering We compared Algorithm 5, both in its weighted and in its unweighted version, to an embedding approach in which we applied spectral clustering to a symmetric k-NN graph on an ordinal embedding of a data set D. We put Gaussian weights exp(−kui − uj k2 /σ 2 ), where ui and uj are connected points of the embedding and σ > 0 is a scaling parameter, on the edges of this k-NN graph. Again, we rescaled an ordinal embedding to have diameter 2. Both in Algorithm 5 and in the ordinal embedding approach we used the normalized version of spectral clustering as stated in von Luxburg (2007) and invented by Shi and Malik (2000). For assessing the quality of a clustering we measure its purity with respect to a ground truth partitioning of the data set D (e.g., Manning et al., 2008, Chapter 16): if D consists of L different classes C1 , . . . , CL that we would like to recover and the clustering C comprises K different clusters U1 , . . . , UK , then the purity of C is given by K purity(C) = purity(C; D) = 1 X max |Uk ∩ Cl |. l=1,...,L |D| (22) k=1 We always have K/|D| ≤ purity(C) ≤ 1, and a high value indicates a good clustering. In the experiments presented in this section, we always provided Algorithm 5 and the embedding approach with the correct number L of clusters as input. Figure 13 shows the purity of the clusterings produced by Algorithm 5 and the embedding approach when applied to a data set consisting of 100 points from a uniform distribution on two equally sized moons in R2 . The two moons correspond to a ground truth partitioning into two classes. The dissimilarity function d equals the Euclidean metric. The curves shown here are the results obtained by a particular choice of input parameters k and σ: within a reasonably large range of parameter configurations this choice of parameters yielded the best performance on average with respect to the number of input statements. We study the sensitivity of Algorithm 5 with respect to the parameters in another experiment (shown 34 errorprob=0, embedding dim=2 1 0.95 0.9 Alg. 5 w., k=30, <=1 Alg. 5 unw., k=20 GNMDS, k=15, <=1 SOE, k=15, <=1 STE, k=15, <=1 t-STE, k=7, <=0.5 0.85 0.8 10 4 10 5 Purity Purity 0.95 0.75 10 3 errorprob=0.3, embedding dim=2 1 errorprob=0.3, embedding dim=5 0.95 0.9 Alg. 5 w., k=30, <=1 Alg. 5 unw., k=30 GNMDS, k=45, <=50 SOE, k=10, <=0.5 STE, k=10, <=0.5 t-STE, k=10, <=0.5 0.85 0.8 0.75 10 3 # input statements 10 4 # input statements 10 5 Purity 1 Purity Noise model I Uniform sampling Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis 0.9 Alg. 5 w., k=30, <=1 Alg. 5 unw., k=30 GNMDS, k=10, <=5 SOE, k=10, <=50 STE, k=30, <=1 t-STE, k=10, <=10 0.85 0.8 0.75 10 3 10 4 10 5 # input statements Figure 13: Clustering — 100 points from a uniform distribution on two equally sized moons in R2 with Euclidean metric. Purity (22) as a function of the number of provided statements of the kind (?) for Algorithm 5 in its weighted and unweighted version and for the embedding approach using the various embedding methods. in Figure 14). The embedding approach clearly outperforms Algorithm 5 if errorprob = 0 (1st plot), where three of the considered embedding algorithms achieve significantly higher purity values over the whole range of the number of input statements. However, given the numerous advantages common to all our proposed algorithms compared to an ordinal embedding approach, we consider the performance of Algorithm 5 to be acceptable. For comparison, a random clustering in which data points are randomly assigned to one of two clusters independently of each other with probability one half has an average purity of 0.54. If errorprob = 0.3, the embedding approach is superior to Algorithm 5 only if the number of input statements is large. Interestingly, there is almost no difference in the performance of the weighted and the unweighted version of Algorithm 5. The experiment shown in Figure 14 deals with a data set D consisting of 600 digits chosen uniformly at random from the set of all USPS digits and d being the Euclidean metric. We assume a ground truth partitioning of D into ten classes according to the digits’ values. For various parameter configurations the plots show the purity of the clusterings produced by the weighted (in blue) and unweighted (in red) version of Algorithm 5 as a function of the number of input statements. The plots also show the purity of the clusterings obtained when applying spectral clustering to the true weighted (in light blue) and unweighted (in bronze) k-RNG on D. Note that these two curves only vary with the number of input statements because of random effects in the K-means step of spectral clustering. Although it might look odd at a first glance that the purity achieved by Algorithm 5 is not monotonic with respect to the number of input statements, we can see that the purity is always between 0.67 and 0.7 for a wide range of values of k and σ when errorprob = 0 (1st row; 2nd row, 1st plot). For comparison, a random clustering in which data points are randomly assigned to one of ten clusters independently of each other with probability one-tenth has an average purity of 0.19. A clustering obtained by applying spectral clustering to a symmetric k-NN graph with Gaussian edge weights exp(−d(xi , xj )2 /σ 2 ) on D (the true data set—not an ordinal embedding) has an average purity of not higher than 0.75, even for a good choice of k and σ. When errorprob = 0.3, Algorithm 5 completely fails for small values of k (2nd row, 2nd plot) as has to be expected because of our findings in Section 3.2.1. For k sufficiently large 35 Kleindessner and von Luxburg k=3, <=5 --- errorprob=0 0.7 0.7 0.695 0.695 0.69 0.69 0.69 0.685 0.685 0.685 0.68 Alg. 5 weighted Alg. 5 unw. true k-RNG w. true k-RNG unw. 0.67 0.665 10 6 10 7 0.68 0.675 10 8 0.68 0.675 0.67 0.67 0.665 0.665 10 6 # input statements 0.7 k=30, <=0.005 --- errorprob=0 0.695 Purity Purity Purity k=3, <=0.005 --- errorprob=0 0.675 Purity 10 7 10 8 10 6 # input statements k=30, <=5 --- errorprob=0 k=20, <=0.5 --- errorprob=0.3 0.8 10 7 10 8 # input statements 0.7 k=150, <=0.5 --- errorprob=0.3 0.695 Purity 0.685 0.68 0.675 0.68 Purity 0.6 0.69 Purity Noise model I Uniform sampling 0.7 0.4 0.2 0.66 0.64 0.67 0.665 10 6 10 7 10 8 0 10 6 # input statements 10 7 # input statements 10 8 0.62 10 6 10 7 10 8 # input statements Figure 14: Clustering — 600 USPS digits with Euclidean metric. Purity (22) as a function of the number of provided statements of the kind (?) for Algorithm 5 in its weighted and unweighted version. The light blue curve and the bronze curve show the purity of the clusterings obtained by applying spectral clustering to the true weighted and unweighted k-RNG on the data set. it finally yields the same purity values as when errorprob = 0 (2nd row, 3rd plot). In fact, this is true already for k = 100 and a wide range of values of σ (plots omitted). Again, both in the case of errorprob = 0 and in the case of errorprob = 0.3, there is almost no difference in the performance of the weighted and the unweighted version of Algorithm 5. 6.2 Real Data We set up an online survey for collecting ordinal distance information of the kind (?) for 60 images of cars, shown in Figure 15. All images were found on Wikimedia Commons (https: //commons.wikimedia.org) and have been explicitly released into the public domain by their authors. We refer to the set of these images as the car data set. We instructed participants of the survey to determine the most central object within a triple of three shown images according to how they perceive dissimilarity between cars. We explicitly stated that they should not judge differences between the pictures, like perspective, lighting conditions, or background. Every participant was shown triples of cars in random order (more precisely, triples shown to a participant were drawn uniformly at random without replacement from the set of all possible triples). Also the order of cars within a triple, that is whether a car’s image appeared to the left, in the middle, or to the right, was random. One complete round of the survey consisted of 50 shown triples, but we encouraged participants to contribute more than one round, possibly at a later time. There was no possibility of skipping triples, that is even if a participant had no idea which car might be the most central one in a triple, he/she had to make a choice—or quit the current round of the survey. Within the first ten triples every participant was shown a test case triple (shown 36 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis Figure 15: Car data set. We collected ordinal distance information of the kind (?) for this data set via an online survey. The framed triple in the first row was used as a test case: T All and T All reduced comprise only statements provided by participants that chose the off-road vehicle as the most central car in this triple. The pictures were found on Wikimedia Commons and have been explicitly released into the public domain by their authors. within a frame in Figure 15), consisting of an off-road vehicle, a sports car, and a fire truck. We believe the off-road vehicle to be the obvious most central car in this triple and used this test case for checking whether a participant might have got the task of choosing a most central object correctly. The survey was online for about two months and the link to the survey was distributed among colleagues and friends. We took no account of rounds of the survey that were quitted before 30 triples (of the fifty per round) were shown. In doing so, we ended up with 146 rounds (some of them not fully completed) and a total of 7097 statements. It is hard to guess how many different people contributed to these 146 1 rounds, but assuming an average of three to four rounds per person, which seems to be reasonable according to personal feedback, their number should be around 40. In only 7 out of the 146 rounds the off-road vehicle was not chosen as most central car in the test case triple. We refer to the collection of the total of 7097 statements as the collection All and to its subcollection comprising 6757 statements gathered in the 139 rounds in which the offroad vehicle was chosen as most central car in the test case triple as the collection T All. From All and T All we derived two more collections of statements of the kind (?) for the car data set as follows: All reduced is obtained from All by replacing all statements dealing with the same triple of cars by just one statement about this triple, with the most central car being that car that is most often the most central car in the statements to be replaced. T All reduced is derived from T All analogously. The characteristic values of the collections All, All reduced, T All, and T All reduced are summarized in Table 1. All survey data and these four collections can be downloaded along with the car data set from http://www.tml.cs.uni-tuebingen.de/team/luxburg/code_and_data. 37 Kleindessner and von Luxburg All All reduced T All T All reduced Number of statements Number of statementsin percent of number of triples [ 60 3 = 34220] 7097 20.74 6338 18.52 6757 19.75 6056 17.70 Average number of statements in which a car appears Minimum number of statements in which a car appears Maximum number of statements in which a car appears 354.85 316.90 337.85 302.80 307 286 292 269 503 347 478 333 Median response time per shown triple (in seconds) 4.02 4.15 Table 1: Characteristic values of All, All reduced, T All, and T All reduced. Note that All and T All contain repeatedly present and contradicting statements. We applied Algorithms 1 to 5 to the car data set and the statements in All, All reduced, T All, or T All reduced. In doing so, we assumed a partitioning of the car data set into four subclasses: ordinary cars, sports cars, off-road/sport utility vehicles, and outliers. We considered the fire truck, the motortruck, the tractor, and the antique car as outliers. Looking at Figure 15, there should be no doubts about the other classes. 6.2.1 Medoid Estimation We applied Algorithm 1 to the car data set as well as to the three classes of ordinary cars, sports cars, and off-road/sport utility vehicles in order to estimate a medoid within these subclasses with the statements in All, All reduced, T All, or T All reduced. The estimated medoids obtained when working with All or T All coincide and are shown in Figure 16. The estimated medoids obtained when working with All reduced or T All reduced differ from these only for the whole car data set and the subclass of off-road/sport utility vehicles. Note that for estimating a medoid of a subset of a data set we consider only statements dealing with three objects of the subset. For example, when estimating a medoid of the subclass of sports cars based on the statements in All, we effectively work with 89 out of the 7097 statements in All. It is interesting to study an ordinal embedding of the car data set. Figure 18 shows an ordinal embedding in the two-dimensional plane that we computed with the SOE algorithm based on the statements in T All. We cannot only see a grouping of the cars according to the subclasses (compare with Section 6.2.4) and the outer positioning of the outliers (compare with in Section 6.2.2), but also that our medoid estimates are located quite at the center of the corresponding subclasses (with the exception of the subclass of off-road/sport utility vehicles). This confirms the plausibility of our estimates. Note that we observe slightly different embeddings depending on the random initialization in the SOE algorithm. 38 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis Car data set: Ordinary cars: Sports cars: Off-road/SUV: Figure 16: The estimated medoids for the car data set and the subclasses of ordinary cars, sports cars, and off-road/sport utility vehicles when working with the statements in All or T All. Sorted values LD(O) 0.6 0.5 0.4 0.3 0.15 0.1 0.2 0.05 0.1 0 0 10 20 30 5 40 10 50 60 Figure 17: The sorted values LD(O) (O in car data set) as well as the eight cars with smallest values (increasingly ordered) when working with the statements in T All. Also, it is not useful to compare the medoid estimates of Algorithm 1 with estimates based on an ordinal embedding since the latter change with every run of the embedding algorithm. 6.2.2 Outlier Identification We applied Algorithm 2 to the car data set and the statements in All, All reduced, T All, and T All reduced, respectively. For all of the four collections of statements we obtained very similar results. Figure 17 shows a plot of the sorted values LD(O) (for O being an element of the car data set) as well as the eight cars with smallest values when working with T All. Looking at the plot it might be reasonable to assume that there are at least four outliers. Indeed, the Formula One car, the fire truck, the motortruck, and the tractor, which appear rather odd in the car data set, are ranked lowest. Also the other cars shown in Figure 17 are quite out of character for the car data set. In the ordinal embedding shown in Figure 18 all these cars are located far outside. These findings support our claim that Algorithm 2 can be used for outlier identification when given only ordinal distance information of the kind (?). 39 Kleindessner and von Luxburg Figure 18: An ordinal embedding of the car data set based on the statements in T All. A larger version is available on http://www.tml.cs.uni-tuebingen.de/team/ luxburg/code_and_data. 40 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis Number of statements Number of statementsin percent of number of triples [ 56 3 = 27720] All All reduced T All T All reduced 5624 20.29 5121 18.47 5349 19.30 4886 17.63 Table 2: Number of statements after removing the fire truck, the motortruck, the tractor, and the antique car from the car data set. Note that All and T All contain repeatedly present and contradicting statements. 6.2.3 Classification For setting up a classification problem on the car data set we removed the four outliers (the fire truck, the motortruck, the tractor, and the antique car) and assigned a label to the remaining cars according to which of the three classes of ordinary cars, sports cars, or off-road/sport utility vehicles they belong to. By removing from the collections All, All reduced, T All, and T All reduced all statements that comprise one or more outliers, we obtained collections of statements of the kind (?) for these 56 labeled cars. A bit sloppy, from now on till the end of Section 6.2, by All, All reduced, T All, and T All reduced we mean these newly created, reduced collections. Their sizes are given in Table 2. We randomly selected 16 cars that we used as test points, that is we ignored their labels and predicted them by applying Algorithms 3 and 4 and an embedding approach based on the label information of the remaining 40 labeled cars and the ordinal distance information in All, All reduced, T All, or T All reduced. In Table 3 we report the average 0-1 loss (see equation (21) for its definition) and its standard deviation, where the average is over hundred random selections of test points, for the considered methods and various classification algorithms on top of Algorithm 3 or the embedding approach. We chose the dimension of the space of the embedding as two. As classifiers on top we used both the k-NN classifier and the SVM algorithm, the latter with the linear as well as with the Gaussian kernel. Since we are dealing with a 3-class classification problem, we combined the SVM algorithm with a one-vs-all strategy. We chose the parameter k for the k-NN classifier and the regularization parameter for the SVM algorithm by means of 10-fold crossvalidation from 1, 3, 5, 7, 11, 15 and 0.01, 0.05, 0.1, 0.5, 1, 5, 10, 50, 100, 500, 1000, respectively. When using the SVM algorithm with the Gaussian kernel, we chose the kernel bandwidth σ by means of 10-fold cross-validation from 0.01, 0.05, 0.1, 0.5, 1, 5. The parameter k for Algorithm 4 was chosen from 1, 2, 3, 5, 7, 10, 15 by means of a non-exhaustive variant of leave-one-out cross-validation as explained in Section 6.1.3. Clearly, the ordinal embedding approach outperforms Algorithms 3 and 4. However, one should judge the performance of our algorithms with regards to their great simplicity compared to the embedding approach. In doing so, we consider the 0-1 loss incurred by Algorithms 3 or 4 to be acceptable. As one might expect, working with T All or T All reduced leads to a slightly lower misclassification rate than working with All or All reduced. 41 Kleindessner and von Luxburg All All reduced T All T All reduced Alg. 3 with k-NN Alg. 3 with SVM linear Alg. 3 with SVM Gauss 0.19 (± 0.11) 0.17 (± 0.09) 0.17 (± 0.10) 0.23 (± 0.12) 0.16 (± 0.09) 0.18 (± 0.10) 0.16 (± 0.10) 0.13 (± 0.07) 0.14 (± 0.10) 0.17 (±0.10) 0.16 (± 0.08) 0.16 (± 0.09) Algorithm 4 0.15(± 0.09) 0.18 (± 0.10) 0.13 (± 0.09) 0.13 (±0.09) GNMDS with k-NN GNMDS with SVM linear GNMDS with SVM Gauss 0.05 (± 0.05) 0.07 (± 0.07) 0.05 (± 0.06) 0.05 (± 0.05) 0.06 (± 0.06) 0.04 (± 0.05) 0.04 (± 0.04) 0.07 (± 0.07) 0.04 (± 0.05) 0.04 (±0.04) 0.04 (± 0.05) 0.04 (± 0.05) SOE with k-NN SOE with SVM linear SOE with SVM Gauss 0.06 (± 0.05) 0.10 (± 0.08) 0.05 (± 0.07) 0.07 (± 0.05) 0.12 (± 0.09) 0.07 (± 0.08) 0.06 (± 0.06) 0.11 (± 0.08) 0.05 (± 0.05) 0.07 (±0.06) 0.10 (± 0.09) 0.07 (± 0.06) STE with k-NN STE with SVM linear STE with SVM Gauss 0.05 (± 0.04) 0.07 (± 0.08) 0.05 (± 0.05) 0.03 (± 0.04) 0.06 (± 0.06) 0.03 (± 0.05) 0.05 (± 0.04) 0.08 (± 0.07) 0.04 (± 0.05) 0.04 (± 0.04) 0.06 (± 0.06) 0.04 (± 0.05) t-STE with k-NN t-STE with SVM linear t-STE with SVM Gauss 0.09 (± 0.07) 0.12 (± 0.09) 0.09 (± 0.08) 0.10 (± 0.07) 0.15 (± 0.11) 0.08 (± 0.08) 0.06 (± 0.06) 0.11 (± 0.09) 0.07 (± 0.06) 0.08 (± 0.07) 0.13 (± 0.09) 0.08 (± 0.08) Table 3: Average 0-1 loss (± standard deviation) when predicting labels for a randomly chosen subset of 16 cars (average over 100 choices). 6.2.4 Clustering Like in the previous Section 6.2.3 we removed the four outliers from the car data set. We then used Algorithm 5 and an ordinal embedding approach for clustering the remaining 56 cars into three clusters, aiming to recover the cars’ grouping into classes of ordinary cars, sports cars, and off-road/sport utility vehicles. In the embedding approach we applied spectral clustering to a symmetric k-NN graph with Gaussian edge weights on an ordinal embedding of the data set as we did in Section 6.1.4. Table 4 shows the average purity (see equation (22) for its definition) of the clusterings produced by the considered methods with respect to our assumed ground truth partitioning. The average is over 100 runs of the experiment. Note that clusterings produced by Algorithm 5 and obtained in different runs only differ due to random effects in the K-means step of spectral clustering, while the clusterings produced by the ordinal embedding approach also differ because of the random initialization in the embedding methods. For this reason, standard deviations of the purity values achieved by the embedding approach are much larger than those of the purity values achieved by Algorithm 5 (which are on the order machine epsilon) and are shown in Table 4 too. All methods perform nearly equally well, with the unweighted version of Algorithm 5 slightly inferior compared to the other methods when their parameters are chosen optimally. At least for Algorithm 5 working with the statements in T All or T All reduced yields 42 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis Alg. Alg. Alg. Alg. 5 5 5 5 w., w., w., w., k k k k = 5, σ = 0.5 = 5, σ = 3 = 10, σ = 0.5 = 10, σ = 3 Alg. 5 unw., k = 5 Alg. 5 unw., k = 10 GNMDS, GNMDS, GNMDS, GNMDS, k k k k = 5, σ = 0.5 = 5, σ = 3 = 10, σ = 0.5 = 10, σ = 3 All All reduced T All T All reduced 0.82 0.84 0.91 0.84 0.82 0.82 0.84 0.91 0.86 0.86 0.95 0.86 0.88 0.86 0.93 0.89 0.84 0.84 0.82 0.84 0.84 0.86 0.88 0.89 0.79 0.78 0.83 0.78 (± (± (± (± 0.12) 0.12) 0.11) 0.12) 0.83 0.84 0.92 0.88 (± (± (± (± 0.12) 0.11) 0.03) 0.09) 0.78 0.76 0.93 0.92 (± (± (± (± 0.15) 0.14) 0.04) 0.06) 0.80 0.83 0.89 0.95 (± (± (± (± 0.15) 0.15) 0.13) 0.03) SOE, SOE, SOE, SOE, k k k k = 5, σ = 0.5 = 5, σ = 3 = 10, σ = 0.5 = 10, σ = 3 0.87 0.82 0.90 0.93 (± (± (± (± 0.01) 0.09) 0.04) 0.03) 0.87 0.83 0.90 0.93 (± (± (± (± 0.04) 0.11) 0.03) 0.03) 0.82 0.75 0.91 0.91 (± (± (± (± 0.08) 0.10) 0.04) 0.05) 0.79 0.73 0.90 0.89 (± (± (± (± 0.10) 0.10) 0.03) 0.08) STE, STE, STE, STE, k k k k = 5, σ = 0.5 = 5, σ = 3 = 10, σ = 0.5 = 10, σ = 3 0.75 0.75 0.90 0.90 (± (± (± (± 0.11) 0.12) 0.04) 0.04) 0.73 0.76 0.87 0.87 (± (± (± (± 0.11) 0.11) 0.01) 0.01) 0.74 0.74 0.90 0.77 (± (± (± (± 0.10) 0.10) 0.03) 0.14) 0.73 0.76 0.88 0.88 (± (± (± (± 0.11) 0.11) 0.01) 0.01) 0.87 0.85 0.92 0.94 (± (± (± (± 0.02) 0.08) 0.03) 0.03) 0.87 0.89 0.92 0.94 (± (± (± (± 0.02) 0.03) 0.03) 0.02) 0.86 0.76 0.92 0.92 (± (± (± (± 0.04) 0.12) 0.04) 0.04) 0.88 0.79 0.91 0.91 (± (± (± (± 0.05) 0.12) 0.04) 0.06) t-STE, t-STE, t-STE, t-STE, k k k k = 5, σ = 0.5 = 5, σ = 3 = 10, σ = 0.5 = 10, σ = 3 Table 4: Average purity (± standard deviation) of clusterings produced by the various methods when clustering the 56 cars from the classes of ordinary cars, sports cars, and off-road/sport utility vehicles into three clusters (average over 100 runs). better results than working with the statements in All or All reduced, but this does not seem to be the case for the ordinal embedding approach. 7. Discussion, Future Work, and Open Problems In this paper, we have proposed algorithms for the problems of medoid estimation, outlier identification, classification, and clustering when given only ordinal distance information. We argue that information of the form (?) is particularly useful as it can be related to the lens depth function, which is an instance of a statistical depth function, and k-relative neighborhood graphs. Our algorithms solve the problems by direct approaches instead of constructing an ordinal embedding of a data set as an intermediate step. Thus they avoid 43 Kleindessner and von Luxburg some of the problems inherent in such an embedding approach (discussed in Section 5.1.2). In particular, the running time of our algorithms is lower by several orders of magnitude. In a number of experiments on small data sets we have demonstrated that our algorithms are competitive with or at least not much worse than an embedding approach in terms of the quality of the produced solution. We also performed some experiments on medium-sized data sets, for which there was already no hope to compute an ordinal embedding in somewhat reasonable time, but still our algorithms yielded useful results. Our algorithms are appealingly simple and can easily and highly efficiently be parallelized. Hence, we believe that they are a useful alternative to the generic ordinal embedding approach and applicable in situations in which embedding algorithms are not. Our work inspires several follow-up questions, we focus on two of them: • A more local point of view: The problems studied in this paper are global problems in the sense that they look at a data set as a whole. In contrast, local problems like density estimation or nearest neighbor search look at single data points and their neighborhoods with respect to the dissimilarity function d, thus spotting only fragments of the data set. The tools used in this paper, the lens depth function and the k-RNG, are global in their nature too. Indeed, as we have seen in Section 6.1.2, the lens depth function cannot detect outliers sitting in-between several modes of a data set since such outliers are globally seen at the heart of the data. It is interesting to consider local problems in a setting of ordinal distance information. A concept that becomes attractive then is that of local depth functions: Agostinelli and Romanazzi (2008, 2011) introduced a notion of localized simplicial depth, which can easily be transferred to the lens depth function and is then given by LDlocal (x; τ, P ) = P robability(x ∈ Lens(X, Y ) ∧ d(X, Y ) ≤ τ ), (23) where X and Y are independent random variables distributed according to a probability distribution P and τ > 0 is a parameter. Agostinelli and Romanazzi have shown (theoretically for one-dimensional and empirically for multidimensional Euclidean data) that for τ tending to zero their local version of simplicial depth is closely related to the density function of the underlying distribution and that maximizing the local simplicial depth function provides reasonable estimates of the distribution’s modes. We believe that such a connection also holds for the local lens depth function (23)—note that in one dimension the lens depth function coincides with the simplicial depth function. Unfortunately, unlike for the ordinary lens depth function, the local lens depth function cannot be evaluated with respect to an empirical distribution of a data set D given only ordinal distance information of the kind (?) about D. Even if we replace the event “d(X, Y ) ≤ τ ” by the event “d(X, Y ) is among the smallest τ distances between data points in D”, it is not clear at all how to evaluate or estimate (23). One solution would be to allow for additional ordinal distance information of the general kind (17), that is answers to come Ye ), like Ukkonen et al. (2015) do in their paper, but this seems parisons d(X, Y ) < d(X, to be a rather unattractive way out. We have tried several heuristics for approximately evaluating the general comparison (17) given only statements of the kind (?), like P robability(x ∈ Lens(X, Y ) | y ∈ Lens(X, Y )) ≈ f (d(x, y)) 44 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis for a monotonically decreasing function f : R+ 0 → [0, 1], which would be useful since we can easily estimate the probability on the left side. However, none of them was promising. They all suffer from the same problem, namely that the number of data points in Lens(X, Y ) can be small for two completely different reasons: either d(X, Y ) is small, or d(X, Y ) is large, but Lens(X, Y ) is located in an area of low probability. Unfortunately, there is no obvious way for distinguishing between these two reasons. This raises the question whether density estimation or solving any other local problem is possible at all given only ordinal distance information of the kind (?), and indeed the answer is negative for intrinsically one-dimensional data sets: Consider data points x1 , . . . , xn on the real line and assume d to be the Euclidean metric. Then the ordinal distance information given by all statements of the kind (?) only depends on the order of the data points: given any three data points, the center is always given by the data point sitting in the middle, and any order-preserving transformation of the data points will give rise to exactly the same ordinal distance information. For this reason it is impossible to estimate any local property of an underlying distribution, and ordinal distance information of the kind (?) comes along with a substantial loss in effective information compared to similarity triplets, that is answers to (18): while, under some assumptions on the data points, all similarity triplets asymptotically uniquely determine the actual positions of the points on the real line up to a similarity transformation (Proposition 10 in Kleindessner and von Luxburg, 2014), all statements of the kind (?) only determine the ranking of the data points up to inversion. However, such a loss in information does not seem to occur when dealing with data sets of higher intrinsic dimensionality: If we start with data points from Rm for m ≥ 2 (again equipped with the Euclidean metric) that are reasonably scattered, collect all statements of the kind (?), and provide them as input to an ordinal embedding algorithm, then the algorithm is able to almost perfectly recover the configuration of the data points up to a similarity transformation. An example of this happening can be seen in Figure 19 for a set of 100 points in R2 : the blue points are the data points that we start with and the red ones are the recovered data points after a Procrustes analysis, that is aligning the points of the ordinal embedding with the original ones via a similarity transformation. We have observed this phenomenon for a broad variety of point configurations in Euclidean spaces Rm of arbitrary dimensions m ≥ 2 and want to state it as a conjecture. We formulate the conjecture similarly to the theorems in Kleindessner and von Luxburg (2014) and Arias-Castro (2015), which state the asymptotic uniqueness property for ordinal data consisting of answers to general dissimilarity comparisons (17) and for similarity triplets, that is answers to comparisons (18). Conjecture: Let B1 and B2 be two closed and bounded balls in Rm , m ≥ 2, with arbitrary centers and radii. Let (xn )n∈N be a sequence of points xn ∈ B1 such that {xn : n ∈ N} is dense in B1 . For n ∈ N, let Xn = {x1 , . . . , xn } and let Yn = {y1n , . . . , ynn } ⊆ B2 be an ordinal embedding of Xn that preserves all statements of the kind (?) (but not necessarily any other ordinal relationships). Then there exists a sequence (Sn )n∈N of similarity transformations Sn : Rm → Rm such that max kSn (yin ) − xi k → 0 i=1,...,n 45 as n → 0. Kleindessner and von Luxburg 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -4 -2 0 2 4 6 Figure 19: An example illustrating the conjecture of this section. Given all statements of the kind (?) for the set of blue points, an algorithm for ordinal embedding is able to almost perfectly recover the point configuration up to a similarity transformation (red points—after a Procrustes analysis). Hence, there is hope: if our conjecture holds, when dealing with a Euclidean data set of known intrinsic dimension, which is greater than one, then all statements of the kind (?) asymptotically contain all cardinal distance information up to rescaling. At least for such a data set we may hope that, in principle, we are able to solve any local problem that we can solve in a standard machine learning setting of cardinal distance information also in a setting of ordinal distance information of the type (?). However, it remains an open problem how to solve a local problem in practice except for an embedding approach. • Active learning: Algorithms 1 to 5 can deal with arbitrary collections of statements of the kind (?) that are gathered before the application of the algorithm and are provided as input all at once. However, in many scenarios one might have the chance to actively query statements for intentionally chosen triples of objects. In such a scenario an algorithm for a machine learning task should interact with the process of querying statements and adaptively choose triples of objects for which statements are to be queried in such a way that the task at hand is solved as fast, accurately, cheaply, ... as possible. For the problems of medoid estimation or outlier identification it is easy to adapt Algorithm 1 and Algorithm 2 in order to derive adaptive versions: starting with rough estimates of values LD(O) for every object O in the data set, one could immediately rule out some objects with very small (or high) estimated values and continue improving only estimates of the values of the remaining objects by querying further statements only for them. This strategy has been suggested by Heikinheimo and Ukkonen (2013) for their method for medoid estimation. Studying the questions whether such a strategy comes with any guarantees, whether there might be better alternatives (of course, this depends on what one wants to achieve), or whether similar approaches apply to Algorithms 3 to 5 is left for future work. Two further follow-up questions are: I. If one is free to choose the particular type of ordinal data that one is working with, for example in a crowdsourcing scenario, then which type is 46 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis most appropriate for which problems (in terms that it is both informative for the problem at hand and can easily be provided by the crowd)? II. How can we fix the error in the proof of Theorem 6 in Liu and Modarres (2011) (see Section 5.2)? Acknowledgments This work was supported by the Institutional Strategy of the University of Tübingen (Deutsche Forschungsgemeinschaft, ZUK 63). References S. Agarwal, J. Wills, L. Cayton, G. Lanckriet, D. Kriegman, and S. Belongie. Generalized non-metric multidimensional scaling. In International Conference on Artificial Intelligence and Statistics (AISTATS), 2007. C. Agostinelli and M. Romanazzi. Local depth of multivariate data. Technical report, Ca’ Foscari University of Venice, 2008. C. Agostinelli and M. Romanazzi. Local depth. Journal of Statistical Planning and Inference, 141(2):817–830, 2011. E. Amid and A. Ukkonen. Multiview triplet embedding: Learning attributes in multiple maps. In International Conference on Machine Learning (ICML), 2015. E. Amid, N. Vlassis, and M. Warmuth. t-exponential triplet embedding. arXiv:1611.09957 [cs.AI], 2016. D. V. Andrade and L. H. de Figueiredo. Good approximations for the relative neighbourhood graph. In Canadian Conference on Computational Geometry (CCCG), 2001. E. Arias-Castro. Some theory for ordinal embedding. arXiv:1501.02861 [math.ST], 2015. Z. Bai, J. Demmel, J. Dongarra, A. Ruhe, and H. van der Vorst, editors. Templates for the Solution of Algebraic Eigenvalue Problems: A Practical Guide. Society for Industrial and Applied Mathematics, 2000. V. Barnett and T. Lewis. Outliers in Statistical Data. Wiley, 1978. R. Bartoszynski, D. K. Pearl, and J. Lawrence. A multidimensional goodness-of-fit test based on interpoint distances. Journal of the American Statistical Association, 92(438): 577–586, 1997. M. Blum, R. W. Floyd, V. Pratt, R. L. Rivest, and R. E. Tarjan. Time bounds for selection. Journal of Computer and System Sciences, 7:448–461, 1973. I. Borg and P. Groenen. Modern Multidimensional Scaling: Theory and Applications. Springer, 2005. 47 Kleindessner and von Luxburg P. Bose, V. Dujmović, F. Hurtado, J. Iacono, S. Langerman, H. Meijer, V. Sacristán, M. Saumell, and D. R. Wood. Proximity graphs: E, δ, ∆, χ and ω. International Journal of Computational Geometry and Applications, 22(5):439–469, 2012. F. C. Botelho, R. Pagh, and N. Ziviani. Simple and space-efficient minimal perfect hash functions. In Workshop on Algorithms and Data Structures (WADS), 2007. I. Cascos. Data depth: Multivariate statistics and geometry. In W. S. Kendall and I. Molchanov, editors, New Perspectives in Stochastic Geometry. Oxford University Press, 2009. M. S. Chang, C. Y. Tang, and R. C. T. Lee. Solving the euclidean bottleneck matching problem by k-relative neighborhood graphs. Algorithmica, 8(1–6):177–194, 1992. Y. Chen, X. Dang, H. Peng, and H. L. Bart, Jr. Outlier detection with the kernelized spatial depth function. IEEE Transactions on Pattern Analysis and Machine Intelligence, 31(2): 288–305, 2009. C. D. Correa and P. Lindstrom. Locally-scaled spectral clustering using empty region graphs. In ACM International Conference on Knowledge Discovery and Data Mining (SIGKDD), 2012. N. Cristianini and J. Shawe-Taylor. An Introduction to Support Vector Machines and other Kernel-Based Learning Methods. Cambridge University Press, 2000. X. Dang and R. Serfling. Nonparametric depth-based multivariate outlier identifiers, and masking robustness properties. Journal of Statistical Planning and Inference, 140(1): 198–213, 2010. R. T. Elmore, T. P. Hettmansperger, and F. Xuan. Spherical data depth and a multivariate median. In R. Y. Liu, R. Serfling, and D. L. Souvaine, editors, Data Depth: Robust Multivariate Analysis, Computational Geometry and Applications. American Mathematical Society, 2006. L. C. Freeman. Centrality in social networks: Conceptual clarification. Social Networks, 1 (3):215–239, 1978. K. R. Gabriel and R. R. Sokal. A new statistical approach to geographic variation analysis. Systematic Zoology, 18(3):259–278, 1969. A. K. Ghosh and P. Chaudhuri. On maximum depth and related classifiers. Scandinavian Journal of Statistics, 32(2):327–350, 2005. T. Hagerup and T. Tholey. Efficient minimal perfect hashing in nearly minimal space. In Symposium on Theoretical Aspects of Computer Science (STACS), 2001. S. Haghiri, D. Ghoshdastidar, and U. von Luxburg. Comparison based nearest neighbor search. In International Conference on Artificial Intelligence and Statistics (AISTATS), 2017. 48 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis T. B. Hashimoto, Y. Sun, and T. S. Jaakkola. Metric recovery from directed unweighted graphs. In International Conference on Artificial Intelligence and Statistics (AISTATS), 2015. H. Heikinheimo and A. Ukkonen. The crowd-median algorithm. In Conference on Human Computation and Crowdsourcing (HCOMP), 2013. E. Heim, M. Berger, L. M. Seversky, and M. Hauskrecht. Efficient online relative comparison kernel learning. In SIAM International Conference on Data Mining (SDM), 2015. L. Jain, K. G. Jamieson, and R. Nowak. Finite sample prediction and recovery bounds for ordinal embedding. In Neural Information Processing Systems (NIPS), 2016. K. G. Jamieson and R. Nowak. Low-dimensional embedding using adaptively selected ordinal data. In Conference on Communication, Control, and Computing, 2011. J. W. Jaromczyk and G. T. Toussaint. Relative neighborhood graphs and their relatives. Proceedings of the IEEE, 80(9):1502–1517, 1992. M. Kleindessner and U. von Luxburg. Uniqueness of ordinal embedding. In Conference on Learning Theory (COLT), 2014. M. Kleindessner and U. von Luxburg. Dimensionality estimation without distances. In International Conference on Artificial Intelligence and Statistics (AISTATS), 2015. J. B. Kruskal. Multidimensional scaling by optimizing goodness of fit to a nonmetric hypothesis. Psychometrika, 29(1):1–27, 1964a. J. B. Kruskal. Nonmetric multidimensional scaling: A numerical method. Psychometrika, 29(2):115–129, 1964b. J. Lawrence. Interpoint Distance Methods for the Analysis of High Dimensional Data. PhD thesis, The Ohio State University, 1996. J. Leskovec, J. Kleinberg, and C. Faloutsos. Graph evolution: Densification and shrinking diameters. ACM Transactions on Knowledge Discovery from Data, 1(1), 2007. Data available on https://snap.stanford.edu/data/. J. Li, J. A. Cuesta-Albertos, and R. Y. Liu. DD-classifier: Nonparametric classification procedure based on DD-plot. Journal of the American Statistical Association, 107(498): 737–753, 2012. M. Li, X.-C. Lian, J. T.-Y. Kwok, and B.-L. Lu. Time and space efficient spectral clustering via column sampling. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2011. C. Liu, K. Wu, and T. He. Sensor localization with ring overlapping based on comparison of received signal strength indicator. In IEEE International Conference on Mobile Ad-hoc and Sensor Systems (MASS), 2004. 49 Kleindessner and von Luxburg R. Y. Liu. On a notion of simplicial depth. Proceedings of the National Academy of Sciences of the United States of America, 85(6):1732–1734, 1988. R. Y. Liu. On a notion of data depth based on random simplices. The Annals of Statistics, 18(1):405–414, 1990. R. Y. Liu. Data depth and multivariate rank tests. In Y. Dodge, editor, L1-Statistical Analysis and Related Methods. North Holland, 1992. R. Y. Liu, J. M. Parelius, and K. Singh. Multivariate analysis by data depth: descriptive statistics, graphics and inference. The Annals of Statistics, 27(3):783–840, 1999. Z. Liu and R. Modarres. Lens data depth and median. Journal of Nonparametric Statistics, 23(4):1063–1074, 2011. C. D. Manning, P. Raghavan, and H. Schütze. Introduction to Information Retrieval. Cambridge University Press, 2008. K. Mosler. Depth statistics. In C. Becker, R. Fried, and S. Kuhnt, editors, Robustness and Complex Data Structures: Festschrift in Honour of Ursula Gather. Springer, 2013. J. S. Sánchez, F. Pla, and F. J. Ferri. On the use of neighbourhood-based non-parametric classifiers. Pattern Recognition Letters, 18(11–13):1179–1186, 1997a. J. S. Sánchez, F. Pla, and F. J. Ferri. Prototype selection for the nearest neighbour rule through proximity graphs. Pattern Recognition Letters, 18(6):507–513, 1997b. M. Schultz and T. Joachims. Learning a distance metric from relative comparisons. In Neural Information Processing Systems (NIPS), 2003. R. Serfling. Depth functions in nonparametric multivariate inference. In R. Y. Liu, R. Serfling, and D. L. Souvaine, editors, Data Depth: Robust Multivariate Analysis, Computational Geometry and Applications. American Mathematical Society, 2006. S. Shalev-Shwartz and S. Ben-David. Understanding Machine Learning: From Theory to Algorithms. Cambridge University Press, 2014. B. Shaw and T. Jebara. Structure preserving embedding. In International Conference on Machine Learning (ICML), 2009. R. N. Shepard. The analysis of proximities: Multidimensional scaling with an unknown distance function. I. Psychometrika, 27(2):125–140, 1962a. R. N. Shepard. The analysis of proximities: Multidimensional scaling with an unknown distance function. II. Psychometrika, 27(3):219–246, 1962b. J. Shi and J. Malik. Normalized cuts and image segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(8):888–905, 2000. N. Stewart, G. D. A. Brown, and N. Chater. Absolute identification by relative judgment. Psychological Review, 112(4):881–911, 2005. 50 Lens Depth Function and k-RNG: Versatile Tools for Ordinal Data Analysis O. Tamuz, C. Liu, S. Belongie, O. Shamir, and A. T. Kalai. Adaptively learning the crowd kernel. In International Conference on Machine Learning (ICML), 2011. Y. Terada and U. von Luxburg. Local ordinal embedding. In International Conference on Machine Learning (ICML), 2014. Code available on https://cran.r-project.org/ web/packages/loe. G. T. Toussaint. The relative neighbourhood graph of a finite planar set. Pattern Recognition, 12(4):261–268, 1980. G. T. Toussaint. Applications of the relative neighbourhood graph. In International Conference on Advances in Computing, Communication and Information Technology (CCIT), 2014. G. T. Toussaint and C. Berzan. Proximity-graph instance-based learning, support vector machines, and high dimensionality: An empirical comparison. In International Conference on Machine Learning and Data Mining (MLDM), 2012. G. T. Toussaint, B. K. Bhattacharya, and R. S. Poulsen. The application of voronoi diagrams to non-parametric decision rules. In Symposium on the Interface of Computing Science and Statistics, 1984. J. W. Tukey. Mathematics and the picturing of data. In International Congress of Mathematicians (ICM), 1974. A. Ukkonen, B. Derakhshan, and H. Heikinheimo. Crowdsourced nonparametric density estimation using relative distances. In Conference on Human Computation and Crowdsourcing (HCOMP), 2015. G. Van Bever. Contributions to Nonparametric and Semiparametric Inference based on Statistical Depth. PhD thesis, Université libre de Bruxelles, 2013. L. J. P. van der Maaten and K. Q. Weinberger. Stochastic triplet embedding. In IEEE International Workshop on Machine Learning for Signal Processing (MLSP), 2012. Code available on http://homepage.tudelft.nl/19j49/ste. U. von Luxburg. A tutorial on spectral clustering. Statistics and Computing, 17(4):395–416, 2007. U. von Luxburg and M. Alamgir. Density estimation from unweighted k-nearest neighbor graphs: a roadmap. In Neural Information Processing Systems (NIPS), 2013. M. J. Wilber, I. S. Kwak, and S. J. Belongie. Cost-effective hits for relative similarity comparisons. In Conference on Human Computation and Crowdsourcing (HCOMP), 2014. L. Xiao, R. Li, and J. Luo. Sensor localization based on nonmetric multidimensional scaling. In International Conference on Sensing, Computing and Automation (ICSCA), 2006. D. Yan, L. Huang, and M. I. Jordan. Fast approximate spectral clustering. In ACM International Conference on Knowledge Discovery and Data Mining (SIGKDD), 2009. 51 Kleindessner and von Luxburg M. Yang. Depth Functions, Multidimensional Medians and Tests of Uniformity on Proximity Graphs. PhD thesis, The George Washington University, 2014. Y. Zuo and R. Serfling. General notions of statistical depth function. The Annals of Statistics, 28(2):461–482, 2000. 52
8cs.DS
EFFICIENT QUANTUM ALGORITHMS FOR ANALYZING LARGE SPARSE ELECTRICAL NETWORKS arXiv:1311.1851v10 [quant-ph] 24 Jul 2017 GUOMING WANG Joint Center for Quantum Information and Computer Science, University of Maryland, College Park, MD 20742, USA Analyzing large sparse electrical networks is a fundamental task in physics, electrical engineering and computer science. We propose two classes of quantum algorithms for this task. The first class is based on solving linear systems, and the second class is based on using quantum walks. These algorithms compute various electrical quantities, including voltages, currents, dissipated powers and effective resistances, in time poly ( d, c, log( N ), 1/λ, 1/ǫ ), where N is the number of vertices in the network, d is the maximum unweighted degree of the vertices, c is the ratio of largest to smallest edge resistance, λ is the spectral gap of the normalized Laplacian of the network, and ǫ is the accuracy. Furthermore, we show that the polynomial dependence on 1/λ is necessary. This implies that our algorithms are optimal up to polynomial factors and cannot be significantly improved. Keywords: Quantum algorithm, Electrical network, Spectral graph theory, Linear system, Quantum walk 1 Introduction Quantum computers are believed to be more powerful than classical computers, in the sense that quantum algorithms can solve some computational problems exponentially faster than their classical counterparts. So far, this kind of speedup has been mainly demonstrated for two types of problems: simulation of quantum systems (e.g. [1, 2, 3, 4, 5]), and algebraic or number theoretic problems (e.g. [6, 7, 8, 9, 10]). While the first category is quantum in nature, the second category has some group structure so that quantum Fourier transform can be applied to find periodicity. In contrast, many computational problems in natural science and engineering do not possess this kind of structure, and it remains an important task to understand how efficiently quantum algorithms can solve them. In this paper, we investigate the power and limitation of quantum algorithms for analyzing (resistive) electrical networks. The problems we consider are as follows. Suppose a connected undirected graph is given such that each edge has associated with it a real positive resistance, and an electric current is injected at some vertices and extracted at some other vertices. The goal is to determine the induced voltage (i.e. potential difference) between two given vertices, or the induced current on a given edge, or the total power disspiated by this graph. We are also interested in computing the effective resistance between two given vertices, which is defined as the induced voltage between these vertices when a unit current is injected at one of them and extracted at the other. These problems are fundamental in physics and electrical engineering, and have numerous applications. Remarkably, they play an important role in computer science as well. The idea of viewing a graph as an electrical network turns out to be very fruitful in the design of fast classical algorithms (e.g. [11, 12, 13, 14, 15, 16, 17, 18]) and analysis of random walks (e.g. [19, 20]). In 1 2 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks recent years, electrical network theory has also begun to be used in the design of efficient quantum algorithms (e.g. [21, 22, 23, 24, 25, 26, 27, 28, 29]) and analysis of quantum walks (e.g. [30, 26, 31, 32]). The ability to quickly compute the above electrical quantities is a requisite for these ideas to work. Classically, one calculates the electric potentials and currents in an electrical network as follows .a Kirchoff’s current law stipulates that the sum of the currents entering a vertex equals the sum of the currents leaving it. Ohm’s law states that the voltage across a resistor equals the product of the resistance and the current through it. Combining these two facts, one obtain a system of linear equations. Currently, the best way to solve this linear system is by using Spielman and Teng’s algorithm [33, 34], which takes nearly linear time in the number of edges. Note that this is nearly optimal for this approach, because simply writing down the vector of potentials (or currents) requires linear time in the number of vertices (or edges), which can be time-consuming for large graphs. Given this limitation, we naturally ask whether quantum algorithms can perform better on this task. We answer this question affirmatively by giving a series of efficient quantum algorithms for analyzing large sparse electrical networks. These networks might contain (exponentially) many vertices, but each vertex has only a small number of neighbors (which can be efficiently found). Such networks frequently arise in both physics and computer science contexts. Our algorithms compute various electrical quantities, including voltages, currents, dissipated powers and effective resistances, in time poly(d, c, log( N ), 1/λ, 1/ǫ), where N is the number of vertices in the network, d is the maximum unweighted degree of the vertices, c is the ratio of largest to smallest edge resistance, λ is the spectral gap of the normalized Laplacian of the network, and ǫ is the accuracy. In particular, their dependence on N is exponentially better than that of known classical algorithms. Our algorithms can be divided into two classes depending on the main techniques used. The first class of algorithms build certain linear systems and extract useful information from their solutions. These systems include the Laplacian system whose solution encodes the electric potentials, and another linear system whose solution roughly encodes the electric currents. To solve these systems most efficiently, we develop variants of a recent quantum linear system algorithm (QLSA) proposed by Childs, Kothari and Somma [35] (which improves the previous algorithms of Harrow, Hassidim and Lloyd [36] and Ambainis [37]). Previous QLSAs yield a quantum state proportional to the solution of a given linear system, and this has caused some controversy over the years. Our variants output a number, and hence do not have this issue. This number can be the norm of the solution, or the norm of one entry of the solution, or the norm of the difference of two entries of the solution, all of which have a natural physical meaning in the context of our linear systems. Our second class of algorithms take advantage of the graph structure of the problems under consideration, and beat the first class in computing dissipated powers and effective resistances. They are based on a modern use of quantum walks [38, 39], which are a powerful tool for designing fast quantum algorithms. In the early years, quantum walks were mainly used for amplitude amplification in search problems (e.g. [38, 40, 39, 41]). But during recent years, their spectral properties became more and more useful for tackling decision problems (e.g. [42, 43, 25, 30]). Here we follow the second approach. Specifically, we first establish a rea Once these quantities are known, one can infer the dissipated powers and effective resistances from them. Guoming Wang 3 lationship between the kernel of the signed weighted incidence matrix of a network and the electrical flow in this network. Then we show that a state encoding this flow can be obtained by performing a boosted version of phase estimation on the quantum walk corresponding to this matrix. We also give efficient implementations of this quantum walk. Finally, we demonstrate how to extract useful information from this state by performing appropriate operations on it. As mentioned before, all of our algorithms have polynomial dependence on the parameter 1/λ, where λ is the spectral gap of the normalized Laplacian of the network (see Section 2.2 for the precise definition). One may wonder whether this dependence is necessary. We show that this is indeed the case. Specifically, we prove that in order to estimate any  of the  above electrical quantities within a reasonable accuracy, one has to make Ω 1/λk queries to the network, for some constant k > 0. This lower bound implies that our algorithms are optimal up to polynomial factors and cannot be dramatically improved. The remainder of this paper is organized as follows. In Section 2, we provide some requisite background information, and formally state the problems studied in this work. In Section 3, we describe a class of quantum algorithms for analyzing electrical networks based on solving linear systems. In Section 4, we present another class of quantum algorithms for the same problems based on using quantum walks. In Section 5, we prove lower bounds on the quantum query complexity of electrical network analysis. Finally, we conclude in Section 6 with some comments and future research directions. 2 Preliminaries In this section, we provide the necessary background information to understand this paper. In Section 2.1, we introduce the notation used in this paper. In Section 2.2 and Section 2.3, we give some basic results in spectral graph theory and electrical network theory, respectively. In Section 2.4, we formally state the problems studied in this work. 2.1 Notation Given a set U, we use RU to denote the set of all functions from U to R. If U is finite, we also treat any f ∈ RU as a |U |-dimensional vector in the natural way. Given a real number z, we define sgn(z) = 1 if z ≥ 0, and −1 otherwise. Given two real numbers a, b and a real number δ > 0, we say that a is a δ-additive approximation of b if | a − b| ≤ δ, and say that a is a δ-multiplicative approximation of b if | a − b| ≤ δ|b|. We say that an algorithm estimates a quantity x up to additive error δ if it outputs a δ-additive approximation of x, and say that an algorithm estimates a quantity x up to multiplicative error δ if it outputs a δ-multiplicative approximation of x. We will use the Dirac notation to describe both quantum states and abstract vectors. Namely, depending on the context, | ϕi can be a (possibly unnormalized) state or a vector in a Hilbert space, and h ϕ| is its conjugate transpose. Moreover, if we write |ψi ⊥ | ϕi, we mean that hψ| ϕi = 0. Given a vector x, we use k x k to denote the l 2 norm of x. Given a matrix A, we use k Ak to denote the spectral norm of A. Given a matrix A, we say that A is d-sparse if each row and column of A contains at most d nonzero entries. Moreover, we use Range( A) to denote the range (i.e. column space) of 4 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks A, and use Ker( A) to denote the kernel (i.e. null space) of A. We also use Π( A) to denote the projection onto Range( A), and use Ref( A) to denote the reflection about Range( A), i.e. Ref( A) := 2Π( A) − I. We also use s j ( A) to denote j-th smallest singular value of A (counted with multiplicity), and use λ j ( A) to denote the j-th smallest eigenvalue of A (counted with multiplicity), starting with j = 1. The condition number of A, denoted by κ ( A), is defined as the ratio of largest to smallest singular value of A, and the finite condition number of A, denoted by κ f ( A), is defined as the ratio of largest to smallest nonzero singular value of A. Futhermore, we use A+ to denote the Moore-Penrose pseudoinverse of A. That is, if A has the 1 singular value decomposition A = ∑ j s j u j ihv j (where s j > 0), then A+ := ∑ j s− v j ihu j . j Given two Hermitian matrices A and B, if we write A < B (or A 4 B), we mean that A − B (or B − A) is positive semidefinite. Given a unitary operation U and a real number ǫ > 0, we say that a circuit (or procedure) implements U with precision ǫ if this circuit (or procedure) implements a unitary operation V satisfying kU − V k ≤ ǫ. 2.2 Graph theory definitions All the graphs considered in this paper will be connected, weighted and undirected, unless otherwise stated. If any unweighted graph is mentioned, we also treat it as a weighted graph with unit edge weights. Let G = (V, E, w) be a graph with edge weights we > 0. For any vertex v, let E(v) be the set of edges incident to v. The unweighted degree of v is defined as deg(v) := | E(v)|, and the g (v) := ∑ weighted degree of v is defined as deg e ∈ E ( v ) w e . The maximum unweighted degree of G is defined as deg( G ) := maxv∈V deg(v), and the maximum weighted degree of G is defined as g ( G ) := maxv∈V deg g (v). For any S ⊆ V, the volume of S is defined as vol(S) := ∑v∈S deg g ( v ). deg + Now we arbitrarily orient the edges in E. For each edge e, let e denote its head, and let e− denote its tail. For each vertex v, let E+ (v) := {e ∈ E(v) : e+ = v}, and let E− (v) := {e ∈ E(v) : e− = v}. These orientations are merely for notational convenience, and they are used to interpret the meaning of a positive flow on an edge. That is, if the flow runs from the tail to the head of the edge, then it is positive; otherwise, it is negative. One should keep in mind that the graph G is still undirected, and the flow on an edge can go in either direction, regardless of this edge’s orientation. Now we define several matrices associated with the graph G. The weighted degree matrix of G is defined as g (v)|vihv|. DG := ∑ deg (1) v ∈V The weighted adjacency matrix of G is defined as A G := ∑ we e∈ E  e− ihe+ + e+ ihe− . The signed (vertex-edge) incidence matrix of G is defined as  BG : = ∑ e − − e + he | . e∈ E (2) (3) The edge weight matrix of G is defined as WG := ∑ we |eihe|. e∈ E (4) Guoming Wang 5 The signed weighted (vertex-edge) incidence matrix of G is defined as CG := BG WG1/2 = ∑ e∈ E √ we ( e− − e+ )he|. (5) The Laplacian of G is defined as T = B W BT = D − A . L G : = CG CG G G G G G (6) The normalized Laplacian of G is defined as −1/2 −1/2 −1/2 −1/2 LG DG = I − DG AG DG . L G := D G (7) Both L G and L G are real symmetric matrices, and they satisfy and Ker( L G ) = span{| 1i}, o n  Ker L G = span D1/2 G |1i , (8) Range( L G ) = {|ψi : |ψi ⊥ |1i}, o  n −1/2 Range L G = DG |ψi : |ψi ⊥ |1i , (10) (9) (11) where |1i := ∑v∈V |vi. Furthermore, it can be shown that and g (G) 0 = λ1 ( L G ) < λ2 ( L G ) ≤ . . . λ N ( L G ) ≤ 2deg (12) 0 = λ1 ( L G ) < λ2 ( L G ) ≤ . . . λ N ( L G ) ≤ 2, (13) where N := |V |. In particular, λ2 ( L G ) is called the spectral gap of L G , and λ2 ( L G ) is called the spectral gap of L G . The following lemma establishes a relationship between λ2 ( L G ) and λ2 ( L G ): g (v) ≥ 1 for all v ∈ V, then λ2 ( L G ) ≥ λ2 ( L G ). Lemma 1 If deg Proof. Suppose λ2 ( L G ) = λ. We need to show that for any |ψi ⊥ |1i, hψ|ψi 6= 0, h ψ | L G | ψ i ≥ λh ψ | ψ i. (14)  −1/2 Since | ϕi := DG |ψi ∈ Range L G and λ2 ( L G ) = λ, we have LG < λ −1/2 D −1/2 |ψihψ| DG | ϕih ϕ| =λ G . −1 h ϕ| ϕi |ψi hψ | D G (15) Consequently, we get 1/2 hψ| L G |ψi = hψ| D1/2 G L G DG |ψi ≥ λ hψ|ψihψ|ψi ≥ λh ψ | ψ i, −1 |ψi hψ| DG (16) 6 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks g (v)|vihv| < I and hence hψ| D −1 |ψi ≤ where the last step follows from the fact that DG = ∑v deg G hψ|ψi. ✷. Now we define a combinatorial quantity associated with the graph G. For any S, T ⊂ V, S ∩ T = Ø, let E(S, T ) be the set of edges with one endpoint in S and another endpoint in T, and let w(S, T ) := ∑e∈ E( S,T ) we . Then for any S ⊂ V, S 6= Ø, the conductance of S is defined as φS : = w(S, S̄ ) , min vol(S), vol(S̄)  (17) where S̄ := V \ S. Then the conductance of G is defined as φG : = min S ⊂V, S 6 =Ø φS . (18) Remarkably, Cheeger’s inequality [44, 45] establishes a polynomial relationship between the algebraic quantity λ2 ( L G ) and the combinatorial quantity φG : φ2G ≤ λ2 ( L G ) ≤ 2φG . 2 2.3 (19) Electrical flows In this paper, we treat a graph G = (V, E, w) with edge weights we > 0 as an electrical network with the same topology and edge resistances re := 1/we (or equivalently, edge conductances we ), and vice versa. So from now on we will interchange the terms “graph” and “electrical network”, as they refer to the same thing. Let iext ∈ RV satisfy iext ⊥ 1 := (1, 1, . . . , 1) T . Suppose we inject an electric current of value iext (v) at vertex v, for each v ∈ V (if iext < 0, then we extract an electric current of value −iext (v) at vertex v). The condition iext ⊥ 1 ensures that the total amount of injected currents equals the total amount of extracted currents, which is physically reasonable. Let v ∈ RV be the induced potentials at the vertices, and let i ∈ R E be the induced currents on the edges. By Ohm’s law, the current on an edge is equal to the voltage (i.e. potential difference) between its endpoints times its conductance: T v. i = WG BG (20) Meanwhile, by Kirchoff’s current law, the sum of the currents leaving a vertex is equal to the amount injected at the vertex: BG i = iext . (21) Combining these two facts, we get Since iext ∈ Range( L G ), we have T iext = BG WG BG v = L G v. (22) v = L+ G i ext . (23) Furthermore, by Joule’s first law, the power dissipated by an edge is equal to the square of the current on it times its resistance (or equivalently, the square of the voltage across it times its conductance). So the total power dissipated by the graph G is T L+ i . E (i) := i T WG−1 i = v T L G v = iext G ext (24) Guoming Wang 7 Often we are interested in the special case where a unit current is injected at a vertex s and extracted at another vertex t. Namely, iext = χs,t := |si − |ti. The effective resistance between s and t, denoted by Reff (s, t), is defined as the induced voltage between s and t in this case. By Joule’s first law, Reff (s, t) is also equal to the power dissipated by the graph G in this case. So we have T L+ χ , Reff (s, t) = v(s) − v(t) = E (i) = χs,t (25) G s,t T T + where v = L+ G χ s,t and i = WG BG v = WG BG L G χ s,t . There is an alternative definition for electrical flow which turns out to be very useful. Let iext ∈ RV satisfy iext ⊥ 1 = (1, 1, . . ., 1) T . We say that f ∈ R E is a flow consistent with iext if it obeys the flow-conservation constraints: ∑ e∈ E−(v) f( e) − ∑ e∈ E+ (v) f(e) = iext (v), ∀ v ∈ V. (26) The power of the flow f (with respect to the edge resistances re = 1/we ) is defined as E ( f) : = f2 ( e ) . we e∈ E ∑ r e f2 ( e ) = ∑ e∈ E (27) Then, among all the flows consistent with iext , the electrical flow i induced by iext is the unique flow that minimizes this power function: T L+ i E Lemma 2 Let i = WG BG G ext be the electrical flow induced by i ext . Then any flow f ∈ R consistent with iext satisfies E (f) ≥ E (i). Proof. Suppose CG has the singular value decomposition CG = ∑ j s j u j ihv j , where s j > 0, T has the spectral decomposition u j and v j are real vectors, for all j. Then L G = CG CG 2 L G = ∑ j s j u j ihu j . In addition, since iext ∈ Range( L G ), we have iext = ∑ j α j u j for some numbers α j ’s. Consequently, we get −1 T L+ i T + WG−1/2 i = WG1/2 BG G ext = CG L G i ext = ∑ s j α j v j . j (28) So the power of the electrical flow i is E (i) = WG−1/2 i 2 2 1 = ∑ s− j αj . j (29) Meanwhile, for any flow f consistent with iext, we have BG f = iext and hence CG (WG−1/2 f) = iext. This implies that E 1 ⊥ , WG−1/2 f = ∑ s− j αj vj + Φ j (30) where Φ⊥ is an unnormalized vector satisfying Φ⊥ ⊥ v j for all j. As a result, we obtain E 2 2 2 1 ⊥ E (f) = W −1/2 f = ∑ s− α + ≥ E ( i ). Φ j (31) j j ✷. Lemma 2 implies that the effective resistance Reff (s, t) between s and t is equal to the minimum power of a flow consistent with iext = χs,t . This is an alternative definition of effective resistance. 8 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks 2.4 Problem statement Given an electrical network G = (V, E, w) driven by an external current iext , we are interested in the quantum complexity of the following problems: • Compute the voltage between two vertices s and t. • Compute the current on an edge e. • Compute the power dissipated by the graph G. • Compute the effective resistance between two vertices s and t. We will mainly focus on large sparse graphs. Namely, G might contain (exponentially) many vertices, but each vertex has only a small number of neighbors (which can be efficiently found). Our model is as follows. Suppose V = {v1 , v2 , . . . , v N }, E = {e1 , e2 , . . . , e M } and deg( G ) = d. Then we assume there exists a procedure Pv that, on input (i, k) ∈ {1, 2, . . . , N } × {1, 2, . . . , d}, outputs (the index of) the k-th edge incident to vi . We also assume there exists a procedure Pe that, on input j ∈ {1, 2, . . . , M }, outputs (the index of) the two endpoints of e j as well as the weight of e j . Furthermore, except for computing effective resistances, we assume |i i there exists a produre Pi that prepares the state k|iext ik , where | iext i := ∑v∈V iext (v)|vi. We ext assume that Pv , Pe and Pi are all efficient, in the sense that they can be implemented in time poly(log( N )). Formally, we define our Electrical Network Analysis (ENA) problems as follows: Problem 1 (ENA-V) Let G = (V, E, w) be an electrical network such that |V | = N, deg( G ) ≤ d, 1 ≤ we ≤ c, for all e ∈ E, and λ2 ( L G ) ≥ λ > 0. Suppose G is driven by an external current iext ∈ RV satisfying iext ⊥ 1 and kiext k = 1 .b Let v = L+ G i ext be the induced potentials at the vertices, and let T i = WG BG v be the induced currents on the edges. Let ǫ ∈ (0, 1). Given s, t ∈ V and access to the procedures Pv , Pe and Pi , the goal is to estimate |v(s) − v(t)| up to additive error ǫ, succeeding with probability at least 2/3. Problem 2 (ENA-C) The assumption is the same as in ENA-V. Given e ∈ E and access to the procedures Pv , Pe and Pi , the goal is to estimate |i(e)| up to additive error ǫ, succeeding with probability at least 2/3. Problem 3 (ENA-P) The assumption is the same as in ENA-V. Given access to the procedures Pv , Pe and Pi , the goal is to estimate E (i) up to multiplicative error ǫ, succeeding with probability at least 2/3. Problem 4 (ENA-ER) The assumption is almost the same as in ENA-V, except that we do not need iext or Pi . Given s, t ∈ V and access to the procedures Pv and Pe , the goal is to estimate Reff (s, t) up to multiplicative error ǫ, succeeding with probability at least 2/3. These problems are not completely independent of each other. For example, when s and t are adjacent vertices, we can infer the voltage between s and t from the current on (s, t) by using Ohm’s law, and vice versa. So ENA-V and ENA-C are equivalent (up to a query of the weight of (s, t)) in this case. Moreover, when iext = χs,t , the power of the flow i is equal to the effective resistance Reff (s, t) between s and t. So ENA-ER can be viewed as a special case b For the readers who have skipped Section 2.1, k iext k means the l 2 norm of iext . Guoming Wang 9 of ENA-P. Despite such connections among these problems, one can see that no two of them are completely equivalent. Although in the above problems we assume that the edge conductances are in the range [1, c] and the external current iext has unit l 2 norm, this is without loss of generality. Suppose instead that the edge conductances are in the range [ a, ac], and kiext k = b, for some constants a, b > 0. Namely, the edge conductances are rescaled by a factor of a, and the external current is rescaled by a factor of b. By Eqs. (20), (23), (24) and (25), this would rescale the voltages, currents, disspated powers and effective resistances in the electrical network by a factor of b/a, b, b2 /a and 1/a, respectively. So we only need to solve the problems ENA-V, ENA-C, ENA-P and ENA-ER described above, and then multiply their solutions by these factors, resepectively. We will develop quantum algorithms for solving the above ENA problems. We quantify the resource requirements of these algorithms using two measures. The query complexity is the number of uses of the procedures Pv , Pe and Pi in the algorithm. The gate complexity is the number of 2-qubit gates used in the algorithm. An algorithm is gate-efficient if its gate complexity is larger than its query complexity only by a logarithmic factor. Formally, an algorithm with query complexity Q is gate-efficient if its gate complexity is O( Q · poly(log( QN ))), where N = |V | is the number of vertices in G. All the algorithms presented in this paper will be gate-efficient. 3 Analyzing Electrical Networks by Solving Linear Systems In this section, we describe a class of quantum algorithms for analyzing electrical networks based on solving certain linear systems. These systems include the Laplacian system whose solution encodes the electric potentials, and another linear system whose solution roughly encodes the electric currents. To solve these systems most efficiently, we first develop several variants of a recent quantum linear system algorithm in Section 3.1. Then we show how to use them to solve the ENA problems in Section 3.2. 3.1 Quantum linear system algorithms Recently, Childs, Kothari and Somma (CKS) [35] proposed a quantum linear system algorithm (QLSA) which improves the previous algorithms of Harrow, Hassidim and Lloyd (HHL) [36] and Ambainis [37]. Their main result can be summarized as follows: Theorem 1 ([35]) Let A be a d-sparse N × N Hermitian matrix such that all the eigenvalues of A are in the range Dκ := [−1, −1/κ ] ∪ [1/κ, 1]. Assume there exists a procedure P A that runs in time poly(log( N )) and on input (i, j) ∈ {1, 2, . . . , N } × {1, 2, . . . , d}, outputs the location and value of the j-th nonzero entry in the i-th row of A. Let ~b = (b1 , b2 , . . . , b N ) T be an N-dimensional vector. Assume there exists a procedure Pb that runs in time poly(log( N )) and produces the state ∑ j x j | ji ∑ j bj | ji . Let ~x = ( x1 , x2 , . . . , x N ) T := A−1~b, and let | x̄ i := . Let ǫ ∈ (0, 1). Then b̄ := j b | i ∑ k j j k k ∑ j x j | j ik c there exists a gate-efficient quantum algorithm that makes     dκ O dκ · poly log ǫ c In this subsection, we define gate-efficient algorithms as follows: An algorithm with query complexity Q is gateefficient if its gate complexity is O ( Q · poly (log ( QN ))), where N is the dimension of matrix A. 10 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks uses of P A and Pb , and produces a state ǫ-close to | x̄i in l 2 norm, succeeding with Ω(1) probability, with a flag indicating success. CKS mainly focused on how to prepare a state proportional to the solution of a given linear system. But for electrical network analysis, the following problems are actually more relevant: (1) Compute the norm of this solution; (2) Compute the norm of an entry of this solution; (3) Compute the norm of the difference of two entries of this solution. So we develop variants of their algorithm for solving these problems :d Lemma 3 Under the same assumption as in Theorem 1, supposing ||~b || = q is known, there exists a gate-efficient quantum algorithm that makes     2 dκ dκ · poly log O ǫ ǫ uses of P A and Pb , and outputs an ǫ-multiplicative approximation of k~x k with probability at least 2/3. Lemma 4 Under the same assumption as in Theorem 1, supposing ||~b || = q is known, there exists a gate-efficient quantum algorithm that makes  2 3    dq κ dqκ O · poly log ǫ ǫ2 uses of P A and Pb , and outputs an ǫ-additive approximation of | xi |, for any given i ∈ {1, 2, . . . , N }, with probability at least 2/3. Lemma 5 Under the same assumption as in Theorem 1, supposing ||~b || = q is known, there exists a gate-efficient quantum algorithm that makes     2 3 dqκ dq κ · poly log O ǫ ǫ2 uses of P A and Pb , and outputs an ǫ-additive approximation of xi − x j , for any given i, j ∈ {1, 2, . . . , N }, with probability at least 2/3. Before proving these lemmas, let us briefly review the algorithm in Theorem 1. Then we show how to modify this algorithm to solve the problems in Lemmas 3, 4 and 5. This algorithm uses the following technique to implement a linear combination of unitary operations. Let M = ∑ j α j Uj be a linear combination of unitary operators Uj with α j > 0 for √ all j. Let V be any unitary operator that satisfies V |0m i = √1α ∑ j α j | ji, where m is a positive integer, α := k~αk1 = ∑ j α j . Let U := ∑ j | jih j| ⊗ Uj . Then W := V † UV satisfies W |0m i| ϕi = = d CKS E 1 m |0 i M | ϕ i + Φ ⊥ α   E M| ϕi k M | ϕik + Φ⊥ , |0 m i α k M | ϕik (32) (33) actually gave two quantum algorithms that meet the constraints of Theorem 1, one based on the Fourier approach, and another based on the Chebyshev approach. Our variants are based on the former one. Moreover, after completing this work, we realize that Ref. [46] gave an alternative proof of Lemma 3 based on a modification of HHL’s algorithm. Guoming Wang 11 where Φ⊥ is an unnormalized state (depending on | ϕi) satisfying (|0m ih0m | ⊗ I ) Φ⊥ = 0, for all state | ϕi. Then, if we measure the first m qubits of this state in the standard basis, then with probability k M | ϕik2 , α2 the outcome is 0m and we obtain the state M | ϕi . k M | ϕik To apply this technique to implement the operator A−1 , Ref. [35] finds certain α j ’s and Uj ’s such that A−1 ≈ ∑ j α j Uj and each Uj is of the form e−iAt j for some t j ∈ R. Specifically, let γ > 0 be arbitrary, and let the function h( x ) be defined as h( x ) := J −1 K α( j, k)e−ixβ( j,k), ∑ ∑ (34) j =0 k =− K where i 2 2 kδy δz2 e−k δz /2 , 2π β( j, k) := jkδy δz , α( j, k) := √ (35) (36)  p  for some J = Θ((κ/γ) · log(κ/γ)), K = Θ(κ · log(κ/γ)), δy = Θ γ/ log(κ/γ) and δz =   p Θ 1/(κ log(κ/γ)) . Then h( x ) is γ-close to 1/x on the domain Dκ , i.e. h( x ) − x −1 ≤ γ for all x ∈ Dκ . Then since A is a Hermitian matrix with eigenvalues in the range Dκ , h ( A ) − A −1 = J −1 K ∑ ∑ j =0 k =− K α( j, k)e−iAβ( j,k) − A−1 ≤ γ. (37) It follows that Then, since A−1 b̄ h( A) b̄ − A−1 b̄ = O ( γ ). (38) ≥ 1, by Lemma A.1 in Appendix A, we get h( A) b̄ h( A) b̄ − A−1 b̄ A−1 b̄ = O (γ ). (39) Furthermore, we have α := J −1 K ∑ ∑ j =0 k =− K   q |α( j, k)| = Θ κ log(κ/γ) , (40) and | β( j, k)| ≤ JKδy δz = Θ(κ · log(κ/γ)) (41) for all j, k. Now we pick γ = Θ(ǫ), and define the operators V and U corresponding to this Fourier approximation of x −1 . Let V be a unitary operator such that 1 V | 0m i = √ α J −1 K ∑ ∑ j =0 k =− K q |α( j, k)|| j, ki, (42) 12 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks where m = O(log( JK )) = O(log(κ/ǫ)). Let U be defined as J −1 U := i ∑ K ∑ j =0 k =− K | j, kih j, k| ⊗ sgn(k)e−iAβ( j,k). (43) Ref. [35] shows that V can be implemented with O(κ · poly(log(κ/ǫ))) 2-qubit gates, and U can be implemented with precision ǫ′ (≤ ǫ) by a gate-efficient procedure that makes O(dκ · poly(log(dκ/ǫ′ ))) uses of P A . Now we define W = V † UV, and get ! h( A) b̄ b̄ h ( A ) + Φ⊥ , (44) = W |0m i b̄ |0 m i α h( A) b̄ where Φ⊥ is an unnormalized state satisfying (|0m ih0m | ⊗ I ) Φ⊥ = 0. Then, if we measure the first m qubits of this state in the standard basis, then with probability h( A) b̄ p := α2 (note that h( A) b̄ is 0m ≥ A−1 b̄ 2  1 =Ω 2 , α  (45) − O(ǫ) ≥ 1 − O(ǫ) by Eq. (38) and γ = Θ(ǫ)), the outcome h ( A ) |b̄i , which is ǫ-close to | x̄ i in l 2 norm by Eq. (39). To raise k h( A)|b̄ik the success probability to Ω(1), we use the standard ampltitude amplification [47], which requires     p 1 = O(α) = O κ log(κ/ǫ) O √ (46) p and we obtain the state repetitions of the above procedure. This means that we need to implement each U with precision ! ǫ ǫ ǫ′ = O . (47) =O p α κ log(κ/ǫ) The resulting algorithm, denoted by A, makes     dκ O dκ 2 · poly log ǫ uses of P A and Pb , and is gate-efficient. The κ-dependence can be decreased from quadratic to nearly linear by using Ambainis’ variable-time amplitude amplification [37]. However, we do not need this technique to prove Lemma 3, 4 or 5. Proof. [Proof of Lemma 3] Suppose ||~b || = q is known. Then k~x k = q A−1 b̄ . So in order to estimate k~xk up to multiplicative error O(ǫ), we only need to get an O(ǫ)multiplicative approximation of A−1 b̄ . To achieve this, we modify A by replacing amplitude amplification with amplitude estimation [47]. Specifically, we still choose γ = Θ(ǫ) and define the corresponding operators V, U and W as before. Then, if we measure the first m qubits of W |0m i|bi in the standard basis, the probability of getting outcome 0m is p= h( A) b̄ α2 2 =Ω   1 , α2 (48) Guoming Wang 13   p where α = Θ κ log(κ/ǫ) . We use amplitude estimation to obtain an O(ǫ)-multiplicative p approximation p̂ of p (succeeding with probability at√least 3/4). Then p̂ is an O(ǫ)√ √ p (note that 1 − δ ≤ 1 − δ ≤ 1 + δ ≤ 1 + δ for all δ ∈ multiplicative approximation of p [0, 1]), and hence α p̂ is an O(ǫ)-multiplicative approximation of h( A) b̄ . Meanwhile, by Eq. (38), γ = Θ(ǫ) and A−1 b̄ ≥ 1, we know that h( A) b̄ is an pO(ǫ)-multiplicative approximation of A−1 b̄ . Combining these p two facts, we get that α p̂ is an O(ǫ)-multiplicative approximation of A−1 b̄ . Therefore, qα p̂ is an O(ǫ)-multiplicative approximation of k~x k, as desired.  Let us analyze the complexity of this algorithm. Since we want to estimate p = Ω 1/α2 up to multiplicative error O(ǫ), amplitude estimation requires ! p   α κ log(κ/ǫ) 1 (49) =O =O O √ ǫ p ǫ ǫ repetitions of W and Pb . This means that we need to implement each U with precision ! ǫ ǫ O =O p . (50) α κ log(κ/ǫ) This can be achieved by a gate-efficient procedure that makes O(dκ · poly(log(dκ/ǫ))) uses of P A . So the resulting algorithm makes     2 dκ dκ · poly log O ǫ ǫ uses of P A and Pb , and is gate-efficient. ✷. Proof. [Proof of Lemma 4] Let |yi = A−1 b̄ . Then | xi | = q|hi |yi|. So in order to estimate | xi | up to additive error O(ǫ), we only need to get an O(ǫ/q)-additive approximation of |hi |yi|. To achieve this, we choose γ = Θ(ǫ′ ) where ǫ′ := ǫ/q, so that = O ( ǫ ′ ). h( A) b̄ − A−1 b̄ (51) Let |y′ i = h( A) b̄ . Then k|y′ i − |yik = O(ǫ′ ). Next, we define the operators V, U and W corresponding to this γ. We also define a unitary operator R such that R|0i|i i = |1i|i i and R|0i|i ′ i = |0i|i ′ i for all i ′ 6= i. Then we have RW |0m i|0i b̄ = E hi | y ′ i m hi ′ | y ′ i m |0 i|1i|i i + ∑ |0 i|0i i ′ + Ξ⊥ , α α i′ 6=i (52)   p where α = Θ κ log(κ/ǫ′ ) , and Ξ⊥ is an unnormalized state satisfying (|0m ih0m | ⊗ I ) Ξ⊥ = 0. Then, if we measure the first m + 1 qubits of this state in the standard basis, the probability of getting outcome 0m 1 is 2 p ′ := |hi |y′ i| . α2 (53) ′ of p ′ (succeedWe use amplitude estimation to obtain an O(ǫ′′ )-additive approximation p̂ √  p ǫ′′ -additive ing with probability at least 3/4), where ǫ′′ := (ǫ′ )2 /α2 . Then p̂′ is an O 14 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks approximation of and hence √ √ z + δ ≤ z + δ for all z ≥ δ ≥ 0),  √  p p p (54) |hi |y′ i| − α p̂′ = α p′ − α p̂′ = O α ǫ′′ = O(ǫ′ ). p p′ (note that √ √ z− δ≤ √ z−δ≤ √ Meanwhile, note that |hi |y′ i − hi |yi| ≤ k|y′ i − |yik = O(ǫ′ ). (55) Combining Eqs. (54) and (55), we get p (56) α p̂′ − |hi |yi| = O(ǫ′ ). p Then, since ǫ = qǫ′ , we know that qα p̂′ is an O(ǫ)-additive approximation of | xi | = q|hi |yi|, as desired. Let us analyze the complexity of this algorithm. Since we want to estimate p ′ up to  additive error O(ǫ′′ ) where ǫ′′ = Θ ǫ2 /(q2 κ 2 log(qκ/ǫ)) , amplitude estimation requires O  1 ǫ′′  =O  q2 κ 2 log(qκ/ǫ) ǫ2  (57) repetitions of R, W and Pb . This means that we need to implement each U with precision O(ǫ′′ ) = O   ǫ2 . q2 κ 2 log(qκ/ǫ) (58) This can be achieved by a gate-efficient procedure that makes O(dκ · poly(log(dκq/ǫ))) uses of P A . So the resulting algorithm makes O     dqκ dq2 κ 3 log · poly ǫ ǫ2 uses of P A and Pb , and is gate-efficient. ✷. Proof. [Proof of Lemma 5] The proof of this lemma is similar to that of Lemma 4. The main difference is that here we replace R with a unitary operation Q which satisfies Q|0i −i,j = |1i −i,j , Q|0i +i,j = |0i +i,j , and Q|0i|l i = |0i|l i for all l 6= i, j, where ±i,j := √ (|i i ± | ji)/ 2. Then we have QW |0m i|0i b̄ = +i,j |y′ m −i,j |y′ m |0 i|1i −i,j + |0 i|0i +i,j α α E hl | y ′ i m +∑ |0 i|0i|l i + Ξ⊥ , α l 6 = i,j (59) (60) where W is defined as in the proof of Lemma 4, |y′ i = h( A) b̄ , and Ξ⊥ is an unnormalized state satisfying (|0m ih0m | ⊗ I ) Ξ⊥ = 0. We still pick γ = Θ(ǫ/q) such that k|yi − |y′ ik = O(ǫ/q), where |yi = A−1 b̄ . If we measure the first m + 1 qubits of QW |0m i|0i b̄ , then the probability of getting outcome 0m 1 is p′ := −i,j |y′ α2 2 . (61) Guoming Wang 15  We use amplitude estimation to obtain an O ǫ2p /(q2 α2 ) -additive approximation p̂′ of p ′ ′ approxima(succeeding p p at least 3/4). Then p̂ is an O(ǫ/(qα))-additive p with probability ′ ′ tion of p , and hence α p̂ is an O(ǫ/q)-additive approximation of α p′ = −i,j |y′ . Meanwhile,   ǫ ′ ′ , −i.j |y − −i,j |y ≤ k|y i − |yik = O (62) q p Combining these two facts, we know that qα p̂′ is an O(ǫ)-additive approximation of q −i,j |y = xi − x j √ . 2 (63) All the parameters are on the same order as in the proof of Lemma 4. So this algorithm also makes    2 3  dqκ dq κ · poly log O ǫ ǫ2 uses of P A and Pb , and is gate-efficient. ✷. It is worth noting that the algorithms in Theorem 1 and Lemmas 3, 4, 5 still work when A is not invertible but ~b ∈ Range( A). In this case, we only need to replace A−1 with A+ , and replace the condition number κ of A with the finite condition number κ f of A. This property will be useful in the next subsection. 3.2 Using QLSAs to analyze electrical networks Now we show how to use the QLSAs in Lemmas 3, 4 and 5 to analyze electrical networks. Let G = (V, E, w) be an electrical network driven by an external current iext, where |V | = N, deg( G ) = d, λ2 ( L G ) ≥ λ > 0, 1 ≤ we ≤ c for all e ∈ E, iext ⊥ 1 and k iext k = 1. Let v ∈ RV be the induced potentials at the vertices, and let i ∈ R E be the induced currents on the edges. To solve the ENA-V problem, we consider the Laplacian system L G v = iext. (64) Theorem 2 The ENA-V problem can be solved by a gate-efficient quantum algorithm that makes  3    cd cd O · poly log λǫ λ3 ǫ 2 uses of Pv , Pe and Pi . g (v) = ∑ Proof. For any v ∈ V, we have 1 ≤ deg e ∈ E ( v ) w e ≤ cd. So by Eq. (12) and Lemma 1, we have 0 = λ1 ( L G ) < λ ≤ λ2 ( L G ) ≤ · · · ≤ λ N ( L G ) ≤ 2cd. (65) Let A := 1 2cd L G and ~b := 1 2cd i ext . Then we get +~ v = L+ G i ext = A b. (66) Note that all the nonzero eigenvalues of A are in the range [λ/(2cd), 1], which means that A has finite condition number κ f ≤ 2cd/λ. In addition, A is (d + 1)-sparse, and given any (i, j) ∈ {1, 2, . . . , N } × {1, 2, . . . , d + 1}, we can find the location and value of the j-th nonzero 16 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks entry in the i-th row of A by making O(d) uses of Pv and Pe . Meanwhile, we have ~b ∈ Range( A), g := ||~b|| = 1/(2cd), and we can prepare a state proportional to ~b by calling Pi once. Using these facts and Lemma 5, we know that there exists a gate-efficient quantum algorithm that estimates |v(s) − v(t)| up to additive error ǫ, for any given s, t ∈ V, by making O d· dg2 κ 3f ǫ2   dgκ f · poly log ǫ !    cd cd3 = O 3 2 · poly log λǫ λ ǫ  (67) uses of Pv , Pe and Pi , as claimed. ✷. To solve the ENA-C, ENA-P and ENA-ER problems, we consider another linear system. This system has the advantage that the finite condition number of its coefficient matrix is the square root of that of Laplacian system. As a result, it can be solved more efficiently. Recall that BG i = iext and CG = BG WG1/2 . So we have  CG 0 0 T CG  0 WG−1/2 i  =  iext 0  (68) Furthermore, we claim: Lemma 6  0 T CG CG 0 +  iext 0  =  0 WG−1/2 i  . (69) Proof. Suppose CG has the singular value decomposition CG = ∑ j s j u j ihv j , where s j > 0, T has the spectral decomposition L = u j and v j are real vectors, for all j. Then L G = CG CG G 2 ∑ j s j u j ihu j . Moreover, since iext ∈ Range( L G ), we have iext = ∑ j α j u j for some numbers α j ’s. It follows that T L+ |i i = C T L+ |i i = WG−1/2 |ii = WG1/2 BG ∑ s−j 1 α j v j . G G ext G ext j Meanwhile, we have  0 T CG CG 0  = |1ih0| ⊗ CGT + |0ih1| ⊗ CG = ∑ s j (|1ih0| ⊗ j = ∑ sj j v j ihu j + |0ih1| ⊗ u j ihv j ) + j ih+ j − ∑ s j − j ih− j , where (70) (71) (72) (73) j | 1 i v j ± |0 i u j √ . 2 (74)  αj = |0i|iext i = ∑ α j |0i u j = ∑ √ + j − − j . 2 j j (75) ± j := We also have  iext 0  Guoming Wang 17 These facts imply that  0 T CG CG 0 +  iext 0  = 1 α j s− j √ ∑ 2 j = ∑ α j s−j 1 |1i v j j =  0 WG−1/2 i +j + −j   (76) (77) . (78) ✷. Theorem 3 The ENA-C problem can be solved by a gate-efficient quantum algorithm that makes    cd c1.5 d1.5 · poly log O 1.5 2 λǫ λ ǫ  uses of Pv , Pe and Pi . Proof. Let A := implies √ 1 (|1ih0| ⊗ 2cd T + |0ih1| ⊗ C ) eand | bi : = CG G √ 1 |0i| i ext i. 2cd Then Lemma 6 | x i := |1i(WG−1/2 |ii) = A+ |bi. Thus, for any given e ∈ E, we have |i(e)| = √ we |h1, e| x i|, (79) (80) where |1, ei := |1i|ei. So in order to estimate |i(e)| up to additive error ǫ, we only need to get √ an ǫ′ -additive approximation of |h1, e| x i|, where ǫ′ := ǫ/ c, since 1 ≤ we ≤ c. By the proof of Theorem 2, we know that all the nonzero eigenvalues of L G are in the range [λ, 2cd]. Then by the √ of Lemma 6, we know that all the nonzero singular values √ proof λ, 2cd], and all the nonzero eigenvalues of A are in the range of CG p are in the range [ p [−1, − λ/(2cd)] ∪ [ λ/(2cd), 1]. This implies that A has finite condition number κ f ≤ √ 2cd/λ. Moreover, A is d-sparse, and for any given (i, j) ∈ {1, 2, . . . , 2|E|} × {1, 2, . . . , d }, we can find the location and value of the j-th nonzero entry in the i-th row of A by making O(1) uses of Pv and Pe . Furthermore, √ by the proof of Lemma 6, we know that |bi ∈ Range( A). We also have g := k|bik = 1/ 2cd, and we can prepare a state proportional to |bi by calling Pi once. Using these facts and Lemma 4, we know that there exists a gate-efficient quantum algorithm that estimates |h1, e| x i| up to additive error ǫ′ by making O dg2κ 3f   dgκ f · poly log ′ 2 ǫ′ (ǫ ) ! =O     c1.5 d1.5 cd · poly log 1.5 2 λǫ λ ǫ (81) uses of Pv , Pe and Pi . This concludes the proof. ✷. Theorem 3 also provides a method for estimating the voltage between two adjacent vertices s and t: e Here we consider A as a 2| E | × 2| E | matrix with | E | + |V | nonzero rows and | E | + |V | nonzero columns. 18 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks Corollary 1 Under the promise that s and t are adjacent vertices, the ENA-V problem can be solved by a gate-efficient algorithm that makes     1.5 1.5 cd c d · poly log O 1.5 2 λǫ λ ǫ uses of Pv , Pe and Pi . Proof. Let e = (s, t) ∈ E. By Ohm’s law, we have |v(s) − v(t)| = |i(e)|/we , where 1 ≤ we ≤ c. So in order to estimate |v(s) − v(t)| up to additive error ǫ, we only need to get an ǫ-additive approximation of |i(e)|. By Theorem 3, this can be achieved by a gate-efficient quantum algorithm that makes O((c1.5 d1.5 /(λ1.5 ǫ2 )) · poly(log(cd/(λǫ)))) uses of Pv , Pe and Pi . ✷. One can compare the algorithm in Corollary 1 with the one in Theorem 2 for solving ENA-V in the general case. The former has better dependence on d and 1/λ, but slightly worse dependence on c, than the latter. So they are incomparable. Finally, we solve the ENA-P and ENA-ER problems by utilizing the algorithm in Lemma 3: Theorem 4 The ENA-P problem can be solved by a gate-efficient quantum algorithm that makes     2 cd cd · poly log O λǫ λǫ uses of Pv , Pe and Pi . Proof. Let us use the same notation as in the proof of Theorem 3. Then we have k| x ik2 = WG−1/2 |ii = hi|WG−1 |ii = E (i). (82) Thus, in order to estimate E (i) up to multiplicative error O(ǫ), we only need to get an O(ǫ)multiplicative approximation of k| x ik (note that 1 − 2δ ≤ (1 − δ)2 ≤ (1 + δ)2 ≤ 1 + 3δ for all δ ∈ [0, 1]). By Lemma 3, this can be accomplished by a gate-efficient quantum algorithm that makes      !  2 dκ 2f dκ f cd cd (83) O · poly log · poly log =O ǫ ǫ λǫ λǫ uses of Pv , Pe and Pi . This concludes the proof. ✷. Corollary 2 The ENA-ER problem can be solved by a gate-efficient quantum algorithm that makes     2 cd cd · poly log O λǫ λǫ uses of Pv and Pe . T L+ χ Proof. Recall that Reff (s, t) = E (i), where i = WG BG G s,t is the electrical flow induced √ by the external current χs,t = |si − |ti. Clearly, we can prepare the state (|si − |ti)/ 2 in time poly(log( N )). Then, by Theorem 4, there is a gate-efficient algorithm that makes O((cd2 /(λǫ)) · poly(log(cd/(λǫ)))) uses of Pv √ and Pe , and outputs an O(ǫ)-multiplicative approximation of E√ (ĩ) = E (i)/2, where ĩ = i/ 2 is the electrical flow induced by the external current χs,t / 2. Then we multiply this result by a factor of 2, and obtain an O(ǫ)multiplicative approximation of E (i) = Reff (s, t). ✷. Guoming Wang 19 4 Analyzing Electrical Networks by Using Quantum Walks In this section, we present a set of quantum algorithms for analyzing electrical networks based on using quantum walks. In Section 4.1, we define several graph-related matrices, and show that they have some nice properties. In Section 4.2, we quantize one of the matrices to obtain a quantum walk. Then we analyze the spectral properties of this quantum walk, and give its efficient implementations. In Section 4.3, we describe how to utilize this quantum walk to solve the ENA-P and ENA-ER problems. 4.1 Modifying graphs and defining matrices Suppose G = (V, E, w) is an electrical network driven by an external current iext, where |V | = N, deg(G ) = d, λ2 ( L G ) ≥ λ > 0, 1 ≤ we ≤ c for all e ∈ E, iext ⊥ 1 and kiext k = 1. For any e ∈ E, let √ (84) | ϕ e i : = w e ( e− − e+ ). Then we have CG = BG WG1/2 = ∑ | ϕe ihe|. e∈ E (85) Now we modify the graph G as follows. We add a special hyperedge e0 among all the vertices in V, and set its weight to be λ. Let G ′ = (V, E′ , w) be the modified hypergraph, where E′ := E ∪ {e0 }, we is the same as before for all e ∈ E, and we0 = λ. Let √ √ (86) | ϕe0 i := − 2λ|iext i = − ∑ 2λiext (v)|vi. v ∈V Then we define CG ′ : = ∑ | ϕe ihe| = CG + | ϕe0 ihe0 |. e∈ E′ (87) g′ (v) := deg g (v) + λ. Then we Moreover, for any v ∈ V, let E′ (v) := E(v) ∪ {e0 }, and let deg define g′ (v)| vihv|. DG′ := ∑ deg (88) v ∈V We also define T , L G ′ : = CG ′ CG ′ (89) −1/2 −1/2 L G′ := DG LG′ DG . ′ ′ (90) and One can easily see that and Ker( L G′ )  Ker L G′ Range( L G′ )  Range L G′ = span{|1i}, n o 1 = span D1/2 , | i G′ = {|ψi : |ψi ⊥ |1i}, o n −1/2 = DG |ψi : |ψi ⊥ |1i , ′ where |1i = ∑v | vi. The following lemma establishes a relationship between λ2 ( L G ) and λ2 ( L G′ ): (91) (92) (93) (94) 20 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks Lemma 7 If λ2 ( L G ) ≥ λ > 0, then λ2 ( L G′ ) ≥ λ/3 > 0.  Proof. It is sufficient to show that, for any | ϕi ∈ Range L G′ , h ϕ| ϕi 6= 0, we have h ϕ| L G′ | ϕi ≥ λ · h ϕ | ϕ i. 3 (95)  −1/2 −1/2 Suppose | ϕi = DG |ψi ∈ Range L G |ψi for some |ψi ⊥ |1i, hψ|ψi 6= 0. Then, since DG ′ and λ2 ( L G ) ≥ λ, we get −1/2 D −1/2 |ψihψ| DG (96) . LG < λ G −1 |ψi hψ | D G This implies that |ψihψ| . −1 |ψi hψ| DG (97) ∑ ′ | ϕe ih ϕe | < ∑ | ϕe ih ϕe | = CG CGT = LG . (98) 1/2 D1/2 G L G DG < λ Meanwhile, note that T = L G ′ = CG ′ CG ′ e∈ E e∈ E This implies that −1/2 −1/2 −1/2 −1/2 −1/2 1/2 −1/2 L G′ = DG LG′ DG < DG LG DG = DG DG L G D1/2 . ′ ′ ′ ′ ′ G DG′ (99) Combining Eqs. (97) and (99), we get −1/2 1/2 −1/2 DG L G D1/2 | ϕi h ϕ| L G′ | ϕi ≥ h ϕ| DG ′ G DG′ = ≥ ≥ 1/2 −1 −1 1/2 hψ| DG ′ DG L G DG DG′ |ψi −1 −1 hψ| DG ′ | ψ ih ψ | D G ′ | ψ i λ −1 |ψi hψ| DG −1 hψ| DG ′ |ψi λh ϕ| ϕi . −1 hψ| DG |ψi (100) (101) (102) (103) Suppose |ψi = ∑v∈V αv |vi for some numbers αv ’s. Then −1 hψ| DG ′ |ψi −1 |ψi hψ| DG = g′ (v)−1 |α |2 v ∑ deg v ∈V g ( v ) −1 | α v |2 ∑ deg . v ∈V g (v) ≤ cd. Then, since λ ≤ λ2 ( L G ) ≤ 2, we have For any v ∈ V, we have 1 ≤ deg It follows that g (v) g (v) deg 1 deg 1 = ≥ ≥ . ′ g (v) g (v ) + λ 1+λ 3 deg deg −1 hψ | D G ′ |ψi −1 |ψi hψ | D G (104) ≥ min v ∈V g′ (v)−1 deg 1 ≥ . −1 g 3 deg(v) (105) (106) Guoming Wang 21 Plugging this into Eq. (103) yields h ϕ| L G′ | ϕi ≥ λ · h ϕ | ϕ i, 3 (107) as desired. ✷. Now let us consider Ker(CG′ ). We claim: Lemma 8 Ker(CG′ ) = { g(f) : f is a flow consistent with α · iext for some number α}, where 1 f( e) g(f) := √ h(f)|e0 i + ∑ √ |ei, we 2λ e∈ E (108) (109) in which h(f) = α if f is consistent with α · iext . Proof. Let |ψi = β|e0 i + ∑e∈ E β e |ei be arbitrary. Then CG ′ | ψ i = β | ϕ e 0 i + ∑ β e | ϕe i = 0 (110) e∈ E if and only if ∑ e∈ E− (v) √ we β e − ∑ e∈ E+(v) √ we β e = √ 2λβ · iext (v), ∀v ∈ V. This is equivalent √ to the condition that the flow f defined as f(e) = consistent with 2λβ · iext. ✷. Now let Π be the projection onto Ker(CG′ ). We claim: Lemma 9 1 i ( e) Π | e0 i ∝ | Φ i : = g ( i ) = √ | e0 i + ∑ √ | e i , we 2λ e∈ E √ (111) we β e for all e ∈ E is (112) T L+ i where i = WG BG G ext is the electrical flow induced by i ext . We will give two proofs of Lemma 9. The first one is algebraic and more rigorous, and the second one is geometric and more intuitive. Proof. [Proof 1 of Lemma 9] It is sufficient to show that for any |Ψi ∈ Ker(CG′ ), if |Ψi⊥|Φi, then |Ψi⊥| e0 i. We prove its contrapositive by contradiction. Suppose |Ψi ∈ Ker(CG′ ) satisfies |Ψi 6⊥ |e0 i. By Lemma 8, after appropriate rescaling of |Ψi, we can write it as f( e) 1 (113) | Ψ i = g ( f ) = √ | e0 i + ∑ √ | e i we 2λ e∈ E for some flow f consistent with iext . We claim that, if 1 i ( e) | Ψ i ⊥ | Φ i = g ( i ) = √ | e0 i + ∑ √ | e i , we 2λ e∈ E which means that − 1 f( e) i ( e) < 0, = 2λ e∑ we ∈E (114) (115) 22 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks then there exists a flow f′ 6= i consistent with iext such that E (f′ ) < E (i). But this is contradictory to Lemma 2 which states that i has the minimum power among such flows! Consequently, we must have |Ψi 6⊥ |Φi. Now we prove this claim. Let f′ = βf + (1 − β)i, where β ∈ (0, 1) is to be chosen later. Obviously, f′ is a flow consistent with iext for any choice of β. Let us consider the power of f′ . ( βf(e) + (1 − β)i(e))2 we e∈ E (116) = β2 (117) < β2 E ( f ) + ( 1 − β ) 2 E ( i ) . E ( f′ ) = Now let γ = ∑ f( e)2 i ( e)2 f( e) i ( e) + (1 − β )2 ∑ + 2β(1 − β) ∑ w w we e e e∈ E e∈ E e∈ E ∑ (118) 1 E ( f) and β = . Then we get E (i) 1+γ E (f′ ) < ( β2 γ + (1 − β)2 )E (i) = γ E ( i ) < E ( i ), 1+γ (119) as claimed. ✷. Proof. [Proof 2 of Lemma 9] Consider the geometric picture shown in Fig.1. L2 X L1 Y O Z Fig. 1. Geometric proof of Lemma 9. Here L1 and L2 are two hyperplanes in the space H = span{|e i : e ∈ E ′ }. They are defined as L1 = Ker( CG ′ ) and L2 = {|Ψi ∈ H : h e0 |Ψi = a}, where a = √ −→ −→ 1/ 2λ. Moreover, O is the origin of H, and X is the point in H such that OX = a|e0 i. Note that OX is perpendicular to L2 . The red line denotes the intersection of L1 and L2 , and the points on this line correspond to the flows consistent with iext . Let Y be an arbitrary point on the red line. Then we have −→ −→ −→ −→ OX ⊥ XY. Furthermore, let Z be the unique point on the line OY such that XZ ⊥ OY. Then we can show −→ that k XZk achieves the minimum value if and only if Y corresponds to the electrical flow consistent with iext , and in this case, Z is exactly the projection of X onto L1 . Guoming Wang 23 Let H := span{|ei : e ∈ E′ }. For any A ∈ H, we view A as both a vector and a point, and −→ for any A, B ∈ H, we define AB as the vector from the point A to the point B. Let O be the √ −→ origin of H, and let X be the point in H such that OX = a|e0 i, where a := 1/ 2λ. Then L1 := Ker(CG′ ) is a hyperplane in H. Moreover, let L2 := {|Ψi ∈ H : he0 |Ψi = a}. Then, for any |ψi ∈ L2 , we can write it as |Ψi = a|e0 i + |Ψ′ i for some vector |Ψ′ i⊥| e0 i. So L2 is a −→ hyperplane orthogonal to the vector OX and it also touches the point X. Now consider L3 := L1 ∩ L2 . One can see that ) ( f( e) (120) L3 = g(f) = a|e0 i + ∑ √ |ei : f is a flow consistent with iext . we e∈ E So the points in L3 correspond to the flows consistent with iext . −→ Let us pick arbitrary Y ∈ L3 . Then OY = g(f) for some flow f consistent with iext. Note −→ −→ −→ −→ 2 −→ −→ f(e) that XY = OY − OX = ∑e∈ E √w |ei and hence XY = E (f). Then, since OX ⊥ XY and e −→ −→ 2 OX = a, we get OY = a2 + E (f). Now let Z be the unique point in the line OY that is p −→ −→ −→ closest to X. Then we have XZ ⊥ OY, and hence XZ = a E (f)/( a2 + E (f)). Note that −→ XZ achieves the minimum value if and only if E (f) achieves the minimum value. By Lemma 2, the electrical flow i has the minimum power among all the flows consistent with −→ iext. So XZ achieves the minimum value if and only if Y corresponds to the electrical flow −→ i, i.e. OY = g(i). Then the corresponding Z is the point closest to X in L1 . In other words, −→ −→ this Z is exactly the projection of X onto L1 . So we have Π|e0 i = OZ ∝ OY = g(i), as claimed. ✷. 4.2 Defining quantum walks Now we define a quantum walk [38, 39] related to the matrix CG′ , analyze its spectral properties, and give its efficient implementations. This quantum walk will become a key component of the algorithms in the next subsection. It can be viewed as a generalization of those used for evaluating span programs [42, 43, 25]. Let us define two operators A and B as follows: A := ∑ |ψv i|vihv|, (121) ∑ |ei|φe ihe|, (122) v ∈V B := e∈ E′ where | ψv i : = = q 1 ∑ √ we |ei g′ (v) e∈ E′ ( v) deg   √ √ 1  λ | e0 i + ∑ q w e | e i , g (v ) + λ e∈ E(v) deg (123) ∀v ∈ V, (124) 24 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks and  1 √ e+ − e− , ∀e ∈ E, 2 |φe0 i := |iext i = ∑ iext (v)|vi. | φe i : = (125) (126) v ∈V Note that the |ψv i’s and |φe i’s are all unit vectors (recall that kiext k = 1). So A and B are both isometries, and AA† = Π ( A ), (127) † = Π ( B ). (128) BB Furthermore, by a direct computation, one can check that 1 −1/2 D ( A, B) := A† B = − √ DG CG ′ . ′ 2 (129) This implies that Ker( D ( A, B)) = Ker(CG′ ), which is characterized by Lemma 8. Now we define a unitary operator U ( A, B) as follows: U ( A, B) := Ref( B) · Ref( A). (130) We can find the eigenvalues and eigenvectors of U ( A, B) by using Szegedy’s spectral lemma: Lemma 10 (Spectral Lemma, [39]) Let H be a Hilbert space, and let A, B be two operators such that AA† = Π( A) and BB† = Π( B) are both projections onto subspaces of H. Let D ( A, B) := A† B and let U ( A, B) := Ref( B) · Ref( A). Then all the singular values of D ( A, B) are at most 1. Let {cos θ j : 1 ≤ j ≤ k} be the singular values of D ( A, B) that lie in the open interval (0, 1) (counted with multiplicity), and let { w j , u j : 1 ≤ j ≤ k} be the associated left and right singular vectors. Then those eigenvalues of U ( A, B) that have nonzero imaginary part are exactly {e−2iθ j , e2iθ j : 1 ≤ j ≤ k}. (131) The (unnormalized) eigenvectors associated with these eigenvalues are { A w j − e−iθ j B u j , A w j − eiθ j B u j : 1 ≤ j ≤ k}. (132) Furthermore,   1. The +1 eigenspace of U ( A, B) is (Range( A) ∩ Range( B)) ⊕ Range( A)⊥ ∩ Range( B)⊥ .     2. The −1 eigenspace of U ( A, B) is Range( A) ∩ Range( B)⊥ ⊕ Range( A)⊥ ∩ Range( B) . In addition, Range( A)⊥ ∩ Range( B) = { B|ui : |ui ∈ Ker( D ( A, B))}. The above is a complete description of the eigenvalues and eigenvectors of operator U ( A, B) acting on H. Guoming Wang 25 We are interested in the −1 eigenspace of U ( A, B). Let H ′ be this subspace, and let be the projection onto this subspace. By Lemma 10, H ′ is the direct sum of H ′′ := { B|ui : |ui ∈ Ker( D ( A, B))} and another subspace which is orthogonal to Range( B). Then, since B is an isometry, Lemma 9 implies that Π′ Π′ B|e0 i ∝ B|Φi = aB|e0 i + BWG−1/2 |ii = a|φe0 i|e0 i + i ( e) ∑ √we |φe i|ei, (133) e∈ E √ where a := 1/ 2λ. This fact will be useful in the next subsection. The following lemma gives a lower bound on the eigenphase gap around π of U ( A, B): √ Lemma 11 The eigenphase gap around π of U ( A, B) is at least 2λ/3. Proof. Since λ2 ( L G ) ≥ λ > 0, by Lemma 7, we have λ2 ( L G′ ) ≥ λ/3 > 0. Then, by D ( A, B) D ( A, B)† = 1 −1/2 T D −1/2 = 1 L ′ , D ′ CG ′ CG ′ G′ 2 G 2 G (134) √ we get s2 ( D ( A, B)) ≥ λ/6. Meanwhile, by Lemma 10, the singular value s j ∈ (0, 1) of D ( A, B) is mapped to the eigenvalues e±2i arccoss j of U ( A, B). Let θ j = π/2 − arccos s j . Then we have r λ (135) θ j ≥ sin θ j = s j ≥ . 6 √ √ Therefore, the eigenphase gap around π of U ( A, B) is at least 2 λ/6 = 2λ/3, as claimed. ✷. The following lemmas give upper bounds on the cost of implementing U ( A, B) perfectly or approximately: Lemma 12 U ( A, B) can be implemented by a gate-efficient procedure that makes O(d) uses of Pv , Pe and Pi . Proof. Since U ( A, B) = Ref( B) · Ref( A), we only need to show that both Ref( A) and Ref( B) can be implemented by gate-efficient procedures that make O(d) uses of Pv , Pe and Pi .. To implement Ref( A), we use the following method. Let Q1 be a unitary operation that maps |0n i|vi to | ψv i|vi for all v ∈ V, and let R1 be the reflection about span{|0n i|vi : v ∈ V }, where n = Θ(log( N )). Then (136) Ref( A) = Q1 R1 Q1† . Clearly, R1 can be implemented in time poly(log( N )). We implement Q1 using the following procedure. Given the state |0n i|vi for any v ∈ V, we first map it to |0n i|vi N |ei|we i e∈ E(v) ! (137) by using O(d) queries to Pv and Pe (recall that | E(v)| ≤ d). Then we transform this state into |ψv i|vi N ! |ei|we i , e∈ E(v) (138) 26 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks where | ψv i = q 1 g (v ) + λ deg  √  λ | e0 i + ∑ e∈ E(v) √  w e | ei . (139) Since |ψv i is a (d + 1)-sparse vector in a poly( N )-dimensional space, this step can be accomplished by using O(d · poly(log( N ))) 2-qubit gates, as implied by Ref. [48]. Finally, we N uncompute e∈ E( v)|ei|we i by using O(d) queries to Pv and Pe . This implementation of Q1 requires O(d) uses of Pv and Pe , and is gate-efficient. As a result, Ref( A) can be implemented by a gate-efficient procedure that makes O(d) uses of Pv and Pe . The implementation of Ref( B) is similar. Let Q2 be a unitary operation that maps |ei|0m i to |ei|φe i for all e ∈ E′ , and let R2 be the reflection about span{|ei|0m i : e ∈ E′ }, where m = Θ(log( N )). Then we have (140) Ref( B) = Q2 R2 Q2† . Clearly, R2 can be implemented in time poly(log( N )). We implement Q2 using the following procedure. Given the state |ei|0m i for any e ∈ E′ , if e = e0 , then we transform |0m i into |φe0 i = |iext i by calling Pi once; otherwise, we first map this state to |ei|0m i(|e+ i|e− i|we i) (141) by using O(1) queries to Pe , then transform it into |ei|φe i(|e+ i|e− i|we i), (142) √ where | φe i = (|e+ i − |e− i)/ 2, by using poly(log( N )) 2-qubit gates, and finally uncompute |e+ i|e− i|we i by using O(1) queries to Pe . This implementation of Q2 requires O(1) uses of Pe and Pi , and is gate-efficient. As a consequence, Ref( B) can be implemented by a gateefficient procedure that makes O(1) uses of Pe and Pi . ✷. Lemma 13 U ( A, B) can be implemented with precision δ > 0 by a gate-efficient procedure that makes r    c d O · poly log λ δ uses of Pv , Pe and Pi . Proof. Let us use the same notation as in the proof of Lemma 12. Recall that R1 , R2 and Q2 can be all implemented by gate-efficient procedures that make O(1) uses of Pv , Pe and Pi . So we only need to show √ that Q1 can be implemented with precision δ > 0 by a gate-efficient procedure that makes O( c/λ · poly(log(d/δ))) uses of Pv and Pe . Recall that Q1 is the unitary operation mapping |0n i|vi to |ψv i|vi for all v ∈ V, where n = Θ(log( N )) and √ 1 w e | ei. | ψv i = q ∑ (143) g′ (v) e∈ E′ ( v) deg Given the state |0n i|vi for any v ∈ V, we first map it to |0n i|vi|dv i, (144) Guoming Wang 27 where dv := | E(v)| = deg(v), by using O(log(d)) queries to Pv and poly(log( N )) 2-qubit gates (via binary search). Then, we transform it into ! dv 1 √ (145) ∑ | ji |vi|dv i d v + 1 j =0 by using poly(log( N )) 2-qubit gates. Next, we convert this state into      1 √ 1 ∑ |ei|vi|dv i =  √d + 1 |e0 i + ∑ |ei|vi|dv i dv + 1 e∈ E′(v) v e∈ E(v) (146) by using O(1) queries to Pv and poly(log( N )) 2-qubit gates. Then, we transform this state into      1 1 √ ∑ |ei|we i|vi|dv i =  √d + 1 |e0 i|λi + ∑ |ei|we i|vi|dv i (147) dv + 1 e∈ E′(v) v e∈ E(v) by using O(1) queries to Pe and poly(log( N )) 2-qubit gates. After that, we append an ancilla qubit in state |0i, and perform the following controlled-rotation: r  r we we (148) |0 i + 1 − |1 i . |we i|0i → |we i 2c 2c This is a valid unitary operation, because we ≤ 2c for all e ∈ E′ (v) (note that we0 = λ ≤ 2 ≤ 2c). Then, we measure the ancilla qubit, and conditioning on the outcome being 0, we obtain the state   √ e w w i | i| ′ ∑e∈ E (v) e e |vi|dv i.  (149) √ ∑e∈ E′ ( v) we |ei|we i The probability of this event happening is Ω(λ/c), since we ≥ λ/2 for all e ∈ E′ (v) (note that we ≥ 1 ≥ λ/2 for all e ∈ E). Next, we uncompute |dv i by using O(log(d)) queries to Pv and poly(log( N )) 2-qubit gates. Finally, we uncompute |we i by using O(1) queries to Pe and poly(log( N )) 2-qubit gates, and obtain the desired state |ψv i|vi. The above procedure, denoted by A, makes O(log(d)) uses of Pv and Pe , is gate-efficient, and has Ω(λ/c) success probability. We can raise the success to Ω(1) by using √ probability  the standard amplitude amplification, which requires O c/λ repetitions of A. Let A′ be this modified procedure with Ω(1) success probability. Then we can further boost the success probability to 1 − O(δ′ ) by using Grover’s π/3 amplitude amplification (i.e. the ′ generalization of fixed-point  quantum′′search) [49], which requires O(log  (1/δ )) repetitions ′ ′ 2 2 of A . Let us pick δ √ = Θ δ , and let A bethis procedure with 1 − O δ success probability. ′′ Then A makes O c/λ · poly(log(d/δ)) uses of Pv and Pe , is gate-efficient, and satisfies √ (150) A′′ 0t |0n i|vi = 1 − δv 0t |ψv i|vi + Φ⊥ v ,  ⊥ ⊥ where t is a positive integer, δv = O δ2 , Φ⊥ v is an unnormalized state satisfying Φv | Φv = t t ⊥ δv and ( 0 ih0 ⊗ I ) Φv = 0, for all v ∈ V. This implies that  √ 2 (151) A′′ 0t |0n i|vi − 0t |ψv i|vi = (1 − 1 − δv )2 + δv = O δ2 . Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks 28 Meanwhile, since A′′ is a unitary operation, we have A′′ 0t |0n i|ui ⊥ A′′ 0t |0n i|vi for any ⊥ u 6= v. Then by Eq. (150), we know that 0t |ψu i|ui, 0t |ψv i|vi, Φ⊥ u and Φv are mutually orthogonal for any u 6= v. As a result, for any normalized state |zi = ∑v∈V zv | vi, we have ′′ t 2 n t n A 0 |0 i|zi − 0 ( Q1 |0 i|zi) ∑ zv = v ∈V ∑ | z v |2 = v ∈V   = O δ2 . This means that t n t A 0 |0 i|vi − 0 |ψv i|vi  A′′ 0t |0n i|vi − 0t |ψv i|vi 0t A′′ 0t − Q1 = O(δ), as desired. ✷. 4.3 ′′ 2 (152) 2 (153) (154) (155) Using quantum walks to analyze electrical networks Now we describe our quantum-walk-based algorithms for solving the ENA-P and ENA-ER problems. These algorithms require the following variant of phase estimation [50, 51], which determines whether the eigenphase corresponding to an eigenvector of a unitary operation is θ or far away from θ, for some given θ ∈ [0, 2π ), succeeding with probability close to 1. (Similar procedures have been used in e.g. Refs. [52, 35].) Lemma 14 Let U be a unitary operation with eigenvectors ψj satisfying U ψj = eiθ j ψj for some θ j ∈ [0, 2π ). Let θ ∈ [0, 2π ) and let ∆, δ ∈ (0, 1). Then there is a unitary procedure P that requires O((1/∆) · log(1/δ)) uses of U and poly(log(1/(∆δ))) additional 2-qubit gates, and satisfies E  (156) P |0i 0l ψj = α j,0 |0i η j,0 + α j,1 |1i η j,1 ψj , where l = O(log(1/∆) log(1/δ)), α j,0 and • If θ j = θ, then α j,0 2 2 + α j,1 2 = 1, η j,0 and η j,1 are two normalized states, ≥ 1 − δ. • If θ j − θ ≥ ∆, then α j,1 2 ≥ 1 − δ. Proof. We can get a ∆/2-additive approximation of θ j by using the standard phase estimation, which requires O(1/∆) uses of U and poly(log(1/∆)) additional 2-qubit gates. This is sufficient to distinguish between the two cases. However, it only succeeds with Ω(1) probability. To overcome this issue, we repeat this procedure O(log(1/δ)) times and check whether the median of the estimates is ∆/2-close to θ. By a standard Chernoff bound, we can ensure that the failure proability is at most δ. Let P be this boosted procedure. Then P requires O((1/∆) · log(1/δ)) uses of U and poly(log(1/(∆δ))) additional 2-qubit gates, and satisfies the desired properties. ✷. Theorem 5 The ENA-P problem can be solved by a gate-efficient quantum algorithm that makes       0.5 1.5 cd0.5 cd c d , · poly log O min 1.5 ǫλ ǫλ ǫλ uses of Pv , Pe and Pi . Guoming Wang 29 Proof. Algorithm: We estimate E (i) up to multiplicative error O(ǫ) by using the following algorithm: √ • Let P be the unitary procedure in Lemma 14 for U = U ( A, B), θ = π, ∆ = λ/3 and δ = O(ǫλ/(cd)). Suppose E P |0i1 0l ( B|e0 i)3 = µ0 |0i1 | ϕ0 i2,3 + µ1 |1i1 | ϕ1 i2,3 (157) 2 where l = O(log(1/∆) log(1/δ)), |µ0 |2 + |µ1 |2 = 1, | ϕ0 i and | ϕ1 i are two normalized states. We use amplitude estimation to get an O(ǫ)-multiplicative approximation r̂ of r := |µ1 |2 (succeeding with probability at least 3/4). Then we return r̂ 1 · 1 − r̂ 2λ Ê := (158) as our estimate of E (i). During this process, the unitary operation U ( A, B) is implemented either by the procedure in Lemma 12, or by the procedure in Lemma 13 with  precision O ǫ2 λ2 /(cd) . Correctness: Recall that H ′ is the −1 eigenspace of U ( A, B), and Π′ is the projection onto this subspace. We have shown in the previous subsection that Π′ B|e0 i ∝ B|Φi = aB|e0 i + BW −1/2 |ii, (159) √ where a = 1/ 2λ. Since B is an isometry, we have BW −1/2 |ii 2 = W −1/2 |ii 2 T = E (i) = iext L+ G i ext . (160) g (v) ≤ cd for all v ∈ V, by Eq. (12) and Lemma 1, Meanwhile, since λ2 ( L G ) ≥ λ and 1 ≤ deg we get λ ≤ λ2 ( L G ) ≤ λ3 ( L G ) ≤ · · · ≤ λ N ( L G ) ≤ 2cd. (161) Then, since iext ∈ Range( L G ) and k iext k = 1, we obtain 1 1 T 2 ≤ E (i) = iext L+ G i ext ≤ λ = 2a . 2cd (162) Now let |Ψi := and let  aB|e0 i + BW −1/2 |ii B |Φi p = ∈ H′ , k B|Φik a2 + E ( i ) (163) ′ ⊥ Ψ⊥ k : 1 ≤ k ≤ K be an orthonormal basis for (H ) . Then Eq. (159) implies K B | e0 i = β | Ψ i + ∑ βk k =1 E Ψ⊥ k , (164) 30 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks for some numbers β, β 1 , β 2 , . . . , β K . Since B is an isometry, we have β = h Ψ | B | e0 i = p Let r1 : = 1 − | β | 2 = + E (i) K . (165) E (i) ∑ | β k | 2 = a2 + E ( i ) . (166) k =1 Then we have E (i) = In addition, by Eqs. (162) and (166), we get a a2 r1 · a2 . 1 − r1 (167) 1 2 ≤ r1 ≤ , κ+1 3 (168) where κ := cd/λ. √ Now, since ∆ = λ/3 is smaller than the eigenphase gap around π of U ( A, B) by Lemma 11, P satisfies E P |0i 0l |Ψi = (α0 |0i|η0 i + α1 |1i|η1 i)| Ψi, (169) where |α0 |2 ≥ 1 − δ, |α1 |2 ≤ δ, |η0 i and |η1 i are normalized states, and E  ⊥ P |0 i 0 l Ψ ⊥ Ψk , k = α k,0 |0i ηk,0 + α k,1 | 1i ηk,1 where αk,1 we get 2 ≥ 1 − δ, αk,0 l 2 (170) ≤ δ, ηk,0 and ηk,1 are normalized states, for all k. As a result, E K P |0i 0 ( B|e0 i) = |0i α0 β|η0 i|Ψi + ∑ αk,0 β k ηk,0 Ψ⊥ k ηk,1 Ψ⊥ k k =1 K + |1i α1 β|η1 i|Ψi + ∑ αk,1 β k k =1 E E ! ! (171) . (172) This implies that r = | α1 β |2 + Note that K r1 − ∑ αk,1 β k 2 K = ∑ (1 − k =1 k =1 K ∑ 2 αk,1 β k . (173) k =1 2 αk,1 )| β k |2 ≤ δr1 = O(ǫr1 ), (174) and |α1 β|2 ≤ |α1 |2 ≤ δ = O(ǫr1 ), (175) since r1 = Ω(1/κ ) = Ω(λ/(cd)) by Eq. (168). It follows that K | r − r1 | ≤ r1 − ∑ k =1 αk,1 β k 2 + |α1 β|2 = O(ǫr1 ). (176) Guoming Wang 31 Namely, r is an O(ǫ)-multiplicative approximation of r1 . Meanwhile, r̂ is an O(ǫ)-multiplicative approximation of r. Combining these two facts, we know that |r̂ − r1 | ≤ |r̂ − r | + |r − r1 | = O(ǫr ) + O(ǫr1 ) = O(ǫr1 ), (177) |(1 − r̂ ) − (1 − r1 )| = |r̂ − r1 | = O(ǫr1 ) = O(ǫ(1 − r1 )), (178) and since r1 ≤ 2/3 by Eq. (168). This implies that (1 − O(ǫ)) · and hence r1 r̂ r1 ≤ , ≤ (1 + O(ǫ)) · 1 − r1 1 − r̂ 1 − r1   r1 r1 r̂ . =O ǫ· − 1 − r̂ 1 − r1 1 − r1 As a consequence, by Eqs. (158) and (167), we get   r̂ r1 r1 2 2 2 Ê − E (i ) = ·a =O ǫ· · a = O(ǫ · E (i)), ·a − 1 − r̂ 1 − r1 1 − r1 (179) (180) (181) as desired. In the above argument, we have assumed that the unitary operation U ( A, B) is implemented perfectly. This is true if we use the procedure in Lemma 12 to implement U ( A, B). If  we instead use the procedure in Lemma 13 to implement U ( A, B) with precision O λ2 ǫ2 /(cd) , then the algorithm still outputs a correct Ê with high probability.  The reason is as follows. We will show below that this algorithm only makes o cd/(λ2 ǫ2 ) uses of U ( A, B). Provided that each U ( A, B) is implemented with precision O λ2 ǫ2 /(cd) , the error in the final state (compared to the ideal case) is only o (1). Therefore, the probability that this algorithm outputs a correct r̂ (and hence a correct Ê) is at least 3/4 − o (1). Complexity: The state B|e0 i = |e0 i|iext i can be prepared by making O(1) uses of Pi . Since r = Θ(r1 ) = Ω(1/κ ) and we want to estimate it up to multiplicative error O(ǫ), amplitude estimation requires  √   κ 1 (182) =O O √ ǫ ǫ r repetitions of P . By Lemma 14, the procedure P can be implemented with O((1/∆) · log(1/δ)) uses of U ( A, B) and poly(log(1/(∆δ))) additional 2-qubit gates. So this algorithm makes O √    ! 1 cd κ 1 cd =O · · log · log ǫ ∆ δ ǫλ ǫλ √ (183) uses of U ( A, B). If we use the procedure in Lemma 12 to implement U ( A, B), the resulting algorithm will require     0.5 1.5 cd c d · poly log O ǫλ ǫλ 32 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks uses of Pv , Pe , Pi , and is gate-efficient. Alternatively, if we use the procedure in Lemma 13 to implement U ( A, B) with precision O(λ2 ǫ2 /(cd)), the resulting algorithm will require O     cd cd0.5 · poly log ǫλ ǫλ1.5 uses of Pv , Pe , Pi , and is also gate-efficient. Our claim follows from the combination of these two facts. ✷. Corollary 3 The ENA-ER problem can be solved by a gate-efficient quantum algorithm that makes   c0.5 d1.5 cd0.5 , O min ǫλ ǫλ1.5    cd · poly log ǫλ  uses of Pv and Pe . T L+ χ is the electrical flow induced by Proof. Recall that Reff (s, t) = E (i), where i = WG BG G s,t √ the external current χs,t = |si − |ti. Clearly, we can prepare the state (|si − |ti)/ 2 in time poly(log( N )). Then we can run the algorithm in√Theorem 5 to obtain an O(ǫ)-multiplicative approximation of E√ (ĩ) = E (i)/2, where ĩ = i/ 2 is the electrical flow induced by the external current χs,t / 2. Then we multiply this result by a factor of 2, and obtain an O(ǫ)multiplicative approximation of E (i) = Reff (s, t). By Theorem 5, this algorithm makes       0.5 1.5 cd c d cd0.5 · poly log O min , ǫλ ǫλ ǫλ1.5 uses of Pv and Pe , and is gate-efficient. ✷. One can compare the algorithm in Theorem 5 (or Corollary 3) with the one in Theorem 4 (or Corollary 2). The quantum-walk-based one is unconditionally better if we use the procedure in Lemma 12 to implement U ( A, B). If we instead use the procedure in Lemma 13 to implement U ( A, B), then the quantum-walk-based one has much better dependence on d, but slightly worse dependence on 1/λ. So it is more suitable in the case where d is larger than 1/λ (which is possible and common). We remark that the algorithm in Theorem 5 can be modified to solve the ENA-C problem (and the ENA-V problem under the promise that s and t are adjacent vertices). Specifically, recall that ! B |Φi i ( e) 1 (184) aB|e0 i + ∑ √ B|ei . =p |Ψi = we k B|Φik a2 + E (i ) e∈ E If we can create this state, then we can infer |i(e)| from it, for any given e ∈ E. To prepare the state |Ψi, we need to use a clean version of the procedure E P in Lemma 14. That is, we need to replace the states η j,0 and η j,1 in Lemma 14 with 0l (namely, we want to reset the l ancilla qubits to their initial states after the computation). This can be approximately achieved by using the standard “do-copy-undo” trick. Then, when we apply this clean version of P on |0i 0t B|e0 i (for some positive integer t) and measure the first qubit, conditioning on the outcome being 0, we would obtain a state close to |Ψi, from which |i(e)| can be learned. However, this algorithm for solving ENA-C is not more efficient than the one in Theorem 3. So we will not present it in detail here. Guoming Wang 33 5 Lower Bounds on the Complexity of Electrical Network Analysis So far we have presented two classes of quantum algorithms for analyzing electrical networks. All of these algorithms have complexities polynomial in 1/λ (and other parameters), where λ is the spectral gap of the normalized Laplacian of the network. In this section, we show that this polynomial dependence on 1/λ is necessary. Specifically, we prove that inorder to solve any of the ENA-V, ENA-C, ENA-P, ENA-ER problems, one has to make √  Ω 1/ λ queries to the graph. This lower bound implies that our algorithms are optimal up to polynomial factors f and hence cannot be greatly improved. Theorem 6 For any positive integer N, there exists an unweighted connected graph G = (V, E) with four distinguished vertices s, t, u, v ∈ V such that |V | = 10N, deg(G ) = 3, (u, v) ∈ E, λ2 ( L G ) = Ω 1/N 2 , λ2 ( L G ) = O(1/N ), and assuming a unit electric current is injected at s and extracted at t, one needs to make Ω( N ) queries to G to solve any of the following problems (succeeding with probability at least 2/3): 1. Estimate the voltage between u and v up to additive error 0.1. 2. Estimate the current on (u, v) up to additive error 0.1. 3. Estimate the power dissipated by G up to multiplicative error 0.1. 4. Estimate the effective resistance between s and t up to multiplicative error 0.1. Proof. We will build a graph such that, if one solves any of the above problems on this graph, then one has solved a corresponding PARITY problem. Recall that in the PARITY problem, one is given oracle access to an N-bit string x = x1 x2 . . . x N , and needs to determine the value of PARITY( x ) := x1 ⊕ x2 ⊕ . . . ⊕ x N . Our claims will follow from a known lower bound on the quantum query complexity of PARITY. Now let us make this argument precise. Given an N-bit string x = x1 x2 . . . x N , we will map it to an unweighted graph G ( x ) = (V ( x ), E( x )) with 10N vertices. For convenience, we will label the vertices in this graph by (i, j) or (i ∗ , j) for some integers i and j. We start with 10N isolated vertices, which are labeled by (i, a) for i ∈ {1, 2, . . . , N + 1} and a ∈ {0, 1}, and ( j∗ , b) for j ∈ {1, 2, . . . , 4N − 1} and b ∈ {0, 1}. Then we add the following edges to this graph: • For i ∈ {1, 2, . . . , N } and a ∈ {0, 1}, we add an edge between (i, a) and (i + 1, a ⊕ xi ). That is, if xi = 0, we add an edge between (i, 0) and (i + 1, 0), and an edge between (i, 1) and (i + 1, 1); otherwise, we add an edge between (i, 0) and (i + 1, 1), and an edge between (i, 1) and (i + 1, 0)). • For j ∈ {1, 2, . . . , 4N − 2} and b ∈ {0, 1}, we add an edge between ( j∗ , b) and (( j + 1)∗ , b). • For b ∈ {0, 1}, we add an edge between (1, 0) and (1∗ , b). • For b ∈ {0, 1}, we add an edge between ((4N − 1)∗ , b) and ( N + 1, b). f The polynomial dependence on the other parameters, including c, d, log( N ) and 1/ǫ, is clearly necessary. 34 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks For example, Fig.2 shows the graph G ( x ) for the string x = 11010 (where N = 5). Note that G ( x ) consists of N crossing-type or parallel-type gadgets (where the i-th gadget’s type depends the value of x i ) and two long paths, one connecting (1, 0) and ( N + 1, 0) and the other connecting (1, 0) and ( N + 1, 1). (Similar constructions have been used to prove lower bounds on the quantum query complexity of Hamiltonian simulation [4, 53].) (1 ∗ , 0 ) (2 ∗ , 0 ) (3 ∗ , 0 ) (1, 0) (2, 0) (1, 1) (2 ∗ , 1 ) (3 ∗ , 1 ) (16∗ , 0) (3, 0) (2, 1) x1 = 1 (1 ∗ , 1 ) (4 ∗ , 0 ) (4, 0) (3, 1) x2 = 1 (4 ∗ , 1 ) (5, 0) (4, 1) x3 = 0 (17∗ , 0) (19∗ , 0) (6, 0) (5, 1) (6, 1) x5 = 0 x4 = 1 (16∗ , 1) (18∗ , 0) (17∗ , 1) (18∗ , 1) (19∗ , 1) Fig. 2. The graph G ( x ) for the string x = 11010. Now we pick s = (1, 0), t = ( N + 1, 0), u = ((2N − 1)∗ , 0) and v = ((2N )∗, 0). Then the graph G ( x ) satisfies the following property: • If PARITY( x ) = 0, then there are two paths between s and t in G ( x ). One of them is s = (1, 0) → (2, x1 ) → (3, x1 ⊕ x2 ) → · · · → ( N + 1, ⊕iN=1 xi ) = ( N + 1, 0) = t, (185) and the other is s = (1, 0) → (1∗ , 0) → (2∗ , 0) → · · · → ((4N − 1)∗ , 0) → ( N + 1, 0) = t. (186) • If PARITY( x ) = 1, then there is only one path between s and t in G ( x ), which is described by Eq. (186). This implies that when a unit electric current is injected at s and extracted at t, we have: • If PARITY( x ) = 0, then there is an electrical flow of value 0.8 on the path described by Eq. (185), a flow of value 0.2 on the path described by Eq. (186), and no flow on other edges. Thus, the current on (u, v) is 0.2, and so is the voltage between u and v. Moreover, the power dissipated by G ( x ) is 0.82 × N + 0.22 × 4N = 0.8N, and so is the effective resistance between s and t. • If PARITY( x ) = 1, then there is an electrical flow of value 1 on the path described by Eq. (186), and no flow on other edges. Thus, the current on (u, v) is 1, and so is the voltage between u and v. Moreover, the power dissipated by G ( x ) is 4N, and so is the effective resistance between s and t. Guoming Wang 35 It follows that we can distinguish these two cases by solving any of the following problems: 1. Estimate the voltage between u and v up to additive error 0.1. 2. Estimate the current on (u, v) up to additive error 0.1. 3. Estimate the power dissipated by G up to multiplicative error 0.1. 4. Estimate the effective resistance between s and t up to multiplicative error 0.1. It is known that PARITY has Θ( N ) bounded-error quantum query complexity [54, 55]. This implies that one needs to make Ω( N ) queries to G ( x ) to solve any of the above problems. Finally, we show that G ( x ) satisfies the other desired properties. Clearly, G ( x ) is a connected graph with maximum degree 3. Moreover, it has conductance φG( x ) = Θ(1/N ). To see this, consider the cut (S, S̄), where S = {(i, a) : i ∈ {1, 2, . . . , ⌊ N/2⌋}, a ∈ {0, 1}} ∪ {( j∗ , b) : j ∈ {1, 2, . . . , 2N }, b ∈ {0, 1}} and S̄ = V \ S. We have vol(S), vol(S̄) = Θ( N ) and | E(S, S̄)| = O(1). So φS = O(1/N ), which implies φG( x ) = O(1/N ). On the other hand, since G ( x ) is a connected graph with O( N ) edges, for any cut (S, S̄), we have vol(S), vol(S̄) = O( N ), | E(S, S̄)| = Ω(1), and hence φS = Ω(1/N ). This implies φG( x ) = Ω(1/N ). Combining these two facts, we obtain φG( x ) = Θ(1/N ). Then by Cheeger’s inequality (i.e. Eq. (19)), we have  λ2 ( L G( x ) ) = Ω 1/N 2 and λ2 ( L G( x )) = O(1/N ). This concludes the proof. ✷. 6 Discussion To summarize, we have proposed two classes of quantum algorithms for analyzing large sparse electrical networks. The first class is based on solving linear systems, and the second class is based on using quantum walks. These algorithms compute various electrical quantities, including voltages, currents, dissipated powers and effective resistances, in time poly(d, c, log( N ), 1/λ, 1/ǫ), where N is the number of vertices in the graph, d is the maximum unweighted degree of the vertices, c is the ratio of largest to smallest edge resistance, λ is the spectral gap of the normalized Laplacian of the graph, and ǫ is the accuracy. Furthermore, we prove that the polynomial dependence on 1/λ is necessary. Hence, our algorithms are optimal up to polynomial factors and cannot be significantly improved. We have seen that a Laplacian system Lx = b naturally arises when one wants to compute the voltages in an electrical network. Such systems also play an important role in other graph problems, such as graph partitioning (e.g. [56, 57, 58, 15]), graph sparsification (e.g. [11, 12, 14]) and maximum flows (e.g. [13, 16, 17]). As a result, much effort has been dedicated to studying the classical complexity of solving these systems (e.g. [33, 34]). It appears that Laplacian systems are easier to solve than general linear systems classically. In contrast, we do not know whether the quantum analogue of this statement is true. In particular, Harrow, Hassidim and Lloyd [36] showed that it is BQP-complete to solve a general sparse well-conditioned linear system Ax = b (in certain sense). Does this theorem still hold under the restriction that A is a Laplacian? If so, there would be an interesting implication: Any problem in BQP can be reduced to the problem of computing certain voltages in an exponentially-large electrical network! This can be even viewed as a novel (but impractical) proposal for building a quantum computer! On the other hand, if Laplacian systems are 36 Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks indeed easier to solve than general linear systems quantumly, then what is the exact quantum complexity of solving them? In particular, can they be solved in time sublinear in the Laplacian’s finite condition number? These are left as interesting open questions. In this paper, we have focused on direct-current (DC) circuits which consist of resistors and DC sources. It is also worth exploring alternating-current (AC) circuits which consist of resistors, capacitors, inductors and AC sources. Such electrical systems are governed by a set of second-order linear ordinary differential equations. But it is possible to transform these differential equations into a system of linear equations by applying the Fourier or Laplace transform. The resulting linear system can be viewed as a complex Laplacian system, and it can be solved by invoking a quantum linear system algorithm. However, the complexity of this algorithm is difficult to analyze, because it depends on the condition number of a complex Laplacian, and there are few known methods to bound this quantity (to our knowledge, there is no analogue of Cheeger’s inequality for complex Laplacians). So it is unclear how much quantum advantage can be gained on such systems. Spectral graph theory has become a powerful tool for the design and analysis of fast classical algorithms for various graph problems, such as graph partitioning (e.g. [56, 57, 58, 15]), maximum flows (e.g. [13, 16, 17]) and max cuts (e.g. [59]). Its application in quantum computation, nevertheless, is still scarce. It would be exciting to see more quantum algorithms (especially exponentially faster ones) developed based on this elegant theory. Acknowledgments The author thanks Andrew Childs, David Gosset, Zeph Landau, Aaron Ostrander, Mario Szegedy and Umesh Vazirani for useful discussions and comments. The author is also grateful to Robin Kothari for suggesting the construction in the proof of Theorem 6. Part of this work was done while the author was a graduate student at Computer Science Division, University of California, Berkeley. This research was supported by NSF Grant CCR-0905626 and ARO Grant W911NF- 09-1-0440. References 1. Seth Lloyd. Universal quantum simulators. Science, 273(5278):1073–1078, 1996. 2. Daniel S. Abrams and Seth Lloyd. Simulation of many-body fermi systems on a universal quantum computer. Phys. Rev. Lett., 79:2586–2589, Sep 1997. 3. Dorit Aharonov and Amnon Ta-Shma. Adiabatic quantum state generation and statistical zero knowledge. In Proceedings of the Thirty-fifth Annual ACM Symposium on Theory of Computing, STOC ’03, pages 20–29, New York, NY, USA, 2003. ACM. 4. Dominic W. Berry, Graeme Ahokas, Richard Cleve, and Barry C. Sanders. Efficient quantum algorithms for simulating sparse hamiltonians. Communications in Mathematical Physics, 270(2):359–371, Mar 2007. 5. Stephen P. Jordan, Keith S. M. Lee, and John Preskill. Quantum algorithms for quantum field theories. Science, 336(6085):1130–1133, 2012. 6. Peter W. Shor. Algorithms for quantum computation: Discrete logarithms and factoring. In Proceedings of the 35th Annual Symposium on Foundations of Computer Science, SFCS ’94, pages 124–134, Washington, DC, USA, 1994. IEEE Computer Society. 7. Peter W. Shor. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM J. Comput., 26(5):1484–1509, October 1997. 8. Sean Hallgren. Fast quantum algorithms for computing the unit group and class group of a num- Guoming Wang 37 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. ber field. In Proceedings of the Thirty-seventh Annual ACM Symposium on Theory of Computing, STOC ’05, pages 468–474, New York, NY, USA, 2005. ACM. Sean Hallgren. Polynomial-time quantum algorithms for pell’s equation and the principal ideal problem. J. ACM, 54(1):4:1–4:19, March 2007. Andrew M. Childs and Wim van Dam. Quantum algorithms for algebraic problems. Rev. Mod. Phys., 82:1–52, Jan 2010. Daniel A. Spielman and Nikhil Srivastava. Graph sparsification by effective resistances. SIAM J. Comput., 40(6):1913–1926, December 2011. Daniel A. Spielman and Shang-Hua Teng. Spectral sparsification of graphs. SIAM Journal on Computing, 40(4):981–1025, 2011. Paul Christiano, Jonathan A. Kelner, Aleksander Madry, Daniel A. Spielman, and Shang-Hua Teng. Electrical flows, laplacian systems, and faster approximation of maximum flow in undirected graphs. In Proceedings of the Forty-third Annual ACM Symposium on Theory of Computing, STOC ’11, pages 273–282, New York, NY, USA, 2011. ACM. Ioannis Koutis, Alex Levin, and Richard Peng. Faster spectral sparsification and numerical algorithms for sdd matrices. ACM Trans. Algorithms, 12(2):17:1–17:16, December 2015. Nisheeth K. Vishnoi. Lx=b. Foundations and Trends in Theoretical Computer Science, 8(1–2):1–141, 2012. Yin Tat Lee, Satish Rao, and Nikhil Srivastava. A new approach to computing maximum flows using electrical flows. In Proceedings of the Forty-fifth Annual ACM Symposium on Theory of Computing, STOC ’13, pages 755–764, New York, NY, USA, 2013. ACM. Aleksander Madry. Navigating central path with electrical flows: From flows to matchings, and back. In Proceedings of the 2013 IEEE 54th Annual Symposium on Foundations of Computer Science, FOCS ’13, pages 253–262, Washington, DC, USA, 2013. IEEE Computer Society. Aleksander Madry, Damian Straszak, and Jakub Tarnawski. Fast generation of random spanning trees and the effective resistance metric. In Proceedings of the Twenty-sixth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’15, pages 2019–2036, Philadelphia, PA, USA, 2015. Society for Industrial and Applied Mathematics. Peter G. Doyle and J. Laurie Snell. Random walks and electric networks. Mathematical Association of America,, 1984. Ashok K Chandra, Prabhakar Raghavan, Walter L Ruzzo, Roman Smolensky, and Prasoon Tiwari. The electrical resistance of a graph captures its commute and cover times. Computational Complexity, 6(4):312–340, 1996. Aleksandrs Belovs. Span programs for functions with constant-sized 1-certificates: Extended abstract. In Proceedings of the Forty-fourth Annual ACM Symposium on Theory of Computing, STOC ’12, pages 77–84, New York, NY, USA, 2012. ACM. Frédéric Magniez Troy Lee and Miklos Santha. Learning graph based quantum query algorithms for finding constant-size subgraphs. Chicago Journal of Theoretical Computer Science, 2012(10), December 2012. Aleksandrs Belovs. Learning-graph-based quantum algorithm for k-distinctness. In Proceedings of the 2012 IEEE 53rd Annual Symposium on Foundations of Computer Science, FOCS ’12, pages 207–216, Washington, DC, USA, 2012. IEEE Computer Society. Aleksandrs Belovs and Ansis Rosmanis. On the power of non-adaptive learning graphs. Comput. Complex., 23(2):323–354, June 2014. Aleksandrs Belovs and Ben W. Reichardt. Span programs and quantum algorithms for stconnectivity and claw detection. In Proceedings of the 20th Annual European Symposium on Algorithms, ESA’12, pages 193–204, Berlin, Heidelberg, 2012. Springer-Verlag. Aleksandrs Belovs, Andrew M. Childs, Stacey Jeffery, Robin Kothari, and Frédéric Magniez. Timeefficient quantum walks for 3-distinctness. In Proceedings of the 40th International Conference on Automata, Languages, and Programming - Volume Part I, ICALP’13, pages 105–122, Berlin, Heidelberg, 2013. Springer-Verlag. Tsuyoshi Ito and Stacey Jeffery. Approximate span programs. In 43rd International Colloquium 38 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks on Automata, Languages, and Programming (ICALP 2016), volume 55 of Leibniz International Proceedings in Informatics (LIPIcs), pages 12:1–12:14, Dagstuhl, Germany, 2016. Schloss Dagstuhl–LeibnizZentrum fuer Informatik. Stacey Jeffery and Shelby Kimmel. Nand-trees, average choice complexity, and effective resistance. arXiv preprint arXiv:1511.02235, 2015. Titouan Carette, Mathieu Laurière, and Frédéric Magniez. Extended learning graphs for triangle finding. arXiv preprint arXiv:1609.07786, 2016. Aleksandrs Belovs. Quantum walks and electric networks. arXiv preprint arXiv:1302.3143, 2013. Ashley Montanaro. Quantum walk speedup of backtracking algorithms. arXiv preprint arXiv:1509.02374, 2015. Andris Ambainis, Krišj ānis Prūsis, Jevg ēnijs Vihrovs, and Thomas G. Wong. Oscillatory localization of quantum walks analyzed by classical electric circuits. Phys. Rev. A, 94:062324, Dec 2016. Daniel A. Spielman and Shang-Hua Teng. Nearly-linear time algorithms for graph partitioning, graph sparsification, and solving linear systems. In Proceedings of the Thirty-sixth Annual ACM Symposium on Theory of Computing, STOC ’04, pages 81–90, New York, NY, USA, 2004. ACM. Daniel A. Spielman and Shang-Hua Teng. Nearly linear time algorithms for preconditioning and solving symmetric, diagonally dominant linear systems. SIAM Journal on Matrix Analysis and Applications, 35(3):835–885, 2014. Andrew M Childs, Robin Kothari, and Rolando D Somma. Quantum linear systems algorithm with exponentially improved dependence on precision. arXiv preprint arXiv:1511.02306, 2015. Aram W. Harrow, Avinatan Hassidim, and Seth Lloyd. Quantum algorithm for linear systems of equations. Phys. Rev. Lett., 103:150502, Oct 2009. Andris Ambainis. Variable time amplitude amplification and quantum algorithms for linear algebra problems. In 29th International Symposium on Theoretical Aspects of Computer Science (STACS 2012), volume 14 of Leibniz International Proceedings in Informatics (LIPIcs), pages 636–647, Dagstuhl, Germany, 2012. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik. Andris Ambainis. Quantum walk algorithm for element distinctness. SIAM Journal on Computing, 37(1):210–239, 2007. Mario Szegedy. Quantum speed-up of markov chain based algorithms. In Proceedings of the 45th Annual IEEE Symposium on Foundations of Computer Science, FOCS ’04, pages 32–41, Washington, DC, USA, 2004. IEEE Computer Society. Frdric Magniez, Miklos Santha, and Mario Szegedy. Quantum algorithms for the triangle problem. SIAM Journal on Computing, 37(2):413–424, 2007. Frdric Magniez, Ashwin Nayak, Jrmie Roland, and Miklos Santha. Search via quantum walk. SIAM Journal on Computing, 40(1):142–164, 2011. Ben W. Reichardt. Span programs and quantum query complexity: The general adversary bound is nearly tight for every boolean function. In Proceedings of the 2009 50th Annual IEEE Symposium on Foundations of Computer Science, FOCS ’09, pages 544–551, Washington, DC, USA, 2009. IEEE Computer Society. Ben W. Reichardt. Reflections for quantum query algorithms. In Proceedings of the Twenty-second Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’11, pages 560–569, Philadelphia, PA, USA, 2011. Society for Industrial and Applied Mathematics. Jeff Cheeger. A lower bound for the smallest eigenvalue of the laplacian. Problems in analysis, pages 195–199, 1970. Fan R. K. Chung. Spectral graph theory. Number 92. American Mathematical Soc., 1997. Ashley Montanaro and Sam Pallister. Quantum algorithms and the finite element method. Phys. Rev. A, 93:032324, Mar 2016. Gilles Brassard, Peter Hoyer, Michele Mosca, and Alain Tapp. Quantum amplitude amplification and estimation. Contemporary Mathematics, 305:53–74, 2002. Vivek V. Shende, Stephen S. Bullock, and Igor L. Markov. Synthesis of quantum-logic circuits. Trans. Comp.-Aided Des. Integ. Cir. Sys., 25(6):1000–1010, June 2006. Lov K. Grover. Fixed-point quantum search. Phys. Rev. Lett., 95:150501, Oct 2005. Guoming Wang 39 50. Alexei Y. Kitaev. Quantum measurements and the abelian stabilizer problem. arXiv preprint quantph/9511026, 1995. 51. Richard Cleve, Artur Ekert, Chiara Macchiavello, and Michele Mosca. Quantum algorithms revisited. Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 454(1969):339–354, 1998. 52. Daniel Nagaj, Pawel Wocjan, and Yong Zhang. Fast amplification of qma. Quantum Info. Comput., 9(11):1053–1068, November 2009. 53. Dominic W. Berry, Andrew M. Childs, Richard Cleve, Robin Kothari, and Rolando D. Somma. Exponential improvement in precision for simulating sparse hamiltonians. In Proceedings of the Forty-sixth Annual ACM Symposium on Theory of Computing, STOC ’14, pages 283–292, New York, NY, USA, 2014. ACM. 54. Robert Beals, Harry Buhrman, Richard Cleve, Michele Mosca, and Ronald de Wolf. Quantum lower bounds by polynomials. J. ACM, 48(4):778–797, July 2001. 55. Edward Farhi, Jeffrey Goldstone, Sam Gutmann, and Michael Sipser. Limit on the speed of quantum computation in determining parity. Phys. Rev. Lett., 81:5442–5444, Dec 1998. 56. Subhransu Maji, Nisheeth K. Vishnoi, and Jitendra Malik. Biased normalized cuts. In Proceedings of the 2011 IEEE Conference on Computer Vision and Pattern Recognition, CVPR ’11, pages 2057–2064, Washington, DC, USA, 2011. IEEE Computer Society. 57. James R. Lee, Shayan Oveis Gharan, and Luca Trevisan. Multiway spectral partitioning and higherorder cheeger inequalities. J. ACM, 61(6):37:1–37:30, December 2014. 58. Michael W. Mahoney, Lorenzo Orecchia, and Nisheeth K. Vishnoi. A local spectral method for graphs: With applications to improving graph partitions and exploring data graphs locally. J. Mach. Learn. Res., 13(1):2339–2365, August 2012. 59. Luca Trevisan. Max cut and the smallest eigenvalue. SIAM Journal on Computing, 41(6):1769–1786, 2012. Appendix A The following lemma is used in Section 3.1. It says that if two unnormalized states are close and one of them has a large norm, then their normalized versions are also close. Lemma A.1 Let |ψi and |φi be two unnormalized states satisfying k|ψik ≥ α > 0 and k|ψi − | φik ≤ β. Then 2β |ψi |φi . ≤ − (A.1) α k|ψik k|φik Proof. Using the triangle inequality, we get |ψi |φi − k|ψik k|φik = ≤ ≤ = ≤ = |ψi |φi |φi |φi − + − k|ψik k|ψik k|ψik k|φik |φi |φi |φi |ψi + − − k|ψik k|ψik k|ψik k|φik 1 1 k|ψi − |φik + k|φik − k|ψik k|ψik k|φik k|ψi − |φik |k|ψik − k|φik| + k|ψik k| ψik 2k|ψi − |φik k|ψik 2β . α (A.2) (A.3) (A.4) (A.5) (A.6) (A.7) 40 ✷. Efficient Quantum Algorithms for Analyzing Large Sparse Electrical Networks
8cs.DS
Small-loss bounds for online learning with partial information arXiv:1711.03639v2 [cs.LG] 19 Feb 2018 Thodoris Lykouris ∗ Karthik Sridharan † Éva Tardos‡ Abstract We consider the problem of adversarial (non-stochastic) online learning with partial information feedback, where at each round, a decision maker selects an action from a finite set of alternatives. We develop a black-box approach for such problems where the learner observes as feedback only losses of a subset of the actions that includes the selected action. When losses of actions are non-negative, under the graph-based feedback model introduced by Mannor and Shamir, we offer algorithms that attain the so called “small-loss” o(αL⋆ ) regret bounds with high probability, where α is the independence number of the graph, and L⋆ is the loss of the best action. Prior to our work, there was no data-dependent guarantee for general feedback graphs even for pseudo-regret (without dependence on the number of actions, i.e. utilizing the increased information feedback). Taking advantage of the black-box nature of our technique, we extend our results to many other applications such as semi-bandits (including routing in networks), contextual bandits (even with an infinite comparator class), as well as learning with slowly changing (shifting) comparators. In the special case of classical bandit √ and semi-bandit problems, we provide optimal smalle dL⋆ ) for actual regret, where d is the number of actions, loss, high-probability guarantees of O( answering open questions of Neu. Previous bounds for bandits and semi-bandits were known only √ e κL⋆ ) regret guarantee for for pseudo-regret and only in expectation. We also offer an optimal O( fixed feedback graphs with clique-partition number at most κ. ∗ Cornell University, [email protected]. Work supported under NSF grant CCF-1563714. Cornell University, [email protected]. Work supported in part by NSF grant CDS&e-mss 1521544. ‡ Cornell University, [email protected]. Work supported in part by NSF grant CCF-1563714. † 1 Introduction The online learning paradigm [LW94, CBL06] has become a key tool for solving a wide spectrum of problems such as developing strategies for players in large multiplayer games [BEDL06, BHLR08, Rou15, LST16, FLL+ 16], designing of online marketplaces and auctions [BH05, CBGM13, RW16], portfolio investment [Cov91, FS97, HAK07], online routing [AK04, KV05]. In each of these applications, the learner has to repeatedly select some action on every round. Different actions have different costs or losses associated with them on every round. The goal of the learner is to minimize “regret” which is defined as the difference between the cumulative loss of the learner, and the cumulative loss L⋆ of the benchmark. The term “small-loss regret bound” is often used to refer to bounds on regret that depend (or mostly depend) on L⋆ rather than the total number of rounds played T often referred to as the time horizon. For instance, for √ learning problems, one can in fact show that regret can be √ many classical online e T ). However, these algorithms use the full information model: e L⋆ ) rather than O( bounded by O( assume that on every round, the learner receives as feedback the losses of all possible actions (not only the selected actions). In such full information settings, it is well understood when small-loss bounds are achievable and how to design learning algorithms that attain them. However, in most applications, full information about losses of all actions is not available. Unlike the full information case, the problem of obtaining small-loss regret bounds for partial information settings is poorly understood. Even in the classical multi-armed bandit problem, small-loss bounds are only known in expectation against the so called oblivious adversaries or comparing against the lowest expected cost of an arm (and not the actual lowest cost), referred to as pseudo-regret. The goal of this paper is to develop robust techniques for extending the small-loss guarantees to a broad range of partial feedback settings where learner only observes losses of selected actions and some neighboring actions. In the basic online learning model, at each round t, the decision maker or learner chooses one action from a set of d actions, typically referred to as arms. Simultaneously an adversary picks a loss vector ℓt ∈ [0, 1]d indicating the losses for the d arms. The learner suffers the loss of her chosen arm and observes some feedback. The variants of online learning differ by the nature of feedback received. The two most prominent such variants are the full information setting, where the feedback is the whole loss vector, and the bandit setting where only the loss of the selected arm is observed. Bandits and full information represent two extremes. In most realistic applications, a learner choosing an action i, learns not only the loss ℓti associated with her chosen action i, but also some partial information about losses of some other actions. A simple and elegant model of this partial information is the graph-based feedback model of [MS11, ACG+ 14], where at every round, there is a (possibly timevarying) undirected graph Gt on the possible actions as nodes representing the information structure. If the learner selects a action i and incurs the loss ℓti , she observes the losses of all the nodes connected to node i by an edge in Gt . Our main result in Section 3 is a general technique that allows us to use any full information learning algorithm as a black-box, and design a learning algorithm whose regret can be bounded with high probability as o(αL⋆ ), where α is the maximum independent number of the feedback graphs. This graph-based information feedback model is a very general setting that can encode all of full information, bandit, as well as a number of other applications. 1.1 Our contribution Our results We develop a unified, black-box technique to achieve small-loss regret guarantees with high probability in various partial information feedback models. We obtain the following results. 1 • In Section 3, we provide a generic black box reduction from any small-loss full information algoe (L⋆ )2/3 that rithm. When used with known algorithms it achieves actual regret guarantees of O hold with high probability for any of pure bandits, semi-bandits, contextual bandits, or feedback e as d1/3 for the first three, and graphs (with dependence on the information structure in the O α1/3 for feedback graphs). There are three novel features of this result. First, unlike all previous work in partial information that are heavily algorithm-specific, our technique is black-box in the sense that it takes as input a small-loss full information algorithm and, via a small modification, makes it work under partial information. Second, prior to our work, there was no data-dependent guarantee for general feedback graphs even for pseudo-regret (without dependence on the number of actions, i.e., taking advantage of the increased information feedback), while we provide a high probability small-loss guarantee. Last, our guarantees are not for pseudo-regret but actual regret guarantees that hold with high probability. • In Section 4, we show various applications. The black-box nature of our reduction allows us to use the full information learning algorithms best suited for each application. We obtain smallloss guarantees for semi-bandits [KV05] (including routing in networks), for contextual bandits [ACBFS03] (even with an infinite comparator class), as well as learning with slowly changing (shifting) comparators [HW98] as needed in games with dynamic population [LST16, FLL+ 16]. • In Section 5, we focus on the special case of bandits, semi-bandits, graph feedback from fixed graphs, and shifting comparators. In each setting we take advantage of properties of a learning algorithm best suited in the application to alleviate the inefficiencies resulting from the blackbox nature of our general reduction. For bandits and √ semi-bandits, we provide optimal small-loss e actual regret high-probability guarantees of O( dL⋆ ). Previous work for bandits and semibandits offered analogous regret guarantee only for pseudo-regret and only in expectation. This answers an √ open question of [Neu15b, Neu15a]. In the case of fixed feedback graphs, we achieve optimal L∗ dependence on loss, at the expense of the bound depending on clique-partition number of the graph, rather than the independent number. Our techniques Our main technique is a dual-thresholding scheme that temporarily freezes lowperforming actions, i.e. does not play them at the current round. Traditional partial information guarantees are based on creating an unbiased estimator for the loss of each arm and then running a full information algorithm on the estimated loses. The most prominent such unbiased estimator, called importance sampling, is equal to the actual loss divided by the probability with which the action is played. This division can make the estimated losses unbounded in the absence of a lower bound on the probability of being played. Algorithms like EXP3 [ACBFS03] for the bandit setting or Exp3-DOM √ [ACG+ 14] for the graph-based feedback setting mix in a 1/ T amount of noise which ensures that the range of losses is bounded. Adding such uniform noise works well for learners maximizing utility, but can be very damaging when minimizing losses. In the case of utilities, playing low performing arms with a small ǫ probability, can only lose at most an ǫ fraction of the utility. In contrast, when the best arm has small loss, the losses incurred due to the noise can dominate. This approach can only return √ uniform bounds with O( T ) regret since, even in the case that there is a perfect arm that has 0 loss, the algorithm keeps playing low-performing arms. Some specialized algorithms do achieve small-loss bounds for bandits, but these techniques extend neither to graph feedback nor to high probability guarantees (see also the discussion in related work). Instead of mixing in noise, we take advantage of the freezing idea, originally introduced by Allenberg et al. [AAGO06] with a single threshold γ offering a new way to adapt the multiplicative weights algorithm to the bandit setting. The resulting estimator is negatively biased for the arms that are frozen but is always unbiased for the selected arm. Using these expectations, the regret bound of the full information algorithm can be used to bound the expected regret compared to the expected loss of fixed arm, achieving low pseudo-regret in expectation. To achieve good bounds, we need to guarantee 2 that the total probability frozen is limited. By freezing arms with probability less than γ, the total probability that is frozen at each round is at most dγ and therefore contributes to a regret term of dγ times the loss of the algorithm which gives a dependence on d on the regret bound. This was analyzed in the context of multiplicative weights in [AAGO06]. Our main technical contribution is to greatly expand the power of this freezing technique. We show how to apply it in a black-box manner with any full information learning algorithm and extend it to graphbased feedback. To deal with the graph-based feedback setting, we suggest a novel and technically more challenging dual-threshold freezing scheme. The natural way to apply importance sampling in the graph-based feedback is by dividing the actual loss with the probability of being observed, i.e. the sum of the probabilities that the action and its neighbors are played. An initial approach is to freeze an action if its probability of being observed is below some threshold γ. We show that the total probability frozen by this step is bounded by αγ, where α is the size of the maximum independent number of the feedback graph. To see why, consider a maximal independent set S of the frozen actions and note that all frozen actions are observed by some node in S. This observation seems to imply that we can replace the dependence on d by a dependence on α. However there are externalities among actions as freezing one action may affect the probability of another being observed. As a result, the latter may need to be frozen as well to ensure that all active arms are observed with probability at least γ (and therefore obtain our desired upper bound on the range of the estimated losses). This causes a cascade of freezing, with possibly freezing a large amount of additional probability. To limit this cascade effect, we develop a dual-threshold freezing technique: we initially freeze arms that are observed with probability less than γ, and subsequently use a lower threshold γ ′ = γ/3 and only freeze arms that are observed with probability less than γ ′ . This technique allows us to bound the total probability of arms that are frozen subsequently by the total probability of arms that are frozen initially. We prove this via an elegant combinatorial charging argument of Claim 3.3. Last, to go beyond pseudo-regret and guarantee actual regret bounds with high probability, it does not suffice to have the estimator being negatively biased but we need to also obtain a handle on the e 1/3 (L⋆ )2/3 ) variance. We prove that freezing also provides such a lever leading to a high-probability O(α regret guarantee that holds in a black-box manner. Interestingly, this freezing technique via a small modification enables the same guarantee for semi-bandits where the independent set is replaced by the number of elements (edges). In order to obtain the optimal high-probability guarantee for bandits and semi-bandits, we need to combine our black box analysis with taking advantage of features of concrete full information learning algorithms. The black-box nature of the previous analysis is extremely useful in demonstrating where additional features are needed. Combining our analysis with the implicit exploration technique of Neu [Neu15a], we develop an algorithm based on multiplicative p weights, which we term GREEN-IX, which e achieves the optimal high-probability small-loss bound O( dL⋆ ) for the pure bandit setting. Using an alternative technique of Neu [Neu15b]: truncation in the follow the perturbed leader algorithm, we also obtain the corresponding result for semi-bandits. 1.2 Related work Online learning with partial information dates back to the seminal work of Lai and Robbins [LR85]. They consider a stochastic version, where losses come from fixed distributions. The case where the losses are selected adversarially, i.e. they do not come from a distribution and may be adaptive to the algorithm’s choices, which we examine in this paper, was first studied by Auer et al. [ACBFS03] who provided the EXP3 algorithm for pure bandits and the EXP4 algorithm for contextual bandits. They 3 focus on uniform regret bounds , i.e. that grow as a function of time o(T ), and bound the expected performance, but such guarantees can also be derived with high probability [AB10]. Data-dependent guarantees are easily derived from the above algorithms for the case of maximizing some reward as even getting reward 0 with probability of ǫ only losses an ǫ fraction of the utility. In contrast, incurring high cost with a small probability ǫ can dominate the loss of the algorithm, if the best arm has small loss. In this paper we develop data-dependent guarantees for partial information algorithm for the cases of losses. There are a few specialized algorithms that achieve such small-loss guarantees for the case of bandits for pseudo-regret, e.g. by ensuring that the estimated losses of all arms remain close [AAGO06, Neu15b] or using a stronger regularizer [RS13, FLL+ 16], but all of these methods neither offer high probability small-loss guarantees even for the bandit setting, nor extend to graph-based feedback. Our technique allows us to develop small-loss bounds on actual regret with high probability. The graph-based partial information that we examine in this paper was introduced by √ Mannor and e Shamir [MS11] who provided ELP, a linear programming based algorithm achieving O( αT ) regret for undirected graphs. Alon et al. [ACBGM13, ACG+ 14] provided variants of Exp3 (Exp3-SET) that recovered the previous bound via what they call explicit exploration. Following this work, there has been multiple results on this setting, e.g.[ACDK15, CHK16, KNV16, TDD17], but prior to our work, there was no small-loss guarantee for the feedback graph setting that could exploit the graph structure. To obtain a regret bound depending on the graph structure, the above techniques upper bound the losses of the arms by the maximum loss which results in a dependence on the time horizon T instead of L⋆ . Addressing this, we achieve regret that scales with an appropriate problem dimension, the size of the maximum independent set α, instead of ignoring the extra information and only depending on the number of arms as all small-loss results of prior work. Biased estimators have been used prior to our work for achieving better regret guarantees. The freezing technique of [AAGO06] can be thought of as the first use of biased estimators. Their GREEN algorithm uses freezing in the context of the multiplicative weights algorithm for the case of pure bandits. Freezing keeps the range of estimated losses bounded and when used with the multiplicative weights algorithm, also keeps the cumulative estimated losses very close, which ensures that one does not lose much in the application of the full information algorithm. Using these facts Allenberg et al. [AAGO06] achieved small-loss guarantees for pseudo-regret in the classical multi-armed bandit setting. An approach very close to freezing is the implicit exploration of Neu et al. [NB13, KNVM14, Neu15a] who adds a term in the denominator of the estimator making the estimator biased, even for the selected arms. The TruFPL algorithm of Neu [Neu15b] is based on the Follow the Perturbed Leader algorithm using implicit exploration together with truncating the perturbations to guarantee that the estimated losses of all actions are close to each other. His technique provides small-loss regret bounds for pseudo-regret, but does not extend to high-probability guarantees. The EXP3-IX algorithm of Neu [Neu15a] combines implicit exploration with multiplicative weights to obtain high-probability uniform bounds. Focusing on uniform regret bounds, exploration and truncation were presented as strictly superior to freezing. In this paper, we show an important benefit of the freezing technique: it can be extended to handle feedback graphs (via our dual-thresholding). We also combine freezing with multiplicative weights √ to e dL⋆ ) develop an algorithm we term GREEN-IX which achieves optimal high-probability small-loss O( for the pure bandit setting. Finally, combining with the truncation idea, we obtain the corresponding result for semi-bandits. 4 2 Model In this section we describe the basic online learning protocol and the partial information feedback model we consider in this paper. In the online learning protocol, in each round t, the learner selects a distribution wt over d possible actions, i.e. wit denotes the probability with which action i is selected on round t. The adversary then picks losses ℓt = (ℓt1 , . . . , ℓtd ) where ℓti ∈ [0, 1] denotes the loss of action i on round t. The learner then draws action I(t) from the distribution wt and suffers the corresponding loss ℓtI(t) for that round. In the end of the round t, the learner receives feedback about the losses of the selected action and some neighboring actions. The feedback received by the learner on each round is based on a feedback graph model described below. 2.1 Feedback graph model We assume that the learner receives partial information based on an undirected feedback graph Gt that could possibly vary in every round. The learner observes the loss ℓtI(t) of the selected arm I(t) and, in addition, she also observes the losses of all arms connected to the selected arm I(t) in the feedback t graph. More formally, she observes the loss ℓtj for all the arms j ∈ NI(t) where Nit denotes the set containing arm i and all neighbors of i in Gt at round t. The full information feedback setting and the bandit feedback setting are special cases of this model where the graph Gt is the clique and the empty graph respectively for all rounds t. We allow the feedback graph Gt to change each round t, but assume that the graph Gt is known to the player before selecting her distribution wt . This model also includes the contextual bandits problem of [ACBFS03] as a special case, where each round the learner is also presented with an additional input xt , the context. In this contextual setting, the learner is offered d policies, each suggesting an action depending on the context, and each round the learner can decide which policy’s recommendation to follow. To model this with our evolving feedback graph, we use the policies as nodes, and connect two policies with an edge in Gt if they recommend the same action in the context xt of round t. 2.2 Regret In the adversarial online learning framework, we assume only that losses ℓti are in the range [0, 1] in. The goal of the learner is to minimize the so called regret against an appropriate benchmark. The traditional notion of regret compares the performance of the algorithm to the best fixed action f in hindsight. For an arm f we define regret as: Reg(f ) = T h X t=1 ℓtI(t) − ℓtf i where T is the time horizon. To evaluate performance, we consider regret against the best arm: Reg = max Reg(f ) f Note that the regrets Reg(f ) and Reg are random variables. A slightly weaker notion of regret is the notion of pseudoregret (c.f. [BCB12]), that compares the expected performance of the algorithm to the expected loss of any fixed arm f , fixed in advance and 5 not in hindsight. More formally, this notion of expected regret is: PseudoReg = max f E I(1)...I(t) [Reg(f )] This is weaker than the expected regret EI(1)...I(t) [Reg] = EI(1)...I(t) [maxf Reg(f )].1 . We aim for an even stronger notion of regret, guaranteeing low regret with high probability, i.e. probability 1 − δ for all δ > 0 simultaneously, instead of only in expectation, at the expense of a logarithmic dependence on 1/δ in the regret bound for any fixed δ. Note that any high-probability guarantee concerning Reg(f ) for any fixed arm f with failure probability δ′ can automatically provide an overall regret guarantee with failure probability δ = dδ′ . A high-probability guarantee on low Reg also implies low regret in expectation. 2 Small-loss regret bound The goal of this paper is to develop algorithms with small-loss regret bounds, where the loss remains small when the best arm has small loss, i.e. when regret depends on the loss of the comparator, and not on the time horizon. To achieve this, we focus on the notion of approximate regret (c.f. [FLL+ 16]), which is a multiplicative relaxation of the regret notion. We define ǫ-approximate regret for a parameter ǫ > 0 as ApxReg(f, ǫ) = (1 − ǫ) T X t=1 ℓtI(t) − T X ℓtf t=1 We will prove bounds on ApxReg(f, ǫ) in high probability and in expectation, and will use these to provide small-loss regret bounds by tuning ǫ appropriately, an approach that is often used in the literature in achieving classical regret guarantees and is referred to as doubling trick. Typically, approximate regret bounds depend inversely on the parameter ǫ. For instance, in classical full information p algorithms, the expected approximate p regret is bounded by O(log(d)/ǫ) and therefore setting ǫ = log(d)/T , one T log(d) uniform bounds. If we knew L⋆ , the loss of the best arm at the end obtains the classical O p  p of round T , one could set ǫ = log(d)/L⋆ and get the desired O L⋆ log(d) guarantee. Of course, L⋆ is not known in advance, and depending on the model of feedback, may not even be observed either. b the loss of the algorithm To overcome these difficulties, we can make the choice of ǫ depend on L, b and half ǫ when instead, and apply doubling trick: start with a relatively large ǫ, hoping for a small L we observe higher losses. 2.3 Other applications. Semi-bandits We also extend our results to a different form of partial information: semi-bandits. In the semi-bandit problem we have a set of elements (E), such as edges in a network, and the learner needs to select from a set of possible actions (F), where each possible action f ∈ F correspond to a subset of the elements E. An example is selecting a path in a graph, where at round t, each element e ∈ E has a delay ℓte , and the learner P needs to select a path PP (connecting her source to her destination), and suffers the sum of the losses e∈P ℓte . We use ℓtP = e∈P ℓte as the loss of the strategy P at time t. 1 To see the difference, consider n arms that are similar but have high variance. Pseudoregret compares the algorithm’s performance against the expected performance of arms, while regret compares against the “best” arm depending on the outcomes of the randomness. This difference can be quite substantial, like when throwing n balls into n bins the expected load of any bin is 1, while the expected maximum load is Θ(log n/ log log n). 2 If the algorithm guarantees regret at most B log(1/δ) with probability at least R ∞(1 − δ) for any δ > 0, then we can get the expected regret bound of O(B) by using the bound to estimate the integral 0 x · P(Reg > x)dx. 6 We assume that the learner observes the loss on all edges e ∈ P in her selected strategy, but does not observe other losses. We measure regret compared to the best single strategy f ∈ F with hindsight, so use F as the set of (possibly exponentially many) comparators. Contextual bandits. Another class of important application is the contextual bandit problem, where the learner has a set of A actions to choose from, but each step t also has a context: At each time step t, she is presented with a context xt ∈ X , and can base her choice of action on the context. She also has a set F policies where each f ∈ F if a function fi (x) ∈ A from contexts to actions. As an example, actions can be a set of medical treatment options, and contexts are the symptoms of the patient. A possible policy class F can be finite given explicitly, or large and only implicitly given, or even can be an infinite class of possible policies. Regret with shifting comparators. In studying learning in changing environments [HW98], such as games with dynamic populations [LST16], it is useful to have regret guarantees against not only a single best arm, but also against a sequence of comparators, as changes in the environment may change the best arm over time. We overload f to denote the vector of the comparators (f (1), . . . , f (T )) in such settings. If the comparator changes too often, no learning algorithm can do well against this standard. We will consider sequences where f has only a limited number of changes, that is f (t) = f (t + 1) for all but k rounds (with k not known to the algorithm). To compare the performance to a sequence of different comparators, we need to extend our regret notions to this case by: ApxReg(f, ǫ) = T h X t=1 (1 − ǫ)ℓtI(t) − ℓtf (t) i where ǫ corresponds to the multiplicative factor that comes in the regret relaxation. Typically the approximate regret guarantee depends linearly on the number of changes in the comparator sequence. 3 The black-box reduction for graph-based feedback In this section, we present our black-box framework turning any full-information small-loss learning algorithm into an algorithm with a high-probability small-loss guarantee in the partial information feedback setting. Our approach is based on an improved version of the classical importance sampling. The idea of importance sampling is to create for each arm an estimator for the loss of the arm and run the full information algorithm on the estimated losses. In classical importance sampling, the estimated loss of an arm is equal to its actual loss divided by the probability of it being observed. This makes the estimator unbiased as the expected estimated loss of any arm is equal to its actual loss. This general framework of importance sampling is also used with feedback graphs in [ACG+ 14]. In the feedback graph observation model, we acquire information for all arms observed and not only for the ones played; we therefore create an unbiased estimator via dividing the observed losses of an arm by the probability of it being observed. However, there is an important issue all these algorithms need to deal with: the estimated losses can become arbitrarily large as the probability of observing an arm can be arbitrarily low. This poses a major roadblock in the black-box application of a classical full information learning algorithm. To deal with this, typical partial information algorithms, such as EXP3 [ACBFS03] or EXP3-DOM [ACG+ 14], mix the resulting distribution with a small amount of uniform noise across arms, guaranteeing a lower bound on the probability of being observed and therefore an upper bound on the range of estimated losses. Since the added noise makes the algorithm play badly performing arms, this approach results in uniform regret bounds and not small-loss guarantees. 7 We use an alternate technique, first proposed by Allenberg et al. [AAGO06] in the context of the Multiplicative Weights algorithm for the bandit feedback setting. We set a threshold γ and in each round neither play nor update the loss of arms with probability below this threshold. We refer to such arms as (temporarily) frozen. We note that frozen arms may get unfrozen in later rounds, if other arms incur losses, as we update frozen arms assuming their loss is 0. The resulting estimator for the loss of an arm is no longer unbiased since the estimated loss of frozen arms is 0. However, crucially the estimator is unbiased for the arms that we play and negatively biased for all arms, which allows us to extend the regret bound of the full information algorithm. When freezing some arms, we need to normalize the probabilities of the other arms so that they form a probability distribution. In order to obtain approximate regret guarantees, the total probability of all frozen arms should be at most ǫ. Allenberg et al. [AAGO06] guarantee this for the bandit feedback setting by selecting γ = ǫ/d resulting in a dependence on the number of arms in the approximate regret bound. In this section we extend this technique in three different ways. • We obtain small-loss learning algorithms for the case of feedback graphs, where the regret bound depends on the size of the maximum independent set α(Gt ), instead of d (number of nodes in Gt ). • We achieve the above via a black-box reduction using any full information algorithm, not only via using the Multiplicative Weights algorithm. • We provide a low loss guarantee that holds with high probability and not only in expectation. Since we seek for bounds that are only a function of the size maxt α(Gt ), and have no dependence on the number of arms, we need to use a novel dual-threshold freezing technique. At each round t, we first freeze arms with probability of being observed less than some threshold γ. We show (Claim 3.2) that the total probability of all frozen arms is at most α(Gt )γ. Unfortunately, freezing an arm in turn decreases the probability that the neighbors are observed. This effect can propagate and cause additional arms to be observed with probability less than γ. To bound the total probability of all frozen arms as a function of α(Gt ) while still maintaining a lower bound on the probability of observation for the played arms, we recursively freeze arms whose observation probability is smaller than γ ′ = γ/3. We show in Claim 3.3 that the total probability frozen during the recursive process is at most 3 times the total probability frozen in the initial step. We proceed by providing the algorithm (Algorithm 1), the crucial lemma that enables improved bounds beyond bandit feedback (Lemma 3.1), and the black-box guarantee. For clarity of presentation we first provide the approximate regret guarantee in expectation (Theorem 3.4) and then show its highprobability version (Theorem 3.5), in both cases assuming that the algorithm has access to an upper bound of the size of the maximum independent set α as an input parameter. In Theorem 3.8 we provide the small-loss version of the above bound without explicit knowledge of the independence number. Pt t Lemma 3.1. At every round t, the total probability of frozen arms is at most ǫ: i∈F t pi ≤ ǫ, and hence any non-frozen arm i increases its probability due to freezing by a factor of at most (1 − ǫ). Proof. We first consider the arms that are frozen due to the γ-threshold (line 3Pof the algorithm). Claim 3.2 shows that the total probability frozen in the initial set is bounded by i∈F t pti ≤ α(Gt )γ. 0 We then focus on the arms frozen due to the recursive γ ′ -threshold (line 4 of the algorithm). Claim 3.3 bounds the total probability of arms i ∈ Fkt with k ≥ 1 by three times the total probability of arms in F0t . Combining the two Claims, we obtain: X X X pti = pti ≤ α(Gt )γ + 3α(Gt )γ = 4α(Gt )γ ≤ ǫ. pti + i∈F t i∈F0t S i∈ k≥1 Fkt 8 Algorithm 1 The Black-Box Dual-Threshold Freezing Algorithm Require: Full information algorithm A, an upper bound on the size of maximum independent sets α, number of arms d, parameter ǫ. 1: Initialize p1i for arm i based on the initialization of A and set t = 1 (round 1). 2: for t = 1 to T do 3: Freeze arms whose observation probability is below γ = ǫ/4α to obtain:    X  t t F0 = i : pj < γ   t j∈Ni 4: Recursively freeze remaining arms if their probability of being observed by unfrozen arms is S below γ ′ = γ/3 to obtain F t = k≥0 Fkt where, Fkt = 5:      i∈ / k−1 [ t Fm m=0 ! S t j∈(Nit \ k−1 m=0 Fm ) 7: ptj < γ ′   Normalize the probabilities of unfrozen arms so that they form a distribution.  0 if i ∈ F t t wit = p  1−P i pt else t j∈F 6: X :    j Draw arm I(t) ∼ wt and incur loss ℓtI(t) . Compute estimated loss: where Wit = P j∈Nit wjt ℓeti = ( ℓti Wit t \F t if i ∈ NI(t) else 0 . Update pt+1 using full information algorithm A with loss ℓet for round t. i 9: end for 8: The lemma then follows from the relation in the normalization step of the algorithm (line 5). Next we show the two main claims of the previous proof. Claim 3.2. The total probability frozen in the initial set is bounded by P i∈F0t pti ≤ α(Gt )γ. Proof. Let S t be a maximal independent set on F0t . Since the independent set is maximal, every node in F0t has a neighbor in S t , so we obtain: X X X ptj < α(Gt ) · γ. pti ≤ i∈S t j∈(N t ∩F0t ) i∈F0t i where the last inequality follows from the fact that there are at most α(Gt ) nodes in S t and, since they are frozen, the probability of being observed is at most γ for each of them. 9 Claim 3.3. The total probability of arms i ∈ Fkt with k ≥ 1 is bounded by three times the total probability of arms in F0t . More formally: i∈ X S t k≥1 Fk pti ≤ 3 X pti . i∈F0t Proof. The purpose of the lower threshold γ ′ in line 4 is to limit the propagation of frozen probability. Consider an arm i frozen on step k ≥ 1. Since arm i was not frozen at step 0, the initial probability of being observed by any node of Gt is at least γ = 3γ ′ . When this arm becomes frozen, it is observed with probability at most γ ′ . Hence 2γ ′ of the original probability stems from arms frozen earlier. Using this, we can bound the probability mass in F1t by at most 1.5 times the mass of F0t . Further, from these arms at most γ ′ of the originally at least 3γ ′ probability is newly frozen, and hence can affect non yet frozen arms, creating a further cascade. We show that the total frozen probability can be at most 3 times the probability of nodes in F0t . The proof of this fact follows in a way that is analogous of how the number of internal nodes of a binary tree is bounded by the number of leaves, as any node can have at most 1 parent, while having 2 children. More formally, we consider an auxiliary function that serves as an upper bound of the left hand side and a lower bound of the right hand side, proving the claim. The claim is focused on a single round t. For simplicity of notation, we drop the dependence on t from the notations, i.e., use F = ∪k Fk for the set of nodes frozen, pi for the probability of node i, use G for the graph, and E for its edge-set. Let S F≥1 = k≥1 Fkt . We order all nodes in F based on when they are frozen. More formally, if i ∈ Fm and j ∈ Fk with m < k then i ≺ j. This is a partial ordering as ≺ does not order nodes frozen at the same iteration of the recursive freezing. We now introduce the heart of the auxiliary function which lies in the sum of the products of probabilities pi · pj along edges (i, j) with i ≺ j, such that (i, j) ∈ E, i.e. X pi pj i∈F,j∈F≥1 ,i≺j (i,j)∈E To lower bound this quantity, we sum over j first. Node j total probability mass of at least γ = 3γ ′ . By the time j is less than γ ′ , so a total probability mass of at least 2γ ′ must  X pi pj = i∈F,j∈F≥1 ,i≺j (i,j)∈E X j∈F≥1 was not in F0 so its neighborhood has a frozen, the remaining probability mass is come from earlier frozen neighbors.  X  X  pj  pi  pj · 2γ ′  ≥ i∈F,i≺j (i,j)∈E j∈F≥1 To upper bound the above quantity, we sum over i first, and separate the sum for i ∈ F0 and i ∈ F≥1 . Nodes i ∈ F0 have a total probability of less than γ = 3γ ′ in their neighborhood, as they are frozen in line 3 of the algorithm. Nodes i ∈ F≥1 have at most γ ′ probability mass left in their neighborhood when they become frozen and therefore at most this much total probability on neighbors later in the ordering.     X i∈F,j∈F≥1 ,i≺j (i,j)∈E pi pj = X i∈F0   pi   X j∈F≥1 ,i≺j (i,j)∈E  X    pi  pj  +   i∈F≥1 10 X j∈F≥1 ,i≺j (i,j)∈E  X X  pi · γ ′ pi · 3γ ′ + pj  ≤  i∈F0 i∈F≥1 P P P The above lower and upper bounds imply that 3γ ′ i∈F0 pi + γ ′ i∈F≥1 pi ≥ 2γ ′ i∈F≥1 pi and hence we obtain the claimed bound (reintroducing the round t in the notation): X X pti ≤ 3 pti S i∈ k≥1 Fkt i∈F0t Bounding pseudoregret. We are now ready to prove our first result: a bound for learning with partial information based on feedback graphs. We first provide the guarantee for approximate pseudoregret in expectation. We assume both the learning rate ǫ as well as an upper bound α on the size of the independent sets are given as an input. At the end of this section, we show how the results can be turned into regret guarantees via doubling trick without knowledge of the maximum independent number. Theorem 3.4. Let A be any full information algorithm with an expected approximate regret guarantee given by: E[ApxReg(f, ǫ/2)] ≤ 2L·A(d,T )/ǫ against any arm f , when run on losses in [0, L]. Algorithm 1 run on input A, α, d, has expected ǫ-approximate regret guarantee: E[ApxReg(f, ǫ)] = O(α·A(d,T )/ǫ2 ). Proof. First notice that our random estimated loss ℓet is negatively biased, so E[ℓet ] ≤ ℓt for all arms i i i i and all rounds t, where expectation is taken over the choice of arm I(t). Bounding the loss of the algorithm against the expected estimated loss of arm f implies the bound we seek. Next consider the losses incurred by the algorithm compared to the estimated losses the full information algorithm A observes. Note that the estimator is unbiased for the arms that the algorithm plays (as those are not frozen), so the expected loss of the full information algorithm when run on the estimated losses is equal to its expected loss when run on the actual losses: E[ℓetj ] = ℓtj for all j ∈ / F t . Last, freezing guarantees that the maximum estimated loss is L = 1/γ ′ (since the probability of being observed is at least γ ′ for any non-frozen arm else it would freeze at step 4 of the algorithm). Combining these and using that (1 − ǫ) ≤ (1 − ǫ/2)2 we obtain the following: # " # " X XX t et t wi ℓi (1 − ǫ) E ℓI(t) = (1 − ǫ) E t t i # 1−ǫ pti ℓeti E ≤ 1 − ǫ/2 t i " # X A(d, T ) e t ≤E ℓf + L · ǫ′ t X   A(d, T ) ≤ E ℓtf + ′ ′ γ ·ǫ t X   A(d, T ) = E ℓtf + 16α · ǫ2 t " XX h i as E ℓeti = ℓti on all arms played. by Lemma 3.1. by the low approx regret of A. as the estimator is negatively biased using definitions of L, γ ′ , γ and ǫ′ . Notice that it was important to be able to use a freezing threshold γ ∝ ǫ/α instead of γ ∝ ǫ/d for the above analysis, allowing an approximate regret bound with no dependence on d. 11 High probability bound. To obtain a high-probability guarantee (and hence a bound on the actual regret, not pseudoregret), we encounter an additional complication since we need to upper bound the cumulative estimated loss of the comparator by its cumulative actual loss. For this purpose, the mere fact that the estimator is negatively biased does not suffice. The estimator may, in principle, be unbiased (if the arm is never frozen), and the variance it suffers can be high, which could ruin the smallloss guarantee. To deal with this, we apply a concentration inequality, comparing the expected loss to a multiplicative approximation of the actual loss. This is inspired by the approximate regret notion, is a quantity with negative mean, and has variance that depends on 1/ǫ as well as the magnitude of the estimated losses which is 1/γ ′ . Theorem 3.5. Let A be any full information algorithm with an expected approximate regret guarantee of: E[ApxReg(f, ǫ/5)] ≤ 5L·A(d,T )/ǫ, against any arm f , whenrun on losses in [0, L]. Algorithm 1 run d/δ )) with probability 1 − δ with A has approximate regret guarantee: ApxReg(f, ǫ) = O α·(A(d,T ǫ)+log( 2 for any δ > 0. To prove the theorem, we need the following concentration inequality, showing that the sum of a sequence of (possibly dependent) random variables cannot be much higher then the sum of their expectations: Lemma 3.6. Let (xt )t≥1 be a sequence of non-negative random variables, s.t. xt ∈ [0, 1]. Let Et−1 [xt ] = E[xt |x1 , . . . , xt−1 ]. Then, for any ǫ, δ > 0, with probability at least 1 − δ X t xt − (1 + ǫ) X t Et−1 [xt ] ≤ (1 + ǫ) ln(1/δ ) ǫ and also with probability at least 1 − δ (1 − ǫ) X t Et−1 [xt ] − X t xt ≤ (1 + ǫ) ln(1/δ ) ǫ The proof follows the outline of classical Chernoff bounds for independent variables combined with the law of total expectation to handle the dependence. For completeness, the proof details are provided in Appendix A. Proof of Theorem 3.5. To obtain a high-probability statement, we use Lemma 3.6 multiple times as follows: 1. Show that the sum of the algorithm’s losses stays close to the sum of the expected losses. 2. Show that the sum of the expected losses stays close the sum of the expected estimated losses used by the full information algorithm A 3. Show that the sum of the estimated losses of each arm f stays close to the sum of the actual losses. Starting with the item 1, we use xt = ℓtI(t) , and note that its expectation conditioned on the previous P losses is mt = i wit ℓti so we obtain that, for any δ′ , ǫ > 0, with probability at least (1 − δ′ ) X t ℓtI(t) − (1 + ǫ′ ) XX t i wit ℓti ≤ (1 + ǫ′ ) ln(1/δ′ ) ǫ′ Next item 3, for a comparator f we use the lemma with xt = ℓetf and its expectation mt = ℓtf . Now xt 12 is bounded by 1/γ and not 1, so by scaling we obtain that with probability (1 − δ′ ) X t ℓetf − (1 + ǫ′ ) X t ℓtf ≤ (1 + ǫ′ ) ln(1/δ′ ) γǫ′ P Finally, we use the lower bound in the lemma to show item 2: for xtP = i pti ℓeti , the expected losses observed by the full information algorithm, and its expectation mt = i pti ℓti . Again, the xt ∈ [0, 1/γ ] so we obtain that with probability (1 − δ′ ) XX t i pti ℓti − (1 + ǫ′ ) XX t i pti ℓeti ≤ (1 + ǫ′ ) ln(1/δ′ ) γǫ′ Using union bound and δ′ = δ/(d + 2), all these inequalities hold simultaneously for all δ > 0. To ′ simplify notation, we use B = (1+ǫ ) ln((d+2)/δ) for the error bounds above. γǫ′ Combining all the bounds we obtain that X t ℓtI(t) ≤ (1 + ǫ′ ) XX t wit ℓti + B i 1 + ǫ′ X X t t p i ℓi + B ≤ 1 − ǫ′ t i ! (1 + ǫ′ )2 X X t et pi ℓi + 2B ≤ 1 − ǫ′ t i ǫ′ )2 (1 + ≤ (1 − ǫ′ )2 X t ℓetf by item 1 above by Lemma 3.1 ! by item 2 above A(d, T ) + 2B + γ · ǫ′ (1 + ǫ′ )3 X t A(d, T ) ≤ ℓf + 3B + ′ 2 (1 − ǫ ) γ · ǫ′ t The theorem then follows as (1+ǫ′ )3 (1−ǫ′ )2 ! ! by the low approx. regret of A by 3 applied to f ≤ (1 − ǫ)−1 for ǫ′ = ǫ/5. The small-loss guarantee without knowing α. We presented the results so far in terms of approximate regret and assuming we have α, an upper bound for the maximum independent set, as an input. Next we show that we can use this algorithm with the classical doubling trick without knowing α, and achieving low regret both in expectation as well as with high probability, not only approximate regret. We start with a large ǫ and small α and halve and double them respectively, when observing that they are not set right. There are two issues worth mentioning. First, unlike full information, partial information does not provide access to the loss of the comparator L⋆ . As a result, we apply doubling trick on the loss of the algorithm instead and then bound the regret of the algorithm appropriately. This is formalized in the following lemma which follows standard doubling arguments and whose proof is provided in Appendix A for completeness. Lemma 3.7 (standard doubling trick). Suppose we have a randomized algorithm that takes as input any ǫ > 0 and guarantees that, for some q ≥ 1 and some function Ψ(·), and any δ > 0, with probability 13 1 − δ, for any time horizon s and any comparator f : (1 − ǫ) s X t=1 ℓtI(t) ≤ s X t=1 ℓtf + Ψ(δ) . ǫq Assume that we use this algorithm over multiple phases (by restarting the algorithm when a phase b τ denotes the cumulative loss of b τ > Ψ(δ)q where L end), we run each phase τ with ǫτ = 2−τ until ǫτ L (ǫτ ) the algorithm for phase τ . Then, for any δ > 0, the regret for this multi-phase algorithm is bounded, with probability at least 1 − δ as:   1    q q+1 δ δ ⋆ + Ψ log(L⋆ +1)+1 Reg ≤ O (L ) q+1 Ψ log(L⋆ +1)+1 Second, observing the maximum independent set is challenging since this task is NP-hard to approximate. However, if one looks carefully into our proofs, we just require knowledge of a maximal independent set on the γ-frozen arms and not one of maximum size. This can be easily computed greedily at each round. Combining these two observations, we prove the following small-loss guarantee. Theorem 3.8. Let A be any full information algorithm with ǫ-approximate regret bounded by L·A(d,T )/ǫ when run on losses in [0, L] and with parameter ǫ > 0. If one runs Algorithm 1 using the doubling scheme as in Lemma 3.7 and tuning α appropriately on each   phase, then for any δ > 0, with probability   ⋆ +1) . at least (1−δ) the regret of this algorithm is bounded by O (L⋆ )2/3 (αA(d, T ))1/3 + αA(d, T ) log d log(L δ Proof. First for simplicity assume that α is known in advance. In this case, using Theorem 3.5, we can conclude that for any  δ, ǫ > 0, Algorithm 1 run with A enjoys an ǫ-approximate regret guarantee of  α·(A(d,T )+log(d/δ)) . Hence, running Algorithm 1 while tuning ǫ-parameter using doubling trick as O ǫ2 in Lemma 3.7 with Ψ(δ) = O(α · (A(d, T ) + log(d/δ )) and q = 2 yields the regret guarantee of    d log(L⋆ + 1)  1/3 ⋆ 2/3 O (L ) (αA(d, T )) + αA(d, T ) log δ If α is not known in advance, we can begin with a guess (say α′ = 1) and double the guess every time that this is incorrect, i.e. the maximal independent set of the γ-frozen nodes has more than α′ nodes. We make at most log(α) updates. Within one phase with the same update, the previous guarantee holds with probability at least some δ′ . At the time of the update we can lose an extra of at most 1. For the rest of the rounds, the guarantees work additively. Therefore, setting δ′ = δ/log(α), we obtain the previous guarantee with an extra log(α) decay in the guarantee. Since α < d, the dependence on log(α) is dropped in the O notation of the regret bound. 4 Other applications of the black-box framework The framework of the previous section can capture via a small modification other partial information feedback settings. We discuss here semi-bandits and contextual bandits (including applications with infinite comparator classes), as well as learning tasks against shifting comparators. In these settings, our framework converts data-dependent guarantees of full-information algorithms (which are well understood) to similar high-probability bounds under partial information. 14 4.1 Semi-bandits To model semi-bandits as a variant of our feedback graph framework, we construct a bipartite graph with nodes F and E, and connect strategies f to the elements included in f . Similarly to the previous section, we provide a reduction from full information to partial information for this setting. The full-information algorithm runs on estimated losses created by importance sampling as before and induces, at round t, a probability distribution pt on the set of strategies F as only strategies can be selected and not individual elements. We assume a bound on the expected approximate regret of B(ǫ, T, F) for the full information algorithm when losses are in [0, 1]. This will scale linearly with the magnitude of losses L of an action f ∈ F. We apply importance sampling and freezing to the elements e ∈ E. The probability of observing an element is the sum of the probabilities of the adjacent strategies. For clarity of presentation, we first assume that we have access to these probabilities and then show how this can be obtained via sampling. This demonstrates the leverage freezing offers in bounding the number of samples required. We modify the freezing process to freeze elements when observed with probability less than γ, and then freeze all strategies that contain some frozen element. The reduction is similar to the one of Algorithm 1: In steps 3 and 4 of the algorithm, we only freeze nodes that are in the set E if their observation probability is below the threshold and apply a single threshold γ = ǫ/|E| for all the recursive steps (instead of multi-thresholding). We subsequently freeze any node in F that is adjacent to a frozen node in E, and repeat the recursive process until no unfrozen element e has probability of observation smaller than γ. After the freezing process, the final probability distribution wt is derived again via a renormalization on the non-frozen strategies as in step 5 of Algorithm 1. Given that, we can now provide the equivalent lemma to Lemma 3.1 to bound the total frozen probability. P Lemma 4.1. At round t, the total probability of frozen strategies F t ⊂ F is at most ǫ, i.e. i∈F t pti ≤ ǫ. Proof. When a node in E becomes frozen in the initial step, it means that its probability of observation is less than γ. Since the probability of playing adjacent nodes in F contributes to this probability of observation, at the initial step of the recursive process, the total probability frozen is less than γ times the number of nodes in E that are frozen. As before, freezing some nodes in E, may cause other nodes to become frozen. By freezing e ∈ E, we also freeze all its neighbors F, which can decrease the observation probability of other edges. In subsequent steps, if an element becomes frozen its total probability of observation by not already frozen strategies is at most γ. Hence the total frozen probability is at most γ · |E| which concludes the lemma. Using the Follow the Perturbed Leader algorithm [KV05] we get an approximate regret bound of B(ǫ, T, F) = log(|F |)/ǫ. The magnitude of the estimated losses of a strategy is at most L = m/γ where m corresponds to the maximum number of elements in a strategy, e.g., the maximum length of any path. Theorem 4.2. Let A be any full information algorithm for the problem whose expected approximate regret is bounded as ApxReg(f, ǫ/3) ≤ L · B(ǫ, T, F) when run on losses bounded by L. Further assume that we have access to the probability of occurrence of each e ∈ E in the solution picked by A on every round. Then, A run on estimated losses with appropriate freezing guarantees that for any δ > 0 with probability 1 − δ,   2 m log(|E|/δ) mB(ǫ, T, F) + ∀f ∈ F, ApxReg(f, ǫ) = O ǫ2 ǫ Proof. The proof follows similarly as the one of Theorem 3.5 adjusted to the semi-bandit setting. We 15 denote by Wet the probability of observing an element e. Also we use the subscript i for strategy nodes (paths) and the subscript e for element nodes (edges). Recall that m is the maximum number of edges in any path. More formally, for each comparator f ∈ F, we obtain the following set of inequalities with probability at least 1 − δ′ : X X XX XX X X X Wet ℓete = Wet ℓete = wit ℓeti ℓtI(t) = ℓte = t t ≤ t e∈I(t) 1 1 − ǫ′ XX t pti i∈F t e∈I(t) X e∈i e∈E t i∈F ℓete Using Lemma 4.1 Using the full information guarantee and noting that losses are bounded by L = m/γ, this is bounded by  ! X 1 B(ǫ′ , T, F) e t ≤ ℓf + m (1 − ǫ′ )2 γ t Now by applying concentration Lemma 3.6, for each f and taking a union bound over f ∈ F,  ! ln(|F |/δ′ ) mB(ǫ′ , T, F) (1 + ǫ′ ) X t ℓf + ≤ + γ · ǫ′ γ (1 − ǫ′ )2 t Since |F| ≤ |E|m , using γ = ǫ/|E| and ǫ′ = ǫ 3 such that (1 + ǫ) = 1+ǫ′ , (1−ǫ′ )2 we conclude the proof. Sampling the probabilities of observation. In the previous part, we assumed that, at any point, we have access to the probability that an element is observed. This is used both to define which elements are frozen and to define the estimated loss ℓete . Note that algorithms for semi-bandits such as Follow the Perturbed Leader do not provide directly these probabilities, but instead maintain weights on elements only, and offer a method to sample the strategies using these weights. This assumption can be removed by appropriate sampling. More formally, we first create estimates on the observation probabilities of all the elements via drawing actions from the full information algorithm. If the elements have observation probability less than γ then we freeze them as in the recursive steps of the algorithm. This process could in principle require many samples to obtain such estimates. However, freezing provides leverage since we do not need to compute exact estimates but we are fine if we have established whether they are i) with high probability greater than γ/2 if we do not freeze them (so that we use 2/γ as a bound on the magnitude and ii) with high probability less than 2γ as we then just need to set ǫ half of what we discussed before to still get the same bound on the total probability of being frozen. This task requires e 1/ǫ2 γ ) steps with high probability. Since there is at most a 1 − ǫ probability that is not frozen, the O( samples that need to be discarded as they include frozen arms are rare and do not affect the high probability guarantee. We provide details of this argument in Appendix B.1. 4.2 Contextual bandits Contextual bandits can be seen as a direct application of the graph based feedback learning problem. The nodes of our graph are the policies, and two policies f and f ′ are connected by an edge at time t if they recommend the same action in the context of time t, that is if f (xt ) = f ′ (xt ). The feedback graph Gt in this case is changing at each time step, but it is always a set of disjoint cliques. If the feedback graph consists of just cliques, we do not need the recursive freezing step of the Algorithm 1 16 (Step 4 ), as a node in Gt freezes together with the whole clique it is contained in: effectively, we are freezing an action in each step if the probability mass of the policies recommending the action is below γ. As a full information algorithm for this problem, we can use the oracle-efficient contextual bandit algorithms of [RS16, SLKS16], where oracle-efficient refers to the fact that the algorithm chooses an action using an oracle without needing to keep track of information for each policy, which allows it to p large policy sets. This algorithm has approximate regret at most B(ǫ, T, F) = T log(|F|) when losses are in [0, 1]. The magnitude of the estimated losses is 1/γ . We note that the above papers make some assumptions on the way the contexts are coming (the contexts are either known in advance or coming from a known distribution). Our result for partial information feedback needs exactly the assumptions used by the underlying full information algorithm. Theorem 4.3. Assuming that the oracle-efficient full-information algorithm A has ǫ-approximate p regret B(ǫ, T, F) = T log(|F |) when applied on losses in [0, 1], A run on the estimated losses coming from the freezing process with ǫ′ = ǫ/2, withprobability 1 − δ for any δ > 0 has ǫ-approximate  and √ |F | d· T log(|F |) regret ApxReg(f, ǫ) = O + d·log(ǫ2 /δ) for all f ∈ F. ǫ The proof follows by exactly the same ideas as before and is provided in Appendix B.2. √ Applying the  e T + T 1/4 (L⋆ )1/2 . doubling trick as above, we can create a guarantee that is partly data-dependent, i.e. O If we use as a full information  algorithm the algorithm of Syrgkanis et al. [SLKS16], this guarantee √ 1/3 1 / 3 ⋆ e T + T (L ) e T 2/3 established by becomes O which improves on the best known bound of O their paper.   e (L⋆ )2/3 We note that, by using multiplicative weights as a full-information algorithm, one can derive a O guarantee that is however inefficient as it needs to keep weights for every policy. This was sketched in the open problem of Agarwal et al. [AKL+ 17] who asked for an oracle-efficient version of the above bound. Although we do not provide such a bound, our result improves on the best known bounds by replacing some of the dependence on the time horizon by L⋆ . Infinite comparator class F. The black-box analysis need not be restricted to finite set F of policies. One can also consider a, potentially uncountable, infinite set F. In this case, most of the black-box reduction works just as in the finite case. The non-trivial part is the union bound to obtain high probability bounds. After bounding the probability that a single comparator f has small approximate regret ApxReg(f, ǫ) with probability at least δ, using union bound, we can derive a high-probability bound for all comparators simultaneously with an additional log(|F |) factor. This is not possible for an uncountable infinite class F. To this end one needs tail bounds uniformly over F of the form: For any δ > 0, with probability at least 1 − δ, ( T ) T X X  d log(1/δ) sup ℓt (f ) ≤ RT F, ǫ2 /d + ℓ̃t (f ) − (1 + ǫ) ǫ2 f ∈F t=1 t=1  where RT F, ǫ2 /d is the so called offset Rademacher Complexity introduced in [RS14]. This capacity measure of class F is defined as: # " T X 2 σt f (xt (σ1 , . . . , σt−1 )) − ǫ(f (xt (σ1 , . . . , σt−1 ))) RT (F, ǫ) = sup Eσ sup x1 ,...,xT f ∈F t=1 17 where in the above each xt : {±1}t−1 7→ X is a mapping from a sequence of ±1 bits to the context space and σ1 , . . . , σT are Rademacher random variables. This capacity measure is close in spirit to the Rademacher complexity. If one drops the quadratic term in the definition, this would correspond to the sequential Rademacher complexity [RST10]. The quadratic term subtracted makes this complexity measure smaller than the Rademacher complexity. As a specific example, for a finite F, this complexity can be bounded as RT (F, ǫ) ≤ log |F |/ǫ thus giving us the finite class result as a special case. The above tail bound is proved in the Appendix B.2 and is based on the results from [RS17]. Using the tail bound above, we prove the following result just as in the finite case. Theorem 4.4. Assuming that the oracle-efficient full-information algorithm A has ǫ-approximate regret B(ǫ, T, F) when applied on losses in [0, 1], A run on the estimated losses coming from the freezing process and with ǫ′ = ǫ/2, with probability 1 − δ for any δ > 0 has ǫ-approximate regret    d log(1/δ) d B(ǫ, T, F) + RT F, ǫ2 /d + . ApxReg(f, ǫ) = O ǫ ǫ2 4.3 Shifting comparators In shifting bandits, the set F corresponds to a sequence of arms in [d] that change over the T rounds, and for f ∈ F use f (t) to denote the arm in the sequence at time t. We will denote K(f ) as the number of times f changes over the T rounds. As in the previous application: nodes of the graph are the set of comparators F, and two comparators f and g are connected by an edge at time t if the sequences have the same arms at time t, that is, if f (t) = g(t). The expected approximate regret assumption for this setting in the full information case is K(f ) log(dTǫ )+2 log(d) if the losses are in [0, 1]. This full information assumption is satisfied for instance by the Noisy Hedge which is multiplicative weights algorithm (with uniform noise of 1/T added in) as presented in [FLL+ 16]. Using our black box reduction one can obtain a bandit shifting algorithm with the following bound on approximate regret. Theorem 4.5. Under the above assumptions about the full information algorithm A and the knowledge of the probabilities, A run on the estimated losses coming from the freezing process and with ǫ′ = ǫ/2, with probability 1 − δ for any δ > 0 has approximate regret against any sequence f ,   dK(f ) log(dT ) + 2d log(d) + d log(1/δ) ApxReg(f, ǫ) = O ǫ2 where for all f ∈ [d]T , K(f ) = |{t < d : f (t) 6= f (t + 1)}|, the number of times the comparator switches. Proof. The proof follows the same steps as the proof in the previous subsection with a more intricate union bound to account for the exponential number of comparators. A vanilla union bound would lead to a linear dependence on time horizon since the number of comparators is exponential. Instead for   T comparator f , we create an approximate regret with failure probability δ′ = δ/ 1+(K(f . Essentially )) δ the idea is to provide failure probability for each comparator level (number of changes) of /T and then split it uniformly across comparators of the same number of changes. Therefore, what is coming as a linear term from the log(1/δ′ ) term is a term logarithmic in T and linear to the number of changes of the comparator instead of the time horizon. This linear term already appears in the full information algorithm bound so there is no added term in the regret. 18 Implications to dynamic population games: Our guarantees on low approximate regret have significant implications to repeated game settings where the player set is evolving over time [LST16, FLL+ 16]. In these papers, learning is used as a behavioral assumption. The papers consider a dynamic population game where, at every round, each player is independently replaced by an adversarially selected player with some turnover probability. This model of evolving games was introduced in [LST16] and is further studied in [FLL+ 16]. These papers show that in a broad class of games, if all players use algorithms to select their strategies that satisfy low approximate regret with shifting comparators then the time-average social welfare of the corresponding learning outcomes is approximately efficient even when the turnover probability is large (constant with respect to the number of players and inversely dependent on the ǫ of the approximate regret property). This means that, even when a large fraction of the population changes at every single round, players manage to still adapt to the change and guarantee efficient outcomes in most time steps. The results of this paper can be applied to dynamic population games and strengthen the results of [LST16, FLL+ 16] extending it to games with cost and only partial feedback to the players. Previous work only provided full information algorithms for achieving low approximate regret. Our results strengthen the behavioral assumption showing that low approximate regret with shifting comparators is achievable even at the presence of partial information feedback by a small and natural change in any full information learning algorithms. 5 Obtaining √ L⋆ bounds In this section we focus our attention on proving improved guarantees for most of the settings considered in the previous section when our framework is applied on specific full-information algorithms. In Section √ e L⋆ ) bound for the classical bandit feedback answering 5.1, we present an optimal high-probability O( an open question of Neu [Neu15a], combining our analysis with the Multiplicative weights algorithm. In Section 5.2, we apply our framework to the Follow the Perturbed Leader algorithm and show how to obtain optimal high-probability small-loss guarantees for semi-bandits, answering open questions raised in [Neu15b, Neu15a]. In Section 5.3, we return on a general graph-based feedback but restrict our attention on fixed feedback graphs – for this case, we provide an optimal dependence on L⋆ at the expense of a dependence on the minimum clique partition instead of the independence number. Finally, in Section 5.4, we show how one can derive optimal approximate regret guarantees for shifting comparators. 5.1 Pure bandits To achieve optimal dependence on L⋆ , we need to better understand the places where the inefficiency arises. The first such place is when we apply the bound of the full-information which, in a blackbox analysis, needs to have dependence both on the magnitude of losses, L ≤ 1/γ ′ , and on the approximation parameter ǫ. Instead of applying this bound, we provide a refined analysis that relates the expected estimated loss of the full information algorithm to the sum of the cumulative estimated losses of all the arms. Using multiplicative weights as a full-information algorithm guarantees that the cumulative estimated losses of all the arms are close to each other (Lemma 5.2) which enables us to remove this inefficiency. This was also used by Allenberg et al. [AAGO06] to prove optimal pseudoregret guarantees but their analysis did not extend to high-probability. To derive the high-probability guarantee, we address the second inefficiency of the black-box, where to bound the negative bias of the comparator’s cumulative estimated loss by its cumulative actual loss, we again had dependence on both the magnitude of the estimated losses and ǫ. For that we apply the implicit exploration idea of Neu et al. [NB13, KNVM14, Neu15a] which creates a negative bias to all arms and not only the 19 arms that are frozen (Lemma 5.3). Neu [Neu15a] used implicit exploration to provide high-probability uniform bounds. However, without combining it with freezing, his results did not extend to small-loss. Combining our framework with both multiplicative weights and implicit exploration, we obtain an algorithm we term GREEN-IX (Algorithm 2) that, with high-probability, guarantees regret bound of √ O( L⋆ ).   d Theorem 5.1. GREEN-IX run with parameter ǫ guarantees an ǫ-approximate regret of O d log(ǫ /δ) with probability at least 1 − δ. Algorithm 2 GREEN-IX Require: Number of arms d, parameter ǫ. 1: Initialize p1i for arm i uniformly (pti = 1/d) and set t = 1 (round 1). 2: for t = 1 to T do  3: Freeze arm i if its probability pti is below threshold γ = ǫ/2d to create the set F t = i : pti < γ . 4: Normalize the probabilities of unfrozen arms so that they form a distribution.  0 if i ∈ F t t t wi = p  1−P i pt else t j∈F wt j ℓtI(t) . Draw arm I(t) ∼ and incur loss 6: Compute biased estimate of losses via implicit exploration ζ = ǫ/4d: ( ℓt i if i = I(t) t . ℓeti = wi +ζ 0 else 7: Update pt+1 via multiplicative weights update with learning rate η = ǫ/4d: pt+1 ∝ pti exp(−η ℓeti ). i i 8: end for 5: Lemma 5.2 (implied by the proof of Theorem 2 in [AAGO06]). When using multiplicative weights as the full-information algorithm, for any two arms i and j, T X t=1 ℓeti ≤ T X t=1 1 ln(1/γ ) ℓetj + + γ η Proof. Let Ti be the last round that i is not frozen. Thus its probability is then greater than γ.  P   P  Ti −1 et Ti −1 et exp −η t=1 ℓi exp −η t=1 ℓi ≤  P   P γ ≤ pTi i = P Ti −1 et Ti −1 et exp −η ℓ exp −η ℓ k t=1 k t=1 j As a result: TX i −1 t=1 ℓeti ≤ TX i −1 t=1 T T t=1 t=1 X X 1 ln(1/γ ) ln(1/γ ) ⇒ , ℓeti ≤ ℓetj + + ℓetj + η γ η where the last inequality follows as ℓeti ≤ 1/γ for all arms at all times and the estimated loss of i is 0 after round Ti by definition of Ti . Lemma 5.3 (implied by Corollary 1 in [Neu15a]). With probability at least 1 − δ, any full information 20 algorithm run on estimated losses ℓet with implicit exploration satisfies: T  X t=1 for all arms i ∈ [d] simultaneously.  log(d/δ ) ℓeti − ℓti ≤ 2ζ Proof. The lemma essentially follows from Corollary 1 in [Neu15a], that proves the analogous statement when there is just implicit exploration without freezing. Let’s consider some fictitious losses ℓ̄ti that are equal to the actual losses for all arms i ∈ / F t and 0 for arms i ∈ F t and let ℓbti be the estimated loss with  PT  bt t ℓ − ℓ̄t ≤ just implicit exploration the losses ℓ̄ . Then Corollary 1 in [Neu15a] establishes that: i t=1 i i log(d/δ) 2ζ simultaneously for all i with probability at least 1 − δ. The lemma follows by noting that the fictitious estimated losses are equal to the true estimated losses, i.e. ℓbt = ℓet , since all the non-frozen i i arms have the same actual losses and that the fictitious actual losses are no greater than the true actual losses, i.e. ℓ̄ti ≤ ℓti since the only difference occurs on arms with ℓ̄ti = 0 and all the actual losses are non-negative. Lemma 5.4 (see for instance [CBL06]). Multiplicative weights with learning rate η applied on the estimated losses satisfies: XX X X X  2 log(d) pti ℓeti − ℓetf ≤ η pti ℓeti + η t t t i i Proof of Theorem 5.1. The proof follows the roadmap of the proof of Theorem 3.5 but handles the suboptimal places of the black-box theorem’s proof by applying Lemmas 5.2 and 5.3. We show that for each arm f , the guarantee holds with failure probability δ′ = δ/d. Therefore the guarantee holds against all the arms f simultaneously with probability at least 1 − δ. More formally: X XX  (1 − ǫ) wit + ζ · ℓeti by definition of ℓeti ℓtI(t) = (1 − ǫ) t t ≤ ≤ ≤ ≤ i XX 1 − ǫ X X t et p i ℓi + ζ ℓeti 1 − γd t t i i X X  2 log(d) XX 1 − ǫ X et ℓf + η pti ℓeti + +ζ ℓeti 1 − γd t η t t i i X X X 1−ǫ log(d) ℓet + (η + ζ) ℓeti + 1 − γd t f η t i   X 1 ln(1/γ ) 1 − ǫ X et t e ℓ + (η + ζ) dℓf + d(η + ζ) + 1 − γd t f γ η t=1 by Lemma 3.1 by Lemma 5.4 as ℓti ≤ 1 and pti ≤ wit + ζ by Lemma 5.2 Now we use the strict negative bias of Lemma 5.3 to get that with probability at least (1 − δ′ ) we can continue the above inequalities as:   X X 1−ǫ X t log(d/δ′ ) 1 ln(1/γ ) log(d/δ′ ) t t (1 − ǫ) ℓI(t) ≤ ℓf + + (η + ζ) dℓf + d(η + ζ) + + 1 − γd 2ζ γ η 2ζ t t t=1 X 2 log(d2/δ ) + d(1 + 2 ln(2/ǫ) + log(d2/δ )) ≤ ℓtf + ǫ t 21 where the final inequality is derived by replacing the parameters γ, ζ, η, and δ′ , and using the fact that 1−ǫ 1−γd + (η + ζ)d ≤ 1 for the selection of the parameters.  p e Corollary 5.5. GREEN-IX applied with doubling trick on parameter ǫ guarantees regret of O d log(d/δ ) · L⋆ p e d log(d) · L⋆ ). with probability at least 1 − δ, and hence expected regret at most O( The proof follows similarly to the one of Theorem 3.5 by applying Lemma 3.7 with Ψ(δ) = O(d log(d/δ )) and q = 1. 5.2 Semi-bandits In order to obtain an improved guarantee for semi-bandits, we need algorithm-specific arguments to address the inefficiencies in the black-box analysis. For semi-bandits we use the Follow the Perturbed Leader algorithm of [Han57, KV05], based on the idea of perturbing the cumulative loss of elements by adding a random variable coming from an exponential distribution and then selecting the strategy with the minimum perturbed cumulative loss. This way of selecting a strategy allows us to use an “oracle” to select the strategy with minimum perturbed loss without explicitly maintaining losses or probabilities for all strategies. For example, when choosing paths as strategies, one can compute shortest paths in an efficient way. Neu [Neu15b] provided an adaptation of the algorithm with optimal small-loss pseudoregret guarantee in expectation which he termed TruFPL. He adapted the Follow the Perturbed Leader in algorithm with two changes: implicit exploration and truncation. His analysis implies a small-loss guarantee for the full-information algorithm run on estimated losses. Lemma 5.6 (implied by Lemmas 6, 7, and 8 in [Neu15b]). TruFPL run on estimated losses satisfies the following guarantee for any f ∈ S: X g∈S ptg ℓetg ≤ X t ℓetf + η · m XX t j∈E m log(dT/m) + 1 ℓetj + η Proof. The proof follows the arguments in [Neu15b] but requires a stronger union bound (over the time horizon as well) in his proof of Lemma 6. This is necessary as Follow the Perturbed Leader requires fresh perturbations for each round to work against adaptive adversaries. As a result, the guarantee Neu provides for a fixed truncation (which is a function of the perturbation) needs to be strengthened to work for all truncations used (that correspond to each round in the time horizon). To ensure that the cumulative estimated losses are not too far from each other, Neu truncated the perturbations that are higher than some parameter. The effect of this truncation is similar to one of the effects of freezing: if two strategies differ significantly in their cumulative loss, adding truncated noise does not change their order, so the higher loss strategy is not selected. By using his algorithm he shows Lemma 5.7 which can be viewed as an equivalent of Lemma 5.2. This addresses the first inefficiency. Lemma 5.7 (Lemma 2 in [Neu15b]). TruFPL run on the estimated losses guarantees that, for any element j ∈ E and strategy g ∈ S, T X t=1 ℓetj ≤ T X X t=1 m log(d/m) eTj + ℓj ℓete + η e∈g where Tj ≤ T is the last time that element j had non-zero probability. 22 To use Follow the Perturbed Leader as a basis in an algorithm with partial feedback, we need to create an estimated loss for each element. Using importance sampling, for each element e we need the probability that a strategy g including e selected. Neu uses the technique of geometric resampling [NB13] to create estimators that are equal in expectation to the ones developed by importance sampling (without actually computing the probabilities of each element). This technique works well in expectation but does not concentrate which creates a roadblock in providing high-probability guarantees. Instead, one can use actual sampling to create estimates close to these probabilities. With no lower bound on the targeted probability, the number of samples required for this purpose can be, in principle, unbounded. Freezing addresses this point by giving a lower bound on any probability of interest, and hence guaranteeing an upper bound on the number of samples required as established in Appendix B.1. Combining this with the implicit exploration technique (as in [Neu15a]) which, as before, addresses the inefficiency in the negative bias of the estimated loss of the comparator (Lemma 5.3), we provide the following optimal high-probability approximate regret guarantee (Theorem 5.8). Theorem 5.8. The algorithm of the previous section with Follow the Perturbed Leader as a full information algorithm run on estimated losses with parameters ǫ′ = ǫ/2, γ = ǫ/2d, and η = ǫ/2m2 and combined with implicit exploration with ζ = γ has, with probability at least 1 − δ, ǫ-approximate  (m3 +d) log(dT/mδ ) + m4 d . regret at most O ǫ Proof. Recall that we use Wet and Pet for an element e as the probability that e is observed after and before freezing respectively, i.e. the sum of the probabilities that a strategy g ∈ S containing e is used. X t XX 1 X X t et 1 X X t et Pe ℓe = p g ℓg 1 − γd t 1 − γd t t e∈E e∈E g∈S   XX d/m) 1 X et m log( 1 ≤ ℓetj + ℓf + ηm · +  1 − γd η γ t j∈E t ! ! X X d/m) d/m) m log( m log( 1 1 1 ℓetf + ℓet + ηm2 · + + + ≤ 1 − γd t f η γ η γ t ℓtI(t) = Wet ℓete ≤ The first equality holds by the definition of importance sampling, the first inequality holds by Lemma 4.1, the second equality holds by Lemma 5.6, and the last inequality holds by Lemma 5.7. P Using implicit exploration allows us to bound the term t ℓetf with high probability by the actual losses P t log(d/δ (Lemma 5.3.) The theorem then follows by the substituting the t ℓf at the expense of a term ζ parameters of the statement. Since we have such a high-probability guarantee, we can apply doubling trick similarly as in Theorem 3.8 and derive the optimal small-loss high-probability guarantee answering the open question of Neu [Neu15b, Neu15a]. We can therefore obtain the following small-loss guarantee. Corollary 5.9. The above algorithm applied with  doubling trick on parameter ǫ guarantees regret of  p 4 ⋆ 3 O (L ) (m + d) log(dT/mδ ) + m d log(dT/mδ ) with probability at least 1 − δ. 5.3 Fixed feedback graphs using clique partition In this section, we consider the partial information learning with feedback graph that is fixed across time, and provide an optimal dependence on L⋆ for this case at the expense of using the minimum 23 clique partition number κ(G) instead of the size α of the maximum independent set encountered by the algorithm.  p e To achieve the optimal O κ(G)L⋆ log(d) regret bound, we use the black box framework with mutliplicative weights as the full information engine for the estimated losses along with freezing. The resulting algorithm GREEN-IX-Graph combines features of black box framework of Algorithm 1 with the bandit algorithm GREEN-IX, and adds an additional freezing level to keep estimated losses of all arms close. We use three freezing thresholds: γ and γ ′ like in Algorithm 1, but define γ = Θ(ǫ/κ) using the clique-partition number κ in place of α, and add an additional β = Θ(ǫ/d) on the probabilities of arms being played (rather than observed). Like GREEN-IX, its graph version GREEN-IX-Graph uses the multiplicative weights algorithm as its full information learning algorithm with learning rate η = Θ(ǫ/κ), and updates estimated losses using the implicit exploration with a ζ = Θ(ǫ/κ) using the ℓt t formula ℓeti = (W ti+ζ) if i ∈ NI(t) and 0 otherwise. The algorithm is formally defined in Algorithm 3. i This algorithm achieves an optimal high-probability small loss guarantee using the clique partition number: Theorem 5.10. Algorithm 3 run with an appropriate parameter ǫ′ has the following regret bound with probability at least (1 − δ):  p e κL⋆ log(d/δ) Reg(f ) = O Proof. The novel idea of the proof is to think of the multiplicative weight algorithm as running on two levels: selecting a clique c in a clique partition on the top level, and then selecting an arm i ∈ c in the clique. At the top level there are κ options to choose from, and at the bottom level we are in a full information setting, any node i ∈ c can observe all other nodes in c. To make this analysis work for clique partition, we need to overcome a few difficulties. • We are running the multiplicative weight algorithm, importance sampling and freezing on the real graph G: the algorithm is not explicitly using the clique-partition C, instead we brake the analysis into the two level structure suggested above. • To show the high probability guarantee we show that the expected loss is closely tied with the loss using expected losses observed by the full information algorithm. In particular, we show that P P P wt the algorithm’s loss t ℓtI(t) is very close to the following expression: t i Wit (Wit + ζ)ℓeti . It is P P i not hard to see that the two expressions have the same expectation: wi ℓi . To show that t P iwit t ′ they remain very close we use Lemma 3.6 with xt = ℓI(t) as well as xt = i W t (Wit + ζ)ℓeti . Note Pi wt that (Wit + ζ)ℓeti is either 0 or ℓti , so at most 1, and hence we get that x′t ≤ i Wit ≤ α(G), the i independence number of G as shown by [ACBGM13] for any probability distribution wit . • We add the third threshold β to make sure that the estimated losses of all arms remain close, a property used in low-loss guarantees for the case of bandits. Based on this idea the proof follows a similar structure to the proofs of Theorems 3.5 and 5.1 but needs some extra care in i) introducing an extra freezing threshold based on probability of being played, ii) applying the concentration bounds, and iii) appropriately tackling the resulting second-order term. More formally, we first show the approximate regret guarantee compared to any arm f with probability at least 1 − δ′ where δ′ = dδ . To facilitate the exposition, we present it in steps. 24 Algorithm 3 GREEN-IX-Graph Require: Number of arms d, parameter ǫ, and an estimate on κ ≥ κ(G). 1: Initialize p1i for arm i uniformly (pti = 1/d) and set t = 1 (round 1). 2: for t = 1 to T do 3: Freeze arms whose probability is below β = ǫ/5d to obtain:  D t = i : pti < β 4: Freeze arms whose observation probability is below γ = ǫ/5κ, to obtain:     X F0t = i : ptj < γ   t t j∈Ni \D 5: Recursively freeze remaining arms S if their probability of being observed by unfrozen arms is ′ t t γ below γ = /3 to obtain F = D ∪ k≥0 Fkt where, Fkt = 6:      i∈ / k−1 [ t Fm m=0 ! S t j∈(Nit \ k−1 m=0 Fm ) 8: ptj < γ ′   Normalize the probabilities of unfrozen arms so that they form a distribution.  0 if i ∈ F t t wi = pt  1−P i pt else t j∈F 7: X :    j Draw arm I(t) ∼ wt and incur loss ℓtI(t) . Compute biased estimate of losses via implicit exploration with parameter ζ = ǫ/30κ: where Wit = P j∈Nit wjt ℓeti = ( ℓti Wit +ζ t \F t if i ∈ NI(t) otherwise 0 via multiplicative weights update with learning rate η = ǫ/30κ: Update pt+1 i t e t pi exp(−η ℓi ). 10: end for 9: pt+1 ∝ i Concentration on actual losses: We proceed by upper bounding the loss of the algorithm by a sum of weighted estimated losses. In that, we apply Lemma 3.6 two times. First we relate the loss of the algorithm to its expected performance. With probability (1 − δ′/3) we have: X t ℓtI(t) ≤ (1 + ǫ′ ) XX t i 25 wit ℓti + (1 + ǫ′ ) ln(3/δ′ ) ǫ′ (1) Bounding total frozen probability: Since there are at most d arms, the total probability mass that is frozen at line 3 is at most β · d = ǫ′/5. In the subsequent freezing steps, by Lemma 3.1 is at most pt 4γ · α ≤ 4ǫ′/5. Therefore the total probability frozen is ǫ′ and for any non-frozen arm i: wit ≤ 1−ǫi ′ . (1 + ǫ′ ) XX t i wit ℓti ≤ 1 + ǫ′ X X t t p i ℓi 1 − ǫ′ t (2) i Reduction to estimated losses: We move forward by connecting the performance of the full information algorithm to an analogous expression on estimated losses. The following expression holds deterministically by analyzing the estimated loss term: # " 1 + ǫ′ X X t t 1 + ǫ′ X X pti t e t p i ℓi = (3) (W + ζ) · ℓi E 1 − ǫ′ t 1 − ǫ′ t Wit i i i Concentration on estimated losses: We now wish to connect this expectation to its realization. Unfortunately estimated losses of different arms are conditionally dependent for the same round. Therefore we define the whole summation over the numberPof arms as ourPrandom variable. Note that pt pt (Wit + ζ) · ℓeti ≤ 1 by definition of the estimated loss and i:W t 6=0 Wit ≤ i:W t 6=0 Pit ≤ α as observed i i i i in [ACBGM13]. Therefore we can apply the converse direction of Lemma 3.6 with range of values at most α, and obtain with probability (1 − δ′/3): " # ! (1 + ǫ′ ) X X t et X X pti et 1 + ǫ′ X X pti t e t E (W + ζ)ℓi ≤ p i ℓi + t ζ ℓi + 1 − ǫ′ t Wit i (1 − ǫ′ )2 W i t t i i i (1 + ǫ′ )2 ln(3/δ′ ) α· (1 − ǫ′ )2 ǫ′ (4) Second-order bound of multiplicative weights: We now relate the performance of the full information algorithm on estimated losses to the cumulative estimated loss of a comparator f via Lemma 5.4: XX X XX X X pt log(d) X et log(d) i et pti ℓeti ≤ ℓetf + η pti (ℓeti )2 + ℓi + ≤ (5) ℓf + η t η Wi η t t t t t i i i Decomposing across cliques: What is left is to relate the double summation of the weighted estimated losses to the estimated loss of the comparator. For that we first decompose across cliques. Let C be such a clique partition of minimum size. For a clique c ∈ C, let Pct be the total probability of the nodes in the clique. Note that, for any such node i ∈ c which is non-frozen at round t, it holds that Wit ≥ Pit /3. This is because we are in one of two scenaria: i) no node in the clique is frozen; in this case Wit ≥ Pit ≥ Pct , or ii) some node is frozen which implies that Pct < γ; however i is not frozen and therefore Wit ≥ γ ′ = γ/3. We therefore obtain: X X X pt X X X pt X X X pt X X pt i et i et i et i et ℓ = ℓ ≤ 3 · ℓ = 3 · ℓ i i i t t t t i W W P P c c i i t t t t i c∈C i∈c c∈C i∈c c∈C (6) i∈c Fictitious multiplicative weights within each clique: The key insight of the proof is that the quantity pti/Pct appearing in the previous inequality is the probability of playing arm i if we commit 26 to play one arm from the clique. The sum for a clique in the right most expression is the expected loss of the multiplicative weight algorithm running on the clique. This is because, with multiplicative weights:   P t es exp −η ℓ t s=1 i pi .  P =P t t Pc es exp −η ℓ j∈c s=1 j As a result we can again apply Lemma 5.4, utilizing that estimated losses are at most 1/γ ′ . Let f (c) denote an arbitary representative of the clique c ∈ C. Then: X X pt X X X pt log(d) X et η X X pti et log(d) i et i et 2 et + η ( ℓ ) + ≤ ℓ ℓ + ≤ ℓ + ℓ f (c) f (c) i i Pct Pct η γ′ t Pct i η t t t t i∈c i∈c i∈c This implies (since γ ′ = 2η): X X pt i et ℓ ≤ t i P c t i P et log(d)/η t ℓf (c) + 1− η/γ ′ ≤2 X t log(d) . ℓetf (c) + 2 η (7) Estimated losses close to each other: We now use the same idea of Lemma 5.2 to show that the cumulative estimated losses of the representatives of the cliques are close to the cumulative estimated loss of the comparator f . To this end, for any c ∈ C, we define τc = max{t ≤ T : ptf (c) > β}. Beginning from: pτfc(c) > β and applying the arguments in the proof of Lemma 5.2 and the fact that estimated losses are still bounded by 1/γ ′ (since they are weighted by the probability of observation), we obtain: X t ℓetf (c) ≤ X t ln(1/β ) 1 ℓetf + ′ + γ η (8) Concentration from estimated to actual loss via implicit exploration: Last we need to relate the cumulative estimated loss of the comparator f to its actual loss. This occurs directly by Lemma 5.3, with probability at least 1 − δ′/3 T X t=1 ℓetf ≤ T X ℓtf + t=1 log(3/δ′ ) 2ζ (9) Putting everything together: Combining the numbered inequalities and setting η = ζ = γ ′ /2 and ′ )(1+6ζ+6η 1 ≤ 1−ǫ ǫ′ such that (1+ǫ(1−ǫ , and applying union bound on the failure probabilities concludes the ′ )2 proof for approximate regret. The proof for actual regret then follows doubling trick arguments similar as in previous theorems. LP relaxation: Beyond Clique Partition. In the proof above, we can replace the clique-partition number κ(G) with the smaller linear programming relaxation for clique partition κf (G). Unfortunately this fractional clique partition number is also computationally unfeasible to obtain. 27 κf (G) = min X yc c Clique in G s.t. ∀i ∈ [d] ∀c Clique in G X c∋i yc ≥ 1 yc ≥ 0 We call a solution y to the above linear program a fractional clique-partition, and will use y’s to represent the solution. We note that Algorithm 3 only needed a bound on κ and didn’t use the clique-partition in the algorithm. We claim that we can also use the fractional clique-partition number κf in place of κ and the analogous theorem would hold: Theorem 5.11. Algorithm 3 run with an appropriate parameter ǫ′ using κf in place of κ above, has the following regret bound with probability at least (1 − δ): q  ⋆ e κf L log(d/δ) Reg(f ) = O Proof Sketch: The proof is completely analogous to the proof P of Theorem 5.10: the only change occurs in Eq. (6) where one needs to replace summing over cliques c∈C in each sum with a weighted sum P of the cliques used in the clique partition c∈C yc . The first equation now becomes an inequality X X X pt X X pt i et i et ℓ ≤ yc t i t ℓi W W i i t t i due to the constraint that 5.4 P c∋i yc c∈C i∈c ≥ 1. The rest of the proof follows as before. Shifting comparators Applying the black-box analysis for shifting comparators as in the previous section with multiplicative weights with the small noise and implicit exploration and applying Lemmas 5.2 and 5.3, we directly obtain the optimal high-probability approximate regret guarantee against shifting comparators. This is formally stated in the following corollary. Corollary 5.12. If we run the framework of the previous section with the Noisy Hedge algorithm of [FLL+ 16] we obtain approximate regret against any sequence f ,   dK(f ) log(dT ) + 2d log(d) + d log(1/δ) ApxReg(f, ǫ) = O ǫ where for all f ∈ [d]T , K(f ) = {t < d : f t 6= f t+1 } , the number of times the comparator switches. Remark 5.13. In the above we assumed that the full information algorithm was Noisy Hedge [FLL+ 16] which satisfies the shifting approximate regret in the full-information case. The reason why the small noise there was essential was to establish that, at the time of the switch of comparator, the new comparator arm does not have too low probability. However, this is directly offered by freezing since the cumulative estimated losses stay close to each other and therefore the probability of no arm becomes very small. This shows one more property of freezing: achieving directly shifting guarantees for partial 28 information even when applied on full information algorithms without this property. 6 Discussion We have shown how to obtain small-loss regret guarantees with high probability for general partial information settings in the graph-based feedback model. Our technique captures as special cases important partial-information paradigms such as contextual bandits and semi-bandits, as well as learning with shifting comparators and bandit p feedback. For all these settings, we provide a black-box small-loss e α1/3 (L⋆ )2/3 ), where α can be thought of as an appropriate problem high-probability guarantee of O( dimension of each paradigm and corresponds to the independence number √ of the graph representing the feedback structure. We improve the guarantee to depending only on L⋆ for bandits, semi-bandits, as well as fixed feedback graphs. √ A number of important problems related to our work remain open. Our L⋆ bound for feedback graphs depends on the partition number, rather than the independence number and only works for fixed graph. Our results assume undirected feedback graphs, while a number of applications have directed feedback. Finally, our results for shifting comparators (in Section 5.4) either require knowing the number of changes of the comparator, or are suboptimal in the dependence on this number. We elaborate on each: √ ⋆ e • The first question √ is to derive an algorithm with an optimal dependence of O( αL ) or at least ⋆ e extend our O( κL ) result to evolving graphs. We have shown that our framework applied on specific algorithms can lead to such an improvement for the bandit and semi-bandit settings, resolving open questions by [Neu15b, Neu15a]. In Section 5 (with details in Appendix 5.3), we p e show that when the feedback graph G is not-evolving, we obtain a O( κ(G)L⋆ ) regret guarantee, where κ(G) is the minimum clique partition size. Recent work of [AZBY18] gave an optimal pseudo-regret bound for the contextual bandit setting (resolving an open problem raised by [AKL+ 17]), a special case of graph-based feedback where graphs are evolving and consist of t t disjoint cliques, which implies that κ(G √  √) = α(G ) for all t. This provides hope that our work e αL⋆ or O e κL⋆ result for general graphs. can be extended to a O • The second question is to derive an p algorithm that achieves a shifting regret bound for the e partial information case that is O( K(f ) · L⋆ ) without knowledge of the number of changes K(f ). In Section 5.4 we provide an optimal approximate regret bound. Such a bound is directly useful, for instance, in game-theoretic settings where the approximate regret is the essential quantity. However, unlike all of our other bounds, this one does not lift to small-loss guarantees through the usual doubling trick unless we know the number of changes. This is due to the fact that, if the tuning of ǫ does not depend√on the number of changes, using the doubling ⋆ e trick p only provides a regret bound of O(K(f ) L ). In contrast, in the full-information setting, e K(f )L⋆ ) guarantee algorithms are known [HS09, LS15]. It would be therefore interesting O( to obtain such guarantees in the partial-information setting. • Finally, it would be nice to extend the graph-based feedback results to directed graphs. Our work relies on the undirected nature of the graph in controlling the cascade of propagation in the freezing process. Some of the previous work on uniform bounds [ACG+ 14, ACBDK15] also offer bounds that apply also for the directed case. Providing small-loss bounds for directed feedback graphs is an interesting open problem. Acknowledgements We thank Haipeng Luo for pointing out the connection to the contextual bandit setting and Jake Abernethy, Adam Kalai, and Santosh Vempala for a useful discussion about Follow 29 the Perturbed Leader. References [AAGO06] Chamy Allenberg, Peter Auer, László Györfi, and György Ottucsák. Hannan Consistency in On-Line Learning in Case of Unbounded Losses Under Partial Monitoring, pages 229– 243. Springer Berlin Heidelberg, Berlin, Heidelberg, 2006. [AB10] Jean-Yves Audibert and Sébastien Bubeck. Regret bounds and minimax policies under partial monitoring. Journal of Machine Learning Research, 11:2785–2836, 2010. [ACBDK15] Noga Alon, Nicolò Cesa-Bianchi, Ofer Dekel, and Tomer Koren. Online Learning with Feedback Graphs: Beyond Bandits. COLT 2015 | JMLR W&CP, 2015. [ACBFS03] Peter Auer, Nicolò Cesa-Bianchi, Yoav Freund, and Robert E. Schapire. The nonstochastic multiarmed bandit problem. SIAM J. Comput., 32(1):48–77, January 2003. [ACBGM13] Noga Alon, Nicolò Cesa-Bianchi, Claudio Gentile, and Yishay Mansour. From bandits to experts: A tale of domination and independence. In Christopher J. C. Burges, Léon Bottou, Zoubin Ghahramani, and Kilian Q. Weinberger, editors, NIPS, pages 1610–1618, 2013. [ACDK15] Noga Alon, Nicolò Cesa-Bianchi, Ofer Dekel, and Tomer Koren. Online learning with feedback graphs: Beyond bandits. In COLT, volume 40 of JMLR Workshop and Conference Proceedings, pages 23–35. JMLR.org, 2015. [ACG+ 14] Noga Alon, Nicolò Cesa-Bianchi, Claudio Gentile, Shie Mannor, Yishay Mansour, and Ohad Shamir. Nonstochastic multi-armed bandits with graph-structured feedback. Available at https://arxiv.org/abs/1409.8428, 2014. [AK04] Baruch Awerbuch and Robert D. Kleinberg. Adaptive routing with end-to-end feedback: distributed learning and geometric approaches. In Proceedings of the 36th Annual ACM Symposium on Theory of Computing, Chicago, IL, USA, June 13-16, 2004, pages 45–53, 2004. [AKL+ 17] Alekh Agarwal, Akshay Krishnamurthy, John Langford, Haipeng Luo, and Schapire Robert E. Open problem: First-order regret bounds for contextual bandits. In Satyen Kale and Ohad Shamir, editors, Proceedings of the 2017 Conference on Learning Theory, volume 65 of Proceedings of Machine Learning Research, pages 4–7, Amsterdam, Netherlands, 07–10 Jul 2017. PMLR. [AZBY18] Zeyuan Allen-Zhu, Sébastien Bubeck, and Li. Yuanzhi. Make the minority great again: First-order regret bound for contextual bandits. cite arXiv:1802.03386, 2018. [BCB12] Sébastien Bubeck and Nicolò Cesa-Bianchi. Regret analysis of stochastic and nonstochastic multi-armed bandit problems. Foundations and Trends in Machine Learning, 5(1):1– 122, 2012. [BEDL06] Avrim Blum, Eyal Even-Dar, and Katrina Ligett. Routing without regret: On convergence to nash equilibria of regret-minimizing algorithms in routing games. In Proceedings of the Twenty-fifth Annual ACM Symposium on Principles of Distributed Computing, PODC ’06, pages 45–52, New York, NY, USA, 2006. ACM. 30 [BH05] Avrim Blum and Jason D. Hartline. Near-optimal online auctions. In Proceedings of the Sixteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’05, pages 1156–1163, Philadelphia, PA, USA, 2005. Society for Industrial and Applied Mathematics. [BHLR08] Avrim Blum, MohammadTaghi Hajiaghayi, Katrina Ligett, and Aaron Roth. Regret minimization and the price of total anarchy. In Proceedings of the Fortieth Annual ACM Symposium on Theory of Computing, STOC ’08, pages 373–382, New York, NY, USA, 2008. ACM. [CBGM13] Nicolò Cesa-Bianchi, Claudio Gentile, and Yishay Mansour. Regret minimization for reserve prices in second-price auctions. In Proceedings of the Twenty-fourth Annual ACMSIAM Symposium on Discrete Algorithms, SODA ’13, pages 1190–1204, Philadelphia, PA, USA, 2013. Society for Industrial and Applied Mathematics. [CBL06] Nicolo Cesa-Bianchi and Gabor Lugosi. Prediction, Learning, and Games. Cambridge University Press, New York, NY, USA, 2006. [CHK16] Alon Cohen, Tamir Hazan, and Tomer Koren. Online learning with feedback graphs without the graphs. In Proceedings of the 33rd International Conference on International Conference on Machine Learning - Volume 48, ICML’16, pages 811–819. JMLR.org, 2016. [Cov91] Thomas M. Cover. Universal portfolios. Mathematical Finance, 1(1):1–29, 1991. [FLL+ 16] Dylan J. Foster, Zhiyuan Li, Thodoris Lykouris, Karthik Sridharan, and Éva Tardos. Learning in games: Robustness of fast convergence. In Advances in Neural Information Processing Systems (NIPS), 2016. [FS97] Yoav Freund and Robert E Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. J. Comput. Syst. Sci., 55(1):119–139, August 1997. [HAK07] Elad Hazan, Amit Agarwal, and Satyen Kale. Logarithmic regret algorithms for online convex optimization. Mach. Learn., 69(2-3):169–192, December 2007. [Han57] J. Hannan. Approximation to bayes risk in repeated play. Contributions to the theory of games, 3:97—-139, 1957. [HS09] Elad Hazan and C. Seshadhri. Efficient learning algorithms for changing environments. In Proceedings of the 26th Annual International Conference on Machine Learning (ICML), pages 393–400, 2009. [HW98] Mark Herbster and Manfred K. Warmuth. Tracking the best expert. Mach. Learn., 32(2):151–178, August 1998. [KNV16] Tomáš Kocák, Gergely Neu, and Michal Valko. Online learning with noisy side observations. In Proceedings of the 19th International Conference on Artificial Intelligence and Statistics, AISTATS 2016, Cadiz, Spain, May 9-11, 2016, pages 1186–1194, 2016. [KNVM14] Tomás Kocák, Gergely Neu, Michal Valko, and Rémi Munos. Efficient learning by implicit exploration in bandit problems with side observations. In NIPS, 2014. [KV05] Adam Kalai and Santosh Vempala. Efficient algorithms for online decision problems. J. Comput. Syst. Sci., 71(3):291–307, October 2005. [LR85] T.L Lai and Herbert Robbins. Asymptotically efficient adaptive allocation rules. Adv. Appl. Math., 6(1):4–22, March 1985. 31 [LS15] Haipeng Luo and Robert E Schapire. Achieving all with no parameters: Adanormalhedge. In Proceedings of The 28th Conference on Learning Theory (COLT), pages 1286–1304, 2015. [LST16] Thodoris Lykouris, Vasilis Syrgkanis, and Éva Tardos. Learning and efficiency in games with dynamic population. In Proceedings of the Twenty-Seventh Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 120–129. SIAM, 2016. [LW94] Nick Littlestone and Manfred K. Warmuth. The weighted majority algorithm. Inf. Comput., 108(2):212–261, February 1994. [MS11] Shie Mannor and Ohad Shamir. From bandits to experts: On the value of sideobservations. In John Shawe-Taylor, Richard S. Zemel, Peter L. Bartlett, Fernando C. N. Pereira, and Kilian Q. Weinberger, editors, NIPS, pages 684–692, 2011. [NB13] Gergely Neu and Gábor Bartók. An efficient algorithm for learning with semi-bandit feedback. In Sanjay Jain, Rémi Munos, Frank Stephan, and Thomas Zeugmann, editors, ALT, volume 8139 of Lecture Notes in Computer Science, pages 234–248. Springer, 2013. [Neu15a] Gergely Neu. Explore no more: Improved high-probability regret bounds for nonstochastic bandits. In Proceedings of the 28th International Conference on Neural Information Processing Systems, NIPS’15, pages 3168–3176, Cambridge, MA, USA, 2015. MIT Press. [Neu15b] Gergely Neu. First-order regret bounds for combinatorial semi-bandits. In Proceedings of the 27th Annual Conference on Learning Theory (COLT), pages 1360–1375, 2015. [Rou15] Tim Roughgarden. Intrinsic robustness of the price of anarchy. Journal of the ACM, 2015. [RS13] Alexander Rakhlin and Karthik Sridharan. Online learning with predictable sequences. In Conference on Learning Theory (COLT), pages 993–1019, 2013. [RS14] Alexander Rakhlin and Karthik Sridharan. Online non-parametric regression. In Proceedings of The 27th Conference on Learning Theory, COLT 2014, Barcelona, Spain, June 13-15, 2014, pages 1232–1264, 2014. [RS16] Alexander Rakhlin and Karthik Sridharan. Bistro: An efficient relaxation-based method for contextual bandits. In Proceedings of the 33rd International Conference on International Conference on Machine Learning - Volume 48, ICML’16, pages 1977–1985. JMLR.org, 2016. [RS17] Alexander Rakhlin and Karthik Sridharan. On equivalence of martingale tail bounds and deterministic regret inequalities. In COLT, 2017. [RST10] Alexander Rakhlin, Karthik Sridharan, and Ambuj Tewari. Online learning: Random averages, combinatorial parameters, and learnability, 2010. cite arxiv:1006.1138. [RW16] Tim Roughgarden and Joshua R. Wang. Minimizing regret with multiple reserves. In Proceedings of the 2016 ACM Conference on Economics and Computation, EC ’16, pages 601–616, New York, NY, USA, 2016. ACM. [SLKS16] Vasilis Syrgkanis, Haipeng Luo, Akshay Krishnamurthy, and Robert E Schapire. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 3135–3143. Curran Associates, Inc., 2016. 32 [TDD17] A A.1 Aristide C. Y. Tossou, Christos Dimitrakakis, and Devdatt Dubhashi. Thompson sampling for stochastic bandits with graph feedback. In 14th International Conference on Artificial Intelligence (AAAI 2017), 2017. Supplementary material for Section 3 Concentration inequality Lemma 3.6 (restated) Let x1 , x2 , . . . , xT be a sequence of nonnegative random variables, each with xt ∈ [0, 1], and let mt = Et−1 [xt ] = E[xt |x1 , . . . , xt−1 ], the random variable that is the expectation of xt P P conditioned on the sequence x1 , x2 , . . . , xt−1 . Let ǫ > 0, and X = Tt=1 xt and M = Tt=1 mt . Then, with probability at least 1 − δ (1 + ǫ) ln(1/δ ) X − (1 + ǫ)M ≤ ǫ and also with probability at least 1 − δ (1 − ǫ)M − X ≤ (1 + ǫ) ln(1/δ ) ǫ Proof. The proof follows the basic outline of classical Chernoff bounds for independent variables combined with the law of total expectation to handle the dependence. We start with the first claim. # "T h i Y eλ(xt −(1+ǫ)mt ) P[X − (1 + ǫ)M > B] ≤ e−λB E eλ(X−(1+ǫ)M ) = e−λB E (10) t=1 We will prove by induction on T that the expectation above is at most 1 if we use λ = ln(1 + ǫ). Given this fact, we can set B such that e−λB = e− ln(1+ǫ)B = δ. Using that ln(1 + ǫ) ≥ ǫ/1+ǫ for all ǫ ≥ 0, it 1/δ ) ln(1/δ) . ≤ (1+ǫ)·ln( follows that B = ln(1+ǫ) ǫ Q  Now consider the expectation E t eλ(xt −(1+ǫ)mt ) , we will prove by induction on T that with the above choice of λ this is at most 1. For the base case of T = 1 we have  a single   random variable x ∈ [0, 1] and its expectation m = E[x]. The expectation is E eλ(x−(1+ǫ)m) = E eλx · e−λ(1+ǫ)m . We note that for a value x ∈ [0, 1] and any λ, the following simple inequality holds: eλx ≤ xeλ − x + 1 This is true as it holds with equation for x = 0 and 1, and the difference is a concave function (as the second derivative of g(x) = eλx − xeλ + x − 1 is g ′′ (x) = λ2 eλx ≥ 0), so the inequality is true between the two points. Now write the expectation as h i h   i   h i λ E eλx ≤ E xeλ − x + 1 = E x · eλ − 1 + 1 = m · eλ − 1 + 1 ≤ em·(e −1) . Using this in the expectation we get i h λ λ E eλ(x−(1+ǫ)m) ≤ em·(e −1) · e−λ(1+ǫ)m = em(e −1−λ(1+ǫ)) ≤ 1 33 where the last inequality follows from the choice of λ = ln(1 + ǫ), as the multiplier of m in the exponent with this choice of λ is eλ − 1 − λ(1 + ǫ) = ǫ − (1 + ǫ) ln(1 + ǫ) ≤ ǫ − (1 + ǫ)(ǫ − ǫ2/2) = − ǫ2 (1 − ǫ) < 0. 2 Now we are ready to prove the general case. Using the law of total expectation, we obtain: # # "T −1 "T Y Y eλ(xt −(1+ǫ)mt ) · eλ(xT −(1+ǫ)mT ) eλ(xt −(1+ǫ)mt ) = E E t=1 t=1 # "T −1 i h Y λ(xt −(1+ǫ)mt ) λ(xT −(1+ǫ)mT ) e · E e =E T −1 t=1 where Et−1 [·] is the random variable taking expectation over the last term conditioned on all the previous x1 , . . . , xT −1 . Note that conditioned on the previous terms, the conditional expectation  λ(xterms −(1+ǫ)m T T ) is exactly the base case, and hence at most 1 by the above, so we can conclude ET −1 e that # # "T −1 "T Y Y λ(xt −(1+ǫ)mt ) λ(xt −(1+ǫ)mt ) e ≤E e E t=1 t=1 and the statement follows by the induction hypothesis. To prove the lower bound, we proceed in an analogous way. For λ = − ln(1 − ǫ), using that 1/1−ǫ ≥ 1+ǫ, ln(1/δ) ln(1/δ ) we obtain the equivalent of the inequality (10) with B ≤ ln( 1/1−ǫ) ≤ ln(1+ǫ) . # "T h i Y eλ((1−ǫ)mt −xt ) P[(1 − ǫ)M − X > B] ≤ e−λB E eλ((1−ǫ)M −X) = e−λB E (11) t=1 Regarding the bound on the expectation, consider first a single variable m = E[x]. i h i   h −λ E e−λx ≤ E xe−λ − x + 1 = m e−λ − 1 + 1 ≤ em(e −1) We now bound the expectation as i i h h −λ −λ E eλ((1−ǫ)m−x) ≤ eλ(1−ǫ)m E e−λx ≤ eλ(1−ǫ)m · em·(e −1) = em(λ(1−ǫ)+(e −1)) ≤ 1 where the last inequality follows from the choice of λ = − ln(1 − ǫ), as the multiplier of m in the exponent with this choice of λ is λ(1 − ǫ) + (e−λ − 1) = −(1 − ǫ) ln(1 − ǫ) − ǫ ≤ (1 − ǫ)ǫ − ǫ = −ǫ2 < 0. using the fact that ln(1 − ǫ) ≤ −ǫ. The induction then follows as before. A.2 Transforming approximate regret to small-loss guarantees Lemma 3.7 (restated). Suppose we have a randomized algorithm that takes as input any ǫ > 0 and guarantees that, for some q ≥ 1 and some function Ψ(·), and any δ > 0, with probability 1 − δ, for any 34 time horizon s and any comparator f : (1 − ǫ) s X ℓtI(t) ≤ t=1 s X t=1 ℓtf + Ψ(δ) . ǫq Assume that we use this algorithm over multiple phases (by restarting the algorithm when a phase b τ denotes the cumulative loss of b τ > Ψ(δ)q where L end), we run each phase τ with ǫτ = 2−τ until ǫτ L (ǫτ ) the algorithm for phase τ . Then, for any δ > 0, the regret for this multi-phase algorithm is bounded, with probability at least 1 − δ as:   1    q q+1 δ δ ⋆ + Ψ log(L⋆ )+1 Reg ≤ O (L ) q+1 Ψ log(L⋆ )+1 b τ and the loss of the best arm within Proof. We denote the loss of the algorithm within phase τ as L ⋆ the phase as Lτ . Now note that on any phase τ , by our premise about approximate regret on each phase, we have that with probability at least 1 − δ′ , ′ b τ − L⋆ ≤ ǫτ L b τ + Ψ(δ ) L τ (ǫτ )q b τ of the right hand side can be split in two terms, i) all but the last round of the phase The term ǫτ L ′) due to the doubling condition. The second and ii) the last round. The first term is bounded by Ψ(δ (ǫτ )q term can be upper bounded by ǫτ since the losses are in [0, 1]. Hence, for phase τ , with probability 1 − δ′ : ′ b τ − L⋆ ≤ 2 · Ψ(δq ) + ǫτ . L τ (ǫτ ) Letting Γ denote the last phase and summing over the phases, we have: b − L⋆ ≤ L Γ−1 X Γ−1 ′ 2Ψ(δ′ ) X b Γ + Ψ(δ q) ǫτ + ǫΓ L q + (ǫτ ) (ǫΓ ) τ =0 τ =0 ≤ 2Ψ δ′ Γ Γ−1 X X 1 bΓ 2−τ + ǫΓ L + −qτ 2 τ =0  2q(Γ+1) ≤ 2Ψ δ′ · 2q τ =0 −1 bΓ + 2 + ǫΓ L −1  1 bΓ + 2 + ǫΓ L (ǫΓ )q  1 q/q+1   1/q+1  q/q+1 ′ Ψ(δ′ ) /q+1 q Ψ(δ ) b b · 2 + ǫ L · ǫ L +2 ≤4 Γ Γ Γ Γ (ǫΓ )q (ǫΓ−1 )q 1/q+1   q/q+1  Ψ(δ′ ) 1/q+1  q/q+1 ′ q+2 Ψ(δ ) b b · ǫ · ǫ L + L +2 ≤2 P Γ−1 Γ Γ (ǫΓ )q (ǫΓ )q ≤ 4Ψ δ′ Thus we conclude that: b − L⋆ ≤ O L   1/q+1  q/q+1 b · L Ψ δ Since q ≥ 1 ′ b by L⋆ , we apply Young’s inequality, the approximate regret property, To replace the dependence of L and the sub-additivity property. For simplicity of presentation, we remove the multiplicative and 35 additive constants and use a = q/q+1 so that the analysis is clear for different small-loss powers.  a   b − L⋆ ≤ Ψ δ′ 1−a · L b ≤ (1 − a)Ψ δ′ + aL b⇒ L b≤ L  1 L⋆ + Ψ δ ′ 1−a Replacing to the previous guarantee and applying the subadditivity property    a    a 1 ⋆ ′ 1−a ′ 1−a ⋆ ′ b b L−L ≤Ψ δ · L ≤Ψ δ · L +Ψ δ 1−a 1−a  1 (L⋆ )a Ψ δ′ + Ψ δ′ ≤ 1−a Since there are at most log(L⋆ + 1) + 1 phases, setting δ′ = statements to hold for all phases. B B.1 δ log(L⋆ +1)+1 suffices for the high probability Supplementary material for Section 4 Sample complexity to estimate probabilities in oracle-efficient settings In this section we provide a formal upper bound on the number of samples needed to create the estimates on the probabilities we use for semi-bandits (sections 4.1 and 5.2) and for oracle-efficient contextual bandits (section 4.2). Since we are only allowed to sample solutions instead of directly computing the observation probabilities Pet , we draw N samples at each round and create estimates on these probabilities. t be these samples, and and let P bet = 1 PN 1e∈f t be the empirical frequency of appearLet f1t , . . . , fN i=1 N i ances of each element e. We now run our algorithm by doing importance sampling using Pb . We use t the losses ℓbt = ℓe as estimated losses for the elements e of the selected solution and apply freezing also e Pbet based on this estimate P̂ . That is we freeze element e if Pbet < γ and only look for solutions that do not contain frozen edges while sampling solutions. This gives us the following lemma that, with the appropriate concentration can result to an approximate regret guarantee as in Theorems 4.2 and 5.8. Lemma B.1. If we run the semi-bandit algorithm with ǫ′ = ǫ/6 based on Pbet ’s as estimates in place of ′ /δ) Pet ’s, and N = (1+2ǫ )mǫ′log(dT then for any ǫ, δ > 0 with probability at least 1 − δ over randomization, γ the following inequality is true: X t ℓtI(t) ≤ (1 + ǫ) XX t ℓ̃te + e∈f 2 mB(ǫ/6, T, F) + γ γ Proof. From Lemma 3.6, with probability at least 1 − δ, both the following statements are true: ∀e ∈ E, t ≤ T (1 + ǫ) log(dT/δ ) Pbet ≤ (1 + ǫ)Pet + Nǫ 36 (12) and ∀e ∈ E, t ≤ T Pet ≤ (1 + ǫ)Pbet + (1 + 2ǫ) log(dT/δ ) . Nǫ (13) We adapt the analysis in the proof of Theorem 4.2 to deal with the fact that we apply importance sampling based on samples and not the actual probabilities: X X X X X ℓtI(t) = ℓte = Wet ℓete t t = t = = = e∈I(t) X X t e∈I(t) X X t ≤ e∈I(t) X X t ≤ e∈I(t) X X e∈I(t) X X t e∈I(t) X X t t e∈I(t)  X X Wet ℓbte Wet ℓete − (1 + ǫ′ )ℓbte + (1 + ǫ′ )  t   Wet ℓete − (1 + ǫ′ )ℓbte + (1 + ǫ′ )   ǫ′ 1+ Wet ℓete − (1 + ǫ′ )ℓbte + 1 − ǫ′   ǫ′ 1+ Wet ℓete − (1 + ǫ′ )ℓbte + 1 − ǫ′  Wet ℓete − (1 + ǫ′ )ℓbte    e∈I(t) XX t e∈E XX t e∈E XX t i∈F  Wet ℓbte Pet ℓbte pti ℓbti  1 + ǫ′ X X bt mB(ǫ′ , T, F)  + ℓe + (1 − ǫ′ )2 γ t ǫ′ e∈f  X X ℓbte − (1 + ǫ′ )ℓete 1+ Wet ℓete − (1 + ǫ′ )ℓbte + (1 − ǫ′ )2 t e∈f e∈I(t)   (1 + ǫ′ )2 X X et mB(ǫ′ , T, F)  + ℓe + (1 − ǫ′ )2 γ t e∈f where we used Lemma 4.1 for the first inequality and the regret bound for the full information algorithm for the second one, noting that the magnitude of the losses is L = m/γ . The third term can be bound similarly as in the proof of Theorem 4.2. What is left is to bound the two first terms. 37 First term: With probability at least 1 − δ, the following holds: X X t e∈I(t) ! 1 1 − (1 + ǫ′ ) t P Pbet e t e∈I(t)  X X 1  bt = Wet ℓte Pe − (1 + ǫ′ )Pet Pbet Pet t e∈I(t)  X X  Wet ℓte Wet ℓete − (1 + ǫ′ )ℓbte = ≤ ≤ ≤ X X t e∈I(t) Wet ℓte (1 + ǫ′ ) log(dT/δ ) N ǫ′ Pbet Pet 1 (1 + ǫ′ ) log(dT/δ ) X X ℓte bt N (1 − ǫ′ )ǫ′ t e∈I(t) Pe (1 + ǫ′ ) log(dT/δ ) X X t ℓe N γ(1 − ǫ′ )ǫ′ t e∈I(t) (1 + ǫ′ ) log(dT/δ ) X t ℓI(t) = N γ(1 − ǫ′ )ǫ′ t X ℓtI(t) ≤ ǫ′ t where the first inequality holds with probability 1 − δ by relation (12). The second inequality holds by Lemma 4.1. The third inequality holds because Pbet ≥ γ for non-frozen nodes. The last inequality ′ ) log(dT/δ ) holds since N ≥ (1+ǫ . (ǫ′ )2 γ(1−ǫ′ ) Second term: We focus only on rounds where f is not frozen as else the quantity is anyway negative. With probability at least 1 − δ, the following holds: !  1 + ǫ′ X X t 1 1 + ǫ′ X X  bt ′ et ′ 1 ℓe − (1 + ǫ )ℓe = ℓe − (1 + ǫ ) t bt (1 − ǫ′ )2 t (1 − ǫ′ )2 t Pe P e e∈f e∈f  1 + ǫ′ X X ℓte  t ′ bt = P − (1 + ǫ ) P e bt t e (1 − ǫ′ )2 t e∈f Pe Pe ≤ ≤ (1 + 2ǫ′ ) log(dT/δ ) 1 + ǫ′ X X ℓte · (1 − ǫ′ )2 t N ǫ′ Pbet Pet e∈f (1 + 2ǫ′ ) log(dT/δ ) X X ℓete 1 · · (1 − ǫ′ )2 N ǫ′ Pbet t + ǫ′ e∈f + ǫ′ 2ǫ′ ) log(dT/δ ) 1 (1 + · ′ 2 (1 − ǫ ) N γǫ′ XX XX ≤ ǫ′ ℓete = ǫ′ ℓete ≤ t e∈f t · XX t e∈f ℓete e∈f The first inequality holds from relation (13). The second inequality holds since ℓete = ℓte /Pet . The third ′ dT /δ ) · inequality holds because for non-frtozen arms Pbet > γ. The final inequality hold as N ≥ 2(1+2ǫ(ǫ)′ )log( 2γ (1+ǫ′ )2 . (1−ǫ′ )2 Summing up: 38 ′ Using the above two bounds on the summands we finally conclude that using N = 2(1+2ǫ(ǫ)′ )log( 2γ samples on every round, with probability at least 1 − δ,   ′ ′ 2 X X X X XX mB(ǫ , T, F)  (1 + ǫ )  ℓete + ℓtI(t) ≤ ǫ′ ℓtI(t) + ǫ′ ℓete + ′ )2 (1 − ǫ γ t t t t dT/δ ) ′ 2 (1+ǫ ) · (1−ǫ ′ )2 e∈f e∈f Assuming ǫ < 1 and ǫ′ = ǫ/6, we can conclude that X t ℓtI(t) ≤ (1 + ǫ) XX t e∈f (1 + ǫ/6)2 mB(ǫ/6, T, F) ℓete + (1 − ǫ/6)2 γ The above lemma can be applied in Section 5.2 as well as in the proof of Theorem 5.8 to replace analysis for the case when Pet ’s can be computed exactly to one where its estimated via sampling. The statements are still true in high probability with only additional log(T ) factor term in regret bound.Moreover, it can be also applied in Section 4.2 for the oracle-efficient guarantees we provide. B.2 Proofs for contextual bandits Theorem 4.3 (restated). Assuming that the oracle-efficient full-information algorithm A has ǫp approximate regret B(ǫ, T, F) = T log(|F |) when applied on losses in [0, 1], A run on the estimated losses coming from the freezing process and with ǫ′ = ǫ/2, with  probability 1 − δ for any δ > 0 has  √ |F | d· T log(|F |) approximate regret ApxReg(f, ǫ) = O + d·log(ǫ2 /δ) for all f ∈ F. ǫ Proof. The proof is similar to the proof of Theorem 4.2 adjusted to the contextual bandit setting. Note that the estimated losses ℓet are bounded by 1/γ and so, by our premise about the full information algorithm, we have: ′ (1 − ǫ ) T X t=1 ℓtI(t) ′ = (1 − ǫ ) T X ≤ min f ∈F T X d X wit ℓ̃ti t=1 i=1 ℓ̃tf (xt ) + t=1 1 B(ǫ′ , T, F) γ (14) Now note that by Lemma 3.6 we have that for any f ∈ F, and any δ > 0, with probability at least 1 − δ, T T X X (1 + ǫ′ ) log(1/δ ) t ′ ℓ̃f (xt ) ≤ (1 + ǫ ) ℓ̃tf (xt ) + ǫ′ t=1 t=1 Hence using union bound over f ∈ F we conclude that for any δ > 0, with probability at least 1 − δ, min f ∈F T X t=1 ℓ̃tf (xt ) ′ ≤ (1 + ǫ ) min f ∈F T X t=1 39 ℓ̃tf (xt ) + (1 + ǫ′ ) log(|F |/δ ) ǫ′ (15) Plugging the above in Eq. 14 we conclude that for any δ, with probability at least 1 − δ, (1 − ǫ′ ) Since 1+ǫ′ 1−ǫ′ = 1 1−ǫ T X t=1 ℓtI(t) ≤ (1 + ǫ′ ) min f ∈F T X ℓ̃tf (xt ) + t=1 (1 + ǫ′ ) log(|F |/δ ) 1 + B(ǫ′ , T, F) ǫ′ γ for ǫ′ = ǫ/2 and using the fact that γ = ǫ′ /d, we conclude the proof. Theorem 4.4 (restated). Assuming that the oracle-efficient full-information algorithm A has ǫapproximate regret B(ǫ, T, F) when applied on losses in [0, 1], A run on the estimated losses coming from the freezing process and with ǫ′ = ǫ/2, with probability 1 − δ for any δ > 0 has ǫ-approximate regret    d log(1/δ) d 2 ApxReg(f, ǫ) = O B(ǫ, T, F) + RT F, ǫ /d + ǫ ǫ2 Proof. The analogue of Theorem 4.3 for infinite set F has a similar proof as above. In fact, notice that if one has a full information algorithm for the problem in the same vein as in the above theorem, then irrespective of the fact F could be an uncountably infinite class, the proof till Eq. 14 is just true. The main hurdle comes when proving the analogue of Eq. 15. Unlike the finite F case, where we simply used union bound over the concentration statement from Lemma 3.6 for infinite classes we need a more careful analysis. Specifically we will replace Eq. 14 by an appropriate tail bound given by: for any δ > 0, w.p. at least 1 − δ: o Xn log(3/δ) ℓ̃tf (xt ) − (1 + ǫ)ℓtf (xt ) ≤ RT (F, γǫ) + ǫγ f ∈F t sup where the term RT (F, ǫ) is the so called offset Rademacher complexity of class F defined in [RS14]. The above tail bound is proved in the following lemma. Using this tail bound in place of Eq. (15) and plugging it into Eq. (14) yields the infinite comparator version of Theorem 4.3. Now we are ready to prove the tail bound for the infinite class which is based on result from [RS17]. Lemma B.2. For any possibly infinite class F, (under mild assumption of F and X for measurability), for any δ > 0, w.p. at least 1 − δ: T n o X log(3/δ) (1 − ǫ)ℓ̃tf (xt ) − (1 + ǫ)ℓtf (xt ) ) > RT (F, ǫγ) + γǫ f ∈F sup t=1 i h Proof. Let us define the random variable Zt = (xt , ℓ̃t ). and define Et−1 [·] = E ·|x1 , . . . , xt , ℓ̃1 , . . . , ℓ̃t−1 . Further we define the class G such that each g ∈ G corresponds to an f ∈ F and g(Zt ) = γ ℓ̃tf (xt ) . Notice that |g(Zt )| ≤ 1 because losses are bounded by 1/γ. Now, using Corollary 8 in [RS17] with regret bound for online non-parametric regression from [RS14] we obtain (just as in the proof of Theorem 18 in [RS17]) that for any class G ⊆ [0, 1]Z , ! T n o X ǫ P sup (g(Zt ) − Et−1 [g(Zt )]) − EZt′ (g(Zt ) − g(Zt′ ))2 > RT (G, ǫ) + θ ≤ 3 exp(−ǫθ) 2 g∈G t=1 40   Since EZt′ (g(Zt ) − g(Zt′ ))2 ≤ EZt′ [g(Zt′ )2 ] + g(Zt )2 ≤ EZt′ [g(Zt′ )] + g(Zt ) = (Et−1 [g(Zt )] + g(Zt )): P sup T X g∈G t=1 {(g(Zt ) − Et−1 [g(Zt )]) − ǫ (Et−1 [g(Zt )] + g(Zt ))} > RT (G, ǫ) + θ ! ≤ 3 exp(−ǫθ) Hence we conclude the tail bound: P sup T n X f ∈F t=1 o 1  > RT (G, ǫ) + θ ℓ̃tf (xt ) − Et−1 [ℓ̃tf (xt ) ] − ǫ (Et−1 [ℓ̃tf (xt ) ]) + ℓ̃tf (xt ) γ ! ≤ 3 exp(−ǫγθ) Now further noting that for our estimate, Et−1 [ℓ̃tf (xt ) ] ≤ ℓtf (xt ) , we conclude that, P sup T n X f ∈F t=1 (ℓ̃tf (xt ) − ℓtf (xt ) ) − ǫ  ℓtf (xt ) + ℓ̃tf (xt ) o 1 > RT (G, ǫ) + θ γ ! ≤ 3 exp(−ǫγθ) Noting that, γ1 RT (G, ǫ) = RT (1/γ G, ǫγ) = RT (F, ǫγ), and setting probability of failure to δ and rewriting the above statement we obtain that: for any δ > 0, w.p. at least 1 − δ, T n o X log(3/δ) (1 − ǫ)ℓ̃tf (xt ) − (1 + ǫ)ℓtf (xt ) ) > RT (F, ǫγ) + γǫ f ∈F sup t=1 This concludes the proof. 41
8cs.DS
1 Communication versus Computation: Duality for multiple access channels and source coding arXiv:1707.08621v1 [cs.IT] 26 Jul 2017 Jingge Zhu, Sung Hoon Lim, and Michael Gastpar Abstract Computation codes in network information theory are designed for the scenarios where the decoder is not interested in recovering the information sources themselves, but only a function thereof. Körner and Marton showed for distributed source coding that such function decoding can be achieved more efficiently than decoding the full information sources. Compute-and-forward has shown that function decoding, in combination with network coding ideas, is a useful building block for end-to-end communication. In both cases, good computation codes are the key component in the coding schemes. In this work, we expose the fact that good computation codes could undermine the capability of the codes for recovering the information sources individually, e.g., for the purpose of multiple access and distributed source coding. Particularly, we establish duality results between the codes which are good for computation and the codes which are good for multiple access or distributed compression. Index Terms Function computation, code duality, multiple access channel, compute–forward, multi-terminal source coding, structured code. I. I NTRODUCTION To set the stage for the results and discussion presented in this paper, it is instructive to consider the two-sender two-receiver memoryless network illustrated in Fig. 1. Specifically, this network consists of This paper was presented in part at the 2017 IEEE Information Theory and Applications Workshop. J. Zhu is with the Department of Electrical Engineering and Computer Science, University of California, Berkeley, 94720 CA, USA (e-mail: [email protected]). S. H. Lim is with the Korea Institute of Ocean Science and Technology, Ansan, Gyeonggi-do, Korea (e-mail: [email protected]). Michael Gastpar is with the School of Computer and Communication Sciences, Ecole Polytechnique Fédérale, 1015 Lausanne, Switzerland (e-mail: [email protected]). July 28, 2017 DRAFT 2 M1 M2 Encoder 1 Encoder 2 X1n X2n p1 (y1 |x1 , x2 ) p2 (y2 |x1 , x2 ) Y1n Y2n f1 (M1 , M2 ) Decoder 1 (M1 , M2 ) Decoder 2 Fig. 1. Two-sender two-receiver network with channel distribution W1 (y1 |x1 , x2 )W2 (y2 |x1 , x2 ). Decoder 1 wishes to recover the sum of the codewords while Decoder 2 wishes to recover both messages. two multiple access channels that we allow to be different in general, characterized by their respective conditional probability distributions. The fundamental tension appearing in this network concerns the decoders: Decoder 1 wishes only to recover a function f1 (M1 , M2 ) of the original messages. By contrast, Decoder 2 is a regular multiple access decoder, wishing to recover both of the original messages. As illustrated in the figure, the tension arises because the two encoders must use one and the same code to serve both decoders. In a memoryless Gaussian network where X1 , X2 ∈ R, decoding the (element-wise) sum of the codewords f1 (M1 , M2 ) = xn1 (M1 ) + xn2 (M2 ) is often of particular interest. The computation problem associated with Decoder 1 is a basic building block for many complex communication networks, including the well-known two-way relay channel [1] [2], and general multi-layer relay networks [3]. The computation aspect of these schemes is important, sometimes even imperative in multi-user communication networks. Results from network coding [4] [5], physical network coding [6], and the compute–forward scheme [3] have all shown that computing certain functions of codewords within a communication network is vital to the overall coding strategy, and their performance cannot be achieved otherwise. Previous studies have all suggested that good computation codes should possess some algebraic structures. For example, nested lattice codes are used in the Gaussian two-way relay channel and more generally in the compute-and-forward scheme. In this case, the linear structure of the codes is the key to the coding scheme, due to the fact that multiple codeword pairs result in the same sum codeword, thus minimizing the number of competing sum codewords upon decoding. However, it turns out that this algebraic structure could be “harmful”, if the codes are used for the purpose of multiple-access. Roughly speaking, if the channel has a “similar” algebraic structure (looking July 28, 2017 DRAFT 3 at Fig. 1, this would be the case if Y2 = X1 + X2 ), then the fact that multiple codeword pairs result in the same sum codeword (channel output) makes it impossible for the individual messages to be recovered reliably. In this paper, we show that there exists a fundamental conflict between codes for efficient computation and multiple access if the channel is matched with the algebraic structure of the function to be computed. One contribution of the paper is to give a precise statement of this phenomenon, showing a duality between the codes used for communication and the codes used for computation on the two-user multiple access channel (MAC). We show that codes which are “good” for computing certain functions over a multiple access channel will inevitably lose their capability to enable multiple access, and vice versa. Similar phenomena are observed in distributed source coding settings. We find that there exists a conflict between “good” codes for computation and codes for reliable compression, as in the channel coding case. In particular, we classify some fundamental conditions in which “good” computation codes cannot be used for recovering the sources separately. The paper is organized as follows. Beginning with the next section, we state the multiple access and computation duality results and provide the proofs of our theorems. In Section III, duality for computation and distributed source coding is given with some discussions and the proofs of the theorems. In Section IV, we specialize the duality results for the Gaussian MAC. Finally, in Section V we give some concluding remarks. Throughout the note, we will use [n] to denote the set of integers {1, 2, . . . , n} for some n ∈ Z+ . II. M ULTIPLE ACCESS AND C OMPUTATION D UALITY A two-user discrete memoryless multiple access channel (MAC) (X1 × X2 , Y, W (y|x1 , x2 )) consists of three finite sets X1 , X2 , Y , denoting the input alphabets and the output alphabets, respectively, and a collection of conditional probability mass functions (pmf) W (y|x1 , x2 ). A formal definition of multiple access codes is given as follows. Definition 1 (multiple access codes). A (2nR1 , 2nR2 , n) multiple access code1 for a MAC consists of • two message sets [2nRk ], k = 1, 2, • two encoders, where each encoder maps each message mk ∈ [2nRk ] to a sequence xnk (mk ) ∈ X n bijectively, • a decoder that maps an estimated pair (x̂n1 , x̂n2 ) to each received sequence y n . 1 or simply multiple access code, when the parameters are clear from the context. July 28, 2017 DRAFT 4 Each message Mk , k = 1, 2, is assumed to be chosen independently and uniformly from [2nRk ]. The average probability of error for multiple access is defined as Pǫ(n) = P{(X1n , X2n ) 6= (X̂1n , X̂2n )}, (1) where Xkn = xnk (Mk ). We say a rate pair (R1 , R2 ) is achievable for multiple access if there exists a (n) sequence of (2nR1 , 2nR2 , n) multiple access codes such that limn→∞ Pǫ = 0. The classical capacity results of the multiple access channel (see e.g. [7]) shows that for the MAC given by W (y|x1 , x2 ), there exists a sequence of (2nR1 , 2nR2 , n) multiple access codes for any rate pair (R1 , R2 ) ∈ CMAC where CMAC is the set of rate pairs (R1 , R2 ) such that R1 < I(X1 ; Y |X2 , Q) R2 < I(X2 ; Y |X1 , Q) R1 + R2 < I(X1 , X2 ; Y |Q). for some pmf p(q)p(x1 |q)p(x2 |q). The following definition formalizes the concept of computation codes used in this paper. Definition 2 (Computation codes for the MAC). A (2nR1 , 2nR2 , n, f ) computation code2 for a MAC consists of two messages sets and two encoders defined as in Definition 1 and • a function f : X1 × X2 7→ F for some image F , • a decoder that maps an estimated function value fˆn ∈ X n to each received sequence y n . The message Mk , k = 1, 2, is assumed to be chosen independently and uniformly from [2nRk ]. The average probability of error for computation is defined as Pǫ(n) = P{F n 6= F̂ n }, (2) where F n = (f (X11 , X21 ), . . . , f (X1n , X2n )) denotes an element-wise application of the function f on the pair (X1n , X2n ). We say a rate pair (R1 , R2 ) is achievable for computation if there exists a sequence (n) of (2nR1 , 2nR2 , n) computation codes such that limn→∞ Pǫ = 0. We note that since the function f (X1n , X2n ) can be computed directly at the receiver if the individual codewords (X1n , X2n ) are known, a (2nR1 , 2nR2 , n) multiple access code for a MAC is readily a (2nR1 , 2nR2 , n, f ) computation code over the same channel for any function f . More interesting are 2 or simply computation code, when the parameters are clear from the context. July 28, 2017 DRAFT 5 the computation codes with rates outside the MAC capacity region, i.e. (R1 , R2 ) ∈ / CMAC . We refer to such codes as good computation codes for this channel. A formal definition of good computation codes is given as follows. Definition 3 (Good computation codes). Consider a sequence of (2nR1 , 2nR2 , n, f )-computation codes for a MAC given by W (y|x1 , x2 ). We say that they are good computation codes for the MAC, if (R1 , R2 ) is achievable for computation, and R1 + R2 > max p(x1 )p(x2 ) I(X1 , X2 ; Y ) namely, the sum-rate of the two codes is larger than the sum capacity of the MAC. The multiple access or computation capability of codes over a channel depends heavily on the structure of the channel. To this end, we give the following definition of a multiple access channel. Definition 4 (g-MAC). Given a function g : X1 × X2 7→ F for some set F , we say that a multiple access channel described by W (y|x1 , x2 ) is a g-MAC if the following Markov chain holds (X1 , X2 ) − g(X1 , X2 ) − Y. For example, the Gaussian MAC Y = x1 + x2 + Z (3) where Z ∼ N (0, 1) is a g-MAC with g(x1 , x2 ) := x1 + x2 . A. Main results In this subsection we show that for any sequence of codes, there is an intrinsic tension between their capability for computation and their capability for multiple access. Some similar phenomena have already been observed in [8] [9]. Here we make some precise statements. Theorem 1 (MAC Duality 1). Consider a two-sender two-receiver memoryless channel in Fig. 1. Assume that the multiple access channels are given by the conditional probability distributions W1 (y1 |x1 , x2 ) and (n) (n) W2 (y2 |x1 , x2 ), where the channel W2 is a g-MAC. Further assume that a sequence of codes (C1 , C2 ) is good for computing the function f over W1 , namely the sum rate of the codes satisfies R1 + R2 > July 28, 2017 DRAFT 6 maxp(x1 )p(x2 ) I(X1 , X2 ; Y1 ). Then this sequence of codes cannot be used as multiple access codes for the channel W2 (i.e., the receiver cannot decode both codewords correctly), if it holds that H(g(X1n , X2n )) ≤ H(f (X1n , X2n )) as n → ∞ (4) where the functions f and g are applied element-wise to the random vector pair (X1n , X2n ) induced by (n) (n) the codebooks (C1 , C2 ). Remark 1. More precisely, we will show in the proof that the capacity region of the two-sender tworeceiver network is bounded by R1 + R2 ≤ max p(x1 )p(x2 ) I(X1 , X2 ; Y1 ). (5) Notice that though decoder 2 is required to recover both messages separately, the capacity of the network is bounded by (5) which does not depend on W2 . Remark 2. To avoid confusion, we recall that Xkn = xnk (Mk ), k = 1, 2 are always discrete random variables (for both discrete memoryless and continuous memoryless channels), as the randomness is only induced from the random choice of the codeword from the given codebooks. More precisely, we have   (n) 1  nR if xnk ∈ Ck 2 k n n P {Xk = xk } =  0 otherwise. for k = 1, 2. In Section IV we give some specialized results explicitly for the Gaussian multiple access channel. Remark 3. We also point out that the entropy of the function f (X1n , X2n ), g(X1n , X2n ) depends on the (n) (n) structure of the codebooks C1 , C2 , and it is in general difficult to verify the condition in (4). Nevertheless an interesting special case is f = g where this condition is trivially satisfied. The following theorem gives a complementary result. Theorem 2 (MAC Duality 2). Consider two memoryless multiple access channels given by the conditional probability distributions W1 (y1 |x1 , x2 ) and W2 (y2 |x1 , x2 ), where the channel W2 is a g-MAC. If (n) (n) (C1 , C2 ) is a sequence of multiple access codes for the channel W2 , then it cannot be a good computation code w.r.t. the function f over W1 , if it holds that H(g(X1n , X2n )) ≤ H(f (X1n , X2n )) as n → ∞. July 28, 2017 DRAFT 7 Before presenting the proofs of the above tow theorems, we give a few examples to illustrate the results. B. Examples (n) (n) Example 1. If two codes C1 , C2 ⊆ Rn are good for computing the sum xn1 + xn2 over the Gaussian MAC Y1n = xn1 + xn2 + Z̃ n , then they cannot be used for multiple access for the Gaussian MAC Y2n = xn1 + xn2 + Z n where Z̃ n , Z n are two i.i.d. Gaussian noise sequences with arbitrary variances. The result holds according to Theorem 1 by choosing f (x1 , x2 ) = g(x1 , x2 ) = x1 + x2 We will discuss more about this example in Section IV. (n) (n) Example 2. If two codes C1 , C2 ⊆ Rn are good for computing the sum a1 xn1 +a2 xn2 over any Gaussian MAC, then they cannot be used for multiple access for the Gaussian MAC Y n = a1 xn1 + a2 xn2 + Z n . The result holds according to Theorem 1 by choosing f (x1 , x2 ) = g(x1 , x2 ) = a1 x1 + a2 x2 with arbitrary a1 , a2 ∈ R. (n) (n) Example 3. If two codes C1 , C2 ⊆ {0, 1}n are good for computing the sum xn1 + xn2 over any MAC, then they cannot be used for multiple access for the MAC Y n = xn1 · xn2 . Here xn1 + xn2 ∈ {0, 1, 2}n and xn1 · xn2 ∈ {0, 1}n represent the element-wise sum and product of xn1 and xn2 in Rn , respectively. The result holds according to Theorem 1 by choosing f (x1 , x2 ) = x1 + x2 g(x1 , x2 ) = x1 · x2 . July 28, 2017 DRAFT 8 It is easy to see that H(X1n + X2n ) ≥ H(X1n · X2n ) in this case. (n) (n) Example 4. If two codes C1 , C2 ⊆ {0, 1}n are good for computing the element-wise product xn1 · xn2 over any MAC, then they cannot be used for multiple access for the MAC Y n = xn1 · xn2 + Z n where Z n ∈ {0, 1}n denotes an i.i.d. noise sequence independent of the channel inputs. The result holds according to Theorem 1 by choosing f (x1 , x2 ) = g(x1 , x2 ) = x1 · x2 and the fact that Y n = xn1 · xn2 + Z n is a g-MAC. A summary of the above examples is given in Table I. alpabet X (n) (n) n If (C1 , C2 ) are good for computing f (xn 1 , x2 ) over any MAC x1 , x2 ∈ X = R n n n f (xn 1 , x2 ) = x1 + x2 x1 , x2 ∈ X = R n n n f (xn 1 , x 2 ) = a1 x 1 + a2 x 2 x1 , x2 ∈ X = {0, 1} n n n f (xn 1 , x2 ) = x1 + x2 x1 , x2 ∈ X = {0, 1} n n n f (xn 1 , x2 ) = x1 · x2 cannot be used for multiple access over n n Y n = xn 1 + x2 + Z n n Y n = a1 x n 1 + a2 x 2 + Z n Y n = xn 1 · x2 n n Y n = xn 1 · x2 + Z TABLE I A SUMMARY OF THE EXAMPLES . C. Proofs Proof of Theorem 1: We consider two multiple access channels W1 , W2 as described in the theorem. (n) (n) We assume temporarily that the pair of codes (C1 , C2 ) are used for computation over W1 , and used for multiple access over W2 . In other words, the function f (X1n , X2n ) can be decoded reliably using Y1n , and the pair (X1n , X2n ) can be decoded reliably using Y2n . Under this assumption, an upper bound on the July 28, 2017 DRAFT 9 sum-rate R1 + R2 can be derived as follows: n(R1 + R2 ) = H(X1n , X2n ) = I(X1n , X2n ; Y2n ) + H(X1n , X2n |Y2n ) (a) ≤ I(X1n , X2n ; Y2n ) + nǫn (b) = I(g(X1n , X2n ); Y2n ) + nǫn ≤ H(g(X1n , X2n )) + nǫn = H(f (X1n , X2n )) + H(g(X1n , X2n )) − H(f (X1n , X2n )) + nǫ = I(Y1n ; f (X1n , X2n )) + H(f (X1n , X2n )|Y1n ) + H(g(X1n , X2n )) − H(f (X1n , X2n )) + nǫn (c) ≤ I(Y1n ; f (X1n , X2n )) + H(g(X1n , X2n )) − H(f (X1n , X2n )) + 2nǫn ≤ I(Y1n , X1n , X2n ) + H(g(X1n , X2n )) − H(f (X1n , X2n )) + 2nǫn ≤ n X i=1 I(Y1i ; X1i , X2i ) + H(g(X1n , X2n )) − H(f (X1n , X2n )) + 2nǫn , Step (a) follows from Fano’s inequality under the assumption that X1n , X2n can be decoded over W2 . Step (b) holds since W2 is a g-MAC, which implies the Markov chain (X1 , X2 ) − g(X1 , X2 ) − Y for any choice of codes, hence I(g(X1n , X2n ); Y2n ) = I(X1n , X2n ; Y2n ). Step (c) follows from Fano’s inequality under the assumption that f (X1n , X2n ) can be decoded over W1 . The last step is due to the memoryless property of W1 . Since ǫn → 0 as n → ∞, the assumption H(g(X1n , X2n )) ≤ H(f (X1n , X2n )) as n → ∞ gives the upper bound R1 + R2 ≤ max p(x1 )p(x2 ) I(Y1 ; X1 , X2 ). (6) (n) (n) Under our assumption in the theorem that the sequence of codes C1 , C2 are good computation codes for the channel W1 , we know that the function f (X1n , X2n ) can be decoded reliably over W1 , and furthermore we have the achievable computation sum-rate R1 + R2 = max p(x1 )p(x2 ) I(Y1 ; X1 , X2 ) + δ (7) for some δ > 0, by Definition 3. However, this implies immediately that the pair (X1n , X2n ) can not be decoded reliably over W2 . Indeed, if the decoder of W2 could decode both codewords, the achievable sum-rate in (7) directly contradicts the upper bound in (6). This proves that this sequence of codes cannot be used as multiple access codes for the channel W2 . July 28, 2017 DRAFT 10 Proof of Theorem 2: Again we consider two multiple access channels W1 , W2 as described in the (n) (n) theorem. We assume temporarily that the pair of codes (C1 , C2 ) are used for computation over W1 , and used for multiple access over W2 . Under the assumption in the theorem, both codewords (X1n , X2n ) can be recovered over the channel W2 with the rate pair (R1 , R2 ). Suppose the function f (X1n , X2n ) can also be reliably decoded over the channel W1 , then it must satisfy R1 + R2 ≤ max p(x1 )p(x2 ) I(X1 , X2 ; Y1 ) as shown in the upper bound (6). By Definition 3, this sequence of codes are not good computation codes for the channel W1 , since the sum-rate is not larger than the sum capacity of W1 . III. D ISTRIBUTED S OURCE C ODING AND C OMPUTATION D UALITY In this section, we establish duality results for distributed source coding. Consider the two-sender tworeceiver distributed source coding network in Figure 2. Two correlated sources X1n , X2n are encoded by Encoder 1 and Encoder 2, respectively. Decoder 1 wishes to decoder a function of the sources f (X1n , X2n ) with side information Y1n , and decoder 2 wishes to decode the two sources with side information Y2n . We will show that good computation codes cannot be used for distributed source coding, and vice versa. To state the problem formally, consider a discrete memoryless source (DMS) triple (X1 , X2 , Y ) that consists of three finite alphabets X1 , X2 , Y and a joint pmf of the form PSfrag replacements p(x1 , x2 , y) = p(x1 , x2 )W (y|x1 , x2 ). (8) A formal definition of a distributed source coding (DSC) code is given as follows. X1n Encoder 1 M1 Decoder 1 X1n + X2n Y1n X2n Encoder 2 M2 Decoder 2 (X1n , X2n ) Y2n Fig. 2. Two-sender two-receiver distributed source coding network. July 28, 2017 DRAFT 11 Definition 5 (Distributed Source Coding Codes). A (2nR1 , 2nR2 , n) code for distributed source coding consists of • two encoders, where encoder k = 1, 2, assigns an index m1 (xn1 ) ∈ [2nR1 ] to each sequence xn1 ∈ X1n , and • a decoder that assigns an estimate (x̂n1 , x̂n2 ) to each index pair (m1 , m2 ) ∈ [2nR1 ] × [2nR2 ] and side information y n ∈ Y n . The probability of error for a distributed source code is defined as Pǫ(n) = P{(X̂1n , X̂2n ) 6= (X1n , X2n )}. (9) A rate pair (R1 , R2 ) is said to be achievable for distributed source coding if there exists a sequence of (n) (2nR1 , 2nR2 , n) codes such that limn→∞ Pǫ = 0. The Slepian–Wolf (SW) region, given below3 , gives a complete characterization of the achievable rate region: R1 > H(X1 |X2 , Y2 ), R2 > H(X2 |X1 , Y2 ), R1 + R2 > H(X1 , X2 |Y2 ). (10) The following definition formalizes the concept of computation codes for distributed source coding used in this paper. Definition 6 (Computation codes for DSC). A (2nR1 , 2nR2 , n, f ) computation code for a DMS triple (X1 , X2 , Y ) consists of two message sets and two encoders defined as in Definition 5 and • a function f : X1 × X2 7→ F for some image F , and • a decoder that maps an estimated function value fˆn ∈ F n to each index pair (m1 , m2 ) ∈ [2nR1 ] × [2nR2 ] and side information y n ∈ Y n . The average probability of error for computation is defined as Pǫ(n) = P{F n 6= F̂ n }, (11) where F n = f (X11 , X21 ), . . . , f (X1n , X2n ) denotes an element-wise application of the function f on the pair (X1n , X2n ). We say a rate pair (R1 , R2 ) is achievable for computation if there exists a sequence (n) of (2nR1 , 2nR2 , n) computation codes such that limn→∞ Pǫ 3 = 0. Including a slight modification accounting for the side information at Decoder 2. July 28, 2017 DRAFT 12 Since the function f (X1n , X2n ) can be computed directly at the receiver if the individual codewords (X1n , X2n ) are known, a (2nR1 , 2nR2 , n) DSC code is readily a (2nR1 , 2nR2 , n, f ) computation code for any function f . More interesting are the computation codes with rates outside the optimal DSC rate region, i.e. (R1 , R2 ) ∈ / RSW . We refer to such codes as good computation codes for DSC. Definition 7 (Good computation codes). Consider a sequence of (2nR1 , 2nR2 , n, f )-computation codes for a DMS (X1 , X2 , Y ) ∼ p(x1 , x2 )W (y|x1 , x2 ). We say that the computation codes are good computation codes for this DMS, if (R1 , R2 ) is achievable for computation, and R1 + R2 < H(X1 , X2 |Y ). Namely the sum-rate of the two codes is smaller than the sum-rate constraint in RSW . When (X1 , X2 , Y1 ) are from a finite field and the function to compute is the sum X1 + X2 , the standalone problem associated with Decoder 1 (i.e. without Decoder 2) was considered in the seminal work of Körner and Marton [10]. In their work, it was shown that using the same linear code at both encoders, a rate pair (R1 , R2 ) is achievable for computing the sum of the sources if4 R1 > H(X1 + X2 |Y1 ), R2 > H(X1 + X2 |Y1 ). (12) We denote this rate region by RKM . Definition 8 (g-SI). Consider a DMS (X1 , X2 , Y ) described by p(x1 , x2 )W (y|x1 , x2 ). We say Y is a g-side information (g-SI) if there is a function g : X1 × X2 7→ F for some set F such that the following Markov chain holds Y → g(X1 , X2 ) → (X1 , X2 ). A. Main Results In this subsection we show that for any sequence of codes, there is an intrinsic tension between their capability for computation and their capability for distributed source coding. 4 Including a slight modification accounting for the side information at Decoder 1. July 28, 2017 DRAFT 13 Theorem 3 (DSC-Computation Duality 1). Consider a two-sender two-receiver DSC net- work in Fig. 2. Assume that the DMS (X1 , X2 , Y1 , Y2 ) ∼ p(x1 , x2 , y1 , y2 ) is given by p(x1 , x2 )W1 (y1 |x1 , x2 )W2 (y2 |x1 , x2 ) where the side information Y2 is a g-SI according to Definition (n) (n) 8. Further assume that a sequence of codes (C1 , C2 ) is good for computing the function f with the side information Y1 , namely the sum rate of the codes satisfies R1 + R2 < H(X1 , X2 |Y1 ). Then this sequence of codes cannot be used as DSC codes with side information Y2 (i.e., the receiver cannot recover both sources correctly), if it holds that H(g(X1n , X2n )|M1 , M2 , Y1n ) ≤ H(f (X1n , X2n )|M1 , M2 , Y1n ) as n → ∞. (13) Remark 4. More precisely, we will show in the proof that the optimal rate region of the two-sender two-receiver network is bounded by R1 + R2 ≥ H(X1 , X2 |Y1 ). (14) Notice that the side information Y2 does not directly appear in the above inequality. Remark 5. Same as in Theorem 1, the entropy inequality in the above theorem is in general difficult to verify. Nevertheless an interesting special case is when g = f where this condition is trivially satisfied (see Example 5). The following theorem gives a complementary result. Theorem 4 (DSC-Computation Duality 2). Consider a two-sender two-receiver distributed source coding network in Fig. 2. Assume that the DMS (X1 , X2 , Y1 , Y2 ) ∼ p(x1 , x2 , y1 , y2 ) is given by p(x1 , x2 )W1 (y1 |x1 , x2 )W2 (y2 |x1 , x2 ) where the side information Y2 is a g-SI according to Definition (n) (n) 8. Further assume that a sequence of codes (C1 , C2 ) is a sequence of DSC codes for side information Y2 . Then, this sequence of codes cannot be good computation codes for computing the function f with side information Y1 , if it holds that H(g(X1n , X2n )|M1 , M2 , Y1n ) ≤ H(f (X1n , X2n )|M1 , M2 , Y1n ) as n → ∞. (15) Before presenting the proofs, we give a few examples to illustrate the results. B. Examples Example 5. Consider the case in which Y1 = ∅, Y2 = X1 ⊕ X2 , and (X1 , X2 ) are doubly symmetric binary sources, i.e., P{(X1 , X2 ) = (1, 1)} = P{(X1 , X2 ) = (0, 0)} = (1−p)/2, P{(X1 , X2 ) = (0, 1)} = July 28, 2017 DRAFT 14 P{(X1 , X2 ) = (1, 0)} replacements = p/2 for some p ∈ [0, 1/2]. It can be checked directly that the conditions in PSfrag Theorem 3 are satisfied for this setup, and we have the promised duality results. R1 H(X1 |Y2 ) D B H2 (p) C E A R2 H2 (p) H(X2 |Y2 ) Fig. 3. Rate regions RKM and RSW in Example 5. The solid line rate region is RSW for Decoder 2, the dashed rate region and the dashed-dotted rate region is RKM and RSW for Decoder 1, respectively. Here, H2 (p) is the binary entropy function. The rate regions RKM and RSW for this example are given in Fig. 3. The duality results have some interesting implictaions on random linear codes. Wyner [11] has shown that nested linear codes can achieve the corner points of RSW . The proof technique in [11] relies on first recovering one of the sources, say X1 , with optimal linear source coding (with Y2 side information) then sequentially recovering X2 by treating X1 as additional side information which achieves the corner point (H(X1 |Y2 ), H(X2 |X1 , Y2 )). By time sharing with the other corner point attained by switching the decoding order, the whole RSW region is achievable via nested linear codes. An interesting question is whether it is possible to attain the whole region RSW using optimal joint decoding (without time sharing). Theorem 3 implies that while the corner points are achievable with nested linear codes, it is impossible to attain the whole RSW rate region even under optimal decoding (maximum likelihood decoders). To see this, consider the setting in Example 5. The important observation is that while nested linear codes can be used to attain the corner points of RSW , they are also good computation codes [10]. In this example, the codes whose rate pairs lie inside the boundary region A − E − D in Figure 3 are good computation codes. Hence according to Theorem 3, these nested linear codes with such rate pairs cannot be used for distributed source coding under side information Y2 , i.e., the points inside the boundary region B − C − E − D are not achievable using these codes. July 28, 2017 DRAFT 15 (n) (n) Example 6. Consider a discrete memoryless binary source pair X1 , X2 ∈ {0, 1}. If two codes C1 , C2 are good for computing xn1 + xn2 with any side information Y1n (addition performed element-wise in R), then this sequence of codes can not be used as distributed source coding (DSC) codes with side information xn1 · xn2 . The result holds according to Theorem 3 by choosing f (x1 , x2 ) = x1 + x2 g(x1 , x2 ) = x1 · x2 . The condition (15) is fulfilled since H(X1n + X2n |M1 , M2 , Y1 ) = H(X1n + X2n , X1n · X2n |M1 , M2 , Y1 ) ≥ H(X1n · X2n |M1 , M2 , Y1 ) (n) (n) Example 7. Consider a discrete memoryless binary source pair X1 , X2 ∈ {0, 1}. If two codes C1 , C2 are good for computing xn1 · xn2 with any side information Y1n (multiplication performed element-wise in R), then this sequence of codes can not be used as DSC codes with side information Y2n = xn1 · xn2 + Z n where Z n ∈ {0, 1}n is a i.i.d. random binary sequence independent of Y1n and the sources. The result holds according to Theorem 3 by choosing f (x1 , x2 ) = g(x1 , x2 ) = x1 · x2 and noticing that Y2n is a g-SI. C. Proofs Proof of Theorem 3: (n) (n) We assume temporarily that the pair of codes (C1 , C2 ) are used for computation at Decoder 1, and used for distributed lossy source coding at Decoder 2. In other words, the function f (X1n , X2n ) can be decoded reliably using Y1n , and the pair (X1n , X2n ) can be recovered reliably July 28, 2017 DRAFT 16 using Y2n . Then, n(R1 + R2 ) = H(M1 , M2 ) = H(M1 , M2 ) + H(X1n , X2n |M1 , M2 , Y2n ) − H(X1n , X2n |M1 , M2 , Y2n ) (a) ≥ H(M1 , M2 ) + H(X1n , X2n |M1 , M2 , Y2n ) − nǫn = H(M1 , M2 ) + H(X1n , X2n , g(X1n , X2n )|M1 , M2 , Y2n ) − nǫn ≥ H(M1 , M2 ) + H(X1n , X2n |M1 , M2 , Y2n , g(X1n , X2n )) − nǫn (b) = H(M1 , M2 ) + H(X1n , X2n |M1 , M2 , g(X1n , X2n )) − nǫn (c) ≥ H(M1 , M2 ) + H(X1n , X2n |M1 , M2 , g(X1n , X2n ), Y1n ) + H(g(X1n , X2n )|M1 , M2 , Y1n ) − H(f (X1n , X2n )|M1 , M2 , Y1n ) − nǫn (d) ≥ H(M1 , M2 ) + H(X1n , X2n |M1 , M2 , g(X1n , X2n )) + H(g(X1n , X2n )|M1 , M2 , Y1n ) − 2nǫn ≥ H(M1 , M2 |Y1n ) + H(X1n , X2n , g(X1n , X2n )|M1 , M2 , Y1n ) − 2nǫn = H(M1 , M2 , X1n , X2n , g(X1n , X2n )|Y1n ) − 2nǫn = H(X1n , X2n |Y1n ) − 2nǫn = n X i=1 H(X1i , X2i |Y1i ) − 2nǫn , where step (a) and (d) is from Fano’s inequality, step (b) follows from the Markovity Y2n → g(X1n , X2n ) → (X1n , X2n ), and step (c) follows from our assumption in the theorem. Overall, as n → ∞ we have the lower bound R1 + R2 ≥ H(X1 , X2 |Y1 ). (n) (16) (n) Under assumption that (C1 , C2 ) are good computation codes with side information Y1 , it satisfies the condition R1 + R2 < H(X1 , X2 |Y1 ). However, this directly contradicts the lower bound (16). This proves that this sequence of codes cannot be used as distributed source coding codes with side information Y2 . Proof of Theorem 4: Consider the network in Figure 2 again. We assume temporarily that the pair (n) (n) of codes (C1 , C2 ) are used for computation with side information Y1 , and used for distributed source coding with side information Y2 . Under the assumption in the theorem, both sources (X1n , X2n ) can be recovered with side information Y2 with rates (R1 , R2 ). Suppose the function f (X1n , X2n ) can also be July 28, 2017 DRAFT 17 reliably recovered with side information Y1 , then it must satisfy R1 + R2 ≥ H(X1 , X2 |Y1 ), as shown in the lower bound (16). By Definition 3, this sequence of codes are not good computation codes with the side information Y1 , since the sum-rate is not smaller than the sum-rate in the Slepian–Wolf rate region under side information Y1 . IV. D UALITY OVER THE G AUSSIAN MAC Computation codes, primarily lattice codes have been studied intensively in Gaussian multiple access channels. In this section we specialize the results in previous sections to additive channel models, and focus on decoding the sum of two codewords. In particular we consider the symmetric Gaussian MAC Y n = xn1 + xn2 + Z n (17) where Zi ∼ N (0, N ), i ∈ [n] is an additive white Gaussian noise. Both channel inputs have the same P average power constraint ni=1 x2ki ≤ nP , k = 1, 2. For the sake of notation, we will define the signal- to-noise ratio (SNR) to be SNR := P/N , and denote such a symmetric two-user Gaussian MAC as GMAC(SNR). A. Computing sums of codewords A Gaussian MAC naturally adds two codewords through the channel, hence it is particularly beneficial for the decoder to decode the sum of the two codewords. In this section, we will only focus on decoding the sum of the codewords, i.e., the function f is defined to be f = x1 + x2 . For this channel, it is well known that nested lattice codes are good computation codes for computing the sum xn1 + xn2 . In particular, it is shown in [3] that nested linear codes is able to achieve a computation rate pair (R1 , R2 ) if it satisfies 1 1 log + SNR , 2 2   1 1 R2 < log + SNR . 2 2 R1 <   It is easy to see that the sum-rate R1 + R2 is outside the capacity region of the Gaussian MAC if SNR > 3/2. Now we come back to the system depicted in Figure 1. Specializing the duality results to this scenario, we have the following theorems. July 28, 2017 DRAFT 18 (n) (n) Corollary 1 (Gaussian MAC duality 1). Let SNR1 be a fixed but arbitrary value and let (C1 , C2 ) be a sequence of good computation codes for GMAC(SNR1 ). Then this sequence of good computation codes cannot be a sequence of multiple access codes for GMAC(SNR2 ), for any SNR2 . Remark 6. By the definition of good computation codes for GMAC(SNR1 ), the rate pair (R1 , R2 ) is outside the capacity region Cmac (SNR1 ). Hence it obviously cannot be an achievable rate pair for multiple access in a Gaussian MAC with an SNR value smaller or equal to SNR1 . The question of interest is if this sequence of good computation codes can be used for multiple access over a Gaussian MAC when its SNR is much larger than SNR1 . The above result shows that good computation codes cannot be used for multiple access even with an arbitrarily large SNR. Figure 4 gives an illustration of this result. R2 A R1 Fig. 4. MAC capacity regions for SNR1 (blue), SNR2 (red) where SNR2 > SNR1. The point A is achievable by a pair of good computation codes C1 , C2 over GMAC(SNR1 ) with rate (R1 , R2 ). While the rate pair (R1 , R2 ) is included in the capacity region of GMAC(SNR2 ), the codes C1 , C2 cannot be used as multiple access codes for GMAC(SNR2 ). Proof: The function to be computed is defined to be f (x1 , x2 ) = x1 + x2 . Also notice that a GMAC(SNR) also a f -MAC for any SNR. Hence the condition (4) holds and our claim follows directly from Theorem 1. The following theorem gives a complementary result, whose proof follows that in Theorem 2. (n) (n) Corollary 2 (Gaussian MAC duality 2). Let SNR2 be a fixed but arbitrary value, and let (C1 , C2 ) be a sequence of (2nR1 , 2nR2 , n) multiple access codes for the GMAC(SNR2 ) with arbitrary R1 , R2 . Then this sequence of codes cannot be good computation codes for the GMAC(SNR1 ), for any SNR1 . July 28, 2017 DRAFT 19 B. Sensitivity to channel coefficients For decoding the sum of codewords X1n + X2n , the duality results for Gaussian MAC depend crucially on the channel gains. Theorem 1 and 2 are established for the case when the channel gains are matched to the coefficients in the sum (namely (1, 1)). Now we show that if the channel gains and the coefficients in the sum are not matched, duality results do not hold in general. (n) (n) Proposition 1. There exists a sequence of codes (C1 , C2 ) such that they are good computation codes for the GMAC(1, 1, N1 ), and they can also be used for multiple access over the GMAC(1, c, N2 ) for any integer c ≥ 2, for some N1 , N2 > 0. Proof: It is shown in [8] that for a GMAC(1, c, N2 ), there exists a sequence of nested linear codes (n) C1 , C (n) that can be used for multiple access for this channel if the rate pair (R1 , R2 ) satisfies R1 < C(P1 /N2 ) R2 < C(P2 /N2 ) R1 + R2 < C((1 + c2 )P/N2 ) R1 < R2 < where C(x) = max min{ICF,1 (a), C((1 + c2 )P/N2 ) − ICF,2 (a)} or (18) max min{ICF,2 (a), C((1 + c2 )P/N2 ) − ICF,1 (a)} (19) a∈Z2 \{0} a∈Z2 \{0} 1 log(1 + x), 2 1 ICF,1 (a) = log 2  1 log 2  ICF,2 (a) = 1 + (1 + c2 )P (a1 c − a2 )2 P + a21 + a22 1 + (1 + c2 )P (a1 c − a2 )2 P + a21 + a22  + log gcd(a), (20)  + log gcd(a), (21) The above rate region is denoted by RLMAC . For simplicity, we define an inner bound R̃LMAC on RLMAC by choosing a = [1, c] in the maximization of (18) and (19). Moreover, we let (1 + c2 )2 − 1 P , > N2 (1 + c2 ) (22)  1 log 1 + c2 , 2 (23) such that (18) and (19) are simplified by Rk < July 28, 2017 k = 1, 2. DRAFT 20 It is also shown in [8] that nested lattice codes can be used to compute the sum of two codewords for the GMAC(1, 1, N1 ) if the rate pair is included in the rate region: RCF := {(R1 , R2 )|R1 < R2 < 1 log(1/2 + P/N1 ) 2 1 log(1/2 + P/N1 )}. 2 If we require that a pair (R1 , R2 ) ∈ RCF to be a rate pair of good computation codes, it should satisfy that 2· 1 1 log(1/2 + P/N1 ) > log(1 + 2P/N1 ) 2 2 which imposes the constraint P/N1 > 3/2, which we will always assume in the proof. Now we will show that for some N1 , N2 , we can find a rate pair (R1∗ , R2∗ ) which lies in both R̃LM AC and RCF . This shows that a pair of nested linear codes with this rate pair can be used for multiple access for GMAC(1, c, N2 ) and used for computation for GMAC(1, 1, N1 ). Specifically, we choose the rate to be R1∗ = R2∗ = 1 log 3 − ǫ 2 for some small ǫ > 0. We first show that (R1∗ , R2∗ ) ∈ R̃LM AC for some N2 . √ By choosing c > 2, the RHS terms of the last two constraints in R̃LM AC is larger or equal to 1 2 log 3. Furthermore, it is easy to see that if we choose N2 such that P/N2 > 2 and (1 + c)2 P/N2 ≥ 8 are satisfied (along with the previous assumption (22)), the rate pair R1∗ , R2∗ is included in R̃LM AC . To show that (R1∗ , R2∗ ) ∈ RCF for some N1 , we only need to choose N1 such that 1/2 + P/N1 > 3, or equivalently P/N1 > 5/2 (notice it satisfies the constraint P/N1 > 3/2). This completes the claim. Remark 7. Combining this result and Theorem 1, we can conclude that for the considered nested linear codes with rate (R1∗ , R2∗ ) in the proof, we have H(X1n + cX2n ) > H(X1n + X2n ) for any integer c ≥ 2, where X1n , X2n denote the uniformly chosen random codewords. V. D ISCUSSIONS Computation codes have been studied in many network information theory problems. The main motivation behind the use of such codes is that it is more efficient to compute a function of codewords than to recover the individual codewords separately. However, this efficiency comes with a cost. In this work we characterized duality relations between computation codes and codes for multiple-access and July 28, 2017 DRAFT 21 distributed compression. Our results are not limited to a specific computation code such as lattice or nested linear codes and apply to any efficient computation code. We showed that if the multiple access channel is “aligned” with the target computation function, then good computation codes must possess certain structure such that the individual messages cannot be recovered at the destination node, regardless of what decoder is used. We further explored a source coding setting to characterize a similar relationship. If the side information is “aligned” with the target function to be computed, then good computation codes must possess certain structure such that the individual sources cannot be recovered at the destination node. ACKNOWLEDGMENT The work of Jingge Zhu was supported by the Swiss National Science Foundation under Project P2ELP2 165137 and the work of Sung Hoon Lim was supported in part by the National Research Foundation of Korea (NRF) Grant NRF-2017R1C1B1004192. R EFERENCES [1] M. Wilson, K. Narayanan, H. Pfister, and A. Sprintson, “Joint physical layer coding and network coding for bidirectional relaying,” IEEE Trans. Inf. Theory, vol. 56, no. 11, 2010. [2] W. Nam, S.-Y. Chung, and Y. H. Lee, “Capacity of the Gaussian two-way relay channel to within 1/2 bit,” IEEE Trans. Inf. Theory, 2010. [3] B. Nazer and M. Gastpar, “Compute-and-forward: Harnessing interference through structured codes,” IEEE Trans. Inf. Theory, vol. 57, 2011. [4] S.-Y. R. Li, R. W. Yeung, and N. Cai, “Linear network coding,” Information Theory, IEEE Transactions on, vol. 49, no. 2, pp. 371–381, 2003. [5] R. Ahlswede, N. Cai, S.-Y. R. Li, and R. W. Yeung, “Network information flow,” Information Theory, IEEE Transactions on, vol. 46, no. 4, pp. 1204–1216, 2000. [6] S. Zhang, S. C. Liew, and P. P. Lam, “Hot topic: physical-layer network coding,” in Proceedings of the 12th annual international conference on Mobile computing and networking. [7] T. M. Cover and J. A. Thomas, Elements of information theory. ACM, 2006, pp. 358–365. John Wiley & Sons, 2006. [8] S. H. Lim, C. Feng, A. Pastore, B. Nazer, and M. Gastpar, “A Joint Typicality Approach to Algebraic Network Information Theory,” arXiv:1606.09548 [cs, math], Jun. 2016. [Online]. Available: http://arxiv.org/abs/1606.09548 [9] J. Zhu and M. Gastpar, “Typical sumsets of linear codes,” in 54st Annual Allerton Conference on Communication, Control, and Computing (Allerton), Sep. 2016. [10] J. Körner and K. Marton, “How to encode the modulo-two sum of binary sources,” vol. 25, no. 2, pp. 219–221, 1979. [11] A. D. Wyner, “Recent results in the Shannon theory,” vol. 20, no. 1, pp. 2–10, 1974. July 28, 2017 DRAFT
7cs.IT
Image-based Modelling of Organogenesis Dagmar Iber1,2,*, Zahra Karimaddini1,2, Erkan Ünal1,2,3 Affiliations: 1 – Department of Biosystems, Science and Engineering (D-BSSE), ETH Zurich, Switzerland 2 - Swiss Institute of Bioinformatics (SIB), Mattenstraße 26, 4058 Basel, Switzerland 3 – Department of Biomedicine, University of Basel, Mattenstraße 28, 4058 Basel, Switzerland * Corresponding Author: Dagmar Iber ([email protected]) Key Words: Image-based Modelling, Computational Biology, Developmental Biology Summary Statements: - Methods for image-based modelling to explore Organogenesis - A pipeline for the extraction of boundaries and displacement fields from 2D and 3D microscopy images - Strategies for meshing and the solution of partial differential equations (PDEs) on the extracted (growing) domains ABSTRACT One of the major challenges in biology concerns the integration of data across length and time scales into a consistent framework: how do macroscopic properties and functionalities arise from the molecular regulatory networks - and how can they change as a result of mutations? Morphogenesis provides an excellent model system to study how simple molecular networks robustly control complex processes on the macroscopic scale in spite of molecular noise, and how important functional variants can emerge from small genetic changes. Recent advancements in 3D imaging technologies, computer algorithms, and computer power now allow us to develop and analyse increasingly realistic models of biological control. Here we present our pipeline for image-based modeling that includes the segmentation of images, the determination of displacement fields, and the solution of systems of partial differential equations (PDEs) on the growing, embryonic domains. The development of suitable mathematical models, the data-based inference of parameter sets, and the evaluation of competing models are still challenging, and current approaches are discussed. INTRODUCTION The process by which embryos self-organize into mature organisms with their particular shape and organs has fascinated scientists for a long time. Decades of experiments in developmental biology have led to the identification of many of the regulatory factors that control organogenesis and tissue development [1, 2]. Although these factors and their main regulatory interactions have been defined, the regulatory logic is often still elusive. A deeper understanding of the regulatory networks that govern developmental processes is important to enable the design and engineering of new functionalities and the repair of organs and tissues in regenerative medicine. The size and morphology of organs and organisms are the result of the net effect of cell proliferation, differentiation, migration and apoptosis, and must be strictly controlled. Coordination of cell behavior within the tissue is achieved by cell-cell communication [3, 4] either between neighbouring cells via cell surface proteins (Notch-Delta, Cadherins etc) or gap junctions, or over longer distances via diffusible, secreted factors, called morphogens [5], or by cellular processes, referred to as cytonemes [6]. Mechanical feedbacks can further coordinate cell behavior within tissue [7-9]. Spatio-temporal gene expression and cellular events during morphogenesis are highly dynamic and involve complex interactions. Mathematical modeling has identified a number of candidate mechanisms for the control of such complex dynamic patterning processes [10, 11]. One of the oldest and most prominent ideas in developmental patterning is the Turing patterning mechanism. Alan Turing recognized that chemical substances, which he termed morphogens, can lead to the emergence of spatial patterns from noisy initial conditions by a diffusion-driven instability [5]. This mechanism has been highly attractive to explain biological patterning phenomena because deterministic, reliable symmetry breaks can be obtained with noisy initial conditions. A large number of patterning phenomena have been suggested to be controlled by a Turing mechanism, including those in the following references [12-16]. While all these models provide a good match with experimental observations, an experimental confirmation of the proposed Turing mechanisms is still outstanding because the kinetic rate constants have so far proved impossible to measure in the tissue. Pattern likeness itself is not a proof for the applicability of a Turing mechanism, and subsequent experiments in the Drosophila embryo have for instance ruled out the applicability of a Turing mechanisms – in spite of excellent pattern likeness [17]. More quantitative experimental data is therefore very much needed to test Turing models and alternative models, where proposed [13, 18]. The second important concept is the so-called French-flag model [19]. Assuming that a symmetry break has already taken place such that a particular morphogen is secreted only in some part of the tissue, this model stipulates that cells may determine their position relative to this source (and thus their cell fate) by reading out the concentration gradient that the morphogen will create across the tissue. Also here many open questions remain, in particular regarding the precision of the patterning mechanism [2022], and its robustness to noise [23] and to variable environmental conditions, e.g. temperature, as well as to differences in the size of the embryonic domain [24-27]. Many further concepts have been analysed [10], and have been applied to various patterning phenomena, including the emergence of travelling waves [28], wave pinning [29], shuttling [30], chemotaxis [31, 32], and mechanical feedbacks [9, 33]. Further experimental testing and refinement of all these mathematical concepts and ideas will be important. Most data in developmental biology is based on images, and recent developments in microscopy further enhance the opportunities to visualize developmental processes [34, 35]. Imaging enables the spatio-temporal visualization of regulatory aspects such as gene expression domains and protein localization, cell-based phenomena such as cell migration, division, and apoptosis [36], and the quantification of mechanical effects during morphogenesis [37-41]. Moreover, high-quality 3D imaging now provides detailed information on the complex architecture of tissues and organs [42, 43]. Most of these aspects have so far been analysed in isolation. Imagebased modeling provides an opportunity to integrate the wide range of imagebased spatio-temporal data with other biological datasets, e.g. qPCR, RNASeq, and proteomic data, into a consistent framework to arrive at a mechanistic understanding of morphogenesis [12, 14, 44-47]. Here, the gene expression domains indicate where the different model components are produced, while spatio-temporal information on protein distribution provide information regarding the spatio-temporal distribution of the model components. Moreover, cell-based data provides information on tissue growth and thus on advection and dilution terms (see below). In the following, we will explain the current approaches and methods for image-based modeling. SPATIO-TEMPORAL MODELS OF ORGANOGENESIS Spatio-temporal models of regulatory networks can be formulated as a set of reaction-diffusion equations of the form !!! !" = !∆!! + !(!! ). (1)! Here, ci denotes the concentration and Di the diffusion coefficient of component i. Δ represents the Laplace operator of the diffusion term, and R(ck) represents the reactions that alter the concentration of ci. The spatiotemporal models must be solved on suitable domains, and boundary and initial conditions need to be specified. While initial values are typically not known, reasonable approximations can typically be made. Simulations may then need to be run for a certain time period to achieve a reasonable starting point for physiological simulations, e.g. a steady-state. Boundary conditions can be implemented either as a set number (Dirichlet boundary conditions), a flux (von-Neumann boundary condition), or a combination of the two. Sometimes, the domain of interest needs to be embedded into a larger domain to obtain realistic boundary effects for the (smaller) domain of interest [48]. As domains, idealized approximations to reality are typically employed [47]. Advances in microscopy and computer algorithms now, however, also permit an image-based approach, where computational domains are obtained from microscopy. In the following, we will present a pipeline for image-based modeling (Figure 1). A PIPELINE FOR IMAGE-BASED MODELLING OF ORGANOGENESIS Before the computational work can be started, imaging data needs to be obtained of the tissue of interest. If different sub-structures are of interest, the tissue needs to be labeled accordingly. The sample preparation and staining methods of choice depends on the tissue, the substructure of interest, and the image acquisition technique and have their own challenges, which we will not discuss here. A large range of imaging techniques are available and are still being developed, as reviewed elsewhere [49]. The choice of imaging software is as important as the choice of the hardware. Thus, specialised software is required to control the functions of the optical microscopy tools and to collect and store the images that are acquired over time. A list of commercial, opensource and microscope companies’ software packages have been reviewed elsewhere [50]. Once the imaging data has been obtained, the images have to be visualized and analyzed to extract meaningful quantitative data from the microscopy images. Algorithms have been developed to analyse and process images, and we refer the interested reader to the wide range of available textbooks and further texts on the topic, e.g. [51-53]. For the user, software packages are available, including 3-D Slicer, AMIRA, Arivis, BioImageXD, Icy, Drishti, Fijii, IMARIS, MorphoGraphX, Rhino, and Simpleware. For a review of the available software packages, bioimaging libraries, and toolkits with their applications we refer the reader to [50, 54]. In the following, we will provide an overview of the specific steps that need to be taken for image-based modeling, and we will describe the procedure in detail for the software package AMIRA (Box 1). To use images in simulations, the following steps need to be performed: 1) image alignment and averaging, 2) image cropping and segmentation, and, 3) in case of growth processes, determination of the mapping between images at subsequent developmental stages. The domains can subsequently be meshed and used to solve mathematical models of the regulatory networks on the physiological domain. The finite element method (FEM) is the numerical method of choice to solve the PDE models on the physiological domains. A large number of FEM solvers are available, including Abaqus, ANSYS, and COMSOL Multiphysics as commercial packages and AMDiS, deal.ii, DUNE, FEniCS, FreeFEM, LifeV as open source academic packages. We will focus on the FEM solver COMSOL. In the following, we will discuss the different steps in detail. Alignment & Averaging If multiple image recordings of the organ or tissue are available at a given stage, then the 3D images can be aligned and averaged. The alignment procedure is a computationally non-trivial problem and requires the use of suitable optimization algorithms, as described in textbooks and reviews [51, 55] (Box 1). Averaging is subsequently performed by averaging pixel intensities of corresponding pixels in multiple datasets of the same size and resolution. This helps to assess the variability between embryos and identifies common features. It also reduces the variability due to experimental handling. However, averaging of badly aligned datasets can result in loss of biologically relevant spatial information. It is therefore important to run the alignment algorithm several times, starting with different initial positions of the objects, which are to be aligned. Image Segmentation The next step is to crop out the region of interest and to perform image segmentation. During image segmentation the digital image is partitioned into multiple subdomains, usually corresponding to anatomic features such as particular gene expression regions or different tissue layers (Figure 2). A wide range of algorithms is available for image segmentation, including thresholding, region-based segmentation, edge-based segmentation, levelsets, atlas-guided approaches, mean shift segmentation, and we refer the interested reader to textbooks and reviews on the topic [51-53]. Most segmentation algorithms are based on differences in pixel intensity and thus require a high signal-to-noise ratio in the images (see Box 1). Further manual work may be needed to complete domains. 2D Virtual sections and isosurfaces of 3D images 3D simulations are expensive and simulations are therefore often better first run on 2D sections (Figure 2). Following the alignment of the specimens in 3-D, 2-D optical sections can be extracted (see Box 1). SIMULATION OF NETWORK MODELS To simulate network models on the realistic geometries, the following steps need be performed: 1) generation of meshes, 2) import of meshes into an FEM solver, and 3) implementation of the PDE models and simulation of the models. The three steps will be discussed in the following. Mesh Generation & Import To numerically solve the partial derivative equations (PDEs) that describe the signaling networks of interest, surface and volume meshes of sufficient quality must be generated (Figure 2). A large variety of algorithms, including advancing front methods, grid, quadtree, and octree algorithms, as well as Delaunay refinement algorithms have been developed to create suitable meshes in 2D and 3D with different shapes, e.g. triangular, tetrahedral, quadrilateral and hexahedral, and we refer the interested reader to textbooks on the matter [56]. Image processing and FEM software packages (see above) as well as specialized meshing software, e.g. BioMesh3D, Gmsh, and MeshLab, can be used for mesh generation and subsequent improvement. The quality of the mesh depends on the mesh size and the ratio of the sides of the mesh elements. The linear size of the mesh should be much smaller than any feature of interest in the computational solution, i.e. if the gradient length scale in the model is 50 µm then the linear size of the mesh should be at least several times lower than 50 µm. Additionally, the ratio of the length of the shortest side to the longest side should be 0.1 or more. To confirm the convergence of the simulation, the model must be solved on a series of refined meshes. When the geometries are extracted from experimental images, then the resolution is often so high that the resulting meshes are very fine. Too dense meshes increase the simulation time. The resolution must therefore be decreased. If the original resolution is very high, this may have to be done in multiple steps. While doing this, it is important to avoid intersections and inverted mesh elements. PDE Solvers To exchange meshes between the image processing software and the simulation software, suitable file formats need to be chosen (Box 1). Once the meshes have been imported to an FEM solver, the PDE models can be solved on the domains of interest. Solving computational models of organogenesis on physiological domains can be computationally expensive and computational complexity should therefore be minimized as much as possible. This can be achieved, in particular, by minimizing the number of mesh elements and by smoothing sharp transitions and domain boundaries as much as possible. Details on how to solve PDE models of organogenesis and some approaches to reduce simulation time in COMSOL have been described in [57-59]. SIMULATIONS ON GROWING DOMAINS During embryonic development, tissue morphogenesis and signaling are tightly coupled. It is therefore important to simulate both tissue morphogenesis and signaling simultaneously in in silico models of developmental processes. The development of mechanistic models of tissue growth is challenging and requires detailed knowledge of the gene regulatory network, mechanical properties of the tissue, and its response to physical and biochemical cues. If these are not available, 3D image data can be used to solve the models on realistically expanding domains. Confocal microscopy [14, 60] and light-sheet microscopy [36, 61] can be used for live imaging. If light-sheet microscopy is not available and the specimen is too large for confocal microscopy, a developmental series based on fixed samples can be acquired with optical projection tomography (OPT) [62]. Determination of displacement fields To describe the growing domains, suitable displacement fields need to be determined from the data. In the ideal case, tissue development can be imaged continuously, and single cells can be tracked during live microscopy [63]. In that case, the displacement field can be determined as the displacement field of those cells. However, in most applications such data is not available. In the latter case, approximate displacement fields can be obtained by determining a mapping between the tissue boundaries of two stages that have been extracted at sequential time points during development. Ideally, the spacing between two time points should be rather small, at least small enough that the deformations are small. However, the minimal distance between two time points is often dictated by experimental limitations, in particular when biological processes cannot be imaged continuously and separate specimen at staged developmental time points have to be used. Even when cultured organs are imaged continuously, frame rates may be limiting. Accordingly, suitable algorithms need to be employed that can deal with the experimental time series. While there are, in principle, an infinite number of possible mappings between such consecutive shapes, there are a number of important constraints. First of all, mappings should generally not intersect because this would create numerical problems and would generally also not be realistic because cells (in epithelia) will normally not swap positions with cells at other positions. Moreover, given that the physiological displacement field is not known, it is sensible to create a displacement field that is both numerically favourable and biologically sensible. A range of mapping algorithms can be employed and which algorithm is most suitable depends on details of the geometries and their deformations (Algorithm 1) [64]. Algorithms for estimating displacement fields Before applying a mapping algorithm between the curve C1 at time t and the curve C2 at time t+Δt it is important to carry out three pre-processing steps: If the structure has grown substantially in between the two measurements, it is often helpful to first stretch the curves uniformly such that the two curves are similar (Figure 3A-D). Next, the same number of points, N, should be interpolated on both boundary curves such that the Euclidean distance is identical between all points on each boundary curve. Finally, the direction, in which the points on C1 and C2 are sampled, should be the same. After applying the above pre-processing steps, a map between the interpolated points can be established. Mappings based on the minimal distance between the two curves are easy to implement, but frequently fail (Figure 3A) [60, 64]. If C1 and C2 are open boundary curves, then the uniform mapping algorithm is more suitable, where the mapping is established between an equal number of equidistant points on the two curves (Figure 3E, Algorithm 2). When the growth of the domain is not uniform, then the displacement field is, however, biased towards the direction of maximal growth (Figure 3F). In case of closed boundaries, we recommend the use of normal mapping, where the mapping is based on vectors that are normal to the original curve C1 and end on the target curve C2 (Figure 3G, Algorithm 3). If the normal vectors intersect (Figure 3G), then either a reverse-normal mapping can be employed (Figure 3H), or the diffusion-mapping algorithm can be used instead (Figure 3I-L, Algorithm 4). In case of the diffusion mapping, the steady state diffusion equation is solved in between the curves C1 and C2 (Figure 3I), and the displacement field is based on the start and end points of streamlines (Figure 3J), which never cross. Depending on the shape of the domain the diffusion mapping is better calculated from C1 to C2 (Figure 3K) or in the reverse direction (Figure 3L). While the diffusion mapping prevents the crossing of the displacement vectors, we note that the diffusion mapping is computationally more expensive and the resulting displacement fields are more likely to result in mesh distortions. Diffusion mapping should therefore only be used when normal mapping or minimal distance mapping fail. If a domain contains subdomains, then the boundaries that divide the subdomains intersect (Figure 4A). Intersections need to be avoided and the intersected curve should therefore be split into two curves at the intersection point (Algorithm 5) [65]. This step has to be done for all intersected boundaries at time t and at time t+Δt (Figure 4B,C). The displacement fields for all independent segments can then be determined as discussed above. We note that Algorithm 1 only works well as long as the shapes are relatively close. In case of larger differences, we used the landmark-based Bookstein algorithm [66], as illustrated in Figure 5 [14]. Here we obtained lung buds at different developmental stages (Figure 5A), and determined the displacement field (Figure 5B) and thereby the growth fields (Figure 5C) between those stages. We then imported the mesh of the earlier stage lung bud into the FEM solver and solved signaling models on the imported shape (Figure 5D). In certain cases, the maxima of the predicted signaling fields coincided with the maxima of the embryonic growth fields (Figure 5E). We note that while the landmark-based Bookstein algorithm [66] provided a straightforward method to obtain the displacement fields for the shapes, the usage of such a manual approach is very work intensive and dependent on the user and thus to a certain extent arbitrary. Moreover, for complex structures such as branched organs, the identification of mapping points can be difficult even when stereoscopic visualization technologies are available. We therefore recommend to adapt (semi-) automatic mapping algorithms as described above to the particular situation as much as possible. Simulations on growing domains Once the displacement fields have been determined, they can be used to solve the PDE models on a realistically growing and deforming domain (Figure 6). To carry out the FEM-based simulations, the meshed geometries (Figure 6A) and displacement fields need to be imported into an FEM solver. On growing domains, advection and dilution effects need to be incorporated [67], such that Eq. (1) becomes on a growing domain !!! !" + ∇ ∙ (! ∙ !! ) = !∆!! + !(!! ). (2)! Here ! denotes the velocity field. To solve coupled PDE models on complex growing geometries, the Arbitrary Lagrangian Eulerian (ALE) method should be used. The ALE method is available in the commercial FEM solver COMSOL, which we use to solve our PDE models of organogenesis on growing domains (Figure 6B) [15, 26, 48, 60, 68-70]. PARAMETER ESTIMATION AND MODEL SELECTION FOR IMAGEBASED MODELLING In the final step, the image-based data can be used to infer parameter sets for the models and to evaluate models and hypotheses. To evaluate the match between simulations and data, first a suitable metric needs to be defined to quantify the difference between model prediction and experimental data. Which metric is most suitable depends on the type of experimental data and the model [14, 71, 72]. Thus, only very little data is truly quantitative, such as the strength of the growth fields discussed above. A lot of data is purely qualitative, e.g. in situ hybridization data, and some data is semi-quantitative, e.g. fluorescent data. Given that the choice of a metric is to a certain extent arbitrary, but can affect the ranking of parameter sets and models, different metrics should ideally be evaluated [14, 71, 72]. For most models, several data sets need to be combined, and appropriate weighting functions need to be defined. Once a metric and a weighting of the different datasets has been defined, an optimization algorithm has to be chosen to minimize the distance between the data and the simulation output. If a prior probability distribution for the parameter values is known, Bayesian optimization is the method of choice to incorporate this information into the optimization process. A wide range of global and local optimization algorithms have been developed, and we refer the interested reader to textbooks for details [73] and to previous reviews on parameter estimation for biological models [74-77]. If the models are sufficiently simple, then it is computationally feasible to first globally screen the parameter sets over the entire physiological range of the parameter values, and to subsequently carry out a local optimization procedure for the best parameter sets to further improve the fit between simulation output and data [14]. Based on the parameter screens, the posterior probability distributions for the parameters can be reconstructed and the relative likelihood of different models can be evaluated [78]. In case of multiple objectives (because of distinct datasets, genotypes etc.) in can be sensible to evaluate the Pareto optimality [71]. In case of more complex signaling models, a dense sampling of the parameter space is no longer possible. Interpolation algorithms such as Gaussian Process Upper Confidence Bound (GC-UCB) and Kriging methods can be used to guide the sampling process and thus reach the optimal parameter set with less sampling steps [79, 80]. Nonetheless it is sensible to keep model complexity to a minimum, and the field of model reduction is currently very active as reviewed elsewhere [81, 82]. Many biological models are modular and modules may be important on different time scales. In that case, parameter values can be estimated sequentially, as done recently in a tree-based approach [83]. CONCLUSION Recent advances in imaging techniques, algorithms and computer power now permit the use of spatio-temporal imaging data for the generation and testing of increasingly realistic models of developmental processes. We have reviewed a pipeline for image-based modeling that comprises image acquisition, processing (segmentation, alignment, averaging), the determination of displacement fields, meshing of domains, transfer to an appropriate FEM solver, parameter inference and model selection. The computational approach reviewed here should enable a wider adoption of realistic spatio-temporal computational models by both biologists and computational biologists. The field is rapidly moving forward and offers ample challenges and opportunities for computational scientists. Further developments are required, in particular in the areas of PDE solvers, cell-based models, and parameter inference. Thus, available PDE solvers were developed to tackle physical rather than biological problems and often cannot easily and efficiently be used to model organogenesis, especially on 3D growing domains. A number of software packages for cell-based tissue simulations already exist, but further developments are required to fully represent and analyse tissue mechanics and signaling in 3D [84]. Finally, current methods for parameter estimation cannot easily handle the complexity of biological models. We expect that further developments in these three areas will allow to fully exploit the 3D dynamic imaging data that can now be obtained with lightsheet microscopy for a mechanistic understanding of developmental processes. Acknowledgements The authors thank past and present members of the CoBi group for discussions and acknowledge funding from a SystemsX iPhD grant and the SystemsX NeurostemX RTD. REFERENCE 1. Gilbert SF. Developmental Biology. Sinauer Associates, 2013. 2. Wolpert L. Principles of Development. Oxford University Press (OUP), 2011. 3. Restrepo S, Zartman JJ, Basler K. Coordination of Patterning and Growth by the Morphogen DPP., Curr Biol 2014;24:R245-R255. 4. Müller P, Rogers KW, Yu SR et al., Development 2013;140:1621-1638. 5. Turing AM. The chemical basis of morphogenesis, Phil. Trans. Roy. Soc. Lond 1952;B237:37-72. 6. Kornberg TB, Roy S. Cytonemes as specialized signaling filopodia, Development 2014;141:729-736. 7. Gjorevski N, Nelson CM. The mechanics of development: Models and methods for tissue morphogenesis, Birth Defects Res C Embryo Today 2010;90:193-202. 8. Aegerter-Wilmsen T, Heimlicher MB, Smith AC et al. Integrating forcesensing and signaling pathways in a model for the regulation of wing imaginal disc size., Development 2012;139:3221-3231. 9. Hufnagel L, Teleman AA, Rouault H et al. On the mechanism of wing size determination in fly development., Proceedings of the National Academy of Sciences of the United States of America 2007;104:3835-3840. 10. Murray JD. Mathematical Biology. 3rd edition in 2 volumes: Mathematical Biology: II. Spatial Models and Biomedical Applications.: Springer, 2003. 11. Umulis DM, Othmer HG. The role of mathematical models in understanding pattern formation in developmental biology, Bull Math Biol 2015;77:817-845. 12. Salazar-Ciudad I, Jernvall J. A computational model of teeth and the developmental origins of morphological variation., Nature 2010;464:583-586. 13. Sick S, Reinker S, Timmer J et al. WNT and DKK determine hair follicle spacing through a reaction-diffusion mechanism., Science 2006;314:14471450. 14. Menshykau D, Blanc P, Unal E et al. An interplay of geometry and signaling enables robust lung branching morphogenesis, Development 2014;141:4526-4536. 15. Badugu A, Kraemer C, Germann P et al. Digit patterning during limb development as a result of the BMP-receptor interaction., Sci Rep 2012;2:991. 16. Kondo, Asai. A reaction–diffusion wave on the skin of the marine angelfish Pomacanthus, Nature 1995;376:765-768. 17. Akam M. Drosophila development: making stripes inelegantly. Nature. 1989, 282-283. 18. Cheng CW, Niu B, Warren M et al. Predicting the spatiotemporal dynamics of hair follicle patterns in the developing mouse, Proc Natl Acad Sci U S A 2014;111:2596-2601. 19. Wolpert L. Positional information and the spatial pattern of cellular differentiation, J Theor Biol 1969;25:1-47. 20. Houchmandzadeh B, Wieschaus E, Leibler S. Establishment of developmental precision and proportions in the early Drosophila embryo, Nature 2002;415:798-802. 21. Gregor T, Tank DW, Wieschaus EF et al. Probing the Limits to Positional Information, Cell 2007;130:153-164. 22. Bollenbach T, Pantazis P, Kicheva A et al. Precision of the Dpp gradient., Development 2008;135:1137-1146. 23. Saunders TE, Howard M. Morphogen profiles can be optimized to buffer against noise., Phys Rev E Stat Nonlin Soft Matter Phys 2009;80:041902. 24. Gregor T, Bialek W, de Ruyter van Steveninck RR et al. Diffusion and scaling during early embryonic pattern formation., Proceedings of the National Academy of Sciences of the United States of America 2005;102:1840318407. 25. Wartlick O, Jülicher F, González-Gaitán M. Growth control by a moving morphogen gradient during Drosophila eye development, Development 2014;141:1884-1893. 26. Fried P, Iber D. Dynamic scaling of morphogen gradients on growing domains, Nat Commun 2014;5:5077. 27. Umulis DM, Othmer HG. Mechanisms of scaling in pattern formation, Development 2013;140:4830-4843. 28. Cooke J, Zeeman EC. A clock and wavefront model for control of the number of repeated structures during animal morphogenesis, J Theor Biol 1976;58:455-476. 29. Mori Y, Jilkine A, Edelstein-Keshet L. Wave-pinning and cell polarity from a bistable reaction-diffusion system, Biophys J 2008;94:3684-3697. 30. Eldar A, Dorfman R, Weiss D et al. Robustness of the BMP morphogen gradient in Drosophila embryonic patterning, Nature 2002;419:304-308. 31. Painter KJ, Maini PK, Othmer HG. A chemotactic model for the advance and retreat of the primitive streak in avian development, Bull Math Biol 2000;62:501-525. 32. Painter KJ, Maini PK, Othmer HG. Stripe formation in juvenile Pomacanthus explained by a generalized turing mechanism with chemotaxis, Proc Natl Acad Sci U S A 1999;96:5549-5554. 33. Aegerter-Wilmsen T, Aegerter CM, Hafen E. Model for the regulation of size in the wing imaginal disc of Drosophila, Mechanisms of … 2007. 34. Oates AC, Gorfinkiel N, Gonzalez-Gaitan M et al. Quantitative approaches in developmental biology., Nature reviews. Genetics 2009;10:517-530. 35. Kicheva A, Pantazis P, Bollenbach T et al. Kinetics of Morphogen Gradient Formation, Science 2007;315:521-525. 36. Keller PJ, Schmidt AD, Wittbrodt J et al. Reconstruction of zebrafish early embryonic development by scanned light sheet microscopy, Science 2008;322:1065-1069. 37. Routier-Kierzkowska AL, Weber A, Kochova P et al. Cellular force microscopy for in vivo measurements of plant tissue mechanics, Plant Physiol 2012;158:1514-1522. 38. Heisenberg CP, Bellaiche Y. Forces in tissue morphogenesis and patterning, Cell 2013;153:948-962. 39. Blanchard GB, Kabla AJ, Schultz NL et al. Tissue tectonics: morphogenetic strain rates, cell shape change and intercalation, Nat Methods 2009;6:458-464. 40. Wyczalkowski MA, Chen Z, Filas BA et al. Computational models for mechanics of morphogenesis, Birth Defects Res C Embryo Today 2012;96:132-152. 41. LeGoff L, Rouault H, Lecuit T. A global pattern of mechanical stress polarizes cell divisions and cell shape in the growing Drosophila wing disc, Development 2013;140:4051-4059. 42. Short K, Hodson M, Smyth I. Spatial mapping and quantification of developmental branching morphogenesis., Development 2012. 43. Combes AN, Short KM, Lefevre J et al. An integrated pipeline for the multidimensional analysis of branching morphogenesis, Nat Protoc 2014;9:2859-2879. 44. Iber D, Zeller R. Curr Opin Genet Dev 2012;22:570-577. 45. Iber D, Menshykau D. The control of branching morphogenesis., Open biology 2013;3:130088-130088. 46. Iber D, Germann P. How do digits emerge? - mathematical models of limb development., Birth Defects Res C Embryo Today 2014;102:1-12. 47. Probst S, Kraemer C, Demougin P et al. SHH propagates distal limb bud development by enhancing CYP26B1-mediated retinoic acid clearance via AER-FGF signalling., Development 2011;138:1913-1923. 48. Menshykau D, Kraemer C, Iber D. Branch mode selection during early lung development, PLoS Comput Biol 2012;8:e1002377. 49. Howard GC, Brown WE, Auer M. Imaging Life: Biological Systems from Atoms to Tissues. Oxford University Press, 2014. 50. Eliceiri KW, Berthold MR, Goldberg IG et al. Biological imaging software tools, Nat Methods 2012;9:697-710. 51. Szeliski R. Computer Vision. Springer, 2011. 52. Russ JC. The Image Processing Handbook, Sixth Edition. CRC Press, 2011. 53. Burger W, Burge MJ. Principles of Digital Image Processing: Core Algorithms London: Springer, 2009. 54. Wiesmann V, Franz D, Held C et al. Review of free software tools for image analysis of fluorescence cell micrographs, J Microsc 2015;257:39-53. 55. Goshtasby, Ardeshir A. Image Registration - Principles, Tools and Methods. Springer, 2012. 56. Lo DSH. Finite Element Mesh Generation. CRC Press, 2015. 57. Germann P, Menshykau D, Tanaka S et al. Simulating Organogenesis in Comsol. COMSOL conference. Stuttgart, 2011. 58. Menshykau D, Iber D. Simulating Organogenesis with Comsol: Interacting and Deforming Domains. In: COMSOL Conference 2012. Milan, 2012. COMSOL Proceedings. 59. Vollmer J, Menshykau D, Iber D. Simulating Organogenesis in COMSOL: Cell-based Signaling Models, CORD Conference Proceedings 2013. 60. Adivarahan S, Menshykau D, Michos O et al. Dynamic Image-Based Modelling of Kidney Branching Morphogenesis. Berlin, Heidelberg: Springer Berlin Heidelberg, 2013, 106-119. 61. Stelzer EH. Light-sheet fluorescence microscopy for quantitative biology, Nat Methods 2015;12:23-26. 62. Sharpe J, Ahlgren U, Perry P et al. Optical projection tomography as a tool for 3D microscopy and gene expression studies., Science 2002;296:541545. 63. Gros J, Hu JK-H, Vinegoni C et al. WNT5A/JNK and FGF/MAPK pathways regulate the cellular events shaping the vertebrate limb bud., Curr Biol 2010;20:1993-2002. 64. Schwaninger CA, Menshykau D, Iber D. Simulating Organogenesis: Algorithms for the Image-Based Determination of Displacement Fields, Acm Transactions on Modeling and Computer Simulation 2015;25. 65. Karimaddini Z, Ünal E, Menshykau D et al. Simulating Organogenesis in COMSOL: Image-based Modeling. COMSOL conference. Cambridge: COMSOL Proceedings, 2014. 66. Bookstein FL. Principal warps: Thin-plate splines and the decomposition of deformations, Pattern Analysis and Machine Intelligence 1989. 67. Iber D, Tanaka S, Fried P et al. Simulating Tissue Morphogenesis and Signaling. In: Nelson C. M. (ed) Methods in Molecular Biology (Springer). New York, NY: Springer New York, 2015, 323-338. 68. Tanaka S, Iber D. Inter-dependent tissue growth and Turing patterning in a model for long bone development, Phys Biol 2013;10:056009. 69. Bachler M, Menshykau D, De Geyter C et al. Species-specific differences in follicular antral sizes result from diffusion-based limitations on the thickness of the granulosa cell layer, Mol Hum Reprod 2014;20:208-221. 70. Celliere G, Menshykau D, Iber D. Simulations demonstrate a simple network to be sufficient to control branch point selection, smooth muscle and vasculature formation during lung branching morphogenesis, Biol Open 2012;1:775-788. 71. Pargett M, Rundell AE, Buzzard GT et al. Model-based analysis for qualitative data: an application in Drosophila germline stem cell regulation, PLoS Comput Biol 2014;10:e1003498. 72. Hengenius JB, Gribskov M, Rundell AE et al. Making models match measurements: model optimization for morphogen patterning networks, Semin Cell Dev Biol 2014;35:109-123. 73. Chong EKP, Zak SH. An Introduction to Optimization. John Wiley & Sons, 2013. 74. Jaqaman K, Danuser G. Linking data to models: data regression, Nat Rev Mol Cell Biol 2006;7:813-819. 75. Ashyraliyev M, Fomekong-Nanfack Y, Kaandorp JA et al. Systems biology: parameter estimation for biochemical models., FEBS Journal 2009;276:886-902. 76. Geier F, Fengos G, Felizzi F et al. Analyzing and constraining signaling networks: parameter estimation for the user., Methods in molecular biology (Clifton, N.J.) 2012;880:23-39. 77. Raue A, Karlsson J, Saccomani MP et al. Comparison of approaches for parameter identifiability analysis of biological systems, Bioinformatics (Oxford, England) 2014;30:1440-1448. 78. Burnham KP, Anderson DR. Model Selection and Multimodel Inference. New York, NY: Springer New York, 2004. 79. Srinivas N, Krause A, Kakade SM et al. Information-Theoretic Regret Bounds for Gaussian Process Optimization in the Bandit Setting, Ieee Transactions on Information Theory 2012;58:3250-3265. 80. Rasmussen CE, Williams C. Gaussian Processes for Machine Learning, Model Selection and Adaptation of Hyperparameters, Chapter 5. 2006. 81. Manzoni A, Quarteroni A, Rozza G. Computational Reduction for Parametrized PDEs: Strategies and Applications, Milan Journal of Mathematics 2012;80:283-309. 82. Leugering Gn. Trends in PDE constrained optimization. Cham Switzerland ; New York: Birkhäuser ; Springer, 2014. 83. Velten B, Ünal E, Iber D. Image-based Parameter Inference for Spatiotemporal models of Organogenesis. International Symposium on Nonlinear Theory & its Applications (NOLTA 2014 ). Luzern, CH, 2014. 84. Tanaka S, Sichau D, Iber D. LBIBCell: a cell-based simulation environment for morphogenetic problems., Bioinformatics (Oxford, England) 2015. 85. Deserno TM. Biomedical Image Processing. Springer, 2011. BOX 1: SOFTWARE DETAILS FOR IMAGE PROCESSING, MESH GENERATION & PARAMETER OPTIMIZATION In the following, we provide details on AMIRA-based image processing and mesh generation as well as mesh import, PDE model simulation, and parameter optimization in the FEM solver COMSOL. 1. Alignment & Averaging To align images a number of iterative hierarchical optimization algorithms, e.g. QuasiNewton, are available in the software package AMIRA, as well as similarity measures, e.g. Euclidean distance. Averaging is subsequently performed by averaging pixel intensities of corresponding pixels in multiple datasets of the same size and resolution. 2. Image Segmentation In AMIRA, a variety of algorithms are available for image segmentation, including a thresholding algorithm, which is suitable for most 3-D images, a watershed algorithm for the segmentation of more complex structures, and a top-hat algorithm for the detection of dark or white regions [52, 85]. Given the dependency of these algorithms on differences in pixel intensity and thus on a sufficient signal-to-noise ratio in the images, further manual work may be needed to complete domains. 3. 2D Virtual sections and isosurfaces of 3D images In AMIRA, the SurfaceCut module is available for this purpose. The boundaries of the 2-D sections can be extracted in AMIRA using the Intersect module. Once saved in ASCII format, the section boundaries can be further processed in MATLAB to smooth and fine-tune the subdomains of the boundaries. 4. AMIRA Mesh Import into the FEM solver COMSOL AMIRA meshes can be saved in the I-DEAS universal data format, which can be read by the Gmsh software and saved as a Nastran Bulk data file. The file extension of the Nastran Bulk data file needs to be changed from UNV to DAT to make it compatible with the simulation software COMSOL Multiphysics. In the COMSOL mesh module, the mesh can then be imported. 5. Parameter Optimization in COMSOL COMSOL provides a range of optimization solvers, including gradient-based ones, e.g. Levenberg-Marquardt, Method of Moving Asymptotes (MMA), Sparse Nonlinear Optimizer (SNOP), and derivative free ones, e.g. constraint optimization by linear approximation (COBYLA), and bound optimization by quadratic approximation (BOBYQA). BOX 2: MAPPING ALGORITHMS ● Uniform Mapping (Algorithm 2) This algorithm maps each point on C1 to a point on C2 such that the order of points on C1 and C2 is conserved, assuming that both boundary curves contain the same number of equidistant points. ● Normal Mapping (Algorithm 3) The normal vector at every point on the curve C1 is computed. Then, each point on C1 is mapped to the closest point on C2, where the normal vector and C2 intersect. ● Diffusion Mapping (Algorithm 4) This algorithm solves the steady state diffusion equation (Δc=0) with Dirichlet boundary conditions (c=1 on C1 and c=0 on C2) in the area between the two boundaries. The mapping vectors are calculated as the difference between the start and the end point of the streamlines. The streamlines can be estimated using the COMSOL Multiphsyics particle tracking module. ● Intersecting Curves (Algorithm 5) In case of two boundary curves B1 ={P11, …, Pn1} and B2 ={P,…, Pm2} that intersect at point P, B1 should be split into two segments B1,seqment1 ={P11, …, P} and B1,seqment2 ={P, …, Pn1}, while B2 remains the same. This step has to be done at time t and at time t+Δt. To determine the displacement fields, uniform mapping (Algorithm 2) should subsequently be applied to each open segment. FIGURES Figure 1: A Pipeline for Image-based Modelling of Organogenesis The figure summarizes the steps for image-based modeling. For details see the main text. Figure 2: Extraction of physiological domains for FEM modelling After acquisition of the 3D image of the organ of interest (here an embryonic lung), the structure of interest is identified (here the tip of a lung bud) and cropped out for further processing. Based on markers, sub-structures of interest can be segmented. Finally, surfaces can be extracted. In a separate step, 2-D surface cuts can be generated to extract 2D planes and their boundaries. Finally, the domain can be meshed. Figure 3: Determination of Displacement Fields (A-D) Transformation prior to the mapping can improve the resulting displacement field. (A) The displacement field (red) was computed between C1 (green) and C2 (blue) using the minimal distance algorithm. (B) C1 is scaled to be more similar to C2; the new curve (red, dashed line) is called C1,s. (C) The displacement field (red) is computed from the transformed curve C1,s (green) onto C2. (D) The starting points of the vectors on C1,s where finally transformed back onto the original curve C1. Comparison of the displacement fields (red) in panels A and D shows that, as a result of the transformation, the number of regions on C2, onto which no points were mapped, has decreased and the displacement field quality has therefore increased. (E-F) Uniform mapping. (E) The displacement field of open curves is determined by interpolating both curves with equidistant points and by mapping the points consecutively onto each other. (F) When the growth of the domain is not uniform, the displacement field is biased towards the direction of maximal growth. (G-H) Normal mapping. (G) If C1 encloses a non-convex domain and both curves are not very close to each other in the concave regions of C1, the displacement field vectors generated by normal mapping cross each other. (H) The problem can be resolved by using reverse normal mapping, i.e. by mapping C2 onto C1. (I-L) Diffusion mapping. (I) The steady-state solution of the diffusion equation. (J) The streamlines, as obtained by particle tracking from C1 to C2. (K) The displacement field vectors are obtained by connecting the start and the end points of the streamlines. (L) Reverse diffusion mapping, i.e. C2 is mapped onto C1. This yields better displacement fields when C2 is much larger than C1 . The figure reproduces panels from [64]. Figure 4: Displacement Fields for Domains with Internal Boundaries (A) A domain with three subdomains. The boundary curves (black, red, green) intersect at different points. (B) C1 (green) and C2 (red) intersect at point P. (C) To map the intersection point P (blue point) at time t to the intersection point at t+1, the curves are divided into segments, such that the point P becomes the start/end point of the intersecting curves. The figure reproduces panels from [65]. Figure 5: Image-based Modelling with embryonic data (A) 3D lung bud shapes at two different stages. (B) A displacement field between the two stages shown in panel A. (C) The displacement vectors with out-ward pointing vectors correspond to the growth field. (D) The solution of a ligand-receptor based Turing model on the first stage of the segmented lung in panel A. (E) The predicted distribution of the ligand-receptor signaling pattern (solid colours) coincides with the embryonic growth field (arrows). The Figure reproduces panels from [14]. Figure 6: Simulations on growing domains (A) The meshed domain of an ureteric bud. (B) The solution of a computational model (solid colours) and the estimated growth fields (coloured arrows) of a growing ureteric bud. The figure reproduces panels from [64]. Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6
5cs.CE
1 Learning Deep Convolutional Networks for Demosaicing arXiv:1802.03769v1 [cs.CV] 11 Feb 2018 Nai-Sheng Syu∗ , Yu-Sheng Chen∗ , Yung-Yu Chuang Abstract—This paper presents a comprehensive study of applying the convolutional neural network (CNN) to solving the demosaicing problem. The paper presents two CNN models that learn end-to-end mappings between the mosaic samples and the original image patches with full information. In the case the Bayer color filter array (CFA) is used, an evaluation on popular benchmarks confirms that the data-driven, automatically learned features by the CNN models are very effective and our best proposed CNN model outperforms the current state-of-the-art algorithms. Experiments show that the proposed CNN models can perform equally well in both the sRGB space and the linear space. It is also demonstrated that the CNN model can perform joint denoising and demosaicing. The CNN model is very flexible and can be easily adopted for demosaicing with any CFA design. We train CNN models for demosaicing with three different CFAs and obtain better results than existing methods. With the great flexibility to be coupled with any CFA, we present the first data-driven joint optimization of the CFA design and the demosaicing method using CNN. Experiments show that the combination of the automatically discovered CFA pattern and the automatically devised demosaicing method outperforms other patterns and demosaicing methods. Visual comparisons confirm that the proposed methods reduce more visual artifacts. Finally, we show that the CNN model is also effective for the more general demosaicing problem with spatially varying exposure and color and can be used for taking images of higher dynamic ranges with a single shot. The proposed models and the thorough experiments together demonstrate that CNN is an effective and versatile tool for solving the demosaicing problem. Index Terms—Convolutional neural network, demosaicing, color filter array (CFA). I. I NTRODUCTION M OST digital cameras contain sensor arrays covered by color filter arrays (CFAs), mosaics of tiny color filters. Each pixel sensor therefore only records partial spectral information about the corresponding pixel. Demosaicing, a process of inferring the missing information for each pixel, plays an important role to reconstruct high-quality full-color images [2], [3], [4]. Since demosaicing involves prediction of missing information, there are inevitably errors, leading to visual artifacts in the reconstructed image. Common artifacts include the zipper effects and the false color artifacts. The former refers to abrupt or unnatural changes of intensities over neighboring pixels while the later is for the spurious colors that are not present in original image. In principle, the CFA design and the demosaicing method should be devised jointly ∗ Nai-Sheng Syu and Yu-Sheng Chen contributed equally to this work. This work is based on Nai-Sheng Syu’s master thesis [1]. All authors are with the Department of Computer Science and Information Engineering, National Taiwan University, Taipei, Taiwan, 106. E-mail: vm3465s939873 | nothinglo | [email protected]. for reducing visual artifacts as much as possible. However, most researches only focus on one of them. The Bayer filter is the most popular CFA [5] and has been widely used in both academic researches and real camera manufacturing. It samples the green channel with a quincunx grid while sampling red and blue channels by a rectangular grid. The higher sampling rate for the green component is considered consistent with the human visual system. Most demosaicing algorithms are designed specifically for the Bayer CFA. They can be roughly divided into two groups, interpolationbased methods [6], [7], [8], [9], [10], [11], [12], [13], [14] and dictionary-based methods [15], [16]. The interpolationbased methods usually adopt observations of local properties and exploit the correlation among wavelengths. However, the handcrafted features extracted by observations have limitations and often fail to reconstruct complicated structures. Although iterative and adaptive schemes could improve demosaicing results, they have limitations and introduce more computational overhead. Dictionary-based approaches treat demosaicing as a problem of reconstructing patches from a dictionary of learned base patches. Since the dictionary is learned, it can represent the distribution of local image patches more faithfully and provide better color fidelity of the reconstructed images. However, the online optimization for reconstruction often takes much longer time, making such methods less practical. Despite its practical use for decades, researches showed the Bayer CFA has poor properties in the frequency-domain analysis [17]. Thus, some efforts have been put in proposing better CFA designs for improving color fidelity of the demosaiced images [18], [19], [20]. Earlier work mainly focused on altering the arrangement of RGB elements to get better demosaicing results in terms of some handcrafted criteria. Some also explored color filters other than primary colors. Inspired by the frequency representation of mosaiced images [17], several theoretically grounded CFA designs have been proposed [18], [19]. They however involve considerable human effort. Recently, automatic methods for generating CFAs have been proposed by exploiting the frequency structure, a matrix recording all the luminance and chrominance components of given mosaiced images [20]. However, although theoretically better, most of these CFAs can only reach similar performances as the state-of-the-art demosaicing methods with the Bayer CFA. The main reason is that the more complicated CFA designs require effective demosaicing methods to fully release their potential. Unfortunately, due to the complex designs, such demosaicing methods are more difficult to devise and, compared with the Bayer CFA, less efforts have been put into developing demosaicing methods for these CFAs. 2 We address these issues by exploring the convolutional neural network (CNN). Because of breakthroughs in theory and improvements on hardware, recently CNNs have shown promises for solving many problems, such as visual recognition, image enhancement and game playing. By learning through data, the network automatically learns appropriate features for the target applications. We first address the demosaicing problem with the popular Bayer CFA (Section III). Inspired by CNN models for super-resolution [21], [22], we present two CNN models, DeMosaicing Convolutional Neural Network (DMCNN, Section III-A) and Very Deep DMCNN (DMCNNVD, Section III-B), for demosaicing. In contrast with handcrafted features/rules by many interpolation-based methods, the CNN models automatically extract useful features and captures high-level relationships among samples. Experiments show that the CNN-based methods outperforms the state-ofthe-art methods in both the sRGB space (Section III-C) and the linear space (Section III-D). In addition, they could perform denoising and demosaicing simultaneously if providing proper training data. We next show that the CNN-based methods can be easily adopted for demosaicing with CFA designs other than the Bayer one (Section IV). The data-driven optimization approach makes it easy to train the CNN-based demosaicing methods with different CFAs and outperform existing methods (Section IV-A). With its flexibility to be used with any CFA, we present the first data-driven method for joint optimization of the CFA design and the demosaicing method (Section IV-B). Finally, we demonstrate that the CNN-based method can also be applied to solving a more challenging demosaicing problem where the filter array has spatially varying exposure and color (Section IV-C). It enables taking images with a higher dynamic range using a shingle shot. All together, the paper presents a comprehensive study which thoroughly explores the applications of CNN models to the demosaicing problems. II. R ELATED WORK Color demosaicing. The demosaicing methods can be roughly classified into two categories: interpolation-based [6], [7], [8], [9], [10], [11], [12], [13], [14] and dictionary-based methods [15], [16]. Surveys of early methods can be found in some comprehensive review papers [2], [3], [4]. Recently, Kiku et al. [8] proposed a novel way to demosaic images in the residual space, and later extended the method to minimize Laplacian of the residual, instead of the residual itself [9]. The residual space is considered smoother and easier for reconstruction. Monno et al. [10] proposed an iterative, adaptive version of residual interpolation framework. CFA design. Alleysson et al. [17] analyzed the demosaicing problem in the frequency domain. In the frequency domain, the CFA pattern is usually decomposed into three components, luminance and two chrominance frequencies. Hirakawa et al. [18] formulated CFA design as a problem to maximize the distances between luminance and chrominance components and obtained the optimal pattern by exhaustive search in the parameter space. Condat [23] followed the same spirit and proposed a CFA design that is more robust to noise, aliasing, and low-light circumstances. Hao et al. [19] and Bai et al. [20] each introduced a pattern design algorithm based on the frequency structure proposed by Li et al. [24]. Hao et al. [19] formulated the CFA design problem as a constrained optimization problem and solved it with a geometric method. Later, Bai et al. [20] introduced an automatic pattern design process by utilizing a multi-objective optimization approach which first proposes frequency structure candidates and then optimizes parameters for each candidate. General demosaicing. In addition to colors, other properties of light, such as exposures (spatially varying exposure, SVE) and polarization, could also be embedded into the filter array and more general demosaicing algorithms can be used for recovering the missing information. Nayar et al. [25] proposed a general demosaicing framework, Assorted Pixel, by assuming the demosaiced result can be obtained from an ndegree polynomial function of neighboring mosaiced pixels. The whole process can therefore be thought as a regression problem by solving a linear system. Yasuma et al. [26] later proposed a more general pattern, Generalized Assorted Pixel, with the capability to recover monochrome, RGB, high dynamic range (HDR), multi-spectral images while sacrificing spatial resolutions. We adopt a similar spatially varying exposure and color (SVEC) setting as Nayar et al. [25] to demonstrate the potential of the CNN-based methods for generalized demosaicing. Convolution neural networks. To date, deep learning based approaches have dominated many high-level and low-level vision problems. Krizhevsky et al. [27] showed the deep CNN is very effective for the object classification problem. In addition to high-level vision problems, CNN is also found effective in many low-level image processing problems, including deblurring [28], [29], denoising [30], [31], super resolution [21], [22], [32], [33], colorization [34], photo adjustment [35] and compression artifacts reduction [36]. Inspired by the successful CNN-based super-resolution methos [21], [22], this paper attempts to address both the demosaicing problem and the CFA design problem using end-to-end CNN models. There were few attemps on applying CNN models to solving the demosaicing problem [1], [37], [38]. In SIGGRAPH Asia 2016, Gharbi et al. [37] proposed a CNN model for joint demosaicing and denoising. It downsamples the mosaic image into a lower-resolution feature map and uses a series of convoultions for computing the residual at the lower resolution. The input mosaic image is then concatenated with the upsampled residual. The final output is constructed by a last group of convolutions at the full resolution and then a linear combination of resultant feature maps. In ICME 2017, Tan et al. [38] proposed a CNN model for Bayer demosaicing. The model first uses bilinear interpolation for generating the initial image and then throws away the input mosaic image. Given the initial image as the input, the model has two stages for demosaicing. The first stage estimates G and R/B channels separately while the second stage estimates three channels jointly. Both papers only tackled the Bayer demosaicing problem. On the other hand, this paper addresses a wider set of demosaicing problems, including demosaicing in the linear space, demosaicing with non-Bayer patterns, CNNbased pattern design and demosaicing with a SVEC pattern. 3 III. D EMOSAICING WITH THE BAYER FILTER The Bayer filter is the most popular CFA. In this section, we will focus on demosaicing with the Bayer filter using the convolutional neural network. First, we will introduce two CNN architectures, DMCNN (Section III-A) and DMCNNVD (Section III-B), respectively inspired by recent successful CNN models for image super-resolution, SRCNN [21] and VDSR [22]. A. Demosaicing convolutional neural network (DMCNN) The architecture of the demosaicing convolutional neural network (DMCNN) is inspired by Dong et al.’s SRCNN [21] for super-resolution. Fig. 1 gives the architecture of DMCNN. Since relevant information for demosaicing is often only present locally, patches are densely extracted and presented as the inputs to the network. We used 33 × 33 patches for DMCNN. Each pixel of the patch consists of three color channels by leaving the two missing channels blank. Thus, the input size is 33 × 33 × 3. Another option would be to have 33 × 33 × 1 patches by using the mosaiced image patch directly. It however could be difficult for the network to figure out which color channel each pixel represents. Four separate networks could be necessary for the four different locations in the Bayer pattern. We found that it is more effective to simply leave missing channel as blank and learn a unified network for different locations of the CFA tile. This way, the designed network is also more flexible for different CFA patterns as we will explore in Section IV. Similar to SRCNN, DMCNN consists of three layers, each for a specific task: 1) Feature extraction layer. The first layer is responsible for extracting useful local features. We use 128 9 × 9 filters which are initialized as Gaussian kernels. The output of this layer can be regarded as a low-resolution map of 128-d feature vectors. 2) Non-linear mapping layer. The function of the second layer is to map the extracted high-dimension feature vectors to lower-dimension ones. We use 64 1 × 1 kernels. This way, the non-linear mapping is performed on the pixel itself, without considering the relationships among neighbors. 3) Reconstruction layer. The final layer is designed for reconstructing a colorful patch from a given set of features. The kernels are 5×5 and initialized as Gaussian kernels, exploiting the local information to reconstruct the final colors. ReLU (Rectified Linear Units, max(0, x)) [39] is used as the activation function as it can often avoid the gradient vanishing/exploding problem. Mathematically, the network can be formulated as : F1 (Y) = max(0, W1 ∗ Y + B1 ), (1) F2 (Y) = max(0, W2 ∗ F1 (Y) + B2 ), (2) F (Y) = W3 ∗ F2 (Y) + B3 , (3) where Y is the input patch; Fi is the output feature map of the ith layer; Wi and Bi respectively represent the filters and the bias vector of the ith layer; and ∗ is the convolution operator. data size 33×33×3 data size 25×25×128 kernel size 9×9×3 data size 25×25×64 kernel size 1×1×128 data size 21×21×3 kernel size 5×5×64 Fig. 1: The architecture of DMCNN. The input 33 × 33 mosaiced image patch sampled with the Bayer CFA is first extended to 33 × 33 × 3 by adding zeros for missing channels. It then goes through three stages, feature extraction, non-linear mapping and reconstruction. Finally, the network outputs a reconstructed patch with three color channels. (a) learned kernels (b) feature maps Fig. 2: Visualization of learned kernels and feature maps for an example. (a) 36 of 128 kernels in the first convolution layer. (b) Corresponding feature maps. Let Θ = {W1 , W2 , W3 , B1 , B2 , B3 } denote parameters of the DMCNN network. The L2 norm is used as the loss function. n L(Θ) = 1X 2 kF (Yi ; Θ) − Xi k , n i=1 (4) where Yi is the ith mosaiced patch and Xi is its corresponding colorful patch (ground truth); and n is the number of training samples. The stochastic gradient descent is used for finding the optimal parameters Θ. The learning rate is 1 for the first two layers while a smaller learning rate (0.1) is used for the last layer. The DMCNN network is an end-to-end learning model with two advantages compared to previous demosaicing algorithms. First, the features are explored automatically and optimized in a data-driven manner rather than handcrafted. Second, the reconstruction could exploit more complicated spatial and spectral relationships. Fig. 2 visualizes some learned kernels and corresponding feature maps in the first convolutional layer for an image. It can be observed that some automatically 4 BN mosaic conv. SELU Reference architecture ConvLayers Activation function Kernel size Feature map channel Padding zero (pixel) Gradient Updating Residual Learning Initialization + Bilinear Interpolation Fig. 3: The architecture of DMCNN-VD. It consists of 20 layers with the residual learning strategy. Each layer is composed of a convolution layer, a batch normalization layer and a SELU activation layer. learned features explore directional information, which is often considered useful for demosaicing. For example, the 7th, 10th and 17th features outlined with red in Fig. 2(b) are gradientlike features with different orientations. It can also be found that some features are for chromatic interpolation, such as the 18th and the 20th features outlined with blue in Fig. 2(b). Such features could be difficult to design manually, but can be automatically constructed using CNN. B. Very Deep DMCNN (DMCNN-VD) Although DMCNN exploits the possibility of learning an end-to-end CNN model for demosaicing, it does not fully explore the potential of CNN models as the model is considerably shallow. It has been shown in many applications that, given the same number of neurons, a deeper neural network is often more powerful than a shallow one. Recently, residual learning has been shown effective on training deep networks with fast convergence [40]. Residual learning converges faster by learning the residual information and constructing the final solution by adding the learned residual information to the input. Kim et al. adopted the residual learning approach and proposed a much deeper end-to-end CNN architecture for super-resolution, VDSR [22]. Inspired by their model, we propose a design of a deep CNN model for demosaicing, very deep DMCNN (DMCNN-VD). Fig. 3 illustrates the architecture of DMCNN-VD. It consists of N layers (N = 20 in our current setting). Each layer is composed of a convolution layer, a batch normalization layer [41] and a SELU activation layer [42]. Mathematically, the DMCNN-VD network is formulated as : Fn (Y) = selu(Wn ∗ Y + Bn ), n = 1 . . . N −1 F (Y) = WN ∗ FN −1 (Y) + BN , (5) (6) where selu(x) = λx if x > 0 and λα(ex − 1) otherwise. λ and α are constants defined in the SELU paper [42]. The loss function is also evaluated using the L2 -loss form but with some differences from Equation (4): n L(Θ) = 1X (F (Yi ; Θ) + Ỹi ) − Xi n i=1 2 . (7) DMCNN SRCNN [21] 3 ReLU 9-1-5 128-64-3 0 Clipping No Gaussian DMCNN-VD VDSR [22] 20 SELU 3 64-64-...-3 1 Adam [43] Yes MSRA [40] TABLE I: Details for the two proposed CNN architectures for demosaicing, DMCNN and DMCNN-VD. The output of DMCNN-VD, F (Yi ; Θ), refers to the residual between the ground truth patch Xi and Ỹi , the bilinear interpolation of the input patch Yi . This way, the DMCNNVD model only focuses on learning the differences between the ground truth and the baseline, often corresponding to the more difficult parts to handle. Thus, its learning can be more effective and efficient. In principle, any demosaicing method could be used to generate the input patch. Although bilinear interpolation could suffer from severe zipper and false color artifacts, it performs as well as the state-of-the-art methods on smooth areas which often represent a large portion of an image. In addition, as the method is simple, the artifacts tend to be more coherent and the residual information is easier to learn by CNN. Advanced method could produce sophisticated artifacts that are more difficult to learn. We found the results of bilinear interpolation are sufficient for residual learning. It also has the advantage of being more efficient than other alternatives. Unless otherwise specified, we used 3×3 kernels and 1-pixel padding for all the intermediate layers. The MSRA initialization policy [40] was used for initialization. We used 0.001 as the factor of standard deviation. Adam [43] was adopted for gradient updating and we set the learning rate to 1e−5. TABLE I gives details for the two proposed demosaicing architectures, DMCNN and DMCNN-VD. C. Experiments with Bayer demosaicing Benchmarks. The most popular benchmarks for demosaicing are the Kodak dataset and the McMaster dataset. All images in the Kodak dataset were captured by film cameras, scanned and then stored digitally. The dataset contains several challenging cases with high-frequency patterns that are difficult to be recovered from the samples of regular CFA patterns, such as the Bayer pattern. Zhang et al. [49] and Buades et al. [14] noticed that the images in the Kodak dataset tend to have strong spectral correlations, lower saturation, and smaller chromatic gradients than normal natural images. Thus, Zhang et al. introduced the McMaster benchmark (McM for short) which contains images with statistics closer to natural images [50]. Since both datasets present their own challenges, demosaicing algorithms are often evaluated on both of them. We follow the convention used in most of previous studies by using 12 Kodak images and 18 McM images as the evaluation benchmark. Training set. The training data plays an important role in machine learning. However, we found the training data used 5 Algorithm SA [44] SSD [14] NLS [16] CS [45] ECC [46] RI [8] MLRI [9] ARI [10] PAMD [47] AICC [48] DMCNN DMCNN-VD R 39.8 38.83 42.34 41.01 39.87 39.64 40.53 40.75 41.88 42.04 39.86 43.28 Kodak (12 photos) PSNR CPSNR G B 43.31 39.5 40.54 40.51 39.08 39.4 45.68 41.57 42.85 44.17 40.12 41.43 42.17 39 40.14 42.17 38.87 39.99 42.91 39.82 40.88 43.59 40.16 41.25 45.21 41.23 42.44 44.51 40.57 42.07 42.97 39.18 40.37 46.10 41.99 43.45 R 32.73 35.02 36.02 35.56 36.67 36.07 36.32 37.39 34.12 35.66 36.50 39.69 McM (18 photos) PSNR G B 34.73 32.1 38.27 33.8 38.81 34.71 38.84 34.58 39.99 35.31 39.99 35.35 39.87 35.35 40.68 36.03 36.88 33.31 39.21 34.34 39.34 35.21 42.53 37.76 CPSNR 32.98 35.23 36.15 35.92 36.78 36.48 36.60 37.49 34.48 35.86 36.62 39.45 Kodak+McM (30 photos) PSNR CPSNR R G B 35.56 38.16 35.06 36.01 36.54 39.16 35.91 36.9 38.55 41.56 37.46 38.83 37.74 40.97 36.8 38.12 37.95 40.86 36.79 38.12 37.5 40.86 36.76 37.88 38.00 41.08 37.13 38.32 38.73 41.84 37.68 39.00 37.22 40.21 36.48 37.66 38.21 41.33 36.83 38.34 37.85 40.79 36.79 38.12 41.13 43.96 39.45 41.05 TABLE II: Quantitative evaluation. We compared our CNN-based methods (DMCNN and DMCNN-VD) with SA [44], SSD [14], NLS [16], CS [45], ECC [46], RI [8], MLRI [9], ARI [10], PAMD [47], AICC [48]. The best method is highlighted in red and the second best is highlighted in green in each category (column). in previous demosaicing methods could be problematic. For example, the PASCAL VOC’07 dataset was adopted in previous work [16] and it has the following problems: (1) the images are of low quality which makes some demosaicing artifacts unavoidable, not to mention the compression artifacts in them; (2) the dataset was collected for object classification and the limited categories of image contents put restrictions, such as the one on the color distribution of images. For the purpose of training image demosaicing methods, we collected 500 images from Flickr with following criteria: (1) the images are colorful enough to explore the color distributions in real world as much as possible; (2) there are high-frequency patterns in the images so that CNN learns to extract useful features for challenging cases; and (3) they are of high quality so that the artifacts due to noise and compression can be avoided as much as possible. The collected images were resized to roughly 640×480 to have more highfrequency patterns and at the same time, more likely to be mosaic-free. We call the dataset Flickr500. The images were rotated by 90◦ , 180◦ , 270◦ and flipped in each of directions for data augmentation. We extracted roughly 3.5 million patches from these images and used them for training the CNN models unless specified otherwise. The Flickr500 dataset and source codes will be released so that others can reproduce our work1 . Quantitative comparison. We quantitatively compare the two proposed CNN models with ten existing algorithms, including SA [44], SSD [14], CS [45], ECC [46], AICC [48], three residual-interpolation-based methods (RI [8], MLRI [9] and ARI [10]) and two sparse-coding-based methods (NLS [16] and PAMD [47]). Following the convention, we use the PSNR (Peak signal-to-noise ratio) value as the metric. TABLE II summarizes the results of the quantitative comparison on the Kodak dataset, the McM dataset and their combination. Note that all numbers in TABLE II are directly adopted from previous work [8], [10] except DMCNN and DMCNN-VD. Thus, we followed the same setting with 12 Kodak images and 18 McM images when obtaining the numbers for DMCNN and DMCNN-VD. In each category (a column in the table), the best result is highlighted in red and the second best one in green. In most cases, we use the CPSNR value on 1 http://www.cmlab.csie.ntu.edu.tw/project/Deep-Demosaic/ the combined dataset (Kodak+McM) as the final metric. The DMCNN model is competitive with the 38.12dB CPSNR value. However, it is outperformed by the best of ten previous methods, ARI [10], by almost 1 dB. The shallower layers without the residual-learning strategy makes it difficult to recover local details. On the other hand, with a deeper structure and the residual-learning model, DMCNN-VD reaches 41.05dB in CPSNR and outperforms all competing algorithms by a margin, 2.05dB better than the closest competitor ARI. One thing to note is that, both NLS and our methods are learning-based. NLS was trained on the PASCAL VOC 2017 dataset while ours were trained on the Flickr500 dataset. To make a fair comparison, we trained DMCNN-VD on the PASCAL VOC 2007 dataset. The CPSNR values are 44.26, 37.35 and 40.11 for Kodak, McM and Kodak+McM respectively while NLS achieves 42.85, 36.15 and 38.83. The DMCNN-VD model still outperforms NLS by a margin. In addition, NLS requires expensive online learning and extra grouping for exploiting sparse coding and self-similarity. Thus, it is less efficient. On a PC with an Intel Core i7-4790 CPU and NVIDIA GTX 970 GPU, for demosaicing a 500 × 500 image, DMCNN took 0.12 second and DMCNN-VD took 0.4 second while NLS took roughly 400 seconds. Note that the CNN models ran with GPUs while NLS only used a CPU. It is not clear how much NLS could be accelerated with parallel computation. Qualitative comparison. Fig. 4 shows visual comparisons on several examples. Some models in Fig. 4 will be discussed in Section IV. Fig. 4(a) gives an example from the McM dataset. Most previous methods and the DMCNN model cannot handle such saturated colors and thus produce extra diagonal stripes in the green star. On the contrary, the DMCNN-VD model performs much better thanks to its deeper architecture through the residual learning scheme. Fig. 4(b) shows another example from the McM dataset. The close-up shows a high-frequency regular pattern, which is difficult to recover for most previous algorithms. For example, ARI [10] generates noisy patterns in this case. The DMCNN-VD model gives a much better result. Fig. 4(c) gives an example from the Kodak dataset. The close-up shows the blind of the building, containing nearly horizontal stripes. In this case, residual-interpolatedbased methods introduce significant false color artifacts, and 6 Ground Truth SSD [14] CS [45] NLS [16] RI [8] ARI [10] DMCNN DMCNN-VD DS-VD CYGM-VD Hirakawa-VD DMCNN-VD-Pa Images (a) (b) (c) (d) Fig. 4: Visual comparisons for color demosaicing. (a)(b) Examples from the McM dataset. (c)(d) Examples form the Kodak dataset. DS-VD, CYGM-VD and Hirakawa-VD are results of DMCNN-VD with diagonal stripe, CYGM and Hirakawa CFAs respectively. DMCNN-VD-Pa represents the DMCNN-VD model that learns CFA design and demosaicing jointly. 7 models SIGGRAPH Asia [37] ICME [38] DMCNN-VD (3 × 3) DMCNN-VD (5 × 5) DMCNN-VD (7 × 7) DMCNN-VD on WED Kodak24 41.20 42.04 41.85 42.19 42.36 42.47 McM 39.50 38.98 39.45 39.56 39.74 39.54 average 40.47 40.73 40.82 41.06 41.24 41.21 TABLE III: Quantitative comparisons of different deep models on Bayer demosaicing, in terms of the average CPSNR values for the Kodak24 and the McM datasets. Note that, for direct comparison with other CNN models [37], [38], the setting for the Kodak dataset is different from the one used in TABLE II. models ICME [38] DMCNN-VD on Flickr500 DMCNN-VD on WED 100 WED images 39.67 40.94 41.55 all WED images 40.18 - TABLE IV: Quantitative comparisons with the ICME model on the WED dataset. The models were tested on 100 WED images. The DMCNN-VD model trained on the Flickr500 dataset is also tested on all 4, 744 WED images. so do SSD [14] and CS [45]. NLS [16] and the DMCNNVD model have recovered the structure better, showing that such data-driven, automatically learned features can be more effective. In Fig. 4(d), we can observe that the high-frequency structure of the fence is very difficult for all methods to reconstruct perfectly. Artifacts likes horizontal stripes can be found apparently in the results of interpolation-based methods. The only successful one is the NLS method [16] which could benefit from its self-similarity strategy. Comparisons with other deep demosaicing methods. As mentioned in Section II, there were a couple of prvious papers on deep Bayer demosaicing, one published in SIGGRAPH Asia 2016 [37] and the other in ICME 2017 [38]. It is difficult to compare with these methods fairly since the training sets are different and the source codes are not always available. The SIGGRAPH Asia 2016 model was trained on 2,590,186 128×128 difficult patches. The ICME 2017 model was trained with 384,000 50 × 50 patches extracted from 4,644 images from the Waterloo Exploration Dataset (WED) [51]. The first two rows of TABLE III shows the performance of previous work on the Kodak24 and the McM testing datasets, adopted directly from their papers. We tested the DMCNN-VD model with the same testing setting as theirs. The third row of TABLE III reports our results. With the default kernel size (3 × 3), the DMCNN-VD model has a slight advantage on the average CPSNR value. The kernel size has impacts on the performance of the model. We experimented with different kernel sizes, 3 × 3, 5×5 and 7×7, for the DMCNN-VD model. TABLE III reports the results. It is clear that the performance improves with the kernel size. With the 7×7 kernel, the proposed model achieves the best performance at 42.36dB and 39.74dB for Kodak24 and McM respectively. However, a larger kernel size will also incur more computation cost on both training and testing. In the paper, without otherwise specified, we report the results with the 3 × 3 kernel. Algorithms ARI [10] RTF [52] DMCNN-VD Linear 39.94 39.39 41.35 sRGB 33.26 32.63 34.78 TABLE V: Quantitative evaluation on the clean data of MDD. We compare our DMCNN-VD model to ARI [10] and RTF [52] by reporting CPSNR values. To verify the proposed model with larger datasets, we applied the DMCNN-VD model trained on the Flickr500 dataset to the WED dataset. The WED dataset contains 4,744 images. The DMCNN-VD model achieves 40.18dB in terms of CPSNR. It shows the DMCNN-VD model can generalize very well. In addition, we have trained the DMCNN-VD model using the WED dataset. We used the same setting as the ICME paper in which 4,644 images were used for training and the rest 100 images for testing. The last row of TABLE III reports the results. When trained on the same dataset, the DMCNN-VD model achieves 42.27dB and 39.54dB for Kodak24 and McM respectively, outperforming the ICME model's 42.04dB and 38.98dB. When testing on 100 WED images, the DMCNN-VD (WED) model obtains 41.55dB while the ICME 2017 paper reports 39.67dB. D. Experiments with the linear space and noise Like most previous demosaicing papers, the previous section evaluates methods in the sRGB space. However, in real camera processing pipeline, the demosaicing process is often performed in the linear space of radiance rather than the sRGB space used in most demosaicing researches. This issue was recently addressed by Khashabi et al. [52]. They collected a new dataset called MDD (Microsoft Demosaicing Dataset). In this dataset, all images were captured by Canon 650D and Panasonic Lumix DMC-LX3. To simulate mosaic-free images, they proposed a novel down-sampling technique and converted data into the linear space. In addition, they also pointed out the input mosaiced images are usually noisy in reality. As the result, the dataset also provides noisy mosaiced images by adding noise extracted from the original raw images. In addition, they proposed a method for joint demosaicing and denoising by learning a nonparametric regression tree field (RTF) [52]. In the following experiments, we will first apply the pre-trained DMCNN-VD model directly to the MDD dataset and then improve its performance by transfer learning. Clean data. The MDD dataset provides both clean and noisy mosaiced images. We first experiment with the clean versions for demosaicing. TABLE V reports the CPSNR values for three methods, ARI [10], RTF [52] and DMCNN-VD, in both the linear space and the sRGB space. Since RTF is trained with noisy inputs, it is not surprising that its performance on clean data is not as good as the state-of-the-art algorithm designed for clean inputs, ARI [10]. The proposed DMCNN-VD model performs very well with at least 1dB better than ARI in both spaces. Note that DMCNN-VD is trained in the sRGB space, but it still manages to perform well in the linear space. Noisy data. The noise in the inputs could significantly hurt the performances of demosaicing methods, especially those 8 Algorithms ARI [10] RTF [52] DMCNN-VD DMCNN-VD-Tr Panasonic (200) Linear sRGB CPSNR SSIM CPSNR SSIM 37.29 0.956 30.59 0.871 37.78 0.966 31.48 0.906 38.33 0.968 32.00 0.920 40.07 0.981 34.08 0.957 Canon Linear CPSNR SSIM 40.06 0.97 40.35 0.977 40.99 0.978 42.52 0.987 (57) sRGB CPSNR SSIM 31.82 0.886 32.87 0.920 32.89 0.927 35.13 0.959 TABLE VI: Quantitative evaluation on the noisy data of MDD. We compare our DMCNN-VD and DMCNN-VD-Tr models to ARI [10] and RTF [52] by reporting both CPSNR and SSIM. CNN to demosaicing with three other CFAs (Section IV-A). Next, we present a data-driven approach for joint optimization of the CFA design and the demosaicing method (Section IV-B). Finally, we apply the CNN model to a more challenging demosaicing problem with spatially varying exposure and color (Section IV-C). A. Demosaicing with non-Bayer CFAs Ground truth ARI [10] RTF [52] DMCNN-VD DMCNN-VD-Tr Fig. 5: Visual comparisons on MDD examples captured by Panasonic Lumix DMC-LX3 and Canon 650D. deriving rules from clean inputs without taking noise into account. TABLE VI reports CPSNR and SSIM values in both the linear and sRGB spaces. Note that we report the results of Panasonic Lumix DMC-LX3 and Canon 650D separately in TABLE VI because they have difference noise characteristics. It confirms that the algorithm designed for clean data (ARI) could perform less well on noisy inputs. Although training on clean data, the proposed DMCNN-VD model performs surprisingly as well as the RTF method. Since noisy training data are available in MDD, we could leverage them for fine tuning the DMCNN-VD model trained on Flickr500 to improve its performance. This can be regarded as a transfer learning strategy [36]. In our case, the model transfers from the clean sRGB space to the noisy linear space. We denote the transferred model as DMCNN-VD-Tr. The CPSNR/SSIM values reported in TABLE VI show significant improvement by the fine-tuned DMCNN-VD-Tr model. Fig. 5 gives a couple of examples for visual comparisons. The top row shows an example with the Panasonic camera. Due to the noise presented in the input, the results of most algorithms are visually problematic, even the result of RTF shows perceivable color tinting. Such artifacts are hardly observable in the result of the fine-tuned DMCNN-VD-Tr model. The bottom row of Fig. 5 gives an example of the Canon camera. Again, the DMCNN-VD-Tr model recovers both color and structure information more faithfully than other methods. Fig. 6 shows visual comparisons of more examples on demosaicing in the noisy linear space. It is clear that the DMCNN-VD-Tr model performs joint demosaicing and denoising well, giving much better results than all other methods. IV. D EMOSAICING WITH OTHER CFA S In this section, we explore CNN models for demosaicing images with CFAs other than the Bayer one. We first apply Although the Bayer pattern is the most popular CFA, there are many other CFA designs. Fig. 7 shows three examples, diagonal stripe [53], CYGM and Hirakawa [18] CFAs. The diagonal stripe CFA (Fig. 7(a)) has a 3×3 unit pattern with the three primary colors uniformly distributed. The CYGM CFA (Fig. 7(b)) is proposed as it receives wider range of spectrum than the Bayer pattern. Its unit pattern is 2 × 2 with secondary colors and the green color. Several cameras have been built with this CFA. Finally, the Hirakawa CFA (Fig. 7(c)) was obtained by optimization through frequency analysis and has a 4 × 2 unit pattern. Most demosaicing methods are bound up with specific CFAs. They would fail dramatically for other CFAs and often require complete redesigns to work with other CFAs. At the same time, most CFAs would require demosaicing methods specifically tailored for them for fully exploring their capability. One main strength of the demosaicing CNN model is its flexibility. The same CNN model can be used for different CFAs as long as it is re-trained with data encoded with the target CFAs. For a given CFA, the DMCNN-VD model is used while the input layer has to be adjusted with the CFA. As mentioned in Section III, the input layer consists of n color planes where n is the number of colors used in the CFA. For the Bayer CFA, three color planes are used because it consists of three primary colors. Taking the Hirakawa CFA as an example, its 4 × 2 tile consists of four colors, deep pink, spring green, slate blue and chartreuse. Thus, four color planes are used. For a pixel sampled with the deep pink channel, the sampled value is filled at the corresponding location of the deep pink color plane while the other three color planes are filled with zeros at the location. Three color planes are used for the diagonal stripe CFA and four for CYGM respectively. TABLE VII reports performances of different combinations of CFAs and demosaicing algorithms. The first two rows show the performances of two state-of-the-art methods with the Bayer CFA, NLS and ARI, as the reference. The next four rows show the performances of the DMCNN-VD model with the Bayer CFA and the three CFAs in Fig. 7(a)-(c). For each CFA, the DMCNN-VD model is re-trained using the mosaic images sampled with the CFA. It is worth noting that, with the learned DMCNN-VD models, the Hirakawa CFA performs the best with 41.12dB, slightly better than the Bayer pattern with DMCNN-VD. It shows that a better pattern can improve demosaicing performance and the Hirakawa pattern could be the best CFA among the four CFAs experimented. However, although the Hirakawa pattern seems a better design, it is not easy to release its potential. For example, as shown in the second row from the bottom in TABLE VII, the Hirakawa CFA can only reach a mediocre performance at 37.23dB when 9 Ground truth ARI [10] RTF [52] DMCNN-VD DMCNN-VD-Tr Fig. 6: Visual comparisons of demosaicing with noisy mosaiced images in the linear space. Both ARI and DMCNN-VD cannot handle noise well since they are trained on clear data. RTF performs better by taking advantages of noisy training data. By transfer learning, the DMCNN-VD-Tr model can perform joint denoising and demosaicing very well. It generates less noisy outputs with much less demosaicing artifacts. 10 Algorithm Pattern NLS [16] ARI [10] DMCNN-VD DMCNN-VD DMCNN-VD DMCNN-VD Condat [23] DMCNN-VD-Pa Bayer Bayer Bayer Diagonal stripe CYGM Hirakawa Hirakawa Fig. 7(d) R 42.34 40.75 43.28 43.16 40.78 43.00 41.99 43.42 Kodak (12 photos) PSNR CPSNR G B 45.68 41.57 42.85 43.59 40.16 41.25 46.10 41.99 43.45 43.69 42.48 43.06 45.83 42.40 42.50 44.64 42.43 43.25 43.18 41.53 42.16 43.80 42.59 43.23 R 36.02 37.39 39.69 40.53 39.16 40.04 33.93 40.96 McM (18 photos) PSNR G B 38.81 34.71 40.68 36.03 42.53 37.76 40.25 38.70 42.33 38.70 40.76 38.70 34.83 33.44 40.44 39.02 CPSNR 36.15 37.49 39.45 39.61 39.73 39.69 33.94 39.98 Kodak+McM (30 photos) PSNR CPSNR R G B 38.55 41.56 37.46 38.83 38.73 41.84 37.68 39.00 41.13 43.96 39.45 41.05 41.58 41.63 40.21 40.99 39.81 43.73 40.18 40.84 41.23 42.31 40.19 41.12 37.15 38.17 36.68 37.23 41.95 41.79 40.45 41.28 TABLE VII: Quantitative comparisons of demosaicing with different CFAs including Bayer CFA, diagonal stripe [53], CYGM, Hirakawa [18], and the proposed data-driven CFA. 1 × 1 × 3 kernel 1 × 1 × 3 kernel (a) (b) (c) 1 × 1 × 3 kernel (d) 3×3×3 ⋯ image block ⋯ Fig. 7: Examples of different CFA designs: (a) Diagonal stripe [53], (b) CYGM and (c) Hirakawa [18] and (d) our CFA design found by the DMCNN-VD-Pa model. 1 × 1 × 3 kernel mosaiced block 3×3×9 color planes demosaicing with a previous method, Condat’s algorithm [23]. It reveals that a good CFA design requires a good dedicated demosaicing method to work well. Since fewer methods were devised for CFAs other than the Bayer CFA, their potentials were not fully explored. The experiment shows how effective and flexible the CNN model is for demosaicing with different CFA designs. Fig. 4 shows visual comparisons on several examples. DS-VD, CYGM-VD and Hirakawa-VD are results of DMCNN-VD with diagonal stripe, CYGM and Hirakawa CFAs respectively. B. Data-driven CFA design From the previous section, we learn that the CFA design and the demosaicing algorithm have strong relationship and influence with each other. However, to the best of our knowledge, most demosaicing researches focus on either designing mosaic CFAs or devising demosaicing methods and there is no previous work that optimizes both jointly and simultaneously. Since the CNN model is effective and flexible on learning demosaicing algorithms for various CFAs, it is possible to embed the pattern design into the CNN model to simultaneously learn the CFA design and its demosaicing algorithm by joint optimization. The architecture is similar to an autoencoder which finds an effective and compact representation (encoding) for reconstructing the original image faithfully. In our case, the representation is formed by spatial color sampling/blending. The pattern layer. We first introduce the pattern layer for forming a mosaic pattern. It is different from the popular CNN layers, such as convolution and pooling, available in deep learning frameworks. It cannot be composed using existing layers either. Thus, it has to be implemented as a new layer. Assume that the unit pattern is m × n. That is, the unit pattern has m × n cells and each cell contains a color filter to convert Fig. 8: The pattern layer. Assuming a 3 × 3 unit tile, we need nine color planes, each for a specific location. The layer converts an input 3 × 3 × 3 patch into a 3 × 3 × 9 patch which will be used as the input to the following DMCNN-VD model. an RGB color into a value of some color channel. We can take the color filter as a 1 × 1 × 3 filter kernel in the CNN model. Thus, we have to learn mn 1×1×3 kernels for a CFA design. Taking the Bayer CFA as an example, its unit pattern is 2 × 2 with four kernels (1, 0, 0), (0, 1, 0), (0, 0, 1), (0, 1, 0) for R, G1 , B, G2 . Fig. 8 shows an example of the pattern layer with a 3 × 3 unit pattern in the forward propagation pass. The input is a 3×3×3 patch. For each cell, we have have 1×3 filter to convert its RGB color into a value and put it on the corresponding cell. Since we have nine filters, the output consists nine color planes, each corresponding to a specific filter. Thus, the output of the pattern layer is 3 × 3 × 9. Similar to the input structure used in DMCNN and DMCNN-VD models, each output pixel has nine channels. Among them, one is sampled and the other eight are left blank. The DMCNN-VD-Pa model. We denote the CNN model with joint optimization of the mosaic pattern and the demosaicing algorithm by DMCNN-VD-Pa. Fig. 9 illustrates the DMCNNVD-Pa model consisting of two major components. 1) Pattern learning. A pattern layer is responsible for learning color filters in CFA. In the forward pass, the pattern layer sub-sampled the full-color patch (ground truth) using its current filter kernels and outputs a multichannel mosaiced patch. In the backward pass, gradients of the kernels are computed as normal convolution layers. 11 Pattern Layer Demosaicing (Residual Learning) + Bilinear Interpolation & Color Space Transformation(If Needed) Fig. 9: The architecture of the DMCNN-VD-Pa model consisting of two stages: the pattern layer and the DMCNN-VD model. The baseline for residual learning is formed by bilinear interpolation and color transformation. 2) Demosaicing. The output of the pattern layer, nine color planes for a image patch with 8/9 of information missing, is used as the input to the demosaicing network. The DMCNN-VD model is used here for demosaicing. Note that, since the demosaicing network predicts missing information in all color planes, the output consists nine color planes with full information. Assume that the nine kernels of the 3 × 3 unit tile are C1 , C2 , · · · C9 , each representing a RGB color. For residual learning, we first use bilinear interpolation to fill up each color plane. Thus, each pixel now has nine coefficients α1 , · · · , α9 , each for a color plane. We then transform the nine coefficients to a RGB color c by solving a linear system Ac = b where A is a 9 × 3 matrix formed by stacking Ci row by row and b is the column vector (α1 , · · · , α9 )T . The resultant RGB image is then used as the baseline for residual learning. For training the above autoencoder-like CNN model, a set of images are taken as both inputs and labels. One thing to note is that the optimized pattern could include negative weights in the convolution kernels. Although optimal mathematically, kernels with negative weights are less practical for manufacturing. In addition, we would also like to limit the weights so that they are less than 1. Unfortunately, constrained optimization for CNN models is difficult. Similar to Chorowski and Zurada [54], we adopt the projected gradient descent algorithm [55] which projects gradients onto the feasible space for each update. In our case, for an optimal weight w̃i found by regular gradient decent, we update the weights wi of the CNN model as   0 if w̃i < 0 wi = 1 if w̃i > 1 (8)  w̃i otherwise. The weights are initialized with random numbers within [0, 1] so that they start with a feasible solution. Fig. 7(d) shows the learned 3 × 3 pattern with a couple of interesting properties: (1) the pattern contains primary-color-like lights and (2) the arrangement of cells is regular and similar to the diagonal stripe pattern. It is worth noting that these properties are related to the chosen size of the unit pattern, 3 × 3 . For different sizes of unit patterns, the best pattern could have different characteristics. Exploration with different pattern sizes is left as the future work. Quantitative comparison. The last row of TABLE VII shows the performance of DMCNN-VD-Pa on the demosaicing benchmark. Its CPSNR value is 41.28dB on the combined dataset, more than 2.0dB better than ARI [10] and 0.23dB higher than the DMCNN-VD model with the Bayer CFA. The DMCNN-VD model with the Hirakawa pattern is the runnerup with 41.12dB. Note that the unit pattern of the Hirakawa pattern is 4 × 2 while the DMCNN-VD-Pa’s is of 3 × 3. It is also possible to use the proposed method for finding a good pattern with different tile sizes. Another interesting thing to note is that DMCNN-VD-Pa performs worse than DMCNN-VD on the green channel. It is reasonable since the Bayer CFA has doubled the samples in the green channel. By contrast, DMCNN-VD-Pa tends to sample three channels equally since the L2 loss function simply averages over color channels. Since human is more sensitive to the green channel, to improve the perceptual quality, it is possible to increase the samples of green colors by altering the loss function with more emphasis on the green channel. They are left as future work. Qualitative comparison. Fig. 4 shows the visual results of DMCNN-VD-Pa for several examples. Compared with the results of DMCNN-VD with the Bayer CFA, the new CFA helps correcting quite a few artifacts. For example, in Fig. 4(b), the result of DMCNN-VD-Pa is crisper and sharper than the one of DMCNN-VD. In Fig. 4(d), compared with DMCNNVD, the zipper effect is almost completely removed by the new pattern of DMCNN-VD-Pa. C. Demosaicing with spatially varying exposure and color In addition to color demosaicing, the CNN model can also be applied to more general demosaicing problems. Here, we address the problem of demosaicing with spatially varying exposure and color (SVEC) sampling. More specifically, the CFA takes samples with different combinations of both colors and exposures. Fig. 10(a) gives a CFA design with three color channels, R, G and B, and two exposures, the low exposure e1 and the high exposure e2 (the high exposure is 64 times higher than the low one in our setting). It extends the Bayer CFA with spatially varying exposures. Fig. 10(b) and Fig. 10(c) show the images of the same scene captured with these two exposures. By taking pictures with the SVEC CFA in Fig. 10(a), it is possible to reconstruct a high dynamic range (HDR) image using only a single shot. However, the SVEC demosaicing problem is more challenging than color demosaicing since there is more information loss in SVEC demosaicing (5/6 of information is lost) than color demosaicing (2/3). Thanks to the flexible, end-to-end CNN model, we can address the more challenging SVEC demosaicing problem with the same models and proper training data. In this case, we have six channels in the input and the output is an HDR image with three color channels. Note that, rather than reconstructing six channels corresponding to RGB colors with two exposures, we directly recover real-valued RGB colors as the output. Training data. For the problem setting of SVEC demosaicing, we need HDR images for simulating the captured images with 12 𝐺𝑒2 𝐵𝑒2 𝑅𝑒1 𝐺𝑒2 𝐺𝑒1 𝐵𝑒1 V. C ONCLUSIONS 𝑅𝑒2 𝐺𝑒1 (a) (b) (c) Fig. 10: The SVEC configuration. (a) The SVEC pattern used in the HDR experiment. (b) The image captured with the low exposure. (c) The image captured with the high exposure. Algorithm AP [25] DMCNN DMCNN-VD MSE 54.76 28.23 14.89 CPSNR 42.55 47.25 53.13 TABLE VIII: Quantitative evaluation for SVEC demosaicing, in terms of the average MSE and CPSNR values for 50 testing HDR images. different exposures. Unfortunately, HDR images often have quite different ranges and it could be problematic for training CNN models. To deal with this problem, we normalize the radiance images as rmax − rmin ∗ (Ii − I min ), rmax )c, I˜i = bmin( max I − I min (9) where I˜i is the normalized radiance for the pixel i; rmax and rmin are the maximum and minimum radiance values of the output range (212 and 2−6 respectively in the current setting); I max and I min denote the maximum and minimum values of the original radiance image I; the min and floor function simulates clamping and quantization of the camera pipeline (in our setting, the simulated sensor has 12 bits per pixel). After normalization, the SVEC pattern is applied to simulate the input. We collected 180 HDR images online and divided them into three subsets (100 for training, 30 for validation and 50 for testing) for the following experiments. Quantitative comparison. For SVEC demosaicing, we compare our models to Assorted Pixel (AP) proposed by Nayar and Narasimhan [25] using MSE (mean square error) and CPSNR as metrics. TABLE VIII reports the results. The DMCNN model significantly outperforms AP in both metrics. With its deeper architecture, DMCNN-VD further improves the MSE error and the CPSNR value. It shows that the CNN models are more powerful than the simple regression model used by AP [25]. In addition, AP cannot capture the spatial relationships as well as the CNN models. Qualitative comparison. Fig. 11 shows the SVEC demosaicing results for two testing images. For each example, we show the ground truth radiance maps and the radiance maps recovered by AP, DMCNN and DMCNN-VD, all visualized with the heat map. The difference maps show that the results of the DMCNN model are closer to the ground truth as it has more blue colors in the difference maps. With its deeper structure, DMCNN-VD further reduces the errors. The close-ups shows that the DMCNN model generates less artifacts around edges than AP while DMCNN-VD outperforms DMCNN with even sharper edges. In this paper, we present a thorough study on applying the convolutional neural network to various demosaicing problems. Two CNN models, DMCNN and DMCNN-VD, are presented. Experimental results on popular benchmarks show that the learned CNN model outperforms the state-of-theart demosaicing methods with the Bayer CFA by a margin, in either the sRGB space or the linear space. Experiments also show that the CNN model can perform demosaicing and denoising jointly. We also demonstrate that the CNN model is flexible and can be used for demosaicing with any CFA. For example, the current demosaicing methods with the Hirakawa CFA fall far behind the ones with the Bayer CFA. However, our learned CNN model with the Hirakawa CFA outperforms the-state-of-the-art methods with the Bayer CFA. It shows that the Hirakawa CFA could be a better pattern if a proper demosaicing method is employed. It shows the flexibility and effectiveness of the CNN model. We have also proposed a pattern layer and embedded it into the demosaicing network for joint optimization of the CFA pattern and the demosaicing algorithm. Finally, we have addressed a more general demosaicing problem with spatially varying exposure and color sampling. With the CNN model, it is possible to obtain a high dynamic range image with a single shot. All experiments show that the CNN model is a versatile and effective tool for demosaicing problems. R EFERENCES [1] N.-S. Syu, “Learning a deep convolutional network for demosaicking,” June 2016, Master Thesis, National Taiwan University. [2] B. K. Gunturk, J. Glotzbach, Y. Altunbasak, R. W. Schafer, and R. M. Mersereau, “Demosaicking: color filter array interpolation,” IEEE Signal Processing Magazine, vol. 22, no. 1, pp. 44–54, Jan 2005. [3] X. Li, B. Gunturk, and L. Zhang, “Image demosaicing: a systematic survey,” in Electronic Imaging 2008, vol. 6822, no. 1, Jan 2008. [4] D. Menon and G. Calvagno, “Color image demosaicking: An overview,” Signal Processing: Image Communication, vol. 26, no. 8, pp. 518 – 533, 2011. [5] B. Bayer, “Color imaging array,” 1976, US Patent 3,971,065. [6] D. R. Cok, “Signal processing method and apparatus for producing interpolated chrominance values in a sampled color image signal,” Feb. 10 1987, US Patent 4,642,678. [7] J. E. Adams Jr, “Interactions between color plane interpolation and other image processing functions in electronic photography,” in IS&T/SPIE’s Symposium on Electronic Imaging: Science & Technology. International Society for Optics and Photonics, 1995, pp. 144–151. [8] D. Kiku, Y. Monno, M. Tanaka, and M. Okutomi, “Residual interpolation for color image demosaicking,” in Proceedings of IEEE ICIP 2013, 2013, pp. 2304–2308. [9] ——, “Minimized-laplacian residual interpolation for color image demosaicking,” in IS&T/SPIE Electronic Imaging. International Society for Optics and Photonics, 2014, pp. 90 230L–90 230L. [10] Y. Monno, D. Kiku, M. Tanaka, and M. Okutomi, “Adaptive residual interpolation for color image demosaicking,” in Proceedings of IEEE ICIP 2015, 2015, pp. 3861–3865. [11] C. A. Laroche and M. A. Prescott, “Apparatus and method for adaptively interpolating a full color image utilizing chrominance gradients,” Dec. 13 1994, US Patent 5,373,322. [12] J. E. Adams Jr, “Design of practical color filter array interpolation algorithms for digital cameras,” in Electronic Imaging’97. International Society for Optics and Photonics, 1997, pp. 117–125. [13] R. Kakarala and Z. Baharav, “Adaptive demosaicing with the principal vector method,” IEEE Transactions on Consumer Electronics, vol. 48, no. 4, pp. 932–937, 2002. [14] A. Buades, B. Coll, J.-M. Morel, and C. Sbert, “Self-similarity driven color demosaicking,” IEEE Transactions on Image Processing, vol. 18, no. 6, pp. 1192–1202, 2009. 13 GT tone-mapped diff(AP [25], GT) diff(DMCNN, GT) diff(DMCNN-VD, GT) GT radiance AP [25] radiance DMCNN radiance DMCNN-VD radiance close-up of GT close-up of AP [25] close-up of DMCNN close-up of DMCNN-VD (a) (b) Fig. 11: Visual comparisons on SVEC demosaicing. GT means ground truth. DMCNN-VD and DMCNN have less errors as their difference maps contain more blue colors. In general, both perform better than AP with less artifacts around edges. [15] J. Mairal, M. Elad, and G. Sapiro, “Sparse representation for color image restoration,” IEEE Transactions on Image Processing, vol. 17, no. 1, pp. 53–69, 2008. [16] J. Mairal, F. Bach, J. Ponce, G. Sapiro, and A. Zisserman, “Non-local sparse models for image restoration,” in Proceedings of IEEE ICCV 2009, 2009, pp. 2272–2279. [17] D. Alleysson, S. Süsstrunk, and J. Hérault, “Linear demosaicing inspired by the human visual system,” IEEE Transactions on Image Processing, vol. 14, no. 4, pp. 439–449, 2005. [18] K. Hirakawa and P. J. Wolfe, “Spatio-spectral color filter array design for optimal image recovery,” IEEE Transactions on Image Processing, vol. 17, no. 10, pp. 1876–1890, 2008. [19] P. Hao, Y. Li, Z. Lin, and E. Dubois, “A geometric method for optimal [20] [21] [22] [23] design of color filter arrays,” IEEE Transactions on Image Processing, vol. 20, no. 3, pp. 709–722, 2011. C. Bai, J. Li, Z. Lin, and J. Yu, “Automatic design of color filter arrays in the frequency domain,” IEEE Transactions on Image Processing, vol. 25, no. 4, pp. 1793–1807, 2016. C. Dong, C. C. Loy, K. He, and X. Tang, “Learning a deep convolutional network for image super-resolution,” in Proceedings of ECCV 2014, 2014, pp. 184–199. J. Kim, J. K. Lee, and K. M. Lee, “Accurate image super-resolution using very deep convolutional networks,” in Proceedings of IEEE CVPR 2016, 2016. L. Condat, “A new color filter array with optimal properties for noiseless and noisy color image acquisition,” IEEE Transactions on Image 14 Processing, vol. 20, no. 8, pp. 2200–2210, 2011. [24] Y. Li, P. Hao, and Z. Lin, “The frequency structure matrix: A representation of color filter arrays,” International Journal of Imaging Systems and Technology, vol. 21, no. 1, pp. 101–106, 2011. [25] S. K. Nayar and S. G. Narasimhan, “Assorted pixels: Multi-sampled imaging with structural models,” in Proceedings of ECCV 2002, 2002, pp. 636–652. [26] F. Yasuma, T. Mitsunaga, D. Iso, and S. K. Nayar, “Generalized assorted pixel camera: postcapture control of resolution, dynamic range, and spectrum,” IEEE Transactions on Image Processing, vol. 19, no. 9, pp. 2241–2253, 2010. [27] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” in Advances in neural information processing systems, 2012, pp. 1097–1105. [28] C. J. Schuler, M. Hirsch, S. Harmeling, and B. Schölkopf, “Learning to deblur,” CoRR, vol. abs/1406.7444, 2014. [29] L. Xu, J. S. Ren, C. Liu, and J. Jia, “Deep convolutional neural network for image deconvolution,” in Advances in Neural Information Processing Systems, 2014, pp. 1790–1798. [30] J. Xie, L. Xu, and E. Chen, “Image denoising and inpainting with deep neural networks,” in Advances in Neural Information Processing Systems, 2012, pp. 341–349. [31] X. Zeng, W. Bian, W. Liu, J. Shen, and D. Tao, “Dictionary pair learning on grassmann manifolds for image denoising,” IEEE Transactions on Image Processing, vol. 24, no. 11, pp. 4556–4569, 2015. [32] J. Kim, J. K. Lee, and K. M. Lee, “Deeply-recursive convolutional network for image super-resolution,” in Proceedings of IEEE CVPR 2016, 2016. [33] R. Liao, X. Tao, R. Li, Z. Ma, and J. Jia, “Video super-resolution via deep draft-ensemble learning,” in Proceedings of ICCV 2015, 2015, pp. 531–539. [34] Z. Cheng, Q. Yang, and B. Sheng, “Deep colorization,” in Proceedings of ICCV 2015, 2015, pp. 415–423. [35] Z. Yan, H. Zhang, B. Wang, S. Paris, and Y. Yu, “Automatic photo adjustment using deep neural networks,” ACM Transactions on Graphics, vol. 35, no. 2, 2016. [36] C. Dong, Y. Deng, C. Change Loy, and X. Tang, “Compression artifacts reduction by a deep convolutional network,” in Proceedings of ICCV 2015, 2015, pp. 576–584. [37] M. Gharbi, G. Chaurasia, S. Paris, and F. Durand, “Deep joint demosaicking and denoising,” ACM Trans. Graph., vol. 35, no. 6, pp. 191:1– 191:12, 2016. [38] R. Tan, K. Zhang, W. Zuo, and L. Zhang, “Color image demosaicking via deep residual learning,” in Proceedings of IEEE ICME 2017, 2017. [39] V. Nair and G. E. Hinton, “Rectified linear units improve restricted boltzmann machines,” in Proceedings of ICML 2010, 2010, pp. 807– 814. [40] K. He, X. Zhang, S. Ren, and J. Sun, “Delving deep into rectifiers: Surpassing human-level performance on imagenet classification,” in Proceedings of the IEEE ICCV 2015, 2015, pp. 1026–1034. [41] S. Ioffe and C. Szegedy, “Batch normalization: Accelerating deep network training by reducing internal covariate shift,” in International Conference on Machine Learning (ICML), 2015, pp. 448–456. [42] G. Klambauer, T. Unterthiner, A. Mayr, and S. Hochreiter, “Selfnormalizing neural networks,” in Advances in neural information processing systems (NIPS), 2017. [43] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” arXiv preprint arXiv:1412.6980, 2014. [44] X. Li, “Demosaicing by successive approximation,” IEEE Transactions on Image Processing, vol. 14, no. 3, pp. 370–379, 2005. [45] P. Getreuer, “Image demosaicking with contour stencils,” Image Processing on Line, vol. 2, pp. 22–34, 2012. [46] S. P. Jaiswal, O. C. Au, V. Jakhetiya, Y. Yuan, and H. Yang, “Exploitation of inter-color correlation for color image demosaicking,” in Proceedings of IEEE ICIP 2014, 2014, pp. 1812–1816. [47] M. Zhang and L. Tao, “A patch aware multiple dictionary framework for demosaicing,” in Proceedings of ACCV 2014, 2014, pp. 236–251. [48] J. Duran and A. Buades, “A demosaicking algorithm with adaptive interchannel correlation,” Image Processing On Line, vol. 5, pp. 311–327, 2015. [49] F. Zhang, X. Wu, X. Yang, W. Zhang, and L. Zhang, “Robust color demosaicking with adaptation to varying spectral correlations,” IEEE Transactions on Image Processing, vol. 18, no. 12, pp. 2706–2717, 2009. [50] L. Zhang, X. Wu, A. Buades, and X. Li, “Color demosaicking by local directional interpolation and nonlocal adaptive thresholding,” Journal of Electronic Imaging, vol. 20, no. 2, pp. 023 016–023 016, 2011. [51] K. Ma, Z. Duanmu, Q. Wu, Z. Wang, H. Yong, H. Li, and L. Zhang, “Waterloo exploration database: New challenges for image quality assessment models,” IEEE Transactions on Image Processing, vol. 26, no. 2, pp. 1004–1016, Feb 2017. [52] D. Khashabi, S. Nowozin, J. Jancsary, and A. W. Fitzgibbon, “Joint demosaicing and denoising via learned nonparametric random fields,” IEEE Transactions on Image Processing, vol. 23, no. 12, pp. 4968– 4981, 2014. [53] R. Lukac and K. N. Plataniotis, “Color filter arrays: Design and performance analysis,” IEEE Transactions on Consumer Electronics, vol. 51, no. 4, pp. 1260–1267, 2005. [54] J. Chorowski and J. M. Zurada, “Learning understandable neural networks with nonnegative weight constraints,” IEEE Transactions on Neural Networks and Learning Systems, vol. 26, no. 1, pp. 62–69, 2015. [55] P. H. Calamai and J. J. Moré, “Projected gradient methods for linearly constrained problems,” Mathematical programming, vol. 39, no. 1, pp. 93–116, 1987.
1cs.CV
Fluid Communities: A Competitive, Scalable and Diverse Community Detection Algorithm arXiv:1703.09307v3 [cs.DS] 9 Oct 2017 Ferran Parés∗ , Dario Garcia-Gasulla∗ , Armand Vilalta, Jonatan Moreno, Eduard Ayguadé, Jesús Labarta, Ulises Cortés and Toyotaro Suzumura Abstract We introduce a community detection algorithm (Fluid Communities) based on the idea of fluids interacting in an environment, expanding and contracting as a result of that interaction. Fluid Communities is based on the propagation methodology, which represents the state-of-the-art in terms of computational cost and scalability. While being highly efficient, Fluid Communities is able to find communities in synthetic graphs with an accuracy close to the current best alternatives. Additionally, Fluid Communities is the first propagation-based algorithm capable of identifying a variable number of communities in network. To illustrate the relevance of the algorithm, we evaluate the diversity of the communities found by Fluid Communities, and find them to be significantly different from the ones found by alternative methods. Ferran Parés∗ Barcelona Supercomputing Center (BSC), Barcelona, Spain, e-mail: [email protected] Dario Garcia-Gasulla∗ Barcelona Supercomputing Center (BSC), Barcelona, Spain, e-mail: [email protected] Armand Vilalta Barcelona Supercomputing Center (BSC), Barcelona, Spain Jonatan Moreno Barcelona Supercomputing Center (BSC), Barcelona, Spain Eduard Ayguadé Barcelona Supercomputing Center (BSC) & UPC - BarcelonaTECH, Barcelona, Spain Jesús Labarta Barcelona Supercomputing Center (BSC) & UPC - BarcelonaTECH, Barcelona, Spain Ulises Cortés Barcelona Supercomputing Center (BSC) & UPC - BarcelonaTECH, Barcelona, Spain Toyotaro Suzumura Barcelona Supercomputing Center (BSC) & IBM T.J. Watson, New York, USA ∗ Both authors contributed equally to this work 1 2 Parés F., Garcia-Gasulla D. et al. 1 Introduction Community detection (CD) extracts structural information of a network unsupervisedly. Communities are typically defined by sets of vertices densely interconnected which are sparsely connected with the rest of the vertices from the graph. Finding communities within a graph helps unveil the internal organization of a graph, and can also be used to characterize the entities that compose it (e.g., groups of people with shared interests, products with common properties, etc.). One of the first CD algorithms proposed in the literature is the Label Propagation Algorithm (LPA) [11]. Although other CD algorithms have been shown to outperform it, LPA remains relevant due to its scalability (with linear computational complexity O(E)) and yet competitive results [16]. In this paper we propose a novel CD algorithm: the Fluid Communities (FluidC) algorithm, which also implements the efficient propagation methodology. This algorithm mimics the behaviour of several fluids (i.e., communities) expanding and pushing one another in a shared, closed and non-homogeneous environment (i.e., a graph), until equilibrium is found. By initializing a different number of fluids in the environment, FluidC can find any number of communities in a graph. To the best of our knowledge, FluidC is the first propagation-based algorithm with this property, which allows the algorithm to provide insights into the graph structure at different levels of granularity. 2 Related Work The most recent evaluation and comparison of CD algorithms was made by Yang et al [16], where the following eight algorithms were compared in terms of Normalized Mutual Information (NMI) and computing time: Edge Betweenness [4], Fast greedy [2], Infomap [14, 15], Label Propagation [11], Leading Eigenvector [8], Multilevel (i.e., Louvain) [1], Spinglass [12] and Walktrap [10]. The performance of these eight algorithms was measured on artificially generated graphs provided by the LFR benchmark [6], which defines a more realistic setting than the alternative GN benchmark [9], including scale-free degree and cluster size distributions. One of the main conclusions of this study is that the Multilevel algorithm is the most competitive overall in terms of CD quality. A similar comparison of CD algorithms was previously reported by Lancichinetti and Fortunato [5]. In this work twelve algorithms were considered, some of them also present in the study of [16] (Edge Betweenness, Fastgreedy, Multilevel and Infomap). In this study, the algorithms were compared under the GN benchmark, the LFR benchmark, and on random graphs. In their summary, authors recommend using various algorithms when studying the community structure of a graph for obtaining algorithm-independent information, and suggest Infomap, Multilevel and the Multiresolution algorithm [13] as the best candidates. Results from both [16] and [5] indicate that the fastest CD algorithm is the well-known LPA algorithm, due to the efficiency and scalability of the propagation methodology. Fluid Communities 3 Fig. 1 Workflow of FluidC for k=2 communities (red and green). Each vertex assigned to a community is labeled with the density of that community. The update rule is evaluated on each step for the vertex highlighted in blue. The algorithm converges after one complete superstep. 3 Fluid Communities Algorithm The Fluid Communities (FluidC) algorithm is a CD algorithm based on the idea of introducing a number of fluids (i.e., communities) within a non-homogeneous environment (i.e., a non-complete graph), where fluids will expand and push each other influenced by the topology of the environment until a stable state is reached. Given a graph G = (V, E) composed by a set of vertices V and a set of edges E, FluidC initializes k fluid communities C = {c1 ..ck }, where 0 < k ≤ |V |. Each community c ∈ C is initialized in a different and random vertex v ∈ V . Each initialized community has an associated density d within the range (0, 1]. The density of a community is the inverse of the number of vertices composing said community: d(c) = 1 |v ∈ c| (1) Notice that a fluid community composed by a single vertex (e.g., every community at initialization) has the maximum possible density (d = 1.0). FluidC operates through supersteps. On each superstep, the algorithm iterates over all vertices of V in random order, updating the community each vertex belongs to using an update rule. When the assignment of vertices to communities does not change on two consecutive supersteps, the algorithm has converged and ends. The update rule for a specific vertex v returns the community or communities with maximum aggregated density within the ego network of v. The update rule is formally defined in Equations 2 and 3. 0 Cv = argmaxc∈C ∑ d(c) × δ (c(w), c) (2) w∈{v,Γ (v)}  δ (c(w), c) = 1 , i f c(w) = c 0 , i f c(w) = 6 c (3) 4 Parés F., Garcia-Gasulla D. et al. 0 where v is the vertex being updated, Cv is the set of candidates to be the new community of v, Γ (v) are the neighbours of v, d(c) is the density of community c, c(w) is the community vertex w belongs to and δ (c(w), c) is the Kronecker delta. 0 Notice that Cv could contain several community candidates, each of them having 0 equal maximum sum. If Cv contains the current community of the vertex v, v does 0 not change its community. However, if Cv does not contain the current community 0 of v, the update rule chooses a random community within Cv as the new community of v. This completes the formalization of the update rule:  0 0 0 x ∼ U (Cv ) , i f c(v) ∈ / Cv c (v) = (4) 0 c(v) , i f c(v) ∈ Cv 0 0 where c (v) is the community of vertex v at the next superstep, Cv is the set of 0 candidate communities from equation 2 and x ∼ U (Cv ) is the random sampling 0 from a discrete uniform distribution of the Cv set. Equation 4 guarantees that no community will ever be eliminated from the graph since, when a community c is compressed into a single vertex v, c has the maximum 0 possible density on the update rule of v (i.e., 1.0) guaranteeing c ∈ Cv , and thus 0 c (v) = c. An example of FluidC algorithm behaviour is shown in Figure 1. 3.1 Properties FluidC is asynchronous, where each vertex update is computed using the latest partial state of the graph (some vertices may have updated their label in the current superstep and some may not). A straight-forward synchronous version of FluidC (i.e., one where all vertex update rules are computed using the final state of the previous superstep) would not guarantee that densities are consistent with Equation 1 at all times (e.g., a community may lose a vertex but its density may not be increased immediately in accordance). Consequently, a community could lose all its vertices and be removed from the graph. FluidC allows for the definition of the number of communities to be found, simply by initializing a different number of fluids in the graph. This is a desirable property for data analytics, as it enables the study of the graph and its entities at several levels of granularity. Although a few CD algorithms already had this feature (e.g., Walktrap, Fastgreedy), none of those were based on the efficient propagation method. Another interesting feature of FluidC is that it avoids the creation of monster communities in a non-parametric manner. Due to the spread of density among the vertices that compose a community, a large community (when compared to the rest of communities in the graph) will only be able to keep its size and expand by having a favourable topology (i.e., having lots of intra-community edges which make up for its lower density). Figure 3.1 shows two cases of this behaviour, one where a large community is able to defend against external attack, and one where it is not. Fluid Communities 5 Fig. 2 Two cases of update rule on a vertex (highlighted in blue). Left case shows a densely connected green community which can successfully defend the vertex. In the right case, the green community is sparser and will lose the highlighted vertex (but only this one) to the red community. Numbers correspond to sums from Equation 2. FluidC is designed for connected, undirected, unweighted graphs, and variants of FluidC for directed and/or weighted graphs remain as future work. However, FluidC 0 can be easily applied to a disconnected graph G just by performing an independent 0 execution of FluidC on each connected component of G and appending the results. 4 Evaluation To evaluate performance we use the LFR benchmark [6], measuring NMI obtained on a set of graphs with six different graph sizes (|V | = 233, 482, 1000, 3583, 8916 and 22186) and 25 different mixing parameters (µ from 0.03 to 0.75). The mixing parameter is the average fraction of vertex edges which connect to vertices from other communities [6]. To guarantee consistency, 20 different graphs were generated for each combination of graph size and mixing parameter. This results in a total of 3,000 different graphs (6 graph sizes × 25 mixing parameter values × 20 graphs), and is the same evaluation strategy used in [16]. Besides the graph size and mixing parameter, the LFR benchmark also requires a list of hyperparameters to generate a graph. We use the same ones defined in [16]; maximum degree 0.1 × |V |, maximum community size 0.1 × |V |, average degree 20, degree distribution exponent −2 and community size distribution exponent −1. These experiments were performed on the five most competitive CD algorithms evaluated in [16] (Fastgreedy, Infomap, Label Propagation, Multilevel and Walktrap) and FluidC. We report the results in Figure 3, where each panel contains two plots. The bottom one shows average performance in NMI on the 20 graphs built for the various values of µ (shown on the horizontal axis), while the top one shows the corresponding standard deviation (Std). Each plot line represents the results of an algorithm on a different graph size (see panel legend). Among all normalization variants of the Mutual Information metric we use the geometric normalization, i.e., dividing by square root of both entropies. Before analyzing the results, let us clarify two aspects of the evaluation process. First, the LFR benchmark may generate disjoint graphs. When this is the case, an independent execution of FluidC is computed on each connected subgraph separately, 6 Parés F., Garcia-Gasulla D. et al. (a) Fastgreedy (b) Infomap (c) Multilevel (d) Walktrap (e) Label Propagation (f) Fluid Communities Fig. 3 NMI performance of six CD algorithms. Each Panel is divided in two plots, the bottom one shows the average NMI performance over 20 random graphs generated with the same properties, including size and mixing parameter. The top plot shows the standard deviation. Different plotted lines correspond to different graph sizes. For reference, each panel contains two lines, one vertical to mark the 0.5 mixing parameter (µ) and one dotted horizontal line to mark the perfect NMI score (NMI = 1.0). Walktrap performance reported here differs significantly from Yang et al [16] due to an error in their experiments, acknowledged by the authors. and the communities found on the different subgraphs are appended to measure the overall NMI. And second, FluidC requires to specify the number of communities to be found k, which is an unknown parameter. For comparability reasons, we report the results obtained using the k resulting in highest modularity. This is analogous to what other algorithms which also require k do (e.g., Fastgreedy and Walktrap). In our experiments, Multilevel achieved top NMI results on most generated graphs, while Fastgreedy and LPA were clearly inferior to the rest of algorithms. The remaining three algorithms, Walktrap, Infomap and FluidC, were competitive, and had results close to Multilevel. In the context of Walktrap and Infomap, FluidC has a rather particular behaviour. It is better on large graph sizes than Walktrap; for Fluid Communities 7 the largest graph computed (|V | = 22, 186), FluidC outperforms Walktrap for all µ values in the range [0.33, 0.66]. FluidC is also more resistant to large mixing parameters than Infomap, which is unable to detect relevant communities for µ > 0.55. The performance of FluidC is slightly sub-optimal (NMI between 0.9 and 0.95) on low mixing parameters (µ ≤ 0.4). This is because communities generated in a graph with low mixing parameters are very densely connected, and only have a few edges connecting them with other communities, edges that act as bottlenecks. These bottlenecks can sometimes prevent the proper flow of communities in FluidC, which leads to sub-optimal results. In practice, the sub-optimal performance of FluidC on graphs with very low mixing parameter is a minor inconvenience. Real world graphs are often large and have relatively high mixing parameters, a setting where FluidC is particularly competent. In contrast, the recommended algorithm for processing graphs with low mixing parameters would be LPA, as it finds the optimal result in these cases, and it is faster and scales better than the alternatives. 5 Scalability The main purpose of the FluidC algorithm is to provide high quality communities in a scalable manner, so that good quality communities can also be obtained from large scale graphs. In the previous section we saw how the performance of FluidC in terms of NMI is comparable to the best algorithms in the state-of-the-art (e.g., Multilevel, Walktrap and Infomap). Next we evaluate FluidC scalability, to show its relevance in the context of large networks. To analyze the computational cost of FluidC we first compare the cost of one full superstep (checking and updating the communities of all vertices in the graph) with that of LPA. LPA is the fastest and more scalable algorithm in the state-ofthe-art [16], which is why we use it as baseline for scalability along this section. Figure 4 shows the average time per iteration, using the same type of plots used in the NMI evaluation. Results indicate that the computing time per iteration of FluidC is virtually identical to that of LPA for all graph sizes and mixing parameters. Significantly, both algorithms are almost unaffected by a varying mixing parameter. Beyond the cost of a single superstep, we also explore the total number of supersteps needed for the algorithm to converge. Figure 5 shows that information for both FluidC and LPA. For this experiment we set the FluidC parameter k to the ground truth. This comparison is relevant for mixing parameters up to 0.5. Beyond that value, LPA produces a single monster community after three supersteps (NMI = 0.0, see Figure 3, Panel e). Nevertheless, the number of supersteps needed by FluidC to converge is never above 13. These results indicate that FluidC and LPA are similar both in time per superstep and number of supersteps, which implies that both algorithms are analogous in terms of computational cost (with linear complexity O(E)) and scalability. To provide further evidence in that regard, and to also evaluate the scalability of the most 8 Parés F., Garcia-Gasulla D. et al. Fig. 4 Left: Computing time per iteration for the FluidC and LPA algorithms, when processing graphs of varying size and mixing parameter. Right: Scalability of FluidC, LPA, Multilevel and Walktrap on graphs up to 150,000 vertices. Dashed line shows the average over the various mixing parameters values (from 0.03 to 0.75). Fluid Communities Label Propagation Fig. 5 Number of iterations until convergence for the FluidC and LPA algorithms, when processing graphs of varying size and mixing parameter. relevant alternatives, next we consider the evaluation of larger graphs. We generate graphs with 60,000 and 150,000 vertices following the same methodology described in §4, and measure the computing times of LPA, FluidC, Multilevel and Walktrap (the three fastest algorithms according to [16] plus FluidC). Figure 4 shows the scalability of each algorithm, where the continuous lines in the background correspond to different mixing parameters (from 0.03 to 0.75), and the big dashed line with markers indicates the computed mean over all the 25 mixing parameters. According to the results shown in Figure 4, LPA has the lowest computing time, closely followed by FluidC. However, LPA results are mistakenly optimistic, since the algorithm is particularly fast for large mixing parameters, where it obtains zero NMI after doing only three supersteps (see Panel e of Figure 3, and Figure 5). If this is taken into account, LPA and FluidC have an analogous scalability. Walktrap is considerably slower than the rest, and results for graphs larger than 3,000 vertices are not shown. Multilevel is 5x slower than LPA/FluidC, and its cost grows faster. While the slope of LPA/FluidC computed through a linear regression is roughly 10−6 , the slope of Multilevel is close to 10−5 . Processing a large scale graph like PageGraph [7] (|V | = 3, 500M vertices) would take approximately 9 hours for FluidC while more than two days (approximately 49 hours) for Multilevel. Fluid Communities 9 6 Diversity of Communities Synthetic graphs generated by benchmarks like LFR can be used to evaluate the ability of algorithms at finding the community structures pre-defined by those benchmarks. This kind of results are useful for understanding the strengths and weaknesses of algorithms w.r.t. certain structural properties (e.g., µ and graph size). However, graphs obtained from real world data will rarely contain a single community structure, as complex data can be typically sorted in several coherent but unrelated ways (e.g., group products by sell volume or by sell dates). For this reason it is recommended to use several CD algorithms when analyzing a given graph, to obtain a variety of algorithm independent information [5]. In this context, the relevance of a CD algorithm is also affected by how diverse are the communities it is capable of finding, in comparison with the communities that the rest of the algorithms find. To evaluate the relevance of FluidC in terms of diversity, we execute the six previously evaluated algorithms on a set of graphs with multiple ground truths. If two algorithms consistently find different ground truths from the ones available within multi-ground truth graphs, it can be argued that both may provide different insights into the community structure of a graph. We build a total of 30 multi-ground truth graph, each of them containing two independent ground truths, each ground truth composed by four communities. Our multi-ground truth graphs are obtained by first generating two independent graphs (of size |V | = 22, 186) with four disconnected communities (µ = 0) and then appending the edges of both. The rest of the LFR parameters used are the same ones used for evaluation at §4, except for minimum and maximum community size which are 0.2|V | and 0.3|V | respectively. Given a multi-ground truth graph G with two ground truths T1 , T2 , we categorize a CD algorithm A in one of three values of θ ; the algorithm finds T1 over T2 (θ = 1), the algorithm finds T2 over T1 (θ = −1), the algorithm finds T1 and T2 to the same degree (θ = 0). A finds ground truth Tx over ground truth Ty when NMI(A ,Tx ) NMI(A ,Ty ) > α, where α is a predefined threshold. After one hundred executions, the behaviour of an algorithm w.r.t. a multi-ground truth graph is represented by one hundred θ values. A similarity between the behaviour of two algorithms on the same graph can be computed by applying the Chisquare test on the two corresponding series of θ values, resulting in a probability of both series having the same categorical distribution. Qualitatively, that probability refers to how likely both algorithms are of having the same behaviour. We built 30 similarity matrices, each one corresponding to a multi-ground truth graph. For visualization purposes, we average them in Figure 6. The resultant similarity matrix provides qualitative insight on the diversity of the algorithms under consideration. To validate the consistency of the approach w.r.t. the α threshold, we report the similarity matrix corresponding to setting α = 0.5 and α = 0. Since the NMI score is in the range [0, 1], α = 0.5 implies that an algorithm finds one ground truth over the alternative at least by doubling its NMI score. On the other hand, the more permissive α = 0 considers that an algorithm finds one ground truth over the alternative just by obtaining a larger NMI. In this case, θ = 0 values are rare, as that would require both NMI to be identical. Additional values of 10 Parés F., Garcia-Gasulla D. et al. Fig. 6 Average similarity matrix with α = 0.5 (left) and α = 0 (right) over 30 multi-ground truth graphs. These matrices indicate a qualitative degree of similarity among algorithm behaviour. α within the range [0, 0.5] were analyzed, and the corresponding similarity matrices where found to be consistent with the two reported ones. The similarity matrices of Figure 6 indicate that Multilevel, Walktrap and Fastgreedy have similar behaviours on multi-ground truth graphs, as all three algorithms result in very similar θ values. Significantly, this relation is stronger when α = 0, which indicates that all three algorithms consistently prioritize the same ground truth over the alternative. Notice all three algorithms use hierarchical bottom-up agglomeration, while Fastgreedy and Multilevel are modularity-based methods [3]. The remaining three algorithms, Infomap, LPA and FluidC, show a much more diverse behaviour. The pattern with which each of these algorithms finds one ground truth over the alternative differs significantly from the other five. These results indicate that the proposed FluidC algorithm provides significantly diverse communities when compared to the algorithmic alternatives. In this context, FluidC may contribute to provide algorithm-independent information by being computed alongside Multilevel and Infomap on the same graph, all of which have a competitive performance according to the LFR benchmark as shown in §4. 7 Reproducibility All the experiments presented in this paper have been computed on a computer with OpenSUSE Leap 42.2 OS (64-bits), with an Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz and 16GB of DDR3 SDRAM. An open source implementation of the FluidC algorithm has been made publicly available to the community at Github (github.com/FerranPares/Fluid-Communities). It has been integrated into the networkx (github.com/networkx) and igraph (github.com/igraph) graph libraries. For consistency, all scalability experiments were performed using the igraph graph library. Fluid Communities 11 8 Conclusions In this paper we propose a novel CD algorithm called Fluid Communities (FluidC). Through the well established LFR benchmark we demonstrate that FluidC identifies high quality communities (measured in NMI, see Figure 3), getting close to the current best alternatives in the state-of-the-art (e.g., Multilevel, Walktrap and Infomap). In this context, FluidC is particularly competent on large graphs and on graphs with large mixing parameters. The main limitation of FluidC in terms of NMI performance is that it does not fully recover the ground truth communities on graphs with small mixing parameters due to the effect of bottleneck edges. However, at larger mixing parameters (a more realistic environment) FluidC gets competitive to state-of-the-art algorithms. Although FluidC does not clearly outperform the current state-of-the-art in terms of NMI on the LFR benchmark, the importance of the contribution can be summarized both in terms of scalability and diversity. In terms of scalability, FluidC, together with LPA, represents the state-of-the-art in CD algorithms. Both belong to the fastest and most scalable family of algorithms in the literature with a linear computational complexity of O(E). However, while the performance of LPA rapidly degrades for large mixing parameters, FluidC is able to produce relevant communities at all mixing parameters. The next algorithm in terms of scalability is the Multilevel algorithm, which takes roughly 5x more seconds to compute, and which scales slightly worse (see Figure 4 and the mentioned slopes). Thus, we consider FluidC to be highly recommendable for computing graphs of arbitrary large size. In terms of diversity, FluidC is the first propagation-based algorithm to report competitive results on the LFR benchmark, and also the first propagation-based algorithm which can find a variable number of communities on a given graph. Providing coherent and diverse communities is particularly important for unsupervised learning tasks, such as CD, where typically there is not a single correct answer. To measure the diversity provided by FluidC, we computed its behaviour on multiground truth graphs, and compare it with the alternatives. Results indicate that FluidC uncovers sets of communities which may be consistently different than the ones obtained by the other algorithms. Considering both performance on LFR and diversity, we conclude that a thorough community analysis of a given graph would benefit from the inclusion of Multilevel, Infomap and FluidC. Acknowledgements This work is partially supported by the Joint Study Agreement no. W156463 under the IBM/BSC Deep Learning Center agreement, by the Spanish Government through Programa Severo Ochoa (SEV-2015-0493), by the Spanish Ministry of Science and Technology through TIN2015-65316-P project and by the Generalitat de Catalunya (contracts 2014-SGR-1051), and by the Japan JST-CREST program. 12 Parés F., Garcia-Gasulla D. et al. References [1] Blondel VD, Guillaume JL, Lambiotte R, Lefebvre E (2008) Fast unfolding of communities in large networks. Journal of statistical mechanics: theory and experiment 2008(10):P10,008 [2] Clauset A, Newman ME, Moore C (2004) Finding community structure in very large networks. Physical review E 70(6):066,111 [3] Fortunato S (2010) Community detection in graphs. Physics reports 486(3):75–174 [4] Girvan M, Newman ME (2002) Community structure in social and biological networks. Proceedings of the national academy of sciences 99(12):7821–7826 [5] Lancichinetti A, Fortunato S (2009) Community detection algorithms: a comparative analysis. Physical review E 80(5):056,117 [6] Lancichinetti A, Fortunato S, Radicchi F (2008) Benchmark graphs for testing community detection algorithms. Physical review E 78(4):046,110 [7] Meusel R, Vigna S, Lehmberg O, Bizer C (2014) Graph structure in the web— revisited: a trick of the heavy tail. In: Proceedings of the 23rd international conference on World Wide Web, ACM, pp 427–432 [8] Newman ME (2006) Finding community structure in networks using the eigenvectors of matrices. Physical review E 74(3):036,104 [9] Newman ME, Girvan M (2004) Finding and evaluating community structure in networks. Physical review E 69(2):026,113 [10] Pons P, Latapy M (2005) Computing communities in large networks using random walks. In: International Symposium on Computer and Information Sciences, Springer, pp 284–293 [11] Raghavan UN, Albert R, Kumara S (2007) Near linear time algorithm to detect community structures in large-scale networks. Physical review E 76(3):036,106 [12] Reichardt J, Bornholdt S (2006) Statistical mechanics of community detection. Physical Review E 74(1):016,110 [13] Ronhovde P, Nussinov Z (2009) Multiresolution community detection for megascale networks by information-based replica correlations. Physical Review E 80(1):016,109 [14] Rosvall M, Bergstrom CT (2008) Maps of random walks on complex networks reveal community structure. Proceedings of the National Academy of Sciences 105(4):1118–1123 [15] Rosvall M, Axelsson D, Bergstrom CT (2009) The map equation. The European Physical Journal Special Topics 178(1):13–23 [16] Yang Z, Algesheimer R, Tessone CJ (2016) A comparative analysis of community detection algorithms on artificial networks. Scientific Reports 6
8cs.DS
1 Distributed Hybrid Power State Estimation under PMU Sampling Phase Errors arXiv:1607.02760v1 [cs.SY] 10 Jul 2016 Jian Du, Shaodan Ma, Yik-Chung Wu and H. Vincent Poor Abstract Phasor measurement units (PMUs) have the advantage of providing direct measurements of power states. However, as the number of PMUs in a power system is limited, the traditional supervisory control and data acquisition (SCADA) system cannot be replaced by the PMU-based system overnight. Therefore, hybrid power state estimation taking advantage of both systems is important. As experiments show that sampling phase errors among PMUs are inevitable in practical deployment, this paper proposes a distributed power state estimation algorithm under PMU phase errors. The proposed distributed algorithm only involves local computations and limited information exchange between neighboring areas, thus alleviating the heavy communication burden compared to the centralized approach. Simulation results show that the performance of the proposed algorithm is very close to that of centralized optimal hybrid state estimates without sampling phase error. Index Terms PMU, SCADA, state estimation, phase mismatch. I. I NTRODUCTION Due to the time-varying nature of power generation and consumption, state estimation in the power grid has always been a fundamental function for real-time monitoring of electric power networks [1]. The knowledge of the state vector at each bus, i.e., voltage magnitude and phase angle, enables the energy management system (EMS) to perform various crucial tasks, such as bad data detection, optimizing power flows, maintaining system stability and reliability [2], etc. Furthermore, accurate state estimation is also the foundation for the creation and operation of real-time energy markets [3]. In the past several decades, the supervisory control and data acquisition (SCADA) system, which consists of hardware for signal input/output, communication networks, control equipment, July 12, 2016 DRAFT 2 user interface and software [4], has been universally established in the electric power industry, and installed in virtually all EMSs around the world to manage large and complex power systems. The large number of remote terminal units (RTUs) gather local bus voltage magnitudes, power injection and current flow magnitudes, and send them to the master terminal unit to perform centralized state estimation. As these measurements are nonlinear functions of the power states, the state estimation programs are formulated as iterative reweighted least-squares solution [5], [6]. The invention of phasor measurement units (PMUs) [7], [8] has made it possible to measure power states directly, which is infeasible with SCADA systems. In the ideal case where PMUs are deployed at every bus, the power state can be simply measured, and this is preferable to the traditional SCADA system. However, in practice there are only sporadic PMUs deployed in the power grid due to expensive installation costs. In spite of this, through careful placement of PMUs [9]–[11], it is still possible to make the power state observable. As PMU measurements are linear functions of power states in rectangular coordinates, once the observability requirement has been satisfied, the network state can be obtained by centralized linear least-squares [12]. Despite the advantage of PMUs over SCADA, the traditional SCADA system cannot be replaced by a PMU-based system overnight, as the SCADA system involves long-term significant investment, and is currently working smoothly in existing power systems. Consequently, hybrid state estimation with both SCADA and PMU measurements is appealing. One straightforward methodology is to simultaneously process both SCADA and PMU raw measurements [13]. However, this simultaneous data processing, which leads to a totally different set of estimation equations, requires significant changes to existing EMS/SCADA systems [2], [14], and is not preferable in practice. In fact, incorporating PMU measurements with minimal change to the SCADA system is an important research problem in the power industry [14]. In addition to the challenge of integrating PMU with SCADA data, there are also other practical concerns that need to be considered. Firstly, it is usually assumed that PMUs provide synchronized sampling of voltage and current signals [15] due to the Global Positioning System (GPS) receiver included in the PMU. However, tests [16] provided by a joint effort between the U.S. Department of Energy and the North American Electric Reliability Corporation show that PMUs from multiple vendors can yield up to ±277.8µs sampling phase errors (or ±6◦ phase error in a 60Hz power system) due to different delays in the instrument transformers used by July 12, 2016 DRAFT 3 different vendors. Sampling phase mismatch in PMUs will make the state estimation problem nonlinear, which offsets the original motivation for introducing PMUs. It is important to develop state estimation algorithms that are robust to sampling phase errors. Secondly, with fast sampling rates of PMU devices, a centralized approach, which requires gathering of measurements through propagating a significant computational large amounts of data from peripheral nodes to a central processing unit, imposes heavy communication burden across the whole network and imposes a significant computation burden at the control center. Decentralizing the computations across different control areas and fusing information in a hierarchical structure or aggregation tree has thus been investigated in [17]–[21]. However, these approaches need to meet the requirement of local observability of all the control areas. Consequently, fully distributed state estimation scalable with network size is preferred [13], [22], [23]. In view of above problems, this paper proposes a distributed power state estimation algorithm, which only involves local computations and information exchanges with immediate neighborhoods, and is suitable for implementation in large-scale power grids. In contrast to [13], [22] and [23], the proposed distributed algorithm integrates the data from both the SCADA system and PMUs while keeping the existing SCADA system intact, and the observability problem is bypassed. The challenging problem of sampling phase errors in PMUs is also considered. Simulation results show that after convergence the proposed algorithm performs very close to that of the ideal case which assumes perfect synchronization among PMUs, and centralized information processing. The rest of this paper is organized as follows. The state estimation problem with hybrid SCADA and PMU measurements under sampling errors is presented in Section II. In Section III, a convergence guaranteed distributed state estimation method is derived. Simulation results are presented in Section IV and this work is concluded in Section V. Notation: Boldface uppercase and lowercase letters will be used for matrices and vectors, √ respectively. E{·} denotes the expectation of its argument and  , −1. Superscript T denotes transpose. The symbol IN represents the N ×N identity matrix. The probability density function (pdf) of a random vector x is denoted by p(x), and the conditional pdf of x given v is denoted by p(x|v). N (x|µ, R) stands for the pdf of a Gaussian random vector x with mean µ and covariance matrix R. Bldiag{·} denotes the block diagonal concatenation of input arguments. The symbol ∝ represents a linear scalar relationship between two real-valued functions. The July 12, 2016 DRAFT 4 cardinality of a set V is denoted by |V| and the difference between two sets V and A is denoted by V \ A. II. H YBRID E STIMATION P ROBLEM F ORMULATION The power grid consists of buses and branches, where a bus can represent a generator or a load substation, and a branch can stand for a transmission or distribution line, or even a transformer. The knowledge of the bus state (i.e., voltage magnitude and phase angle) at each bus enable the power management system to perform functions such as contingency analysis, automatic generation control, load forecasting and optimal power flow, etc. Conventionally, the power state is estimated from a set of nonlinear functions with measurements from the SCADA system. More specifically, a group of RTUs are deployed by the power company at selected buses. An RTU at a bus can measure not only injections and voltage magnitudes at the bus but also active and reactive power flows on the branches linked to this bus. These measurements are then transmitted to the SCADA control center for state estimation. However, as injections and power flows are nonlinear functions of power states, an iterative method with high complexity is often needed. The recently invented PMU has the advantage of directly measuring the power states of the bus where it is placed and the current in the branches directly connected to it. Through careful PMU placement [24], it is possible to estimate the power states of the whole network with measurements from a small number of PMUs. With measurements from both SCADA and PMUs, it is natural to contemplate obtaining a better state estimate by combining information from both systems (hybrid estimation). In the following, we consider a power network with the set of buses denoted by B and the subset of buses with PMU measurements denoted by P. A. PMU Measurements with Sampling Errors For a power grid, the continuous voltage on bus i is denoted as Ai cos(2πfc t + φi ), with Ai being the amplitude and φi being the phase angle in radians. Ideally, a PMU provides measurements in rectangular coordinates: Ai cos(φi ) and Ai sin(φi ). However, for reasons of sampling phase error [15], [16] and measurement error, the measured voltage at bus i would be [16] r xri = Ai cos(θi + φi ) + wi,E , July 12, 2016 (1) DRAFT 5  xi = Ai sin(θi + φi ) + wi,E , (2) r where θi is the phase error induced by an unknown and random sampling delay, and wi,E and  wi,E are the Gaussian measurement noises. On the other hand, a PMU also measures the current between neighboring buses. Let the admittance at the branch {i, j} be gij +  · bij , the shunt admittance at bus i be Bi , and the transformer turn ratio from bus i to j be ρij = |ρij | exp{ϕij }. Under sampling phase error, the real and imaginary parts of the measured current at bus i are given by [5] yijr =κ1ij Ai cos(θi + φi ) − κ2ij Ai sin(θi + φi ) − κ3ij Aj cos(θi + φj ) + κ4ij Aj cos(θi + φj ) + (3) r wi,I , yij =κ2ij Ai cos(θi + φi ) + κ1ij Ai sin(θi + φi ) − κ4ij Aj cos(θi + φj ) − κ3ij Aj sin(θi + φj ) + (4)  wi,I , where κ1ij , |ρij |2 gij , κ2ij , |ρij |2 (bij +Bi ), κ3ij , |ρij ρji |(cos ϕji gij −sin ϕji bij ), κ4ij , |ρij ρji |(cos ϕji bij +  r sin ϕji gij ), and wi,I and wi,I are the corresponding Gaussian measurement errors. In general, since the phase error θi is small (e.g., the maximum sampling phase error measured by the North American SynchroPhasor Initiative is 6◦ [16]), the standard approximations sin θi ≈ θi and cos θi ≈ 1 can be applied to (1) and (2), leading to [25] r xri ≈ Eir − Ei θi + wi,E (5)  xi ≈ Ei + Eir θi + wi,E , (6) where Eir , Ai cos(φi ) and Ei , Ai sin(φi ) denote the true power state. Applying the same approximations to (3) and (4) yields yijr ≈κ1ij Eir − κ2ij Ei − κ3ij Ejr + κ4ij Ej  r , + θi − κ2ij Eir − κ1ij Ei + κ4ij Ejr + κ3ij Ej + wi,I (7) yij ≈κ2ij Eir + κ1ij Ei − κ4ij Ejr − κ3ij Ej   . + θi κ1ij Eir − κ2ij Ei − κ3ij Ejr + κ4ij Ej + wi,I (8) We gather all the PMU measurements related to bus i as zi = [xri , xi , yijr 1 , yij 1 , . . . , yijr n , yij n ]T where jk is the index of bus connected to bus i, and arranged in ascending order. Using (5), (6), July 12, 2016 DRAFT 6 (7) and (8), zi can be expressed in a matrix form as [25] X X zi = Hij sj + θi Gij sj + wi , j∈M(i) (9) j∈M(i) where si , [Eir , Ei ]T ; M(i) is the set of all immediate neighboring buses of bus i and also includes bus i; Hij and Gij are known matrices containing elements 0, 1, κ1ij , κ2ij , κ3ij and κ4ij ; and the measurement error vector wi is assumed to be Gaussian wi ∼ N (wi |0, σi2 I), with σi2 being the ith PMU’s measurement error variance [26]. Gathering all the local measurements {zi }i∈P and stacking these observations with increasing order on i as a vector z, the system observation model is z = Hs + ΘGs + w, (10) where s, w and θ contain {si }i∈B , {wi }i∈P and {θi }i∈P respectively, in ascending order with respect to i; Θ , Bldiag{θi I2|M(i)| , . . . , θj I2|M(j)| } with i, j ∈ P arranged in ascending order; and H and G are obtained by stacking Hi,j and Gi,j respectively, with padding zeros in appropriate locations. Since wi is Gaussian, w is also Gaussian with covariance matrix R = Bldiag{σi2 I2|M(i)| , . . . , σj2 I2|M(j)| }, with i, j ∈ P, and the conditional pdf of (10) given s and θ is p(z|s, θ) = N (z|(H + ΘG)s, R). (11) B. Mixed Measurement from SCADA and PMUs For the existing SCADA system, the RTUs measure active and reactive power flows in network branches, bus injections and voltage magnitudes at buses. The measurements of the whole network by the SCADA system can be described as [2] ζ = g(ξ) + n, where ζ is the vector of the measurements from RTUs in the SCADA system, ξ , [A1 , φ1 , A2 , φ2 , . . . , A|B| , φ|B| ]T , and n ∼ N (n|0, W ) is the measurement noise from RTUs. Due to the nonlinear function g(·), ξ can be determined by the iterative reweighted least-squares algorithm [27], and it was shown in [27] that with proper initialization, such a SCADA-based state estimate ξ̂ converges to the maximum likelihood (ML) solution with covariance matrix Υ = [∇g(ξ)T W −1 ∇g(ξ)]−1 |ξ=ξ̂ , where ∇g(ξ) is the partial derivative of g with respect to ξ. While there are many possible ways of integrating measurements from SCADA and PMUs, in this paper, we adopt the approach that keeps the SCADA system intact, as the SCADA system July 12, 2016 DRAFT 7 involves long-term investment and is running smoothing in current power networks. In order to incorporate the polar coordinate state estimate ξ̂ with the PMU measurements in (10), the work [14] advocates transforming ξ̂ into rectangular coordinates, denoted as ŝSCADA , T (ξ̂). Due to the invariant property of the ML estimator [28], ŝSCADA is also the ML estimator in rectangular coordinates. Furthermore, the mean and covariance of ŝSCADA can be approximately computed using the linearization method or unscented transform [29]. For example, based on the linearization method, Appendix A shows that the mean and covariance matrix of ŝSCADA are s and ΓSCADA = ∇T (ξ)Υ∇[T (ξ)]T |ξ=ξ̂ , respectively. When considering hybrid state estimation, the information from SCADA can be viewed as prior information for the estimation based on PMU measurements. From the definition of minimum R mean square error (MMSE) estimation, the optimal estimate of s is given by ŝ , sp(s|z)ds, where p(s|z) is the posterior distribution. Since s, the unknown vector to be estimated, is coupled with the nuisance parameter θ, the posterior distribution of s has to be obtained from R p(s|z) = p(θ, s|z)dθ, and we have Z Z ŝ = sp(θ, s|z)dθds. As p(θ, s|z) = 1 p(z|θ, s)p(s)p(θ) p(z) θ respectively, and p(z) = R where p(s) and p(θ) denote the prior distribution of s and RR p(z, θ, s)dθds = p(z|θ, s)p(θ)p(s)dθds is the normalization constant, we have the MMSE estimator RR sp(θ)p(s)p(z|θ, s)dθds . ŝ = R R p(θ)p(s)p(z|θ, s)dθds (12) The distributions p(s) and p(θ) are detailed as follow. • For p(s), it can be obtained from the distribution of the state estimate from the SCADA system. While ŝSCADA is asymptotically (large data records) Gaussian with mean s and covariance ΓSCADA according to the properties of ML estimators, in practice the number of observations in SCADA state estimation is small and the exact distribution of ŝSCADA under finite observation is in general not known. In order not to incorporate prior information that we do not have, the maximum-entropy (ME) principle is adopted. In particular, given the mean and covariance of ŝSCADA , the maximum-entropy (or least-informative) distribution is the Gaussian distribution with the corresponding mean and covariance [30], [31], i.e., p(ŝSCADA ) ≈ N (ŝSCADA |s, ΓSCADA ). According to the Gaussian function property that July 12, 2016 DRAFT 8 positions of the mean and variable can be exchanged without changing the value of the Gaussian pdf, we have p(s) ≈ N (s|ŝSCADA , ΓSCADA ). • (13) For p(θ), we adopt the truncated Gaussian model: p(θi ) = T N (θi |θi , θ̄i , ṽi , C̃i ) , [U (θi − θi ) − U (θi − θ̄i )] N (θi |ṽi , C̃i ) i erf( θ̄i −ṽ 1/2 ) − erf( C̃i θi −ṽi 1/2 C̃i (14) , ) where θi and θ̄i are lower and upper bounds of the truncated Gaussian distribution, respectively; U (x) is the unit step function, whose value is zero for negative x and one for non-negative x; ṽi and C̃i are the mean and covariance of the original, non-truncated Rx 2 Gaussian distribution; and erf(x) , √12π 0 exp{− y2 }dy. Moreover, the first order moment of (14) is $̃i =E{θi } 1/2 N (θ̄i |ṽi , C̃i ) =ṽi − C̃i i erf( θ̄i −ṽ 1/2 ) C̃i − N (θi |ṽi , C̃i ) − erf( θi −ṽi 1/2 C̃i (15) ) ,Ξ1 [θi , θ̄i , ṽi , C̃i ] and the second order moment is τ̃i =E{θi2 } 1/2 N (θ̄i |ṽi , C̃i ) =ṽi2 − 2ṽi C̃i i erf( θ̄i −ṽ 1/2 ) C̃i − N (θi |ṽi , C̃i ) − erf( θi −ṽi 1/2 C̃i ) ( + C̃i (θ̄i − ṽi )N (θ̄i |ṽi , C̃i ) − (θi − ṽi )N (θi |ṽi , C̃i ) 1− θi −ṽi  1/2  i C̃i erf( θ̄i −ṽ 1/2 ) − erf( 1/2 ) C̃i ) (16) C̃i ,Ξ2 [θi , θ̄i , ṽi , C̃i ]. In general, the parameters of p(θi ) can be obtained through pre-deployment measurements. For example, the truncated range [θi , θ̄i ] is founded to be [−6π/180, 6π/180] according to the test results [16]. ṽi and C̃i can also be obtained from a histogram generated during PMU testing [32]. On the other extreme, (14) also incorporates the case when we have no statistical information about the unknown phase error: setting [θi , θ̄i ] = [−π, π], ṽi = 0, and July 12, 2016 DRAFT 9 C̃i = ∞, giving an uniform distributed θi in one sampling period of the PMU. Further, as θi are independent for different i, we have p(θ) = Y p(θi ). (17) i∈P Remark 1: Generally speaking, the phase errors in different PMUs may not be independent depending on the synchronization mechanism. However, tests [16, p. 35] provided by the joint effort between the U.S. Department of Energy and the North American Electric Reliability Corporation show that the phase errors of PMU measurements is mostly due to the individual instrument used to obtain the signal from the power system. Hence it is reasonable to make the assumption that the phase errors in different PMUs are independent. Remark 2: Under the assumption that all the phase errors {θi }i∈P are zero, (12) reduces to Z p(s)p(z|s) ds. (18) ŝ = s R p(s)p(z|s)ds Since both p(s) and p(z|s) are Gaussian, according to the property that the product of Gaussian pdfs is also a Gaussian pdf [33], we have that p(s)p(z|s) is Gaussian. Moreover, since R p(s)p(z|s)ds is independent of s, the computation of ŝ in (18) is equivalent to maximizing p(s)p(z|s) with respective to s, which is expressed as ŝ = max p(s)p(z|s) s (19)  = max −||ŝSCADA − s||2ΓSCADA − ||z − (H + ΘG)s||2R . s Interestingly, (19) coincides with the weighted least-squares (WLS) solution in [14]. III. S TATE E STIMATION UNDER S AMPLING P HASE E RROR Given all the prior distributions and the likelihood function, (12) can be written as ŝ = RR sp(θ, s|z)dθds, where p(θ, s|z) ∝ p(θ)p(s)p(z|θ, s). The integration is complicated as θi is coupled with {sj }j∈M(i) , and its expression is not analytically tractable. Furthermore, the dimensionality of the state space of the integrand (of the order of number of buses in a power grid, which is typically more than a thousand) prohibits direct numerical integration. In this case, approximate schemes need to be resorted to. One example is the Markov Chain Monte Carlo (MCMC) method, which approximates the distributions and integration operations using a large number of random samples [34]. However, sampling methods can be computationally demanding, July 12, 2016 DRAFT 10 often limiting their use to small-scale problems. Even if it can be successfully applied, the solution is centralized, meaning that the network still suffers from heavy communication overhead. In this section, we present another approximate method whose distributed implementation can be easily obtained. A. Variational Inference Framework The goal of variational inference (VI) is to find a tractable variational distribution q(θ, s) that closely approximates the true posterior distribution p(θ, s|z) ∝ p(θ)p(s)p(z|θ, s). The criterion for finding the approximating q(θ, s) is to minimize the Kullback-Leibler (KL) divergence between q(θ, s) and p(θ, s|z) [35]:   p(θ, s|z) . KL [q(θ, s)||p(θ, s|z)] , −Eq(θ,s) ln q(θ, s) (20) If there is no constraint on q(θ, s), then the KL divergence vanishes when q(θ, s) = p(θ, s|z). However, in this case, we still face the intractable integration in (12). In the VI framework, a common practice is to apply the mean-field approximation q(θ, s) = q(θ)q(s). Under this meanfield approximation, the optimal q(θ) and q(s) that minimize the KL divergence in (20) are given by [35]  q(θ) ∝ exp Eq(s) {ln p(θ)p(s)p(z|θ, s)} (21)  q(s) ∝ exp Eq(θ) {ln p(θ)p(s)p(z|θ, s)} . (22) Next, we will evaluate the expressions for q(θ) and q(s) in (21) and (22), respectively. • Computation of q(θ): Assume q(s) is known and µ , Eq(s) {s} and P , Eq(s) {(s−µ)(s−µ)T } exist. Furthermore, let µi = [µ]2i−1:2i be the local mean state vector of the ith bus; and Pi,j = [P ]2i−1:2i,2j−1:2j be the local covariance of state vectors between the ith and j th buses. By substituting the prior distributions p(s) from (13), p(θ) from (14) and the likelihood function from (11) into (21), the variational distribution q(θ) is shown in Appendix B to be Y q(θ) ∝ T N (θi |θi , θ̄i , vi , Ci ), (23) i∈P July 12, 2016 DRAFT 11 with Ci = C̃i −2 σi Tr{Ai,2 }C̃i +1 ,   X  vi = Ci ṽi /C̃i + σi−2 Tr zi (Gij µj )T − Ai,1 , (24) (25) j∈M(i)   P where Ai,1 = j∈M(i) Hij Pj,j + µj µTj GTij + j,k∈M(i),j6=k Hij Pj,k + µj µTk GTik and Ai,2 =  T  T P P T T j∈M(i) Gij Pj,j + µj µj Gij + j,k∈M(i),j6=k Gij Pj,k + µj µk Gik . Furthermore, the first P and second order moments of q(θ) in (23) can be easily shown to be $ = [$i . . . $j ]T and T = $$ T + diag{τi − $i2 . . . τj − $j2 } respectively, with i, j ∈ B and $i and τi computed according to (15) and (16) as • $i = Ξ1 [θi , θ̄i , vi , Ci ], (26) τi = Ξ2 [θi , θ̄i , vi , Ci ]. (27) Computation of q(s): Assume q(θ) is known and $ , Eq(θ) {θ} and T , Eq(θ) {θθ T } exist. Furthermore, let $i = [$]i be the local mean of the phase error at the ith bus, and τi = [T]i,i be the local second order moment. By substituting the prior distribution p(θ) from (17), and the likelihood function from (11) into (22), and performing integration over θ as shown in Appendix B, we obtain q(s) ∝ N s|µ, P  (28) with the mean µ and covariance P given by  −1 T T µ =Γ−1 ŝ + Υ(H + ΩG) (H + ΩG)Υ(H + ΩG) + R SCADA SCADA × [z − (H + ΩG)Γ−1 SCADA ŝSCADA ],  −1 P = Υ − Υ(H + ΩG)T (H + ΩG)Υ(H + ΩG)T + R (H + ΩG)Υ, (29) (30) T 2 −1 −1 −1 respectively, where Υ = [Γ−1 SCADA + (G (Λ − Ω )R G) ] . From the expressions for q(θ) and q(s) in (23) and (28), it should be noticed that these two functions are coupled. Consequently, they should be updated iteratively. Fortunately, q(θ) and q(s) keep the same forms as their prior distributions, and therefore, only the parameters of each function are involved in the iterative updating. In summary, let the initial variational distribution q (0) (s) equal p(s) in (13), which is Gaussian with mean µ = ŝSCADA and covariance matrix P = ΓSCADA . We can obtain the updated q (1) (θ) July 12, 2016 DRAFT 12 following (23). After that, q (1) (s) will be obtained according to (28). The process is repeated until µ converges or a predefined maximum number of iterations is reached. Once the converged q(θ) and q(s) are obtained, p(θ, s|z) is replaced by q(θ)q(s) in (12), and it can be readily shown that ŝ equals E{q(s)} = µ. B. Distributed Estimation For a large-scale power grid, to alleviate the communication burden on the network and computation complexity at the control center, it is advantageous to decompose the state estimation algorithm into computations that are local to each area of the power system and require only limited message exchanges among immediate neighbors. From (23)-(25), it is clear that q(θ) is a product of a number of truncated Gaussian distributions b(θi ) , T N (θi |θi , θ̄i , vi , Ci ), with each component involving measurements only from bus i and parameters relating bus i and its immediate neighboring buses. Thus the estimation of θi can be performed locally at each bus. However, this is not true for si in (28). To achieve distributed computation for the power Q state si , a mean-field approximation is applied to q(s), and we write q(s) = i∈B b(si ). Then, Q Q the variational distribution is in the form i∈P b(θi ) i∈B b(si ). Since the goal is to derive a distributed algorithm, it is also assumed that each bus has access only to the mean and variance Q Q of its own state from SCADA estimates, i.e., p(s) ≈ i∈B p(si ) = i∈B N (si |γi , Γi ), with γi = [ŝSCADA ]2i−1:2i and Γi = [PSCADA ]2i−1:2i,2i−1:2i . Then, the optimal variational distributions b(si ) and b(θi ) can be obtained through minimizing the following KL divergence: Q Q  Y Y p(z|θ, s) i∈P p(θi ) i∈B p(si ) Q Q KL b(θi ) b(si ) R R p(z|θ, s) p(s ) i i∈B i∈P p(θi )d{θi }i∈P d{si }i∈B i∈P i∈B Q Q   p(z|θ, s) i∈P p(θi ) i∈B p(si ) Q Q Q Q ∝ −E j∈P b(θj ) j∈B b(sj ) ln . i∈P b(θi ) i∈B b(si ) Similarly to (21) and (22), the b(θi ) and b(si ) that minimize (31) are given by n o Y Y  p(θi ) p(si ) i ∈ P, b(θi ) ∝ exp EQj∈P\i b(θj ) Qi∈B p(si ) ln p(z|θ, s) i∈P (32) i∈B o n Y Y  b(si ) ∝ exp EQi∈P b(θi ) Qj∈B\i b(sj ) ln p(z|θ, s) p(θi ) p(si ) i ∈ B. i∈P (31) (33) i∈B Next, we will evaluate the expressions for b(θi ) and b(si ) in (32) and (33), respectively. • Computation of b(θi ): July 12, 2016 DRAFT 13 Assume b(si ) is known for all i ∈ B with mean and covariance denoted by µi and Pi,i , respectively. The b(θi ) in (32) can be obtained from q(θ) in (23) by setting Pi,j = 0 if i 6= j, and we have b(θi ) ∝ T N (θi |θi , θ̄i , vi , Ci ) (34) C̃i −2 σi Tr{Bi,2 }C̃i (35) with Ci = +1   X  vi = Ci ṽi /C̃i + σi−2 Tr zi (Gij µj )T − Bi,1 . (36) j∈M(i)  P P P with Bi,1 = j∈M(i) Hij Pj,j +µj µTj GTij + j,k∈M(i),j6=k Hij µj µTk GTik and Bi,2 = j∈M(i) Gij Pj,j +  P µj µTj GTij + j,k∈M(i),j6=k Gij µj µTk GTik . With Ci and vi in (35) and (36), to facilitate the computation of b(si ) in the next step, the first and second order moments of b(θi ) are computed through (15) and (16) as • $i = Ξ1 [θi , θ̄i , vi , Ci ], (37) τi = Ξ2 [θi , θ̄i , vi , Ci ]. (38) Computation of b(si ): Assume b(θi ) for all i ∈ P are known with first and second order moments denoted by $i and τi , respectively. Furthermore, it is assumed that b(sj ) for j ∈ B \ i are also known with their covariance matrices given by Pj,j . Now, rewrite (33) as Y  b(si ) ∝ p(si ) exp Eb(θj ) Qk∈M(j)\i b(sk ) {ln p(zj |θj , {sk̃ }k̃∈M(j) )} . {z } | j∈M(i) (39) ,mj→i (si ) As shown in Appendix C, mj→i (si ) is in Gaussian form mj→i (si ) ∝ N (si |vj→i , Cj→i ) (40) Cj→i = σj2 [HjiT Hji + $j (GTji Hji + HjiT Gji ) + τj GTji Gji ]−1 ,  −2 = σj Cj→i (Hji + $j Gji )T zj (41) with vj→i − X   T T T T T Hji Hjk + $j (Gji Hjk + Hji Gjk ) + τj Gji Gjk µk . (42) k∈M(j)\i July 12, 2016 DRAFT 14 Then, putting p(si ) = N (si |γi , Γi ) and (40) into (39), we obtain b(si ) ∝ N (si |γi , Γi )N (si |vj→i , Cj→i ) ∝ N (si |µi , Pi,i ), (43) with X Pi,i = (Γ−1 i + −1 −1 Cj→i ) (44) j∈M(i) µi = Pi,i (Γ−1 i γi + X −1 Cj→i vj→i ). (45) j∈M(i) Inspection of (41) and (42) reveals that these expressions can be readily computed at bus j and then Cj→i and vj→i can be sent to its immediate neighbouring bus i for computation of b(si ) according to (43). • Updating Schedule and Summary: From the expressions for b(θi ) and b(si ) in (34) and (43), it should be noticed that these functions are coupled. Consequently, b(θi ) and b(si ) should be iteratively updated. Since updating any b(θi ) or b(si ) corresponds to minimizing the KL divergence in (31), the iterative algorithm Algorithm 1 Distributed states estimation 1: Initialization: µi = [ŝSCADA ]2i−1:2i and Pi,i = [PSCADA ]2i−1:2i;2i−1:2i . Neighboring buses exchange µi and Pi,i . Buses with PMUs update $i and τi via (37) and (38). Every bus i computes Ci→j vi→j Pi,i , µi via (41) (42) (44) (45), and sends these four entities to bus j, where j ∈ M(i). 2: for the lth iteration do 3: Select a group of buses with the same color. 4: Buses with PMUs in the group compute $i and τi via (37) and (38). 5: Every bus in the group updates its Ci→j vi→j Pi,i , µi via (41) (42) (44) (45), and sends them out to its neighbor j. 6: 7: Bus j computes vj→k via (42) and send to its neighbor k ∈ M(j). end for is guaranteed to converge monotonically to at least a stationary point [35] and there is no July 12, 2016 DRAFT 15 requirement that b(θi ) or b(si ) should be updated in any particular order. Besides, the variational distributions b(θi ) and b(si ) in (34) and (43) keep the form of truncated Gaussian and Gaussian distributions during the iterations, thus only their parameters are required to be updated. However, the successive update scheduling might take too long in large-scale networks. Fortunately, from (41)-(45), it is found that updating b(si ) only involves information within two hops from bus i. Besides, from (35) and (36), it is observed that updating b(θi ) only involves information from direct neighbours of bus i. Since KL divergence is a convex function with respect to each of the factors b(si ) and b(θi ), if buses within two hops from each other do not update their variational distributions b(·) at the same time, the KL divergence in (31) is guaranteed to be decreased in each iteration and the distributed algorithm keeps the monotonic convergence property. This can be achieved by grouping the buses using a distance-2 coloring scheme [36], which colors all the buses under the principle that buses within a two-hop neighborhood are assigned different colors and the number of colors used is the least (for the IEEE-300 system, only 13 different colors are needed). Then, all buses with the same color update at the same time and buses with different colors are updated in succession. Notice that the complexity order of the distance-2 coloring scheme is Q(λ|B|) [36], where λ is the maximum number of branches linked to any bus. Since λ is usually small compared to the network size (e.g., λ = 9 for the IEEE 118-bus system), the complexity of distance-2 coloring depends only on the network size and it is independent of the specific topology of the power network. In summary, all the buses are first colored by the distance-2 coloring scheme, and the iterative procedure is formally given in Algorithm 1. Notice that although the modelling and formulation of state estimation under phase error is complicated, the final result and processing are simple. During each iteration, the first and second order moments of the phase error estimate are computed via (37) and (38); while the covariance and mean of the state estimate are computed using (44) and (45). Due to the fact that computing these quantities at one bus depends on information from neighboring buses, these equations are computed iteratively. After convergence, the state estimate is given by µi at each bus. Although the proposed distributed algorithm advocates each bus to perform computations and message exchanges, but it is also applicable if computations of several buses are executed by a local control center. Then any two control centers only need to exchange the messages for their shared power states. July 12, 2016 DRAFT 16 IV. S IMULATION R ESULTS AND D ISCUSSIONS This section provides results on the numerical tests of the developed centralized and distributed state estimators in Section III. The network parameters gij , bij , Bi , ρij are loaded from the test cases in MATPOWER4.0 [37]. In each simulation, the value at each load bus is varied by adding a uniformly distributed random value within ±10% of the value in the test case. Then the power flow program is run to determine the true states. The RTUs measurements are composed of active/reactive power injection, active/reactive power flow, and bus voltage magnitude at each bus, which are also generated from MATPOWER4.0 and perturbed by independent zeromean Gaussian measurement errors with standard deviation 1 × 10−2 [26]. For the SCADA system, the estimates ξ̂ and Υ are obtained through the classical iterative reweighted least-squares with initialization [Ai , φi ]T = [1, 0]T [5]. In general, the proposed algorithms are applicable regardless of the number of PMUs and their placements. But for the simulation study, the placement of PMUs is obtained through the method proposed in [24]. As experiments in [16] show the maximum phase error is 6◦ in a 60Hz power system, θi is generated uniformly from [−6π/180, 6π/180] for each Monte-Carlo simulation run. The PMU measurement errors follow a zero-mean Gaussian distribution with standard deviation σi = 1×10−2 [26]. 1000 Monte-Carlo simulation runs are averaged for each point in the figures. Furthermore, it is assumed that bad data from RTUs and PMU measurements has been successfully handled [14], [38, Chap 7]. For comparison, we consider the following three existing methods: 1) Centralized WLS [14] assuming no sampling phase errors in the PMUs. Without sampling phase error, (10) reduces to z = Hs + w. For this linear model, WLS can be directly applied to estimate s. This algorithm serves as a benchmark for the proposed algorithms. 2) Centralized WLS under sampling phase errors in the PMUs. This will show how much degradation one would have if phase errors are ignored. 3) The centralized alternating minimization (AM) scheme [25] with p(s) and p(θi ) in (13) and (14) incorporated as prior information. In particular, the posterior distribution is maximized alternatively with respect to s and θ. While updating one variable vector, all others should be kept at the last estimation values. Fig. 1 shows the convergence behavior of the proposed algorithms with average mean square P 1 2 error (MSE) defined as 2|B| i∈B ||ŝi − si || . It can be seen that: a) The centralized VI approach converges very rapidly and after convergence the corresponding MSE are very close to the July 12, 2016 DRAFT 17 benchmark performance provided by WLS with no sampling phase offset. Centralized AM is also close to optimal after convergence. b) The proposed distributed algorithm can also approach the optimal performance after convergence. The seemingly slow convergence is a result of sequential updating of buses with different colors to guarantee convergence. If one iteration is defined as one round of updating of all buses, the distributed algorithm would converge only in a few iterations. On the other hand, the small degradation from the centralized VI solution is due to the fact that in the distributed algorithm, the covariance of states si and sj in prior distributions and variational distributions cannot be taken into account. c) If the sampling phase error is ignored, we can see that the performance of centralized WLS shows significant degradation, illustrating the importance of simultaneous power state and phase error estimation. Fig. 2 shows P 1 ∗ 2 ∗ the MSE of the sampling phase error estimation |P| i∈P ||$i −θi || , where $i is the converged $i in (37). It can be seen from the figure that same conclusions as in Fig. 1 can be drawn. Fig. 3 shows the relationship between iteration number upon convergence versus the network size. The seemingly slow convergence of the proposed distributed algorithm is again due to the sequential updating of buses with different colors. However, more iterations in the proposed distributed algorithm do not mean a larger computational complexity. In particular, let us consider a network with |B| buses. In the centralized AM algorithm [25], for each iteration, the computation for power state estimation is dominated by a 2|B| × 2|B| matrix inverse and the complexity is O((2|B|)3 ), while the computation for phase error estimation is dominated by a |B| × |B| matrix inverse and the complexity is O((|B|)3 ). Hence, for centralized AM algorithm, in each iteration, the computational complexity order is O(9|B|3 ). On the other hand, in the proposed distributed algorithm, the computational complexity of each iteration at each bus is dominated by matrix inverses with dimension 2 ((41), (42) (44) and (45)), hence the computational complexity is of order O(23 ), and the complexity of the whole network in each iteration is of order O(23 × |B|), which is only linear with respect to number of buses. It is obvious that a significant complexity saving is obtained compared to the centralized AM algorithm (O(9|B|3 )). Thus, although the proposed distributed algorithm requires more iterations to converge, the total computational complexity is still much lower than that of its centralized counterpart. Such merit is important for power networks with high data throughput. The effect of using different numbers of PMUs in the IEEE 118-bus system is shown in Fig. 4. First, 32 PMUs are placed over the network according to [24] for full topological observation. July 12, 2016 DRAFT 18 The remaining PMUs, if available, are randomly placed to provide additional measurements. The MSE of state estimation is plotted versus the number of PMUs. It is clear that increasing the number of PMUs is beneficial to hybrid state estimation. But the improvement shows diminishing return as the number of PMUs increases. The curves in this figure allow system designers to choose a tradeoff between estimation accuracy and the number of PMUs being deployed. Finally, Fig. 5 shows the MSE versus PMU measurement error variance for the IEEE 118-bus system. It can be seen that with smaller measurement error variance, the MSE of the proposed distributed method becomes very close to the optimal performance. However, if we ignore the sampling phase errors, the estimation MSE shows a constant gap from that of optimal performance even if the measurement error variance tends to zero. This is because in this case, the non-zero sampling phase dominates the error in the PMU measurements. V. C ONCLUSIONS In this paper, a distributed state estimation scheme integrating measurements from a traditional SCADA system and newly deployed PMUs has been proposed, with the aim that the existing SCADA system is kept intact. Unknown sampling phase errors among PMUs have been incorporated in the estimation procedure. The proposed distributed power state estimation algorithm only involves limited message exchanges between neighboring buses and is guaranteed to converge. Numerical results have shown that the converged state estimates of the distributed algorithm are very close to those of the optimal centralized estimates assuming no sampling phase error. A PPENDIX A Let the nonlinear transformation from polar to rectangular coordinate be denoted by T (·). Assuming ŝSCADA = T (ξ̂) and performing the first-order Taylor series expansion of T (ξ̂) about the true state ξ yields ŝSCADA = T (ξ̂) = T (ξ + ∆ξ) ≈ T (ξ) + ∇T (ξ̃)|ξ̃=ξ ∆ξ, (46) where ∆ξ is the estimation error from the SCADA system, and ∇T (ξ) is the  first order derivative  of T (·), which is a block diagonal matrix with the ith block [∇T (ξ̃)]i,i =  cos θ̃i −Ei sin θ̃i sin θ̃i Ei cos θ̃i  for i = 1, . . . , M . Taking expectation on both sides of (46), we obtain E{ŝSCADA } ≈ s. July 12, 2016 (47) DRAFT 19 Furthermore, the covariance is ΥSCADA ≈ ∇T (ξ̃)Υ∇[T (ξ̃)]T |ξ̃=ξ̂ . (48) A PPENDIX B Derivation of q(θ) in (21)   Since Eq(s) {ln p(θ)} = ln p(θ), we have exp Eq(s) {ln p(θ)} = p(θ). Moreover, as exp Eq(s) {ln p(s)} is a constant, (21) can be simplified as  q(θ) ∝ p(θ) exp Eq(s) {ln p(z|θ, s)} . (49)  Next, we perform the computation of exp Eq(s) {ln p(z|θ, s)} . According to (9) and (10), we have    exp Eq(s) ln p(z|θ, s)   X X  X σi−2 2 ∝ exp Eq(s) − ||zi − ( Hij sj + θi Gij sj )|| . 2 i∈P j∈M(i) (50) j∈M(i) By expanding the squared norm and dropping the terms irrelevant to θi , (50) is simpified as   exp Eq(s) {ln p(z|θ, s)} ) ( i X Y σi−2 h exp − − 2θi Tr{zi (Gij µsj )T − Ai,1 } + θi2 Tr{Ai,2 } ∝ (51) 2 i∈P j∈M(i) ∝ Y N (θi |Tr{zi i∈P X (Gij µsj )T − Ai,1 }/Tr{Ai,2 }, σi2 /Tr{Ai,2 }), j∈M(i) where the last line comes from completing the square on the term inside the exponential   P P and Ai,1 = j∈M(i) Hij Pj,j + µj µTj GTij + j,k∈M(i),j6=k Hij Pj,k + µj µTk GTik and Ai,2 =  T P  T P T T j∈M(i) Gij Pj,j + µj µj Gij + j,k∈M(i),j6=k Gij Pj,k + µj µk Gik .  Substituting p(θ) from (17) and exp Eq(s) {ln p(z|θ, s)} from (51) into (49), we obtain q(θ) ∝ Y U (θi − θi ) − U (θi − θ̄i ) N (θi |ṽi , C̃i ) θi −ṽi i erf( θ̄i −ṽ 1/2 ) − erf( 1/2 ) C̃i C̃i X × N (θi |Tr{zi (Gij µsj )T − Ai,1 }/Tr{Ai,2 }, σi2 /Tr{Ai,2 }) i∈P (52) j∈M(i) ∝ Y U (θi − θi ) − U (θi − θ̄i ) i∈P July 12, 2016 i erf( θ̄i −v 1/2 ) − erf( Ci θi −vi 1/2 Ci ) N (θi |vi , Ci ) DRAFT 20 with Ci = C̃i −2 σi Tr{Ai,2 }C̃i +1 , (53)   X  vi = Ci ṽi /C̃i + σi−2 Tr zi (Gij µj )T − Ai,1 . (54) j∈M(i) It is recognized that (52) is in the form of a truncated Gaussian pdf. That is, q(θ) ∝ Q i∈P T N (θi |θi , θ̄i , vi , Ci ). Derivation of q(s) in (22) Similar to the arguments for arriving at (49), (22) can be simplified as  q(s) ∝ p(s) exp Eq(θ) {ln p(z|θ, s)} . (55)  For exp Eq(θ) {ln p(z|θ, s)} , it can be computed as  exp Eq(θ) {ln p(z|θ, s)}    1 2 ∝ exp Eq(θ) − ||z − (H + ΘG)s||R−1 2  1 = exp − z T R−1 z − 2z T R−1 (H + Eq(θ) {Θ}G)s 2 + sT H T R−1 Hs + 2sT H T R−1 Eq(θ) {Θ}Gs   T T −1 2 + s G R Eq(θ) {Θ }Gs  1 1 = exp − [z − (H + ΩG)s]T R−1 [z − (H + ΩG)s] − sT GT (Λ − Ω2 )R−1 Gs 2 2   ∝N z|(H + ΩG)s, R × N s|0, (GT (Λ − Ω2 )R−1 G)−1 (56)  where Ω = Eq(θ) {Θ} , Bldiag{$i I2|M(i)| , . . . , $j I2|M(j)| } and Λ = Eq(θ) {Θ2 } , Bldiag{τi I2|M(i)| , . . . , τj I2|M(j)| }.  By substituting the prior distribution p(s) from (13), and exp Eq(θ) {ln p(z|θ, s)} from (56) into (55), and after some algebraic manipulations [28, pp. 326], we obtain q(s) ∝ N s|µ, P  (57) with the covariance and mean given by  −1 T T µ =Γ−1 SCADA ŝSCADA + Υ(H + ΩG) (H + ΩG)Υ(H + ΩG) + R × [z − (H + (58) ΩG)Γ−1 SCADA ŝSCADA ],  −1 P = Υ − Υ(H + ΩG)T (H + ΩG)Υ(H + ΩG)T + R (H + ΩG)Υ, (59) T 2 −1 −1 −1 respectively, where Υ = [Γ−1 SCADA + (G (Λ − Ω )R G) ] . July 12, 2016 DRAFT 21 A PPENDIX C  σ2 P From (9), it can be obtained that p(zj |θj , {sk̃ }k̃∈M(j) ) ∝ exp − 2j ||zj − ( k̃∈M(j) Hj k̃ sk̃ + P θj k̃∈M(j) Gj k̃ sk̃ )||2 . By expanding the squared norm and dropping the terms irrelevant to si , we have ln p(zj |θj , {sk̃ }k̃∈M(j) )  σj−2 ∝− − 2zjT (Hji + θj Gji )si 2 X  +2 sTk (Hji + θj Gji )T (Hjk + θj Gjk )si (60) k∈M(j)\i + sTi (Hji  T + θj Gji ) (Hji + θj Gji )si . Taking expectation with respect to θj and {sk }k∈M(j)\i over the above equation, we have n o exp Eb(θj ) Qk∈M(j)\i b(sk ) {ln p(zj |θj , {sk̃ }k̃∈M(j) )}   σj−2 − 2zjT (Hji + $j Gji )si ∝ exp − 2 X (61)  +2 µTk HjiT Hjk + $j (GTji Hjk + HjiT Gjk ) + τj GTji Gjk si k∈M(j)\i + sTi {HjiT Hji + $j (GTji Hji + HjiT Gji ) + τj GTji Gji }si  . Then, completing the square for the term si in (61) leads to mj→i (si ) ∝ N (si |vj→i , Cj→i ), (62) −1  Cj→i = σj2 HjiT Hji + $j (GTji Hji + HjiT Gji ) + τj GTji Gji ,  −2 =σj Cj→i (Hji + $j Gji )T zj (63) with vj→i − X  HjiT Hjk + $j (GTji Hjk + HjiT Gjk ) + T τj GTji Gjk µk (64)  . k∈M(j)\i July 12, 2016 DRAFT 22 R EFERENCES [1] A. Monticelli, “Electric power system state estimation,” Proc. IEEE, vol. 88, no. 2, pp. 262–282, 2000. [2] Y.-F. Huang, S. Werner, J. Huang, N. Kashyap, and V. Gupta, “State estimation in electric power grids: Meeting new challenges presented by the requirements of the future grid,” IEEE Signal Process. Mag, vol. 29, no. 5, pp. 33–43, 2012. [3] D. Shirmohammadi, B. Wollenberg, A. Vojdani, P. Sandrin, M. Pereira, F. Rahimi, T. Schneider, and B. Stott, “Transmission dispatch and congestion management in the emerging energy market structures,” IEEE Trans. Power Syst., vol. 13, no. 4, pp. 1466–1474, 1998. [4] M. Ahmad, Power System State Estimation. Artech House, January 2013. [5] A. G. E. Ali Abur, Power System State Estimation: Theory and Implementation. Artech House, Mar 2004. [6] G. Giannakis, V. Kekatos, N. Gatsis, S.-J. Kim, H. Zhu, and B. Wollenberg, “Monitoring and optimization for power grids: A signal processing perspective,” IEEE Signal Process. Mag, vol. 30, no. 5, pp. 107–128, 2013. [7] A. Phadke, J. Thorp, and M. Adamiak, “A new measurement technique for tracking voltage phasors, local system frequency, and rate of change of frequency,” IEEE Trans. Power App. Syst., vol. PAS-102, no. 5, pp. 1025–1038, 1983. [8] A. Phadke, “Synchronized phasor measurements-a historical overview,” in Transmission and Distribution Conference and Exhibition 2002: Asia Pacific. IEEE/PES, vol. 1, 2002, pp. 476–479 vol.1. [9] T. Baldwin, L. Mili, J. Boisen, M. B., and R. Adapa, “Power system observability with minimal phasor measurement placement,” IEEE Trans. Power Syst., vol. 8, no. 2, pp. 707–715, 1993. [10] V. Kekatos, G. Giannakis, and B. Wollenberg, “Optimal placement of phasor measurement units via convex relaxation,” IEEE Trans. Power Syst., vol. 27, no. 3, pp. 1521–1530, 2012. [11] X. Li, A. Scaglione, and T.-H. Chang, “A unified framework for phasor measurement placement design in hybrid state estimation,” IEEE Trans. Power Syst., vol. 23, no. 3, pp. 1099–1104, 2013. [12] T. Yang, H. Sun, and A. Bose, “Transition to a two-level linear state estimator part I: Architecture,” IEEE Trans. Power Syst., vol. 26, no. 1, pp. 46–53, 2011. [13] X. Li and A. Scaglione, “Robust decentralized state estimation and tracking for power systems via network gossiping,” IEEE J. Select. Areas Commun., vol. 31, no. 7, pp. 1184–1194, 2013. [14] M. Zhou, V. Centeno, J. Thorp, and A. Phadke, “An alternative for including phasor measurements in state estimators,” IEEE Trans. Power Syst., vol. 21, no. 4, pp. 1930–1937, 2006. [15] A. Phadke and J. Thorp, Synchronized Phasor Measurements and Their Applications. New York: Springer, 2008. [16] A. P. Meliopoulos, V. Madani, D. Novosel, G. Cokkinides, and et al., “Synchrophasor measurement accuracy characterization,” North American SynchroPhasor Initiative Performance & Standards Task Team (Consortium for Electric Reliability Technology Solutions), 2007. [17] A. Gómez-Expósito, A. Abur, A. de la Villa Jaén, and C. Gómez-Quiles, “A multilevel state estimation paradigm for smart grids,” Proc. IEEE, vol. 99, no. 6, pp. 952–976, 2011. [18] D. Falcao, F. Wu, and L. Murphy, “Parallel and distributed state estimation,” IEEE Trans. Power Syst., vol. 10, no. 2, pp. 724–730, 1995. [19] R. Ebrahimian and R. Baldick, “State estimation distributed processing for power systems,” IEEE Trans. Power Syst., vol. 15, no. 4, pp. 1240–1246, 2000. [20] M. Zhao and A. Abur, “Multi-area state estimation using synchronized phasor measurements,” IEEE Trans. Power Syst., vol. 20, no. 2, pp. 611–617, 2005. July 12, 2016 DRAFT 23 [21] W. Jiang, V. Vittal, and G. Heydt, “A distributed state estimator utilizing synchronized phasor measurements,” IEEE Trans. Power Syst., vol. 22, no. 2, pp. 563–571, 2007. [22] V. Kekatos and G. Giannakis, “Distributed robust power system state estimation,” IEEE Trans. Power Syst., vol. 28, no. 2, pp. 1617–1626, 2013. [23] L. Xie, D.-H. Choi, S. Kar, and H. V. Poor, “Fully distributed state estimation for wide-area monitoring systems,” IEEE Trans. Smart Grid, vol. 3, no. 3, pp. 1154–1169, 2012. [24] B. Gou, “Generalized integer linear programming formulation for optimal PMU placement,” IEEE Trans. Power Syst., vol. 23, no. 3, pp. 1099–1104, 2008. [25] P. Yang, Z. Tan, A. Wiesel, and A. Nehorai, “Power system state estimation using PMUs with imperfect synchronization,” IEEE Trans. Power Syst., vol. 28, no. 4, pp. 4162–4172, 2013. [26] A. Gomez-Exposito, A. Abur, , A. de la Villa Jaen, and C. Gomez-Quiles, “On the use of PMUs in power system state estimation,” in Proc. 17th Power Systems Computation Conference, Stockholm, Sweden, 2011, pp. 1–13. [27] F. Schweppe and J. Wildes, “Power system static-state estimation, part I: Exact model,” IEEE Trans. Power App. Syst., vol. PAS-89, no. 1, pp. 120–125, 1970. [28] S. M. Kay, Fundamentals of Statistical Signal Processing Estimation Theory. Upper Saddle River, NJ: Prentice-Hall, 1993. [29] D. Simon, State Estimation: Kalman, H-Infinity, and Nonlinear Approaches. [30] A. O’Hagan, Kendalls Advanced Theory of Statistic 2B. Hoboken, NJ: Wiley, 2006. Wiley, March 2010. [31] M. Xia, W. Wen, and S.-C. Kim, “Opportunistic cophasing transmission in MISO systems,” IEEE Trans. Wireless Commun., vol. 57, no. 12, pp. 3764–3770, December 2009. [32] S. M. Shah and M. C. Jaiswal, “Estimation of parameters of doubly truncated normal distribution from first four sample moments,” Annals of the Institute of Mathematical Statistics, vol. 18, no. 1, pp. 107–111, 1966. [33] A. Papoulis and S. U. Pillai, Random Variables and Stochastic Processes, 4th ed. New York: McGraw-Hill, 2002. [34] A. Doucet and X. Wang, “Monte carlo methods for signal processing: a review in the statistical signal processing context,” IEEE Signal Process. Mag, vol. 22, no. 6, pp. 152–170, 2005. [35] C. Bishop, Pattern Recognition and Machine Learning. Artech House, January 2006. [36] S. T. McCormick, “Optimal approximation of sparse hessians and its equivalence to a graph coloring problem,” Math. Programming, 1983. [37] R. Zimmerman, C. Murillo-Sanchez, and R. Thomas, “Matpower: Steady-state operations, planning, and analysis tools for power systems research and education,” IEEE Trans. Power Syst., vol. 26, no. 1, pp. 12–19, 2011. [38] L. Xie, D.-H. Choi, S. Kar, and H. V. Poor, Bad-data detection in smart grid: a distributed approach. in E. Hossain, Z. Han, and H. V. Poor, editors Smart Grd Communications and Networking, Cambridge University Press, 2012. July 12, 2016 DRAFT 24 1 x 10 −4 Centralized WLS ignoring non−zero i 0.9 Proposed distributed algorithm Centralized alternating minimization Proposed centralized algorithm Centralized WLS with i=0 MSE of power state estimate 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 10 20 30 40 50 Iteration number Fig. 1. MSE of the power state versus iteration number for the IEEE 118-bus system. 12 x 10 −6 11 Proposed distributed algorithm Centralized alternating minimization Proposed centralized algorithm MSE of phase estimate 10 9 8 7 6 5 4 3 2 0 10 20 30 40 50 Iteration Number Fig. 2. MSE of the phase error versus iteration number for the IEEE 118-bus system. July 12, 2016 DRAFT 25 50 Iteration number upon convergence 45 40 35 30 Proposed distributed algorithm Proposed centralized algorithm Centralized alternating minimization 25 20 15 10 5 0 Fig. 3. 14 30 57 118 Number of Buses Iteration numbers upon convergence versus the network size. −6 9 x 10 MSE of power state estimate 8 Proposed distributed algorithm Centralized alternating minimization Proposed centralized algorithm Centralized WLS with i=0 7 6 5 4 3 2 1 30 40 50 60 70 80 90 100 Number of PMUs Fig. 4. Effect of increasing the number of PMUs on the power state estimate. July 12, 2016 DRAFT 26 −5 10 x 10 Centralized WLS ignoring non−zero i 9 Proposed distributed algorithm Centralized alternating minimization Proposed centralized algorithm Centralized WLS with i=0 MSE of power state estimate 8 7 6 5 4 3 2 1 1 2 3 4 log(1/i) Fig. 5. MSE of power state versus log(1/σi ), where σi is the standard deviation of the ith PMU’s measurement error. July 12, 2016 DRAFT
3cs.SY
arXiv:1710.10306v1 [math.GR] 27 Oct 2017 Beyond Serre’s “Trees” in two directions: Λ–trees and products of trees Olga Kharlampovich∗, Alina Vdovina† October 31, 2017 Abstract Serre [125] laid down the fundamentals of the theory of groups acting on simplicial trees. In particular, Bass-Serre theory makes it possible to extract information about the structure of a group from its action on a simplicial tree. Serre’s original motivation was to understand the structure of certain algebraic groups whose Bruhat–Tits buildings are trees. In this survey we will discuss the following generalizations of ideas from [125]: the theory of isometric group actions on Λ-trees and the theory of lattices in the product of trees where we describe in more detail results on arithmetic groups acting on a product of trees. 1 Introduction Serre [125] laid down the fundamentals of the theory of groups acting on simplicial trees. The book [125] consists of two parts. The first part describes the basics of what is now called Bass-Serre theory. This theory makes it possible to extract information about the structure of a group from its action on a simplicial tree. Serre’s original motivation was to understand the structure of certain algebraic groups whose Bruhat–Tits buildings are trees. These groups are considered in the second part of the book. Bass-Serre theory states that a group acting on a tree can be decomposed (splits) as a free product with amalgamation or an HNN extension. Such a group can be represented as a fundamental group of a graph of groups. This became a wonderful tool in geometric group theory and geometric topology, in particular in the study of 3-manifolds. The theory was further developing in the following directions: 1. Various accessibility results were proved for finitely presented groups that bound the complexity (that is, the number of edges) in a graph of groups ∗ Hunter College and Grad. Center CUNY University and Hunter College CUNY † Newcastle 1 decomposition of a finitely presented group, where some algebraic or geometric restrictions on the types of groups were imposed [32, 16, 123, 33, 132]. 2. The theory of JSJ-decompositions for finitely presented groups was developed [22, 115, 34, 124, 36]. 3. The theory of lattices in automorphism groups of trees. The group of automorphisms of a locally finite tree Aut(T ) (equipped with the compact open topology, where open neighborhoods of f ∈ Aut(T ) consist of all automorphisms that agree with f on a fixed finite subtree) is a locally compact group which behaves similarly to a rank one simple Lie group. This analogy has motivated many recent works in particular the study of lattices in Aut(T ) by Bass, Kulkarni, Lubotzky [18], [75] and others. A survey of results about tree lattices and methods is given in [6] as well as proofs of many results. In this survey we will discuss the following generalizations of Bass-Serre theory and other Serre’s ideas from [125]: 1. The theory of isometric group actions on real trees (or R-trees) which are metric spaces generalizing the graph-theoretic notion of a tree. This topic will be only discussed briefly, we refer the reader to the survey [14]. 2. The theory of isometric group actions on Λ-trees, see Sections 2, 3. Alperin and Bass [1] developed the initial framework and stated the fundamental research goals: find the group theoretic information carried by an action (by isometries) on a Λ-tree; generalize Bass-Serre theory to actions on arbitrary Λ-trees. From the viewpoint of Bass-Serre theory, the question of free actions of finitely generated groups became very important. There is a book [25] on the subject and many new results were obtained in [69]. This is a topic of interest of the first author. 3. The theory of complexes of groups provides a higher-dimensional generalization of Bass–Serre theory. The methods developed for the study of lattices in Aut(T ) were extended to the study of (irreducible) lattices in a product of two trees, as a first step toward generalizing the theory of lattices in semisimple non-archimedean Lie groups. Irreducible lattices in higher rank semisimple Lie groups have a very rich structure theory and there are superrigidity and arithmeticity theorems by Margulis. The results of Burger, Moses, Zimmer [19, 20, 21] about cocompact lattices in the group of automorphisms of a product of trees or rather in groups of the form Aut(T1 ) × Aut(T2 ), where each of the trees is regular, are described in [90]. The results obtained concerning the structure of lattices in Aut(T1 ) × Aut(T2 ) enable them to construct the first examples of finitely presented torsion free simple groups. We will mention further results on simple and non-residually finite groups [133, 108, 107] and describe in more detail results on arithmetic groups acting on the product of trees [38, 127]. This is a topic of interest of the second author. 2 In [79] Lyndon introduced real-valued length functions as a tool to extend Nielsen cancelation theory from free groups over to a more general setting. Some results in this direction were obtained in [52, 53, 51, 103, 2]. The term R-tree was coined by Morgan and Shalen [99] in 1984 to describe a type of space that was first defined by Tits [129]. In [23] Chiswell described a construction which shows that a group with a real-valued length function has an action on an Rtree, and vice versa. Morgan and Shalen realized that a similar construction and results hold for an arbitrary group with a Lyndon length function which takes values in an arbitrary ordered abelian group Λ (see [99]). In particular, they introduced Λ-trees as a natural generalization of R-trees which they studied in relation with Thurston’s Geometrization Program. Thus, actions on Λ-trees and Lyndon length functions with values in Λ are two equivalent languages describing the same class of groups. In the case when the action is free (the stabilizer of every point is trivial) we call groups in this class Λ-free or tree-free. We refer to the book [25] for a detailed discussion on the subject. A joint effort of several researchers culminated in a description of finitely generated groups acting freely on R-trees [15, 37], which is now known as Rips’ theorem: a finitely generated group acts freely on an R-tree if and only if it is a free product of free abelian groups and surface groups (with an exception of nonorientable surfaces of genus 1, 2, and 3). The key ingredient of this theory is the so-called “Rips machine”, the idea of which comes from Makanin’s algorithm for solving equations in free groups (see [85]). The Rips machine appears in applications as a general tool that takes a sequence of isometric actions of a group G on some “negatively curved spaces” and produces an isometric action of G on an R-tree as the Gromov-Hausdorff limit of the sequence of spaces. Free actions on R-trees cover all Archimedean actions, since every group acting freely on a Λ-tree for an Archimedean ordered abelian group Λ also acts freely on an R-tree. In the non-Archimedean case the following results were obtained. First of all, in [4] Bass studied finitely generated groups acting freely on Λ0 ⊕ Z-trees with respect to the right lexicographic order on Λ0 ⊕ Z, where Λ0 is any ordered abelian group. In this case it was shown that the group acting freely on a Λ0 ⊕Z-tree splits into a graph of groups with Λ0 -free vertex groups and maximal abelian edge groups. Next, Guirardel (see [48]) obtained the structure of finitely generated groups acting freely on Rn -trees (with the lexicographic order). In [70] the authors described the class of finitely generated groups acting freely and regularly on Zn -trees in terms of HNN-extensions of a very particular type. The action is regular if all branch points are in the same orbit. The importance of regular actions becomes clear from the results of [72], where it was proved that a finitely generated group acting freely on a Zn -tree is a subgroup of a finitely generated group acting freely and regularly on a Zm -tree for m > n, and the paper [26], where it was shown that a group acting freely on a Λ-tree (for arbitrary Λ) can always be embedded in a length-preserving way into a group acting freely and regularly on a Λ-tree (for the same Λ). The structure of finitely presented Λ-free groups was described in [69]. They all are Rn -free. Another natural generalization of Bass-Serre theory is considering group 3 actions on products of trees started in [19]. The structure of a group acting freely and cocompactly on a simplicial tree is well understood. Such a group is a finitely generated free group. By way of contrast, a group which acts similarly on a product of trees can have remarkably subtle properties. Returning to the case of one tree, recall that there is a close relation between certain simple Lie groups and groups of tree automorphisms. The theory of tree lattices was developed in [18], [75] by analogy with the theory of lattices in Lie groups (that is discrete subgroups of Lie groups of finite co-volume). Let G be a simple algebraic group of rank one over a non-archimedean local field K. Considering the action of G on its associated Bruhat–Tits tree T we have a continuous embedding of G in Aut(T ) with co-compact image. In [130] Tits has shown that if T is a locally finite tree and its automorphism group Aut(T ) acts minimally (i.e. without an invariant proper subtree and not fixing an end) on it, then the subgroup generated by edge stabilizers is a simple group. In particular the automorphism group of a regular tree is virtually simple. These results motivated the study of Aut(T ) looking at the analogy with rank one Lie groups. When T is a locally finite tree, G = Aut(T ) is locally compact. The vertex stabilizers Gv are open and compact. A subgroup Γ ≤ G is discrete if Γv is finite for some (and hence for every) vertex v ∈ V T , where V T is the set of vertices of T. In this case we can define X 1/|Γv |. V ol(Γ\T ) = v∈Γ\V T We call Γ a T -lattice if V ol(Γ\T ) < ∞. We call Γ a uniform T -lattice if Γ\T is finite. In case G\T is finite, this is equivalent to Γ being a lattice (resp., uniform lattice) in G. Uniform tree lattices correspond to finite graphs of groups in which all vertex and edge groups are finite. In the study of lattices in semisimple Lie groups an important role is playied by their commensurators. Margulis has shown that an irreducible lattice Γ < G in a semisimple Lie group is arithmetic if and only if its commensurator is dense in G. It was shown by Liu [74] that the commensurator of a uniform tree lattice is dense. All uniform tree lattices of a given tree are commensurable up to conjugation, the isomorphism class of the commensurator of a uniform tree lattice is determined by the tree. It was also shown [77] that for regular trees the commensurator determines the tree. Consider now products of trees. The following results about lattices in semisimple Lie groups were established by Margulis: an irreducible lattice in a higher rank (≥ 2) semisimple Lie group is arithmetic; any linear representation of such a lattice with unbounded image essentially extends to a continuous representation of the ambient Lie group. Recall that a lattice G in a semisimple Lie group is called reducible if Γ contains a finite index subgroup of the form Γ1 × Γ2 where Γi < Gi is a lattice and G = G1 × G2 . A reducible torsion free group acting simply transitively on a product of two trees is virtually a direct product of two finitely generated free groups, in particular is residually finite. Burger, Moses, Zimmer [19] were studying a structure for lattices of groups of 4 the form Aut(T1 ) × Aut(T2 ). For example, Burger and Mozes have proved rigidity and arithmeticity results analogous to the theorems of Margulis for lattices in semisimple Lie groups. We will describe their results about cocompact lattices in groups of the form Aut(T1 ) × Aut(T2 ), where each of the trees is regular. We will discuss this and similar topics in Section 4. The smallest explicit example of a simple group, as an index 4 subgroup of a group presented by 10 generators and 24 short relations, was constructed by Rattaggi [108]. For comparison, the smallest virtually simple group of [19], Theorem 6.4, needs more than 18000 relations, and the smallest simple group constructed in [19], 6.5, needs even more than 360000 relations in any finite presentation. If we restrict our attention to torsion free lattices that act simply transitively on the vertices of the product of trees (not interchanging the factors), then those lattices are fundamental groups of square complexes with just one vertex, complete bipartite link and a vertical/horizontal structure on edges (see 4.1.2 for precise definition). This is combinatorially well understood and there are plenty of such lattices, see [127] for a mass formula, but very rarely these lattices arise from an arithmetic context. Let Tn denote the tree of constant valency n. For example, there are 541 labelled candidate square complexes that after forgetting the label give rise to 43 torsion free and vertex transitive lattices acting on T4 × T4 . Among those only one lattice is arithmetic. For lattices acting on T6 × T6 the number of labelled square complexes is ≈ 27 · 106 , but only few thousands have finite abelianization (a necessary condition) and only 2 lattices are known to be arithmetic. For different odd prime numbers p 6= ℓ, Mozes [89], for p and ℓ congruent to 1 mod 4, and later, for any two distinct odd primes, Rattaggi [107] found an arithmetic lattice acting on Tp+1 × Tℓ+1 with simply transitive action on the vertices. For products of trees of the same valency arithmetic lattices were constructed in [127]. By means of a quaternion algebra over Fq (t), there is an explicit construction of an infinite series of torsion free, simply transitive, irreducible lattices in PGL2 (Fq ((t)))×PGL2 (Fq ((t))). The lattices depend on an odd prime power q = pr and a parameter τ ∈ F× q , τ 6= 1, and are the fundamental groups of a square complex with just one vertex and universal covering Tq+1 × Tq+1 , a product of trees with constant valency q + 1. For p = 2 there are examples of arithmetic lattices acting on products of trees of valency 3 in [118]. The last subsection of our survey is dedicated to lattices in products of n ≥ 2 trees. We would like to thank the referee for giving constructive comments which substantially helped improving the quality of the exposition. 2 Λ-trees The theory of Λ-trees (where Λ = R) has its origins in the papers by Chiswell [23] and Tits [129]. The first paper contains a construction of an R-tree starting 5 from a Lyndon length function on a group (see Section 2.6), an idea considered earlier by Lyndon in [81]. Later, in their very influential paper [84] Morgan and Shalen linked group actions on R-trees with topology and generalized parts of Thurston’s Geometrization Theorem. Next, they introduced Λ-trees for an arbitrary ordered abelian group Λ and the general form of Chiswell’s construction. Thus, it became clear that abstract length functions with values in Λ and group actions on Λ-trees are just two equivalent approaches to the same realm of group theory questions. The unified theory was further developed in the important paper by Alperin and Bass [1], where authors state a fundamental problem in the theory of group actions on Λ-trees: find the group theoretic information carried by a Λ-tree action (analogous to Bass-Serre theory), in particular, describe finitely generated groups acting freely on Λ-trees (Λ-free groups). Here we introduce basics of the theory of Λ-trees, which can be found in more detail in [1], [25] and [69]. 2.1 Ordered abelian groups In this section some well-known results on ordered abelian groups are collected. For proofs and details we refer to the books [39] and [73]. A set A equipped with addition “+” and a partial order “6” is called a partially ordered abelian group if: (1) hA, +i is an abelian group, (2) hA, 6i is a partially ordered set, (3) for all a, b, c ∈ A, a 6 b implies a + c 6 b + c. An abelian group A is called orderable if there exists a linear order “6” on A, satisfying the condition (3) above. In general, the ordering on A is not unique. Let A and B be ordered abelian groups. Then the direct sum A ⊕ B is orderable with respect to the right lexicographic order, defined as follows: (a1 , b1 ) < (a2 , b2 ) ⇔ b1 < b2 or (b1 = b2 and a1 < a2 ). Similarly, one can define the right lexicographic order on finite direct sums of ordered abelian groups or even on infinite direct sums if the set of indices is linearly ordered. For elements a, b of an ordered group A the closed segment [a, b] is defined by [a, b] = {c ∈ A | a 6 c 6 b}. A subset C ⊂ A is called convex, if for every a, b ∈ C the set C contains [a, b]. In particular, a subgroup B of A is convex if [0, b] ⊂ B for every positive b ∈ B. In this event, the quotient A/B is an ordered abelian group with respect to the order induced from A. 6 A group A is called archimedean if it has no non-trivial proper convex subgroups. It is known that A is archimedean if and only if A can be embedded into the ordered abelian group of real numbers R+ , or equivalently, for any 0 < a ∈ A and any b ∈ A there exists an integer n such that na > b. It is not hard to see that the set of convex subgroups of an ordered abelian group A is linearly ordered by inclusion (see, for example, [39]), it is called the complete chain of convex subgroups in A. Notice that En = {f (t) ∈ Z[t] | deg(f (t)) 6 n} is a convex subgroup of Z[t] (here deg(f (t)) is the degree of f (t)) and 0 < E0 < E1 < · · · < En < · · · is the complete chain of convex subgroups of Z[t]. If A is finitely generated then the complete chain of convex subgroups of A 0 = A0 < A1 < · · · < An = A is finite. The following result (see, for example, [25]) shows that this chain completely determines the order on A, as well as the structure of A. Namely, the groups Ai /Ai−1 are archimedean (with respect to the induced order) and A is isomorphic (as an ordered group) to the direct sum A1 ⊕ A2 /A1 ⊕ · · · ⊕ An /An−1 (1) with the right lexicographic order. An ordered abelian group A is called discretely ordered if A has a non-trivial minimal positive element (we denote it by 1A ). In this event, for any a ∈ A the following hold: (1) a + 1A = min{b | b > a}, (2) a − 1A = max{b | b < a}. For example, A = Zn with the right lexicographic order is discretely ordered with 1Zn = (1, 0, . . . , 0). The additive group of integer polynomials Z[t] is discretely ordered with 1Z[t] = 1. Recall that an ordered abelian group A is hereditary discrete if for any convex subgroup E 6 A the quotient A/E is discrete with respect to the induced order. A finitely generated discretely ordered archimedean abelian group is infinite cyclic. A finitely generated hereditary discrete ordered abelian group is isomorphic to the direct product of finitely many copies of Z with the lexicographic order. [93] 2.2 Λ-metric spaces Let X be a non-empty set, and Λ an ordered abelian group. A Λ-metric on X is a mapping d : X × X −→ Λ such that for all x, y, z ∈ X: 7 (M1) d(x, y) > 0, (M2) d(x, y) = 0 if and only if x = y, (M3) d(x, y) = d(y, x), (M4) d(x, y) 6 d(x, z) + d(y, z). So a Λ-metric space is a pair (X, d), where X is a non-empty set and d is a Λ-metric on X. If (X, d) and (X ′ , d′ ) are Λ-metric spaces, an isometry from (X, d) to (X ′ , d′ ) is a mapping f : X → X ′ such that d(x, y) = d′ (f (x), f (y)) for all x, y ∈ X. A segment in a Λ-metric space is the image of an isometry α : [a, b]Λ → X for some a, b ∈ Λ and [a, b]Λ is a segment in Λ. The endpoints of the segment are α(a), α(b). We call a Λ-metric space (X, d) geodesic if for all x, y ∈ X, there is a segment in X with endpoints x, y and (X, d) is geodesically linear if for all x, y ∈ X, there is a unique segment in X whose set of endpoints is {x, y}. It is not hard to see, for example, that (Λ, d) is a geodesically linear Λ-metric space, where d(a, b) = |a − b|, and the segment with endpoints a, b is [a, b]Λ . Let (X, d) be a Λ-metric space. Choose a point v ∈ X, and for x, y ∈ X, define 1 (x · y)v = (d(x, v) + d(y, v) − d(x, y)). 2 Observe, that in general (x · y)v ∈ 21 Λ. The following simple result follows immediately Lemma 1. [25] If (X, d) is a Λ-metric space then the following are equivalent: 1. for some v ∈ X and all x, y ∈ X, (x · y)v ∈ Λ, 2. for all v, x, y ∈ X, (x · y)v ∈ Λ. Let δ ∈ Λ with δ > 0. Then (X, p) is δ-hyperbolic with respect to v if, for all x, y, z ∈ X, (x · y)v > min{(x · z)v , (z · y)v } − δ. Lemma 2. [25] If (X, d) is δ-hyperbolic with respect to v, and t is any other point of X, then (X, d) is 2δ-hyperbolic with respect to t. A Λ-tree is a Λ-metric space (X, d) such that: (T1) (X, d) is geodesic, (T2) if two segments of (X, d) intersect in a single point, which is an endpoint of both, then their union is a segment, (T3) the intersection of two segments with a common endpoint is also a segment. Example 1. Λ together with the usual metric d(a, b) = |a − b| is a Λ-tree. Moreover, any convex set of Λ is a Λ-tree. 8 Example 2. A Z-metric space (X, d) is a Z-tree if and only if there is a simplicial tree Γ such that X = V (Γ) and p is the path metric of Γ. Observe that in general a Λ-tree can not be viewed as a simplicial tree with the path metric like in Example 2. Lemma 3. [25] Let (X, d) be Λ-tree. Then (X, d) is 0-hyperbolic, and for all x, y, v ∈ X we have (x · y)v ∈ Λ. Eventually, we say that a group G acts on a Λ-tree X if any element g ∈ G defines an isometry g : X → X. An action on X is non-trivial if there is no point in X fixed by all elements of G. Note, that every group has a trivial action on any Λ-tree, when all group elements act as identity. An action of G on X is minimal if X does not contain a non-trivial G-invariant subtree X0 . Let a group G act as isometries on a Λ-tree X. g ∈ G is called elliptic if it has a fixed point. g ∈ G is called an inversion if it does not have a fixed point, but g 2 does. If g is not elliptic and not an inversion then it is called hyperbolic. A group G acts freely and without inversions on a Λ-tree X if for all 1 6= g ∈ G, g acts as a hyperbolic isometry. In this case we also say that G is Λ-free. 2.3 Λ-free groups Recall that a group G is called Λ-free if for all 1 6= g ∈ G, g acts as a hyperbolic isometry. Here we list some known results about Λ-free groups for an arbitrary ordered abelian group Λ. For all these results the reader can be referred to [1, 4, 25, 83, 69]. Theorem 1. (a) The class of Λ-free groups is closed under taking subgroups. (b) If G is Λ-free and Λ embeds (as an ordered abelian group) in Λ′ then G is Λ′ -free. (c) Any Λ-free group is torsion-free. (d) Λ-free groups have the CSA property. That is, every maximal abelian subgroup A is malnormal: Ag ∩ A = 1 for all g ∈ / A. (e) Commutativity is a transitive relation on the set of non-trivial elements of a Λ-free group. (f ) Solvable subgroups of Λ-free groups are abelian. (g) If G is Λ-free then any abelian subgroup of G can be embedded in Λ. (h) Λ-free groups cannot contain Baumslag-Solitar subgroups other than Z×Z. That is, no group of the form ha, t | t−1 ap t = aq i can be a subgroup of a Λ-free group unless p = q = ±1. (i) Any two generator subgroup of a Λ-free group is either free, or free abelian. 9 (j) The class of Λ-free groups is closed under taking free products. The following result was originally proved in [51] in the case of finitely many factors and Λ = R. A proof of the result in the general formulation given below can be found in [25, Proposition 5.1.1]. Theorem 2. If {Gi | i ∈ I} is a collection of Λ-free groups then the free product ∗i∈I Gi is Λ-free. The following result gives a lot of information about the group structure in the case when Λ = Z × Λ0 with the left lexicographic order. Theorem 3. [4, Theorem 4.9] Let a group G act freely and without inversions on a Λ-tree, where Λ = Z × Λ0 . Then there is a graph of groups (Γ, Y ∗ ) such that: (1) G = π1 (Γ, Y ∗ ), (2) for every vertex x∗ ∈ Y ∗ , a vertex group Γx∗ acts freely and without inversions on a Λ0 -tree, (3) for every edge e ∈ Y ∗ with an endpoint x∗ an edge group Γe is either maximal abelian subgroup in Γx∗ or is trivial and Γx∗ is not abelian, (4) if e1 , e2 , e3 ∈ Y ∗ are edges with an endpoint x∗ then Γe1 , Γe2 , Γe3 are not all conjugate in Γx∗ . Conversely, from the existence of a graph (Γ, Y ∗ ) satisfying conditions (1)– (4) it follows that G acts freely and without inversions on a Z × Λ0 -tree in the following cases: Y ∗ is a tree, Λ0 ⊂ Q and either Λ0 = Q or Y ∗ is finite. 2.4 R-trees The case when Λ = R in the theory of groups acting on Λ-trees is the most well-studied (other than Λ = Z, of course). R-trees are usual metric spaces with nice properties which makes them very attractive from geometric point of view. The term R-tree was introduced by Morgan and Shalen [99] to describe a type of space that was first defined by Tits [129]. In the last three decades Rtrees have played a prominent role in topology, geometry, and geometric group theory. They are the most simple of geodesic spaces, and yet by Theorem 7 below, every length space is an orbit space of an R-tree. Lots of results were obtained in the last two decades about group actions on these objects. The most celebrated one is Rips’ Theorem about free actions and a more general result of Bestvina and Feighn about stable actions on R-trees (see [37, 15]). In particular, the main result of Bestvina and Feighn together with the idea of obtaining a stable action on an R-tree as a limit of actions on an infinite sequence of Z-trees gives a very powerful tool in obtaining non-trivial decompositions of groups into fundamental groups of graphs of groups which is known as Rips machine. Such decompositions of groups as iterated applications of the operations of free product with amalgamation and HNN extension are called splittings. 10 An R-tree (X, d) is a Λ-metric space which satisfies the axioms (T1) – (T3) listed in Subsection 2.2 for Λ = R with usual order. Hence, all the definitions and notions given in Section 2 hold for R-trees. Proposition 1. [25, Proposition 2.2.3] Let (X, d) be an R-metric space. Then the following are equivalent: 1. (X, d) is an R-tree, 2. given two points of X, there is a unique segment (with more than one point) having them as endpoints, 3. (X, d) is geodesic and it contains no subspace homeomorphic to the circle. Example 3. Let Y = R2 be the plane, but with metric p defined by  |y1 | + |y2 | + |x1 − x2 | if x1 6= x2 p((x1 , y1 ), (x2 , y2 )) = |y1 − y2 | if x1 = x2 That is, to measure the distance between two points not on the same vertical line, we take their projections onto the horizontal axis, and add their distances to these projections and the distance between the projections (distance in the usual Euclidean sense). Example 4. [25, Proposition 2.2.5] Given a simplicial tree Γ, one can construct its realization real(Γ) by identifying each non-oriented edge of Γ with the unit interval. The metric on real(Γ) is induced from Γ. Example 5. Let G be a δ-hyperbolic group. Then its Cayley graph with respect to any finite generating set S is a δ-hyperbolic metric space (X, d) (where d is a word metric) on which G acts by isometries. Now, the asymptotic cone Coneω (X) of G is a real tree (see [49, 30, 35]) on which G acts by isometries. An R-tree is called polyhedral if the set of all branch points and endpoints is closed and discrete. Polyhedral R-trees have strong connection with simplicial trees as shown below. Theorem 4. [25, Theorem 2.2.10] An R-tree (X, d) is polyhedral if and only if it is homeomorphic to real(Γ) (with metric topology) for some simplicial tree Γ. Now we briefly recall some known results related to group actions on R-trees. The first result shows that an action on a Λ-tree always implies an action on an R-tree. Theorem 5. [25, Theorem 4.1.2] If a finitely generated group G has a nontrivial action on a Λ-tree for some ordered abelian group Λ then it has a nontrivial action on some R-tree. Observe that in general nice properties of the action on a Λ-tree are not preserved when passing to the corresponding action on an R-tree above. The next result was one of the first in the theory of group actions on R-trees. Later it was generalized to the case of an arbitrary Λ, see Theorem 1. 11 Theorem 6. [51] Let G be a group acting freely and without inversions on an R-tree X, and suppose g, h ∈ G \ {1}. Then hg, hi is either free of rank two or abelian. Let (X, d) be a metric space. Then d is said to be a length metric if the distance between every pair of points x, y ∈ X is equal to the infimum of the length of rectifiable curves joining them. (If there are no such curves then d(x, y) = ∞.) If d is a length metric then (X, d) is called a length space. Theorem 7. [12] Every length space (resp. complete length space) (X, d) is the metric quotient of a (resp. complete) R-tree (X, d) via the free isometric action of a locally free subgroup Γ(X) of the isometry group Isom(X). It is not hard to define an action of a free abelian group on an R-tree. Example 6. Let A = ha, bi be a free abelian group. Define an action of A on R (which is an R-tree) by embedding A into Isom(R) as follows a → t1 , b → t√ 2 , where tα (x) = x + α is a translation. It is easy to see that an bm → tn+m√2 , and since 1 and √ 2 are rationally independent it follows that the action is free. The following result was very important in the direction of classifying finitely generated R-free groups. Theorem 8. [84] The fundamental group of a closed surface is R-free, except for the non-orientable surfaces of genus 1, 2 and 3. Then, in 1991 E. Rips completely classified finitely generated R-free groups. The ideas outlined by Rips were further developed by Gaboriau, Levitt and Paulin who gave a complete proof of this classification in [37]. Theorem 9 (Rips’ Theorem). Let G be a finitely generated group acting freely and without inversions on an R-tree. Then G can be written as a free product G = G1 ∗ · · · ∗ Gn for some integer n > 1, where each Gi is either a finitely generated free abelian group, or the fundamental group of a closed surface. It is worth mentioning that there are examples by Dunwoody [17] and Zastrow [38] of infinitely generated groups that are not free products of fundamental groups of closed surfaces and abelian groups, but which act freely on an R-tree. Zastrow’s group G contains one of the two Dunwoody groups as a subgroup. The other group is a Kurosh group. Berestovskii and Plaut proved the following result. We first introduce necessary notation. If (X, d) is the length space, then R-tree X is defined as the space of based “non-backtracking” rectifiable paths in X, where the distance between two paths is the sum of their lengths from the first bifurcation point to their endpoints. The group Γ(X) ⊂ X is the subset of loops with a natural group structure and the quotient mapping φ : X → X is the end-point map. We will refer to X as the covering R-tree of X. 12 Theorem 10. Let X be Sc (Sierpinski carpet), M a complete Riemannian manifold Mn of dimension n = 2, or the Hawaiian earring H with any compatible length metric d. Then Γ(X) is an infinitely generated, locally free group that is not free and not a free product of surface groups and abelian groups, but acts freely on the R-tree X. Moreover, the R-tree X is a minimal invariant subtree with respect to this action. 2.5 Rips-Bestvina-Feighn machine Suppose G is a finitely presented group acting isometrically on an R-tree Γ. We assume the action to be non-trivial and minimal. Since G is finitely presented there is a finite simplicial complex K of dimension at most 2 such that π1 (K) ≃ G. Moreover, one can assume that K is a band complex with underlying union of bands which is a finite simplicial R-tree X with finitely many bands of the type [0, 1]×α, where α is an arc of the real line, glued to X so that {0}×α and {1}×α are identified with sub-arcs of edges of X. Following [15] (the construction originally appears in [99]) one can construct a transversely measured lamination e → Γ, where K e is the universal cover L on K and an equivariant map φ : K e to points in Γ. The of K, which sends leaves of the induced lamination on K e complex K together with the lamination L is called a band complex with K resolving the action of G on Γ. Now, Rips-Bestvina-Feighn machine is a procedure which given a band complex K, transforms it into another band complex K ′ (we still have π1 (K ′ ) ≃ G), whose lamination splits into a disjoint union of finitely many sub-laminations of several types - simplicial, surface, toral, thin - and these sub-laminations induce a splitting of K ′ into sub-complexes containing them. K ′ can be thought of as the “normal form” of the band complex K. Analyzing the structure of K ′ and its sub-complexes one can obtain some information about the structure of the group G. In particular, in the case when the original action of G on Γ is stable one can obtain a splitting of G. Recall that a non-degenerate (that is, containing more than one point) subtree S of Γ is stable if for every non-degenerate subtree S ′ of S, we have F ix(S ′ ) = F ix(S) (here, F ix(I) 6 G consists of all elements which fix I point-wise). The action of G on Γ is stable if every non-degenerate subtree of T contains a stable subtree. We say that a group G splits over a subgroup E is G is either an amalgamated product or an HNN extension over E (with the edge group E). Theorem 11. [15, Theorem 9.5] Let G be a finitely presented group with a nontrivial, stable, and minimal action on an R-tree Γ. Then either (1) G splits over an extension E-by-cyclic, where E fixes a segment of Γ, or (2) Γ is a line. In this case, G splits over an extension of the kernel of the action by a finitely generated free abelian group. The key ingredient of the Rips-Bestvina-Feighn machine is a set of particular operations, called moves, on band complexes applied in a certain order. These 13 operations originate from the work of Makanin [85] and Razborov [109] that ideas of Rips are built upon. Observe that the group G in Theorem 11 must be finitely presented. To obtain a similar result about finitely generated groups acting on R-trees one has to further restrict the action. An action of a group G on an R-tree Γ satisfies the ascending chain condition if for every decreasing sequence I1 ⊃ I2 ⊃ · · · ⊃ In ⊃ · · · of arcs in Γ which converge into a single point, the corresponding sequence F ix(I1 ) ⊂ F ix(I2 ) ⊂ · · · ⊂ F ix(In ) ⊂ · · · stabilizes. Theorem 12. [41] Let G be a finitely generated group with a nontrivial minimal action on an R-tree Γ. If (1) Γ satisfies the ascending chain condition, (2) for any unstable arc J of Γ, (a) F ix(J) is finitely generated, (b) F ix(J) is not a proper subgroup of any conjugate of itself, that is, if F ix(J)g ⊂ F ix(J) for some g ∈ G then F ix(J)g = F ix(J). Then either (1) G splits over a subgroup H which is an extension of the stabilizer of an arc of Γ by a cyclic group, or (2) Γ is a line. Now, we will discuss some applications of the above results which are based on the construction outlined in [13] and [104] making possible to obtain isometric group actions on R-trees as Gromov-Hausdorff limits of actions on hyperbolic spaces. All the details can be found in [14]. Let (X, dX ) be a metric space equipped with an isometric action of a group G which can be viewed as a homomorphism ρ : G → Isom(X). Assume that X contains a point ε which is not fixed by G. In this case, we call the triple (X, ε, ρ) a based G-space. Observe that given a based G-space (X, ε, ρ) one can define a pseudometric d = d(X,ε,ρ) on G as follows d(g, h) = dX (ρ(g) · ε, ρ(h) · ε). Now, the set D of all non-trivial pseudometrics on G equipped with compact open topology and then taken up to rescaling by positive reals (projectivized), 14 forms a topological space and we say that a sequence (Xi , εi , ρi ), i ∈ N of based G-spaces converges to the based G-space (X, ε, ρ) and write lim (Xi , εi , ρi ) = (X, ε, ρ) i→∞ if we have [d(Xi ,εi ,ρi ) ] → [d(X,ε,ρ) ] for the projectivized equivariant pseudometrics in D. Now, the following result is the main tool in obtaining isometric group actions on R-trees from actions on Gromov-hyperbolic spaces. Theorem 13. [14, Theorem 3.3] Let (Xi , εi , ρi ), i ∈ N be a convergent sequence of based G-spaces. Assume that (1) there exists δ > 0 such that every Xi is δ-hyperbolic, (2) there exists g ∈ G such that the sequence dXi (εi , ρi (g) · εi ) is unbounded. Then there is a based G-space (Γ, ε) which is an R-tree and an isometric action ρ : G → Isom(Γ) such that (Xi , εi , ρi ) → (Γ, ε, ρ). In fact, the above theorem does not guarantee that the limiting action of G on Γ has no global fixed points. But in the case when G is finitely generated and each Xi is proper (closed metric balls are compact), it is possible to choose base-points in εi ∈ Xi to make the action of G on Γ non-trivial (see [14, Proposition 3.8, Theorem 3.9]). Moreover, one can retrieve some information about stabilizers of arcs in Γ (see [14, Proposition 3.10]). Note that Theorem 13 can also be interpreted in terms of asymptotic cones (see [30, 31] for details). The power of Theorem 13 becomes obvious in particular when a finitely generated group G has infinitely many pairwise non-conjugate homomorphisms φi : G → H into a word-hyperbolic group H. In this case, each φi defines an action of G on the Cayley graph X of H with respect to some finite generating set. Now, one can define Xi to be X with a word metric rescaled so that the sequence of (Xi , εi , ρi ), i ∈ N satisfies the requirements of Theorem 13 and thus obtain a non-trivial isometric action of G on an R-tree. Many results about word-hyperbolic groups were obtained according to this scheme, for example, the following classical result. Theorem 14. [105] Let G be a word-hyperbolic group such that the group of its outer automorphisms Out(G) is infinite. Then G splits over a virtually cyclic group. Combined with the shortening argument due to Rips and Sela [117] this scheme gives many other results about word-hyperbolic groups, for example, the theorems below. Theorem 15. [117] Let G be a torsion-free freely indecomposable word-hyperbolic group. Then the internal automorphism group (that consists of automorphisms obtained by compositions of Dehn twists and inner automorphisms) of G has finite index in Aut(G). 15 Theorem 16. [50, 119] Let G be a finitely presented torsion-free freely indecomposable group and let H be a word-hyperbolic group. Then there are only finitely many conjugacy classes of subgroups of G isomorphic to H. There are similar recent results for relatively hyperbolic groups [42]. For more detailed account of applications of the Rips-Bestvina-Feighn machine please refer to [14]. 2.6 Lyndon length functions In 1963 Lyndon (see [81]) introduced a notion of length function on a group in an attempt to axiomatize cancelation arguments in free groups as well as free products with amalgamation and HNN extensions, and to generalize them to a wider class of groups. The main idea was to measure the amount of cancellation in passing to the reduced form of a product of reduced words in a free group and free constructions, and it turned out that the cancelation process could be described by rather simple axioms. The idea of using length functions became quite popular (see, for example, [51, 23, 52]), and then it turned out that the language of length functions described the same class of groups as the language of actions on trees. Below we give the axioms of (Lyndon) length function and recall the main results in this field. Let G be a group and Λ be an ordered abelian group. Then a function l : G → Λ is called a (Lyndon) length function on G if the following conditions hold: (L1) ∀ g ∈ G : l(g) > 0 and l(1) = 0, (L2) ∀ g ∈ G : l(g) = l(g −1 ), (L3) ∀ f, g, h ∈ G : c(f, g) > c(f, h) implies c(f, h) = c(g, h), where c(f, g) = 21 (l(f ) + l(g) − l(f −1 g)). Observe that in general c(f, g) ∈ / Λ, but c(f, g) ∈ ΛQ = Λ ⊗Z Q, where Q is the additive group of rational numbers, so, in the axiom (L3) we view Λ as a subgroup of ΛQ . But in some cases the requirement c(f, g) ∈ Λ is crucial so we state it as a separate axiom [69] (L4) ∀ f, g ∈ G : c(f, g) ∈ Λ. It is not difficult to derive the following two properties of Lyndon length functions from the axioms (L1) – (L3): • ∀ f, g ∈ G : l(f g) 6 l(f ) + l(g), • ∀ f, g ∈ G : 0 6 c(f, g) 6 min{l(f ), l(g)}. The following examples motivated the whole theory of groups with length functions. 16 Example 7. Given a free group F (X) on the set X one can define a (Lyndon) length function on F as follows w(X) → |w(X)|, where | · | is the length of the reduced word in X ∪ X ±1 representing w. Example 8. Given two groups G1 and G2 with length functions L1 : G1 → Λ and L2 : G2 → Λ for some ordered abelian group Λ one can construct a length function on G1 ∗G2 as follows (see [25, Proposition 5.1.1]). For any g ∈ G1 ∗G2 such that g = f1 g1 · · · fk gk fk+1 , where fi ∈ G1 , i ∈ [1, k + 1], fi 6= 1, i ∈ [2, k] and 1 6= gi ∈ G2 , i ∈ [1, k], define L(1) = 0 and if g = 6 1 then L(g) = k+1 X L1 (fi ) + k X j=1 i=1 L2 (gj ) ∈ Λ. A length function l : G → Λ is called free, if it satisfies (L5) l(g 2 ) > l(g) for all non-trivial g ∈ G. Obviously, the Z-valued length function constructed in Example 7 is free. The converse is shown below (see also [52] for another proof of this result). Theorem 17. [81] Any group G with a length function L : G → Z can be embedded into a free group F of finite rank whose natural length function extends L. Example 9. Given two groups G1 and G2 with free length functions L1 : G1 → Λ and L2 : G2 → Λ for some ordered abelian group Λ, the length function on G1 ∗ G2 constructed in Example 8 is free. Observe that if a group G acts on a Λ-tree (X, d) then we can fix a point x ∈ X and consider a function lx : G → Λ defined as lx (g) = d(x, gx). Such a function lx on G we call a length function based at x. It is easy to check that lx satisfies all the axioms (L1) – (L4) of Lyndon length function. Now if k · k is the translation length function associated with the action of G on (X, d) (for g ∈ G, ||g|| = Inf {d(p, gp), p ∈ X}), then the following properties show the connection between lx and k · k. (i) lx (g) = kgk + 2d(x, Ag ) (where Ag is the axis of g), if g is not an inversion. (ii) kgk = max{0, lx (g 2 ) − lx (g)}. Here, it should be noted that for points x ∈ / Ag , there is a unique closest point of Ag to x. The distance between these points is the one referred to in (i). While Ag = Agn for all n 6= 0 in the case where g is hyperbolic, if g fixes a point, it is possible that Ag ⊂ Ag2 . We may have lx (g 2 ) − lx (g) < 0 in this case. Free 17 actions are characterized, in the language of length functions, by the facts (a) kgk > 0 for all g 6= 1, and (b) lx (g 2 ) > lx (g) for all g 6= 1. The latter follows from the fact that kg n k = nkgk for all g. We note that there are properties for the translation length function which were shown to essentially characterize actions on Λ-trees, up to equivariant isometry, by Parry, [106]. The following theorem is one of the most important results in the theory of length functions. Theorem 18. [23] Let G be a group and l : G → Λ a Lyndon length function satisfying condition (L4). Then there are a Λ-tree (X, d), an action of G on X, and a point x ∈ X such that l = lx . The proof is constructive, that is, one can define a Λ-metric space out of G and l, and then prove that this space is in fact a Λ-tree on which G acts by isometries (see [25, Subsection 2.4] for details). A length function l : G → Λ is called regular if it satisfies the regularity axiom: (L6) ∀ g, f ∈ G, ∃ u, g1 , f1 ∈ G : g = u ◦ g1 & f = u ◦ f1 & l(u) = c(g, f ). Observe that a regular length function need not be free, conversely freeness does not imply regularity. 2.7 Finitely generated Rn -free groups Guirardel proved the following result that describes the structure of finitely generated Rn -free groups, which is reminiscent of the Bass’ structural theorem for Zn -free groups. This is not by chance, since every Zn -free group is also Rn -free, and ordered abelian groups Zn and Rn have a similar convex subgroup structure. However, it is worth to point out that the original Bass argument for Λ = Z ⊕ Λ0 does not work in the case of Λ = R ⊕ Λ0 . Theorem 19. [48] Let G be a finitely generated, freely indecomposable Rn -free group. Then G can be represented as the fundamental group of a finite graph of groups, where edge groups are cyclic and each vertex group is a finitely generated Rn−1 -free. In fact, there is a more detailed version of this result, Theorem 7.2 in [48], which is rather technical, but gives more for applications. Observe also that neither Theorem 19 nor the more detailed version of it, does not “characterize” finitely generated Rn -free groups, i.e. the converse of the theorem does not hold. Nevertheless, the result is very powerful and gives several important corollaries. Corollary 1. [48] Every finitely generated Rn -free group is finitely presented. This comes from Theorem 19 and elementary properties of free constructions by induction on n. Theorem 19 and the Combination Theorem for relatively hyperbolic groups proved by Dahmani in [27] imply the following. 18 Corollary 2. Every finitely generated Rn -free group is hyperbolic relative to its non-cyclic abelian subgroups. A lot is known about groups which are hyperbolic relative to its maximal abelian subgroups (toral relatively hyperbolic groups), so all of this applies to Rn free groups. We do not mention any of these results here, because we discuss their much more general versions in the next section in the context of Λ-free groups for arbitrary Λ. 3 Finitely presented Λ-free groups In [69] the following main problem of the Alperin-Bass program was solved for finitely presented groups. Problem. Describe finitely presented (finitely generated) Λ-free groups for an arbitrary ordered abelian group Λ. The structure of finitely presented Λ-free groups is going to be described in Section 3.2. 3.1 Regular actions In this section we give a geometric characterization of group actions that come from regular length functions. Let G act on a Λ-tree Γ. The action is regular with respect to x ∈ Γ if for any g, h ∈ G there exists f ∈ G such that [x, f x] = [x, gx] ∩ [x, hx]. The next lemma shows that regular actions exactly correspond to regular length functions (hence the term). Lemma 4. [70] Let G act on a Λ-tree Γ. Then the action of G is regular with respect to x ∈ Γ if and only if the length function ℓx : G → Λ based at x is regular. If the action of G is regular with respect to x ∈ Γ then it is regular with respect to any y ∈ Gx. Lemma 5. [70] Let G act freely on a Λ-tree Γ so that all branch points of Γ are G-equivalent. Then the action of G is regular with respect to any branch point in Γ. Proof. Let x be a branch point in Γ and g, h ∈ G. If g = h then [x, gx]∩[x, hx] = [x, gx] and g is the required element. Suppose g 6= h. Since the action is free then gx 6= hx and we consider the tripod formed by x, gx, hx. Hence, the center of the tripod y is a branch point in Γ and by the assumption there exists f ∈ G such that y = f x. Example 10. Let Γ′ be the Cayley graph of a free group F (x, y) with the basepoint ε. Let Γ be obtained from Γ′ by adding an edge labeled by z 6= x±1 , y ±1 at every vertex of Γ′ . F (x, y) has a natural action on Γ′ which we can extend 19 to the action on Γ. The edge at ε labeled by z has an endpoint not equal to ε and we denote it by ε′ . Observe that the action of F (x, y) on Γ is regular with respect to ε but is not regular with respect to ε′ . 3.2 Structure of finitely presented Λ-free groups A group G is called a regular Λ-free group if it acts freely and regularly on a Λ-tree. We proved the following results. Theorem 20. [69] Any finitely presented regular Λ-free group G can be represented as a union of a finite series of groups G1 < G2 < · · · < Gn = G, where 1. G1 is a free group, 2. Gi+1 is obtained from Gi by finitely many HNN-extensions in which associated subgroups are maximal abelian, finitely generated, and the associated isomorphisms preserve the length induced from Gi . Theorem 21. [69] Any finitely presented Λ-free group can be isometrically embedded into a finitely presented regular Λ-free group. Theorem 22. [69] Any finitely presented Λ-free group G is Rn -free for an appropriate n ∈ N, where Rn is ordered lexicographically. In his book [25] Chiswell (see also [112]) asked the following very important question (Question 1, p. 250): If G is a finitely generated Λ-free group, is G Λ0 -free for some finitely generated abelian ordered group Λ0 ? The following result answers this question in the affirmative in the strongest form. It comes from the proof of Theorem 22 (not the statement of the theorem itself). Theorem 23. [69] Let G be a finitely presented group with a free Lyndon length function l : G → Λ. Then the subgroup Λ0 generated by l(G) in Λ is finitely generated. The following result follows directly from Theorem 20 and Theorem 21 by a simple application of Bass-Serre Theory. Theorem 24. [69] Any finitely presented Λ-free group G can be obtained from free groups by a finite sequence of amalgamated free products and HNN extensions along maximal abelian subgroups, which are free abelian groups of finite rank. The following result concerns abelian subgroups of Λ-free groups. For Λ = Zn it follows from the main structural result for Zn -free groups and [71], for Λ = Rn it was proved in [48]. The statement 1) below answers Question 2 (page 250) from [25] in the affirmative for finitely presented Λ-free groups. 20 Theorem 25. [69] Let G be a finitely presented Λ-free group. Then: 1) every abelian subgroup of G is a free abelian group of finite rank, which is uniformly bounded from above by the rank of the abelianization of G. 2) G has only finitely many conjugacy classes of maximal non-cyclic abelian subgroups, 3) G has a finite classifying space and the cohomological dimension of G is r where r is the maximal rank of an abelian subgroup of G, except if r = 1 when the cohomological dimension of G is 1 or 2. Theorem 26. [69] Every finitely presented Λ-free group is hyperbolic relative to its non-cyclic abelian subgroups. This follows from the structural Theorem 20 and the Combination Theorem for relatively hyperbolic groups [27]. The following results answers affirmatively the strongest form of the Problem (GO3) from the Magnus list of open problems [11], in the case of finitely presented groups. Corollary 3. Every finitely presented Λ-free group is biautomatic. Proof. This follows from Theorem 26 and Rebbecchi’s result [116]. Definition 1. A hierarchy for a group G is a way to construct it starting with trivial groups by repeatedly taking amalgamated products A ∗C B and HN N extensions A∗C t =D whose vertex groups have shorter length hierarchies. The hierarchy is quasi convex if the amalgamated subgroup C is a finitely generated subgroup that embeds by a quasi-isometric embedding, and if C is malnormal in A ∗c B or A∗C t =D . Theorem 27. Every finitely presented Λ-free group G has a quasi-convex hierarchy with abelian edge groups. Theorem 28. [134] Suppose G is toral relatively hyperbolic and has a malnormal quasi convex hierarchy. Then G is virtually special (therefore has a finite index subgroup that is a subgroup of a right angled Artin group (RAAG)). As a corollary one gets the following result. Corollary 4. Every finitely presented Λ-free group G is locally undistorted, that is, every finitely generated subgroup of G is quasi-isometrically embedded into G. Corollary 5. Every finitely presented Λ-free group G is virtually special, that is, some subgroup of finite index in G embeds into a right-angled Artin group. The following result answers in the affirmative to Question 3 (page 250) from [25] in the case of finitely presented groups. 21 Theorem 29. [69] Every finitely presented Λ-free group is right orderable and virtually orderable. Since right-angled Artin groups are linear and the class of linear groups is closed under finite extension we get the following Theorem 30. Every finitely presented Λ-free group is linear and, therefore, residually finite, equationally noetherian. It also has decidable word, conjugacy, subgroup membership, and diophantine problems. Indeed, decidability of equations follows from [27]. Results of Dahmani and Groves [28] imply the following two corollaries. Corollary 6. Let G be a finitely presented Λ-free group. Then: • G has a non-trivial abelian splitting and one can find such a splitting effectively, • G has a non-trivial abelian JSJ-decomposition and one can find such a decomposition effectively. Corollary 7. The isomorphism problem is decidable in the class of finitely presented Λ-free groups. 3.3 Limit groups Limit groups (or finitely generated fully residually free groups) play an important part in modern group theory. They appear in many different situations: in combinatorial group theory as groups discriminated by G (ω-residually G-groups or fully residually G-groups) [8, 9, 91, 7, 10], in the algebraic geometry over groups as the coordinate groups of irreducible varieties over G [7, 57, 58, 60, 120], groups universally equivalent to G [112, 44, 91], limit groups of G in the Gromov-Hausdorff topology [24], in the theory of equations in groups [79, 109, 111, 57, 58, 60, 45], in group actions [15, 37, 93, 46, 48], in the solutions of Tarski problems [62, 122], etc. Their numerous characterizations connect group theory, topology and logic. Recall, that a group G is called fully residually free if for any non-trivial g1 , . . . , gn ∈ G there exists a homomorphism φ of G into a free group such that φ(g1 ), . . . , φ(gn ) are non-trivial. It is a crucial result that every limit group admits a free action on a Zn -tree for an appropriate n ∈ N, where Zn is ordered lexicographically (see [58]). The proof comes in several steps. The initial breakthrough is due to Lyndon, who introduced a construction of the free Z[t]-completion F Z[t] of a free group F (nowadays it is called Lyndon’s free Z[t]-group) and showed that this group, as well as all its subgroups, is fully residually free [79]. Much later Remeslennikov proved that every finitely generated fully residually free group has a free Lyndon length function with values in Zn (but not necessarily ordered lexicographically) [112]. That was a first link between limit groups and free actions on Zn -trees. In 1995 Myasnikov and Remeslennikov showed that Lyndon free exponential group 22 F Z[t] has a free Lyndon length function with values in Zn with lexicographical ordering [97] and stated a conjecture that every limit group embeds into F Z[t] . Finally, Kharlampovich and Myasnikov proved that every limit group G embeds into F Z[t] [58]. Below, following [93] we construct a free Z[t]-valued length function on F Z[t] which combined with the result of Kharlampovich and Myasnikov mentioned above gives a free Zn -valued length function on a given limit group G. There are various algorithmic applications of these results which are based on the technique of infinite words and Stallings foldings techniques for subgroups of F Z[t] (see [63, 69]). 3.4 Lyndon’s free group F Z[t] Let A be an associative unitary ring. A group G is termed an A-group if it is equipped with a function (exponentiation) G × A → G: (g, α) → g α satisfying the following conditions for arbitrary g, h ∈ G and α, β ∈ A: (Exp1) g 1 = g, g α+β = g α g β , g αβ = (g α )β , (Exp2) g −1 hα g = (g −1 hg)α , (Exp3) if g and h commute, then (gh)α = g α hα . The axioms (Exp1) and (Exp2) were introduced originally by R. Lyndon in [79], the axiom (Exp3) was added later in [98]. A homomorphism φ : G → H between two A-groups is termed an A-homomorphism if φ(g α ) = φ(g)α for every g ∈ G and α ∈ A. It is not hard to prove (see, [98]) that for every group G there exists an A-group H (which is unique up to an A-isomorphism) and a homomorphism µ : G −→ H such that for every A-group K and every A-homomorphism θ : G −→ K, there exists a unique A-homomorphism φ : H −→ K such that φµ = θ. We denote H by GA and call it the A-completion of G. In [92] an effective construction of F Z[t] was given in terms of extensions of centralizers. For a group G let S = {Ci | i ∈ I} be a set of representatives of conjugacy classes of proper cyclic centralizers in G, that is, every proper cyclic centralizer in G is conjugate to one from S, and no two centralizers from S are conjugate. Then the HNN-extension H = h G, si,j (i ∈ I, j ∈ N) | [si,j , ui ] = [si,j , si,k ] = 1 (ui ∈ Ci , i ∈ I, j, k ∈ N) i, is termed an extension of cyclic centralizers in G. Now the group F Z[t] is isomorphic to the direct limit of the following infinite chain of groups: F = G0 < G1 < · · · < Gn < · · · < · · · , where Gi+1 is obtained from Gi by extension of all cyclic centralizers in Gi . 23 (2) 3.5 Limit groups embed into F Z[t] The following results illustrate the connection of limit groups and finitely generated subgroups of F Z[t] . Theorem 31. [58] Given a finite presentation of a finitely generated fully residually free group G one can effectively construct an embedding φ : G → F Z[t] (by specifying the images of the generators of G). Combining Theorem 31 with the result on the representation of F Z[t] as a union of a sequence of extensions of centralizers one can get the following theorem. Theorem 32. [60] Given a finite presentation of a finitely generated fully residually free group G one can effectively construct a finite sequence of extensions of centralizers F < G1 < · · · < Gn , where Gi+1 is an extension of the centralizer of some element ui ∈ Gi by an infinite cyclic group Z, and an embedding ψ ∗ : G → Gn (by specifying the images of the generators of G). Now Theorem 32 implies the following important corollaries. Corollary 8. [60] For every freely indecomposable non-abelian finitely generated fully residually free group one can effectively find a non-trivial splitting (as an amalgamated product or HNN extension) over a cyclic subgroup. Corollary 9. [60] Every finitely generated fully residually free group is finitely presented. There is an algorithm that, given a presentation of a finitely generated fully residually free group G and generators of the subgroup H, finds a finite presentation for H. Corollary 10. [60] Every finitely generated residually free group G is a subgroup of a direct product of finitely many fully residually free groups; hence, G is embeddable into F Z[t] × · · · × F Z[t] . If G is given as a coordinate group of a finite system of equations, then this embedding can be found effectively. Let K be an HNN-extension of a group G with associated subgroups A and B. Then K is called a separated HNN-extension if for any g ∈ G, Ag ∩ B = 1. Corollary 11. [60] Let a group G be obtained from a free group F by finitely many centralizer extensions. Then every finitely generated subgroup H of G can be obtained from free abelian groups of finite rank by finitely many operations of the following type: free products, free products with abelian amalgamated subgroups at least one of which is a maximal abelian subgroup in its factor, free extensions of centralizers, separated HNN-extensions with abelian associated subgroups at least one of which is maximal. Corollary 12. [60, 47] One can enumerate all finite presentations of finitely generated fully residually free groups. Corollary 13. [58] Every finitely generated fully residually free group acts freely on some Zn -tree with lexicographic order for a suitable n. 24 3.6 Description of Zn -free groups Given two Z[t]-free groups G1 , G2 (with free Lyndon lengths functions ℓ1 and ℓ2 ) and maximal abelian subgroups A 6 G1 , B 6 G2 such that (a) A and B are cyclically reduced, (b) there exists an isomorphism φ : A → B such that ℓ2 (φ(a)) = ℓ1 (a) for any a ∈ A. Then we call the amalgamated free product φ hG1 , G2 | A = Bi the length-preserving amalgam of G1 and G2 . Given a Z[t]-free group H and non-conjugate maximal abelian subgroups A, B 6 H such that (a) A and B are cyclically reduced, (b) there exists an isomorphism φ : A → B such that ℓ(φ(a)) = ℓ(a) and a is not conjugate to φ(a)−1 in H for any a ∈ A. Then we call the HNN extension hH, t | t−1 At = Bi the length-preserving separated HNN extension of H. We now get the description of regular Zn -free groups in the following form. Theorem 33. [63] A finitely generated group G is regular Zn -free if and only if it can be obtained from free groups by finitely many length-preserving separated HNN extensions and centralizer extensions. Theorem 34. [69] A finitely generated group G is Zn -free if and only if it can be obtained from free groups by a finite sequence of length-preserving amalgams, length-preserving separated HNN extensions, and centralizer extensions. Using this description it was proved in [18] that Zn -free groups are CAT (0). 4 4.1 Products of trees Lattices from square complexes Lattices in products of trees provide examples for many interesting group theoretic properties, for example there are finitely presented infinite simple groups [19], [108] and many are not residually finite [133]. For a great survey of results of Burger, Mozes, Zimmer on simple infinite groups acting on products of trees see [90]. 25 Torsion free lattices that are acting simply transitively on the vertices of the product of trees (not interchanging the factors) are fundamental groups of square complexes with just one vertex, a complete bipartite link and a VHstructure. There are many of such lattices, see [127] for a mass formula, but very rarely these lattices arise from an arithmetic context. The main purpose of this chapter is to concentrate on the arithmetic case, mentioning other cases as well as a mass formula for the relevant square complexes. In this section we give a quick introduction to the geometry of square complexes and fix the terminology. 4.1.1 Square complexes and products of trees A square complex S is a 2-dimensional combinatorial cell complex: its 1-skeleton consists of a graph S 1 = (V (S), E(S)) with set of vertices V (S), and set of oriented edges E(S). The 2-cells of the square complex come from a set of squares S(S) that are combinatorially glued to the graph S 1 as explained below. Reversing the orientation of an edge e ∈ E(S) is written as e 7→ e−1 and the set of unoriented edges is the quotient set E(S) = E(S)/(e ∼ e−1 ). More precisely, a square  is described by an equivalence class of 4-tuples of oriented edges ei ∈ E(S)  = (e1 , e2 , e3 , e4 ) where the origin of ei+1 is the terminus of ei (with i modulo 4). Such 4-tuples describe the same square if and only if they belong to the same orbit under the dihedral action generated by cyclically permuting the edges ei and by the reverse orientation map −1 −1 −1 (e1 , e2 , e3 , e4 ) 7→ (e−1 4 , e3 , e2 , e1 ). We think of a square shaped 2-cell glued to the (topological realization of the) respective edges of the graph S 1 . For more details on square complexes we refer for example to [20]. Examples for square complexes are given by products of trees. Remark 1. We note, that in our definition of a square complex each square is determined by its boundary. The group actions considered in the present survey are related only to such complexes. Let Tn denote the n-valent tree. The product of trees M = Tm × Tn is a Euclidean building of rank 2 and a square complex. Here we are interested in lattices, i.e., groups Γ acting discretely and cocompactly on M respecting 26 the structure of square complexes. The quotient S = Γ\M is a finite square complex, typically with orbifold structure coming from the stabilizers of cells. We are especially interested in the case where Γ is torsion free and acts simply transitively on the set of vertices of M . These yield the smallest quotients S without non-trivial orbifold structure. Since M is a CAT(0) space, any finite group stabilizes a cell of M by the Bruhat–Tits fixed point lemma. Moreover, the stabilizer of a cell is pro-finite, hence compact, so that a discrete group Γ acts with trivial stabilizers on M if and only if Γ is torsion free. Let S be a square complex. For x ∈ V (S), let E(x) denote the set of oriented edges originating in x. The link at the vertex x in S is the (undirected multi-)graph Lk x whose set of vertices is E(x) and whose set of edges in Lk x joining vertices a, b ∈ E(x) are given by corners γ of squares in S containing the respective edges of S, see [20]. A covering space of a square complex admits a natural structure as a square complex such that the covering map preserves the combinatorial structure. In this way, a connected square complex admits a universal covering space. Proposition 2. The universal cover of a finite connected square complex is a product of trees if and only if the link Lk x at each vertex x is a complete bipartite graph. Proof. This is well known and follows, for example, from [3] Theorem C. 4.1.2 VH-structure A vertical/horizontal structure, in short a VH-structure, on a square complex S consists of a bipartite structure E(S) = Ev ⊔ Eh on the set of unoriented edges of S such that for every vertex x ∈ S the link Lk x at x is the complete bipartite graph on the induced partition of E(x) = E(x)v ⊔ E(x)h . Edges in Ev (resp. in Eh ) are called vertical (resp. horizontal) edges. See [133] for general facts on VH-structures. The partition size of the VH-structure is the function V (S) → N × N on the set of vertices x 7→ (#E(x)v , #E(x)h ) or just the corresponding tuple of integers if the function is constant. Here #(−) denotes the cardinality of a finite set. We record the following basic fact, see [20] after Proposition 1.1: Proposition 3. Let S be a square complex. The following are equivalent. 1. The universal cover of S is a product of trees Tm × Tn and the group of covering transformations does not interchange the factors. 2. There is a VH-structure on S of constant partition size (m, n).  Corollary 14. Torsion free cocompact lattices Γ in Aut(Tm ) × Aut(Tn ) not interchanging the factors and up to conjugation correspond uniquely to finite square complexes with a VH-structure of partition size (m, n) up to isomorphism. 27 Proof. A lattice Γ yields a finite square complex S = Γ\Tm × Tn of the desired type. Conversely, a finite square complex S with VH-structure of constant partition size (m, n) has universal covering space M = Tm ×Tn by Proposition 3, and the choice of a base point vertex x̃ ∈ M above the vertex x ∈ S identifies π1 (S, x) with the lattice Γ = Aut(M/S) ⊆ Aut(Tm ) × Aut(Tn ). The lattice depends on the chosen base points only up to conjugation. Simply transitive torsion free lattices not interchanging the factors as in Corollary 14 correspond to square complexes with only one vertex and a VHstructure, necessarily of constant partition size. These will be studied in the next section. 4.1.3 1-vertex square complexes Let S be a square complex with just one vertex x ∈ S and a VH-structure E(S) = Ev ⊔ Eh . Passing from the origin to the terminus of an oriented edge induces a fixed point free involution on E(x)v and on E(x)h . Therefore the partition size is necessarily a tuple of even integers. Definition 2. A vertical/horizontal structure, in short VH-structure, in a group G is an ordered pair (A, B) of finite subsets A, B ⊆ G such that the following holds. 1. Taking inverses induces fixed point free involutions on A and B. 2. The union A ∪ B generates G. 3. The product sets AB and BA have size #A · #B and AB = BA. 4. The sets AB and BA do not contain 2-torsion. The tuple (#A, #B) is called the valency vector of the VH-structure in G. Similar as in [20] §6.1, starting from a VH-structure the following construction (A, B) SA,B (3) yields a square complex SA,B with one vertex and VH-structure starting from a VH-structure (A, B) in a group G. The vertex set V (SA,B ) contains just one vertex x. The set of oriented edges of SA,B is the disjoint union E(SA,B ) = A ⊔ B with the orientation reversion map given by e 7→ e−1 . Since A and B are preserved under taking inverses, there is a natural vertical/horizontal structure such that E(x)h = A and E(x)v = B. The squares of SA,B are constructed as follows. Every relation in G ab = b′ a′ (4) with a, a′ ∈ A and b, b′ ∈ B (not necessarily distinct) gives rise to a 4-tuple (a, b, a′−1 , b′−1 ). 28 The following relations are equivalent to (4) a′ b−1 a−1 b′ = = b′−1 a, ba′−1 , a′−1 b′−1 = b−1 a−1 . and we consider the four 4-tuples so obtained (a, b, a′−1 , b′−1 ), (a′ , b−1 , a−1 , b′ ), (a−1 , b′ , a′ , b−1 ), (a′−1 , b′−1 , a, b) as equivalent. A square  of SA,B consists of an equivalence class of such 4-tuples arising from a relation of the form (4). Lemma 6. The link Lk x of SA,B in x is the complete bipartite graph LA,B with vertical vertices labelled by A and horizontal vertices labelled by B. Proof. By 3 of Definition 2 every pair (a, b) ∈ A × B occurs on the left hand side in a relation of the form (4) and therefore the link Lk x contains LA,B . If (4) holds, then the set of left hand sides of equivalent relations {ab, a′ b−1 , a−1 b′ , a′−1 b′−1 } is a set of cardinality 4, because A and B and AB do not contain 2-torsion by Definition 2 1 + 4 and the right hand sides of the equations are unique by Definition 2 3. Therefore SA,B only contains (#A · #B)/4 squares. It follows that Lk x has at most as many edges as LA,B , and, since it contains LA,B , must agree with it. Definition 3. We will call the complex SA,B a (#A, #B)-complex, keeping in mind, that there are many complexes with the same valency vector. Also, if a group is a fundamental group of a (#A, #B)-complex, we will call it a (#A, #B)-group. 4.2 Mass formula for one vertex square complexes with VH-structure In this section we present a mass formula for the number of one vertex square complexes with VH-structure up to isomorphism where each square complex is counted with the inverse order of its group of automorphisms as its weight [127]. Let A (resp. B) be a set with fixed point free involution of size 2m (resp. 2n). In order to count one vertex square complexes S with VH-structure with vertical/horizontal partition A ⊔ B of oriented edges we introduce the generic matrix X = (xab )a∈A,b∈B with rows indexed by A and columns indexed by B and with (a, b)-entry a formal variable xab . Let X t be the transpose of X, let τA (resp. τB ) be the permutation matrix for e 7→ e−1 for A (resp. B). For a square  we set Y xe x = e∈ 29 where the product ranges over the edges e = (a, b) in the link of S originating from  and xe = xab . Then the sum of the x , when  ranges over all possible squares with edges from A ⊔ B, reads X  x = 2 1 tr (τA XτB X t ), 4 and the number of one vertex square complexes S with VH-structure of partition size (2m, 2n) and edges labelled by A and B is given by  mn  1 1 ∂ 4mn t 2 g Q BMm,n = · tr (τA XτB X ) . (5) (mn)! 4 a,b ∂xab Note that this is a constant polynomial. We can turn this into a mass formula for the number of one vertex square complexes with VH-structure up to isomorphism where each square complex is counted with the inverse order of its group of automorphisms as its weight. We simply need to divide by the order of the universal relabelling #(Aut(A, τA ) × Aut(B, τB )) = 2n (n)! · 2m (m)!. Hence the mass of one vertex square complexes with VH-structure is given by BMm,n =  mn ∂ 4mn  1 t 2 Q ) tr (τ Xτ X . (6) · A B 2n+m+2nm (n)! · (m)! · (mn)! a,b ∂xab g m,n for small values The formula (5) reproduces the numerical values of BM (2m, 2n) that were computed by Rattaggi in [107] table B.3. Here small means mn ≤ 10. 4.3 Arithmetic groups acting on products of two trees There is a deep connection between arithmetic lattices in products of trees and quaternion algebras. For background on quaternion algebras see [131]. For any ring R we consider the R-algebra H(R) = {a = a0 + a1 i + a2 j + a3 k; a1 , a2 , a3 , a4 ∈ R}, with R-linear multiplication given by ij = k = −ji, i2 = j2 = −1. An example of such an algebra are classical Hamiltonian quaternions H(R). Recall, that the (reduced) norm is a homomorphism | · | : H(R)× → R× , ||a|| = a20 + a21 + a22 + a23 . Let H(Z) be the integer quaternions. Let Sp be the set of integer quaternions a = a0 + a1 i + a2 j + a3 k ∈ H(Z) 30 with a0 > 0, a0 odd, and |a|2 = p, so the reduced norm of a is p. Then, by a result of Jacobi, #Sp = p + 1. If p ≡ 1(mod 4) is prime, then x2 ≡ −1(mod p) has a solution in Z, so, by Hensel’s Lemma, x2 = −1 has a solution ip in Qp , where Qp is the field of p-adic numbers. Define the following homomorphism 1 ψp : H(Z[ ])× → P GL2 (Qp ). p by ψp (a) =  a0 + a1 i p −a2 + a3 ip a2 + a3 i p a0 − a1 i p  Theorem 35 ([76]). ψp (Sp ) contains p + 1 elements and generates the free group Γp of rank (p + 1)/2. Γp acts freely and transitively on the vertices of the (p+1)-regular tree Tp+1 . ψp,l : H(Z[ 1 × ]) → P GL2 (Qp ) × P GL2 (Ql ). pl by ψp,l (a) =  a0 + a1 i p −a2 + a3 ip   a2 + a3 i p a0 + a1 i l , a0 − a1 i p −a2 + a3 il a2 + a3 i l a0 − a1 i l  , where a = a0 + a1 i + a2 j + a3 k ∈ H(Z), p, l ≡ 1(mod 4) are two distinct primes and ip ∈ Qp , il ∈ Ql satisfy the conditions i2p + 1 = 0 and i2l + 1 = 0, as above. Let Sp be as above and Sl be the set of integer quaternions a = a0 + a1 i + a2 j + a3 k ∈ H(Z[ 1 ]) pl with a0 > 0, a0 odd, and |a|2 = l. Then Sl = l + 1. Let Γp,l be the subgroup of P GL2 (Qp ) × P GL2 (Ql ) generated by ψ(Sp ∪ Sl ). Mozes has proved the following result: Theorem 36 ([89]). If p, l ≡ 1(mod 4) are two distinct prime numbers, then Γp,l < P GL2 (Qp ) × P GL2 (Ql ) < Aut(Tp+1 ) × Aut(Tl+1 ) is a (p + 1, l + 1)-group (see definition 3 above). 31 Rattaggi [107] extended this construction to primes p ≡ 3(mod 4) using solutions in Z of x2 + y 2 ≡ −1(mod p). Note, that the constructions of Mozes and Rattaggi can not be extended for products of trees of the same valency. However, some applications of arithmetic lattices, like constructions of fake quadrics in algebraic geometry, do require arithmetic lattices acting on products of trees of the same valency, see [127] for more detailed motivation. Now we describe arithmetic lattices acting simply transitively on products of trees of the same valency. They turn out to be related to quaternion algebras in finite characteristic and are arithmetic lattices in PGL2 (Fq ((t))) × PGL2 (Fq ((t))). Let D be a quaternion algebra over a global function field K/Fq of a smooth curve over Fq . Let S consist of the ramified places of D together with two distinct unramified Fq -rational places τ and ∞. An S-arithmetic subgroup Γ of the projective linear group G = P GL1,D of D acts as a cocompact lattice on the product of trees Tq+1 × Tq+1 that are the Bruhat–Tits buildings for G locally at τ and ∞. There are plenty of such arithmetic lattices, however, in general the action of Γ on the set of vertices will not be simply transitive. Let q be an odd prime power and let c ∈ F∗q be a non-square. Consider the Fq [t]-algebra with non-commuting variables Z, F B = Fq [t]{Z, F }/(Z 2 = c, F 2 = t(t − 1), ZF = −F Z), an Fq [t]-order in the quaternion algebra D = B ⊗ Fq (t) over Fq (t) ramified in t = 0, 1. Let G = P GL1,B be the algebraic group over Fq [t] of units in B modulo the center. The following results give first examples of lattices acting on products of trees in finite characteristic. Theorem 37 ([127]). Let q be an odd prime power, and choose a generator δ of the cyclic group F∗q2 . Let τ 6= 1 be an element of F∗q , and ζ ∈ F∗q2 be an element with norm ζ 1+q = (τ − 1)/τ . Let G/Fq [t] be the algebraic group of G. 1 The irreducible arithmetic lattice G(Fq [t, t(t−τ ) ]) has the following presentation: 1 ]) G(Fq [t, t(t − τ ) ≃ * d, a, b + dq+1 = a2 = b2 = 1 (di ad−i )(dj bd−j ) = (dl bd−l )(dk ad−k ) , for all 0 ≤ i, l ≤ q and j, k determined by (⋆) where (⋆) is the system of equations in the quotient group F∗q2 /F∗q 1 ) · δ (q+1)/2 . δ j−l = (1 − ζδ (i−l)(1−q) ) · δ (q+1)/2 and δ k−i = (1 − ζδ(i−l)(1−q) We are now prepared to establish presentations for the arithmetic lattices with VH-structures in finite characteristic. Theorem 38 ([127]). Let 1 6= τ ∈ F∗q , let c ∈ F∗q be a non-square and let Fq [Z]/Fq be the quadratic field extension with Z 2 = c. The group Γτ is a 32 torsion free arithmetic lattice in G with finite presentation Γτ = * aξ a−ξ = 1, bη b−η = 1 aξ , bη for ξ, η ∈ Fq [Z] with N (ξ) = −c and N (η) = cτ 1−τ and aξ bη = bλ aµ if in Fq [Z] : η = λq (λ + ξ)1−q and µ = ξ q (ξ + λ)1−q + which acts simply transitively via the Bruhat Tits action on the vertices of Tq+1 × Tq+1 , so the Γτ groups are (q + 1, q + 1)-groups. Corollary 15 ([127]). The number of commensurability classes of arithmetic lattices acting simply transitively on a product of two trees grows at least linearly on q. The following group is the smallest example of a torsion free arithmetic lattice acting on a product of two trees. Γ2 = g 0 , g 1 , g 2 , g 3 g0 g1−1 = g1 g2 , g0 g3−1 = g3 g2−1 , g0 g3 = g1−1 g0−1 , g2 g3 = g1 g2−1 where, in the notation of Theorem 37 with a generator δ of the cyclic group F3 [Z]× , we have gi = aδi for i even and gi = bδi for i odd. 4.4 Fibered products of square complexes The fibered product of two 1-vertex square complexes was defined in [20] in the following way: Let 1-vertex square complex X be given by the data: A1, A2 and S ⊂ A1 × A2×A1×A2 then the fibered product Y is defined by the data: A1×A1, A2×A2 and R = {((a1, a2), (b1, b2), (a1′, a2′ ), (b1′ , b2′ )) : (ai, bi, ai′, bi′ ) ∈ S, i = 1, 2}. It was shown in [21] that if the fundamental group of X is just infinite (no proper normal subgroups of infinite index), then the fundamental group of Y is not residually finite. This result creates a machinery to construct many non-residually finite groups using arithmetic lattices. In particular, all families of arithmetic groups from the previous section generate families of non-residually finite groups. 5 5.1 Lattices in products of n ≥ 3 trees Arithmetic higher-dimensional lattices Similar to products of two trees, there are many arithmetics lattices in products of n ≥ 3 trees, see, for example, [55], but it is difficult to get simply transitive actions. We start with the following example of a group acting simply transitively on a product of three trees, with 9 generators and 26 relations. G = {a1, a2, b1, b2, b3, c1, c2, c3, c4|a1 ∗ b1 ∗ a2 ∗ b2, a1 ∗ b2 ∗ a2 ∗ b1−1 , a1 ∗ b3 ∗ a2−1 ∗ b1, a1 ∗ b3−1 ∗ a1 ∗ b2−1 , a1 ∗ b1−1 ∗ a2−1 ∗ b3, a2 ∗ b3 ∗ a2 ∗ b2−1 , a1 ∗ 33 c1 ∗ a2−1 ∗ c2−1 , a1 ∗ c2 ∗ a1−1 ∗ c3, a1 ∗ c3 ∗ a2−1 ∗ c4−1 , a1 ∗ c4 ∗ a1 ∗ c1−1 , a1 ∗ c4−1 ∗ a2 ∗ c2, a1 ∗ c3−1 ∗ a2 ∗ c1, a2 ∗ c3 ∗ a2 ∗ c2−1 , a2 ∗ c4 ∗ a2−1 ∗ c1, c1 ∗ b1 ∗ c3 ∗ b3−1 , c1 ∗ b2 ∗ c4 ∗ b2−1 , c1 ∗ b3 ∗ c4−1 ∗ b2, c1 ∗ b3−1 ∗ c4 ∗ b3, c1 ∗ b2−1 ∗ c2 ∗ b1, c1 ∗ b1−1 ∗ c4 ∗ b1−1 , c2 ∗ b2 ∗ c3−1 ∗ b3−1 , c2 ∗ b3 ∗ c4 ∗ b1, c2 ∗ b3−1 ∗ c3 ∗ b3, c2 ∗ b2−1 ∗ c3 ∗ b2, c2 ∗ b1−1 ∗ c3 ∗ b1−1 , c3 ∗ b1 ∗ c4 ∗ b2}. The group G is an arithmetic lattice acting simply transitively on a product of three trees, and a particular case of a n-dimensional construction of arithmetic lattices, described below. Theorem 39 ([128]). If p1 , ..., pn are n distinct prime numbers, then there is an arithmetic lattice Γp1 ,...,pn < P GL2 (Qp1 ) × ... × P GL2 (Qpn ) < Aut(Tp1 +1 ) × ... × Aut(Tpn +1 ) acting simply transitively on the product of n trees. Proof. The group of S-integral quaternions (in the example above S = {3, 5, 7}), let’s say with n equals the cardinality of S, should have the following structure: there are sets of generators Sp for every p ∈ S and relations of type ab = b′ a′ for every pair of distinct primes p, ℓ ∈ S with a, a′ ∈ Sp and b, b′ ∈ Sℓ . That’s because for every subset T ⊆ S the T -integral quaternions form a subgroup of the S-integral ones. By work of Mozes [89] and Rattaggi [107] we know that Sp ∪ Sℓ generates the {p, ℓ}-integral quaternions and that it acts simply transitively on vertices of a product of trees Tp+1 × Tℓ+1 . We denote this group Γp,l for future references. Since these quaternions are integral at all other primes, this subgroup fixes the standard vertex of the (Bruhat-Tits)-tree for that component. This means that the group generated by all the Sp ’s for p ∈ S will map the standard vertex to all its neighbours, hence by homogeneity and connectedness the action is simply transitive on vertices also on the product Tp1 × ... × Tpn where S = {p1 , ..., pn }. We then may conclude that the action is simple transitive on vertices. This identifies the arithmetic group with the combinatorial fundamental group of the cube complex, whose π1 is generated by edges (these are the Sp ’s for direction ”p”) and relations all come from the 2-dim cells, hence the squares, all of which are also squares in one of the subgroups with just two primes. Because we know all squares for these subgroups, we know all relations for the S-integral quaternions. These relations give the relations for the group Γp1 ,...,pn . In the example above, the group G, acting on a product of three trees has three 2-dimensional subgroups Γ3,5 , Γ5,7 , Γ3,7 . Another example of a group acting cocompactly on a product of more than two trees is the lattice of Glasner-Mozes [38], its construction is inspired by Mumford’s fake projective plane. 5.2 Non-residually finite higher-dimensional lattices We give an elementary construction of a family of non-residually finite groups acting simply transitively on products of n ≥ 3 trees (for more details see [128]). 34 Theorem 40 ([128]). There exist a family of non-residually finite groups acting simply transitively on a product of n ≥ 3 trees. Proof. This is just a sketch. We start with an arithmetic lattice Γ acting simply transitively on a product of n trees. There are n 2-dimensional groups induced by Γ in a unique way. For each of them we apply the fibered product construction and take the union of all generators and relations of each fibered product. The resulting group is non-residually finite by [21]. 6 Open problems We will mention here some open problems and conjectures. Λ-free groups. Conjecture 1. [69] Every finitely generated Λ-free group is finitely presented. This would imply that all finitely generated Λ-free groups are Rn -free. Problem 1. [69] Is any finitely presented Λ-free group G also Zk -free for an appropriate k ∈ N and lexicographically ordered Zk ? Arithmetic groups. Conjecture 2. (Caprace) The number of non-commensurable arithmetic lattices acting simply transitively on product of two trees is bounded polymonially on q. Problem 2. What is the structure and properties of groups acting on products of three and more trees. References [1] R. Alperin and H. Bass, Length functions of group actions on Λ-trees. Combinatorial group theory and topology, (Ed. S. M. Gersten and J. R. Stallings), Annals of Math. Studies 111, 265–378. Princeton University Press, 1987. [2] R. Alperin and K. Moss, Complete trees for groups with a real length function. J. London Math. Soc. (2) 31, 1985, 55–68. [3] W. Ballmann and M. Brin, Orbihedra of nonpositive curvature, Inst. Hautes Études Sci. Publ. Math. No. 82 (1995), 169-209. [4] H. Bass Groups acting on non–archimedian trees. Arboreal group theory, 1991, 69–130. [5] H. Bass, and R. Kulkarni. Uniform tree lattices. Journal of the American Mathematical Society, vol. 3 (1990), no. 4, pp. 843-902. 35 [6] H. Bass, A. Lubotzky, Tree lattices. Springer Science and Business Media, 2001. [7] G.Baumslag, A.Myasnikov, V.Remeslennikov. Algebraic geometry over groups I. Algebraic sets and ideal theory. Journal of Algebra, 1999, v.219, 16–79. [8] B. Baumslag, Residually free groups, Proc. London Math. Soc. 17(3) (1967) 402–418. [9] G. Baumslag, On generalized free products, Math. Z. 7(8) (1962) 423–438. [10] G. Baumslag, A. G. Miasnikov and V. Remeslennikov, Discriminating completions of hyperbolic groups, Geom. Dedicata 92 (2002) 115–143. [11] G. Baumslag, A. G. Miasnikov, V. Shpilrain, Open problems in combinatorial group theory. Second Edition. In Combinatorial and geometric group theory, volume 296 of Contemporary Mathematics, pages 1-38. American Mathematical Society, 2002. [12] V. Berestovskii and C. Plaut, Covering R-trees, R-free groups, and dendrites, Preprint, Available at http://arXiv.org/abs/0904.3767, 2009. [13] M. Bestvina, Degeneration of the hyperbolic space, Duke Math. J. 56 (1988) 143–161. [14] M. Bestvina, R-trees in topology, geometry, and group theory, in Handbook of Geometric Topology (North-Holland, Amsterdam, 2001), pp. 55–93. [15] M. Bestvina and M. Feighn, Stable actions of groups on real trees. Invent. Math., 121 no. 2 (1995), 287–321. [16] M. Bestvina and M. Feighn. Bounding the complexity of simplicial group actions on trees. Inventiones Mathematicae, vol. 103 (1991), no. 3, pp. 449–469 [17] R. Bryant, The verbal topology of a group, Journal of Algebra, 48:340–346, 1977. [18] I. Bumagin, O. Kharlampovich, Zn -free groups are CAT (0), Journal of the London Mathematical Society, Volume 88, Issue 3, 1 December 2013, Pages 761778. [19] M. Burger, Sh. Mozes, Finitely presented simple groups and products of trees, C. R. Acad. Sci. Paris Sér. I Math. 324 (1997), no. 7, 747–752. [20] M.Burger, Sh. Mozes, Lattices in product of trees, Inst. Hautes Études Sci. Publ. Math. 92 (2000), 151–194. 36 [21] M. Burger, S. Mozes, R. Zimmer, Linear representations and arithmeticity of lattices in products of trees. Essays in geometric group theory, 125, Ramanujan Math. Soc. Lect. Notes Ser., 9, Ramanujan Math. Soc., Mysore, 2009. [22] B. H. Bowditch, Cut points and canonical splittings of hyperbolic groups. Acta Mathematica, vol. 180 (1998), no. 2, pp. 145–186 [23] I. Chiswell, Abstract length functions in groups. Math. Proc. Cambridge Philos. Soc., 80 no. 3 (1976), 451–463. [24] C. Champetier and V. Guiraredel, Limit groups as limits of free groups: Compactifying the set of free groups, Israel J. Math. 146 (2005) 1–75. [25] I. Chiswell, Introduction to Λ-trees. World Scientific, 2001. [26] I. Chiswell and T. Muller, Embedding theorems for tree-free groups. Under consideration for publication in Math. Proc. Camb. Phil. Soc. [27] F. Dahmani. Combination of convergence groups. Geom. Topol., 7:933-963, 2003. [28] F. Dahmani and D. Groves, The Isomorphism Problem for Toral Relatively Hyperbolic Groups. Publ. Math., Inst. Hautes Etudes Sci. 107 no. 1 (2008), 211–290. [29] E. Daniyarova, A. Miasnikov, V. Remeslennikov, Unification theorems in algebraic geometry, Algebra and Discrete Mathematics, 1 (2008), pp. 80112, arXiv:0808.2522v1 [30] C. Drutu and M. Sapir, Tree-graded spaces and asymptotic cones of groups, Topology 44(5) (2005) 959–1058. [31] C. Drutu and M. Sapir, Groups acting on tree-graded spaces and splittings of relatively hyperbolic groups, Adv. Math. 217(3) (2008) 1313–1367. [32] M. J. Dunwoody.The accessibility of finitely presented groups. Inventiones Mathematicae vol. 81 (1985), no. 3, pp. 449–457 [33] T. Delzant. Sur l’accessibilite acylindrique des groupes de presentation finie. Universite de Grenoble. Annales de l’Institut Fourier, vol. 49 (1999), no. 4, pp. 1215–1224 [34] M. J. Dunwoody, and M. E. Sageev, JSJ-splittings for finitely presented groups over slender groups. Inventiones Mathematicae, vol. 135 (1999), no. 1, pp. 25–44. [35] L. van der Dries and J. Wilkie. On Gromovs theorem concerning groups of polynomial growth and elementary logic. J. Algebra, 89: 349-374, 1984. 37 [36] K. Fujiwara, and P. Papasoglu, JSJ-decompositions of finitely presented groups and complexes of groups. Geometric and Functional Analysis, vol. 16 (2006), no. 1, pp. 70–125 [37] D. Gaboriau, G. Levitt and F. Paulin, Pseudogroups of isometries of R and Rips’ Theorem on free actions on R-trees. Israel. J. Math., 87 (1994), 403–428. [38] Y.Glasner, S.Mozes, Automata and square complexes Geom. Dedicata 111 (2005), 4364 [39] A. M.W. Glass, Partially Ordered Groups, Series in Algebra, Vol. 7 (World Scientific, 1999). [40] V. Guba, Equivalence of infinite systems of equations in free groups and semigroups to finite subsystems. Mat. Zametki, 40:321–324, 1986. [41] V. Guirardel, Actions of finitely generated groups on R-trees, Ann. Inst. Fourier (Grenoble) 58(1) (2008) 159–211. [42] V. Guirardel, G. Levitt, Splittings and automorphisms of relatively hyperbolic groups. Groups Geom. Dyn. 9 (2015), no. 2, 599–663. [43] D. Gildenhuys, O.Kharlampovich, and A.Myasnikov, CSA groups and separated free constructions. Bull. Austr. Math. Soc., 1995, 52, 1, pp.63–84. [44] A. Gaglione and D. Spellman, Some model theory of free groups and free algebras, Houston J. Math. 19 (1993) 327–356. [45] D. Groves, Limit groups for relatively hyperbolic groups II: MakaninRazborov diagrams, Geom. Topol. 9 (2005) 2319–2358. [46] [ D. Groves, Limits of (certain) CAT(0) groups, I: Compactification, Alg. Geom. Top. 5 (2005) 1325–1364. [47] D. Groves and H. Wilton, Enumerating limit groups, Groups, Geom. Dynamics 3 (2009) 389–399. [48] V. Guirardel, Limit groups and groups acting freely on Rn -trees. Geom. Topol., 8 (2004), 1427–1470. [49] M. Gromov. Asymptotic invariants of in infinite groups. In Geometric Group Theory II, volume 182 of LMS lecture notes, pages 290-317. Cambridge Univ. Press, 1993. [50] M. Gromov, Hyperbolic groups, in Essays in Group Theory, ed. S. M. Gersten, MSRI Publications, Vol. 8 (Springer, 1987), pp. 75–263. [51] N. Harrison, Real length funtions in groups. Trans. Amer. Math. Soc. 174 (1972), 77–106. 38 [52] A. H. M. Hoare, On length functions and Nielsen methods in free groups. J. London Math. Soc. (2) 14 (1976), 188–192. [53] A. H. M. Hoare, Nielsen method in groups with a length function. Math. Scand. 48 (1981), 153–164. [54] S. Humphries, On representations of Artin groups and the Tits conjecture, J. Algebra 169 (1994), pp. 847-862. [55] B.Jordan, R.Livné, The Ramanujan property of regular cubical complexes, Duke Math.J., v.105,n.1 (2000), pp.85–102. [56] Kourovka Notebook: Unsolved Problems in Group Theory (American Mathematical Society Translations Series 2) by Kourovskaia Tetrad. English, L. Ia Leifman and D. J. Johnson (Aug 1983) [57] O. Kharlampovich and A. Myasnikov. Irreducible affine varieties over a free group. 1: irreducibility of quadratic equations and Nullstellensatz. J. of Algebra, 200:472–516, 1998. MR 2000b:20032a [58] O. Kharlampovich and A. Myasnikov, Irreducible affine varieties over a free group. II: Systems in triangular quasi-quadratic form and description of residually free groups. J. of Algebra, v. 200, no. 2, 517–570, 1998. MR 2000b:20032b [59] O. Kharlampovich and A. Myasnikov. Description of Fully Residually Free Groups and Irreducible Affine Varieties Over a Free Group. Banff Summer School 1996, Center de Recherchers Matematiques, CRM Proceedings and Lecture Notes, v. 17, 1999, p.71-80. MR 99j:20032 571–613. [60] O. Kharlampovich, A. Myasnikov, Implicit function theorems over free groups. J. Algebra, 290 (2005) 1-203. [61] O. Kharlampovich, A. Myasnikov, Effective JSJ decompositions, Group Theory: Algorithms, Languages, Logic, Contemp. Math., AMS, 2004, 87212 (Math GR/0407089). [62] O. Kharlampovich, A. Myasnikov, Elementary theory of free non-abelian groups, J.Algebra, 302, Issue 2, 451-552, 2006. [63] O. Kharlampovich, A. Myasnikov, V. Remeslennikov, D. Serbin. Subgroups of fully residually free groups: algorithmic problems,Group theory, Statistics and Cryptography, Contemp. Math., Amer. Math. Soc., 360, 2004, 61-103. [64] O. Kharlampovich and A. Myasnikov, Definable sets in a hyperbolic group, Intern. J. of Algebra and Computation, 23 (2013) no 1. [65] O. Kharlampovich, A. Myasnikov, Decidability of the elementary theory of a torsion-free hyperbolic group, arXiv:1303.0760. 39 [66] O. Kharlampovich, A. Myasnikov, Limits of relatively hyperbolic groups and Lyndon’s completions, Journal of the European Math. Soc., Volume 14, Issue 3, 2012, pp. 659-680. [67] O. Kharlampovich, A. Myasnikov, Equations and fully residually free groups. Combinatorial and geometric group theory, 203-242, Trends Math., BirkhAuser/Springer Basel AG, Basel, 2010. [68] O. Kharlampovich, J. Macdonald, Effective embedding of residually hyperbolic groups into direct products of extensions of centralizers. J. Group Theory 16 (2013), no. 5, 619650. [69] O. Kharlampovich, A. Myasnikov, D. Serbin, Actions, length functions, and non-archemedian words, IJAC, 23 (2013), 2, 325-455. [70] O. Kharlampovich, A. Myasnikov, V. Remeslennikov and D. Serbin Groups with free regular length functions in Zn . arXiv:0907.2356, Trans. Amer. Math. Soc., 364:2847–2882, 2012. [71] O. Kharlampovich, A. G. Myasnikov, V. N. Remeslennikov, and D. Serbin. Exponential extensions of groups. J. Group Theory, 11(1):119–140, 2008. [72] O. Kharlampovich, A. Myasnikov and D. Serbin, Regular completions of Zn -free groups. Preprint, 2011. [73] V. Kopytov and N. Medvedev, Right-ordered Groups, Siberian School of Algebra and Logic (Consultants Bureau, New York, 1996). [74] Y.S.Liu, Density of the commensurability group of uniform tree lattices. J.of Algebra 165(1994). [75] A. Lubotzky. Tree-lattices and lattices in Lie groups. in ”Combinatorial and geometric group theory (Edinburgh, 1993)”, pp. 217–232, London Mathematical Society Lecture Notes Series, vol. 204, Cambridge University Press, Cambridge, 1995. [76] A.Lubotzky, R.Phillips, P.Sarnak, em Ramanujan graphs, Combinatorica, 8 (1988), no. 3, 261–277. [77] A.Lubotzky, S.Mozes, R.Zimmer, Superrigidity for the commensurability group of tree lattices. Comment.Math.Helv 69(1994), 523-548. [78] R. C. Lyndon, Length functions in groups. Math. Scand. 12 (1963), 209– 234. [79] R. C. Lyndon. Groups with parametric exponents. Soc., 96:518–533, 1960. Trans. Amer. Math. [80] R. C. Lyndon. Equations in free groups. Trans. Amer. Math. Soc. 96 (1960), 445–457. 40 [81] R. Lyndon, Length functions in groups, Math. Scand. 12 (1963) 209–234. [82] A. G. Myasnikov, V. Remeslennikov and D. Serbin, Regular free length functions on Lyndon’s free Z[t]-group FZ[t], in Algorithms, Languages, Logic, Contemporary Mathematics, Vol. 378 (American Mathematical Society, 2005), pp. 37–77. [83] A. Martino and S. O. O. Rourke, Free actions on Zn-trees: A survey, in Geometric Methods in Group Theory, Contemporary Mathematics, Vol. 372 (American Mathematical Society, 2005), pp. 11–25. [84] J. Morgan and P. Shalen, Free actions of surface groups on R-trees, Topology 30(2) (1991) 143–154. [85] G.S. Makanin. Equations in a free group (Russian). Izv. Akad. Nauk SSSR, Ser. Mat., 46:1199–1273, 1982. transl. in Math. USSR Izv., V. 21, 1983; MR 84m:20040. [86] G.S. Makanin. Decidability of the universal and positive theories of a free group Izv. Akad. Nauk SSSR, Ser. Mat., 48(1):735–749, 1985. transl. in Math. USSR Izv., V. 25, 1985; MR 86c:03009. [87] Ju. I. Merzljakov. Positive formulae on free groups. Algebra i Logika, 5(4):25–42, 1966. [88] M.Morgenstern, Existence and explicit constructions of q + 1 regular Ramanujan graphs for every prime power q, J. Combin. Theory Ser. B 62 (1994), no. 1, 44–62. [89] Sh. Mozes, Actions of Cartan subgroups, Israel J. Math. 90 (1995), no. 1–3, 253–294. [90] S.Mozes, Products of trees, lattices and simple groups, Doc.Math., Extra Volume ICM, 1998, II, 571-582. [91] A. G. Myasnikov and V. Remeslennikov, Algebraic geometry over groups II: Logical foundations, J. Algebra 234 (2000) 225–776. [92] A. G. Myasnikov and V. Remeslennikov, Exponential groups II: Extensions of centralizers and tensor completion of CSA-groups, Internat. J. Algebr. Comput. 6(6) (1996) 687–711. [93] A. Myasnikov, V. Remeslennikov, D. Serbin, Fully residually free groups and graphs labeled by infinite words. to appear in IJAC. [94] A. Myasnikov, V. Remeslennikov, Recursive p-adic numbers and elementary theories of finitely generated pro-p-groups, Math USSR Izv, 1988, 30 (3), 577-597. [95] A. Myasnikov, A. Nikolaev, Verbal subgroups of hyperbolic groups have infinite width. J. Lond. Math. Soc. (2) 90 (2014), no. 2, 573591. 41 [96] A. Myasnikov, The structure of models and a criterion for the decidability of complete theories of finite- dimensional algebras. (Russian) Izv. Akad. Nauk SSSR Ser. Mat. 53 (1989), no. 2, 379–397; translation in Math. USSRIzv. 34 (1990), no. 2, 389-407 [97] A. G. Myasnikov and V. Remeslennikov, Length functions on free exponential groups, in Proc. Internat. Conf. Groups in Analysis and Geometry, Omsk (1995), pp. 59–61. [98] A. G. Myasnikov and V. Remeslennikov, Exponential groups I: Foundations of the theory and tensor completion, Siberian Math. J. 35(5) (1994) 1106– 1118. [99] J. Morgan and P. Shalen, Valuations, Trees, and Degenerations of Hyperbolic Structures, I. Annals of Math, 2nd Ser., 120 no. 3. (1984), 401–476. [100] N. Nikolov, D. Segal, On finitely generated profinite groups, I: strong completeness and uniform bounds, Annals of Mathematics, 165 (2007), 171-238. [101] C. Perin, Elementary embeddings in torsion-free hyperbolic groups, Annales Scien- tifiques de lcole Normale Superieure (4), vol. 44 (2011), 631681. [102] C. Perin, Erratum: Elementary embeddings in torsion-free hyperbolic groups, preprint, 2012. [103] D. Promislow, Equivalence classes of length functions on groups. Proc. London Math. Soc (3) 51 (1985), 449–477. [104] F. Paulin, Topologie de Gromov equivariant, structures hyperbolic et arbres reels, Invent. Math. 94 (1988) 53–80. [105] F. Paulin, Outer automorphisms of hyperbolic groups and small actions on R-trees, In Arboreal Group Theory, MSRI Publications, Vol. 19 (Springer, New York, 1991), pp. 331–343. [106] W. Parry, Axioms for translation length functions, in Arboreal Group Theory, MSRI Publications, Vol. 19 (Springer, New York, 1991), pp. 295– 329. [107] D. Rattaggi, Computations in groups acting on a product of trees: normal subgroup structures and quaternion lattices, thesis ETH Zürich, 2004. [108] D.Rattaggi, A finitely presented torsion-free simple group. J. Group Theory 10 (2007), no. 3, 363371. [109] A. Razborov. On systems of equations in a free group. Izvestiya, 25(1):115–162, 1985. 42 Math. USSR, [110] A. Razborov. On systems of equations in a free group. PhD thesis, Steklov Math. Institute, Moscow, 1987. [111] A. Razborov, On systems of equations in a free group, in Combinatorial and Geometric Group Theory (Cambridge University Press, 1995), pp. 269283. [112] V. N. Remeslennikov, ∃-free groups, Siberian Math. J. 30(6) (1989) 998– 1001. [113] A.H. Rhemtulla, A problem of bounded expressability in free products, Proc. Cam- bridge Philos. Soc., 64 (1968), 573–584. [114] L. Ribes, P. Zalesskii, Conjugacy separability of amalgamated free products of groups. J. Algebra, 1996, v.179, 3, pp.751–774. [115] E. Rips, and Z. Sela, Cyclic splittings of finitely presented groups and the canonical JSJ decomposition. Annals of Mathematics (2) vol. 146 (1997), no. 1, pp. 53–109 [116] D. Y. Rebbechi, Algorithmic properties of relatively bolic groups, PhD Thesis, Univ. California, Davis, http://front.math.ucdavis.edu/math.GR/0302245. hyper2001. [117] E. Rips and Z. Sela, Structure and rigidity in hyperbolic groups I, Geom. Funct. Anal. 4 (1994) 337–371. [118] N. Rungtanapirom, Quaternionic Arithmetic Lattices of Rank 2 and a Fake Quadric in Characteristic 2, arXiv:1707.09925 [math.GT]. [119] Z. Sela, Structure and rigidity in (Gromov) hyperbolic groups and discrete groups of rank 1 Lie groups, II, Geom. Funct. Anal. 7 (1997) 561–593. [120] Z. Sela. Diophantine geometry over groups I: Makanin-Razborov diagrams. Publications Mathematiques de l’IHES 93(2001), 31-105, [121] Z. Sela. Diophantine geometry over groups II-V, Israel Journal of Math., 2003-2006. [122] Z. Sela. Diophantine geometry over groups VI: The elementary theory of a free group. GAFA, 16(2006), 707-730. [123] Z. Sela. Acylindrical accessibility for groups. Inventiones Mathematicae, vol. 129 (1997), no. 3, pp. 527–565 [124] P. Scott, and G. Swarup, Regular neighbourhoods and canonical decompositions for groups. Asterisque No. 289 (2003). [125] J.-P. Serre, Trees. New York, Springer, 1980. [126] J.R. Stallings. Finiteness of matrix representation. Ann. Math., 124:337– 346, 1986. 43 [127] J.Stix, A.Vdovina, Simply transitive quaternionic lattices of rank 2 over Fq (t) and a non-classical fake quadric, Mathematical Proceedings of the Cambridge Philosophical Society , DOI: https://doi.org/10.1017/S0305004117000056, Published online: 20 March 2017, pp. 1-46 [128] J.Stix, A.Vdovina, Lattices in products of n ≥ 3 trees and their applications, in preparation. [129] J. Tits, A theorem of Lie-Kolchin for trees, in Contributions to Algebra: A Collection of Papers Dedicated to Ellis Kolchin (Academic Press, New York, 1977). [130] J. Tits, Sur le groupe des automorphismes d’un arbre In A . Haefliger and R. Narasimhan , editors, Essays on Topology and Related Topics (Memoires dedies a Georges de Rham) pages 188-211, Springer, New York, 1970. Wie H Wielandt Subnormal subgroups and p ermutation groups notes Columbus Ohio State Univ [131] M.-F. Vignéras, Arithmétique des algèbres de quaternions, Lecture Notes in Math. 800, Springer, Berlin, 1980. [132] R. Weidmann. The Nielsen method for groups acting on trees. Proceedings of the London Mathematical Society (3), vol. 85 (2002), no. 1, pp. 93–118 [133] D.Wise, Non-positively curved squared complexes: Aperiodic tilings and non-residually finite groups. Thesis (Ph.D.)Princeton University. 1996 [134] D. Wise The structure of groups with a quasiconvex hierarchy, preprint. 44
4math.GR
Distributed Nash Equilibrium Seeking via the Alternating Direction Method of Multipliers Farzad Salehisadaghiani ∗ Lacra Pavel ∗ arXiv:1612.00414v1 [cs.SY] 1 Dec 2016 ∗ Department of Electrical and Computer Engineering, University of Toronto, Toronto, ON M5S 3G4, Canada (e-mails: [email protected], [email protected]). Abstract: In this paper, the problem of finding a Nash equilibrium of a multi-player game is considered. The players are only aware of their own cost functions as well as the action space of all players. We develop a relatively fast algorithm within the framework of inexact-ADMM. It requires a communication graph for the information exchange between the players as well as a few mild assumptions on cost functions. The convergence proof of the algorithm to a Nash equilibrium of the game is then provided. Moreover, the convergence rate is investigated via simulations. Keywords: Nash games, Game theory, Distributed control, 1. INTRODUCTION There is a close connection between the problem of finding a Nash equilibrium (NE) of a distributed game and a distributed optimization problem. In a distributed optimization problem with N agents that communicate over a connected graph, it is desired to minimize a global objective as follows:  N X   minimize f (x) := fi (x) x (1) i=1   subject to x ∈ Ω. In this problem the agents cooperatively solve (1) over a common optimization variable x. In other words, all the agents are serving in the public interest in a way that they reduce the global loss. However, there are many real-world applications that involve selfishness of the players (agents) such as congestion control for Ad-hoc wireless networks and optical signal-to-noise ratio (OSNR) maximization in an optical network. In these applications, players selfishly desire to optimize their own performance even though the global objective may not be minimized, hence play a game. In this regard, we are interested in studying the (Nash) equilibrium of this game. Considering the difference between distributed optimization and distributed Nash equilibrium (NE) seeking, we aim to employ an optimization technique referred to as the alternating direction method of multipliers (ADMM) to find an equilibrium point of a multi-player game. ADMM takes advantage of two different approaches used in solving optimization problems: 1) Dual Decomposition, and 2) Augmented Lagrangian Methods. Dual decomposition is a special case of a dual ascent method for solving an optimization problem when the objective function is separable w.r.t. variable x, i.e., f (x) := PN T i=1 fi (xi ) where x = [x1 , . . . , xN ] . This decomposition leads to N parallel dual ascent problems whereby each is to be solved for xi , i ∈ {1, . . . , N }. This parallelism makes the convergence faster. The augmented Lagrangian method is more robust and relaxes the assumptions in the dual ascent method. This method involves a penalty term added to the normal Lagrangian. In this work, we aim to exploit the benefits of ADMM in the context of finding an NE of a game. Here are the difficulties that we need to overcome: • A Nash game can be seen as a set of parallel optimization problems, each of them associated with the minimization of a player’s own cost function w.r.t. his variable. However, each optimization problem is dependent on the solution of the other parallel problems. This leads to have N Lagrangians whereby each is dependent on the other players’ variables. • Each player i updates only his own variable xi , however, he requires also an estimate of all other variables (xj )j∈{1,...,N }, j6=i and updates it in order to solve his optimization problem. This demands an extra step in the algorithm based on communications between players. • Each optimization problem is not in the proper format of sum of separable functions to allow direct application of ADMM. Related Works. Our work is related to the literature on distributed Nash games such as Yin et al. (2011); Alpcan and Başar (2005) and distributed optimization problems such as Nedic (2011); Johansson (2008). Finding NE in distributed games has recently drawn attention due to many real-world applications. To name only a few, Salehisadaghiani and Pavel (2014, 2016a); Frihauf et al. (2012); Gharesifard and Cortes (2013); Salehisadaghiani and Pavel (2016b); Pavel (2007); Pan and Pavel (2009). In Koshal et al. (2012) an algorithm has been designed based on gossiping protocol to compute an NE in aggregative games. Zhu and Frazzoli (2016) study the problem of finding an NE in more general games by a gradient-based method over a complete communication graph. This problem is extended to the case with partially coupled cost functions (the functions which are not necessarily dependent on all the players’ actions) in Bramoullé et al. (2014). Recently, Ye and Hu (2015) investigate distributed seeking of a timevarying NE with non-model-based costs for players. Computation of a time-varying NE is considered in Lou et al. (2016) in networked games consisting of two subnetworks with shared objectives. Parise et al. (2015) propose two different algorithms to solve for an NE in a large population aggregative game which is subject to heterogeneous convex constraints. ADMM algorithms, which are in the scope of this paper, have been developed in 1970s to find an optimal point of distributed optimization problems. This method has become widely used after its re-introduction in Boyd et al. (2011) such as He and Yuan (2012); Goldstein et al. (2014); Wei and Ozdaglar (2012). Shi et al. (2014) investigate the linear convergence rate of an ADMM algorithm to solve a distributed optimization problem. ADMM algorithms are extended by Makhdoumi and Ozdaglar (2014) to the case when agents broadcast their outcomes to their neighbors. The problem of distributed consensus optimization is considered in Chang et al. (2015) which exploits inexactADMM to reduce the computational costs of a classical ADMM. Recently, an ADMM-like algorithm is proposed by Shi and Pavel (submitted) in order to find an NE of a game. It is shown that the algorithm converges faster than the gradient-based methods. However, the algorithm requires individual cocoercivity and is not developed, but rather postulated by mimicking of ADMM in distributed optimization according to the NE condition. Contributions. In this paper, first, we reformulate the problem of finding an NE of a convex game as a set of distributed consensus optimization problems. Then we take advantage of a dummy variable to make the problem separable in the optimization variable. This technique can be used for any convex game which satisfies a set of relatively mild assumptions. Second, we design a synchronous inexact-ADMM algorithm by which every player updates his action as well as his estimates of the other players’ actions. This algorithm takes advantage of the speed and robustness of the classical ADMM and reduces the computational costs by using a linear approximation in players’ action update rule (inexact-ADMM). Compared with gradient-based algorithms such as Koshal et al. (2012); Zhu and Frazzoli (2016); Li and Marden (2013), our ADMM algorithm has an extra penalty term (could be seen as an extra state) which is updated through the iterations and improves the convergence rate. Third, we prove the convergence of the proposed algorithm toward the NE of the game and compare its convergence rate with a gradient-based method via simulation. The paper is organized as follows. The problem statement and assumptions are provided in Section 2. In Section 3, an inexact-ADMM-like algorithm is proposed. Convergence of the algorithm to a Nash equilibrium of the game is discussed in Section 4 while in Section 5 a simplified representation of the algorithm for implementation is provided. Simulation results are given in Section 6 and conclusions in Section 7. 2. PROBLEM STATEMENT Consider V = {1, . . . , N } as a set of N players in a networked multi-player game. The game is denoted by G and defined as follows: • Ωi ⊂Q R: Action set of player i, ∀i ∈ V , • Ω = i∈V Ωi ⊂ RN : Action set of all players, • Ji : Ω → R: Cost function of player i, ∀i ∈ V . The game G(V, Ωi , Ji ) is defined over the set of players, V , the action set of player i ∈ V , Ωi and the cost function of player i ∈ V , Ji . The • • • players’ actions are denoted as follows: x = (xi , x−i ) ∈ Ω: All players actions, xi ∈ Ωi : Player Qi’s action, ∀i ∈ V , x−i ∈ Ω−i := j∈V \{i} Ωj : All players’ actions except player i’s. The game is played such that for a given x−i ∈ Ω−i , each player i ∈ V aims to minimize his own cost function selfishly w.r.t, xi to find an optimal action, ( minimize Ji (xi , x−i ) xi (2) subject to xi ∈ Ωi . Each optimization problem is run by a particular player i at the same time with other players. An NE of a game is defined as follows: Definition 1. Consider an N -player game G(V, Ωi , Ji ), each player i minimizing the cost function Ji : Ω → R. A vector x∗ = (x∗i , x∗−i ) ∈ Ω is called a Nash equilibrium of this game if Ji (x∗i , x∗−i ) ≤ Ji (xi , x∗−i ) ∀xi ∈ Ωi , ∀i ∈ V. (3) An NE lies at the intersection of all solutions of the set (2). The challenge is that each optimization problem in (2) is dependent on the solution of the other simultaneous problems. And since this game is distributed, no player is aware of the actions (solutions) of the other players (problems). We assume that each player i maintains an estimate of the other players’ actions. In the following, we define a few notations for players’ estimates. • xi = (xii , xi−i ) ∈ Ω: Player i’s estimate of all players actions, • xii ∈ Ωi : PlayerQi’s estimate of his own action, ∀i ∈ V , • xi−i ∈ Ω−i := j∈V \{i} Ωj : Player i’s estimate of all other players’ actions except his action, T T • x = [x1 , . . . , xN ]T ∈ ΩN : Augmented vector of estimates of all players’ actions Note that player i’s estimate of his action is indeed his action, i.e., xii = xi for i ∈ V . Note also that all players actions x = (xi , x−i ) can be interchangeably represented as x = [xii ]i∈V . We assume that the cost function Ji and the action set Ω are the only information available to player i. Thus, the players need to exchange some information in order to update their estimates. An undirected communication graph GC (V, E) is defined where E ⊆ V × V denotes the set of communication links between the players. (i, j) ∈ E if and only if players i and j exchange information. In the following, we have a few definitions for GC : • Ni := {j ∈ V |(i, j) ∈ E}: Set of neighbors of player i in GC , • A := [aij ]i,j∈V : Adjacency matrix of GC where aij = 1 if (i, j) ∈ E and aij = 0 otherwise, • D := diag{|N1 |, . . . , |NN |}: Degree matrix of GC . The following assumption is used. Assumption 1. GC is a connected graph. We aim to relate game (2) to the following problem whose solution can be based on the alternating direction method of multipliers (Bertsekas and Tsitsiklis (1997), page 255). ( minimize G1 (x) + G2 (z) x∈C1 ,z∈C2 subject to Ax = z. To this end, we reformulate game (2) so that the objective function is separable by employing estimates of the actions for each player i ∈ V as xi (the estimates are also interpreted as the local copies of x). Particularly, from (2), consider that for a given xi−i ∈ Ω−i , each player i ∈ V minimizes his cost function selfishly w.r.t. his own action subject to an equality constraint, i.e., for all i ∈ V , X  Ji (xii , xi−i ) + gj (xji , xj−i )  minimize j xii ,xi |j∈Ni ∈Ωi  subject to j∈Ni xii = xji ∀j ∈ Ni , where gj (·) = 0 for j ∈ Ni . Note that, in order to update all elements in xi−i we need to augment the constraint space to an N × 1 vector form xi = xj , j ∈ Ni . Moreover, we replace the constraints with xl = xs ∀l ∈ V, ∀s ∈ Nl which includes xi = xj , j ∈ Ni . Note that augmenting the constraints in this way does not affect the solutions of the problem. Then for a given xi−i ∈ Ω−i and for all i ∈ V , we obtain,   minimize Ji (xii , xi−i ) xii ∈Ωi (4)  subject to xl = xs ∀l ∈ V, ∀s ∈ N . l The equality constraint along with Assumption 1 ensures that all the local copies of x are identical, i.e., x1 = x2 = . . . = xN . Hence (4) recovers (2). By Assumption 1, the set of problems (4) are equivalent to the following set of optimization problems: for a given xi−i ∈ Ω−i and for all i ∈ V ,  minimize Ji (xii , xi−i ) + IΩi (xii )    xii ∈R (5) subject to xl = tls ∀l ∈ V, ∀s ∈ Nl ,    xs = tls ∀l ∈ V, ∀s ∈ Nl ,  0 if xii ∈ Ωi where IΩi (xii ) := is an indicator function ∞ otherwise of the feasibility constraint xii ∈ Ωi and tls is an intermediary variable to separate the equality constraints. Note that one can regard the set of problems (5) as being the same as the set of problems (2) but considering N estimates (local copies) of the players’ actions for each player i ∈ V . A characterization of the NE for game (2) could be obtained by finding KKT conditions on the set of problems (5). Let {uls , v ls }l∈V,s∈Nl with uls , v ls ∈ RN be the Lagrange multipliers associated with the two constraints in (5), respectively. The corresponding Lagrange function for player i, ∀i ∈ V is as follows:   Li xi , {tls }l∈V,s∈Nl , {uls }l∈V,s∈Nl , {v ls }l∈V,s∈Nl XX T := Ji (xii , xi−i ) + IΩi (xii ) + uls (xl − tls ) l∈V s∈Nl + XX v ls T s ls (x − t ), (6) l∈V s∈Nl ∗ ∗ ∗ Let (xi )i∈V and {uls , v ls }l∈V, s∈Nl be a pair of optimal primal and dual solutions to (5). The KKT conditions are summarized as follows: X ij ∗ ∗ ∗ ∗ ui + viji = 0 ∀i ∈ V, (7) ∇i Ji (xi ) + ∂i IΩi (xii ) + j∈Ni x i∗ =x ij ∗ u j∗ +v ij ∗ ∀i ∈ V, ∀j ∈ Ni , (8) = 0N (9) ∀i ∈ V, ∀j ∈ Ni , where ∇i Ji (·) is gradient of Ji w.r.t. xi and ∂i IΩi (·) is ∗ a subgradient of IΩi at xi . Note that the index of v ji ∗ in (7) is inverse of v ij in (9). By (8) and Assumption 1, ∗ ∗ x1 = . . . = xN := x∗ . Thus, x∗ := (x∗i , x∗−i ) is a solution of (5) if and only if, X ij ∗  ∗ ∇i Ji (x∗ ) + ∂IΩi (xi ∗ ) + ui + viji = 0 ∀i ∈ V, (10) j∈Ni ∗  ij ∗ u + v ij = 0N ∀i ∈ V, ∀j ∈ Ni . We state a few assumptions for the existence and the uniqueness of an NE. Assumption 2. For every i ∈ V , the action set Ωi is a non-empty, compact and convex subset of R. Ji (xi , x−i ) is a continuously differentiable function in xi , jointly continuous in x and convex in xi for every x−i . The convexity of Ωi implies that IΩi is a convex function. This yields that there exists at least one bounded subgradient ∂IΩi . Assumption 3. Let F : ΩN → RN , F (x) := [∇i Ji (xi )]i∈V be the the pseudo-gradient vector (game map) where T T x := [x1 , . . . , xN ]T ∈ ΩN . F is cocoercive ∀x ∈ ΩN and y ∈ ΩN , i.e., (F (x) − F (y))T (x − y) ≥ σF kF (x) − F (y)k2 , (11) where σF > 0. Remark 1. Assumption 2 is a standard assumption in the literature of NE seeking. Assumption 3 is relatively stronger than the (strong) monotonicity of the game map (pseudo-gradient vector) (see Zhu and Frazzoli (2016); Koshal et al. (2012)). However, as we will show, this leads to an algorithm with the benefits of ADMM algorithms (speed). Remark 2. Assumption 3 is not usually required in distributed optimization problems; there instead the (strong) convexity of the objective function is assumed to be w.r.t. the full vector x and also the gradient of the objective function is assumed to be Lipschitz continuous (see Chang et al. (2015)). Our objective is to find an ADMM-like 1 algorithm for computing an NE of G(V, Ωi , Ji ) using only imperfect information over the communication graph GC (V, E). 3. DISTRIBUTED INEXACT ADMM ALGORITHM We propose a distributed algorithm, using an inexact 2 consensus ADMM. We obtain an NE of G(V, Ωi , Ji ) by solving the set of problems (5) by an ADMM-like approach. At this moment all the players update their actions via an ADMM-like approach developed as follows. For each player i, ∀i ∈ V let the augmented Lagrange function associated to problem (5) be as follows:   Lai xi , {tls }l∈V,s∈Nl , {uls }l∈V,s∈Nl , {v ls }l∈V,s∈Nl := Ji (xii , xi−i ) + IΩi (xii ) XX XX T T + uls (xl − tls ) + v ls (xs − tls ) l∈V s∈Nl l∈V s∈Nl cXX + (kxl − tls k2 + kxs − tls k2 ). 2 (15) l∈V s∈Nl The mechanism of the algorithm can be briefly explained where c > 0 is a scalar coefficient which is also used in (12), as follows: Each player maintains an estimate of the actions (13) and (14). Consider the ADMM algorithm associated on (15): of all players and locally communicates with his neighbors to problem (5) based  over GC . Then, he takes average of his neighbors’ infori i a xi (k) = arg min Li (xi , xi−i (k − 1)),{tls (k − 1)}l∈V,s∈Nl, mation and uses it to update his estimates. xii ∈R  The algorithm is elaborated in the following steps: {uls (k)}l∈V,s∈Nl , {v ls (k)}l∈V,s∈Nl 1- Initialization Step: Each player i ∈ V maintains an n initial estimate for all players, xi (0) ∈ Ω. The initial values = arg min J (xi , xi (k − 1)) + I (xi ) i i Ωi −i i ij ij xii ∈R of u (0) and v (0) are set to be zero for all i ∈ V , j ∈ Ni . X 2- Communication Step: At iteration T (k), each player (uij (k) + v ji (k))T (xii , xi−i (k − 1)) i ∈ V exchanges his estimate of the other players’ actions + j∈Ni with his neighbors j, ∀j ∈ Ni . Then, he takes average of X 2o the received information with his estimate and updates his +c (xii , xi−i (k − 1)) − tij (k − 1) ∀i ∈ V, (16) estimate as follows: j∈Ni   1 i 1 X j xi−i (k) = x−i (k − 1) x−i (k − 1) + The update rule for the auxiliary variable tij ∀i ∈ V, j ∈ Ni 2 |Ni | j∈Ni is based on (15), {z } |  ij a RECEIVED INFORMATION t (k) = arg min L (xii (k), xi−i (k − 1)), {tls }l∈V,s∈Nl , i X ij tij 1 ji  − (12) (u−i (k) + v−i (k)), 2c|Ni | {uls (k)}l∈V,s∈Nl , {v ls (k)}l∈V,s∈Nl j∈Ni {z } | n PENALTY TERM = arg min − (uij (k) + v ij (k))T tij ij t where c > 0 is a scalar coefficient, and ∀i ∈ V, j ∈ Ni , c  + (k(xii (k), xi−i (k − 1)) − tij k2 c i ij ij j 2 u (k) = u (k − 1) + x (k − 1) − x (k − 1) , (13) o 2 1 j j ij 2  c +k(x (k), x (k − 1)) − t k ) = (uij (k) + v ij (k)) j i ij ij i −i (14) v (k) = v (k − 1) + x (k − 1) − x (k − 1) . 2c 2 1 i j j i (17) Equations (13), (14) are the dual Lagrange multipli- + ((xi (k), x−i (k − 1)) + (xi (k), x−i (k − 1))). 2 ers update rules. Note that in (12), a penalty factor P ij ji The initial conditions uij (0) = v ij (0) = 0N ∀i ∈ V, j ∈ Ni j∈Ni (u−i (k) + v−i (k)) is subtracted, which is associated along with (13) and (14) suggest that uij (k) + v ij (k) = 0N with the difference between the estimates of the neighbor∀i ∈ V, j ∈ Ni , k > 0. Then, ing players (Equations (13), (14)). j j i i Remark 3. Unlike distributed optimization algorithms where tij (k) = (xi (k), x−i (k − 1)) + (xi (k), x−i (k − 1)) . (18) 2 the minimization is w.r.t. x, here each player minimizes his cost function w.r.t. xii . To update xii , each player requires Using (18) in (16), one can derive the local estimate update the estimate of the other players xi−i at each iteration. for all i ∈ V as follows: n Thus, the communication step is inevitable to update xi−i xi (k) = arg min J (xi , xi (k − 1)) + I (xi ) i i Ωi i −i i for the next iteration. xii ∈R X + (uij (k) + v ji (k))T (xii , xi−i (k − 1)) 3- Action Update Step j∈Ni 1 ADMM or Alternative Direction Method of Multipliers also known as Douglas-Rachford splitting is a method of solving an optimization problem where the objective function is a summation of two convex (possibly non-smooth) functions. For a detailed explanation see Parikh et al. (2014). 2 In an inexact consensus ADMM instead of solving an optimization sub-problem, a method of approximation is employed to reduce the complexity of the sub-problem. +c X (xii , xi−i (k − 1)) (19) j∈Ni − (xii (k − 1), xi−i (k − 2)) + (xji (k − 1), xj−i (k − 2)) 2 2o We simplify (19) by using a proximal first-order approximation for Ji (xii , xi−i (k − 1)) around xi (k − 1); thus using inexact ADMM itn follows: xii (k) + i T = arg min ∇i Ji (x (k − 1)) i xi ∈R (xii − xii (k − 1)) X ij βi i (ui (k) + viji (k))xii kxi − xii (k − 1)k2 + IΩi (xii ) + 2  T + ∇i Ji (xi (k − 1)) − ∇i Ji (x∗ ) (xii (k) − xii (k − 1)) +βi (xii (k) − xii (k − 1))T (xii (k) − x∗i ) +(∂IΩi (xii (k)) − ∂IΩi (x∗i ))T (xii (k) − x∗i ) X ij ∗ ∗ + (ui (k) + viji (k) − uij − viji )T (xii (k) − x∗i ) i j∈Ni +c X xii − xii (k j∈Ni − 1) + 2 xji (k − 1) 2o ∀i ∈ V, (20) where βi > 0 is a penalty factor for the proximal first-order approximation of each player i’s cost function. At this point, the players are ready to begin a new iteration from step 2. To sum up, the algorithm consists of (12), (13), (14) and (20) which are the update rule for the players’ estimates except their own actions, the update rules for the Lagrange multipliers and the update rule for player’s action, respectively. +2c X xi (k − 1)+xji (k − 1)T i (xi (k)−x∗i ) = 0. xii (k)− i 2 j∈Ni As discussed in Remark 3, in addition to updating their own actions, the players need to update their estimates as well. In the following, we explain how to bring in the update rule of xi−i into (24). Note that by (12), one can obtain, X ij ji (u−i (k) + v−i (k)) 4. CONVERGENCE PROOF ∇i Ji (xi (k − 1)) + βi (xii (k) − xii (k − 1)) X ij +∂i IΩi (xii (k)) + (ui (k) + viji (k)) X xi (k − 1) + xji (k − 1)  +2c xii (k) − i = 0. 2 (22) X ∗ ∇i Ji (x (k − 1)) − ∇i Ji (x ) + +∂IΩi (xii (k)) − ∂IΩi (x∗i ) X ij ∗ + (ui (k) + viji (k) − uij i j∈Ni j∈Ni xii (k) − ji T i ∗ (uij −i (k) + v−i (k)) (x−i (k) − x−i ) j∈Ni +2c X xi−i (k) − j∈Ni .(xi−i (k) xi−i (k − 1) + xj−i (k − 1) T 2 − x∗−i ) = 0. (26) Adding (26) to (24) and using (13), (14), yilds ∀i ∈ V ,  T ∇i Ji (xi (k − 1)) − ∇i Ji (x∗ ) (xii (k − 1) − x∗i )  T + ∇i Ji (xi (k − 1)) − ∇i Ji (x∗ ) (xii (k) − xii (k − 1)) +(∂IΩi (xii (k)) − ∂IΩi (x∗i ))T (xii (k) − x∗i ) X ij ∗ ji ∗ T i ∗ + (ui (k + 1)+viji (k + 1)−uij i −vi ) (xi (k)−xi ) j∈Ni We combine (22) with (10) which represents the equations associated with the solutions of the set of problems (5) (NE of game (2)). Then we obtain, X xi−i (k − 1) + xj−i (k − 1)  = 0N −1 . 2 Multiplying (25) by (xi−i (k) − x∗−i ), one can arrive at, j∈Ni +2c xi−i (k) − +βi (xii (k) − xii (k − 1))T (xii (k) − x∗i ) j∈Ni i X j∈Ni Proof . The optimality condition of (20) yields: (25) j∈Ni +2c Theorem 1. Let βmin := mini∈V βi > 0 3 be the minimum penalty factor of the approximation in the inexact ADMM algorithm which satisfies 1 σF > , (21) 2(βmin + cλmin (D + A)) where σF is a positive constant for the cocoercive property of F , and D and A are the degree and adjacency matrices of GC , respectively. Under Assumptions 1-3, the sequence {xi (k)} ∀i ∈ V , generated by the algorithm (12), (13), (14) and (20), converges to x∗ NE of game (2). (24) j∈Ni βi (xii (k) − xii (k + X j∈Ni +2c − 1)) ji T i ∗ (uij −i (k + 1) + v−i (k + 1)) (x−i (k) − x−i ) X  xi (k) + xj (k) xi (k − 1) + xj (k − 1) T − 2 2 j∈Ni .(x (k) − x∗ ) = 0. i ∗ − viji ) xii (k − 1) + xji (k − 1)  = 0. 2 (23) We multiply both sides by (xii (k) − x∗i ) and then add and subtract xii (k − 1) as follows:  T ∇i Ji (xi (k − 1)) − ∇i Ji (x∗ ) (xii (k − 1) − x∗i ) 3 In order to have a fully distributed algorithm, one can consider a network-wide known lower bound β̃min , β̃min ≤ βi ∀i ∈ V and use it instead of βmin . (27) The second and the third terms are bounded as follows:  T ∇i Ji (xi (k − 1)) − ∇i Ji (x∗ ) (xii (k) − xii (k − 1)) ≥ (28) −1 ρ k∇i Ji (xi (k − 1))−∇i Ji (x∗ )k2 − kxii (k)−xii (k − 1)k2 , 2ρ 2 for any ρ > 0 ∀i ∈ V . By the convexity of IΩi (Assumption 2), we have for the fourth term, (∂IΩi (xii (k)) − ∂IΩi (x∗i ))T (xii (k) − x∗i ) ≥ 0. (29) Using (28) and (29) in (27) and summing over i ∈ V , we obtain,  1 − kx(k) − x(k − 1)k2M1 2 +(x(k) − x(k − 1))T M2 (x(k) − x∗ ) 2 (35) + (u(k + 1) − u∗ )T (u(k + 1) − u(k)) ≤ 0, c where M2 := diag((βi ei eTi )i∈V ) + c((D + A) ⊗ IN ). Note that diag((βi ei eTi )i∈V )  0. Note also that, T F (x(k − 1)) − F (x∗ ) (x(k − 1) − x∗ ) 1 1 kF (x(k − 1)) − F (x∗ )k2 − kx(k) − x(k − 1)k2M1 2ρ 2 +(x(k) − x(k − 1))T diag((βi ei eTi )i∈V )(x(k) − x∗ ) X X ij ∗ ji ∗ T i ∗ + (ui (k + 1)+viji (k + 1)−uij i −vi ) (xi (k)−xi) − i∈V j∈Ni + XX ji T i ∗ (uij −i (k + 1) + v−i (k + 1)) (x−i (k) − x−i ) c((D + A) ⊗ IN )=c((2D − L) ⊗ IN ) i∈V j∈Ni 1 1∗T ∗ diag((ρei eTi )i∈V ,...,x where M1 := ) and x = [x We bound the first term using Assumption 3,  T F (x(k − 1)) − F (x∗ ) (x(k − 1) − x∗ ) ≥ σF kF (x(k − 1)) − F (x∗ )k2 . (31) We also simplify the fifth and the sixth terms in (30). Since GC is P an undirected graph, for any {aij }, P P P a = a . Then, ij ji i∈V j∈Ni i∈V j∈Ni X X ij ∗ ji ∗ T i ∗ (ui (k + 1)+viji (k + 1)−uij i −vi ) (xi (k)−xi ) i∈V j∈Ni + XX ji T i ∗ (uij −i (k + 1) + v−i (k + 1)) (x−i (k) − x−i ) i∈V j∈Ni = XX + XX ∗ ij T i ∗ (uij i (k + 1) − ui ) (xi (k) − xi ) i∈V j∈Ni ∗ (viij (k + 1) − viij )T (xji (k) − x∗i ) i∈V j∈Ni + XX T i ∗ uij −i (k + 1) (x−i (k) − x−i ) i∈V j∈Ni + XX ij v−i (k + 1)T (xj−i (k) − x∗−i ). (32) i∈V j∈Ni Note that by (13) and (14) as well as the initial conditions for Lagrange multipliers uij (0) = v ij (0) = 0N ∀i ∈ V, j ∈ Ni , we obtain, uij (k) + v ij (k) = 0N ∀i ∈ V, j ∈ Ni , k > 0. (33) Substituting (33) into (32) and using (8), we obtain, X X ij ∗ T j i (ui (k + 1) − uij i ) (xi (k) − xi (k)) i∈V j∈Ni + XX j T i uij −i (k + 1) (x−i (k) − x−i (k)) i∈V j∈Ni = XX ∗ T i j (uij (k + 1) − uij i ei ) (x (k) − x (k)) i∈V j∈Ni = ∗ 2 X X ij T ij ij (u (k + 1) − uij i ei ) (u (k + 1) − u (k)) c i∈V j∈Ni 2 := (u(k + 1) − u∗ )T (u(k + 1) − u(k)), (34) c P N |Ni | i ij i∈V where u = (ui )i∈V ∈ R and P u = (u )j∈Ni ∈ ∗ RN |Ni | and also u∗ = (ui )i∈V ∈ R ∗ N |Ni | (uij . i )j∈Ni ⊗ ei ∈ R Using (31) and (34), for ρ = 1 2σF N i∈V |Ni | (30) becomes, ∗ and ui = 1 1 1 1 =c((D 2 (2I − LN )D 2 ) ⊗ IN ), N ∗T T ] . 1 =c((D 2 (2I − D− 2 LD− 2 )D 2 ) ⊗ IN ) +c(x(k) − x(k − 1))T ((D + A) ⊗ IN )(x(k) − x∗ ) ≤ 0, (30) 1 2 − 12 (36) − 21 1 where L := D − A, D , D and LN := D LD− 2 are the Laplacian of GC , the square root and reciprocal square root of D and the normalized Laplacian of GC , 1 respectively. Since D  0, D− 2 exist, it is shown in Chung (1997) that λmax (LN ) ≤ 2. Then (36) yields that c((D + A) ⊗ IN )  0. This concludes M2  0. We use the following inequality in (35) for every {a(k)} and M  0: 1 (a(k) − a(k − 1))T M (a(k) − a∗ ) = ka(k) − a∗ k2M 2 1 1 2 + ka(k) − a(k − 1)kM − ka(k − 1) − a∗ k2M . (37) 2 2 Then, (35) becomes, 1 1 kx(k) − x∗ k2M2 + ku(k + 1) − u∗ k2 ≤ 2 c 1 1 ∗ 2 kx(k − 1) − x kM2 + ku(k) − u∗ k2 (38) 2 c 1 1 − kx(k) − x(k − 1)k2M2 −M1 − ku(k + 1) − u(k)k2 . 2 c By the condition (21), M2 − M1  0. Then (38) implies the following two results: (1) 1 2 kx(k) − x∗ k2M2 + 1c ku(k + 1) − u∗ k2 → θ, for some θ ≥ 0, ( x(k) − x(k − 1) → 0N 2 (2) u(k + 1) − u(k) → 0 P N . i∈V |Ni | Result 1 implies that the sequences {xi (k)} and {uij (k)} (similarly {v ij (k)}) are bounded and have limit points denoted by x̃i and ũij (ṽ ij ), respectively. Then, we obtain, 1 1 θ = kx̃ − x∗ k2M2 + kũ − u∗ k2 (39) 2 c Result 2 yields that x̃i = x̃j := x̃ for all i ∈ V, j ∈ Ni since by (13) we have,  c i x (k) − xj (k) = uij (k + 1) − uij (k) → 0N 2 ⇒ x̃i = x̃j ∀i ∈ V, j ∈ Ni . (40) Moreover, by (33) we arrive at, ũij + ṽ ij = 0N ∀i ∈ V, j ∈ Ni . Result 2 also implies that by (22) and (40), X ij ∇i Ji (x̃) + ∂IΩi (x̃i ) + (ũi + ṽiji ) = 0. (41) (42) j∈Ni Comparing (41), (42) with (10), it follows ∀i ∈ V, j ∈ Ni , x̃i = x∗ (x̃ = x∗ ), ij ∗ ũij = u (43) (ũ = u∗ ). 1 12 R7 L8 R6 R14 L9 L7 R8 13 (44) Using (43) and (44) in (39), it follows that θ = 0. Thus, one can conclude from Result 1 that, 12 kx(k) − x∗ k2M2 + 1 ∗ 2  c ku(k + 1) − u k → 0 which completes the proof. Remark 4. Assumption 3 is only used in equation (31). It is straightforward to verify that (31) can be satisfied by Assumption 3 for y = x∗ (similar to Assumption 4.4 in Frihauf et al. (2012)). 11 L15 L11 R10 L12 9 L6 L14 R9 16 14 L4 L13 L16 1 2 15 11 13 3 R4 L5 R15 4 10 4 R3 5 R11 12 R5 3 L10 10 2 9 14 5 8 7 6 15 R13 L3 R12 L2 R1 R2 L1 8 6 7 5. IMPLEMENTATION OF ALGORITHM Fig. 1. (a) Wireless Ad-Hoc Network (left). (b) Communication graph GC (right). For the purpose of implementation, we simplify the algorithm to a more compact representation. One may begin with (12) and (20) as follows: P (1) Let wi := j∈Ni uij + v ji . Then by (13) and (14), X (xi (k −1)−xj (k −1)). (45) wi (k) = wi (k −1)+c 6. SIMULATION RESULTS j∈Ni ij ji i (2) By replacing j∈Ni (u−i (k) + v−i (k)) with w−i (k) and using (45) in (12), after a few manipulations we obtain, 1 X j 1 i x−i (k) = wi (k − 1). x−i (k − 1)) − |Ni | 2c|Ni | −i P j∈Ni (3) By differentiating of (20) w.r.t. xii and equating it to 0, one can verify that xii can be obtained as:  n αi i −1 i i i xi (k) = argmin x −α β x (k − 1)−wii (k) I (x )+ i i Ωi i i 2 i xii ∈R X  2 o −∇i Ji (xi (k − 1)) + c xii (k − 1) + xji (k − 1) , j∈Ni where αi = βi +2c|Ni |. Let proxag [s] := arg minx {g(x)+ a 2 for the non2 kx − sk } be the proximal operator i [s] = TΩi [s] smooth function g. Note that proxα IΩi where TΩi : R → Ωi is an Euclidean projection. Then for each player h i, ∀i ∈ V we obtain, i xi (k) = TΩi αi−1 (βi + c|Ni |)xii (k − 1)  i X j −αi−1 wii (k) + ∇i Ji (xi (k − 1)) − c xi (k − 1) . j∈Ni Then the ADMM algorithm is as follows: Algorithm 1 ADMM Algorithm for Implementation 1: 2: 3: 4: 5: 6: 7: initialization xi (0) ∈ Ω, wi (0) = 0N ∀i ∈ V for k = 1, 2, . . . do for each player i ∈ V do players exchange estimates with the neighbors P wi (k) = wi (k−1)+c j∈Ni (xi (k−1)−xj (k−1)) P j xi−i (k) = xii (k) = TΩi j∈Ni h x−i (k−1)) |Ni | βi +c|Ni | i xi (k αi i w−i (k−1) 2c|Ni |  1) − αi−1 wii (k) − − +∇i Ji (xi (k − 1)) − c 8: 9: end for end for j j∈Ni xi (k − 1) P i In this section, we compare our algorithm with the gradient-based one proposed in Salehisadaghiani and Pavel (2016a). We consider a wireless ad-hoc network (WANET) with 16 nodes and 16 multi-hop communication links as in Salehisadaghiani and Pavel (2016b). There are 15 users who aim to transfer data from a source node to a destination node via this WANET. Fig. 1 (a) shows the topology of the WANET in which solid lines represent links and dashed lines display paths that assigned to users to transfer data. Each link has a positive capacity that restricts the users’ data flow . Here is the list of WANET notations: (1) Lj : Link j, j ∈ {1, . . . , 16}, (2) Ri : The path assigned to user i, i ∈ {1, . . . , 15}, (3) Cj > 0: The capacity assigned to each link j, j ∈ {1, . . . , 16}, (4) 0 ≤ xi ≤ 10: The data flow of user i, i ∈ {1, . . . , 15}. Note that each path consists of a set of links, e.g., R1 = {L2 , L3 }. For each user i, a cost function Ji is defined as in Salehisadaghiani and Pavel (2016b): X κ P Ji (xi , x−i ) := − χi log(xi + 1), Cj − w:Lj ∈Rw xw j:Lj ∈Ri where κ > 0 and χi > 0 are network-wide known and user-specific parameters, respectively. The problem is to find an NE of the game which is played over a communication graph GC (depicted in Fig. 1 (b)). It is straightforward to check the Assumptions 1,2 and 3 4 on GC and the cost functions. We aim to compare the convergence rate of our algorithm with the one proposed in Salehisadaghiani and Pavel (2016a). The results of Algorithm 1 and the algorithm in Salehisadaghiani and Pavel (2016a) are shown in Fig. 2, for χi = 10 ∀i ∈ {1, . . . , 15} and Cj = 10 ∀j ∈ {1, . . . , 16} (Fig. 2). The simulation results verify that the proposed algorithm is 70 times faster than the one in Salehisadaghiani and Pavel (2016a). The factors that lead to this improvement are as follows: • We used the difference between the estimates of the users as a penalty term to update each user’s action and estimates. 4 It is sufficient for the cost functions that only satisfy equation (31) (see Remark 4). 5.5 5 User Flow Rate 4.5 4 3.5 3 2.5 2 1.5 0 1000 2000 3000 4000 5000 Iteration Fig. 2. Flow rates of users 1, 3, 5, 8, 13 using our algorithm (solid lines) vs. proposed algorithm in Salehisadaghiani and Pavel (2016a) (dashed lines). NE points are represented by black stars. • We used a synchronous algorithm by which every user updates his action and estimates at the same time with the other users. • Unlike gossiping protocol, which is used in Salehisadaghiani and Pavel (2016a), every user communicates with all of the neighboring users (not only one of them) at each iteration. 7. CONCLUSIONS A distributed NE seeking algorithm is designed using inexact-ADMM to achieve more speed and robustness. The game is reformulated within the framework of inexactADMM. The communications between the players are defined to exchange the estimates. An inexact-ADMM-like approach is then designed and its convergence to an NE of the game is analyzed. Eventually, the convergence rate of the algorithm is compared with an existing gossip-based NE seeking algorithm. REFERENCES Alpcan, T. and Başar, T. (2005). Distributed algorithms for Nash equilibria of flow control games. In Advances in Dynamic Games, 473–498. Springer. Bertsekas, D.P. and Tsitsiklis, J.N. (1997). Parallel and Distributed Computation: Numerical Methods. Athena Scientific, Belmont, Massachusetts. Boyd, S., Parikh, N., Chu, E., Peleato, B., and Eckstein, J. (2011). Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends R in Machine Learning, 3(1), 1–122. Bramoullé, Y., Kranton, R., and D’amours, M. (2014). Strategic interaction and networks. The American Economic Review, 104(3), 898–930. Chang, T.H., Hong, M., and Wang, X. (2015). Multi-agent distributed optimization via inexact consensus admm. IEEE Transactions on Signal Processing, 63(2), 482– 497. Chung, F.R. (1997). Spectral graph theory, volume 92. American Mathematical Soc. Frihauf, P., Krstic, M., and Basar, T. (2012). Nash equilibrium seeking in noncooperative games. IEEE Transactions on Automatic Control, 57(5), 1192–1207. Gharesifard, B. and Cortes, J. (2013). Distributed convergence to Nash equilibria in two-network zero-sum games. Automatica, 49(6), 1683–1692. Goldstein, T., O’Donoghue, B., Setzer, S., and Baraniuk, R. (2014). Fast alternating direction optimization methods. SIAM Journal on Imaging Sciences, 7(3), 1588– 1623. He, B. and Yuan, X. (2012). On the o(1/n) convergence rate of the douglas-rachford alternating direction method. SIAM Journal on Numerical Analysis, 50(2), 700–709. Johansson, B. (2008). On distributed optimization in networked systems. Ph.D. Dissertation. Koshal, J., Nedic, A., and Shanbhag, U.V. (2012). A gossip algorithm for aggregative games on graphs. In IEEE 51st Conference on Decision and Control (CDC), 4840– 4845. Li, N. and Marden, J.R. (2013). Designing games for distributed optimization. IEEE Journal of Selected Topics in Signal Processing, 7(2), 230–242. Lou, Y., Hong, Y., Xie, L., Shi, G., and Johansson, K.H. (2016). Nash equilibrium computation in subnetwork zero-sum games with switching communications. IEEE Transactions on Automatic Control, 61(10), 2920–2935. Makhdoumi, A. and Ozdaglar, A. (2014). Broadcast-based distributed alternating direction method of multipliers. In Communication, Control, and Computing (Allerton), 2014 52nd Annual Allerton Conference on, 270–277. IEEE. Nedic, A. (2011). Asynchronous broadcast-based convex optimization over a network. IEEE Transactions on Automatic Control, 56(6), 1337–1351. Pan, Y. and Pavel, L. (2009). Games with coupled propagated constraints in optical networks with multilink topologies. Automatica, 45(4), 871–880. Parikh, N., Boyd, S.P., et al. (2014). Proximal algorithms. Foundations and Trends in optimization, 1(3), 127–239. Parise, F., Gentile, B., Grammatico, S., and Lygeros, J. (2015). Network aggregative games: Distributed convergence to Nash equilibria. In 2015 54th IEEE Conference on Decision and Control (CDC), 2295–2300. IEEE. Pavel, L. (2007). An extension of duality to a gametheoretic framework. Automatica, 43(2), 226–237. Salehisadaghiani, F. and Pavel, L. (2014). Nash equilibrium seeking by a gossip-based algorithm. In IEEE 53rd Conference on Decision and Control (CDC), 1155–1160. Salehisadaghiani, F. and Pavel, L. (2016a). Distributed Nash equilibrium seeking: A gossip-based algorithm. Automatica, 72, 209–216. Salehisadaghiani, F. and Pavel, L. (2016b). Distributed Nash equilibrium seeking by gossip in games on graphs. arXiv preprint arXiv:1610.01896. Shi, W., Ling, Q., Yuan, K., Wu, G., and Yin, W. (2014). On the linear convergence of the admm in decentralized consensus optimization. IEEE Transactions on Signal Processing, 62(7), 1750–1761. Shi, W. and Pavel, L. (submitted). LANA: an ADMMlike Nash equilibrium seeking algorithm in decentralized environment. Wei, E. and Ozdaglar, A. (2012). Distributed alternating direction method of multipliers. In 2012 IEEE 51st IEEE Conference on Decision and Control (CDC), 5445–5450. IEEE. Ye, M. and Hu, G. (2015). Distributed seeking of timevarying Nash equilibrium for non-cooperative games. IEEE Transactions on Automatic Control, 60(11), 3000– 3005. Yin, H., Shanbhag, U.V., and Mehta, P.G. (2011). Nash equilibrium problems with scaled congestion costs and shared constraints. IEEE Transactions on Automatic Control, 56(7), 1702–1708. Zhu, M. and Frazzoli, E. (2016). Distributed robust adaptive equilibrium computation for generalized convex games. Automatica, 63, 82–91.
3cs.SY
Bootstrapping for multivariate linear regression models Daniel J. Eck Department of Biostatistics, Yale School of Public Health. [email protected] arXiv:1704.07040v2 [math.ST] 12 Sep 2017 Abstract The multivariate linear regression model is an important tool for investigating relationships between several response variables and several predictor variables. The primary interest is in inference about the unknown regression coefficient matrix. We propose multivariate bootstrap techniques as a means for making inferences about the unknown regression coefficient matrix. These bootstrapping techniques are extensions of those developed in Freedman [1981], which are only appropriate for univariate responses. Extensions to the multivariate linear regression model are made without proof. We formalize this extension and prove its validity. A real data example and two simulated data examples which offer some finite sample verification of our theoretical results are provided. Key Words: Multivariate Bootstrap; Multivariate Linear Regression Model; Residual Bootstrap 1 Introduction The linear regression model is an important and useful tool in many statistical analyses for studying the relationship among variables. Regression analysis is primarily used for predicting values of the response variable at interesting values of the predictor variables, discovering the predictors that are associated with the response variable, and estimating how changes in the predictor variables affects the response variable [Weisberg, 2005]. The standard linear regression methodology assumes that the response variable is a scalar. However, it may be the case that one is interested in investigating multiple response variables simultaneously. One could perform a regression analysis on each response separately in this setting. Such an analysis would fail to detect associations between responses. Regression settings where associations of multiple responses is of interest require a multivariate linear regression model for analysis. Bootstrapping techniques are well understood for the linear regression model with a univariate response [Bickel and Freedman, 1981, Freedman, 1981]. In particular, theoretical justification for the residual bootstrap as a way to estimate the variability of the ordinary least squares (OLS) estimator of the regression coefficient vector in this model has been developed [Freedman, 1981]. Theoretical extensions of residual bootstrap techniques appropriate for the multivariate linear regression model have not been formally introduced. The existence of such an extension is stated without proof and rather implicitly in subsequent works [Freedman and Peters, 1984, Diaconis and Efron, 1983]. In this article we show that the bootstrap procedures in Freedman [1981] provide consistent estimates of the variability of the OLS estimator of the regression coefficient matrix in the multivariate linear regression model. Our proof technique follows similar logic as Freedman [1981]. The generality of the bootstrap theory developed in Bickel and Freedman [1981] provide the tools required for our extension to the multivariate linear regression model. 2 Bootstrap for the multivariate linear regression model The multivariate linear regression is Yi = βXi + εi , 1 (i = 1, ..., n), (1) where Yi ∈ Rr and r > 1 in order to have an interesting problem, β ∈ Rr×p , Xi ∈ Rp , and the ε′i s ∈ Rr are errors having mean zero and variance-covariance matrix Σ where Σ > 0. It is assumed that separate realizations from the model (1) are independent and that n > p. We further define X ∈ Rn×p as the design matrix with rows XiT , Y ∈ Rn×r is the matrix of responses with rows YiT , and ε ∈ Rn×r is the matrix of all errors with rows εTi . The OLS estimator of β in model (1) is β̂ = YT X(XT X)−1 . We let εb ∈ Rn×r denote the matrix of residuals consisting of rows εbTi = (Yi − β̂Xi )T . The multivariate linear regression model assumed here is slightly different than the traditional multivariate linear regression model. The traditional model makes the additional assumptions that the errors are normally distributed and the design matrix X is fixed. We consider two bootstrap procedures that consistently estimate the asymptotic variability of vec(β̂) under different assumptions placed upon the model (1), where the vec operator stacks the columns of a matrix so that vec(β̂) ∈ Rrp×1 . The first bootstrap procedure is appropriate when the design matrix X is assumed to be fixed and the errors are constant. In this setup, residuals are resampled. The second bootstrap procedure is appropriate when (XiT , εTi )T are realizations from a joint distribution. In this setup, cases (XiT , YiT )T are resampled. It is known that bootstrapping under these setups provides a consistent estimator of the variability of var(β̂) in model (1) when r = 1 [Freedman, 1981]. We now provide the needed extensions. 2.1 Fixed design We first establish the residual bootstrap of Freedman [1981] when X is assumed to be a fixed design matrix. Resampled, starred, data is generated by the model Y∗ = Xβ̂ T + ε∗ , (2) where ε∗ ∈ Rn×r is the matrix of errors with rows being independent. The rows in ε∗ have common distribution Fbn which is the empirical distribution of the residuals from the original dataset, centered at T their mean. Now β̂ ∗ = Y∗ X(XT X)−1 is the OLS estimator of β from the starred data. This process is performed a total of B times with a new estimator β̂ ∗ computed from (2) at each iteration. We then estimate the variability of vec(β̂) with B n n o on oT X var∗ vec(β̂) = (B − 1)−1 vec(β̂b∗ ) − vec(β̄ ∗ ) vec(β̂b∗ ) − vec(β̄ ∗ ) b=1 where β̂b∗ is the residual bootstrap estimator of β at iteration b and β̄ ∗ = B −1 bootstrap procedure in Algorithm 1. PB Algorithm 1. Bootstrap procedure with fixed design matrix. Step 1. Set B and initialize b = 1. Step 2. Sample residuals from Fbn , with replacement, and compute Y∗ as in (2). T Step 3. Compute β̂b∗ = Y∗ X(XT X)−1 , store vec(β̂b∗ ), and let b = b + 1. Step 4. Repeat Steps 2-3, iterating b before returning to Step 2. n o Step 5. When b = B, compute var∗ vec(β̂) . 2 ∗ . We summarize this b=1 β̂b Before the theoretical justification of the residual bootstrap is formally given, some important quantities T are stated. The residuals from the regression (2) are εb∗ = Y∗ − Xβ̂ ∗ . The variance-covariance matrix Σ in model (1) is then estimated by b=n Σ −1 n X i=1 εbi εbTi 2 − µ̂ , 2 µ̂ = n −1 n X i=1 εbi ! n −1 n X i=1 Likewise, the variance-covariance estimate from the starred data is b ∗ = n−1 Σ n X i=1 T 2 εb∗ b∗ − µ̂∗ , iε i 2 µ̂∗ = n −1 n X i=1 εb∗i ! n −1 εbi !T n X i=1 εb∗i . !T . Let Ik denote the k × k identity matrix. Theorem 1 provides bootstrap asymptotics for the regression model (1). It extends Theorem 2.2 of Freedman [1981] to the multivariate setting. Theorem 1. Assume the regression model (1) where the errors have finite fourth moments. Suppose that n−1 XT X → ΣX > 0. Then, conditional on almost all sample paths Y1 , ..., Yn , as n → ∞, o √ n ∗ a) n vec(β̂ ) − vec(β̂) →d N (0, Σ−1 X ⊗ Σ), b ∗ →p Σ, and b) Σ  n o −1/2 T 1/2 ∗ b vec(β̂ ∗ ) − vec(β̂) →d N (0, Irp ) c) (X X) ⊗ Σ The proof of Theorem 1, along with the details of several necessary lemmas and theorems, are included in the theoretical details section. Theorem 1 establishes the multivariate analogue for the residual bootstrap. This theorem shows that standard error estimation of the estimated β matrix obtained through bootstrapping, √ is n-consistent. Now let f : Rrp → Rk be a differentiable function. Then the conclusions of Theorem 1 can be applied to establish a multivariate delta method based on estimates obtained via the residual bootstrap. This immediately follows from a first order Taylor expansion and some algebra arriving at o n oi n o√ n o √ h n n f vec(β̂ ∗ ) − f vec(β̂) = ∇f vec(β̂) n vec(β̂ ∗ ) − vec(β̂) + Op (n−1/2 ). (3) Therefore (3) converges weakly to a normal distribution with mean zero and variance given by  T ∇f {vec (β)} Σ−1 X ⊗ Σ ∇ f {vec (β)} as n → ∞. 2.2 Random design and heteroskedasticity In this section we assume that the Xi s in model (1) are realizations of a random variable X. The regression T coefficient matrix β now takes the form β = E(Y X T )Σ−1 X where ΣX = E(XX ) and it is assumed that ΣX > 0. Now that X is stochastic, there may be some association between X and the errors ε. The 3 possibility of heteroskedasticity means that we need to alter the bootstrap procedure outlined in the previous section in order to consistently estimate the variability of vec(β̂). It is assumed that the data vectors (XiT , YiT )T ∈ Rp+r are independent, with a common distribution µ and E(k(XiT , YiT )T k4 ) < ∞ where k · k is the Euclidean norm. Unlike the fixed design setting, data pairs T T (X T , Y T )T are resampled with replacement to form the starred data (X ∗ , Y ∗ )T , for i = 1, ..., n. Given i i i i the original sample, (XiT , YiT )T , i = 1, ..., n, the resampled vectors are independent, with distribution µn . T T Denote X∗ ∈ Rn×p and Y∗ ∈ Rn×r as the matrix with rows Xi∗ and Yi∗ respectively. The starred   −1 T T . For every n there is positive estimator of β obtained from resampling is then β̂ ∗ = Y∗ X∗ X∗ X∗ T probability, albeit low, that X∗ X∗ is singular, and the probability of singularity decreases exponentially in n. We assume that displayed equation (1.17) in Chatterjee and Bose [2000] holds in order to circumvent singularity in our bootstrap procedure. The bootstrap is performed a total of B times with a new estimator β̂ ∗ computed at each iteration. We then estimate the variability of vec(β̂) with B n n o oT on X var∗ vec(β̂) = (B − 1)−1 vec(β̂b∗ ) − vec(β̄ ∗ ) vec(β̂b∗ ) − vec(β̄ ∗ ) b=1 where β̂b∗ is the bootstrap estimator of β at iteration b and β̄ ∗ = B −1 procedure in Algorithm 2. PB ∗ . We summarize this bootstrap b=1 β̂b Algorithm 2. Bootstrap procedure with random design matrix. Step 1. Set B and initialize b = 1. Step 2. Resample (XiT , YiT )T with replacement. T T Step 3. Compute β̂b∗ = Y∗ X∗ (X∗ X∗ )−1 , store vec(β̂b∗ ). Step 4. Repeat Steps 2-3, iterating b before returning to Step 2. n o Step 5. When b = B, compute var∗ vec(β̂) . We now show that the variability of vec(β̂) is estimated consistently by our multivariate bootstrap procedure which resamples cases. Let M be a non-negative definite matrix with entries Mjk = E vec(Xi εTi )j vec(Xi εTi )k   −1 −1 for j, k = 1, ..., rp and define ∆ = ΣX ⊗ Ir M ΣX ⊗ Ir . where n−1 XT X → ΣX a.e. as n → ∞. Then o   n √ nvec β̂ − β = vec n−1/2 εT X(n−1 XT X)−1   (4)  = (n−1 XT X)−1 ⊗ Ir vec n−1/2 εT X → N (0, ∆).   √ The next theorem states that nvec β̂ ∗ − β̂ is the same as (4). This is an extension of Theorems 3.1 and 3.2 of Freedman [1981] to the multivariate linear regression setting. 4 Theorem 2. Assume that (XiT , YiT )T ∈ Rp+r are independent, with a common distribution µ, E(k(XiT , YiT )T k4 ) < ∞, and ΣX = E(XX T ) is positive definite. Then, conditional on almost all sample paths, (XiT , YiT )T , i = 1, ..., n, as n → ∞,  T  a) n−1 X∗ X∗ →p ΣX , b) o √ n n vec(β̂ ∗ ) − vec(β̂) →d N (0, ∆), and b ∗ →p Σ. c) the sequence Σ The proof of Theorem 2, along with necessary lemmas, are included in the theoretical details section. 3 Examples 3.1 Simulations In this section we provide two simulated examples which show support for our multivariate bootstrap procedures. 3.1.1 Fixed design This example illustrates Theorem 1. We generated data according to the multivariate linear regression model (1) where Yi ∈ R3 , Xi ∈ R2 , and both β and Σ are prespecified. Our goal is to make inference about vec(β) using confidence regions. For each component of β, a 95% percentile interval computed using the residual bootstrap in Algorithm 1 is compared with a 95% confidence interval that assumes model (1) is correct. Four data sets were generated at different sample sizes and the performance of the multivariate residual bootstrap is assessed. The bootstrap is performed B = 4n times in each dataset. The results are displayed in Table 1. For the first two components of β, we see that the confidence regions obtained from both methods are close to each other and that the distance between the two shrinks as n increases. Similar results are obtained for the other components of β. n = 100 n = 500 n = 1000 n = 5000 component vec(β)1 vec(β)2 vec(β)1 vec(β)2 vec(β)1 vec(β)2 vec(β)1 vec(β)2 bootstrap (-0.062 0.958) (-0.873 0.330) ( 0.279 0.826) ( 0.070 0.655) ( 0.415 0.771) (-0.010 0.364) ( 0.509 0.684) (-0.031 0.143) confidence (-0.092 0.997) (-0.922 0.342) (0.256 0.823) (0.074 0.658) ( 0.410 0.768) (-0.020 0.350) ( 0.509 0.684) (-0.030 0.143) Table 1: Comparison of the 95% percentile interval and a 95% confidence interval for the first two components of vec(β). The number of bootstrap samples is B = 4n for each dataset. 5 3.1.2 Random design and heteroskedasticity This example aims to show support for Theorem 2. We generated data according to the multivariate linear regression model (1) where Yi ∈ R3 , Xi ∈ R2 , and both β and Σ are prespecified. The predictors and errors are generated according to       Xi 0 ΣX ΣXε ∼N , , εi 0 ΣεX Σ for i = 1, ..., n. Our goal is to make inference about vec(β) using the multivariate bootstrap procedure in the random design case. For each component of β, a 95% percentile interval computed using the residual bootstrap in Algorithm 2 is compared with a 95% confidence interval that assumes model (1) with heterogeneity is correct. Three data sets were generated at different sample sizes and the performance of the multivariate bootstrap is assessed. The bootstrap is performed a total of B = 4n times in each dataset. The results are displayed in Table 2. For the first two components of β, we see that the confidence regions obtained from both methods are close to each other and that the distance between the two shrinks as n increases. Similar results are obtained for the other components of β. n = 100 n = 500 n = 1000 n = 5000 component vec(β)1 vec(β)2 vec(β)1 vec(β)2 vec(β)1 vec(β)2 vec(β)1 vec(β)2 bootstrap (-0.013 1.617) ( 0.232 1.438) ( 0.638 1.208) ( 0.329 0.912) ( 0.937 1.323) ( 0.646 0.987) ( 0.995 1.161) ( 0.608 0.771) confidence (0.205 1.391) (0.296 1.366) (0.646 1.198) (0.369 0.868) (0.952 1.304) (0.659 0.982) (0.997 1.160) (0.616 0.764) Table 2: Comparison of the 95% percentile interval and a 95% confidence interval for the first two components of vec(β). The number of bootstrap samples is B = 4n for each dataset. 3.2 Cars data The data in this example, analyzed in Henderson and Velleman [1981], was extracted from the 1974 Motor Trend US magazine. The objective of this study is to compare aspects of automobile design on performance and fuel composition for 32 automobiles (1973-74) models. In this analysis, we assume that the multivariate model (1) with miles per gallon, displacement, and horse power as response variables and number of cylinders and transmission type are predictors. Number of cylinders and transmission type are both factor variables. The automobiles have either 4, 6, or 8 cylinders and their transmission type is either automatic or manual. For inference for β, we compare a 95% bootstrap percentile region using the fixed design bootstrap in Algorithm 1 with a 95% confidence interval. The number of bootstrap resamples is set at B = 4n. The results are depicted in Table 3. We see that inferences about β are fairly similar for both methods. 6 component vec(β)1 vec(β)2 vec(β)3 vec(β)4 vec(β)5 bootstrap ( 2.734 7.027) ( -3.693 0.630) ( -6.823 -4.173) ( 0.326 5.745) (-134.667 -52.921) confidence ( 2.286 7.136) ( -3.806 0.916) ( -6.900 -3.812) ( 0.181 4.939) (-134.408 -56.787) Table 3: Comparison of the 95% percentile interval and a 95% confidence interval for the first five components of vec(β). 4 Theoretical details Before we present our proof of Theorems 1 and 2, we motivate the Mallows metric as a central tool for our proof technique. The Mallows metric for probabilities in Rp , relative to the Euclidean norm was the driving force needed to establish the validity of the residual bootstrap approximation in the context of univariate regression [Bickel and Freedman, 1981, Freedman, 1981]. The Mallows metric, relative to the Euclidean norm, for two probability measures µ, ν in Rp , denoted dpl (µ, ν), is   dpl (µ, ν) = inf E 1/l kU − V kl . U ∼µ,V ∼ν Properties of the Mallows metric are developed for random variables on separable Banach spaces of finite dimension [Bickel and Freedman, 1981]. Since Rk is indeed a separable Banach space for a natural number k, the theory in Bickel and Freedman [1981] applies to our case. In the present article, we use the Mallows metric when r > 1 to prove that the residual bootstrap can be used to estimate the variability of vec(β̂) consistently. 4.1 Fixed design o √ n Let Ψn (F ) be the distribution function of n vec(β̂) − vec(β) where F is the law of the errors ε so that Ψn (F ) is a probability measure on Rrp . Let G be an alternate law of the errors, where it is assumed that G is mean-zero with finite variance ΣG > 0. In applications, G will be the centered empirical distribution of the residuals.  T −1 2 Theorem 3. [drp {dr2 (F, G)}2 . 2 {Ψn (F ), Ψn (G)}] ≤ nr tr (X X) √ Proof. Let A = X(XT X)−1 . Then Ψn (F ) is the law of nεTn (F )A where εn (F ) is the matrix with n rows of independent random variables ε, having common law F . Ψn (G) can be thought of similarly. Observe that AT A = (XT X)−1 . Then, from Lemma 8.9 in Bickel and Freedman [1981], we see that 2 2 rp  T T [drp 2 {Ψn (F ), Ψn (G)}] = d2 vec{εn (F )A}, vec{εn (G)A}  T 2 T T T = drp 2 (A ⊗ Ir )vec{εn (F )}, (A ⊗ Ir )vec{εn (G)}   ≤ n tr (AT ⊗ Ir )(AT ⊗ Ir )T {dr2 (F, G)}2 = n tr (AT ⊗ Ir )(A ⊗ Ir ) {dr2 (F, G)}2   = n tr AT A ⊗ Ir {dr2 (F, G)}2 = n tr (XT X)−1 ⊗ Ir {dr2 (F, G)}2  = nr tr (XT X)−1 {dr2 (F, G)}2 , which is our desired conclusion. 7 With Theorem 3 we can bound the distance between the sample dependent distribution functions Ψn (F ) and Ψn (G) by the distance between their underlying laws. As in Freedman [1981], we proceed with Fn as the empirical distribution function of ε1 , ..., εn . Let Fen be the empirical distribution P of the residuals εb1 , ..., εbn from the original regression, and let Fbn be Fen centered at its mean µ̂ = n−1 ni=1 εbi . Since εb = Y − Xβ̂ T , we have εb − ε = −Pε where P is the projection into the column space of X. n o Lemma 1. E 2 dr2 (Fen , Fn ) ≤ p tr(Σ)/n. Proof. From the definition of the Mallows metric we have n n o2 n o X dr2 (Fen , Fn ) ≤ n−1 kb εi − εi k2 = n−1 tr (b ε − ε)T (b ε − ε) i=1 =n −1  tr εT Pε . From linearity of the expectation with respect to the trace operator,       E tr εT Pε = tr E εT Pε = tr PE εεT ≤ tr (P) tr (Σ) = p tr (Σ) and this completes the proof. n o Lemma 2. E 2 dr2 (Fbn , Fn ) ≤ (p + 1) tr(Σ)/n. Proof. From Lemma 8.8 in Bickel and Freedman [1981] we have dr2 (Fbn , Fn )2 = dr2 {Fen − E(Fen ), Fn − E(Fn )}2 + kE(Fn )k2 = dr (Fen , Fn )2 − kE(Fen ) − E(Fn )k2 + kE(Fn )k2 2 ≤ dr2 (Fen , Fn )2 + kn−1 n X i=1 εi k2 with the empirical distribution functions Fn ,Fen , and Fbn used as random variables in the application of Lemma 8.8 in Bickel and Freedman [1981]. We see that    ! n n   X X X  εTi εi + εi k2 = n−2 E  E kn−1 εTi εj  = n−1 E(εT1 ε1 ) = n−1 tr (Σ) .   i=1 i=1 i6=j Our conclusion follows from Lemma 1. These results imply the validity of the bootstrap approximation for the model (1) if we assume that → ΣX > 0. From Theorem 3, h i  b E drp {Ψ ( F ), Ψ (F )} ≤ nr tr (XT X)−1 dr2 (Fbn , F ) n n n 2 n−1 XT X and because of the metric properties of dr2 (·, ·) 1 r b d (Fn , F )2 ≤ dr2 (Fbn , Fn )2 + dr2 (Fn , F )2 2 2 where Lemma 2 shows that dr2 (Fbn , Fn )2 →p 0 and Lemma 8.4 of [Bickel and Freedman, 1981] implies that dr2 (Fn , F )2 →p 0 with the separable Banach space taken to be Rr . The next results are special cases of Lai et al. [1979] which are adapted from Freedman [1981] to the multivariate setting. We let εj , j = 1, ..., r, be the column of ε corresponding to the errors of response Yj . 8 Lemma 3. n−1 XT ε → 0 a.s. and β̂ → β a.s. Proof. Let Aj be the jth column of ε. Then n−1 XT ε ∈ Rp×r with columns n−1 XT ε. Lemma 2.3 of Freedman [1981] states that n−1 XT Aj → 0 a.s. for any particular j = 1, ..., r. Therefore n−1 XT ε → 0 a.s. A similar argument verifies our second result.  Lemma 4. n−1 tr (b ε − ε)T (b ε − ε) → 0 a.s.. Proof. A similar argument to that of Lemma 2.4 in Freedman [1981] gives   n−1 tr (b ε − ε)T (b ε − ε) = n−1 tr εT X(XT X)−1 XT ε n  −1 −1 T o = tr n−1 εT X n−1 XT X n X ε . The center term converges to ΣX > 0 and the left and right terms converge to 0 a.s. by Lemma 3. Our result follows. Lemma 5. dr2 (Fbn , Fn ) → 0 a.s. and dr2 (Fbn , F ) → 0 a.s. Proof. From the arguments in the proofs of Lemmas 1 and 2 we have that dr2 (Fbn , Fn ) = dr2 (Fen , Fn )2 − kE(Fen ) − E(Fn )k2 + kE(Fn )k2 n n X X (b εi − εi ) k2 + dr2 (Fen , Fn ) εi k2 − kn−1 = kn−1 ≤ kn−1 i=1 n X i=1 i=1  εi k2 + n−1 tr (b ε − ε)T (b ε − ε) which converges to 0 a.s. by Lemma 4. Therefore the first convergence result holds. From the metric properties of the Mallows metric we have that 1 r b d (Fn , F )2 ≤ dr2 (Fbn , Fn )2 + dr2 (Fn , F )2 . 2 2 Our second convergence result follows from the first convergence result and Lemma 8.4 of Bickel and Freedman [1981]. Lemma 6. Let ui and vi , i = 1, ..., n, be r × 1 vectors. Let ū = n−1 n X ui , and s2u = n−1 n X i=1 i=1 (ui − ū)(ui − ū)T and similarly for v. Then ks2u − s2v k2F ≤ kn−1 n X (ui − vi )(ui − vi )T k2F i=1 where k · kF is the Frobenius norm. 9 Proof. We have ks2u − s2v k2F = ≤ n n X X j=1 k=1 n n X X |n−1 |n−1 j=1 k=1 n X −1 = kn i=1 n X i=1 n X i=1 (ui − ū)j (ui − ū)Tk − n−1 n X (vi − v̄)j (vi − v̄)Tk |2 i=1 (ui − vi )j (ui − vi )k |2 (ui − vi )(ui − vi )T k2F , where the inequality follows from [Freedman, 1981, Lemma 2.7]. The proof of Theorem 1 is now given. Before we this Theorem, define the vech(A) ∈ Rp(p+1)/2×1 operator to be the function that stacks the unique p(p + 1)/2 elements of any symmetric matrix A ∈ Rp×p . Proof. Exchange Fbn for G in Theorem 3 and observe that o n  bn ) ≤ nr tr (XT X)−1 dr (F, Fbn )2 . drp Ψ (F ), Ψ ( F n n 2 2 From Lemma 5 we know that dr2 (F, Fbn )2 → 0 almost everywhere. Our result for part a) follows since F is mean-zero normal with variance Σ−1 X ⊗ Σ. We now show that part b) holds. First, we need to establish that b Σ → Σ almost everywhere. To see this, introduce Σn = n −1 n X εi εTi − i=1 Clearly, Σn → Σ a.s. Let Cn = n−1 Pn i=1 (ε̂i n −1 n X i=1 εi ! n −1 n X εi i=1 !T . − εi ) (ε̂i − εi )T . We have, b − Σn k2F ≤ kCn k2F = tr(Cn Cn ) ≤ tr2 (Cn ) kΣ ) ( n X (b εi − εi )T (b εi − εi ) = tr2 n−1 = tr 2  i=1 n −1 (b ε − ε)T (b ε − ε) → 0 b n and Σn taking the place of s2 and s2 rea.s. where the first inequality follows from Lemma 6 with Σ v u spectively, the second inequality follows from the fact that Cn is positive definite a.s., and the convergence follows from Lemma   4. ∗ b∗ Let Dn = E kΣ n − Σn kF | Y1 , ..., Yn . From Lemma 6 and the proof of Lemma 1 we see that, Dn ≤ E ( kn −1 n X i=1  T εb∗i − ε∗i εb∗i − ε∗i kF | Y1 , ..., Yn   ≤ E tr n−1 (b ε∗ − ε∗ )T (b ε∗ − ε∗ )   b /n ≤ p tr Σ 10 | Y1 , ..., Yn  ) where  the  last inequality follows from the argument that proves Lemma 1 applied to the starred data, and b /n → 0 a.s. It remains to show that Σ b ∗n converges to Σ. Conditional on Y1 , ..., Yn , p tr Σ r(r+1)/2 d2 ≤ ( ) n X T ∗ ∗ −1 −1 vech(εi εTi ) vech(εi εi ), n n i=1 i=1 n X r(r+1)/2 d2   T ∗ ∗ T vech(ε1 ε1 ), vech(ε1 ε1 ) (5) ∗ by Lemma 8.6 in Bickel and Fbn and ε has law Foand  n  Freedman [1981]. Now ε has conditional distribution T Lemma 5 gives dr2 Fbn , F → 0 almost everywhere. We now show that d1 vech(ε∗1 ε∗1 ), vech(ε1 εT1 ) →  0 a.s. by Lemma 8.5 of Bickel and Freedman [1981] with φ(x) = vech xxT where x ∈ Rr . To do this, we show that K can be chosen so that kφ(x)k1 ≤ K(1 + kxk22 ) where k · k1 and P k · k2 are the L1 and L2 norms respectively. From the definition of the Euclidean norm, we have kxk22 = ri=1 x2i . It is clear that r 2 2 xi + xj ≥ 2|xi xj | for all i, j = 1, ..., r. Now, pick K = 2 + 1. We see that K(1 + kxk22 ) ≥ r X x2i i=1 i=1 r X ≥ A similar argument shows that 1/n Pn  X r r r X X r 2 2 xi + |xi xj | xi ≥ + 2 i≥j i=1 i6=j  |xi xj | ≥ kvech xxT k1 = kφ(x)k1 ∗ converges to 0. Part c) follows from both a) and b). i=1 εi 4.2 Random design and heteroskedasticity In this section we provide the proof of Theorem 2. Several quantities and lemmas are introduced in order to prove Theorem 2. The logic follows that of [Freedman, 1981, Section 3]. Define, Z Σ(µ) = xxT µ(dx), Z β(µ) = yxT µ(dx, dy)Σ(µ)−1 , ε(µ, x, y) = y − β(µ)xT . The next two lemmas are needed to prove Theorem 2. Lemma 7. If dp+r 4 (µn , µ) → 0 as n → ∞, then a) Σ(µn ) → Σ(µ) and β(µn ) → β(µ), b) the µn -law of vec{ε(µn , x, y)xT } converges to the µ-law of vec{ε(µ, x, y)xT } in drp 2 , c) the µn -law of kε(µn , x, y)k2 converges to the µ-law of kε(µ, x, y)k2 in d1 . Proof. Part a) immediately follows from [Bickel and Freedman, 1981, Lemma 8.3c]. 11 We use [Bickel and Freedman, 1981, Lemma 8.3a] to verify part b). The weak convergence step is evident. Now, kvec{ε(µn , x, y)xT }k2 = kvec{yxT − β(µn )xxT }k2 = kvec(yxT )k2 + kvec(β(µn )xxT )k2 − 2vec(yxT )T vec{β(µn )xxT }. Let z = (xT , y T )T . Part b) follows from, integration with respect to µn , part a), and [Bickel and Freedman, 1981, Lemma 8.5] with φ(z) = vech(zz T ). The steps involving [Bickel and Freedman, 1981, Lemma 8.5] are similar to those in the proof of Theorem 1. Part c) follows from the same argument used to prove part b). Lemma 8. dp+r 4 (µn , µ) → 0 a.e. as n → ∞. Proof. The steps are the same as those in [Freedman, 1981, Lemma 3.2]. The proof of Theorem 2 is now given. Proof. We can write    o n√  T ∗ −1 T ∗ √ ∗ ∗ ∗ n β̂ − β̂ n Y X (X X ) − β̂ = vec vec    T ∗ −1 √ ∗ ∗ T T ∗ ∗ = vec n (ε + X β̂ ) X (X X ) − β̂   T T = vec n−1/2 ε∗ X∗ (n−1 X∗ X∗ )−1    −1 −1  = W ∗ ⊗ Ir vec(Z ∗ ) = vec Z ∗ W ∗ T T where Z ∗ = n−1/2 ε∗ X∗ and W ∗ = n−1 X∗ X∗ . [Freedman, 1981, Theorem 3.1] implies that the conditional law, conditional on (Xi , Yi ), i = 1, ..., n, of W ∗ →p ΣX . This verifies part a). We now verify part b). From [Bickel and Freedman, 1981, Lemma 8.7], we have  2 T 2 rp rp  ∗ ∗ ∗ T d2 vec(Z ), vec(Z) ≤ d2 vec(Xi εi ), vec(Xi εi ) where the right side goes to 0 a.e. as n → ∞. Lemma 8 states that µn → µ a.e. in d4r+p as n → ∞ and part b) of Lemma 7 implies that the distribution of vec(Z ∗ ), conditional on (Xi , Yi ), i = 1, ..., n, converges to vec(Z). The random variable vec(Z) is normally distributed with mean 0 and  variance matrix M . −1 ∗ ⊗ Ir vec(Z ∗ ) converges to Combining this with part a) verifies that the conditional distribution of W  Σ−1 X ⊗ Ir vec(Z) as n → ∞. This completes the proof of part b). Part c) follows from the same argument in the proof of Theorem 1 where Lemmas 8 and 7c combine to show that (5) converges to 0 as n → ∞. Note that ε∗1 = Y1∗ − β̂X1∗ in this argument. This completes the proof. 5 Acknowledgments The author would like to thank Karl Oskar Ekvall, Forrest Crawford, Snigdhansu Chatterjee, Dennis Cook, and two anonymous referees for providing valuable feedback which led to the strengthening of this article. 12 References P. J. Bickel and D. A. Freedman. Some asymptotic theory for the bootstrap. Ann. Statist., 9:1196–1217, 1981. S. Chatterjee and A. Bose. Variance estimation in high dimensional models. Statist. Sin., 10:497–515, 2000. P. Diaconis and B. Efron. Computer intensive methods in statistics. Sci. Am., 248, 1983. D. A. Freedman. Bootstrapping regression models. Ann. Statist., 9:1218–1228, 1981. D. A. Freedman and S. C. Peters. Bootstrapping a regression equation: Some empirical results. J. Am. Statist. Assoc., 79:97–106, 1984. H. V. Henderson and P. F. Velleman. Building multiple regression models interactively. Biometrics, 37: 391–411, 1981. T. Lai, H. Robbins, and V. Wei. Strong consistency of least squares estimated in multiple regression. J. Mult. Anal., 9:343–361, 1979. S. Weisberg. Applied Linear Regression. Wiley, New Jersey, 2005. 13
10math.ST
Published as a conference paper at ICLR 2018 DYNAMIC N EURAL P ROGRAM E MBEDDINGS FOR P RO GRAM R EPAIR arXiv:1711.07163v3 [cs.AI] 25 Feb 2018 Ke Wang∗ University of California Davis, CA 95616, USA [email protected] Rishabh Singh Microsoft Research Redmond, WA 98052, USA [email protected] Zhendong Su University of California Davis, CA 95616, USA [email protected] A BSTRACT Neural program embeddings have shown much promise recently for a variety of program analysis tasks, including program synthesis, program repair, codecompletion, and fault localization. However, most existing program embeddings are based on syntactic features of programs, such as token sequences or abstract syntax trees. Unlike images and text, a program has well-defined semantics that can be difficult to capture by only considering its syntax (i.e. syntactically similar programs can exhibit vastly different run-time behavior), which makes syntaxbased program embeddings fundamentally limited. We propose a novel semantic program embedding that is learned from program execution traces. Our key insight is that program states expressed as sequential tuples of live variable values not only capture program semantics more precisely, but also offer a more natural fit for Recurrent Neural Networks to model. We evaluate different syntactic and semantic program embeddings on the task of classifying the types of errors that students make in their submissions to an introductory programming class and on the CodeHunt education platform. Our evaluation results show that the semantic program embeddings significantly outperform the syntactic program embeddings based on token sequences and abstract syntax trees. In addition, we augment a search-based program repair system with predictions made from our semantic embedding and demonstrate significantly improved search efficiency. 1 I NTRODUCTION Recent breakthroughs in deep learning techniques for computer vision and natural language processing have led to a growing interest in their applications in programming languages and software engineering. Several well-explored areas include program classification, similarity detection, program repair, and program synthesis. One of the key steps in using neural networks for such tasks is to design suitable program representations for the networks to exploit. Most existing approaches in the neural program analysis literature have used syntax-based program representations. Mou et al. (2016) proposed a convolutional neural network over abstract syntax trees (ASTs) as the program representation to classify programs based on their functionalities and detecting different sorting routines. DeepFix (Gupta et al., 2017), SynFix (Bhatia & Singh, 2016), and sk p (Pu et al., 2016) are recent neural program repair techniques for correcting errors in student programs for MOOC assignments, and they all represent programs as sequences of tokens. Even program synthesis techniques that generate programs as output, such as RobustFill (Devlin et al., 2017), also adopt a token-based program representation for the output decoder. The only exception is Piech et al. (2015), which introduces a novel perspective of representing programs using input-output pairs. However, such representations are too coarse-grained to accurately capture program properties — programs with the same input-output behavior may have very different syntactic characteristics. Consequently, the embeddings learned from input-output pairs are not precise enough for many program analysis tasks. Although these pioneering efforts have made significant contributions to bridge the gap between deep learning techniques and program analysis tasks, syntax-based program representations are fundamentally limited due to the enormous gap between program syntax (i.e. static expression) and ∗ Work done during an internship at Microsoft Research. 1 Published as a conference paper at ICLR 2018 s t a t i c int[] InsertionSort(int[] A) { int left = 0; int right = A.Length; s t a t i c int[] BubbleSort(int[] A) { int left = 0; int right = A.Length - 1; for (int i = right;i > left;i--) { for (int j = left;j < i;j++) { if (A[j] > A[j + 1]) { int tmp = A[j]; for (int i = left;i < right;i++) { for (int j = i - 1;j >= left;j--) { if (A[j] > A[j + 1]) { int tmp = A[j]; A[j] = A[j + 1]; // instrumentation line Console.WriteLine( string.Join(",", A) ); A[j] = A[j + 1]; // instrumentation line Console.WriteLine( string.Join(",", A) ); A[j + 1] = tmp; // instrumentation line Console.WriteLine( string.Join(",", A) ); A[j + 1] = tmp; // instrumentation line Console.WriteLine( string.Join(",", A) ); }}} }}} return A; } return A; Bubble [5,5,1,4,3] [5,8,1,4,3] [5,1,1,4,3] [5,1,8,4,3] [1,1,8,4,3] [1,5,8,4,3] [1,5,4,4,3] [1,5,4,8,3] [1,4,4,8,3] [1,4,5,8,3] [1,4,5,3,3] [1,4,5,3,8] [1,4,3,3,8] [1,4,3,5,8] [1,3,3,5,8] [1,3,4,5,8] Insertion [5,5,1,4,3] [5,8,1,4,3] [5,1,1,4,3] [5,1,8,4,3] [5,1,4,4,3] [5,1,4,8,3] [5,1,4,3,3] [5,1,4,3,8] [1,1,4,3,8] [1,5,4,3,8] [1,4,4,3,8] [1,4,5,3,8] [1,4,3,3,8] [1,4,3,5,8] [1,3,3,5,8] [1,3,4,5,8] } Figure 1: Bubble sort and insertion sort (code highlighted in shadow box are the only syntactic differences between the two algorithms). Their execution traces for the input vector A = [8, 5, 1, 4, 3]are displayed on the right, where, for brevity, only values for variable A are shown. static int max(int[] arr) { 1 Variable Trace State Trace {max val : −∞} {max val : −∞, item : ⊥} {item : 1} {max val : −∞, item : 1} {max val : 1} {max val : 1, item : 1} {item : 5} {max val : 1, item : 5} {max val : 5} {max val : 5, item : 5} {item : 3} {max val : 5, item : 3} 2 int max_val = int.MinValue; 3 4 foreach(int item in arr) { if (item > max_val) max_val = item; } 5 6 7 8 9 10 return max_val; 11 12 } Figure 2: Example for illustrating program dependency. Table 1: Variable and state traces obtained by executing function max, given arr = [1, 5, 3]. semantics (i.e. dynamic execution). This gap can be illustrated as follows. First, when a program is executed at runtime, its statements are almost never interpreted in the order in which the corresponding token sequence is presented to the deep learning models (the only exception being straightline programs, i.e., ones without any control-flow statements). For example, a conditional statement only executes one branch each time, but its token sequence is expressed sequentially as multiple branches. Similarly, when iterating over a looping structure at runtime, it is unclear in which order any two tokens are executed when considering different loop iterations. Second, program dependency (i.e. data and control) is not exploited in token sequences and ASTs despite its essential role in defining program semantics. Figure 2 shows an example using a simple max function. On line 8, the assignment statement means variable max val is data-dependent on item. In addition, the execution of this statement depends on the evaluation of the if condition on line 7, i.e., max val is also control-dependent on item as well as itself. Third, from a pure program analysis standpoint, the gap between program syntax and semantics is manifested in that similar program syntax may lead to vastly different program semantics. For example, consider the two sorting functions shown in Figure 1. Both functions sort the array via two nested loops, compare the current element to its successor, and swap them if the order is incorrect. However, the two functions implement different algorithms, namely Bubble Sort and Insertion Sort. Therefore minor syntactic discrepancies can lead to significant semantic differences. This intrinsic weakness will be inherited by any deep learning technique that adopts a syntax-based program representation. 2 Published as a conference paper at ICLR 2018 To tackle this aforementioned fundamental challenge, this paper proposes a novel semantic program embedding that is learned from the program’s runtime behavior, i.e. dynamic program execution traces. We execute a program on a set of test cases and monitor/record the program states comprising of variable valuations. We introduce three approaches to embed these dynamic executions: (1) variable trace embedding — consider each variable independently, (2) state trace embedding — consider sequences of program states, each of which comprises of a set of variable values, and (3) hybrid embedding — incorporate dependencies into individual variable sequences to avoid redundant variable values in program states. Our novel program embeddings address the aforementioned issues with the syntactic program representations. The dynamic program execution traces precisely illustrate the program behaves at runtime, and the values for each variable at each program point precisely models the program semantics. Regarding program dependencies, the dynamic execution traces, expressed as a sequential list of tuples (each of which represents the value of a variable at a certain program point), provides an opportunity for Recurrent Neural Network (RNN) to establish the data dependency and control dependency in the program. By monitoring particular value patterns between interacting variables, the RNN is able to model their relationship, leading to more precise semantic representations. Reed & De Freitas (2015) recently proposed using program traces (as a sequence of actions/statements) for training a neural network to learn to execute an algorithm such as addition or sorting. Their notion of program traces is different from our dynamic execution traces consisting of program states with variable valuations. Our notion offers the following advantages: (1) a sequence of program states can be viewed as a sequence of input-output pairs of each executed statement, in other words, sequences of program states provide more robust information than that from sequences of executed statements, and (2) although a sequence of executed statements follows dynamic execution, it is still represented syntactically, and therefore may not adequately capture program semantics. For example, consider the two sorting algorithms in Figure 1. According to Reed & De Freitas (2015), they will have an identical representation w.r.t. statements that modify the variable A, i.e. a repetition of A[j] = A[j + 1] and A[j + 1] = tmp for eight times. Our representation, on the other hand, can capture their semantic differences in terms of program states by also only considering the valuation of the variable A. We have evaluated our dynamic program embeddings in the context of automated program repair. In particular, we use the program embeddings to classify the type of mistakes students made to their programming assignments based on a set of common error patterns (described in the appendix). The dataset for the experiments consists of the programming submissions made to Module 2 assignment in Microsoft-DEV204.1X and two additional problems from the Microsoft CodeHunt platform. The results show that our dynamic embeddings significantly outperform syntax-based program embeddings, including those trained on token sequences and abstract syntax trees. In addition, we show that our dynamic embeddings can be leveraged to significantly improve the efficiency of a searchbased program corrector S ARF G EN1 (Wang et al., 2017) (the algorithm is presented in the appendix). More importantly, we believe that our dynamic program embeddings can be useful for many other program analysis tasks, such as program synthesis, fault localization, and similarity detection. To summarize, the main contributions of this paper are: (1) we show the fundamental limitation of representing programs using syntax-level features; (2) we propose dynamic program embeddings learned from runtime execution traces to overcome key issues with syntactic program representations; (3) we evaluate our dynamic program embeddings for predicting common mistake patterns students make in program assignments, and results show that the dynamic program embeddings outperform state-of-the-art syntactic program embeddings; and (4) we show how the dynamic program embeddings can be utilized to improve an existing production program repair system. 2 BACKGROUND : DYNAMIC P ROGRAM A NALYSIS This section briefly reviews dynamic program analysis (Ball, 1999), an influential program analysis technique that lays the foundation for constructing our new program embeddings. Unlike static analysis (Nielson et al., 1999), i.e., the analysis of program source code, dynamic analysis focuses on program executions. An execution is modeled by a set of atomic actions, or events, 1 Currently integrated with Microsoft-DEV204.1X as a feedback generator for production use. 3 Published as a conference paper at ICLR 2018 organized as a trace (or event history). For simplicity, this paper considers sequential executions only (as opposed to parallel executions) which lead to a single sequence of events, specifically, the executions of statements in the program. Detailed information about executions is often not readily available, and separate mechanisms are needed to capture the tracing information. An often adopted approach is to instrument a program’s source code (i.e., by adding additional monitoring code) to record the execution of statements of interest. In particular, those inserted instrumentation statements act as a monitoring window through which the values of variables are inspected. This instrumentation process can occur in a fully automated manner, e.g., a common approach is to traverse a program’s abstract syntax tree and insert “write” statements right after each program statement that causes a side-effect (i.e., changing the values of some variables). Consider the two sorting algorithms depicted in Figure 1. If we assume A to be the only variable of interest and subject to monitoring, we can instrument the two algorithms with Console.WriteLine(A) after each program location in the code whenever A is modified2 (i.e. the lines marked by comments). Given the input vector A = [8, 5, 1, 4, 3], the execution traces of the two sorting routines are shown on the right in Figure 1. One of the key benefits of dynamic analysis is its ability to easily and precisely identify relevant parts of the program that affect execution behavior. As shown in the example above, despite the very similar program syntax of bubble sort and insertion sort, dynamic analysis is able to discover their distinct program semantics by exposing their execution traces. Since understanding program semantics is a central issue in program analysis, dynamic analysis has seen remarkable success over the past several decades and has resulted in many successful program analysis tools such as debuggers, profilers, monitors, or explanation generators. 3 OVERVIEW OF THE A PPROACH We now present an overview of our approach. Given a program and the execution traces extracted for all its variables, we introduce three neural network models to learn dynamic program embeddings. To demonstrate the utility of these embeddings, we apply them to predict common error patterns (detailed in Section 5) that students make in their submissions to an online introductory programming course. Variable Trace Embedding As shown in Table 1, each row denotes a new program point where a variable gets updated.3 The entire variable trace consists of those variable values at all program points. As a subsequent step, we split the complete trace into a list of sub-traces (one for each variable). We use one single RNN to encode each sub-trace independently and then perform max pooling on the final states of the same RNN to obtain the program embedding. Finally, we add a one layer softmax regression to make the predictions. The entire workflow is show in Figure 3. State Trace Embedding Because each variable trace is handled individually in the previous approach, variable dependencies/interactions are not precisely captured. To address this issue, we propose the state trace embedding. As depicted in Table 1, each program point l introduces a new program state expressed by the latest variable valuations at l. The entire state trace is a sequence of program states. To learn the state trace embedding, we first use one RNN to encode each program state (i.e., a tuple of values) and feed the resulting RNN states as a sequence to another RNN. Note that we do not assume that the order in which variables values are encoded by the RNN for each program state but rather maintain a consistent order throughout all program states for a given trace. Finally, we feed a softmax regression layer with the final state of the second RNN (shown in Figure 4). The benefit of state trace embedding is its ability to capture dependencies among variables in each program state as well as the relationship among program states. Dependency Enforcement for Variable Trace Embedding Although state trace embedding can better capture program dependencies, it also comes with some challenges, the most significant of which is redundancy. Consider a looping structure in a program. During an iteration, whenever 2 3 On the abstract syntax trees to enable complete automation regardless of the structure of programs. We ignore the input variable arr since it is read-only (similarly for the state trace later). 4 Published as a conference paper at ICLR 2018 Figure 3: Variable trace for program embedding. Figure 4: State trace for program embedding. Figure 5: Dependency enforcement embedding. Dotted lines denoted dependencies. one variable gets modified, a new program state will be created containing the values of all variables, even of those unmodified by the loop. This issue becomes more severe for loops with larger numbers of iterations. To tackle this challenge, we propose the third and final approach, dependency enforcement for variable trace embedding (hereinafter referred as dependency enforcement embedding), that combines the advantages of variable trace embedding (i.e., compact representation of execution traces) and state trace embedding (i.e., precise capturing of program dependencies). In dependency enforcement embedding, a program is represented by separate variable traces, with each variable being handled by a different RNN. In order to enforce program dependencies, the hidden states from different RNNs will be interleaved in a way that simulates the needed data and control dependencies. Unlike variable trace embedding, we perform an average pooling on the final states of all RNNs to obtain the program embedding on which we build the final layer of softmax regression. Figure 5 describes the workflow. 5 Published as a conference paper at ICLR 2018 4 DYNAMIC P ROGRAM E MBEDDINGS We now formally define the three program embedding models. 4.1 VARIABLE T RACE M ODEL Given a program P , and its variable set V (v0 , v1 ,..., vn ∈ V ), a variable trace is a sequence of values a variable has been assigned during the execution of P .4 Let xt vn denote the value from the variable trace of vn that is fed to the RNN encoder (Gated Recurrent Unit) at time t as the input, and ht vn as the resulting RNN’s hidden state. We compute the variable trace embedding for P in Equation (3) as follows (hT vn denotes the last hidden state of the encoder): ht v1 = GRU(ht−1 v1 , xt v1 ) ... ht vn = GRU(ht−1 vn , xt vn ) hP = MaxPooling(hT (1) v1 , ..., hT vn ) (2) Evidence = (WhP + b) (4) (3) Y = softmax(Evidence) (5) We compute the representation of the program trace by performing max pooling over the last hidden state representation of each variable trace embedding. The hidden states ht v1 , . . . , ht vn , hP ∈ Rk where k denotes the size of hidden layers of the RNN encoder. Evidence denotes the output of a linear model through the program embedding vector hP , and we obtain the predicted error pattern class Y by using a softmax operation. 4.2 S TATE T RACE M ODEL The key idea in state trace model is to embed each program state as a numerical vector first and then feed all program state embeddings as a sequence to another RNN encoder to obtain the program embedding. Suppose xt vn is the value of variable vn at t-th program state, and ht vn is the resulting hidden state of the program state encoder. Equation (8) computes the t-th program state embedding. Equations (9-11) encode the sequence of all program state embeddings (i.e., ht vn , ht+1 vn , . . . , ht+m vn ) with another RNN to compute the program embedding. ht v1 = GRU(ht v0 , xt v1 ) (6) ht v2 = GRU(ht v1 , xt v2 ) ... ht vn = GRU(ht vn−1 , xt vn ) (7) (8) h0t vn = GRU(h0t−1 vn , ht vn ) h0t+1 vn = GRU(h0t vn , ht+1 vn ) ... hP = GRU(h0t+m−1 vn , xt+m vn ) (9) (10) (11) ht v1 , . . . , ht vn ∈ Rk1 ; h0t vn , . . . , hP ∈ Rk2 where k1 and k2 denote, respectively, the sizes of hidden layers of the first and second RNN encoders. 4.3 D EPENDENCY E NFORCEMENT FOR VARIABLE T RACE E MBEDDING The motivation behind this model is to combine the advantages of the previous two approaches, i.e. representing the execution trace compactly while enforcing the dependency relationship among variables as much as possible. In this model, each variable trace is handled with a different RNN. A potential issue to be addressed is variable matching/renaming (i.e., α-renaming). In other words same variables may be named differently in different programs. Processing each variable id with a single RNN among all programs in the dataset will not only cause memory issues, but more importantly the loss of precision. Our solution is to (1) execute all programs to collect traces for all variables, (2) perform dynamic time wrapping (Vintsyuk, 1968) on the variable traces across all programs to find the top-n most used variables that account for the vast majority of variable usage, and (3) rename the top-n most used variables consistently across all programs, and rename all other variables to a same special variable. 4 For presentation simplicity and w.l.o.g., we assume that the program does not take any inputs. 6 Published as a conference paper at ICLR 2018 Given the same set of variables among all programs, the mechanism of dependency enforcement on the top ones is to fuse the hidden states of multiple RNNs based on how a new value of a variable is produced. For example, in Figure 2 at line 8, the new value of max val is data-dependent on item, and control-dependent on both item and itself. So at the time step when the new value of max val is produced, the latest hidden states of the RNNs encode variable item as well as itself; they together determine the previous state of the RNN upon which the new value of max val is produced. If a value is produced without any dependencies, this mechanism will not take effect. In other words, the RNN will act normally to handle data sequences on its own. In this work we enforce the data-dependency in assignment statement, declaration statement and method calls; and control-dependency in control statements such as if , f or and while statements. Equations (11 and 12) expose the inner workflow. hLT vm denotes the latest hidden state of the RNN encoding variable trace of vm up to the point of time t when xt vn is the input of the RNN encoding variable trace of vn . denotes element-wise matrix product. ht−1 vn = hLT v1 hLT vm hLT vn ht vn = GRU(ht−1 vn , xt vn ) (12) 5 Given vn depends on v1 and vm hP = AveragePooling(hT v1 , ..., hT vn ) (11) (13) E VALUATION We train our dynamic program embeddings on the programming submissions obtained from Assignment 2 from Microsoft-DEV204.1X: “Introduction to C#” offered on edx and two other problems on Microsoft CodeHunt platform. • Print Chessboard: Print the chessboard pattern using “X” and “O” to represent the squares as shown in Figure 6. • Count Parentheses: Count the depth of nesting parentheses in a given string. • Generate Binary Digits: Generate the string of binary digits for a given integer. XOXOXOXO OXOXOXOX XOXOXOXO OXOXOXOX XOXOXOXO OXOXOXOX XOXOXOXO OXOXOXOX Figure 6: The desired output for the chessboard exercise. Regarding the three programming problems, the errors students made in their submissions can be roughly classified into low-level technical issues (e.g., list indexing, branching conditions or looping bounds) and high-level conceptual issues (e.g., mishandling corner case, misunderstanding problem requirement or misconceptions on the underlying data structure of test inputs).5 In order to have sufficient data for training our models to predict the error patterns, we (1) convert each incorrect program into multiple programs such that each new program will have only one error, and (2) mutate all the correct programs to generate synthetic incorrect programs such that they exhibit similar errors that students made in real program submissions. These two steps allow us to set up a dataset depicted in Table 2. Based on the same set of training data, we evaluate the dynamic embeddings trained with the three network models and compare them with the syntax-based program embeddings (on the same error prediction task) on the same testing data. The syntax-based models include (1) one trained with a RNN that encodes the run-time syntactic traces of programs (Reed & De Freitas, 2015); (2) another trained with a RNN that encodes token sequences of programs; and (3) the third trained with a RNN on abstract syntax trees of programs (Socher et al., 2013). Problem Print Chessboard Count Parentheses Generate Binary Digits Program Submissions Correct Incorrect 2,281 742 505 315 518 371 Synthetic Data Training Validation Testing 120K 13K 15K 20K 2K 2K 22K 3K 2K Table 2: Dataset for experimental evaluation. 5 Please refer to the Appendix for a detailed summary of the error patterns for each problem. 7 Published as a conference paper at ICLR 2018 All models are implemented in TensorFlow. All encoders in each of the trace model have two stacked GRU layers with 200 hidden units in each layer except that the state encoder in the state trace model has one single layer of 100 hidden units. We adopt random initialization for weight initialization. Our vocabulary has 5,568 unique tokens (i.e., the values of all variables at each time step), each of which is embedded into a 100-dimensional vector. All networks are trained using the Adam optimizer (Kingma & Ba, 2014) with the learning and the decay rates set to their default values (learning rate = 0.0001, beta1 = 0.9, beta2 = 0.999) and a mini-batch size of 500. For the variable trace and dependency enforcement models, each trace is padded to have the same length across each batch; for the state trace model, both the number of variables in each program state as well as the length of the entire state trace are padded. During the training of the dependency enforcement model, we have observed that when dependencies become complex, the network suffers from optimization issues, such as diminishing and exploding gradients. This is likely due to the complex nature of fusing hidden states among RNNs, echoing the errors back and forth through the network. We resolve this issue by truncating each trace into multiple sub-sequences and only back-propagate on the last sub-sequence while only feedforwarding on the rest. Regarding the baseline network trained on syntactic traces/token sequences, we use the same encoder architecture (i.e., two layer GRU of 200 hidden units) processing the same 100-dimension embedding vector for each statement/token. As for the AST model, we learn an embedding (100-dimension) for each type of the syntax node by propagating the leaf (a simple look up) to the root through the learned production rules. Finally, we use the root embeddings to represent programs. Programming Problem Print Chessboard Count Parentheses Generate Binary Digits Variable Trace State Trace 93.9% 92.7% 92.1% 95.3% 93.8% 94.5% Dependency Enforcement 99.3% 98.8% 99.2% Run-Time Syntactic Trace 26.3% 25.5% 23.8% Token AST 16.8% 19.3% 21.2% 16.2% 21.7% 20.9% Table 3: Comparing dynamic program embeddings with syntax-based program embedding in predicting common error patterns made by students. As shown in Table 3, our embeddings trained on execution traces significantly outperform those trained on program syntax (greater than 92% accuracy compared to less than 27% for syntax-based embeddings). We conjecture this is because of the fact that minor syntactic discrepancies can lead to major semantic differences as shown in Figure 1. In our dataset, there are a large number of programs with distinct labels that differ by only a few number of tokens or AST nodes, which causes difficulty for the syntax models to generalize. Even for the simpler syntax-level errors, they are buried in large number of other syntactic variations and the size of the training dataset is relatively small for the syntax-based models to learn precise patterns. In contrast, dynamic embeddings are able to canonicalize the syntactical variations and pinpoint the underlying semantic differences, which results in the trace-based models learning the correct error patterns more effectively even with relatively smaller size of the training data. In addition, we incorporated our dynamic program embeddings into S ARFGEN (Wang et al., 2017) — a program repair system — to demonstrate their benefit in producing fixes to correct students errors in programming assignments. Given a set of potential repair candidates, S ARFGEN uses an enumerative search-based technique to find minimal changes to an incorrect program. We use the dynamic embeddings to learn a distribution over the corrections to prioritize the search for the repair algorithm.6 To establish the baseline, we obtain the set of all corrections from S ARFGEN for each of the real incorrect program to all three problems and enumerate each subset until we find the minimum fixes. On the contrary, we also run another experiment where we prioritize each correction according to the prediction of errors with the dynamic embeddings. It is worth mentioning that one incorrect program may be caused by multiple errors. Therefore, we only predict the top-1 error each time and repair the program with the corresponding corrections. If the program is still incorrect, we repeat this procedure till the program is fixed. The comparison between the two approaches is based on how long it takes them to repair the programs. 6 Some corrections are merely syntactic discrepancies (i.e., they do not change program semantics such as modifying a *= 2 to a += a). In order to provide precise fixes, those false positives would need to be eliminated. 8 Published as a conference paper at ICLR 2018 Number of Fixes 1-2 3-5 6-7 ≥8 Enumerative Search 3.8 44.7 95.9 128.3 Variable Trace Embeddings 2.5 3.6 4.2 41.6 State Trace Embeddings 2.8 3.1 3.6 49.5 Dependency Enforcement Embeddings 3.3 4.1 4.5 38.8 Table 4: Comparing the enumerative search with those guided by dynamic program embeddings in finding the minimum fixes. Time is measured in seconds. As shown in Table 4, the more fixes required, the more speedups dynamic program embeddings yield — more than an order of magnitude speedups when the number of fixes is four or greater. When the number of fixes is greater than seven, the performance gain drops significantly due to poor prediction accuracy for programs with too many errors. In other words, our dynamic embeddings are not viewed by the network as capturing incorrect execution traces, but rather new execution traces. Therefore, the predictions become unreliable. Note that we ignored incorrect programs having greater than 10 errors when most experiments run out of memory for the baseline approach. 6 R ELATED W ORK There has been significant recent interest in learning neural program representations for various applications, such as program induction and synthesis, program repair, and program completion. Specifically for neural program repair techniques, none of the existing techniques, such as DeepFix (Gupta et al., 2017), SynFix (Bhatia & Singh, 2016) and sk p (Pu et al., 2016), have considered dynamic embeddings proposed in this paper. In fact, dynamic embeddings can be naturally extended to be a new feature dimension for these existing neural program repair techniques. Piech et al. (2015) is a notable recent effort targeting program representation. Piech et al. explore the possibility of using input-output pairs to represent a program. Despite their new perspective, the direct mapping between input and output of programs usually are not precise enough, i.e., the same input-output pair may correspond to two completely different programs, such as the two sorting algorithms in Figure 1. As we often observe in our own dataset, programs with the same error patterns can also result in different input-output pairs. Their approach is clearly ineffective for these scenarios. Reed & De Freitas (2015) introduced the novel approach of using execution traces to induce and execute algorithms, such as addition and sorting, from very few examples. The differences from our work are (1) they use a sequence of instructions to represent dynamic execution trace as opposed to using dynamic program states; (2) their goal is to synthesize a neural controller to execute a program as a sequence of actions rather than learning a semantic program representation; and (3) they deal with programs in a language with low-level primitives such as function stack push/pop actions rather than a high-level programming language. As for learning representations, there are several related efforts in modeling semantics in sentence or symbolic expressions (Socher et al., 2013; Zaremba et al., 2014; Bowman, 2013). These approaches are similar to our work in spirit, but target different domains than programs. 7 C ONCLUSION We have presented a new program embedding that learns program representations from runtime execution traces. We have used the new embeddings to predict error patterns that students make in their online programming submissions. Our evaluation shows that the dynamic program embeddings significantly outperform those learned via program syntax. We also demonstrate, via an additional application, that our dynamic program embeddings yield more than 10x speedups compared to an enumerative baseline for search-based program repair. Beyond neural program repair, we believe that our dynamic program embeddings can be fruitfully utilized for many other neural program analysis tasks such as program induction and synthesis. 9 Published as a conference paper at ICLR 2018 R EFERENCES Thoms Ball. The concept of dynamic analysis. In Proceedings of the 7th European Software Engineering Conference Held Jointly with the 7th ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 216–234, 1999. Sahil Bhatia and Rishabh Singh. Automated correction for syntax errors in programming assignments using recurrent neural networks. CoRR, abs/1603.06129, 2016. Samuel R Bowman. Can recursive neural tensor networks learn logical reasoning? arXiv preprint arXiv:1312.6192, 2013. Jacob Devlin, Jonathan Uesato, Surya Bhupatiraju, Rishabh Singh, Abdel rahman Mohamed, and Pushmeet Kohli. RobustFill: Neural program learning under noisy I/O. In Proceedings of the 34th International Conference on Machine Learning, pp. 990–998, 2017. Rahul Gupta, Soham Pal, Aditya Kanade, and Shirish K. Shevade. Deepfix: Fixing common c language errors by deep learning. In Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence, 2017. Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. abs/1412.6980, 2014. URL http://arxiv.org/abs/1412.6980. CoRR, Lili Mou, Ge Li, Lu Zhang, Tao Wang, and Zhi Jin. Convolutional neural networks over tree structures for programming language processing. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, 2016. Flemming Nielson, Hanne R. Nielson, and Chris Hankin. Principles of Program Analysis. 1999. Chris Piech, Jonathan Huang, Andy Nguyen, Mike Phulsuksombati, Mehran Sahami, and Leonidas Guibas. Learning program embeddings to propagate feedback on student code. In Proceedings of the 32nd International Conference on Machine Learning, pp. 1093–1102, 2015. Yewen Pu, Karthik Narasimhan, Armando Solar-Lezama, and Regina Barzilay. Sk p: A neural program corrector for moocs. In Companion Proceedings of the 2016 ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity, SPLASH Companion 2016, pp. 39–40, 2016. Scott Reed and Nando De Freitas. arXiv:1511.06279, 2015. Neural programmer-interpreters. arXiv preprint Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Ng, and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1631–1642, 2013. Taras K Vintsyuk. Speech discrimination by dynamic programming. Cybernetics, 4(1):52–57, 1968. Ke Wang, Rishabh Singh, and Zhendong Su. Data-driven feedback generation for introductory programming exercises. CoRR, abs/1711.07148, 2017. URL http://arxiv.org/abs/ 1711.07148. Wojciech Zaremba, Karol Kurach, and Rob Fergus. Learning to discover efficient mathematical identities. In Advances in Neural Information Processing Systems, pp. 1278–1286, 2014. 10 Published as a conference paper at ICLR 2018 A PPENDIX E RROR PATTERNS Print Chessboard: • Misprinting “O” to “0” or printing lower case instead of upper case characters. • Switching across rows are supposed to be the other way around ( i.e. printing OXOXOXOX for odd number rows and XOXOXOXO for even number rows). • Printing the first row correctly but failed to make a switch across rows. • Printing the entire chessboard as “X” or “O” only. • Printing the chessboard correctly but with extra unnecessary characters. • Printing the incorrect number of rows. • Printing the incorrect number of columns. • Printing the characters correctly but in wrong format (i.e. not correctly seperated with the spaces to form the rows). • Others. Count Parentheses: • Miss the corner case of empty strings. • Mistakenly consider the parenthesis to be symbols rather than “(” or “)”. • Mishandling the string of unmatched parentheses. • Counting the number of matching parentheses rather then depth. • Incorrectly assume nested parentheses are always present. • Miscounting the characters which should have been ignored. • Others. Generate Binary Digits: • Miss the corner case of integer 0. • Misunderstand the binary digits to be underlying bytes of a string. • Mistakes in arithmetic calculation regrading shift operations. • Adding the binary digits rather than concatenating them to a string. • Miss the one on the most significant bit. • Others. 11 Published as a conference paper at ICLR 2018 S ARF G EN ’ S A LGORITHM Algorithm 1: S ARFGEN ’s feedback generation procedure. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 /* P : an incorrect program; Ps : all correct solutions function FixGeneration(P , Ps ) begin // Among Ps identify Pcs to be reference programs to fix P Pcs ← CandidatesIdentification(P , Ps ) // Initialize the minimum number of fixes k to be inifinity k←∞ // Initialize the minimum set of fixes F(P ) F(P ) ← null for Pc ∈ Pcs do // Generates the syntactic discrepencies w.r.t. each Pc C(P , Pc ) ← DiscrepenciesGeneration(P , Ps ) // Selecting subsets of C(P , Pc ) from size of one itll |C(P , Pc )| for n ∈ [1, 2, ..., |C(P , Pc )|] do Csubs (P , Pc ) ← {x | x ⊆ C(P , Pc ) ∧ |x| = n} // Attemp each subset of C(P , Pc ) for Csub (P , Pc ) ∈ Csubs (P , Pc ) do P 0 ← PatchApplication(P , Csub (P , Pc )) // Update k if necessary if isCorrect(P 0 ) then if |P 0 | <k then k ← |P 0 | F(P ) ← P 0 */ return F(P ) Algorithm 2: Incorporate pre-trained model to S ARFGEN ’s feedback generation procedure. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 /* P , Ps : same as above; M: learned Model function FixGeneration(P , Ps , M) begin // Among Ps identify Pcs to be reference programs to fix P Pcs ← CandidatesIdentification(P , Ps ) // Initialize the minimum number of fixes k to be inifinity k←∞ // Initialize the minimum set of fixes F(P ) F(P ) ← null for Pc ∈ Pcs do // Generates the syntactic discrepencies w.r.t. each Pc C(P , Pc ) ← DiscrepenciesGeneration(P , Ps ) // Executing P to extract the dynamic execution trace T (P ) ← DynamicTraceExtraction(P ) // Prioritizing subsets of C(P , Pc ) through pre-trained model Csubs (P , Pc ) ← Prioritization(C(P , Pc ), T (P ), M) for Csub (P , Pc ) ∈ Csubs (P , Pc ) do P 0 ← PatchApplication(P , Csub (P , Pc )) if isCorrect(P 0 ) then if |P 0 | <k then k ← |P 0 | F(P ) ← P 0 return F(P ) 12 */
6cs.PL
arXiv:1602.00834v2 [math.GT] 7 Apr 2017 HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY FRANCOIS DAHMANI AND MAHAN MJ Abstract. We introduce the notions of geometric height and graded (geometric) relative hyperbolicity in this paper. We use these to characterize quasiconvexity in hyperbolic groups, relative quasiconvexity in relatively hyperbolic groups, and convex cocompactness in mapping class groups and Out(Fn ). Contents 1. Introduction 2. Relative Hyperbolicity, coarse hyperbolic embeddings 2.1. Electrification by cones 2.2. Quasiretractions 2.3. Gluing horoballs 2.4. Relative hyperbolicity and hyperbolic embeddedness 2.5. Persistence of hyperbolicity and quasiconvexity 3. Algebraic Height and Intersection Properties 3.1. Algebraic Height 3.2. Geometric i-fold intersections 3.3. Algebraic i-fold intersections 3.4. Existing results on algebraic intersection properties 4. Geometric height and graded geometric relative hyperbolicity 4.1. Hyperbolic groups 4.2. Relatively hyperbolic groups 4.3. Mapping Class Groups 4.4. Out(Fn ) 4.5. Algebraic and geometric qi-intersection property: Examples 5. From quasiconvexity to graded relative hyperbolicity 5.1. Ensuring geometric graded relative hyperbolicity 5.2. Graded relative hyperbolicity for quasiconvex subgroups 6. From graded relative hyperbolicity to quasiconvexity 6.1. A Sufficient Condition 6.2. The Main Theorem 6.3. Examples Acknowledgments References 2 4 4 5 6 7 7 20 20 21 22 24 24 26 26 27 29 30 33 33 34 35 35 36 37 37 37 Date: April 11, 2017. 2010 Mathematics Subject Classification. 20F65, 20F67 (Primary); 22E40 (Secondary). The first author acknowledge support of ANR grant ANR-11-BS01-013, and from the Institut Universitaire de France. The research of the second author is partially supported by a DST J C Bose Fellowship. 1 2 FRANCOIS DAHMANI AND MAHAN MJ 1. Introduction It is well-known that quasiconvex subgroups of hyperbolic groups have finite height. In order to distinguish this notion from the notion of geometric height introduced later in this paper, we shall call the former algebraic height: Let G be a finitely generated group and H a subgroup. We say that a collection of conjugates {gi Hgi−1 }, i = 1, . . . , n are essentially distinct if the cosets {gi H} are distinct. We say that H has finite algebraic height if there exists n ∈ N such that the intersection of any (n + 1) essentially distinct conjugates of H is finite. The minimal n for which this happens is called the algebraic height of H. Thus H has algebraic height one if and only if it is almost malnormal. This admits a natural (and obvious) generalization to a finite collection of subgroups Hi instead of one H. Thus, if G is a hyperbolic group and H a quasiconvex subgroup (or more generally if H1 , . . . , Hn are quasiconvex), then H (or more generally the collection {H1 , . . . , Hn }) has finite algebraic height [GMRS97]. (See [Dah03, HW09] for generalizations to the context of relatively hyperbolic groups.) Swarup asked if the converse is true: Question 1.1. [Bes04] Let G be a hyperbolic group and H a finitely generated subgroup. If H has finite height, is H quasiconvex? An example of an infinitely generated (and hence non-quasiconvex) malnormal subgroup of a finitely generated free group was obtained in [DM15] showing that the hypothesis that H is finitely generated cannot be relaxed. On the other hand, Bowditch shows in [Bow12] (see also [Mj08, Proposition 2.10]) the following positive result: Theorem 1.2. [Bow12] Let G be a hyperbolic group and H a subgroup. Then G is strongly relatively hyperbolic with respect to H if and only if H is an almost malnormal quasiconvex subgroup. One of the motivational points for this paper is to extend Theorem 1.2 to give a characterization of quasiconvex subgroups of hyperbolic groups in terms of a notion of graded relative hyperbolicity defined as follows: Definition 1.3. Let G be a finitely generated group, d the word metric with respect to a finite generating set and H a subgroup. Let Hi be the collection of intersections of i essentially distinct conjugates of H, let (Hi )0 be a choice of conjugacy representatives, and let CHi be the set of cosets of elements of (Hi )0 . Let di be the metric on (G, d) obtained by electrifying1 the elements of CHi . We say that G is graded relatively hyperbolic with respect to H (or equivalently that the pair (G, {H}) has graded relative hyperbolicity) if (1) H has algebraic height n for some n ∈ N. (2) Each element K of Hi−1 has a finite relative generating set SK , relative to H ∩ Hi (:= {H ∩ Hi : Hi ∈ Hi }). Further, the cardinality of the generating set SK is bounded by a number depending only on i (and not on K). (3) (G, di ) is strongly hyperbolic relative to Hi−1 , where each element K of Hi−1 is equipped with the word metric coming from SK . 1The second author acknowledges the moderating influence of the first author on the more extremist terminology electrocution [Mj14, Mj11] HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 3 The following is the main Theorem of this paper (see Theorem 6.4 for a more precise statement using the notion of graded geometric relative hyperbolicity defined later) providing a partial positive answer to Question 1.1 and a generalization of Theorem 1.2: Theorem 1.4. Let (G, d) be one of the following: (1) G a hyperbolic group and d the word metric with respect to a finite generating set S. (2) G is finitely generated and hyperbolic relative to P, S a finite relative generating set, and d the word metric with respect to S ∪ P. (3) G is the mapping class group M od(S) and d a metric that is equivariantly quasi-isometric to the curve complex CC(S). (4) G is Out(Fn ) and d a metric that is equivariantly quasi-isometric to the free factor complex Fn . Then (respectively) (1) if H is quasiconvex, then (G, {H}) has graded relative hyperbolicity; conversely, if (G, {H}) has geometric graded relative hyperbolicity then H is quasiconvex. (2) if H is relatively quasiconvex then (G, {H}, d) has graded relative hyperbolicity; conversely, if (G, {H}, d) has geometric graded relative hyperbolicity then H is relatively quasiconvex. (3) if H is convex cocompact in M od(S) then (G, {H}, d) has graded relative hyperbolicity; conversely, if (G, {H}, d) has geometric graded relative hyperbolicity and the action of H on the curve complex is uniformly proper, then H is convex cocompact in M od(S). (4) if H is convex cocompact in Out(Fn ) then (G, {H}, d) has graded relative hyperbolicity; conversely, if (G, {H}, d) has geometric graded relative hyperbolicity and the action of H on the free factor complex is uniformly proper, then H is convex cocompact in Out(Fn ). Structure of the paper: In Section 2, we will review the notions of hyperbolicity for metric spaces relative to subsets. This will be related to the notion of hyperbolic embeddedness [DGO11]. We will need to generalize the notion of hyperbolic embeddedness in [DGO11] to one of coarse hyperbolic embeddedness in order to accomplish this. We will also prove results on the preservation of quasiconvexity under electrification. We give two sets of proofs: the first set of proofs relies on assembling diverse pieces of literature on relative hyperbolicity, with several minor adaptations. We also give a more self-contained set of proofs relying on asymptotic cones. In Section 3.1 and the preliminary discussion in Section 4, we give an account of two notions of height: algebraic and geometric. The classical (algebraic) notion of height of a subgroup concerns the number of conjugates that can have infinite intersection. The notion of geometric height is similar, but instead of considering infinite intersection, we consider unbounded intersections in a (not necessarily proper) word metric. This naturally leads us to dealing with intersections in different contexts: (1) Intersections of conjugates of subgroups in a proper (Γ, d) (the Cayley graph of the ambient group with respect to a finite generating set). (2) Intersections of metric thickenings of cosets in a not necessarily proper (Γ, d). 4 FRANCOIS DAHMANI AND MAHAN MJ The first is purely group theoretic (algebraic) and the last geometric. Accordingly, we have two notions of height: algebraic and geometric. In line with this, we investigate two notions of graded relative hyperbolicity in Section 4 (cf. Definition 4.3): (1) Graded relative hyperbolicity (algebraic) (2) Graded geometric relative hyperbolicity In the fourth section, we also introduce and study a qi-intersection property, a property that ensures that quasi-convexity is preserved under passage to electrified spaces. The property exists in both variants above. In the fifth and the sixth sections, we will prove our main results relating height and geometric graded relative hyperbolicity. On a first reading, the reader is welcome to keep the simplest (algebraic or group-theoretic) notion in mind. To get a hang of where the paper is headed, we suggest that the reader take a first look at Sections 5 and 6, armed with Section 3.3 and the statements of Proposition 4.5, Theorem 4.6, Theorem 4.10, Theorem 4.14 and Proposition 4.15. This, we hope, will clarify our intent. 2. Relative Hyperbolicity, coarse hyperbolic embeddings We shall clarify here what it means in this paper for a geodesic space (X, d), to be hyperbolic relative to a family of subspaces Y = {Yi , i ∈ I}, or to cast it in another language, what it means for the family Y to be hyperbolically embedded in (X, d). There are slight differences from the more usual context of groups and subgroups (as in [DGO11]), but we will keep the descending compatibility (when these notions hold in the context of groups, they hold in the context of spaces). We begin by recalling relevant constructions. 2.1. Electrification by cones. Given a metric space (Y, dY ), we will endow Y × [0, 1] with the following product metric: it is the largest metric that agrees with dY on Y × {0}, and each {y} × [0, 1] is endowed with a metric isometric to the segment [0, 1]. Definition 2.1. [Far98] Let (X, d) be a geodesic length space, and Y = {Yi , i ∈ I} be a collection of subsets of X. The electrification (XYel , del Y ) of (X, d) along Y is defined as theFfollowing coned-off space: XYel = X ⊔ { i∈I Yi × [0, 1]}/ ∼ where ∼ denotes the identification of Yi × {0} with Yi ⊂ X for each i, and the identification of Yi × {1} to a single cone point vi (dependent on i). el The metric del Y is defined as the path metric on XY for the natural quotient metric coming from the product metric on Yi × [0, 1] (defined as above). ˆ when there is no scope for Let Yi ∈ Y. The angular metric dˆYi (or simply, d, confusion) on Yi is defined as follows: For y1 , y2 ∈ Yi , dˆYi (y1 , y2 ) is the infimum of lengths of paths in XYel joining y1 to y2 not passing through the vertex vi . (We allow the angular metric to take on infinity as a value). If (X, d) is a metric space, and Y is a subspace, we write d|Y the metric induced on Y . Definition 2.2. Consider a geodesic metric space (X, d) and a family of subsets Y = {Yi , i ∈ I}. We will say that Y is coarsely hyperbolically embedded in HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 5 (X, d), if there is a function ψ : R+ → R+ which is proper (i.e. lim+∞ ψ(x) = +∞), and such that (1) the electrified space XYel is hyperbolic, (2) the angular metric at each Y ∈ Y in the cone-off is bounded from below by ψ ◦ d|Y . Remark 2.3. This notion originates from Osin’s [Osi06a], and was developed further in [DGO11] in the context of groups, where one requires that each subset Yi ∈ Y is a proper metric space for the angular metric. This automatically implies the weaker condition of the above definition. The converse is not true: if Y is a collection of uniformly bounded subgroups of a group X with a (not necessarily proper) word metric, it is always coarsely hyperbolically embedded, but it is hyperbolically embedded in the sense of [DGO11] only if it is finite. As in the point of view of [Osi06a], we say that (X, d) is strongly hyperbolic relative to the collection Y (in the sense of spaces) if Y is coarsely hyperbolically embedded in (X, d). As we described in the remark, unfortunately, it happens that some groups (with a Cayley graph metric) are hyperbolic relative to some subgroups in the sense of spaces, but not in the sense of groups. Note that there are other definitions of relative hyperbolicity for spaces. Druţu introduced the following definition: a metric space is hyperbolic relative to a collection of subspaces if all asymptotic cones are tree graded with pieces being ultratranslates of asymptotic cones of the subsets. 2.2. Quasiretractions. Definition 2.4. If (X, d) is a metric space, and Y ⊂ X is a subset endowed with a metric dY , we say that dY is λ-undistorted in (X, d) if for all y1 , y2 ∈ Y , λ−1 d(y1 , y2 ) − λ ≤ dY (y1 , y2 ) ≤ λd(y1 , y2 ) + λ. We say that dY is undistorted in (X, d) if it is λ-undistorted in (X, d) for some λ. For the next proposition, define the D-coarse path metric on a subset Y of a path-metric space (X, d) to be the metric on Y obtained by taking the infimum of lengths over paths for which any subsegment of length D meets Y . The next Proposition is the translation (to the present context) of Theorem 4.31 in [DGO11], with a similar proof. Proposition 2.5. Let (X, d) be a graph. Assume that Y is coarsely hyperbolically embedded in (X, d). Then, there exists D0 such that for all Y ∈ Y, the D0 -coarse path metric on Y ∈ Y is undistorted (or equivalently the D0 -coarse path metric on Y ∈ Y is quasi-isometric to the metric induced from (X, d)). We will need the following Lemma, which originates in Lemma 4.29 in [DGO11]. The proof is the same; for convenience we will briefly recall it. The lemma provides quasiretractions onto hyperbolically embedded subsets in a hyperbolic space. Lemma 2.6. Let (X, d) be a geodesic metric space. There exists C > 0 such that whenever Y is coarsely hyperbolically embedded (in the sense of spaces) in (X, d), then for each Y ∈ Y, there exists a map r : X → Y which is the identity on Y and ˆ such that d(r(x), r(y)) ≤ Cd(x, y). 6 FRANCOIS DAHMANI AND MAHAN MJ Proof. Let p the cone point associated to Y , and for each x, choose a geodesic [p, x] and define r(x) to be the point of [p, x] at distance 1 from p. Then r(x) is in Y , and to prove the lemma, one only needs to check that there is C such that if ˆ d(x, y) = 1, then d(r(x), r(y)) ≤ C. The constant C will be 10(δ + 1) + 1. Assume that x and y are at distance > 5(δ + 1) from the cone point. By hyperbolicity, one can find two points in the triangle (p, x, y) at distance 2(δ + 1) from r(x), r(y) at distance ≤ 2δ from each other. This provides a path of length at most 6δ + 4. ˆ Hence d(r(x), r(y)) ≤ 6δ + 4. If x and y are at distance ≤ 5(δ + 1) from the cone ˆ point, then d(r(x), r(y)) ≤ d(r(x), x) + d(x, y) + d(y, r(y)) ≤ 2 × 5(δ + 1) + 1.  We can now prove the Proposition. Proof. Choose D0 = ψ(C): for all y0 , y1 ∈ Y at distance ≤ D0 , their angular distance is at most C (where C is as given by the Lemma above). Consider any path in X from y0 to y1 , call the consecutive vertices z0 , . . . , zn , and project that path by r. One gets r(z0 ), . . . , r(zn ) in Y , two consecutive ones being at distance at most D0 . This proves the claim.  Corollary 2.7. If (X, d) is hyperbolic, and if Y is coarsely hyperbolically embedded, then there is C such that any Y ∈ Y is C-quasiconvex in X. 2.3. Gluing horoballs. Given a metric space (Y, dY ) , one can construct several models of combinatorial horoballs over it. We recall a construction (similar to that of Groves and Manning [GM08] for a graph). We consider inductively on k ∈ N \ {0} the space Hk (Y ) = Y × [1, k] with the maximal metric dk that • induces an isometry of {y} × [k − 1, k] with [0, 1] for all y ∈ Y , and all k ≥ 1, • is at most dk−1 on Hk−1 (Y ) ⊂ Hk (Y ) • coincides with 2−k × d on Y × {k}. Then H(Y ) is defined as the inductive limit of the Hk (Y )’s and is called the horoball over Y . Let (X, d) be a graph, and Y be a collection of subgraphs (with the induced metric on each of them). F The horoballification of (X, d) over Y is defined to be the space XYh = X ⊔ { i∈I H(Yi )}/ ∼i where ∼i denotes the identification of the boundary horosphere of H(Yi ) with Yi ⊂ X. The metric dhY is defined as the path metric on XYh . One can electrify a horoballification XYh of a space (X, d): one gets a space quasi-isometric to the electrification XYel of X. We record this observation in the following. Proposition 2.8. Let X be a graph, and Y be a family of subgraphs. Let XYel and XYh be the electrification, and the horoballification as above. Let (X h )el H(Y) be the electrification of XYh over the collection of horoballs H(Yi ) over Yi , i ∈ I. Then there is a natural injective map XYel ֒→ (X h )el H(Y) which is the identity on X and sends the cone point of Yi to the cone point of H(Yi ). (0) Consider the map e : ((X h )el → XYel that H(Y) ) • is the identity on X, • sends each vertex of H(Yi ) of depth > 2 to vi ∈ XYel , • sends each vertex (y, n) ∈ H(Yi ) of depth n ≤ 2 to y ∈ Yi ⊂ X, HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 7 • sends the cone point of ((X h )el H(Y) ) associated to H(Yi ) to the cone point of el XY associated to Yi . Then e is a quasi-isometry that induces an isometry on XYel ⊂ (X h )el H(Y) . Proof. First, note that a geodesic in (X h )el H(Y) between two points of X never contains an edge with a vertex of depth ≥ 1. If it did, the subpath in the corresponding horoball would be either non-reduced, or would contain at least 3 edges, and could be shortened by substituting a pair of edges through the cone attached to that horoball. Thus the image of such a geodesic under e is a path of the same length. In other words, there is an inequality on the metrics dXYel ≤ d(X h )el (restricted H(Y ) to XYel ). On the other hand, there is a natural inclusion XYel ⊂ (X h )el H(Y) , and therefore on XYel , d(X h )el ≤ dXYel . Thus e is an isometry on XYel . Also, every H(Y ) point in (X h )el H(Y) is at distance at most 2 from a point in X, hence also from a point of the image of XYel .  2.4. Relative hyperbolicity and hyperbolic embeddedness. Recall that we say that a subspace Q of a geodesic metric space (X, d) is C-quasiconvex, for some number C > 0, if for any two points x, y ∈ Q, and any geodesic [x, y] in X, any point of [x, y] is at distance at most C from a point of Q. Definition 2.9. [Mj11, Definition 3.5] A collection H of (uniformly) C-quasiconvex sets in a δ-hyperbolic metric space X is said to be mutually D-cobounded if for all Hi , Hj ∈ H, with Hi 6= Hj , πi (Hj ) has diameter less than D, where πi denotes a nearest point projection of X onto Hi . A collection is mutually cobounded if it is mutually D-cobounded for some D. The aim of this subsection is to establish criteria for hyperbolicity of certain spaces (electrification, horoballification), and related statements on persistence of quasi-convexity in these spaces. We also show that hyperbolicity of the horoballification implies strong relative hyperbolicity, or coarse hyperbolic embeddedness. Two sets of arguments are given. In the first set of arguments, the pivotal statement is of the following form: Electrification or de-electrification preserves the property of being a quasigeodesic. The arguments are essentially existent in some form in the literature, and we merely sketch the proofs and refer the reader to specific points in the literature where these may be found. The second set of arguments uses asymptotic cones (hence the axiom of choice) and is more self-contained (it relies on Gromov-Cartan-Hadamard theorem). We decided to give both these arguments so as to leave it to the the reader to choose according to her/his taste. 2.5. Persistence of hyperbolicity and quasiconvexity. 2.5.1. The Statements. Here we state the results for which we give arguments in the following two subsubsections. Proposition 2.10. Let (X, d) be a hyperbolic geodesic space, C > 0, and Y be a family of C-quasiconvex subspaces. Then XYel is hyperbolic. If moreover the elements of Y are mutually cobounded, then XYh is hyperbolic. In the same spirit, we also record the following statement on persistence of quasiconvexity. 8 FRANCOIS DAHMANI AND MAHAN MJ Proposition 2.11. Given δ, C there exists C ′ such that if (X, dX ) is a δ-hyperbolic metric space with a collection Y of C-quasiconvex, sets. then the following holds: If Q(⊂ X) is a C-quasiconvex set (not necessarily an element of Y), then Q is C ′ -quasiconvex in (XYel , de ). Finally, there is a partial converse. We need a little bit of vocabulary. If Z is a subset of a metric space (X, d), a (d, R)-coarse path in Z is a sequence of points of Z such that two consecutive points are always at distance at most R for the metric d. Let H and Y two subsets of X. We will denote by H +λ the set of points at distance at most λ from H. We will say that H (∆, ǫ)-meets Y if there are two points x1 , x2 at distance ≥ ∆ from each other, and at distance ≤ ǫ∆ from Y and H, and if for all pair of points at distance 20δ from {x1 , x2 }, either H or Y is at distance at least ǫ∆ − 2δ from one of them. The two points x1 , x2 are called a pair of meeting points in H (for Y ). We shall say that a subset H of X is coarsely path connected if there exists c ≥ 0 such that the c−neighborhood Nc (H) is path connected. Proposition 2.12. Let (X, d) be hyperbolic, and let Y be a collection of uniformly quasiconvex subsets. Let H be a subset of X that is coarsely path connected, and quasiconvex in the electrification XYel . Assume also that there exists ǫ ∈ (0, 1), and ∆0 such that for all ∆ > ∆0 , wherever H (∆, ǫ)-meets an item Y in Y, there is a path in H +ǫ∆ between the meeting points in H that is uniformly a quasigeodesic in the metric (X, d). Then H is quasiconvex in (X, d). The quasiconvexity constant of H can be chosen to depend only on the constants involved for (X, d), Y, ∆0 , ǫ, the coarse path connection constant, and the quasigeodesic constant of the last assumption. 2.5.2. Electroambient quasigeodesics. We recall here the concept of electroambient quasigeodesics from [Mj11, Mj14]. Let (X, d) be a metric space, and Y a collection of subspaces. If γ is a path in (X, d), or even in (XYel , del Y ), one can define an elementary electrification of γ in ) as follows: (XYel , del Y For x1 , x2 in γ, both belonging to some Yi ∈ Y, and at distance > 1, replace the arc of γ between them by a pair of edges (x1 , vi )(vi , x2 ), where vi is the cone-point corresponding to Yi . A complete electrification of γ is a path obtained after a sequence of elementary electrifications of subarcs, admitting no further elementary electrifications. One can de-electrify certain paths. Given a path γ in (XYel , del Y ), a de-electrification of γ is a path σ in (X, d) such that (1) γ is a complete electrification of σ, (2) (σ \ γ) ∩ Yi is either empty or a geodesic in Yi . A (λ, µ)-de-electrification of a path γ in (XYel , del Y ), is a path in X such that (1) γ is a complete electrification of σ, (2) (σ \ γ) ∩ Yi is either empty or a (λ, µ)-quasigeodesic in Yi . Observe that, given a path σ in X el , there might be several ways to de-electrify it, but these ways differ only in the choice of the geodesic (or the quasi-geodesic) in the family of subspaces Yi corresponding to the successive cone points vYi on the HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 9 path σ. It might also happen that there is no way of de-electrifying it, if the spaces in Y are not quasiconvex. We say that a path γ in (X, d) is an electro-ambient geodesic if it is a deelectrification of a geodesic. We say that it is a (λ, µ)− electro-ambient quasigeodesic if it is the (λ, µ)− de-electrification of a (λ, µ)−quasigeodesic in (XYel , del Y ). We begin by discussing Proposition 2.10. Proof. The first part is fairly well-known. In some other guise it appears in [Bow12, Proposition 7.4] [Szc98, Proposition 1] [Mj11]. In the first two, the electrification by cones is replaced by collapses of subspaces (identifications to points) which of course requires that the subspaces to electrify are disjoint and separated. However this is only a technical assumption (as explicated in [Mj11]). Indeed, by replacing (or augmenting) any Y ∈ Y by Y × [0, D] glued along Y × {0}, and replacing Y by the family {Y ×{D}, Y ∈ Y}, we achieve a D-separated quasiconvex family.  Next, we discuss Proposition 2.11. Proof. The proofs of Lemma 4.5 and Proposition 4.6 of [Far98], Proposition 4.3 and Theorem 5.3 of [Kla99] (see also [Bow12]) furnish Proposition 2.11. The crucial ingredient in all these proofs is the fact that in a hyperbolic space, nearest point projections decrease distance exponentially. Farb proves this in the setup of horoballs in complete simply connected manifolds of pinched negative curvature. Klarreich ”coarsifies” this assertion by generalizing it to the context of hyperbolic metric spaces.  The rest of this (subsub)section is devoted to discussing Proposition 2.12. Towards doing this, we will obtain an argument for showing a variant of the second point of Proposition 2.10, namely that in a hyperbolic space (X, d), a family Y of uniformly quasi convex subspaces that is mutually cobounded defines a strong relative hyperbolic structure on (X, d). The second point of 2.10 as it is stated will be however proved in the next subsection. We shall have need for the following Lemma [Mj11, Lemma 3.9] (see also [Kla99, Proposition 4.3] [Mj14, Lemma 2.5]). Lemma 2.13. Suppose (X, d) is δ-hyperbolic. Let H be a collection of C-quasiconvex D-mutually cobounded subsets. Then for all P ≥ 1, there exists ǫ0 = ǫ0 (C, P, D, δ) such that the following holds: Let β be an electric (P, P )-quasigeodesic without backtracking (i.e. β does not return to any H1 ∈ H after leaving it) and γ a geodesic in (X, d), both joining x, y. Then, given ǫ ≥ ǫ0 there exists D = D(P, ǫ) such that (1) Similar Intersection Patterns 1: if precisely one of {β, γ} meets an ǫneighborhood Nǫ (H1 ) of an electrified quasiconvex set H1 ∈ H, then the length (measured in the intrinsic path-metric on Nǫ (H1 ) ) from the entry point to the exit point is at most D. (2) Similar Intersection Patterns 2: if both {β, γ} meet some Nǫ (H1 ) then the length (measured in the intrinsic path-metric on Nǫ (H1 ) ) from the entry point of β to that of γ is at most D; similarly for exit points. 10 FRANCOIS DAHMANI AND MAHAN MJ Note that Lemma 2.13 above is quite general and does not require X to be proper. The two properties occurring in Lemma 2.13 were introduced by Farb [Far98] in the context of a group G and a collection H of cosets of a subgroup H. The two together are termed ‘Bounded Coset Penetration’ in [Far98]. Remark 2.14. In [Mj11], the extra hypothesis of separatedness was used. However, this is superfluous by the same remark on augmentations of elements of Y that we made in the beginning of the proof of Proposition 2.10. Lemma 2.13 may be stated equivalently as the following (compare with 2.23 below) . If X is a hyperbolic metric space and H a collection of uniformly quasiconvex mutually cobounded subsets, then X is strongly hyperbolic relative to the collection H. We give a slightly modified version of [Mj11, Lemma 3.15] below by using the equivalent hypothesis of strong relative hyperbolicity (i.e. Lemma 2.13). Lemma 2.15. Let (X, d) be a δ−hyperbolic metric space, and H a family of subsets such that X is strongly hyperbolic relative to H. Then for all λ, µ > 0, there exists λ′ , µ′ such that any electro-ambient (λ, µ)-quasi-geodesic is a (λ′ , µ′ )-quasi-geodesic in (X, d). The proof of Lemma 2.15 goes through mutatis mutandis for strongly relatively hyperbolic spaces as well, i.e. hyperbolicity of X may be replaced by relative hyperbolicity in Lemma 2.15 above. We state this explicitly below: Corollary 2.16. Let (X, d) be strongly relatively hyperbolic relative to a collection Y of path connected subsets. Then, for all λ, µ > 0, there exists λ′ , µ′ such that any electro-ambient (λ, µ)-quasi-geodesic is a (λ′ , µ′ )-quasi-geodesic in (X, d). We include a brief sketch of the proof-idea following [Mj11]. Let γ be an electroambient quasigeodesic. By Definition, its electrification γ̂ is a quasi-geodesic in XYel . Let σ be the electric geodesic joining the end-points of γ. Hence σ and γ̂ have similar intersection patters with the sets Yi [Far98], i.e. they enter and leave any Yi at nearby points. It then suffices to show that an electro-ambient representative of σ is in fact a quasigeodesic in X. A proof of this is last statement is given in [McM01, Theorem 8.1] in the context of horoballs in hyperbolic space (see also Lemmas 4.8, 4.9 and their proofs in [Far98]). The same proof works after horoballification for an arbitrary relatively hyperbolic space. ✷ The proof of Proposition 2.12 as stated will be given in the next subsubsection. We shall provide here a proof that suffices for the purposes of this paper. We assume, in addition to the hypothesis of the Proposition that there exists an integer n > 0, and D0 ≥ 0 such that for all distinct Y1 , . . . , Yn ∈ Y, ∩i Yi+ǫ has diameter at most D. The existence of such a number n will translate into the notion of finite geometric height later in the paper. Proof. We prove the statement by inducting on n. For n = 1 there is nothing to show; so we start with n = 2. Note that in this case, the hypothesis is equivalent to the assumption that the Yi ’s are cobounded. Assume therefore that the elements of Y are uniformly quasiconvex in (X, d); and that they are uniformly mutually cobounded. We shall show that H is also quasiconvex for a uniform constant. First, since (X, d) is hyperbolic it follows by Proposition 2.10 that (XYel , del ) is hyperbolic. HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 11 Let x, y ∈ H. By assumption, there exists C0 ≥ 0 such that H is (C0 , C0 )−qi embedded in (G, del ). Denote by P the set of cone points corresponding to elements of Y and let γ be a (C, C)−quasi-geodesic without backtracking in (X, del ) with vertices in H ∪ P joining x, y ∈ H. By assumption, the collection Y is uniformly C-quasiconvex. Further, by assumption, there exists ǫ ∈ (0, 1), and ∆0 such that for all ∆ > ∆0 , wherever H (∆, ǫ)-meets an item Y in Y, there is a path in H +ǫ∆ between the meeting points in H that is uniformly a quasigeodesic in the metric (X, d). Hence, for some uniform constants λ, µ, we may (coarsely) (λ, µ)-de-electrify γ to obtain a (λ, µ)-electro-ambient quasigeodesic γ ′ in (X, d), that lies close to H. [Note that the meeting points of H with elements of Y are only coarsely defined. So we are actually replacing pieces of γ by quasigeodesics in H +ǫ∆ rather than in H itself.] Note that by assumption Y are uniformly quasiconvex in (X, d); and further that they are uniformly mutually cobounded. Hence the space X is actually strongly hyperbolic relative to Y. By Corollary 2.16, it follows that γ ′ is a quasi-geodesic in (X, d), for a uniform constant. Since this was done for arbitrary x, y ∈ Hi,ℓ , we obtain that H is D−quasiconvex in (X, d). This finishes the proof of Proposition 2.12 for n = 2. The induction step is now easy. Assume that the statement is true for n = m. We shall prove it for n = m + 1. Electrify all pairwise intersections of Yi+ǫ to obtain an electric metric d2 . Then the collection {Yi } is cobounded with respect to the electric metric d2 . Here again, the space (X, d2 ) is strongly hyperbolic relative to the collection {Yi }. By the argument in the case n = 2 above, H is quasiconvex in (X, d2 ). The collection of pairwise intersections of the Yi+ǫ ’s in X satisfies the property that an intersection of any m of them is bounded. We are then through by the induction hypothesis.  2.5.3. Proofs through asymptotic cones. The repeated use of different references coming from different contexts in the previous subsubsection might call for more systematic self-contained proofs of the statements of subsection 2.5.1. This is our purpose in this subsubsection. In this part we will use the structure of an argument originally due to Gromov, and developed by Coulon amongst others (see for instance [Cou14, Proposition 5.28]), which uses asymptotic cones in order to show hyperbolicity or quasiconvexity of constructions. We fix a non-principal ultrafilter ω and will use the construction of asymptotic cones with respect to this ultrafilter ω. A few observations are in order here. In all the following, (XN , xN ) is a sequence of pointed δN -hyperbolic spaces, with δN converging to 0. Recall then that the asymptotic cone limω (XN , xN ) is an R-tree, with a base point. If YN is a family of cN -quasiconvex subsets of XN (for cN tending to 0), we want to consider the asymptotic cone limω ((XN )el YN , xN ) and relate it to limω (XN , xN ). Let us define the following equivalence relation on the set of sequences in XN . Two sequences (uN ), (vN ) are equivalent if dXN (uN , vN ) = O(1) for the ultrafilter ω (more precisely, if there exists a constant C such that for ω-almost all values of N , dXN (uN , vN ) ≤ C). Let us consider the set of equivalence classes of sequences, and let us only keep those that have some (hence all) representative (uN ) such that the electric distance dXNel (xN , uN ) is O(1). Let us call C this set of equivalence 12 FRANCOIS DAHMANI AND MAHAN MJ classes. For a sequence u = (uN ) we write ∼u for its class in C. We also allow ourselves to write limω (XN , ∼u ) for limω (XN , uN ) to avoid cluttered notation. G Lemma 2.17. There is a natural inclusion from the disjoint union lim(XN , ∼u ∼u ∈C ω ) into limω ((XN )el YN , xN ). Proof. By definition of C we have a well defined map limω (XN , ∼u ) → limω ((XN )el YN , xN ) for each class ∼u in C. Given two sequences (yN ), and (zN ) in the same class ∼u ∈ C, if dXN (zN , yN ) is not o(1) for ω, then in the electric metric, it is not o(1), since the added edges all have length 1. Thus this map is injective. If (yN ), and (zN ) are not in the same class in C, then dXN (zN , yN ) is not o(1) for ω, and again, in the electric metric, it is not o(1). The map of the lemma is thus injective.  Note that the inclusion is continuous, as inclusions along the sequence are distance non-increasing. But it is not isometric. We need to describe what happens with the cone off. Consider a sequence (YN ) of subsets of Y. One says that the sequence is visible in limω (XN , uN ) if dXN (uN , YN ) ≤ O(1). In that case, limω (YN , uN ) is a subset of limω (XN , uN ), consisting of the images of all the sequences of elements of YN that remain at O(1)-distance from uN . Note that given a sequence (YN ), it can be visible in several limits limω (XN , uN ) (for several non-equivalent (uN )). In those classes where (YN ) is not visible, limω (YN , uN ) is empty. Let us define limω (YN , ∗) to be ⊔∼u ∈C limω (YN , uN ) in ⊔∼u ∈C limω (XN , uN ). By the previous lemma, this is naturally a subset of limω ((XN )el YN , xN ). ω We define Y to be the collection of all sets limω (YN , ∗), for all possible sequences Q (YN ) ∈ N >0 YN . This is a family of subsets of limω ((XN )el YN , xN ). el Let us define [⊔∼u ∈C limω (XN , uN )] to be the cone-off (of parameter 1) of [⊔∼u ∈C limω (XN , ∼u )] over each limω (YN , ∗). Note that there is a natural copy of el el [limω (XN , ∼u )] in [⊔∼u ∈C limω (XN , ∼u )] . el Lemma 2.18. limω ((XN )el YN , xN ) is isometric to [⊔∼u ∈C limω (XN , ∼u )] . el Proof. First there is a natural bijection from limω ((XN )el YN , xN ) to [⊔∼u ∈C limω (XN , ∼u )] . Indeed, for any sequence (yN ) with yN ∈ XN at distance O(1) from xN in the electric metric, Lemma 2.17 provides an image in [⊔∼u ∈C limω (XN , ∼u )]el . For any el sequence (cN ) with cN a cone-point in XN \ XN , at distance O(1) from xN in the electric metric, cN is in the cone electrifying a certain YN , which is therefore at distance O(1) from xN for the electric metric. Choose uN ∈ YN , then the equivalence class of (uN ) is in C, and of course YN is visible in this class. Thus, el there is a cone point c ∈ [⊔∼u ∈C limω (XN , ∼u )] at distance 1 from limω (YN , ∗). We choose this point as the image of the sequence (cN ) in limω ((XN )el YN , xN ). This is well defined, and injective, for if c′N is another sequence of cone-points ω-almost everywhere different from cN , then it defines an ω-almost everywhere different sequence YN′ , and a different set limω (YN′ , ∗). We also can extend our map to all limω ((XN )el YN , xN ) linearly on the cone-edges. This produces a bijection el el limω ((XN )YN , xN ) → [⊔∼u ∈C limω (XN , ∼u )] . To show that it is an isometry, consider two sequences (yN ), (zN ) both in XN , such that the distance in XYelN converges (for ω) to ℓ. Then there is a path of length ℓN (converging to ℓ) in XYelN with, eventually, at most ℓ/2 cone points on HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 13 el it. It follows from the construction that their images in [⊔∼u ∈C limω (XN , ∼u )] are at distance at most ℓ. Conversely, assume (yN ) and (zN ) are sequences in XN giving points in limω (XN , ∼u ) and limω (XN , ∼v ), for ∼u , ∼v ∈ C, and take el a path γ between these points in limω ((XN )el YN , xN ) ≃ [⊔∼u ∈C limω (XN , ∼u )] , of length ℓ > 0. It has finite length, so it contains finitely many cone points ci (i) (i) (i = 1, . . . , r), coning limω (YN , ∗), for which YN is visible in both ∼ui , ∼ui+1 . This easily produces a path in limω ((XN )el YN , xN ) of length ℓ, by using the corresponding (i) cone points and the path between the spaces YN given by the restriction of γ. We have thus observed that the bijection we started with is 1-Lipschitz as is its inverse. It is therefore an isometry.  We finally describe a tree-like structure on [⊔C limω (XN , ∼u )]el where the pieces el are the subspaces [limω (XN , ∼u )] for ∼u ∈ C, which are electrifications Q of limω (XN , ∼u ) over the subsets of the form limω (YN , ∼u ), for all sequences (YN ) ∈ (YN ) that are visible in ∼u . Let us say that two classes ∼u and ∼v are joined by a sequence (YN ) if the latter sequence is visible in both of them. First we describe a simpler case of this tree-like structure. Lemma 2.19. Assume that YN consists of cN -quasiconvex subsets of XN with cN tending to 0. For any pair of different classes ∼u , ∼v in C, the subspaces [limω (XN , ∼u )]el and el el [limω (XN , ∼v )] of [⊔∼w ∈C limω (XN , ∼w )] have intersection of diameter at most 2. Proof. Note that by Lemma 2.17 the intersection consists of cone points. Thus consider two sequences (YN ), (YN′ ) both visible in ∼u and ∼v . Consider then yN (u), yN (v) ∈ YN such that yN (u) is visible in ∼u (hence not in ∼v ) and sym′ ′ metrically yN (v) is visible in ∼v (hence not in ∼u ), and take yN (u), yN (v) ∈ YN′ ′ ′ similarly. The distances dXN (yN (u), yN (u)) and dXN (yN (v), yN (v)) both are O(1) ′ ′ (u), yN (v)) both go to infinity (for ω). The whereas dXN (yN (u), yN (v)) and dXN (yN space XN being a δN -hyperbolic space (for δN → 0), the quadrilateral with these ′ ′ four vertices have their sides [yN (u), yN (v)] and [yN (u), yN (v)] getting o(1)-close to each other, on sequences that are visible for ∼u and sequences that are visible for ∼v . But these sides are close to YN and YN′ respectively. It follows that in limω (XN , ∼u ) and in limω (XN , ∼v ), the limit of YN and of YN′ share a point. Thus the cone point of their electrifications are at distance 2.  Note that if there is a bound on the diameter of the projection of YN on YN′ , then there is only one point in the intersection. Lemma 2.20. If there is a cycle of classes ∼u1 , ∼u2 , . . . , ∼uk , ∼uk+1 =∼u1 where (i) ∼ui is joined to ∼ui+1 by a sequence (YN ), then there is 1 < i0 < k + 1 such that (1) (i ) (i ) (YN 0 ) is visible in ∼u1 , ∼u2 and the cone points of (YN 0 ) and of (YN ) are at el el distance 2 from each other in [limω (XN , ∼u1 )] , and in [⊔C limω (XN , ∼u )] . el As a corollary, limω ((XN )el YN , xN ) is a quasi-tree of the spaces [limω (XN , ∼)] , and more precisely, all paths from [limω (XN , ∼u )]el to [limω (XN , ∼v )]el , if ∼u 6=∼v el have to pass through the 2-neighborhood of a certain cone point of [limω (XN , ∼u )] . 14 FRANCOIS DAHMANI AND MAHAN MJ Proof. The number k is fixed, and the argument will generalize the one of the (i) (i) (i) previous lemma. For each i, let (yN ) and (zN ) be sequences of points of YN (i) (i) respectively visible in ∼ui and in ∼ui+1 . One has dXN (yN , zN ) unbounded, and (i) (i+1) (1) (1) (2) (2) (k) (k) dXN (zN , yN ) = O(1). Therefore in the 2k-gon (yN , zN , yN , zN , . . . , yN , zN ), using the approximation by a finite tree (for hyperbolic spaces), we see that one of (1) (1) (i) (i) the segments [yN , zN ] (i 6= 1) must come kδN -close to [yN , zN ], and at distance (1) O(1) from yN . After extracting a subsequence, one can assume that i is constant in N , and we (i ) choose it to be our i0 . It follows that the sequence (YN 0 ) is visible for ∼u1 and (i0 ) the limit of (YN ) and of (YN1 ) share a point in limω (XN , ∼u1 ). The conclusion (1) (i ) that the cone points of (YN 0 ) and of (YN ) are at distance 2 from each other in el [limω (XN , ∼u1 )] follows, and this also implies that they are at distance at most 2 el in [⊔C limω (XN , ∼u )] .  Note that if the subsets of YN are cn -mutually cobounded, with cn going to 0 (or even bounded) then one can improve the lemma by saying that eventually (1) (i ) YN 0 = YN . From the previous lemmas we get: el el Corollary 2.21. [⊔C limω (XN , ∼u )] is the union of spaces of the form [limω (XN , ∼u )] for ∼u ∈ C, with some cone points identified. el Moreover, if ∼u 6=∼v , and if γ1 , γ2 are any (finite) paths from [limω (XN , ∼u )] to el el [limω (XN , ∼v )] , then for each i ∈ {1, 2}, there exists a cone point ci ∈ [limω (XN , ∼u )] in γi such that the distance between c1 and c2 is at most 2. Indeed, such a pair of paths provides us with a certain finite cycle of classes, starting with ∼u , and we may apply the previous lemma. el el We say that [⊔C limω (XN , ∼u )] is a 2-quasi-tree of spaces of the form [limω (XN , ∼u )] for ∼u ∈ C. Let us prove Proposition 2.10. For convenience of the reader we repeat the statement. Proposition. 2.10 Let (X, d) be a hyperbolic geodesic space, C > 0, and Y be a family of C-quasiconvex subspaces. Then XYel is hyperbolic. If moreover the elements of Y are mutually cobounded, then XYh is hyperbolic. Proof. We claim that, for all ρ, there exists δ0 < ρ/1014 and C0 < ρ/1014 such that if X is δ0 -hyperbolic, and if Y is a collection of C0 -quasiconvex subsets, then every ball of radius ρ of XYel is 10-hyperbolic. For proving the claim, assume it false, and consider a sequence of counterexamples (XN , YN ) for δ0 = C0 = N1 , N = 1, 2, . . . . This means that (XN )el YN fails to be 10-hyperbolic. There are four points xN , yN , zN , tN , all at distance at most 2ρ from xN , such that (xN , zN )tN ≤ inf{(xN , yN )tN , (yN , zN )tN } − 10. We pass el to the ultralimit for ω. In limω (XN , xN ), each sequence xN , yN , zN , tN converges, since these points stay at bounded distance from xN , and the inequality persists. Hence one gets four points falsifying the 10-hyperbolicity condition in a pointed space limω ((XN )el YN , xN ). HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 15 But the asymptotic cone limω ((XN )el YN , xN ) is, by Corollary 2.21, a 2-quasitree of spaces that are electrifications (of parameter 1) of real trees limω (XN , x′N ), for some base point x′N over the family Y ω , consisting of convex subsets (i.e. of subtrees). el This space (limω (XN , x′N ))el Y ω has 2-thin geodesic triangles, therefore limω ((XN )YN , xN ) el itself is 10-hyperbolic, a contradiction. The claim hence holds: XY is ρ-locally 10hyperbolic. We now claim that, under the same hypothesis, it is (2 + 10C0 + 10δ0 )-coarsely simply-connected, that is to say that any loop in it can be homotoped to a point by a sequence of substitutions of arcs of length < (2 + 10C0 + 10δ0) by its complement in a loop of length < (2+10C0 +10δ0 ). Indeed, any time such a loop passes through a cone point associated to some Y ∈ Y, one can consider a geodesic in X between its entering and exiting points in Y , which stays in the C0 neighborhood of Y . Therefore, a (2 + 10C0 )-coarse homotopy of the loop transforms it into a loop in X, which is δ-hyperbolic. Since a δ- hyperbolic space is 10δ-coarsely simply-connected, the second claim follows. The final ingredient is the Gromov-Cartan-Hadamard theorem [Cou14, Theorem A.1], stating that, if ρ is sufficiently large compared to µ, any ρ-locally 10-hyperbolic space which is µ-coarsely simply connected is (globally) δ ′ -hyperbolic, for some δ ′ . We thus get that there exists δ0 < ρ/1014 and C0 < ρ/1014 such that if X is δ0 -hyperbolic, and if Y is a collection of C0 -quasiconvex subsets, then XYel is δ ′ hyperbolic. Now let us argue that this implies the first point of the proposition. If X and Y are given as in the statement, one may rescale X by a certain factor λ > 1, so that it is δ0 -hyperbolic, and such that Y is a collection of C0 -quasiconvex subsets. Let us define XYelλ to be G XYelλ = X ⊔ { Yi × [0, λ]}/ ∼ i∈I where ∼ denotes the identification of Yi × {0} with Yi ⊂ X for each i, and the identification of Yi × {1} to a single cone point vi (dependent on i), and where Yi × [0, λ] is endowed with the product metric as defined in the first paragraph of 2.1 except that {y} × [0, n] is isometric to [0, λ]. The claim ensures that XYelλ is hyperbolic. However, it is obviously quasi-isometric to XYel . We have the first point. For the second part, one can proceed with a similar proof, with horoballs. The claim is then that for all ρ, there exist δ0 , C0 and D0 such that if X is δ0 -hyperbolic, and if Y is a collection of C0 -quasiconvex subsets, D0 -mutually cobounded, then any ball of radius ρ of the horoballification XYh is 10-hyperbolic. The proof of the claim is similar. Consider a sequence of counterexamples XN , YN , for the parameters δ = C = D = 1/N for N going to infinity, with the four points xN , yN , zN , tN in (XN )hY , in a ball of radius ρ, falsifying the hyperbolicity condition. There are two cases. Either xN (which is in (XN )hY ) escapes from XN , i.e. its distance from some basepoint in XN tends to ∞ for the ultrafilter ω, or it does not. In the case that it escapes from XN , then, when it is larger than ρ all four points xN , yN , zN , tN are in a single horoball, but such a horoball is 10-hyperbolic hence a contradiction. 16 FRANCOIS DAHMANI AND MAHAN MJ The other case is when there is x′N ∈ XN whose distance to xN remains bounded (for the ultrafilter ω). Note that {xN , yN , zN , tN } converge in the asymptotic cone limω ((XN )hYN , x′N ) of the sequence of pointed spaces ((XN )hYN , x′N ). It is also immediate by definition of limω YN that limω ((XN )hYN , x′N ) is the horoballification of the asymptotic cone of the sequence (XN , x′N ) over the family limω (YN , x′N ) defined above. This family limω (YN , x′N ) consists of convex subsets (hence subtrees), such that any two share at most one point. This horoballification is therefore a tree-graded space in the sense of [DS05], with pieces being the combinatorial horoballs over the subtrees constituting limω YN . As a tree of 10-hyperbolic spaces, this space is 10hyperbolic, contradicting the inequalities satisfied by the limits limω {xN , yN , zN , tN }. Therefore, XYh is ρ-locally 10-hyperbolic. As before, one may check that (under the same assumptions) XYh is (2 + 10C0 + 10δ0 )-coarsely simply connected, and again this implies by the Gromov-CartanHadamard theorem that (under the same assumptions) XYh is hyperbolic. This implies the second point. Indeed, let us denote by λ1 X the space X with metric rescaled by λ1 . The previous claim shows that, under the assumption of the second point of the proposition, there exists λ > 1 such that λ( λ1 X)h1 Y is hyperbolic. Consider the λ map η between XYh → λ( λ1 X)h1 Y that is identity on X and that sends {y} × {n} to λ {y} × {λ × (n + ⌊log2 λ⌋)} for all y ∈ Yi and all Yi (and all n). All paths in XYh that have only vertical segments in horoballs have their length expanded (under the map η) by a factor between 1 and λ + log2 λ. But the geodesics in XYh and λ( λ1 X)h1 Y are λ paths whose components in horoballs consist of a vertical (descending) segment, followed by a single edge, followed by a vertical ascending segment (see [GM08]). Hence η is a quasi-isometry, and the space XYh is hyperbolic.  We continue with the persistence of quasi-convexity. Proposition. 2.11 Given δ, C there exists C ′ such that if (X, dX ) is a δ-hyperbolic metric space with a collection Y of C-quasiconvex, sets, then the following holds: If Q(⊂ X) is some (any) C-quasiconvex set (not necessarily an element of Y), then Q is C ′ -quasiconvex in (XYel , de ). Proof. The strategy is similar to that in the previous proposition. The main claim is that for all ρ, there is δ0 < 1, C0 < 1 such that if (X, dX ) is δ0 -hyperbolic, if Y is a collection of C0 -quasiconvex subsets and if Q is another C0 -quasiconvex subset of X, then Q is ρ-locally 10-quasiconvex in XYel (of course δ0 , C0 will be very small). To prove the claim, again, by contradiction, consider a sequence XN , YN , QN of counter examples for δN = CN = 1/N for N = 1, 2, . . . . There exist two points xN , yN in QN , at distance ≤ ρ from each other (for the electric metric), and a geodesic [xN , yN ] in XYel with a point zN on it at distance > 10 from Q. We record ′ a point zN in Q at minimal distance (≤ ρ in any case) from zN . With a non principal ultrafilter ω, we may take the asymptotic cone of the family el of pointed spaces (XN , xN ). In limω ((XN )el Y , xN ), the sequences (yN ), ([xN , yN ]) and (zN ) have limits for which the distance inequalities persist, and we get that limω (QN , xN ) is not ρ-locally 10-quasiconvex in limω ((XN )el Y , xN ). But as we noticed in Corollary 2.21 limω ((XN )el Y , xN ) is a 2-quasi-tree of spaces of the form ′ (limω (XN , x′N ))el Y ω , which are the electrifications of R-trees limω (XN , xN ) over a HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 17 family of convex subsets (i.e. subtrees). In this space, limω (QN , xN ) is also a subforest of ⊔(uN )∈C limω (XN , uN ). Also observe that if (QN ) is visible in two adjacent classes, then limω (QN , xN ) is adjacent to their common cone point over sequences (i) (j) (YN ), (YN ). Hence limω (QN , xN ) is 2-quasiconvex in limω ((XN )el Y ω , xN ), and this ′ contradicts the inequalities satisfied by limω {xN , yN , zN , zN }. The claim is established for all ρ. Now there exists ρ0 such that, in any 1-hyperbolic space, any subset that is ρ0 -locally 10-quasiconvex is 1014 -globally quasiconvex (this classical fact, perhaps found elsewhere with other (better!) constants, follows also from the GromovCartan-Hadamard theorem for instance). So, by choosing an appropriate ρ, we have proven that there is δ0 < 1, C0 < 1 and C1 , such that if (X, dX ) is δ0 -hyperbolic, if Y is a collection of C0 -quasiconvex subsets and if Q is another C0 -quasiconvex subset of X, then Q is C1 -quasiconvex in XYel . Coming back to the statement of the proposition, by rescaling our space, we have proven that if (X, dX ) is a δ-hyperbolic metric space with a collection Y of C-quasiconvex sets, and if Q is C-quasiconvex, then Q is λC1 -quasiconvex in XYelλ (as defined in the previous proof) for λ = max{δ/δ0 , C/C0 }. Since XYelλ is quasiisometric to XYel , by a (λ, λ)-quasi-isometry, it follows that Q is C ′ -quasiconvex in XYel for C ′ depending only on δ, C.  Finally, we consider the proposed converse. Proposition. 2.12 Let (X, d) be hyperbolic, and let Y be a collection of uniformly quasiconvex subsets. Let H be a subset of X that is coarsely path connected, and quasiconvex in the electrification XYel . Assume also that there exists ǫ ∈ (0, 1), and ∆0 such that for all ∆ > ∆0 , wherever H (∆, ǫ)-meets an item Y in Y, there is a path in H +ǫ∆ between the meeting points in H that is uniformly a quasigeodesic in the metric (X, d). Then H is quasiconvex in (X, d). The quasiconvexity constant of H can be chosen to depend only on the constants involved for (X, d), Y, ∆0 , ǫ, the coarse path connection constant, and the quasigeodesic constant of the last assumption. We use the same strategy again. The claim is now the lemma below. To state it, we need to define the m-coarse path metric on an m-coarse path connected subspace of a metric space. A subset Y ⊂ X of a metric space is m-coarse path connected if for any two points x, y in it there is a sequence x0 = x, x1 , . . . , xr = y for some r such that xi ∈ Y and dX (xi , xi+1 ) ≤ m for all i. We call such a sequence an mcoarse path or a path with mesh ≤ m. The length of the coarse path (x0 , . . . , xr ) is P dX (xi , xi+1 ). The m-coarse path metric on Y is the distance obtained by taking the infimum of lengths of coarse paths between its points. An m-coarse geodesic is a coarse path realizing the coarse path metric between two points. el , R > 0, Q > 1, ǫ > 0, and ∆ > 10ǫ. Then there exists Lemma 2.22. Fix CH δ0 , C0 , m0 > 0, such that the following holds: Assume that (X, d) is geodesic, δ0 -hyperbolic, with a collection Y of C0 -quasiconvex subsets. Further suppose that H is an m0 -coarsely connected subset of X which 18 FRANCOIS DAHMANI AND MAHAN MJ el is CH -quasiconvex in the electrification XYel . Equip H +ǫ∆ with its m0 -coarse path metric dH . Assume also that whenever H (∆, ǫ)-meets a set Y ∈ Y, there is a (Q, C0 )quasigeodesic path, which is an (m0 /10)-coarse path, in H +ǫ∆ joining the meeting points in H. Then for all a, b ∈ H +ǫ∆ at dH -distance at most R from each other, any m0 coarse δ0 -quasi-geodesic of H +ǫ∆ (for its coarse path metric) between a, b is (∆ × el CH )-close to a geodesic of X. Proof. Suppose that the claim is false: For all choice of δ, C, m there is a counterexample. Set δN = CN = 1/N . For each ǫ, there exists N such that, in a N1 -hyperbolic space, for any two points x, y, and any (Q, 1/N )-quasigeodesic p which is a (1/N )-coarse path between these two points, the ǫ-neighborhood of p contains the geodesics [x, y]. (This, for instance, is visible on an asymptotic cone). Thus, it is possible to choose a sequence mN > 10/N decreasing to zero, such 1 that pairs of 9∆ 10 -long (Q, 1/N )-quasigeodesics with mesh ≤ 1/N in a N -hyperbolic spaces, with starting points at distance ≤ ∆/10 from each other, and ending points at distance ≤ ∆/10 from each other, necessarily lie at distance (mN /10) from one another. Let then XN , HN , YN be a counterexample to our claim for these values: for each +∆ +∆ N there is aN , bN in HN , R-close to each other for dHN , and a point cN ∈ HN el in a coarse δN -quasi-geodesic in [aN , bN ]dHn at distance at least (∆ × CH ) from el a geodesic [aN , bN ] in XN . However cN is CH -close to a geodesic [aN , bN ]el in el X . Passing to an asymptotic cone, we find a map pω from an interval [0, R] to a continuous path in limω (HN , aN ) from aω to bω (which can be equal to aω ) el that passes through a point cω at distance ≥ (∆ × CH ) from the arc [aω , bω ] in limω (XN , aN ). el However, it is at distance ≤ CH in the electrification of limω (XN , aN ) by Y ω . It follows that on the path in limω (XN , aN ) from [aω , bω ] to cω , there must exist a segment of length ≥ ∆ belonging to the same Y ω ∈ Y ω . Let us say that Y ω is the limit of a sequence YN . Note that the limit path pω crosses this segment at least twice (once in either direction). Thus, for N large enough, HN (∆, ǫ)-meets YN , with two pairs of meeting points (r1 , r2 ), (s1 , s2 ) in HN , where d(r1 , r2 ) ≥ 9∆/10 (and (s1 , s2 ) ≥ 9∆/10) and d(r1 , s1 ) ≤ 3∆/10 and d(r2 , s2 ) ≤ 3∆/10. By assumption, there is a (Q, N1 )quasi-geodesic path in H +ǫ∆ from s1 to s2 and another from r1 to r2 , with mesh < mN /10. They have to fellow travel on a large subpath, and pass at distance ≤ mN /10 from each other, by choice of mN . One can therefore find a shortcut that is still a path in H +∆ of mesh ≤ mN , a contradiction.  From the claim, we can prove the statement of the Proposition. Consider a situation as in the statement. We may choose the coarse path connectivity constant of H to be more than 10 times the quasigeodesic constant of the last assumption there. Take ǫ, given by the assumption of the Proposition, and ∆ > max{100ǫ, ∆0}. Let Q be the quasi-geodesic constant given by the the assumption of the proposition el on (∆, ǫ)-meetings, and CH be as given by the assumption. Take R larger (how large will be made clear in the proof). HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 19 Rescale the space X so that the hyperbolicity constant, the quasiconvexity constant of items of Y, and the constant of coarse path connection of H are respectively smaller than δ0 , C0 , m0 of the Lemma above. Note that the assumption of the proposition on (∆, ǫ)-meetings is invariant under rescaling (except for the value of ∆0 ). Thus, this assumption still holds, with the same ǫ, and for the specified ∆ chosen above. The Lemma applies, and H +ǫ∆ is R-locally quasiconvex for the rescaled metric. By the local to global principle (in δ0 hyperbolic spaces), with a suitable preliminary (large enough) choice of R, H +ǫ∆ is then globally quasiconvex. After rescaling back to the original metric of X, H +λ is still quasiconvex for some λ (depending on ǫ∆, and the coefficient of rescaling); hence H is quasiconvex. By construction, we also have the statement on the dependence of the quasiconvexity constant. ✷ 2.5.4. Coarse hyperbolic embeddedness and Strong Relative Hyperbolicity. The following Proposition establishes the equivalence of Coarse hyperbolic embeddedness and Strong Relative Hyperbolicity in the context of this paper. Proposition 2.23. Assume that (X, d) is a metric space, and that Y is a collection of subspaces. If the horoballification XYh of X over Y is hyperbolic, then Y is coarsely hyperbolically embedded in the sense of spaces. If X is hyperbolic and if Y is coarsely hyperbolically embedded in the sense of spaces, then XYh is hyperbolic. We remark here parenthetically that the converse should be true without the assumption of hyperbolicity of X. However, this is not necessary for this paper. Proof. Assume that the horoballification XYh of X over Y is δ−hyperbolic. The horoballs Y h (corresponding to Y ) are thus 10δ-quasiconvex. Therefore, by Proposition 2.10, the electrified space obtained by electrifying (coning off) the horoballs Y h is hyperbolic. Since by Proposition 2.8, this space is quasi-isometric to (XYel , del Y ), it follows that the later is hyperbolic. This proves the first condition of Definition 2.2. We want to prove the existence of a proper increasing function ψ : R+ → R+ , such that the angular metric at each cone point vY (for Y ∈ Y) of (XYel , del Y ) is bounded below by ψ ◦ d|Y . Define ψ(r) = inf Y ∈Y inf y1 ,y2 ∈Y,d(y1 ,y2 )≤r ˆ 1 , y2 ). d(y Of course, the angular metric at vY is bounded below by ψ ◦ d|Y . The function ψ is obviously increasing. We need to show that it is proper, i.e. that it goes to +∞. If ψ is not proper, then there exists θ0 > 0 such that for all D, there exist Y ∈ Y ˆ y ′ ) ≤ θ0 (where dˆ is the angular and y, y ′ ∈ Y at d−distance greater than D but d(y, metric on Y ). We choose D >> θ0 δ (for instance D = exp(100(θ0 + 1)(δ + 1))). Consider a path in (XYh )el of length less than θ0 from y to y ′ avoiding the cone point of Y . Because D >> θ0 , this path has to pass through other cone points. It can thus be chosen as a concatenation of N + 1 geodesics whose vertices are y, y ′ and some cone points v1 , . . . , vN (corresponding to Y1 , . . . , YN with N < θ0 ). Adjoining the (geodesic) path [y, vY ] ∪ [vY , y ′ ] (where vY corresponds to the cone 20 FRANCOIS DAHMANI AND MAHAN MJ point for Y ), we thus have a geodesic (N + 2)-gon σ. Next replace each passage of σ through a cone point (vi or vY ) in XYel by a geodesic (µi or µY respectively) in the corresponding horoball (Yih or Y h respectively) in XYh to obtain a geodesic (2N + 2)-gon P in XYh . The geodesic segments µi or µY comprise (n + 1) alternate sides of this geodesic (2N + 2)-gon. Since XYh is δ−hyperbolic, it follows that the mid-point m of µY is at distance ≤ (2N + 2)δ from another edge of P . Note that m is in the horoball of Y , and because the distance in Y between y and y ′ is larger than D, we have that dh (m, Y ) is at least log(D)/2. Since no other edge of P enters the horoball Y h , this forces log(D) (and hence D) to be bounded in terms of θ0 and δ: D ≤ exp(4(N + 1)δ). Since N ≤ θ0 , this is a contradiction with the choice of D. We can conclude that ψ is proper, and we have the first statement. Let us consider the second statement. If X is hyperbolic and if Y is coarsely hyperbolically embedded in the sense of spaces, then elements of Y are uniformly quasiconvex in (X, d) by 2.7, and, by the property of the angular distance on any Y ∈ Y, they are mutually cobounded. The statement then follows by Proposition 2.10.  3. Algebraic Height and Intersection Properties 3.1. Algebraic Height. We recall here the general definition for height of finitely many subgroups. Definition 3.1. Let G be a group and {H1 , . . . , Hm } be a finite collection of subgroups. Then the algebraic height of this collection is n if (n + 1) is the smallest number with the property that for any (n+1) distinct left cosets g1 Hα1 , . . . , gn+1 Hαn+1 , T the intersection 1≤i≤n+1 gi Hαi gi−1 is finite. We shall describe this briefly by saying that algebraic height is the largest n for which the intersection of n essentially distinct conjugates of H1 , . . . , Hm is infinite. Here ‘essentially distinct’ refers to the cosets of H1 , . . . , Hm and not to the conjugates themselves. For hyperbolic groups, one of the main Theorems of [GMRS97] is the following: Theorem 3.2. [GMRS97] Let G be a hyperbolic group and H a quasiconvex subgroup. Then the algebraic height of H is finite. Further, there exists R0 such that if H ∩ gHg −1 is infinite, then g has a double coset representative with length at most R0 . The same conclusions hold for finitely many quasiconvex subgroups {H1 , . . . , Hn } of G. We quickly recall a proof of Theorem 3.2 for one subgroup H in order to generalize it to the context of mapping class groups and Out(Fn ). Proof. Let G be hyperbolic, X(= ΓG ) a Cayley graph of G with respect to a finite generating set (assumed to be δ−hyperbolic), and H a C0 −quasiconvex subgroup of G. Suppose that there exist N essentially distinct conjugates {H gi }, i = 1, . . . , N , of H that intersect in an infinite subgroup. The N left-cosets gi H are disjoint and share an accumulation point p in the boundary of G (in the limit set of ∩i H gi ). Since all gi H are C0 −quasiconvex, there exist N disjoint quasi-geodesics σ1 , . . . , σN HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 21 (with same constants λ, µ depending only on C0 , δ) converging to p such that σi is in gi H. Since X is δ−hyperbolic, there exists R(= R(λ, µ, δ) = R(C0 , δ)) and a point p0 sufficiently far along σ1 such that all the quasi-geodesics σ1 , . . . , σN pass through BR (p0 ). Hence N ≤ #(BR (p0 )) giving us finiteness of height. Further, any such σi furnishes a double coset representative gi′ of gi (say by taking a word that gives the shortest distance between H and the coset gi H) of length bounded in terms of R. This furnishes the second conclusion.  Remark 3.3. A word about generalizing the above argument to a family H of finitely many subgroups is necessary. The place in the above argument where H consists of a singleton is used essentially is in declaring that the N left-cosets gi H are disjoint. This might not be true in general (e.g. H1 < H2 for a family having two elements). However, by the pigeon-hole principle, choosing N1 large enough, any N1 distinct conjugates {Higi }, i = 1, . . . , N, Hi ∈ H must contain N essentially distinct conjugates {H gi }, i = 1, . . . , N of some H ∈ H and then the above argument for a single H ∈ H goes through. Remark 3.4. A number of other examples of finite algebraic height may be obtained from certain special subgroups of Relatively Hyperbolic Groups, Mapping Class Groups and Out(Fn ). These will be discussed after we introduce geometric height later in the paper. 3.2. Geometric i-fold intersections. Given a finite family of subgroups of a group we define collections of geometric i−fold intersections. Definition 3.5. Let G be endowed with a left invariant word metric d. Let H be a finite family of subgroups of G. For i ∈ N, i ≥ 2, define the geometric i-fold intersection, or simply the i-fold intersection of cosets of H, Hi , to be the set of subsets J of G for which there exist H1 , . . . , Hi ∈ H and g1 , . . . , gi ∈ G, and ∆ ∈ N satisfying:   \ +∆ J =  (gj Hj )  j T +∆ and j (gj Hj ) is not in the 20δ-neighborhood of eter of J is at least 10∆. T +∆−2δ (gj Hj ) , and the diam- Geometric i−fold intersections are thus, by definition, intersections of thickenings of cosets. The condition that the diameter of the intersection is larger than 10 times the thickening is merely to avoid counting myriads of too small intersections. The next proposition establishes that the collection of such intersections is again closed under intersection. Proposition 3.6. Consider J ∈ Hj , and K ∈ Hk for j < k and let ∆J , ∆K be J and K respectively. Write J = Tconstants as in Definition T 3.5 for defining  +∆J ′ ′ +∆K and K = , and let ∆0 > max(∆J , ∆K ). i (gi Hi ) i (gi Hi ) Assume that J and K (∆, ǫ)-meet, for some ∆ > 20∆0 , and for ǫ < 1/50. Then either K ⊂ J, or for any pair of (∆, ǫ)-meeting points of J and K, there is L ∈ Hj+1 contained in J, that contains it. Proof. Let x, y be (∆, ǫ)-meeting points of J and K. If K 6⊂ J, we can assume that +∆ +ǫ∆ x, y are in (g1′ H1′ ) K for some g1′ H1′ not contained in the collection {gi Hi }. 22 FRANCOIS DAHMANI AND MAHAN MJ T T +∆′ +∆ +ǫ∆ +∆ +ǫ∆ ∩ ∩(g1′ H1′ ) K , hence in i (gi Hi ) Notice that x, y are in i (gi Hi ) J ′ ′ ′ +∆ ′ (g1 H1 ) for ∆ the greater of ∆K + ǫ∆ and ∆J + ǫ∆. We argue by contradiction. Suppose that x, y are contained in the 20δ-thickening of a 2δ-lesser intersection. It follows that there are x′ , y ′ such that d(x, x′ ) ≤ 20δ, d(y, y ′ ) < 20δ and still d(x′ , J) ≤ ǫ∆ − 2δ, and d(y ′ , J) ≤ ǫ∆ − 2δ. But by definition of (∆, ǫ)-meeting, this is a contradiction. Finally, the diameter of the intersection of ∆′ -thickenings of our cosets, is larger than ∆. Since the thickening constant is ∆′ ≤ ∆0 + ǫ∆, the ratio of the thickening constant by the diameter is at most (∆0 + ǫ∆)/∆ which is less than 1/10, hence the result.  Let (G, d) be a group with a word metric and H < G a subgroup. The restriction of d on H will be called the induced metric on H from G. Proposition 3.7. Let (G, d) be a group with a δ-hyperbolic word metric (not necessarily locally finite). Assume that A1 , . . . , AT n are C-quasiconvex subsets of G. Then for all ∆ > C + 20δ, the intersection A+∆ is (4δ)-quasiconvex in (G, d). i Moreover, if A and B are C-quasiconvex subsets of G, and if ΠB (A) denotes the set of nearest points projections of A on B, then, either ΠB (A) ⊂ A+3C+10δ or DiamΠB (A) ≤ 4C + 20δ. T Proof. Consider x, y ∈ A+∆ and take ai , bi some nearest point projection on Ai . i On a geodesic [x, y] take p at distance greater than 4δ from x and y. Hyperbolicity applied to the quadrilateral (x, ai , bi , y) tells us that x is 4δ-close to [x′i , ai ]∪[ai , bi ]∪ [bi , yi′ ], where x′i and yi′ are the points of, respectively [x, ai ] and [y, bi ], at distance 4δ from, respectively, x and y. Let us call [x′i , ai ], [bi , yi′ ] the approaching segment, and [ai , bi ] the traveling segments. Hence for each i, p is closed to either an approaching segment, or the traveling segment, with subscript i. If p is close to an approaching segment of index i, then it is in A+∆ i . If x is close to the traveling segment of index i, then it is at distance at most because ∆ > C + 10δ. C + 10δ from Ai , hence in A+∆ i T We thus obtain that [x, y] remains at distance 4δ from A+∆ i . To prove the second statement, take a0 , b0 in A and B respectively realizing the distance (up to δ if necessary). Let b ∈ ΠB (A), and assume that it is the projection of a. In the quadrilateral a, a0 , b, b0 , the geodesic [a, a0 ] stays in A+C and [b, b0 ] is in B +C . Since b is a projection, [b, a] fellow-travels [b, b0 ] for less than 2C + 10δ, and similarly for [b0 , a0 ] with [b0 , b]. By hyperbolicity [b, b0 ] thus stays 10δ close to [a, a0 ] except for the part (2C + 10δ)-close to either b or b0 . It follows that either b ∈ A+(3C+10δ) or b is at distance ≤ 4C + 20δ from b0 . Thus ΠB (A) ⊂ A+3C+10δ or DiamΠB (A) ≤ 4C + 20δ.  3.3. Algebraic i-fold intersections. We provide now a more algebraic (group theoretic) treatment of the preceding discussion. This is in keeping with the more well-known setup of intersections of subgroups and their conjugates cf. [GMRS97]. Given a finite family of subgroups of a group we first define collections of i−fold conjugates or algebraic i-fold intersections. HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 23 Definition 3.8. Let G be endowed with a left invariant word metric d. Let H be a family of subgroup of G. For i ∈ N, i ≥ 2, define Hi to be the set of subgroups J of G for which there exists H1 , . . . , Hi ∈ H and g1 , . . . , gi ∈ G satisfying: • the cosets gj Hj are pairwise distinct (and hence as in [GMRS97] we use the terminology that the conjugates {gj Hj gj−1 , j = 1, . . . , i} are essentially distinct) T • J is the intersection j gj Hj gj−1 . • J is unbounded in (G, d). We shall call Hi the family of algebraic i-fold intersections or simply, i−fold conjugates. The second point in the following definition is motivated by the behavior of nearest point projections of cosets of quasiconvex subgroups of hyperbolic groups on each other. Let (G, d) be hyperbolic and H1 , H2 be quasiconvex. Let aH1 , bH2 be cosets and c = a−1 b. Then the nearest point projection of bH2 onto aH1 is the (left) a−translate of the nearest point projection of cH2 onto H1 . Let ΠB (A) denote the (nearest-point) projection of A onto B. Then ΠH1 (cH2 ) lies in a bounded neighborhood (say D0 −neighborhood) of H2c ∩ H1 and so ΠaH1 (bH2 ) lies in a D0 −neighborhood of bH2 b−1 a ∩ aH1 . The latter does lie in a bounded neighborhood of (H2 )b ∩ (H1 )a , but this bound depends on a, b and is not uniform. Hence the somewhat convoluted way of stating the second property below. The language of nearest-point projections below is in the spirit of [Mj11, Mj14] while the notion of geometric i-fold intersections discussed earlier is in the spirit of [DGO11]. Definition 3.9. Let G be a group and d a word metric on G. A finite family H = {H1 , . . . , Hm } of subgroups of G, each equipped with a wordmetric di is said to have the uniform qi-intersection property if there exist C1 , . . . , Cn , . . . such that (1) For all n, and all H ∈ Hn , H has a conjugate H ′ such that if d′ is any induced metric on H ′ from some Hi ∈ H, then (H ′ , d′ ) is (C1 , C1 )−qiembedded in (G, d). (2) For all n, let (Hn )0 be a choice of conjugacy representatives of elements of Hn that are C1 -quasiconvex in (G, d). Let CHn denote the collection of left cosets of elements of (Hn )0 . For all A, B ∈ CHn with A = aA0 , B = bB0 , and A0 , B0 ∈ (Hn )0 , ΠB (A) either has diameter bounded by Cn for the metric d, or ΠB (A) lies in a (left) a−translate translate of a Cn −neighborhood of A0 ∩ B0c , where c = a−1 b. In keeping with the spirit of the previous subsection, we provide a geometric version of the above definition below. Definition 3.10. Let G be a group and d a word metric on G. A finite family H = {H1 , . . . , Hm } of subgroups of G, each equipped with a wordmetric di is said to have the uniform geometric qi-intersection property if there exist C1 , . . . , Cn , . . . such that (1) For all n, and all H ∈ Hn , (H, d) is Cn -coarsely path connected, and (C1 , C1 )−qi-embedded in (G, d) (for its coarse path metric). (2) For all A, B ∈ Hn either diamG,d (ΠB (A)) ≤ Cn , or ΠB (A) ⊂ A+Cn for d. 24 FRANCOIS DAHMANI AND MAHAN MJ Remark 3.11. The second condition of Definition 3.10 follows from the first condition if d is hyperbolic by Proposition 3.7. Further, the first condition holds for such (G, d) so long as ∆ is taken of the order of the quasiconvexity constants (again by Proposition 3.7). Note further that if G is hyperbolic (with respect to a not necessarily locally finite word metric) and H is C-quasiconvex, then by Proposition 3.6 the collection of geometric n-fold intersections Hn is mutually cobounded for the metric of (G, d)el Hn+1 (as in Definition 2.9). 3.4. Existing results on algebraic intersection properties. We start with the following result due to Short. Theorem 3.12. [Sho91, Proposition 3] Let G be a group generated by the finite set S. Suppose G acts properly on a uniformly proper geodesic metric space (X, d), with a base point x0 . Given C0 , there exists C1 such that if H1 , H2 are subgroups of G for which the orbits Hi x0 are C0 -quasiconvex in (X, d) (for i = 1, 2) then the orbit (H1 ∩ H2 )x0 is C1 −quasiconvex in (X, d). We remark here that in the original statement of [Sho91, Proposition 3], X is itself the Cayley graph of G with respect to S, but the proof there goes through without change to the general context of Proposition 3.12. In particular, for G (Gromov) hyperbolic, or G = M od(S) acting on Teichmuller space T eich(S) (equipped with the Teichmuller metric) and Out(Fn ) acting on Outer space cvN (with the symmetrized Lipschitz metric), the notions of (respectively) quasiconvex subgroups or convex cocompact subgroups of M od(S) or Out(Fn ) (see Sections 4.3 and 4.4 below for the Definitions) are independent of the finite generating sets chosen. Hence we have the following. Theorem 3.13. Let G be either M od(S) or Out(Fn ) equipped with some finite generating set. Given C0 , there exists C1 such that if H1 , H2 are C0 −convex cocompact subgroups of G, then H1 ∩ H2 is C1 −convex cocompact in G. The corresponding statement for relatively hyperbolic groups and relatively quasiconvex groups is due to Hruska. For completeness we recall it. Definition 3.14. [Osi06b, Hru10] Let G be finitely generated hyperbolic relative to a finite collection P of parabolic subgroups. A subgroup H ≤ G is relatively quasiconvex if the following holds. Let S be some (any) finite relative generating set for (G, P), and let P be the union of all Pi ∈ P. Let Γ denote the Cayley graph of G with respect to the generating set S ∪ P and d the word metric on G. Then there is a constant C0 = C0 (S, d) such that for each geodesic γ ⊂ Γ joining two points of H, every vertex of γ lies within C0 of H (measured with respect to d). Theorem 3.15. [Hru10] Let G be finitely generated hyperbolic relative to P. Given C0 , there exists C1 such that if H1 , H2 are C0 −relatively quasiconvex subgroups of G, then H1 ∩ H2 is C1 −relatively quasiconvex in G. 4. Geometric height and graded geometric relative hyperbolicity We are now in a position to define the geometric analog of height. There are two closely related notions possible, one corresponding to the geometric notion of i−fold intersections and one corresponding to the algebraic notion of i−fold conjugates. HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 25 The former is relevant when one deals with subsets and the latter when one deals with subgroups. Definition 4.1. Let G be a group, with a left invariant word metric d(= dG ) with respect to some (not necessarily finite) generating set. Let H be a family of subgroups of G. The geometric height, of H in (G, d) (for d) is the minimal number i ≥ 0 so that the collection Hi+1 of (i + 1)−fold intersections consists of uniformly bounded sets. If H is a single subgroup, its geometric height is that of the family {H}. Remark 4.2. Comparing notions of height: • Geometric height is related to algebraic height, but is more flexible, since in the former, we allow the group G to have an infinite generating set. We are then free to apply the operations of electrification, horoballification in the context of non-proper graphs. • In the case of a locally finite word metric, algebraic height is less than or equal to geometric height. Equality holds if all bounded intersections are uniformly bounded. • For a locally finite word metric, finiteness of algebraic height implies that i−fold conjugates are finite (and hence bounded in any metric) for all sufficiently large i. Hence finiteness of geometric height follows from finiteness of algebraic height and of a uniform bound on the diameter of the finite intersections. • When the metric on a Cayley graph is not locally finite, we do not know of any general statement that allows us to go directly from finiteness of diameter of an intersection of thickenings of cosets (geometric condition) to finiteness of diameter of intersections of conjugates (algebraic condition). Some of the technical complications below are due to this difficulty in going from geometric intersections to algebraic intersections. We generalize Definition 1.3 of graded relative hyperbolicity to the context of geometric height as follows. Definition 4.3. Let G be a group, d the word metric with respect to some (not necessarily finite) generating set and H a finite collection of subgroups. Let Hi be the collection of all i−fold conjugates of H. Let (Hi )0 be a choice of conjugacy representatives, and CHi the set of left cosets of elements of (Hi )0 Let di be the metric on (G, d) obtained by electrifying the elements of CHi . Let CHN be the graded family (CHi )i∈N . We say that G is graded geometric relatively hyperbolic with respect to CHN if (1) H has geometric height n for some n ∈ N, and for each i there are finitely many orbits of i-fold intersections. (2) For all i ≤ n + 1, CHi−1 is coarsely hyperbolically embedded in (G, di ). (3) There is Di such that all items of CHi are Di -coarsely path connected in (G, d). Remark 4.4. Comparing geometric and algebraic graded relative hyperbolicity: Note that the second condition of Definition 4.3 is equivalent, by Proposition 2.23, 26 FRANCOIS DAHMANI AND MAHAN MJ to saying that (G, di ) is strongly hyperbolic relative to the collection Hi−1 . This is exactly the third (more algebraic) condition in Definition 1.3. Also, the third condition of Definition 4.3 is the analog of (and follows from) the second (more algebraic) condition in Definition 1.3. Thus finite geometric height along with (algebraic) graded relative hyperbolicity implies graded geometric relative hyperbolicity. The rest of this section furnishes examples of finite height in both its geometric and algebraic incarnations. 4.1. Hyperbolic groups. Proposition 4.5. Let (G, d) be a hyperbolic group with a locally finite word metric, and let H be a quasiconvex subgroup of G. Then H has finite geometric height. More precisely, if C is the quasi-convexity constant of H in (G, d), and if δ be the hyperbolicity constant in (G, d), and if N is the cardinality of a ball of (G, d) of radius 2C + 10δ, and if g0 H, . . . , gk H are distinct cosets of H for which there exists Tk ∆ such that the total intersection i=0 (gi H)+∆ has diameter more than 10∆, and more that 100δ, then there exists x ∈ G such that each gi H intersects the ball of radius N around x. First note that the second statement implies the first in the (by the third point of Remark 4.2). We will directly prove the second. The proof is similar to the finiteness of the algebraic height. Also note that the second statement can be rephrased in terms of double cosets representatives of the gi : under the assumption on the total intersection, and if g0 = 1, there are double coset representatives of the gi of length at most 2(2C + 10δ). Proof. Assume that there exists ∆ > 0, and elements 1 = g0 , g1 , . . . , gk for which Tk the cosets gi H are distinct, and i=0 (gi H)+∆ has diameter larger than 10∆ and than 100δ. First we treat the Tk case ∆ > 5δ. Pick y1 , y2 ∈ i=0 (gi H)+∆ at distance 10∆ from each other, and pick x ∈ [y1 , y2 ] at distance larger than ∆ + 10δ from both yi . For each i an application of hyperbolicity and quasi-convexity tells us that x is at distance at most 2C + 10δ from each of gi H. The ball of radius 2C + 10δ around x thus meets each coset gi H. Tk If ∆ ≤ 5δ, we pick y1 , y2 ∈ i=0 (gi H)+∆ at distance 100δ from each other, and take x at distance greater than 10δ from both ends. The end of the proof is the same.  4.2. Relatively hyperbolic groups. If G is hyperbolic relative to a collection of subgroups P, then Hruska and Wise defined in [HW09] the relative height of a subgroup H of G as n if (n + 1) is the smallest number with the property that for any (n + 1) elements g0 , . . .T, gn such that the gi H are (n + 1)- distinct cosets, the intersections of conjugates i gi Hgi−1 is finite or parabolic. The notion of relative algebraic height is actually the geometric height for the relative distance, which is given by a word metric over a generating set that is the union of a finite set and a set of conjugacy representatives of the elements of P. Indeed, in a relatively hyperbolic group, the subgroups that are bounded in the relative metric are precisely those that are finite or parabolic. We give a quick HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 27 argument. It follows from the Definition of relative quasiconvexity that a subgroup having finite diameter in the electric metric on G (rel. P) is relatively quasiconvex. It is also true [DGO11] that the normalizer of any P ∈ P is itself and that the subgroup generated by any P and any infinite order element g ∈ G \ P contains the free product of conjugates of P by g kn , k ∈ Z. Since any proper supergroup of P necessarily contains such a g, it follows that no proper supergroup of P can be of finite diameter in the electric metric on G (rel. P). It follows that bounded subgroups are precisely the finite subgroups or those contained inside parabolic subgroups. The notion of relative height can actually be extended to define the height of a collection of subgroups H1 , . . . , Hk , as in the case for the algebraic height. Hruska and Wise proved that relatively quasiconvex subgroups have finite relative height. More precisely: Theorem 4.6. [HW09, Theorem 1.4, Corollaries 8.5-8.7] Let (G, P) be relatively hyperbolic, let S be a finite relative generating set for G and Γ be the Cayley graph of G with respect to S. Then for σ ≥ 0, there exists C ≥ 0 such that the following holds. Let H1 , . . . , Hn be a finite collection of σ−relatively quasiconvex subgroups of (G, P). Suppose that there exist distinct cosets {gm Hαm } with αm ∈ {1, . . . , n}, m = −1 is not contained in a parabolic P ∈ P. Then 1, . . . , n, such that ∩m gm Hαm gm there exists a vertex z ∈ G such that the ball of radius C in Γ intersects every coset gm Hαm . Further, for any i ∈ {1, . . . ,Tn}, there are only finitely many double cosets of the form Hi gi Hαi such that Hi ∩ i gi Hαi gi−1 is not contained in a parabolic P ∈ P. Let G be a relatively hyperbolic group, and let H be a relatively quasiconvex subgroup. Then H has finite relative algebraic height. This allows us to give an example of geometric height in our setting. Proposition 4.7. Let (G, P) be a relatively hyperbolic group, and (G, d) a relative word metric d (i.e. a word metric over a generating set that is the union of a finite set and of a set of conjugacy representatives of the elements of P, and hence, in general, not a finite generating set). Let H be a relatively quasiconvex subgroup. Then, H has finite geometric height for d. This just a rephrasing of Hruska and Wise’s result Theorem 4.6. The proof is similar to that in the hyperbolic groups case, using for instance cones instead of balls. 4.3. Mapping Class Groups. Another source of examples arise from convexcocompact subgroups of Mapping Class Groups, and of Out(Fn ) for a free group Fn . We establish finiteness of both algebraic and geometric height of convex cocompact subgroups of Mapping Class Groups in this subsubsection. In the following S will be a closed oriented surface of genus greater than 2, and T eich(S) and CC(S) will denote respectively the Teichmuller space and Curve Complex of S. Definition 4.8. [FM02] A finitely generated subgroup H of the mapping class group M od(S) for a surface S (with or without punctures) is σ−convex cocompact if for some (any) x ∈ T eich(S), the Teichmuller space of S, the orbit Hx ⊂ T eich(S) is σ−quasiconvex with respect to the Teichmuller metric. 28 FRANCOIS DAHMANI AND MAHAN MJ Kent-Leininger [KL08] and Hamenstadt [Ham08] prove the following: Theorem 4.9. A finitely generated subgroup H of the mapping class group M od(S) is convex cocompact if and only if for some (any) x ∈ CC(S), the curve complex of S, the orbit Hx ⊂ CC(S) is qi-embedded in CC(S). One important ingredient in Kent-Leininger’s proof of Theorem 4.9 is a lifting of the limit set of H in ∂CC(S) (the boundary of the curve complex) to ∂T eich(S) (the boundary of Teichmuller space). What is important here is that T eich(S) is a proper metric space unlike CC(S). Further, they show using a Theorem of Masur [Mas80], that any two Teichmuller geodesics converging to a point on the limit set ΛH (in ∂T eich(S)) of a convex cocompact subgroup H are asymptotic. An alternate proof is given by Hamenstadt in [Ham10]. With these ingredients in place, the proof of Theorem 4.10 below is an exact replica of the proof of Theorem 3.2 above: Theorem 4.10. (Height from the Teichmuller metric) Let G be the mapping class group of a surface S, and T eich(S) the corresponding Teichmuller space with the Teichmuller metric, and with a base point z0 . Then for σ ≥ 0, there exists C ≥ 0, and D ≥ 0 such that the following holds. Let H1 , . . . , Hn be a finite collection of σ−convex cocompact subgroups of G. Suppose that there exist distinct cosets {gm Hαm } with αm ∈ {1, . . . , n}, m = 1, . . . , n, such that, for some ∆, ∩m (gm Hαm )+∆ is larger than max{10∆, D}. Then there exists a point z ∈ T eich(S) such that the ball of radius C in T eich(S) intersects every image of z0 by a coset gm Hαm z0 . Further, for any i ∈ {1, . . . ,Tn}, there are only finitely many double cosets of the form Hi gi Hαi such that Hi ∩ i gi Hαi gi−1 is infinite. The collection {H1 , . . . , Hn } has finite algebraic height. A more geometric strengthening of Theorem 4.10 can be obtained as follows using recent work of Durham and Taylor [DT14b], who have given an intrinsic quasi-convexity interpretation of convex cocompactness, by proving that convex cocompact subgroups of Mapping Class Groups are stable: in a word metric, they are undistorted, and quasi geodesics with end points in the subgroup remain close to each other [DT14b]. Theorem 4.11. (Height from a word metric) Let G be the mapping class group of a surface S and d the word metric with respect to a finite generating set. Then for σ ≥ 0, and any subgroup H that is σ-convex cocompact, the group H has finite geometric height in (G, d). Moreover, any σ-convex cocompact subgroup H has finite geometric height in (G, d1 ), where d1 is the word metric with respect to any (not necessarily finite) generating set. Proof. Assume that the theorem is false: there exists σ such that for all k, and all D, there exists a σ-convex cocompact subgroup H, with a collection of distinct cosets {gm H, m = 0, . . . , k} (with g0 = 1), satisfying the property that ∩m (gm H)+∆ has diameter larger than max{10∆, D}. Let a, b be two points in ∩m (gm H)+∆ such that d(a, b) ≥ max{10∆, D}. For each i, let ai , bi in gi H be at distance at most ∆ from a and b respectively. Consider γi geodesics in H from gi−1 ai to gi−1 bi . Consider also a′i and b′i − nearest point HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 29 projections of a0 and b0 on gi γi . Finally, denote by gi γi′ the subpath of gi γi between a′i and b′i By [DT14b, Prop. 5.7], H is quasiconvex in G (for a fixed chosen word metric), and for each i, gi γi is a f (σ)-quasi-geodesic (for some function f ). We thus obtain from a0 to b0 a family of k + 1 paths, namely γ0 and (one for all i), the concatenation ηi = [a0 , a′i ] · gi γi′ · [b′i , b0 ]. For D large enough, the paths ηi are 2f (σ)-quasigeodesics in G. Stability of H ([DT14b, Thm. 1.1]) implies that, there exists R(σ) such that in G, the paths remain at mutual Hausdorff distance at most R(σ). This is thus also true in the Teichmuller space by the orbit map. Hence it follows that all the subpaths gi γi′ are at distance at most 2R(σ) from each other, but are disjoint, and all lie in a thick part of the Teichmuller space, where the action is uniformly proper. This leads to a contradiction. Since the diameter of intersections can only go down if the generating set is increased, the last statement follows.  4.4. Out(Fn ). Following Dowdall-Taylor [DT14a], we say that a finitely generated subgroup H of Out(Fn ) is σ−convex cocompact if (1) all non-trivial elements of H are atoroidal and fully irreducible. (2) for some (any) x ∈ cvn , the (projectivized) Outer space for Fn , the orbit Hx ⊂ cvn is σ−quasiconvex with respect to the Lipschitz metric. Remark 4.12. The above Definition, while not explicit in [DT14a], is implicit in Section 1.2 of that paper. Also, a word about the metric on cvn is in order. The statements in [DT14a] are made with respect to the unsymmetrized metric on outer space. However, convex cocompact subgroups have orbits lying in the thick part; and hence the unsymmetrized and symmetrized metrics are quasi-isometric to each other. We assume henceforth, therefore, that we are working with the symmetrized metric, to which the conclusions of [DT14a] apply via this quasi-isometry. The following Theorem gives a characterization of convex cocompact subgroups in this context and is the analog of Theorem 4.9. Theorem 4.13. [DT14a] Let H be a finitely generated subgroup of Out(Fn ) all whose non-trivial elements are atoroidal and fully irreducible. Then H is convex cocompact if and only if for some (any) x ∈ Fn (the free factor complex of Fn ), the orbit Hx ⊂ Fn is qi-embedded in Fn . Dowdall and Taylor also show [DT14a, Theorem 4.1] that any two quasi-geodesics in cvn converging to the same point p on the limit set ΛH (in ∂cvn ) of a convex cocompact subgroup H are asymptotic. More precisely, given λ, µ and p ∈ ΛH there exists C0 (= C0 (λ, µ, p)) such that any two (λ, µ)−quasi-geodesics in cvn converging to p are asymptotically C0 −close. As observed before in the context of Theorem 4.10, this is adequate for the proof of Theorem 4.10 to go through: Theorem 4.14. Let G = Out(Fn ), and cvn the Outer space for G with a base point z0 . Then for σ ≥ 0, there exists C ≥ 0 such that the following holds. Let H1 , . . . , Hn be a finite collection of σ−convex cocompact subgroups of G. Suppose that there exist distinct cosets {gm Hαm } with αm ∈ {1, . . . , n}, m = 1, . . . , n, −1 is infinite. Then there exists a point z ∈ cvn such that the such that ∩m gm Hαm gm ball of radius C in cvn intersects every image of z0 by a coset gm Hαm z0 . 30 FRANCOIS DAHMANI AND MAHAN MJ Further, for any i ∈ {1, . . . ,Tn}, there are only finitely many double cosets of the form Hi gi Hαi such that Hi ∩ i gi Hαi gi−1 is infinite. The collection {H1 , . . . , Hn } has finite algebraic height. Since an analog of the stability result of [DT14b] in the context of Out(Fn ) is missing at the moment, we cannot quite get an analog of Theorem 4.11. 4.5. Algebraic and geometric qi-intersection property: Examples. In the Proposition below we shall put parentheses around (geometric) to indicate that the statement holds for both the qi-intersection property as well as the geometric qi-intersection property. Proposition 4.15. (1) Let H be a quasiconvex subgroup of a hyperbolic group G, endowed with a locally finite word metric. Then, {H} satisfies the uniform (geometric) qi-intersection property. (2) Let H be a relatively quasiconvex subgroup of a relatively hyperbolic group (G, P). Let P0 be a set of conjugacy representatives of groups in P, and d a word metric on G over a generating set S = S0 ∪ P0 , where S0 is finite. Then {H} satisfies the uniform (geometric) qi-intersection property with respect to d. (3) Let H be a convex-cocompact subgroup of the Mapping Class Group M od(Σ) of an oriented closed surface Σ of genus ≥ 2. If d is a word metric on M od(Σ) that makes it quasi-isometric to the curve complex of Σ, then H satisfies the uniform (geometric) qi-intersection property with respect to d. (4) Let H be a convex-cocompact subgroup of Out(Fn ) for some n ≥ 2. If d is a word metric on Out(Fn ) that makes it quasi-isometric to the free factor complex of Fn , then H satisfies the uniform (geometric) qi-intersection property with respect to d. Proof. All four cases have similar proofs. Consider the first point. Case 1: G hyperbolic, H quasiconvex. Let h be the height of H (which is finite by Theorem 3.2): every h + 1-fold intersection of conjugates of H is finite, but some h-fold intersection is infinite. The first conditions of Definition 3.9 and Definition 3.10 follow from this finiteness and Proposition 4.5 and Theorem 3.12. The second condition of Definition 3.10 follows from Proposition 3.7. We prove the second condition of Definition 3.9 (on mutual coboundedness of elements of CHi ) iteratively. By Theorem 3.12, there exists Ch such that two elements of CHh are Ch quasiconvex in (G, d). Let D > 0. If A and B are two distinct such elements such that the projection of A on B has diameter greater than D, then there are D/Ch pairs of elements (ai , bi ) in A × B, such that a−1 i bi are elements of length at most 20δCh . Choose N0 larger than the cardinality of finite subgroups of G. By a standard pigeon hole argument, if D is large enough, there are N0 such pairs for which a−1 i bi take the same value. It follows that there are two essentially distinct conjugates of elements of Hh that intersect on a subset of at least N0 elements, hence on an infinite subgroup. This contradicts the definition of height, and it follows that D is bounded, and elements of CHh are mutually cobounded. HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 31 We continue by descending induction. Assume that the second property of Definition 3.9 is established for CHi+1 . By Proposition 2.10 it follows that (G, di+1 ) is hyperbolic. Let δi+1 be its hyperbolicity constant. By Proposition 2.11, there exists Ci such that two elements of CHi are Ci - quasiconvex in (G, di+1 ). Again take A and B two distinct elements of CHi such that the projection of A on B has diameter greater than D > 1000δi+1 for di+1 . Then there are at least D/Ci pairs of elements (ai , bi ) in A × B, such that a−1 i bi is an element of length at most 20δi+1 Ch for the metric di+1 , and for all i there exists i′ such that the segments [ai , bi ], [ai′ , bi′ ] are (200δi+1 )-far from one another. Apply the Proposition 2.12 to each geodesic [ai , bi ] to find quasi-geodesics qi from ai to bi in (G, d) (this can also be done by Lemma 2.15). We know that in (G, d), A and B are quasiconvex (for the constant Ch ). By their definition, and by hyperbolicity, the paths qi end at bounded distance of a shortest-point projection of ai to B (for d). Therefore, since (G, d) is hyperbolic, and since the qi are far from one another for d, it follows that the qi are actually short for the metric d (shorter than (200δCh )). Since there are D/Ci pairs of elements (ai , bi ), by the pigeon hole argument, there is an element g0 (of length at most (200δCh ) in the metric d) such that for D/(Ci × BG,d(200δCh )) such pairs, the difference a−1 b equals g0 . If D is large enough, D/(Ci × BG,d (200δCh )) is larger than the cardinality of the finite order elements of G. It follows that the two essentially distinct conjugates of elements of Hi , corresponding to the cosets A and B, intersect on a set of size larger than any finite subgroup of G (and of diameter larger than 3 in di+1 ). Thus the intersection is an infinite subgroup of G. This subgroup is necessarily among the conjugates of some Hj for j ≥ i + 1, but therefore must have diameter 2 in the metric di+1 . Case 2: G relatively hyperbolic, H relatively quasiconvex. The geometric height of H for the relative metric is finite, by Proposition 4.7. Let h be its value. The first points of Definition 3.9 follows from this finiteness and Theorem 3.15. The second point has a similar proof as the first case, except that the pigeon hole argument needs to be made precise because the relative metric (G, d) is not locally finite. Let D > 0. If A and B are two distinct elements of CHh such that the projection of A on B has diameter greater than D, then there are D/CH pairs of elements (ai , bi ) in A×B, such that a−1 i bi are elements of length at most 20δCh . Moreover, if D > 100δCh , for each [ai , bi ], there is [aj , bj ] such that both segments are short (for d) and are at distance at least (50δCh ) from each other. It follows that, in the Coneoff Cayley graph of G, the maximal angle of [ai , bi ] at the cone vertices is uniformly bounded by (100δCh ) + 2(2Ch + 5δ). Indeed, consider α and β quasi-geodesic paths in A and B respectively, from ai to aj and from bi to bj . By hyperbolicity and quasigeodesy, at distance 30δCh from ai and bi , there is a path of length 2(2Ch + 5δ) joining α to β. Being too short, this path cannot possibly intersect [ai , bi ]. There is thus a path from ai to bi of length at most 2 × (30δCh ) + 2(2Ch + 5δ) that does not intersect [ai , bi ] outside its end points. It follows indeed that the maximal angle of [ai , bi ] is at most 2 × (30δCh ) + 2(2Ch + 5δ) + 20δCh . From this bound on angles, we may use the fact that the angular metric at each cone point is locally finite (by definition of relative hyperbolicity) and the bound 32 FRANCOIS DAHMANI AND MAHAN MJ on the length in the metric d, to get that all the elements a−1 i bi are in a finite set, independent of D. We can now use the pigeon hole argument, as in the hyperbolic case, and conclude similarly that D is bounded. The rest of the argument is also by descending induction. Assume that the second property of Definition 3.9 is established for CHi+1 . We proceed in a very similar way as in the hyperbolic case, with the difference is that, after establishing that the paths qi are small for the metric d, one needs to check that their angles at cone points are bounded, which is done by the argument we just used. We provide the details now. By Proposition 2.10 it follows that (G, di+1 ) is hyperbolic. Let δi+1 be its hyperbolicity constant. By Proposition 2.11, there exists Ci such that two elements of CHi are Ci - quasiconvex in (G, di+1 ). Take A and B two distinct elements of CHi such that the projection of A on B has diameter greater than some constant D for di+1 . Take a quasigeodesic in the projection of A on B, of length D. Then there are at least D/Ci pairs of elements (ai , bi ) in A × B, with bi on that quasigeodesic, and such that a−1 i bi is an element of length at most 20δi+1 Ch for the metric di+1 , and for all i there exists i′ such that the segments [ai , bi ], [ai′ , bi′ ] are (200δi+1 )-far from one another. Apply the Proposition 2.12 (or alternatively 2.15) to each geodesic [ai , bi ] to find quasi-geodesics qi from ai to bi in (G, d). We know that in (G, d), A and B are quasiconvex (for the constant Ch ). By their definition, and by hyperbolicity, the paths qi end at bounded distance of a shortest-point projection of ai to B (for d). Therefore, since (G, d) is hyperbolic, and since the qi are far from one another for d, it follows that the qi are actually short for the metric d (shorter than (200δCh )). By the argument used at the initial step of the descending induction, we also have an uniform upper bound on the maximal angle of these paths, and therefore on the number of elements of G that label one of the paths qi . Since there are D/Ci pairs of elements (ai , bi ), if D is large enough, by the pigeon hole argument, there is an element g0 (of length at most (200δCh ) in the metric d), and a pair (ai0 , bi0 ), such that ai−1 bi = g0 and such that for 1000δi+1 Ci other such pairs (aj , bj ), the difference a−1 j bj is also equal to g0 . The intersection of two essentially distinct conjugates of elements of Hi , corresponding to the cosets A and −1 B, thus contains a−1 i0 aj for all those indices j. There are indices j for which ai0 aj labels a quasi-geodesic paths in A of length at least 1000δi+1 Ci . Such an element is either loxodromic, or elliptic with fixed point at the midpoint [ai0 , aj ]. But if all of them are elliptic, for two indices j1 , j2 , we get two different fixed points, hence the product of the elements ai−1 aj1 a−1 i0 aj2 is loxodromic. 0 This element is in the intersection of conjugates of elements of Hi , thus is in a subgroup among the conjugates of some Hj for j ≥ i + 1, but therefore must have diameter 2 in the metric di+1 , and cannot contain loxodromic elements. This is thus a contradiction. Cases 3 and 4: G = M od(Σ) or Out(Fn ), H convex cocompact. Consider the Teichmuller metric on Teichmuller space (T eich(Σ), dT ) and the (symmetrization of the) Lipschitz metric on Outer space (cvn , dS ) respectively for M od(Σ) and Out(Fn ). Though T eich(Σ) and cvn are non-hyperbolic, they are proper metric spaces. HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 33 For the mapping class group M od(Σ), the curve complex (CC(Σ), d) is hyperbolic and quasi-isometric to (M od(Σ), d), where d is the word-metric on M od(Σ) obtained by taking as generating set a finite generating set of M od(Σ) along with all elements of certain sub-mapping class groups (see [MM99]). Similarly for Out(Fn ), the free factor complex (Fn , d) is hyperbolic, and is quasiisometric to (Out(Fn ), d) for a certain word metric over an infinite generating set ([BF14]). This establishes that the hypotheses in the statements of Cases 3 and 4 are not vacuous. Recall that if a subgroup H of M od(Σ) or Out(Fn ) is C-convex co-compact, then by Theorem 4.9 (and 4.13) the orbit of a base point in CC(Σ) (or Fn ) is a quasi-isometric image of the orbit of a base point in Teichmuller space. Finiteness of height of convex cocompact subgroups follows from Theorems 4.11 and 4.14 for G = M od(Σ) and Out(Fn ) respectively. The first condition of Definition 3.9 now follows from Theorems 3.13. We now proceed with proving the second condition of Definition 3.9. We first remark that, given C, there exists ∆, C ′ such that if A, B are cosets of C-convex co-compact subgroups, and if a1 , a2 ∈ A, b1 , b2 ∈ B are such that, in CC(Σ), d(a1 , b1 ) and d(a2 , b2 ) are at most 10Cδ and that d(a1 , a2 ) and d(b1 , b2 ) are larger than ∆ then, dT (ai , bi ) ≤ C ′ for both i = 1, 2. Indeed, by definition of convex cocompactness, the segment [a1 , a2 ] in Teichmuller space maps on a parametrized quasi-geodesic in the curve complex. A result of Dowdall Duchin and Masur ensures that Teichmuller geodesics that make progress in the curve complex, are contracting in Teichmuller space [DDM14, Theorem A] (see the formulation done and proved in [DH15, Prop. 3.6]). Thus the segment [a1 , a2 ] is contracting in Teichmuller space: any Teichmuller geodesic whose projection in the curve complex fellow-travels that of [a1 , a2 ] has to be uniformly close to [a1 , a2 ]. Applying that to the segment [b1 , b2 ], it follows that it must remain at bounded distance (for Teichmuller distance) from [a1 , a2 ], as demanded. A similar statement is valid for Out(Fn ) with the objects that we introduced, it suffice to use [DH15, Prop. 4.17], an arrangement of Dowdall-Taylor’s result [DT14a], in place of the Dowdall-Duchin-Masur criterion. With this estimate, one can easily adapt the proof of the first case to get the result.  5. From quasiconvexity to graded relative hyperbolicity Recall that we defined graded geometric relative hyperbolicity in Definition 4.3. 5.1. Ensuring geometric graded relative hyperbolicity. Proposition 5.1. Let G be a group, d a word metric on G with respect to some (not necessarily finite) generating set, such that (G, d) is hyperbolic. Let H be a subgroup of G. If {H} has finite geometric height for d and has the uniform qi-intersection property, then (G, {H}, d) has graded geometric relative hyperbolicity. Proof. As in Definition 3.9, Hn denotes the collection of intersections of n essentially distinct conjugates of H. Let (Hn )0 denote a set of conjugacy representatives of (Hn ) that are C1 -quasiconvex, and let CHn denote the collection of cosets of elements of (Hn )0 . Let dn be the metric on X = (G, d) after electrifying the elements of CHn . 34 FRANCOIS DAHMANI AND MAHAN MJ By Definition 3.9 and Remark 3.11, for all n, all elements of CHn and of CHn+1 are C1 -quasiconvex in (G, d). Therefore, by Proposition 2.11, all elements of CHn are C1′ -quasiconvex in (G, dn+1 ) for some C1′ depending on the hyperbolicity of d, and on C1 . By Definition 3.9, CHn is mutually cobounded in the metric dn+1 . Proposition 2.10 now shows that the horoballification of (G, dn+1 ) over CHn is hyperbolic, for all n. Proposition 2.23 then guarantees that CHn is coarsely hyperbolically embedded in (G, dn+1 ). Since H is assumed to have finite geometric height, (G, {H}, d) has graded geometric relative hyperbolicity.  5.2. Graded relative hyperbolicity for quasiconvex subgroups. Proposition 5.2. Let H be a quasiconvex subgroup of a hyperbolic group G, with a word metric d (with respect to a finite generating set). Then the pair (G, {H}) has graded geometric relative hyperbolicity, and graded relative hyperbolicity. Proof. For the word metric d with respect to a finite generating set, graded geometric relative hyperbolicity agrees with the notion of graded relative hyperbolicity (Definition 1.3). By Theorem 3.2, H has finite height. By Proposition 4.15 it satisfies the uniform qi-intersection property 3.9. Therefore, by Proposition 5.1, the pair (G, {H}) has graded relative hyperbolicity. Finally, note that since the word metric we use is locally finite, and all i−fold intersections are quasiconvex, graded relative hyperbolicity follows.  Proposition 5.3. Let (G, P) be a finitely generated relatively hyperbolic group. Let H be a relatively quasiconvex subgroup. Let S be a finite relative generating set of G (relative to P) and let d be the word metric with respect to S ∪ P. Then (G, {H}, d) has graded relative hyperbolicity as well as graded geometric relative hyperbolicity. Proof. The proof is similar to that of Proposition 5.2. By Theorem 4.6, H has finite relative height, hence it has finite geometric height for the relative metric (see Example 4.7). Next, by Proposition 4.15, H satisfies the uniform qi-intersection property for a relative metric, and graded geometric relative hyperbolicity follows from Proposition 5.1. Again, since G has a word metric with respect to a finite relative generating set, and H and all i−fold intersections are relatively quasiconvex as well, the above argument furnishes graded relative hyperbolicity as well.  Similarly, replacing the use of Theorem 3.2 by Theorems 4.10 and 4.14, one obtains the following. Proposition 5.4. Let G be the mapping class group M od(S) (respectively Out(Fn )). Let d be a word metric on G making it quasi-isometric to the curve complex CC(S) (respectively the free factor complex Fn ). Let H be a convex cocompact subgroup of G. Then (G, {H}, d) has graded relative hyperbolicity. Again, replacing the use of Theorem 3.2 by Theorem 4.11, we obtain: Proposition 5.5. Let G be the mapping class group M od(S). Let d be a word metric on G making it quasi-isometric to the curve complex CC(S). Let H be a convex cocompact subgroup of G. Then (G, {H}, d) has graded geometric relative hyperbolicity. HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 35 Remark 5.6. Since we do not have an exact (geometric) analog of Theorem 4.11 for Out(Fn ) (more precisely an analog of the stability result of [DT14b]) as of now, we have to content ourselves with the slightly weaker Proposition 5.4 for Out(Fn ). 6. From graded relative hyperbolicity to quasiconvexity 6.1. A Sufficient Condition. Proposition 6.1. Let G be a group and d a hyperbolic word metric with respect to a (not necessarily finite) generating set. Let H be a subgroup such that (G, {H}, d) has graded geometric relative hyperbolicity. Then H is quasiconvex in (G, d). Proof. Assume (G, {H}, d) has graded geometric relative hyperbolicity as in Definition 4.3. Then H has finite geometric height in (G, d). Let k be this height. Thus, Hk+1 is a collection of uniformly bounded subsets, and dk+1 is quasi-isometric to d. It follows that (G, dk+1 ) is hyperbolic. Further, by Definition 4.3, Hk is hyperbolically embedded in (G, dk+1 ). This means in particular that the electrification (G, dk+1 )el Hk is hyperbolic. Since (G, dk ) is quasi-isometric to (G, dk+1 )el (being the restriction of the metric on G) it follows Hk that (G, dk ) is hyperbolic as well. Further, by Corollary 2.7 the elements of Hk , are uniformly quasiconvex in (G, dk+1 ). We now argue by descending induction on i. The inductive hypothesis for (i + 1): We assume that di+1 is a hyperbolic metric on G, and that there is a constant ci+1 such that, for all j ≥ 1 the elements of Hi+j are uniformly ci+1 -quasiconvex in (G, d). We assume the inductive hypothesis for i + 1 (i.e. as stated), and we now prove it for i. Of course, we also assume, as in the statement of the Proposition, that Hi is coarsely hyperbolically embedded in (G, di+1 ). Hence di is a hyperbolic metric on G. We will now check that the assumptions of Proposition 2.12 are satisfied for (X, d) = (G, di+1 ), Y = Hi+1 , and Hi,ℓ arbitrary in Hi . Elements of Hi in (G, di+1 ) are uniformly quasiconvex in (G, di+1 ): this follows from Corollary 2.7. We will write Ci for their quasiconvexity constant. A second step is to check that, for some uniform ∆0 and ǫ, for all ∆ > ∆0 , when an element Hi,ℓ of Hi (∆, ǫ)-meets an item of Hi+1 , then H +ǫ∆ contains a quasigeodesic between the meeting points in H. Thus, fix ǫ < 1/100, and take ∆0 larger than 20 times the thickening constants for the definition of elements in Hi (which is possible by finiteness of number of orbits of i-fold intersections). Assume Hi,ℓ (∆, ǫ)-meets Y ∈ Hi+1 . Then, by definition of i−fold intersections 3.5, and Proposition 3.6, either the pair of meeting points is in an item of Hi+1 inside Hi,ℓ , +ǫ∆ or Y ⊂ Hi,ℓ . In both cases, by the inductive assumption, there is a path in Hi,ℓ between the meeting points in Hi,ℓ that is a quasigeodesic for d. Hence the second assumption of Proposition 2.12 is satisfied. We can thus conclude by that proposition that Hi,ℓ is quasiconvex in (G, d) for a uniform constant, and therefore the inductive assumption holds for i. By induction it is then true for i = 0, hence the first statement of the Proposition holds, i.e. quasiconvexity follows from graded geometric relative hyperbolicity.  36 FRANCOIS DAHMANI AND MAHAN MJ We shall deduce various consequences of Proposition 6.1 below. However, before we proceed, we need the following observation since we are dealing with spaces/graphs that are not necessarily proper. Observation 6.2. Let X be a (not necessarily proper) hyperbolic graph. For all C0 ≥ 0, there exists C1 ≥ 0 such that the following holds: Let H be a hyperbolic group acting uniformly properly on X, i.e. for all D0 there exists N such that for any x ∈ X, any D0 ball in X contains at most N orbit points of Hx. Then a C0 −quasiconvex orbit of H is (C1 , C1 )−quasi-isometrically embedded in X. Combining Proposition 6.1 with Observation 6.2 we obtain the following: Proposition 6.3. Let G be a group and d a hyperbolic word metric with respect to a (not necessarily finite) generating set. Let H be a subgroup such that (1) (G, {H}, d) has graded geometric relative hyperbolicity. (2) The action of H on (G, d) is uniformly proper. Then H is hyperbolic and H is qi-embedded in (G, d). Proof. Quasi-convexity of H in (G, d) was established in Proposition 6.1. Qiembeddedness of H follows from Observation 6.2. Hyperbolicity of H is an immediate consequence.  6.2. The Main Theorem. We assemble the pieces now to prove the following main theorem of the paper. Theorem 6.4. Let (G, d) be one of the following: (1) G a hyperbolic group and d the word metric with respect to a finite generating set S. (2) G is finitely generated and hyperbolic relative to P, S a finite relative generating set, and d the word metric with respect to S ∪ P. (3) G is the mapping class group M od(S) and d the metric obtained by electrifying the subgraphs corresponding to sub mapping class groups so that (G, d) is quasi-isometric to the curve complex CC(S). (4) G is Out(Fn ) and d the metric obtained by electrifying the subgroups corresponding to subgroups that stabilize proper free factors so that (G, d) is quasi-isometric to the free factor complex Fn . Then (respectively) (1) H is quasiconvex if and only if (G, {H}) has graded geometric relative hyperbolicity. (2) H is relatively quasiconvex if and only if (G, {H}, d) has graded geometric relative hyperbolicity. (3) H is convex cocompact in M od(S) if and only if (G, {H}, d) has graded geometric relative hyperbolicity and the action of H on the curve complex is uniformly proper. (4) H is convex cocompact in Out(Fn ) if and only if (G, {H}, d) has graded geometric relative hyperbolicity and the action of H on the free factor complex is uniformly proper. Proof. The forward implications of quasiconvexity to graded geometric relative hyperbolicity in the first 3 cases are proved by Propositions 5.2, 5.3, 5.4 and 5.5 and HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 37 case 4 by Proposition 5.4. In cases (3) and (4) properness of the action of H on the curve complex follows from convex cocompactness. We now proceed with the reverse implications. Again, the reverse implications of (1) and (2) are direct consequences of Proposition 6.1. The proofs of the reverse implications of (3) and (4) are similar. Proposition 6.3 proves that any orbit of H on either the curve complex CC(S) or the free factor complex Fn is qi-embedded. Convex cocompactness now follows from Theorems 4.9 and 4.13.  6.3. Examples. We give a couple of examples below to show that finiteness of geometric height does not necessarily follow from quasiconvexity. Example 6.5. Let G1 = π1 (S) and H =< h > be a cyclic subgroup corresponding to a simple closed curve. Let G2 = H1 ⊕ H2 where each Hi is isomorphic to Z. Let G = G1 ∗H=H1 G2 . Let d be the metric obtained on G with respect to some finite generating set along with all elements of H2 . Then G1 is quasiconvex in (G, d), but G1 does not have finite geometric height. Note however, that the action of G1 on (G, d) is not acylindrical. We now furnish another example to show that graded geometric relative hyperbolicity does not necessarily follow from quasiconvexity even if we assume acylindricity. Example 6.6. Let G = hai , bi : i ∈ N, ab2ii = a2i−1 i and let F be the (free) subgroup generated by {ai }. Then F bi ∩ F =< a2i−1 > for all i. Let d be the word metric on G with respect to the generators ai , bi . Then the action of F on (G, d) is acylindrical and F is quasiconvex. However there are infinitely many double coset representatives corresponding to bi such that F bi ∩ F is infinite. Acknowledgments This work was initiated during a visit of the second author to Institut Fourier in Grenoble during June 2015 and carried on while visiting Indian Statistical Institute, Kolkata. He thanks the Institutes for their hospitality. The authors were supported in part by the National Science Foundation under Grant No. DMS-1440140 at the Mathematical Sciences Research Institute in Berkeley during Fall 2016, where this research was completed. We thank the referee for a detailed and careful reading of the manuscript and for several extremely helpful and perceptive comments. References [Bes04] [BF14] [Bow12] [Cou14] [Dah03] [DDM14] M. Bestvina. Geometric group theory problem list. M. Bestvina’s home page: http:math.utah.edu∼bestvina, 2004. M. Bestvina and M. Feighn. Hyperbolicity of the complex of free factors. Adv. Math. 256, pages 104–155, 2014. B. H. Bowditch. Relatively hyperbolic groups. Internat. J. Algebra and Computation. 22, 1250016, 66pp, 2012. Remi Coulon. On the Geometry of Burnside Quotients of Torsion Free Hyperbolic Groups. Internat. J. Algebra and Computation, 24(no.3):251–345, 2014. F. Dahmani. Combination of convergence groups. Geom. Topol. 7, pages 933–963, 2003. S. Dowdall, M. Duchin, and H. Masur. Statistical hyperbolicity in Teichmuller space. Geom. Funct. Anal. 24 no. 3, pages 748–795, 2014. 38 [DGO11] FRANCOIS DAHMANI AND MAHAN MJ F. Dahmani, V. Guirardel, and D. Osin. Hyperbolically embedded subgroups and rotating families in groups acting on hyperbolic spaces. preprint, arXiv:1111.7048, to appear in Mem. Amer. Math. Soc., 2011. [DH15] F. Dahmani and C. Horbez. Spectral theorems for random walks on mapping class groups and Out(FN ). preprint, arXiv:1506.06790, 2015. [DM15] S. Das and M. Mj. Controlled Floyd Separation and Non Relatively Hyperbolic Groups. J. Ramanujan Math. Soc. 30, no. 3, pages 267–294, 2015. [DS05] Cornelia Druţu and Mark Sapir. Tree graded spaces and asymptotic cones of groups. Topology, 44(5):959–1058, 2005. [DT14a] S. Dowdall and S. J. Taylor. Hyperbolic extensions of free groups. preprint, arXiv:math.1406.2567, 2014. [DT14b] M. Durham and S. Taylor. Convex cocompactness and stability in mapping class groups. preprint, arXiv:1404.4803, 2014. [Far98] B. Farb. Relatively hyperbolic groups. Geom. Funct. Anal. 8, pages 810–840, 1998. [FM02] B. Farb and L. Mosher. Convex cocompact subgroups of mapping class groups. Geom. Topol., 6, pages 91–152, 2002. [GM08] D. Groves and J. Manning. Dehn filling in relatively hyperbolic groups. Israel Journal of Mathematics 168, pages 317–429, 2008. [GMRS97] R. Gitik, M. Mitra, E. Rips, and M. Sageev. Widths of Subgroups. Trans. AMS, pages 321–329, Jan. ’97. [Ham08] U. Hamenstadt. Word hyperbolic extensions of surface groups. preprint, arxiv:0807.4891v2, 2008. [Ham10] U. Hamenstadt. Stability of quasi-geodesics in teichmuller space. Geom. Dedicata, 146, pages 101–116, 2010. [Hru10] G. Christopher Hruska. Relative hyperbolicity and relative quasiconvexity for countable groups. Algebr. Geom. Topol. 10 no. 3, pages 1807–1856, 2010. [HW09] G. Christopher Hruska and D. T. Wise. Packing Subgroups in Relatively Hyperbolic Groups. Geom. Topol. 13, no. 4, pages 1945–1988, 2009. [KL08] R. P. Kent and C. J. Leininger. Shadows of mapping class groups: capturing convex cocompactness. Geom. Funct. Anal., 18(4), pages 1270–1325, 2008. [Kla99] E. Klarreich. Semiconjugacies between Kleinian group actions on the Riemann sphere. Amer. J. Math. 121, pages 1031–1078, 1999. [Mas80] H. Masur. Uniquely ergodic quadratic differentials. Comment. Math. Helv. 55 (2), pages 255–266, 1980. [McM01] C. T. McMullen. Local connectivity, Kleinian groups and geodesics on the blow-up of the torus. Invent. math., 97:95–127, 2001. [Mj08] M. Mj. Relative Rigidity, Quasiconvexity and C-Complexes. Algebraic and Geometric Topology 8, pages 1691–1716, 2008. [Mj11] M. Mj. Cannon-Thurston Maps, i-bounded Geometry and a Theorem of McMullen. Actes du séminaire Théorie spectrale et géométrie, Grenoble, vol 28, 2009-10, arXiv:math.GT/0511104, pages 63–108, 2011. [Mj14] M. Mj. Cannon-Thurston Maps for Surface Groups. Ann. of Math., 179(1), pages 1–80, 2014. [MM99] H. A. Masur and Y. N. Minsky. Geometry of the complex of curves I: Hyperbolicity. Invent. Math.138, pages 103–139, 1999. [Osi06a] Denis Osin. Elementary subgroups of relatively hyperbolic groups and bounded generation. Internat. J. Algebra and Computation, 16(1):99–118, 2006. [Osi06b] D.V. Osin. Relatively hyperbolic groups: Intrinsic geometry, algebraic properties, and algorithmic problems. Mem. Amer. Math. Soc. 179(843), pages 1–100, 2006. [Sho91] H. Short. Quasiconvexity and a theorem of Howson’s. Group Theory from a Geometrical Viewpoint (E. Ghys, A. Haefliger, A. Verjovsky eds.), 1991. [Szc98] Andrzej Szczepanski. Relatively hyperbolic groups. Michigan Math. J., 45(3):611–618, 1998. HEIGHT, GRADED RELATIVE HYPERBOLICITY AND QUASICONVEXITY 39 Institut Fourier, Universite Grenoble Alpes, 100 rue des Maths, CS 40700, F-38058 Grenoble Cedex 9, France E-mail address: [email protected] Tata Institute of Fundamental Research. 1, Homi Bhabha Road, Mumbai-400005, India E-mail address: [email protected] E-mail address: [email protected]
4math.GR
Flight Dynamics-based Recovery of a UAV Trajectory using Ground Cameras Artem Rozantseva a Sudipta N. Sinhab Computer Vision Laboratory, EPFL arXiv:1612.00192v2 [cs.CV] 21 Nov 2017 {artem.rozantsev, pascal.fua}@epfl.ch Debadeepta Deyb b Pascal Fuaa Microsoft Research {sudipta.sinha, dedey}@microsoft.com Abstract We propose a new method to estimate the 6-dof trajectory of a flying object such as a quadrotor UAV within a 3D airspace monitored using multiple fixed ground cameras. It is based on a new structure from motion formulation for the 3D reconstruction of a single moving point with known motion dynamics. Our main contribution is a new bundle adjustment procedure which in addition to optimizing the camera poses, regularizes the point trajectory using a prior based on motion dynamics (or specifically flight dynamics). Furthermore, we can infer the underlying control input sent to the UAV’s autopilot that determined its flight trajectory. Our method requires neither perfect single-view tracking nor appearance matching across views. For robustness, we allow the tracker to generate multiple detections per frame in each video. The true detections and the data association across videos is estimated using robust multi-view triangulation and subsequently refined during our bundle adjustment procedure. Quantitative evaluation on simulated data and experiments on real videos from indoor and outdoor scenes demonstrates the effectiveness of our method. Figure 1: A quadrotor UAV was manually flown to a height of 45 meters above a farm within a 100×50m2 area with six cameras on the ground. [T OP] Two input frames along with the detections and zoomed-in views of the UAV are shown. [M IDDLE] 3D trajectory for a 4 minute flight and camera locations estimated by our method. The inset figure shows the top-down view. [B OTTOM] Estimated throttle signal (one of the control inputs sent to the autopilot). 1. Introduction Rapid adoption of unmanned aerial vehicles (UAV) and drones for civilian applications will create demand for lowcost aerial drone surveillance technology in the near future. Although, acoustics [1], radar [2] and radio frequency (RF) detection [3] have shown promise, they are expensive and often ineffective at detecting small, autonomous UAVs [4]. Motion capture systems such as Vicon [5] and OptiTrack [6] work for moderate sized scenes. However, the use of active sensing and special markers on the target makes them ineffective for tracking non-cooperative drones in large and bright outdoor scenes. With the exception of some recent works [7, 8], visual detection and tracking of drones using passive video cameras remains a largely unexplored topic. Existing single-camera detection and tracking methods are mostly unsuitable for drone surveillance due to their limited field of view and the fact that it is difficult to accurately estimate the distance of objects far from the camera that occupy very few pixels in the video frame. Using multiple overlapping cameras can address these limitations. However, existing multi-camera tracking methods are designed to track people, vehicles to address indoor and outdoor surveillance tasks, where the targets are often on the ground. In contrast, small drones must be tracked within a 3D volume that is orders of magnitude larger. As a result 1 its image may occupy less then 20 sq. pixels in a 4K UHD resolution video stream. Most existing multi-camera systems also rely on accurate camera calibration that requires someone to collect calibration data by walking around in the scene. A drone detection system is difficult to calibrate in this way because the effective 3D working volume is large and extends high above the ground. In this paper, we present a new structure from motion (SfM) formulation to recover the 6-dof motion trajectory of a quadrotor observed by multiple fixed cameras as shown in Fig. 1. We model the drone as a single moving point and assume that its underlying flight dynamics model is known. Our contributions are three fold: • We propose a novel bundle adjustment (BA) procedure that not only optimizes the camera poses and the 3D trajectory, but also regularizes the trajectory using a prior based on the known flight dynamics model. • This method lets us explicitly infer the underlying control inputs sent to the UAV’s autopilot that determined its trajectory. This could provide analytics to drone pilots or enable learning controllers from demonstration [9]. • Finally, our BA procedure uses a new cost function. It is based on traditional image reprojection error but does not depend on explicit data association derived from image correspondences, which is typically considered a prerequisite in classical point-based SfM. Briefly, the latter lets us keep multiple 2D detections per frame instead of a single one. The true detection is indexed using a per-frame assignment variable. These variables are initialized using a RANSAC-based multi-view triangulation step and further optimized during our bundle adjustment procedure. This makes the estimation less reliant on either perfect single-view tracking or cross-view appearance matching both of which can often be inaccurate. Our method runs batch optimization over all the videos, which can be viewed as a camera calibration technique that uses the drone as a calibration object. In this work, we assume that the videos are synchronized, have known framerates and the cameras intrinsics and lens parameters are also known whereas an initial guess of the camera poses are available. Finally, we assume only a single drone in the scene. We evaluate our method extensively on data from a realistic quadrotor flight simulator and real videos captured in both indoor and outdoor scenes. We demonstrate that the method is robust to noise and poor initialization and consistently outperforms baseline methods in terms of accuracy. 2. Related work We are not aware of any existing method that can accurately recover a UAV’s 3D trajectory from ground cameras and infer the underlying control inputs that determined its trajectory. However, we review closely related works that address single and multi-camera tracking, dynamic scene reconstruction and constrained bundle adjustment. Single-View Tracking. This topic has been well studied in computer vision [10]. However, most trackers struggle with tiny objects such as flying birds [11] and tracking multiple tiny targets remains very difficult even with infrared cameras [12]. Some recent works [7, 13] proposed practical sense-and-avoid systems for distant flying objects using passive cameras that can handle low-resolution imagery and moving cameras. However, these methods cannot recover accurate 3D UAV trajectories. Multi-View Tracking. Synchronized passive multi-camera systems are much more robust at tracking objects within a 3D scene [14, 15]. Traditionally, they have been proposed for understanding human activities, analyzing sports scenes and for indoor, outdoor and traffic surveillance [16, 17, 18, 19, 20, 21]. These methods need calibrated cameras and often assume targets are on the ground, and exploit this fact by proposing efficient optimization techniques such as bipartite graph matching [20, 16, 19], dynamic programming [17, 18] and min-cost network flow [21]. These methods have rarely been used to track tiny objects in large 3D volume, where the aforementioned optimization methods are impractical. Furthermore, conventional calibration methods are unsuitable in large scenes, especially when much of the scene is high above ground level. Multi-view 3D reconstruction. Synchronized multicamera systems have also been popular for dynamic scene reconstruction. While most existing techniques require careful pre-calibration, some techniques make it possible to calibrate cameras on the fly [22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]. Avidan et al. [22] proposed a method for simple linear or conical object motion which was later extended to curved and general planar trajectories [23, 25]. More recent methods have exploited other geometric constraints for joint tracking and camera calibration [24, 26, 27, 28]. However, these methods require accurate feature tracking and matching across views and are not suitable for tiny objects. Sinha et al. [29] use silhouettes correspondence and Puwein et al. [31] used human pose estimates to calibrate cameras. They do not require cross view feature matching but only work on small scenes with human actors. Vo et al. [32] need accurate feature tracking and matching but can handle unsynchronized and moving cameras. They reconstruct 3D trajectories on the moving targets using motion priors that favor motion with constant velocity or constant acceleration. While our motivation is similar, our physics-based motion dynamics prior is more realistic for UAVs and enables explicit recovery of underlying parameters such as the control inputs given by the pilot. Constrained Bundle Adjustment. In conventional bundle adjustment [33], camera parameters are optimized along with the 3D structure which is often represented as a 3D point cloud. Sometimes, regularization is incorporated into bundle adjustment via soft geometric constraints on the 3D structure, including planarity [34], 3D symmetry [35], bound constraints [36] and prior knowledge of 3D shape [37]. These priors can add significant overhead to the Levenberg-Marquardt nonlinear least squares optimization [38]. In our problem setting, the sequential nature of the dynamics-based prior introduces a dependency between all structure variables i.e. those representing sampled 3D points on the trajectory. This leads to a dense Jacobian and makes the nonlinear least square problem infeasible for long trajectories. In this paper, we propose an alternative approach that retains the sparsity structure in regular BA. Our idea is based on generating an intermediate trajectory and then adding soft constraints to the variables associated with 3D points during optimization. We discuss it in Section 4. 3. Problem formulation Consider the bundle adjustment (BA) problem for pointbased SfM [39]. Given image observations O = {ojt } : ojt ∈ R2 of T 3D points in M static cameras, one seeks to estimate the coordinates of the 3D point X = {xt } : xt ∈ R3 , t ∈ [1..T ] and the camera poses C = {cj }, j ∈ [1..M ], where each cj = [Rj |tj ] ∈ R3×4 . For our trajectories, let xt denote each 3D point on the trajectory at time t. When we have unique observations of xt in all the cameras where it is visible (denoted by ojt for the j-th camera at time t), the problem can be solved by minimizing an objective based on the 2D image reprojection error EBA (C, X, O) = T X X ρ(π(cj , xt ) − ojt ), (1) where Ωt ⊆ C is the set of cameras where the 3D point xt is visible at time t, π(cj , xt ) : R3 → R2 is the function that projects xt into camera cj and the function ρ(·) : R2 → R robustly penalizes reprojections of xt that deviate from ojt . Now, let us relax the assumption that unique observations of xt are available in the camera views where it is visible. Instead, we will assume that multiple candidate observations are given in each camera at time t, amongst which at most one is the true observation. To handle this situation, we propose using a new objective of the following form: E(C, X, O) = t=1 j∈Ωt min ρ (π(cj , xt ) − ojtk ) , k arg min (E(C, X, O) + λR(X, Γ)) . (3) C,X,Γ Here, the regularizer R(X, Γ) favors trajectories that can be explained by good motion models. Γ : {γt } denotes the set of latent variables γt for the motion model at time t and λ is a scalar weight. Typically, such regularization, where structure variables {xt } depend on one another destroys the sparsity in the problem, which is key to efficiently solving large BA instances. However, in our work, we avoid that issue by using regularizers of the following type. R(X, Γ) = T X (xt − x̂t (γt ))2 , (4) t=1 where {x̂t } are 3D points predicted by a motion model. As a simple example, one could smooth the trajectory estimate from a previous iteration of BA by setting x̂ = (g ∗ x) with Gaussian kernel g and (· ∗ ·) the convolution operator, to favor a smooth trajectory in the current iteration. There are no latent variables for this simple case and so Γ = ∅. Next, we discuss a more realistic case, involving a flight dynamics model for a quadrotor UAV and based on it derive an appropriate regularizer R(X, Γ). 3.1. Flight dynamics model t=1 j∈Ωt T X X So far, we have treated X as an independent 3D point cloud and ignored the fact that the points lie on a UAV’s flight trajectory. Since consecutive points on the trajectory can be predicted from a suitable motion dynamics model (given additional information about the user inputs), we propose using such a regularizer in our BA formulation for higher robustness to erroneous or noisy observations. Our objective function therefore takes the following form: (2) where ojtk is the k-th amongst Ktj candidate 2D observations at time t in camera j. This objective is motivated by the fact that many object detectors naturally produce multiple hypotheses but accurately suppressing all the false detections in a single view can be quite difficult. V : {vt } m U : {ut } : velocity : mass : throttle Φ : {φt } Θ : {θt } Ψ : {ψt } : roll : pitch : yaw B : {bt } Ix , Iy , Iz Jtp : angular velocity : moments of inertia : propeller’s inertia Uφ : {uφ (t)} Uθ : {uθ (t)} Uψ : {uψ (t)} : control inputs Table 1: Notations for the physics-based model [40]. While several flight dynamics models for quadrotors are known, we use the one proposed by Webb et al. [40, 41]. Table 1 presents the relevant notation. Here, we only include a subset of the equations that are required for deriving the prior or computing the control inputs. (U, Φ, Θ) denote the thrust and the angles for the complete trajectory. The control inputs [U, Uφ , Uθ , Uψ ] in Table 1 denote the joystick positions in the RC controller. In our case, we need to assume that the yaw angle is zero Ψ = 0, Uψ = 0. This implies that quadrotor is always “looking” in a certain direction, regardless of the motion direction. Since propeller inertia Jtp is often very small (∼ 10−4 ), we set it to zero to reduce the model complexity without losing much accuracy. From the basic equations of motion, we have Algorithm 1 Bundle Adjustment with motion dynamics 1: Inputs: • Initial trajectory X0 and camera parameters C0 • Observations in camera views O 2: Outputs: Final estimates (X∗ , C∗ , Γ∗ ) and (Uθ , Uφ ) (5) 3: 4: where at = (ax (t), ay (t), az (t)) is the acceleration of the quadrotor at time t. From the principles of rigid body dynamics, we have the following equation.       ax (t) 0 sin θt cos φt ay (t) =  0  +  − sin φt  ut , (6) m az (t) −g cos θt cos φt 5: xt+1 = xt + vt dt, vt+1 = vt + at dt, where g is the standard gravitational acceleration. From Eq. 6 we obtain the following expression for (φt , θt , ut ): p ut = m ax (t)2 + ay (t)2 + (az (t) + g)2 , φt = arcsin (−ay (t)m/ut ) , (7) θt = arcsin (t)m/uth) cos φt ), h π((aπx π π φt ∈ − , , θt ∈ − , 2 2 2 2 Here, ut must be greater than zero which is always satisfied by a quadrotor in flight. Finally, we can estimate the UAV’s angular velocity bt = [bp (t), bq (t), br (t)] as follows:     (φt − φt−1 )/dt bp (t) bq (t) = ((θt − θt−1 )/dt)(cos φt / sin2 φt ) , (8) br (t) −θt / sin φt which can be used to compute control inputs as follows: 6: 7: 8: 9: for iteration s ∈ [1..S] do Γs−1 ← G(Xs−1 ) Γ̂s−1 ← H(Γs−1 ), h(·) defined in Eq. 11 (Xs , Cs , Γs ) ← run one step of LM to solve Eq. 3 end for (X∗ , C∗ , Γ∗ ) ← (Xs , Cs , Γs ) (Uθ , Uφ ) ← (Θ, Φ) from Eqs. 8 and 9 The general idea of the regularizer will be to add appropriate constraints to the latent variables (U, Φ, Θ) during the intermediate steps of the bundle adjustment procedure. Below, we use H to denote such a function. Γ̂ = [Φ̂, Θ̂, Û] = H([Φ, Θ, U]) = H(Γ), (11) In other words, we first recover the latent variables using F and then apply a suitable amount of smoothing to them to obtain Γ̂. Finally, we apply G on Γ̂ to obtain a new trajectory which then serves as a soft constraint during the next iteration of bundle adjustment. In our experiments, we expect the UAV to move slowly and smoothly. Therefore in our current implementation, we used H(Γ) = (g ∗ Γ), where g denotes a Gaussian kernel. Other more sophisticated forms of H(·) are worth exploring in the future. We can now write down the expression for the dynamics-based prior or regularizer. b (t)−b (t−1) uφ (t) = Ix p dtp − (Iy − Iz ) bq (t)br (t) . (9) bq (t)−bq (t−1) − (Iz − Ix ) bp (t)br (t) uθ (t) = Iy dt Next, we describe the flight dynamics based regularizer. 3.2. Flight dynamics prior In the rest of the paper, we denote Γ = [Φ, Θ, U]τ . These variables will serve as the latent variables in the flight dynamics based prior (we use the term regularizer and prior interchangeably). The dynamics model provides us two transformations denoted F and G below. G : X → Γ, F : Γ → X. (10) Equations 5 and 7 are used to obtain Γ from a trajectory estimate. Similarly, the values of X can be derived from Γ = (U, Φ, Θ) by recursively using Eqs. 5 and 6. This is equivalent to performing integration with respect to time which uniquely determines the quadrotor’s internal state variables (position, velocity, acceleration etc.) up to constant unknown namely the quadrotor’s state at time t = 0.  |  (X − F(Γ))2 1 λ1   ρ1 (Φ − Φ̂)     R(X, Γ) =  λ2   ρ2 (Θ − Θ̂)  λ3 ρ3 (U − Û)  (12) 4. Optimization We now describe the steps needed to solve the regularized bundle adjustment problem stated in Eqs. 3 and 12. This is done using an efficient nonlinear least squares solver [42] and suitable initialization. In conventional SfM, the 3D points are treated independently resulting in a sparse problem that can be solved using a sparse LevenbergMarquardt (LM) method [38]. As we discussed, imposing our dynamics-based regularizer directly would lead to a dense linear systems within each iteration of LM [39]. Here, we describe our proposed technique to impose the regularization indirectly. We will use the trajectory estimate from the previous BA iteration to generate the soft constraints for the dynamics-based prior. Formally these Algorithm 2 RANSAC-based multi-view triangulation 1: Inputs : • Cameras C : {cj }, j ∈ [1..M ] • Sets of observations ojt : {ojtk }, k ∈ [1..Kjt ] for camera j at time t 2: Outputs: 3D Point xt for i ∈ [1..N ] do Randomly pick 2 cameras: cm , cn Randomly pick observation omtk from omt Randomly pick observation ontl from ont xi ← triangulate-2view(omtk , cm , ontl , cn ) 8: e(xi ) ← evaluate score for hypothesis xi using Eq. 2 9: end for 10: xt = arg min(e(xi )) 3: 4: 5: 6: 7: xi constraints are represented by Γ̂s−1 = H(Γs−1 ), therefore we rewrite Eq. 12 as:  |  s (X − F(Γs ))2 1 λ1   ρ1 (Φs − Φ̂s−1 )     R(Xs , Γs ) =  λ2  ρ2 (Θs − Θ̂s−1 ) λ3 ρ3 (Us − Ûs−1 )  (13) where s is the iteration index in the LM technique for solving Eq. 3, λi ∈ R, i ∈ {1, 2, 3} are scalar weights and ρi (·) : R2 → R, i ∈ {1, 2, 3} are robust cost functions. This allows us to make the points xst independent of each other in the current iteration. However, there is an indirect dependence on the associated points from the previous iteration xs−1 . Algorithm 1 depicts the exact steps of our t method. So far, we have not discussed initialization of the camera poses and parameters. This is described next. Trajectory and Camera Pose Initialization. First, we estimate camera poses C0 using a traditional point-based SfM pipeline [43]. Because the cameras are often far apart and the visible backgrounds do not overlap substantially, we have used an additional camera to recover the initial calibration. We capture a video walking around the scene using an additional hand-held camera. Keyframes were extracted from this video and added to the frames selected from the fixed ground cameras. After running SfM on these frames, we extract the poses for the fixed cameras. Given C0 , we triangulate the trajectory points from detections obtained from background subtraction. We propose a robust RANSAC-based triangulation method to obtain X0 (see Algorithm 2). This involves randomly picking a camera pair and triangulating two random detections in these cameras using a fast triangulation routine [44] to obtain a 3D point hypothesis. Amongst all the hypotheses, we select the 3D point that has the lowest total residual error in all the views (as defined in Eq. 2. We use Algorithm 2 on all Figure 2: [Evaluation on synthetic data] with respect to different amount of noise added to the initial point locations, camera parameters and point observations in camera views. For each method plot above shows mean and standard deviation of the resulting trajectory from the ground truth across 10 different runs of our algorithm. (best seen in color) timesteps to compute the initial trajectory X0 . Implementation details. Our method is implemented in C++, using the Ceres non linear least squares minimizer [42]. In order to detect the UAV we have used the OpenCV [45] implementation of Gaussian Mixture Models (GMM)-based background subtraction [46]. Briefly, it creates a GMM model for the background and updates it with each incoming frame. Further, the regions of the image that are not consistent with the model are considered to be foreground and we use them as detections. This, however, leads to large amounts of false positives for the outdoor videos, therefore we processed the resulting detections with a Kalman Filter (KF) [47] with a constant acceleration model. Detections from the resulting tracks are used in our BA optimization. To reduce the amount of false positives we only considered tracks that are longer than 3 time steps. As a result we ended up with 0-8 detections per frame in all the camera views (see Fig. 7). 5. Experiments We first evaluated our proposed method on synthetic data obtained from a realistic quadrotor flight simulator to analyze accuracy and robustness of our estimated trajectories and control inputs in the presence of image noise, outliers in tracking and errors in the initial camera pose parameters. We also present several results on real data captured indoors and a large outdoor scene where we have access to ground truth trajectory information. We measure the accuracy of our estimated trajectories by robustly aligning our trajectory estimate to the ground truth trajectory [48]. In the ground truth coordinate system, we then calculate the root mean squared error (RMSE). We Figure 3: Comparison between the predicted and ground truth positions and internal parameters of the quadrotor. In the left part of the figure you can see the visualization of trajectory point locations. On the right we can see the difference between 3D coordinates (X) of the quadrotor and its internal parameters (U, Φ, Θ). (best seen in color) have compared many variants of BA. The suffix ‘-p’ below denotes the type of regularizer (prior). • • • • • No-Opt: has no bundle adjustment optimization. BA: does regular point-based BA without regularization. BA-pGS: uses a Gaussian smoothing based regularizer. BA-pSS: uses a spline smoothing based regularizer. BA-pKF: This denotes the method with a Kalman filter based motion regularizer (see Appendix A). • BA-pDM: This denotes our proposed method with the flight dynamics-based regularizer. Datasets. We evaluated our method on three sets of data. We used an existing quadrotor simulator1 to generate trajectories with random waypoints. Each simulated trajectory contains 510 points or time steps that was used to simulate 17 seconds of video at 30Hz from 10 cameras. The camera locations were randomly generated around the flight volume and the cameras were oriented towards the center of the flight volume. We generated 100 sequences with varying degree of noise in the camera pose, initial trajectories as well as image noise and outliers. We evaluated our method on two datasets captured in real scenes – L AB and FARM. In both cases, six GoPro tripodmounted cameras were pointed in the direction of the flight volume. We recorded video at 2704 × 1536 pixel resolution and 30 fps. The L AB -S CENE was approximately 6 × 8 meters and contains an OptiTrack motion capture system [6] that was used to collect the ground truth quadrotor trajectory and camera poses. In this case we flew an off-the-shelf quadrotor (44.5 cm diameter) for 35 seconds. In order to achieve precise tracking accuracy we equipped UAV with a bright LED and an OptiTrack marker, placed close to each other. LED helps us to facilitate the detection process, as now it is narrowed down to searching for the brightest point 1 github.com/OMARI1988/Quadrotor_MATLAB_simulation Figure 4: Qualitative results (L AB dataset): [T OP] Two of the six camera viewpoints. [M IDDLE] Zoomed in patches of the trajectory point from all camera views with corresponding background segmentation results. [B OTTOM] A 3D visualization of the estimated trajectory (in black) and the ground truth trajectory (in red). (best seen in color) in the frame. Despite the simple scenario, people that were moving around in the room and reflectance from the walls were frequently detected as moving objects. The FARM dataset was captured in a large outdoor scene (see Figure 1) with a bigger UAV (1.5 m in diameter). Footage of a 4-minute flight was recorded using the six cameras, placed ∼ 20 meters apart. The videos were captured at the frame-rate of 15 FPS, which results in 3600 trajectory points. We have also collected drone GPS data and used it as ground truth for evaluation. method Position Error(m) No-Opt BA BA-pGS BA-pSS BA-pKF BA-pDM .2045±.015 .1165±.014 .0760±.007 .0761±.007 .1141±.009 .0757±.007 Figure 5: Comparing the various methods on the L AB dataset. The initial camera poses are perturbed with increasing position and orientation noise. The plots show the mean and std. dev. of the final error from 10 runs for the various methods. The table lists the error statistics (mean and std. dev.) for all the methods across all the different runs. (best seen in color) p (m) No-Opt BA-pDM BA 0.5 0.5 0.5 0.4 0.4 0.4 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 0.0 0.0 00° 02° 04° o 0.000 06° 08° 10° 0.0 00° (degrees) 0.056 0.113 02° 04° o 0.169 0.226 06° 08° 10° 00° (degrees) 0.282 02° 04° o 0.339 0.395 0.452 06° 08° 10° (degrees) 0.508 0.565 Position error (m) Figure 6: Sensitivity analysis on L AB dataset. [L EFT] Triangulation result. [M IDDLE] Results of standard BA [43] without any prior information. [R IGHT] Results of our method with a dynamics-based prior. Each of these plots show the mean position error across 10 runs, for different amounts of noise added to the camera positions (σp ) and orientations (σo ). The amount of error is color-coded and the colorbar below the plots show the correspondence between colors and actual values in meters. (best seen in color) 5.1. Experiments on Synthetic Data Here we first describe the influence of noise on the performance of our method. We then show that our approach is capable of inferring the underlying control inputs that define the motion of the drone. Sensitivity Analysis. Fig. 2 summarizes the results on the synthetic dataset. We see that prior information mostly helps to improve reconstruction accuracy. Of all the priors, motion-based ones show a significant improvement over conventional smoothing methods. Overall, the dynamicsbased prior is the most accurate. This is probably because the trajectory generated by the quadrotor simulator complies with the same model used to develop the dynamicsbased prior (Section 3.2). Inferring Control Inputs. We have evaluated the quality of prediction of the internal parameters (U, Φ, Θ) of the quadrotor on the synthetic dataset, as it provides an easy way of collecting ground truth information for these parameters. Fig. 3 summarizes this comparison. In the left part of the figure we can see the predicted and ground truth lo- cations of the 3D trajectory point locations. The right part of the figure depicts the difference between predicted and ground truth (x, y, z) positions of the quadrotor in the environment and the comparison of the predicted internal parameters of the quadrotor with the ground truth. Fig. 3 shows that 3D locations of the quadrotor were predicted quite well with very small deviations from the ground truth. Regarding the internal parameters, our method is able to predict them very well for the parts of the sequence, where these parameters vary smoothly. This behavior is introduced by Algorithm 1, where we constrain the values of (U, Φ, Θ) to vary smoothly through time. In our future research we would like to investigate other constraints on the internal quadrotor parameters that will allow us to recover their sharp changes. 5.2. Results on L AB Dataset Fig. 4 depicts an example of our indoor experiment. Fig. 4(top) depicts sample camera views. Fig. 4(middle) illustrates the cropped and zoomed in patches around the tracked object. Fig. 4(bottom) shows the 3D reconstruction of the trajectory compared to the OptiTrack ground truth. We also performed a quantitative evaluation of our method. In the L AB dataset, the detections in individual frames were quite reliable. Therefore to perform the noise sensitivity analysis, we have added noise to our initial camera pose estimates before running the optimization. Figures 5 and 6 show the quantitative evaluation results. Note that as we increase the noise added to the initial camera poses, the triangulation accuracy steadily decreases. This is because the point correspondence between different camera views progressively become inaccurate. The use of standard bundle adjustment improves the reconstruction accuracy. However, the quadrotor dynamics-based prior produces even higher accuracy especially when the noise is quite significant (see Fig. 6). In Fig. 5, the plots for BA-pDM, BA-pGS and BA-pSS methods are almost indistinguishable from each other, due to very similar performance. This is because in the indoor experiments, the UAV is always clearly visible and not too Figure 7: Qualitative Results (FARM dataset): The black and red curves denote the estimated and ground truth (GPS) trajectory respectively. [L EFT] Initialization trajectory estimate after the triangulation step. [R IGHT] The result obtained after bundle adjustment (BA-pDM). The trajectory is smoother and more accurate compared to the initial trajectory. [B OTTOM] The number of per-frame candidate detections for 3 videos. The middle and right plots show where tracking was difficult. far from all the cameras. This results in high quality detections with few false positives and allows even BA with simple smoothing-based priors to achieve good accuracy. The general trend we noticed in these experiments was that when the initial camera parameters are relatively accurate even simple triangulation can produce quite reliable trajectories. However, larger errors in initial camera pose quickly degrades the performance of both standard triangulation and bundle adjustment methods, whereas our approach is robust to relatively larger amounts of camera pose error due to the effective use of quadrotor dynamics. 5.3. Results on FARM Dataset Finally we have evaluated our methods on the outdoor dataset. Fig. 1 depicts an example of our outdoor experiment. We can see that compared to the indoor case the drone is much further away from the camera, which results in some challenges not just for the optimization, but also for its detection with background subtraction algorithms. For this experiment we have used Algorithm 2 to set the initial values for the camera parameters and trajectory point locations. Fig. 7(left) shows the result obtained using Algorithm 2, which we use as an initialization. Fig. 7(right) shows the final result of our approach. Fig. 7(bottom) depicts the number of detections per frame for three out of six camera views. We can see that towards the end of the sequence more false positives appear, due to the UAV entering a complicated area of the environment. Nevertheless, our approach allows successfully tracking the drone. Fig. 8 summarizes the accuracy of the various methods. Similar to the other experiments, the prior information helps to recover a more accurate trajectory. Moreover, using an appropriate dynamics model prior produces the most accurate result amongst all the priors. The Kalman filter-based prior is not very effective in this case due to noise in the initial trajectory (see Fig. 7(left)). No-Opt BA 2.551 1.910 BA-pGS BA-pSS BA-pKF BA-pDM 1.785 1.781 2.275 1.636 Figure 8: Comparing various methods on the FARM dataset. The percentage of 3D points with position error less than a threshold is shown for a range of thresholds. The RMSE error in meters for all the methods are reported in the table. The initialization noise causes the Kalman filter to be unstable and it fails to recover the correct motion model parameters unlike the other priors which are more robust. 6. Conclusion We have presented a new technique for accurately reconstructing the 3D trajectory of a quadrotor UAV observed from multiple cameras. We have shown that using motion information significantly improves the accuracy of reconstructed trajectory of the object in the 3D environment. Furthermore our method allows inferring the internal parameters of the quadrotor, such as roll, pitch angles and thrust, that is being commanded by the operator. Inferring these parameters has a broad variety of applications, ranging from reinforcement learning to providing analytics for pilots in air race competitions and making feasible research on UAVs in large outdoor and indoor spaces without depending on expensive motion capture systems. References [1] J. Busset, F. Perrodin, P. Wellig, B. Ott, K. Heutschi, T. Rühl, and T. Nussbaumer, “Detection and tracking of drones using advanced acoustic cameras,” in SPIE Security+ Defence. International Society for Optics and Photonics, 2015, pp. 96 470F–96 470F. 1 [2] D. K. Barton, Radar system analysis and modeling. Artech House, 2004, vol. 1. 1 [3] P. Nguyen, M. Ravindranatha, A. Nguyen, R. Han, and T. Vu, “Investigating cost-effective rf-based detection of drones,” in Proceedings of the 2Nd Workshop on Micro Aerial Vehicle Networks, Systems, and Applications for Civilian Use, ser. DroNet ’16, 2016, pp. 17–22. 1 [16] M. Breitenstein, F. Reichlin, B. Leibe, E. Koller-Meier, and L.Van Gool, “Robust Tracking-By-Detection Using a Detector Confidence Particle Filter,” in International Conference on Computer Vision, 2009, pp. 1515–1522. 2 [17] J. Berclaz, F. Fleuret, E. Türetken, and P. Fua, “Multiple Object Tracking Using K-Shortest Paths Optimization,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 33, no. 11, pp. 1806–1819, September 2011. 2 [18] A. Andriyenko and K. Schindler, “Multi-Target Tracking by Continuous Energy Minimization,” in Conference on Computer Vision and Pattern Recognition, 2011. 2 [19] Z. Qin and C. Shelton, “Improving Multi-Target Tracking via Social Grouping,” in Conference on Computer Vision and Pattern Recognition, 2012. 2 [4] U. Böniger, B. Ott, P. Wellig, U. Aulenbacher, J. Klare, T. Nussbaumer, and Y. Leblebici, “Detection of mini-uavs in the presence of strong topographic relief: a multisensor perspective,” in Proc. SPIE, 2016. 1 [20] G. Shu, A. Dehghan, O. Oreifej, E. Hand, and M. Shah, “Part-Based Multiple-Person Tracking with Partial Occlusion Handling,” in Conference on Computer Vision and Pattern Recognition, 2012. 2 [5] “Vicon Motion Systems,” http://www.vicon.com/. 1 [21] A. A. Butt and R. T. Collins, “Multi-Target Tracking by Lagrangian Relaxation to Min-Cost Network Flow,” in Conference on Computer Vision and Pattern Recognition, 2013, pp. 1846–1853. 2 [6] “OptiTrack Motion Capture Systems,” http://optitrack.com/. 1, 6 [7] A. Rozantsev, V. Lepetit, and P. Fua, “Flying objects detection from a single moving camera,” in Conference on Computer Vision and Pattern Recognition, 2015, pp. 4128–4136. 1, 2 [8] C. Martı́nez, I. F. Mondragón, M. A. Olivares-Méndez, and P. Campoy, “On-board and ground visual pose estimation techniques for uav control,” Journal of Intelligent & Robotic Systems, vol. 61, no. 1, pp. 301–320, 2011. 1 [9] P. Abbeel, A. Coates, and A. Y. Ng, “Autonomous helicopter aerobatics through apprenticeship learning,” The International Journal of Robotics Research, 2010. 2 [22] S. Avidan and A. Shashua, “Trajectory triangulation: 3D reconstruction of moving points from a monocular image sequence,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 22, no. 4, pp. 348–357, 2000. 2 [23] J. Kaminski and M. Teicher, “A General Framework for Trajectory Triangulation,” Journal of Mathematical Imaging and Vision, vol. 21, no. 1, pp. 27–41, 2004. 2 [24] D. Wedge, D. Huynh, and P. Kovesi, “Motion Guided Video Sequence Synchronization,” in Asian Conference on Computer Vision, 2006, pp. 832–841. 2 [10] W. Luo, J. Xing, X. Zhang, X. Zhao, and T.-K. Kim, “Multiple Object Tracking: A Literature Review,” in arXiv Preprint, no. 212, 2015. 2 [25] C. Yuan and G. Medioni, “3D Reconstruction of background and objects moving on ground plane viewed from a moving camera,” in Conference on Computer Vision and Pattern Recognition, vol. 2, 2006, pp. 2261–2268. 2 [11] Y. Huang, H. Zheng, H. Ling, E. Blasch, and H. Yang, “A comparative study of object trackers for infrared flying bird tracking,” CoRR, vol. abs/1601.04386, 2016. 2 [26] Y. Caspi, D. Simakov, and M. Irani, “Feature-Based Sequence-to-Sequence Matching,” International Journal of Computer Vision, vol. 68, no. 1, pp. 53–64, 2006. 2 [12] M. Betke, D. E. Hirsh, A. Bagchi, N. I. Hristov, N. C. Makris, and T. H. Kunz, “Tracking large variable numbers of objects in clutter,” in Conference on Computer Vision and Pattern Recognition, 2007, pp. 1–8. 2 [27] F. Padua, R. Carceroni, G. Santos, and K. Kutulakos, “Linear Sequence-to-Sequence Alignment,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 32, pp. 304–320, 2010. 2 [13] D. Dey, C. Geyer, S. Singh, and M. Digioia, “A cascaded method to detect aircraft in video imagery,” International Journal of Robotics Research, 2011. 2 [28] J. Valmadre and S. Lucey, “General trajectory prior for nonrigid reconstruction,” in Conference on Computer Vision and Pattern Recognition, 2012, pp. 1394–1401. 2 [14] R. T. Collins, A. J. Lipton, T. Kanade, H. Fujiyoshi, D. Duggins, Y. Tsin, D. Tolliver, N. Enomoto, O. Hasegawa, P. Burt et al., “A system for video surveillance and monitoring,” Technical Report CMU-RI-TR-00-12, Robotics Institute, Carnegie Mellon University, Tech. Rep., 2000. 2 [29] S. N. Sinha and M. Pollefeys, “Camera network calibration and synchronization from silhouettes in archived video,” International Journal of Computer Vision, vol. 87, no. 3, pp. 266–283, 2010. 2 [15] R. Collins, A. Lipton, H. Fujiyoshi, and T. Kanade, “Algorithms for cooperative multisensor surveillance,” Proc. of the IEEE, vol. 89, no. 10, pp. 1456–1477, 2001. 2 [30] S. N. Sinha and M. Pollefeys, “Visual-hull reconstruction from uncalibrated and unsynchronized video streams,” in 3D Data Processing, Visualization and Transmission. IEEE, 2004, pp. 349–356. 2 [31] J. Puwein, L. Ballan, R. Ziegler, and M. Pollefeys, “Joint camera pose estimation and 3d human pose estimation in a multi-camera setup,” in Asian Conference on Computer Vision. Springer, 2014, pp. 473–487. 2 [32] M. Vo, S. Narasimhan, and Y. Sheikh, “Spatiotemporal Bundle Adjustment for Dynamic 3D Reconstruction,” Conference on Computer Vision and Pattern Recognition, 2016. 2 [33] B. Triggs, P. F. McLauchlan, R. I. Hartley, and A. W. Fitzgibbon, Bundle Adjustment — A Modern Synthesis. Springer Berlin Heidelberg, 2000, pp. 298–372. 2 [34] A. Bartoli and P. Sturm, “Constrained structure and motion from multiple uncalibrated views of a piecewise planar scene,” International Journal of Computer Vision, vol. 52, no. 1, pp. 45–64, 2003. 3 [35] A. Cohen, C. Zach, S. N. Sinha, and M. Pollefeys, “Discovering and exploiting 3d symmetries in structure from motion,” in Conference on Computer Vision and Pattern Recognition, 2012. 3 [36] Y. Gong, D. Meng, and E. J. Seibel, “Bound constrained bundle adjustment for reliable 3d reconstruction,” Opt. Express, vol. 23, no. 8, pp. 10 771–10 785, Apr 2015. 3 [37] P. Fua, “Regularized bundle-adjustment to model heads from image sequences without calibration data,” International Journal of Computer Vision, vol. 38, no. 2, pp. 153–171, 2000. 3 [38] D. W. Marquardt, “An algorithm for least-squares estimation of nonlinear parameters,” SIAM Journal on Applied Mathematics, vol. 11, no. 2, pp. 431–441, 1963. 3, 4 [39] R. Hartley and A. Zisserman, Multiple View Geometry in Computer Vision. Cambridge University Press, 2000. 3, 4 [40] D. Webb and J. van den Berg, “Kinodynamic RRT*: Optimal Motion Planning for Systems with Linear Differential Constraints,” arXiv Preprint, vol. abs/1205.5088, 2012. 3 [41] J. Li and Y. Li, “Dynamic analysis and PID control for a quadrotor,” in 2011 IEEE International Conference on Mechatronics and Automation, August 2011, pp. 573–578. 3 [42] S. Agarwal, K. Mierle, and Others, “Ceres Solver,” http:// ceres-solver.org. 4, 5 [43] S. Agarwal, N. Snavely, S. Seitz, and R. Szeliski, “Bundle Adjustment in the Large,” in European Conference on Computer Vision, 2010, pp. 29–42. 5, 7 [44] P. Lindstrom, “Triangulation made easy,” in Conference on Computer Vision and Pattern Recognition, 2010, pp. 1554– 1561. 5 [45] “Open Source Computer Vision Library,” http://opencv.org. 5 [46] P. KaewTraKulPong and R. Bowden, An Improved Adaptive Background Mixture Model for Real-time Tracking with Shadow Detection. Springer US, 2002. 5 [47] G. Welch and G. Bishop, “An Introduction to Kalman Filter,” Department of Computer Science, University of North Carolina, Technical Report, 1995. 5 [48] B. Horn, “Closed-form solution of absolute orientation using unit quaternions,” Journal of the Optical Society of America A, vol. 4, no. 4, pp. 629–642, 1987. 5 Supplementary Appendix method BA-pDM-single BA-pDM Position error (m) 1.998 1.636 In this section we present more details on one of the baseline methods (BA-pKF). We also report two additional experiments. In the first one, we show a sensitivity analysis regarding parameter settings in our proposed BA-pDM method and discuss how this affects the accuracy of the estimated control inputs. In the second experiment, we compare our BA procedure with a baseline where the data association problem was solved before running bundle adjustment by forcing the single-view tracker to output at most one 2D observation in every video frame. Table 2: Comparison between our method (BA-pDM) and a baseline (BA-pDM-single) on the FARM dataset. The baseline uses at most one detection in every frame in all the input videos. A. Kalman filter prior C. Advantage of the new cost function In Section 5, we described several baselines that we have compared our approach to. Here we provide more details on the method based on the Kalman filter, as the other ones are relatively straightforward to implement. Classical Kalman filter allows predicting the state of the quadrotor at time t + 1 from its state at time t. In our case this state contains drone’s position and velocity. We then track quadrotor in 3D using the constant acceleration Kalman filter model. Therefore, x̂t+1 from Eq. 4 is computed according to the prediction of the Kalman filter. However, as the experiments show, the prior is dependent on the quality of the initialization and BA-pKF is not robust to noise in the initial 3D trajectory. Recall that in Eq. 2, we introduced a cost function based on a more general form of reprojection error that did not rely on perfect correspondence between different views. We did this to handle multiple candidate detections in every frame produced by the single-view tracker running on the input videos. To quantify the benefit of this new cost function, we compared our method (BA-pDM) which uses this new cost function E(C, X, O) with another baseline which we refer to as (BA-pDM-single). This baseline uses at most one measurement (detection) in every video frame. In that case, E(C, X, O) becomes identical to the cost function EBA (C, X, O) (see Eq. 1) used in conventional bundle adjustment. These unique detections used in the baseline, were selected during the 3D trajectory initialization step, which uses the RANSAC-based multi-view triangulation method we have proposed. Table 2 reports the final average position error for 3D points sampled on the trajectories estimated by our method (BA-pDM) and by the baseline (BA-pDM-single) respectively. These correspond to the FARM dataset. Note that both methods use the same dynamics-based prior but BApDM produces a more accurate result because the new cost function allows the selection of the 2D measurements (amongst the multiple detection candidates) to be refined during the bundle adjustment procedure. B. Control inputs prediction analysis In Section 5.1 we have shown that our system is capable of inferring the internal state of the quadrotor, which can be further used to estimate the control inputs commanded to the drone by the operator. Fig. 3 shows that our approach tends to over smooth the internal parameters (Φ, Θ, U). Therefore, in this section we investigated the effect of finetuning the dynamics-based prior on the accuracy of the estimated (Φ, Θ, U). Fig. 9 illustrates the influence of the dynamic-based prior on internal quadrotor state. Here the weight λ from the Eq. 3 together with the smoothing coefficient σ of the gaussian kernel H(Γ) = (g ∗ Γ) from Eq. 11 increases from top most plot to the bottom one. We can see in Fig. 9(a) that if the weight of the prior is small (0.01), we can quite reliably recover the sharp peaks of the throttle (U) command, however, there is some residual noise for time periods when the true throttle command remains fixed at a constant value. This happens because the prior does not have enough influence on the optimization to make it robust to the measurement noise in the image. On the other hand increasing the weight of the prior to (0.03) (Fig. 9(c)) allows us to compensate for the initialization noise and recover a smoother estimation of U. However, this tends to oversmooth U especially when it changes abruptly corresponding to times when the drone suddenly changes direction or altitude. (a) λ = 0.01, σ = 0.8 (b) λ = 0.02, σ = 1.1 (c) λ = 0.03, σ = 1.4 Figure 9: Influence of the dynamics-based prior on the prediction of the internal state of the quadrotor. In different plots we have varied the weight of the prior λ and the smoothing factor σ of the gaussian kernel that smooths (Φ, Θ, U). (a) corresponds to (λ, σ) = (0.01, 0.8), (b) illustrates the case when (λ, σ) = (0.02, 1.1) and (c) depicts the experiment with (λ, σ) = (0.03, 1.4).
1cs.CV
Noname manuscript No. (will be inserted by the editor) Microaneurysm Detection in Fundus Images Using a Two-step Convolutional Neural Networks arXiv:1710.05191v1 [cs.CV] 14 Oct 2017 Noushin Eftekheri, Hamidreza Pourreza, Ehsan Saeedi Received: date / Accepted: date Abstract Diabetic Retinopathy (DR) is the prominent cause of blindness in the world. The early treatment of DR can be conducted from detection of microaneurysms (MAs) which is reddish spots in retinal images. An automated microaneurysm detection can be a helpful system for ophthalmologists for detecting of MA. In this paper, deep learning, in particular convolutional neural network (CNN), is used as a powerful tool to efficiently detect MAs from fundus images. Our method used a new technique utilising of a twostage training process which results in an accurate detection, while decreasing computational complexity in comparison with previous works. To validate our proposed method, an experiment is conducted using Keras library to implement our proposed CNN on two standard publicly available datasets. Our results show a promising sensitivity value of about 0.8 which is a competitive value with the state-of-the-art approaches. Keywords Diabetic Retinopathy (DR), Microaneurysm (MA), Deep learning, Convolutional Neural Network (CNN). Department of Computer Engineering, Ferdowsi University of Mashhad, Mashhad, Iran N. Eftekheri E-mail: Noushin.Eftekhari @stu.um. ac.ir · Dr. H. Pourreza E-mail: [email protected] · Dr. E. Saeedi E-mail: [email protected] 1 Introduction Diabetic retinopathy (DR) is a diabetic disorder caused by changes in the blood vessels of the retina. The damage of retinal blood vessels may end in blindness. DR occurs in most people with diabetes and its treatment depends on the patient’s age and the duration of DR. In 2000, WHO estimates that 171 million people have diabetes and 366 million cases will occur in 2030 [11]. DR can be treated effectively with laser therapy if detected early. The important symptoms of diabetes are swelling of the blood vessels, fluid leakage in eyes and also in some cases the growth of new blood vessels on the retina. 80% of patients with diabetes have DR for more than 10 years [25]. Microaneurysm (MA) is the first symptom of DR that causes blood leakage to the retina. This lesion usually appears as small red circular spots with a diameter of fewer than 125 micrometers [11]. As mentioned in [3], the methods of automatic MA detection proceed in three stages (preprocessing, MA candidate extraction and classification). Preprocessing stage is to reduce the noise and enhance the contrast of input images applying image preprocessing techniques. These techniques are performed on the green colour plane of RGB images, because in this plane microaneurysms have the higher contrast with the background. In the second stage (MA candidate extraction stage), candidate regions for MA are detected, and because many of the blood vessels may result in false positives, the blood vessels are extracted from the candidates image using blood vessel segmentation algorithms. In the third stage (classification stage), after applying feature extraction and selection, a classification algorithm is used to categorize features into MA candidate (abnormal) and non-MA candidate (normal), while a proba- 2 bility is estimated for each candidate using a classifier and a large set of specifically designed features to represent a MA. Over the past decade, there has been a dramatic increase in automatic microaneurysms (MA) detection. First MA detection was introduced based on mathematical morphology detection approach in fluorescein angiograms. In these methods, to distinguish MA from vessels a morphological top-hat transformation with a linear structuring element at different orientations is used. Then, some papers, such as Spencer, Cree, Frame, and coworkers [7,19], tried to improve these approaches. They added two more steps to the basic top-hat transform based detection technique, matched filtering postprocessing step and a shade-correction preprocessing step. After detection and segmentation of candidate MA, various shape and intensity based features were extracted and finally a classifier was used to separate the real MA from spurious responses. After that, a modification version of the top-hat based algorithm is proposed and applied to high-resolution, red free fundus photographs by Hipwell et al. [10]. Fleming et al. [6] proposed an improvement of this method by locally normalizing the contrast around candidate lesions and eliminating candidates detected on vessels through a local vessel segmentation step. Niemeijer et al. [15] detect MA candidates in color fundus images through presenting a hybrid scheme that used both the top-hat based method as well as a supervised pixel classification based method. In addition to mathematical morphology approach, some other techniques are used for detection of red lesion in fundus image. Sinthanayothin et al. [18] assumed that images can be categorized in three classes, vessels, red lesion and MA. Then after applying neural networks as a recursive region growing procedure to segment both the vessels and red lesions in a fundus image, any remaining objects were identified as microaneurysms. Kamel et al. [12] also utilized a NN approach for automatic detection of MA in retinal angiograms. Using NN provide the ability of detecting the regions with MA and rejecting other regions. Usher et al. [20] used neural network to detect the microaneurysms. First of all preprocessing is done. After preprocessing, microaneurysms are extracted using recursive region growing and adaptive intensity thresholding with moat operator and edge enhancement operator. Moreover, Quellec et al. [16] described a supervised MA detection method based on template matching in wavelet-subbands. However, literature reviews have indicated that there are still some problems in this area that haven’t been considered before. One of the main problems in MA de- Noushin Eftekheri, Hamidreza Pourreza, Ehsan Saeedi tection is the poor quality images in JPEG format of the publicly available datasets, so MAs are too blurred or too small to be detected. Moreover, considering that the scale of Gaussian kernel is fixed, different size of MAs cannot be covered properly. larger MA will not be extracted if only small scale is used, and if a large scale is used, then small MAs that lie close to each other are considered as one MA. This, produces a lower correlation coefficient. Furthermore, a few MAs which are located close to blood vessels are missed in preprocessing stage, because they are recognized as part of the vascular map which should be removed in this stage. Another challenge of MA detection using neural networks, is imbalanced dataset which means the number of MA samples are usually much higher than the number of Non-MA ones. This can lead to improper and imbalanced training of networks, and also increase complexity and decrease classification accuracy because of processing of a large amount of uninformative data. In this paper, a new method for MAs detection in fundus images based on deep-learning neural networks is developed to address the problems with the current automatic detection algorithms. Deep learning algorithms, in particular convolutional networks, have rapidly become a methodology of choice for analyzing medical images. Deep learning is an improvement of artificial neural networks, consisting of more layers that permit higher levels of abstraction and improved predictions from data [8]. In our proposed method, by using the characteristic of convolution neural networks, the MA candidates are selected from the informative part of the image where their structure is similar to an MA, then a CNN will detect the MA and Non-MA spots. According to our results, the proposed method can decrease false-positive rate and can be considered as a powerful solution for automatic MA-detection approach. This paper starts with a brief introduction to deep learning in Part 2. Part 3 is dedicated to our proposed method. Then Part 4 shows our experimental results, and Part 5 dedicated for discussion. Finally, in part 6, we conclude our work. 2 Deep Learning in Medical Image Analysis Artificial neural networks and deep learning, conceptually and structurally inspired by neural systems, rapidly become an interesting and promising methodology for researchers in various fields including medical imaging analysis. Deep learning means learning of the representations of data with multiple levels of abstraction used for computational models that are composed of multiple processing layers. These methods rapidly become an Microaneurysm Detection in Fundus Images Using a Two-step Convolutional Neural Networks interesting and promising methodology for researcher and are gaining acceptance for numerous practical applications in engineering. Deep learning has performed especially well as classifiers for image-processing applications and as function estimators for both linear and non-linear applications. Deep learning recognize complicated structure in big data sets by utilizing the backpropagation algorithm to indicate how the internal parameters of a NN should be changed to compute the representation in each layer from the representation in the previous layer [13]. In particular, convolutional neural networks (CNNs) have proven to automatically learn mid-level and highlevel abstractions obtained from raw data (e.g., images), and so have been considered as powerful tools for a broad range of computer vision tasks. Recent results indicate that the generic descriptors extracted from CNNs are extremely effective in object recognition and localization in natural images. Medical image analysis are quickly entering the field and applying CNNs and other deep learning methodologies to a wide variety of applications. In medical imaging, the accurate diagnosis of a disease depends on both image acquisition and image interpretation. Thanks to the emerging of modern devices acquiring images very fast and with high resolution, image acquisition has improved substantially over recent years. The image interpretation process, however, has just recently begun to benefit from machine learning. 2.1 Convolutional Neural Networks (CNNs) The most successful type of models for image analysis to date are convolutional neural networks (CNNs). CNN consists of a set of layers called convolutional layers each of which contains one or more planes as a feature map. Each unit in a plane receives input from a small neighborhood in the planes of the previous layer. Each plane has a fixed feature detector that is convolved with a local window which is scanned over the planes in the previous layer to detect increasingly more relevant image features, for example lines or circles that may represent straight edges or circles, and then higher order features like local and global shape and texture. To detect multiple features, multiple planes are usually used in each layer. The output of the CNN is typically one or more probabilities or class labels [21]. Fig.1 shows one of the architecture of CNN structured we used in MA detection. As can be seen, the network is designed as a series of stages. The first three stages are composed of convolutional layers (blue) and pooling layers (green) and the output layer (brown) is consist of three fully-connected layers and the last layer 3 Fig. 1: The architecture of applied CNN in this project. is the softmax function. The details are explain in section 4.2. 3 The proposed method To address the usual problems of previous works, mentioned in Introduction (poor quality of images, the fixed scale of Gaussian kernel, MAs located close to blood vessels and imbalanced dataset), we proposed a twostage training strategy where informative normal samples are selected from a probability map which is the output of the first CNN, called basic CNN. The final CNN classify each pixel in the test images as MA or non-MA. This CNN gets the probability map from the previous stage as the weighted matrix for the input test images, and result in a final probability-map for each test image showing the probability of being a pixel MA or non-MA. Fig.2 shows different steps of the proposed method. 3.1 Preprocessing Step Because the retinal images are usually non-uniform illumination, a preprocessing step is needed to apply colour normalization and eliminate retina background. For this purpose, first the background image by using the median filter with the size of 30 × 30 pixel is obtained, then it is subtracted from the original image. Afterwards, input patches are produced for the basic CNN based on their centered pixel, those with a MA pixel at the center are considered as MA samples and those with non-MA pixel are considered as non-MA samples for training. 4 Noushin Eftekheri, Hamidreza Pourreza, Ehsan Saeedi Fig. 2: Illustration of the proposed method. 3.2 Candidate Selection by basic CNN Fig.1 shows the architecture of basic CNN. The training procedure in CNN is a sequential process that requires multiple iterations to optimize the parameters and extract distinguishing characteristics from images. In each iteration, a subset of samples are chosen randomly and applied to optimize the parameters. This is obtained by back propagation (BP) and minimizing cost function [13]. In this stage the basic CNN is trained with small patches whose labels are determined by the label of the their central pixel. The basic CNN is used to solve the imbalanced data problem where the number of patches including MA and Non-MA in retinal images is not balanced and cause network complexity and improper convergent. To avoid imbalanced data problem, in each epochs, an equal number of MA and non-MA patches are selected to train the network. However, because of not using all non-MAs in learning process, selecting the equal number of MA and non-MA patches will cause a high positive-false in initial results. the basic CNN returns an initial probability map indicating for each input pixel the inital probability of belonging to MA. This map is needed to prepare the input dataset for the final CNN. and therefore more abstract levels than the basic CNN which lead to a discriminative MA modelling. Unlike the basic CNN which used a random sample from the input dataset pool, the final CNN apply the probability map from the previous stage as the weighted matrix for the input images. In other words, the CNN inputs for classification are selected from the informative patches whose structure is similar to MA. This method results in decreasing computational complexity. The output of this CNN is a map for each test image showing the MA probability of a pixel. However, this map is noisy and a post-processing step is needed. 3.4 Post-processing In practice, the probability map obtained from the final CNN is extremely noisy. For example when there is two close candidates, they are merged and considered as one. Therefore, to obtained a smoothed probability map, it is convolved with a 5-pixel-radius disk kernel. The local maximum of the new map are expected to lie at the disk centres in the noisy map, i.e., at the centroids of each MA to obtain a set of candidates for each image. 3.3 Classification by final CNN 3.5 The architectures of CNNs The final CNN works as the main classifier to extract the MA candidate regions. This CNN has more layers, In this work, two different structure are used for the basic and final CNNs. As can be seen from Fig.1, the Microaneurysm Detection in Fundus Images Using a Two-step Convolutional Neural Networks 5 databases to train and test the proposed method for basic CNN includes three convolution layers, each of the detection of MA in retinal images. ROC includes which followed by a pooling layer, then three fully100 colour image of the retina that obtained from Topconnected layer and finally a Softmax layer in the outcon NW 100, Topcon NW 200 and Canon CR5-45NM put layer. The final CNN has more layers than the bacameras with JEPG format. These images were divided sic CNN. The corresponding layer number of final CNN into two parts of 50 subsets of training and testing. is five convolution and pooling layers, then two fullyThe image dimensions are 768 × 576 , 1058 × 1061 and connected and one Softmax classification layer which is 1389 × 1383 [14]. E-Ophtha-MA database contains 148 fully connected with two neurons for MA and non-MA, colour images of JEPG format and with the size of Table 1 and 2. 2544 × 1696. In this work, to increase the accuracy, a dropout training with a maxout activation function is used. Dropout To validate results, a cross-validation algorithm is means to reduce over-fitting by randomly omitting the utilized to divide the data to 75% training and 25% output of each hidden neuron with a probability of 0.25. testing sets, then exchange the training and testing sets Training process is similar to standard neural netin successive rounds such that all data has a chance of work using stochastic gradient descent. we have incorbeing trained and tested. For accuracy evaluation, we porated dropout training algorithm for three convolucomputed true positive (TP) as the number of MA pixtional layers and one fully connected hidden layer. 16 els correctly detected, false positive (FP) as the numfilter sizes 6 × 6 in the first convolution layer, 16 filter ber of non-MA pixels which are detected wrongly as size 5 × 5 in the second layer, and 16 filter size 3 × 3 is MA pixels, false negative (FN) as the number of MA applied in the third convolution layer, and then maxout pixels that were not detected and true negative (TN) activation function is used for all layers in the network as the number of no MA pixels which were correctly except for the softmax layer.The filter size in Max pool identified as non-MA pixels. For better representation layer is 2 × 2 with stride 2. After each pair convoluof accuracy, sensitivity is defined as follow. tion and pooling layers, an activation LeakyReLU layer is applied that improved the version of ReLU (rectify TP linear unit). In this version, unlike the ReLU in which sensitivity = (3) T P + FN negative values become zero and so neurons become deactivated, these values in the Leaky ReLU will not be zero, instead, the value of is added to the Equation 1. 5 Discussion f (x) = 1(x < 0)(ax) + 1(x ≥ 0)(x) (1) Where a is a small constant value. The final layers of the network consist of a fully connected layer and a final softmax classification layer. This function produces a score ranging between 0 and 1, indicating the probability of pixel belongs to the MA class. To train the network, loss function of a binary cross entropy is used. cross entropy calculate the difference between predicted values (p) and labels (t), using the following equation: L = −t log(p) − (1 − t) log(1 − p) (2) 4 Experimental Results To verify our proposed method, we implement the CNNs using deep learning Keras libraries based on Linux Mint operating system with 32G RAM, Intel (R) Core (TM) i7-6700K CPU and NVIDIA GeForce GTX 1070 graphics card. In this experiment, we used two standard publicly available datasets, ROC [2] and E-Ophtha-MA [1] In this experiment, to verify the accuracy of the proposed method, we compared our sensitivity value with the usual current works (Latim [16], OkMedical [24], Waikato [5], Fujita Lab [9], B Wu’s method [23], Valladolid [17]), Table 3 and 4. From these tables, our proposed method, compared with other methods, has the lowest sensitivity (0.04) when the average number of FP per image (FPs/Img) is 1/8, while this values increased quickly and increased to a maximum of 0.76 at FPs/Img equals 8. Valladolid assume all pixels in the image are part of one of three classes: class 1 (background elements), class 2 (foreground elements, such as vessels, optic disk and lesions), and class 3 (outliers). A three class Gaussian mixture model is fit to the image intensities and a group of MA candidates are segmented by thresholding the fitted model.The sensitivity of this method is 0.19 at FPs/Img = 1/8 and gradually increase to 0.52 at FPs/Img = 8. The Waikato Microaneurysm Detector performs a tophat transform by morphological reconstruction using an elongated structuring element at different orientations which detects the vasculature. After removal of the vasculature and a microaneurysm matched filtering 6 Noushin Eftekheri, Hamidreza Pourreza, Ehsan Saeedi Table 1: Architectures of Final CNN Layer Layer1 Layer2 Layer3 Layer4 Layer5 Layer6 Layer7 Layer8 Layer9 Layer10 Layer11 Layer12 Layer13 Operation Input Convolutional Max Pooling Convolutional Max Pooling Convolutional Max Pooling Convolutional Max Pooling Convolutional Max Pooling Fully Connected Fully Connected Input size 3 × 101 × 101 16 × 101 × 101 16 × 50 × 50 16 × 48 × 48 16 × 24 × 24 16 × 22 × 22 16 × 11 × 11 16 × 10 × 10 16 × 5 × 5 16 × 4 × 4 16 × 2 × 2 100 2 Detail 6×6 2×2 5×5 2×2 3×3 2×2 2×2 2×2 2×2 2×2 1×1 1×1 Berr,(p) 0.25 0.25 - Table 2: Architectures of Basic CNN Layer Layer1 Layer2 Layer3 Layer4 Layer5 Layer6 Layer7 Layer8 Layer9 Layer10 Operation Input Convolutional Max Pooling Convolutional Max Pooling Convolutional Max Pooling Fully Connected Fully Connected Fully Connected Input size 3 × 101 × 101 16 × 96 × 96 16 × 48 × 48 16 × 44 × 44 16 × 22 × 22 16 × 20 × 20 16 × 10 × 10 200 100 2 Detail 6×6 2×2 5×5 2×2 3×3 2×2 1×1 1×1 1×1 Berr,(p) 0.25 0.25 0.25 - Sensitivity Table 3: Sensitivities of the different methods at the various measurement points. All microaneurysms from the test set are included FROC results on Retinopathy online challenge dataset at average number of False positives per image FPs/Img 1/8 1/4 1/2 1 2 4 Method Proposed 0.04 0.17 0.35 0.55 0.61 0.72 Valladolid [17] 0.19 0.22 0.25 0.30 0.36 0.41 Waikato [5] 0.06 0.11 0.18 0.21 0.25 0.30 Latim [16] 0.17 0.23 0.32 0.38 0.43 0.53 OkMedical [24] 0.20 0.27 0.31 0.36 0.39 0.47 Fujita Lab [9] 0.18 0.22 0.26 0.29 0.35 0.40 8 0.76 0.52 0.33 0.60 0.50 0.47 Sensitivity Table 4: Sensitivities of the different methods at the various measurement points.all microaneurysms from the test set are included FROC results on Retinopathy online challenge dataset at average number of False positives per image FPs/Img 1/8 1/4 1/2 1 2 4 8 Method Proposed 0.09 0.26 0.40 0.53 0.58 0.67 0.77 B Wu’s [23] 0.06 0.12 0.17 0.24 0.32 0.42 0.57 Microaneurysm Detection in Fundus Images Using a Two-step Convolutional Neural Networks step the candidate positions are found using thresholding. In comparison with other methods, Waikato has the lowest sensitivity ranging from 0.06 to 0.33. Latim assumes that microaneurysms at a particular scale can be modelled with 2-D, rotation-symmetric generalized Gaussian functions. It then uses template matching in the wavelet domain to find the MA candidates. Latim method can be considered to have the second high sensitivity value after our proposed method. The sensitivity of this method is 0.17 at FPs/Img = 1/8 and 0.60 at FPs/Img = 8. OkMedical responses from a Gaussian filter-bank are used to construct probabilistic models of an object and its surroundings. By matching the filter-bank outputs in a new image with the constructed (trained) models a correlation measure is obtained. In Fujita lab work, a double ring filter was designed to detect areas in the image in which the average pixel value is lower than the average pixel value in the area surrounding it. Instead, the modified filter detects areas where the average pixel value in the surrounding area is lower by a certain fraction of the number of pixels under the filter in order to reduce false positive detections on small capillaries. The sensitivity of OkMedical and Fujita ranged from 0.18 to 0.50. Fig.3 confirm our results on Table 3 and 4. This figure shows the free-response receiver operating characteristic (FROC) which is a graphical plot illustrating the diagnostic ability of classifiers and created by plotting the sensitivity (TP rate) against the average of FP per image at various threshold settings, and compare the sensitivity of the proposed method and other methods from [5, 9, 16, 17, 24] on ROC and E-OphthaMA databases. From Fig.3a we can see that the sensitivity of the proposed method on ROC dataset is about 0.3 higher that other methods. It is about 0.6 for the FP greater than 1 and reached the maximum of 0.8, while this number for other methods doesn’t exceed 0.6. Fig.3b also shows that the sensitivity of the proposed methods on E-Ophtha-MA databse is about 0.2 greater than BWu’s method [23].Table 5 shows Competition performance measure (CPM) to evaluate results. This table also confirm that our proposed method has the highest CPM value for both ROC and E-Ophtha-MA datasets. These values are 0.45 and 0.42 for ROC and EOphtha-MA datasets respectively, while the maximum corresponding values for other methods are 0.38 and 0.35. 6 Conclusion In this paper, an approach for automatic MAs detection in retinal images based on deep-learning CNN is developed to address the previous works problems such as 7 (a) FROC curves for ROC dataset (b) FROC curves for E-Ophtha-MA dataset Fig. 3: The comparison of FROC curves of the proposed and previous methods Table 5: Final Score(CPM) Competition performance measure(CPM) of retinopathy online challenge at different operating points Final Score ROC E Ophtha MA Propose-method 0.45 0.42 Valladolid [17] 0.32 Waikato [5] 0.21 Latim [16] 0.38 OkMedical [24] 0.36 Fujita Lab [9] 0.31 B Wu’s method [23] 0.35 imbalanced dataset and inaccurate MA detection. In this method, because of using a two-stage CNN, the MAs candidate for classification process are selected from a balanced dataset and informative part of the image where their structure is similar to MA, and this results in decreasing computational complexity. According to our experimental results based on two standard publicly available dataset, the proposed method has a higher sensitivity value, and can decrease false-positive rate compared to previous methods; it ,therefore, can 8 Noushin Eftekheri, Hamidreza Pourreza, Ehsan Saeedi Fig. 4: Pixel probability maps obtained from the final CNN for a different number of epochs. In initial epochs, the probability map include low probabilities of MA (depicted as green spots), in the subsequent epochs, the medium and high probabilities are in blue and purple respectively. be considered as a powerful improvement for previous MA-detection based on retinal images approach. For the future work, we plan to improve the training phase by combining the base and the final CNNs, and also apply this method on other medical application where imbalance data is an issue. 7. Allan J Frame, Peter E Undrill, Michael J Cree, John A Olson, Kenneth C McHardy, Peter F Sharp, and John V Forrester. A comparison of computer based classification methods applied to the detection of microaneurysms in ophthalmic fluorescein angiograms. Computers in biology and medicine, 28(3):225–238, 1998. 8. Jiuxiang Gu, Zhenhua Wang, Jason Kuen, Lianyang Ma, Amir Shahroudy, Bing Shuai, Ting Liu, Xingxing Wang, and Gang Wang. Recent advances in convolutional neural networks. arXiv preprint arXiv:1512.07108, 2015. 7 Compliance with Ethical Standards 9. Yuji Hatanaka, Tsuyoshi Inoue, Susumu Okumura, Chisako Muramatsu, and Hiroshi Fujita. Automated microaneurysm detection method based on double-ring fil– conflict of interest: The authors (Noushin Eftekheri, ter and feature analysis in retinal fundus images. In Dr.Hamidreza Pourreza and Dr.Ehsan Saeedi) deComputer-Based Medical Systems (CBMS), 2012 25th clare that they have no conflict of interest. International Symposium on, pages 1–4. IEEE, 2012. – Ethical Standards: This article does not contain 10. JH Hipwell, F Strachan, JA Olson, KC McHardy, PF Sharp, and JV Forrester. Automated detection of miany studies with human or animal subjects percroaneurysms in digital red-free photographs: a diabetic formed by any of the authors; hence, formal consent retinopathy screening tool. Diabetic medicine, 17(8):588– is not applicable. In this study, two standard pub594, 2000. licly available databases, ROC [2] and E-Ophtha11. Elaheh Imani, Hamid-Reza Pourreza, and Touka Banaee. Fully automated diabetic retinopathy screening MA [1] databases are used. using morphological component analysis. Computerized Medical Imaging and Graphics, 43:78–88, 2015. 12. Mohamed Kamel, Saeid Belkassim, Ana Maria MenReferences donca, and Aurélio Campilho. A neural network approach for the automatic detection of microaneurysms 1. E-Ophtha-MA dataset, http://www.adcis.net/en/Downloadin retinal angiograms. In Neural Networks, 2001. ProThird-Party/E-Ophtha.html. ceedings. IJCNN’01. International Joint Conference on, volume 4, pages 2695–2699. IEEE, 2001. 2. ROC dataset , http://webeye.ophth.uiowa.edu/ROC/. 13. Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep 3. Ankita Agrawal, Charul Bhatnagar, and Anand Singh learning. Nature, 521(7553):436–444, 2015. Jalal. A survey on automated microaneurysm detection in diabetic retinopathy retinal images. In Information 14. Meindert Niemeijer, Bram Van Ginneken, Michael J Systems and Computer Networks (ISCON), 2013 InterCree, Atsushi Mizutani, Gwénolé Quellec, Clara I national Conference on, pages 24–29. IEEE, 2013. Sánchez, Bob Zhang, Roberto Hornero, Mathieu Lamard, Chisako Muramatsu, et al. Retinopathy online chal4. CE Baudoin, BJ Lay, and JC Klein. Automatic detection lenge: automatic detection of microaneurysms in digital of microaneurysms in diabetic fluorescein angiography. color fundus photographs. IEEE transactions on medical Revue d’épidémiologie et de santé publique, 32(3-4):254– imaging, 29(1):185–195, 2010. 261, 1983. 15. Meindert Niemeijer, Bram Van Ginneken, Joes Staal, 5. Michael J Cree. The waikato microaneurysm detector. Maria SA Suttorp-Schulten, and Michael D Abràmoff. the University of Waikato, Tech. Rep, 2008. Automatic detection of red lesions in digital color fundus 6. Alan D Fleming, Sam Philip, Keith A Goatman, John A photographs. IEEE Transactions on medical imaging, Olson, and Peter F Sharp. Automated microaneurysm 24(5):584–592, 2005. detection using local contrast normalization and local vessel detection. IEEE transactions on medical imaging, 16. Gwénolé Quellec, Mathieu Lamard, Pierre Marie Jos25(9):1223–1232, 2006. selin, Guy Cazuguel, Béatrice Cochener, and Christian Microaneurysm Detection in Fundus Images Using a Two-step Convolutional Neural Networks 17. 18. 19. 20. 21. 22. 23. 24. 25. Roux. Optimal wavelet transform for the detection of microaneurysms in retina photographs. IEEE Transactions on Medical Imaging, 27(9):1230–1241, 2008. Clara I Sánchez, Roberto Hornero, Agustı́n Mayo, and Marı́a Garcı́a. Mixture model-based clustering and logistic regression for automatic detection of microaneurysms in retinal images. SPIE medical imaging 2009: computeraided diagnosis, 7260:72601M, 2009. Chanjira Sinthanayothin, James F Boyce, Tom H Williamson, Helen L Cook, Evelyn Mensah, Shantanu Lal, and David Usher. Automated detection of diabetic retinopathy on digital fundus images. Diabetic medicine, 19(2):105–112, 2002. Timothy Spencer, Russell P Phillips, Peter F Sharp, and John V Forrester. Automated detection and quantification of microaneurysms in fluorescein angiograms. Graefe’s archive for clinical and experimental ophthalmology, 230(1):36–41, 1992. Dumskyj Usher, M Dumskyj, Mitsutoshi Himaga, Tom H Williamson, Sl Nussey, and J Boyce. Automated detection of diabetic retinopathy in digital retinal images: a tool for diabetic retinopathy screening. Diabetic Medicine, 21(1):84–90, 2004. Mark JJP van Grinsven, Bram van Ginneken, Carel B Hoyng, Thomas Theelen, and Clara I Sánchez. Fast convolutional neural network training using selective data sampling: Application to hemorrhage detection in color fundus images. IEEE transactions on medical imaging, 35(5):1273–1284, 2016. Thomas Walter, Pascale Massin, Ali Erginay, Richard Ordonez, Clotilde Jeulin, and Jean-Claude Klein. Automatic detection of microaneurysms in color fundus images. Medical image analysis, 11(6):555–566, 2007. Bo Wu, Weifang Zhu, Fei Shi, Shuxia Zhu, and Xinjian Chen. Automatic detection of microaneurysms in retinal fundus images. Computerized Medical Imaging and Graphics, 55:106–112, 2017. Bob Zhang, Xiangqian Wu, Jane You, Qin Li, and Fakhri Karray. Detection of microaneurysms using multi-scale correlation coefficients. Pattern Recognition, 43(6):2237– 2248, 2010. Yibo Bob Zhang. Retinal image analysis and its use in medical applications. 2011. 9
1cs.CV
arXiv:1703.00442v1 [math.AC] 1 Mar 2017 FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES KHALED ALHAZMY AND MORDECHAI KATZMAN Abstract. This paper studies properties of certain hypersurfaces in prime characteristic: we give a sufficient and necessary conditions for some classes of such hypersurfaces to have Finite F representation Type (FFRT) and we compute the F -signatures of these hypersurfaces. The main method used in this paper is based on finding explicit matrix factorizations. 1. Introduction For any commutative ring R of prime characteristic p, R-module M, and e ≥ 0 we can construct a new R-module F∗e M with elements {F∗e m | m ∈ M}, abelian group structure (F∗e m1 ) + (F∗e m2 ) = F∗e (m1 + e m2 ) and R-module structure given by rF∗e m = F∗e r p m. In this paper we study properties of the modules F∗e R for various hypersurfaces R. Smith and Van den Bergh introduced in [SV97] the first property studied in this paper, namely Finite F-representation Type (henceforth abbreviated FFRT ) which we describe in some detail in Section 2. We say that R has FFRT if there exists a finite set of indecomposable Rmodules M = {M1 , . . . , Ms } such that for all e > 0, F∗e R is isomorphic to a direct sum of summands in M. Rings with FFRT have very good properties, e.g., with some additional hypothesis their rings of differential operators are simple [SV97, Theorem 4.2.1], their HilbertKunz multiplicities are rational (cf. [Sei97]), tight closure commutes with localization in such rings (cf. [Yao05]), local cohomology modules of R have finitely many associated primes ([DQ16]), and F -jumping coefficients in R form discrete sets ([KSSZ13]). The main tool in this paper, developed in sections 3 and 4, is an explicit presentation of F∗e R as cokernel of a matrix factorization. In section 5 we classify those F -finite hypersufaces of the form K[[x1 , . . . , xn , u, v]]/(f (x1, . . . , xn ) + uv) which have FFRT in terms of the hypersurfaces defined by the powers of f . As a corollary we construct in section 6 examples of rings that have FFRT but not finite CM representation type. 1 2 KHALED ALHAZMY AND MORDECHAI KATZMAN The last two sections of this paper analyze the F -signatures of some hypersurfaces. We recall the following definition Definition 1.1. Let (R, m, K) be a d-dimensional F -finite Noetherian local ring of prime characteristic p. If [K : K p ] < ∞ is the dimension of K as K p -vector space and α(R) = logp [K : K p ], then the F -signature of R, denoted by S(R), is defined as (1) ♯(F∗e (R), R) e→∞ pe(d+α(R)) S(R) = lim where ♯(F∗e (R), R) denotes the maximal rank of a free direct summand of F∗e (R). F -signatures were first defined by C. Huneke and G. Leuschke in [HL02] for F -finite local rings of prime characteristic with perfect residue field. In [Yao06] Y. Yao extended the definition of F -signature to arbitrary local rings without the assumptions that the residue field be perfect and recently K. Tucker proved in [Tu12] that the limit in (1) always exists. The F -signature seems to give subtle information on the singularities of R. For example, the F -signature of any of the two-dimensional quotient singularities (An ), (Dn ), (E6 ), (E7 ), (E8 ) is the reciprocal of the order of the group G defining the singularity [HL02, Example 18]. In [AL03] I. Aberbach and G. Leuschke proved that the F -signature is positive if and only if R is strongly F-regular. Furthermore, We have S(R) ≤ 1 with equality if and only if R is regular (cf. [Tu12, Theorem 4.16] and [HL02, Corollary 16]). In sections 7 and 8 we apply the methods developed in sections 3 and 4 in order to find explicit expressions for the F -signatures of the rings K[[x1 , . . . , xn , u, v]]/(f (x1 , . . . , xn )+uv) and K[[x1 , . . . , xn , z]]/(f (x1 , . . . , xn )+ z 2 ) where f is a monomial. Throughout this paper, we shall assume all rings are commutative with a unit, Noetherian, and have prime characteristic p > 0 unless otherwise is stated. We denote by N (and Z+ ) the set of the positive integers (and non-negative integers) respectively. We let q = pe for some e ∈ N. 2. Rings of finite F-representation type Throughout this section R denotes a ring of prime characteristic p. In what follows we gather some properties of the modules F∗e (M) introduced in the previous section and introduce several concepts related to FFRT. FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 3 Recall that a non-zero finitely generated module M over a local ring R is Cohen-Macaulay if depthR M = dim M and hence R is CohenMaculay ring if R itself is a Cohen-Macaulay module. However, if depthR M = dim R, M is called maximal Cohen-Macaulay module (or MCM module). When M is a finitely generated module over non-local ring R, M is Cohen-Macualy if Mm is a Cohen-Macaulay module for all maximal ideals m ∈ Supp M. Later in the paper we will look at the modules F∗e (R) when R is a Cohen-Macaulay ring. Note that a regular sequence on an R-module M is also a regular sequence on F∗e M, and in particular, if R is CohenMacaulay, F∗e (R) are MCM modules for all e ≥ 0. Definition 2.1. A finitely generated R-module M is said to have finite F-representation type (henceforth abbreviated FFRT) by finitely generated R-modules M1 , . . . , Ms if for every positive integer e, the R-module F∗e (M) can be written as a finite direct sum in which each direct summand is isomorphic to some module in {M1 , . . . , Ms } , that is, there exist non-negative integers t(e,1) , . . . , t(e,s) such that F∗e (M) = s M ⊕t(e,j) Mj . j=1 We say that M has FFRT if M has FFRT by some finite set of Rmodules M1 , . . . , Ms If W ⊂ R is a multiplicatively closed set and I ⊆ R is an ideal, then for a finitely generated R-module M one can check that F∗e (W −1 M) is cI ) is isomorphic isomorphic to W −1 F∗e (M) as W −1 R-module and F∗e (M e to F\ ∗ (M)I as R̂I -modules, wherebI denotes completion at I. This yields the following remark Remark 2.2. [Yao05, Remark 1.2] If M has FFRT , then (a) For any multiplicatively closed set W in R, the localization W −1 M also has FFRT as W −1 R-module. (b) For any ideal I of R, the I-adic completion of M also has FFRT as R̂I -module. Examples of rings with FFRT can be found in [TT08] and [Shi11]. One such class of examples are rings of finite CM representation type. These are Cohen-Macaulay rings R with the property that the set of all isomorphism classes of finitely generated, irreducible, MCM R-modules is finite. When R is Cohen-Macaulay any direct summand of F∗e (R) is a MCM module, hence finite Cohen-Macalay representation type implies 4 KHALED ALHAZMY AND MORDECHAI KATZMAN FFRT. The converse is not true: we explore some examples of these in section 6. 3. Matrix Factorization In this section, we discuss the concept of a matrix factorization and many basic properties that we need later in the rest of this paper. We start by fixing some notations and stating some observations about the matrices and a cokernel of a matrix. If m, n ∈ N, then Mm×n (R) (and Mn (R)) denotes the set of all m × n (and n × n) matrices over a ring R. If A ∈ Mn×m (R) is the matrix representing the R-linear map φ : Rn −→ Rm that is given n by φ(X) = AX for all X ∈ R , then we write A : Rn −→ Rm to denote the R-linear map φ and CokR (A) denotes the cokernl of φ while ImR (A) denotes the image of φ. We omit the subscript R if it is known from the context. If A, B ∈ Mn (R), we say that A is equivalent to B if there exist invertible matrices U, V ∈ Mn (R) such that A = UBV . If A, B ∈ Mn (R) are equivalent matrices, then CokR (A) is isomorphic to CokR (B) as R-modules. Furthermore, If A ∈ Mn (R) and B ∈ Mm (R), then we define A ⊕ B to be the matrix in Mm+n (R) that is given by  A 0 A⊕B = . In this case, CokR (A ⊕ B) = CokR (A) ⊕ CokR (B). 0 B Let P denote a ring with identity that is not necessarily commutative. Let m and n be positive integers. If λ ∈ P, 1 ≤ i ≤ m and n 1 ≤ j ≤ n, then Lm×n i,j (λ) (and Li,j (λ)) denotes the m × n (and n × n) matrix whose (i, j) entry is λ and the rest are all zeros. When i 6= j, we n (λ) := In + Lni,j (λ) where In is the identity matrix in Mn (R). write Ei,j n If there is no ambiguity, we write Ei,j (λ) (and Li,j (λ)) instead of Ei,j (λ) n (and Li,j (λ)). The following lemmas describe an equivalence between specific matrices that are basic for our work in the rest of this paper. Lemma 3.1. Let m be an integer with m ≥ 2 and n = 2m. If A is a matrix in Mn (P) that is given by   b x   0 b     1 0 b     1 0 b A=  . . .   .. .. ..     1 0 b 1 0 b then there exist two invertible matrices M, N ∈ Mn (P) satisfying: FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 5 (a) M has the form M=  I2 M̃ I2(m−1)  where I2 and I2(m−1) are the identity matrices in M2 (P) and M2(m−1) (P) respectively, and M̃ is a 2 × 2(m − 1) matrix over P. (b) N has the form  1 0 a1,3 ... a1,n  1 0 a 2,4  ..   1 0 .  . . . .. .. .. N =   .. ..  . . an−2,n   1 0 1 (c)              0 (−1)m−1 bm x  0 0 (−1)m−1 bm   1 0 0  1 0 0 MAN =   .. .. ..  . . .   1 0 0 1 0 0           Proof. Use row and column operations and the induction on m.  Corollary 3.2. Let n = 2m + 1 where m is an integer with m ≥ 2 and let A be a matrix in Mn (P) given by   b x 0  0 b y      1 0 b    1 0 b A=   . . .   .. .. ..     1 0 b 1 0 b 6 KHALED ALHAZMY AND MORDECHAI KATZMAN Then there exist invertible matrices M and N in Mn (P) such that       MAN =      0 0 0 1 0 1 x (−1)m−1 b 0 0 0 .. .. .. . . . 1 0 1 n−1 2 (−1)m b y 0 0 0 n+1 2            Proof. Let à be the 2m × 2m matrix given by  b x   0 b     1 0 b     1 0 b à =   .. .. ..   . . .     1 0 b 1 0 b  It follows that     A=    0 y 0 .. .        0  0 ... 0 1 0 b à Now use Lemma 3.1 ,and appropriate row and column operations to get the result.  Lemma 3.3. Let n be an integer with n ≥ 2. by  b 1 b  1 b A=  .. ..  . . 1 b If A ∈ Mn (P) is given       FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 7 there exist upper triangular matrices B, C ∈ Mn (P) such that the (i, i) entry of B and C is the identity element of P for all i = 1, . . . , n and  0 (−1)n+1 bn  1 0  1 0 BAC =   .. ..  . . 1 0       Proof. Use row and column operations and the induction on n ≥ 2 to prove this lemma.  Corollary 3.4. Let n be a positive integer such that n ≥ 3 , 1 ≤ k ≤ n − 1 and let m = n − k. Suppose that u and v are two variables (k) (k) (k) on P and let A1 ∈ Mk (P) and A2 ∈ Mm (P) be given by A1 =     b b  1 b  1 b     (k) .  and A =  1 b  1 b 2     . . . .     .. .. .. .. 1 b  1 b  v b  1 b    .. ..   . .  #  " (k)   k×m L1,m (v) A1 1 b   = If Bk = , (k) m×k u b   L1,k (u) A2   1 b     . . .. ..   1 b   k+1 k (−1) b v ∈ then Bk is equivalent to the matrix Ck = In−2 ⊕ m+1 m u (−1) b Mn (P) where In−2 is the identity matrix in Mn−2 (P).   b uv  1 b    , 1 b Moreover, if D ∈ Mn (P) is given by D =    .. ..   . . 1 b  n n (−1) b uv then D is equivalent to the matrix D̃ = In−2 ⊕ ∈ 1 b Mn (P) where In−2 is the identity matrix in Mn−2 (P). 8 KHALED ALHAZMY AND MORDECHAI KATZMAN Proof. By Lemma 3.3, there exist upper triangular matrices B1 , C1 ∈ Mk (P) and B2 , C2 ∈ Mn−k (P) with 1 along their diagonal such that    0 (−1)m+1 bm 0 (−1)k+1 bk  1 0  1 0  (k)  , B2 A(k) C2 =  B1 A1 C1 =  .. .. .. .. 2    . . . . 1   B1 0 where m = n − k. Define B, C ∈ Mn (P) to be B = and 0 B2   C1 0 C= . Using appropriate row and column operations on the 0 C2 matrix BBk C yields the required result. Applying a similar argument on the matrix D proves the corresponding result.  If A and B are matrices in Mn (R) such that CokR (A) is isomorphic to CokR (B), this does not imply in general that A is equivalent to B [LR74]. However, the following lemma asserts that this is true over local rings. 1 0 Lemma 3.5. Let (R, m) be a noetherian local ring and let A ∈ Ms (R) and B ∈ Mt (R) be two matrices determining the R-linear maps A : Rs → Rs and B : Rt → Rt such that A and B are injective and all entries of A and B are in m. If CokR (A) is isomorphic to CokR (B) as R-modules, then s = t and A is equivalent to B. Proof. Consider the following diagram with exact rows B δ A π 0 −−−→ Rt −−−→ Rt −−−→ CokR (B) −−−→ 0       µy≈ αy βy 0 −−−→ Rs −−−→ Rs −−−→ CokR (A) −−−→ 0 The projectivity of Rt induces the R-linear map α that makes the right square of the diagram commutes. Since Im(αB) ⊆ Im(A), the projectivity of Rt induces β that makes the diagram commutative. The fact that all entries of A are in m yields that Im(A) ⊆ mRs . Now, if y ∈ Rs , there exists x ∈ Rt such that π(y) = µδ(x) = πα(x). Therefore, y − α(x) ∈ Ker(π) = Im(A) and then y ∈ Im(α) + Im(A) ⊆ Im(α) + mRs . This implies that Rs = Im(α) + mRs and hence by Nakayamma lemma it follows that α is surjective. The surjectivity of α shows that t ≥ s. By similar argument we show that s ≥ t and hence s = t. Since α : Rs → Rs is surjective, α is isomorphism [Mat86, Theorem 2.4]. The five lemma confirms that β is isomorphism too. If U and V are the invertible matrices representing α and β respectively, then UB = AV as desired. 0     FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 9  Matrix factorizations were introduced by David Eisenbud in [Eis80] as a means of compactly describing the minimal free resolutions of maximal Cohen-Macaulay modules that have no free direct summands over a local hypersurface ring. Definition 3.6. [EP15, Definition 1.2.1] Let f be a non-zero element of a commutative ring S. A matrix factorization of f is a pair (φ, ψ) of homomorphisms between finitely generated free S-modules φ : G → F and ψ : F → G, such that ψφ = f IG and φψ = f IF . Proposition 3.7. Let f be a non-zero element of a commutative ring S. If (φ : G → F, ψ : F → G) is a matrix factorization of f , then: (a) f Cok(φ) = f Cok(ψ) = 0 . (b) If f is a non-zerodivisor, then φ and ψ are injective. (c) If S is a domain, then G and F are finitely generated free modules having the same rank. Proof. It is easy to show (a) and (b) but (c)can be proved using the same argument as in [LW12, Page 127].  As a result, we can define the matrix factorization of a non-zero element f in a domain as the following. Definition 3.8. Let S be a domain and let f ∈ S be a non-zero element. A matrix factorization is a pair (φ, ψ) of n × n matrices with entries in S such that ψφ = φψ = f In where In is the identity matrix in Mn (S). By CokS (φ, ψ) and CokS (ψ, φ), we mean CokS (φ) and CokS (ψ) respectively. There are two distinguished trivial matrix factorizations of any element f , namely (f, 1) and (1, f ). Note that CokS (1, f ) = 0, while CokS (f, 1) = S/f S. Two matrix factorizations (φ, ψ) and (α, β) of f are said to be equivalent and we write (φ, ψ) ∼ (α, β) if φ, ψ, α, β ∈ Mn (S) for some positive integer n and there exist invertible matrices V, W ∈ Mn (S) such that V φ = αW and W ψ = βV . If (S, m) is a local domain, a matrix factorization (φ, ψ) of an element f ∈ m \ {0} is reduced if all entries of φ and ψ are in m. Remark 3.9. Let (S, m) be a regular local ring, f ∈ m\{0}, R = S/f S and let u and v be two variables. Suppose that (φ, ψ) and (α, β) are two n × n matrix factorizations of f . Then (a) CokS (φ) and CokS (ψ) are both modules over the ring R as f CokS (φ) = 0 and f CokS (ψ) = 0. (b) The S-linear maps φ : S n → S n and ψ : S n → S n are both injective. 10 KHALED ALHAZMY AND MORDECHAI KATZMAN (c) If (φ, ψ) ∼ (α, β), then CokS (φ, ψ) is isomorphic to CokS (α, β) over S (and consequently over R), likewise, CokS (ψ, φ) is isomorphic to CokS (β, α) over S (and consequently over R). (d) If (φ, ψ) and (α, β) are reduced matrix factorizations of f such that CokS (φ, ψ) is isomorphic to CokS (α, β), then by Lemma 3.5 and the definition of the matrix factorization, it follows that (φ, ψ) ∼ (α, β).     φ −vI ψ vI z (e) If (φ, ψ)⊕(α, β) := (φ⊕α, ψ⊕β) and (φ, ψ) := ( , ), uI ψ −uI φ then (φ, ψ) ⊕ (α, β) is a matrix factorization of f , and (φ, ψ)z is a matrix factorization for f + uv in S[[u, v]]. (f) If (φ, ψ) ∼ (α, β), then (φ, ψ)z ∼ (α, β)z. (g) [(φ, ψ) ⊕ (α, β)]z is equivalent to (φ, ψ)z ⊕ (α, β)z . (h) If M = CokS (φ, ψ) and N = CokS (α, β), we write M z = CokS[[u,v]] (φ, ψ)z and N z = CokS[[u,v]](α, β)z (Notice here that z the operation (−)L depends on L the the matrix factorization ). As a result, (M N)z = M z N z . Furthermore, if Mi = CokS (φi , ψi ) where (φi , ψi ) is a matrix factorization of f for all n n L L 1 ≤ i ≤ n, it follows that ( Mj )z = Mjz . j=1 j=1 ⋆ (i) If R = S[[u, v]]/(f +uv), then CokS[[u,v]] (f, 1)z = R⋆ = CokS[[u,v]] (1, f )z z ⋆ and hence we can write(R)  = R as R = CokS (f, 1). φ −zI ψ zI (j) If (φ, ψ)♯ := ( , ), then (φ, ψ)♯ is a matrix zI ψ −zI φ factorization of f + z 2 in S[[z]]. (k) If (φ, ψ) ∼ (α, β), then (φ, ψ)♯ ∼ (α, β)♯. (l) [(φ, ψ) ⊕ (α, β)]♯ is equivalent to (φ, ψ)♯ ⊕ (α, β)♯ . (m) If R♯ = S[[z]]/(f +z 2 ), then R♯ = S[[z]]/(f +z 2 ) = CokS[[z]](f, 1)♯ = CokS[[z]](1, f )♯ . Proof. We will just prove the result (d) as the rest follows from the definitions. Assume that (φ, ψ) and (α, β) are reduced matrix factorizations of f such that CokS (φ, ψ) is isomorphic to CokS (α, β). This means that CokS (φ) is isomorphic to CokS (α) and consequently from Lemma 3.5 it follows that V φ = αW for invertible matrices V and W . Therefore, we have V φψ = αW ψ and thus V (f I) = αW ψ. As a result, we get βV (f I) = βαW ψ = f IW ψ and consequently f βV = f W ψ. Since f is an element of the integral domain S, we conclude that βV = W ψ. This proves that (φ, ψ) is equivalent to (α, β).  A matrix factorization can be decomposed as follows. FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 11 Proposition 3.10. [Yosh90, Page58] Let (S, m) be a regular local ring and f ∈ m r {0}. Any matrix factorization (φ, ψ) of f can be written uniquely up to equivalence as (φ, ψ) = (α, β) ⊕ (f, 1)t ⊕ (1, f )r with (α, β) reduced, i.e, all entries of α, β are in m, and with t, r nonnegative integers. The connection between the concept of the matrix factorization and the subject of MCM modules is describes in the following proposition. Proposition 3.11. [Prop. 8.3 in [LW12]] Let (S, m) be a regular local ring and let f be a non-zero element of 2 m and R = S/f S . (a) For every MCM R-module M, there is a matrix factorization (φ, ψ) of f with Cok φ ∼ = M. (b) If (φ, ψ) is a matrix factorization of f , then Cok φ and Cok ψ are MCM R-modules. A non-zero R-module M is decomposable provided there exist nonzero R-modules M1 , M2 such that M = M1 ⊕ M2 ; otherwise M is indecomposable. By ♯(M, R), we mean the maximal rank of a free direct summands of M. If M is an R-module that does not have a direct summand isomorphic to R, we say that M is stable R-module. Furthermore, if R is as in Proposition 3.11, the indecomposable nonfree MCM modules over R and R⋆ can be related in the following situation. Proposition 3.12. [LW12, Theorem 8.30] Let (S, m, K) be a complete regular local ring such that K is algebraically closed of characteristic not 2 and f ∈ m2 r{0}. If R = S/f S and R⋆ := S[[u, v]]/(f +uv), then the association M → M z defines a bijection between the isomorphisms classes of indecomposable non-free MCM modules over R and R⋆ D. Eisenbud has established a relationship between reduced matrix factorizations and stable MCM modules as follows. Proposition 3.13. [Yosh90, Corollary 7.6] [LW12, Theorem 8.7] Let (S, m) be a regular local ring and let f be a non-zero element of m and R = S/f S . Then the association (φ, ψ) 7→ Cok(φ, ψ) yields a bijective correspondence between the set of equivalence classes of reduced matrix factorizations of f and the set of isomorphism classes of stable MCM modules over R . 12 KHALED ALHAZMY AND MORDECHAI KATZMAN One can use this proposition and Remark 3.9 to show the following corollary Corollary 3.14. Let (S, m) be a regular local ring , f ∈ m r {0}, R = S/f S, R⋆ = S[[u, v]]/(f + uv) , and R♯ = S[[z]]/(f + z 2 ) where u, v and z are variables over S . If (φ, ψ) is a matrix factorization of f having the decomposition (φ, ψ) = (α, β) ⊕ (f, 1)t ⊕ (1, f )r such that (α, β) is reduced and t, r are non-negative integers, then : (a) ♯(CokS (φ, ψ), R) = t and ♯(CokS (ψ, φ), R) = r. (b) ♯(CokS[[u,v]] (φ, ψ)z, R⋆ ) = ♯(CokS (φ, ψ), R) + ♯(CokS (ψ, φ), R). (c) ♯(CokS[[z]](φ, ψ)♯ , R♯ ) = ♯(CokS (φ, ψ), R) + ♯(CokS (ψ, φ), R). Lemma 3.15. Let (S, m) be a regular local ring, f ∈ m r {0}, and R = S/f S. If (φ, ψ) is a reduced matrix factorization of f , then (φ, ψ) ∼ [(φ1 , ψ1 ) ⊕ (φ2 , ψ2 ) ⊕ · · · ⊕ (φn , ψn )] where (φi , ψi ) is a reduced matrix factorization of f with CokS (φi , ψi ) is non-free indecomposable MCM R-module for all 1 ≤ i ≤ n. Furthermore, the above representation of (φ, ψ) is unique up to equivalence. Proof. By Proposition 3.13, M := CokS (φ, ψ) is stable MCM Rmodule. We may assume that M = M1 ⊕ · · · ⊕ Mn where Mj is a non-free indecomposable MCM R-module for each j ∈ {1, . . . , n} [BW13, Proposition 2.1]. Again by Proposition 3.13, we have Mj = CokS (φj , ψj ) for some reduced matrix factorization (φj , ψj ) of f for all 1 ≤ j ≤ n. As a result, CokS (φ, ψ) is isomorphic to CokS [(φ1 , ψ1 ) ⊕ (φ2 , ψ2 )⊕· · ·⊕(φn , ψn )] and hence by Remark 3.9(d), (φ, ψ) ∼ [(φ1 , ψ1 )⊕ (φ2 , ψ2 ) ⊕ · · · ⊕ (φn , ψn )]. Now if (φ, ψ) ∼ [(α1 , β1 ) ⊕ (α2 , β2 ) ⊕ · · · ⊕ (αm , βm )] is another representation of (φ, ψ) and Nj = CokS (αj , βj ) where (αj , βj ) is a matrix factorization of f for all 1 ≤ j ≤ m, Ln c then the completion with respect to m yields that i=1 Mi is isoLm b b morphic to j=1 Nj as R-modules. By Krull-Remak-Schmidt theobi for each i. Therefore, ci ∼ rem, n = m and, after renumbering, M =N ∼ Mi = Ni for each i by [BW13, Corollary 3.7] and hence by Remark 3.9(d) (φi , ψi ) ∼ (αi , βi ) for each i.  Proposition 3.16. Let (S, m, K) be a complete regular local ring such that K is algebraically closed of characteristic not 2, and f ∈ m2 r {0}. let R = S/f S and R⋆ := S[[u, v]]/(f + uv). If (φ, ψ) and (α, β) are reduced matrix factorizations of f , then CokS (φ, ψ) is isomorphic to CokS (α, β) over R if and only if CokS[[u,v]] (φ, ψ)z is isomorphic to CokS[[u,v]] (α, β)z over R⋆ FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 13 Proof. The “only if” is obvious by Remark 3.9(d)and (f). Assume that CokS[[u,v]] (φ, ψ)z is isomorphic to CokS[[u,v]] (α, β)z over R⋆ . Using Lemma 3.15 we see that (φ, ψ) ∼ [(φ1 , ψ1 ) ⊕ (φ2 , ψ2 ) ⊕ · · · ⊕ (φn , ψn )] and (α, β) ∼ [(α1 , β1 ) ⊕ (α2 , β2 ) ⊕ · · · ⊕ (αt , βt )] where (φi , ψi ) and (αj , βj ) are reduced matrix factorizations of f satisfying that CokS (φi , ψi ) and CokS (αj , βj ) are non-free indecomposable MCM R-module for all i and j. Remark 3.9 (f),(g) and (c) imply that z CokS[[u,v]] (φ, ψ) = n M CokS[[u,v]] (φj , ψj )z j=1 and z CokS[[u,v]] (α, β) = t M CokS[[u,v]] (αi , βi )z . i=1 Now use Krull-Remak-Schmidit Theorem, Proposition 3.12, L and ReL mark 3.9(d) to obtain that n = t and (φ, ψ) ∼ nj=1(φj , ψj ) ∼ nj=1(αj , βj ) ∼ (α, β) and hence CokS (φ, ψ) is isomorphic to CokS (α, β) as desired.  4. The presentation of F∗e (S/f S) as a cokernel of a Matrix Factorization of f Throughout the rest of this paper, unless otherwise mentioned, we will adopt the following notation: Notation 4.1. K will denote a field of prime characteristic p with [K : K p ] < ∞, and we set q = pe for some e ≥ 1. S will denote the ring K[x1 , . . . , xn ] or (K[[x1 , . . . , xn ]]). If Λ is the basis of K as K p -vector space, then Λe = {λ1 λ2 . . . λe | λj ∈ Λ for all 1 ≤ j ≤ e} is a e basis of K as K p -vector space. We set ∆e := {λxa11 . . . xann | 0 ≤ ai ≤ pe − 1 for all 1 ≤ i ≤ n and λ ∈ Λe } and set re := |∆e | = [K : K p ]e q n Discussion 4.2. It is straightforward to see that {F∗e (j) | j ∈ ∆e } is a basis of F∗e (S) as free S-module. As a result, if f ∈ S and j ∈ ∆e , there exists uniquely a set {f(i,j) ∈ S | i ∈ ∆e } such that F∗e (jf ) = L e i∈∆e f(i,j) F (i). The re × re matrix of relations [f(i,j) ](i,j)∈∆2e is called the matrix of relations of f over S with respect to e and it is denoted by MS (f, e) or M(f, e) if S is known. Example 4.3. Let K be a perfect field of prime characteristic 3 , S = K[x, y] or S = k[[x, y]] and let f = x2 + xy. We aim to construct 14 KHALED ALHAZMY AND MORDECHAI KATZMAN MS (f, 1). Let {F∗1 (1), F∗1 (x), F∗1 (x2 ), F∗1(y), F∗1(yx), F∗1 (yx2 ), F∗1(y 2 ), F∗1 (y 2x), F∗1 (y 2 x2 )} be the ordered basis of F∗1 (S) as S-module. Therefore, MS (f, 1) is the 9×9 matrix whose j-th column consists of the coordinates of F∗e (jf ) with respect to the given basis where F∗e (j) is the j-th element of the above basis. For example, the 8-th column of MS (f, 1) is obtained from F∗1 (y 2xf ) = F∗1 (y 2x3 + x2 y 3 ) = xF∗1 (y 2 ) + yF∗1(x2 ). As a result, it follows that  0 0  1  0  MS (f, 1) = 1  0 0  0 0 x 0 0 0 0 1 0 0 0 0 x 0 x 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 x 0 0 0 0 1 0 0 0 0 x 0 x 0 0 0 y 0 0 0 0 0 0 1  0 yx 0 0  y 0  0 0  0 0  0 0 x 0  0 x 0 0 Remark 4.4. If m ∈ N, then F∗e (f mq j) = f m F∗e (j) for all j ∈ ∆e . This makes MS (f mq , e) = f m I where I is the identity matrix of size re × re . Proposition 4.5. If f, g ∈ S, then (a) MS (f + g, e) = MS (f, e) + MS (g, e), (b) MS (f g, e) = MS (g, e)MS (f, e) and consequently MS (f, e)MS (g, e) = MS (g, e)MS (f, e), and (c) MS (f m , e) = [MS (f, e)]m for all m ≥ 1 e Proof. Since {F∗e (j)|j ∈ ∆ e } is a basis of F∗ (S) as S-module, L L for each e e j ∈ ∆e we write F∗ (jf ) = i∈∆e f(i,j) F∗ (i) and F∗e (jg) = i∈∆e g(i,j)F e (i) where f(i,j) ∈ S and g(i,j) ∈ S for each (i, j) ∈ ∆2e . Therefore F∗e (j(f + g)) = M (f(i,j) + g(i,j) )F∗e (i) i∈∆e and hence MS (f + g, e) = [f(i,j) + g(i,j)] = [f(i,j) ] + [g(i,j)] = MS (f, e) + MS (g, e). Now, if h = f g, for all j ∈ ∆e write F∗e (jf g) = F∗e (jh) = L e 2 e k∈∆e h(k,j) F∗ (k) where h(k,j) ∈ S for each (k, j) ∈ ∆e . Since F∗ (S) is a ring whose multiplication is given by F∗e (a)F∗e (b) = F∗e (ab) for all FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 15 a, b ∈ S, we can write F∗e (jf g) = F∗e (jf )F∗e (g) = = M f(i,j) i∈∆e M M f(i,j) F∗e (ig) i∈∆e g(k,i) F∗e (k) k∈∆e M M g(k,i) f(i,j) )F∗e (k) ( = k∈∆e i∈∆e L 2 This makes h(k,j) = i∈∆e g(k,i) f(i,j) for all (k, j) ∈ ∆e and consequently MS (f g, e) = MS (g, e)MS (f, e) The result (b) now implies that MS (f m , e) = [MS (f, e)]m for all m∈N  According to Remark 4.4 and Proposition 4.5, we get that MS (f k , e)MS (f q−k , e) = MS (f q−k , e)MS (f k , e) = MS (f q , e) = f Iqn for all 0 ≤ k ≤ q − 1. This shows the following result. Proposition 4.6. For every f ∈ S and 0 ≤ k ≤ q − 1, the pair (MS (f k , e), MS (f q−k , e)) is a matrix factorization of f . Discussion 4.7. Let xn+1 be a new variable and let L = S[xn+1 ] if S = K[x1 , . . . , xn ] or (L = S[[xn+1 ]] if S = K[[x1 , . . . , xn ]]). We aim to describe ML (g, e) for some g ∈ L by describing the columns of ML (g, e). First we will construct a basis of the free L-module F∗e (L) using the basis {F∗e (j)|j ∈ ∆e } of the free S-module F∗e (S). For each 0 ≤ v ≤ q − 1, let Bv = {F∗e (jxvn+1 ) | j ∈ ∆e } and set B = B0 ∪ B1 ∪ B2 ∪ · · · ∪ Bq−1 . Therefore B is a basis for F∗e (L) as free L-module and if g ∈ L, we write M (q−1) M (1) M (0) q−1 gi F e (ixn+1 ) gi F e (ix1n+1 ) ⊕ · · · ⊕ gi F e (i) ⊕ F∗e (g) = i∈∆e (s) i∈∆e i∈∆e where {gi | 0 ≤ s ≤ q − 1 and i ∈ ∆e }. For each 0 ≤ s ≤ q − 1 let (s) [F∗e (g)]Bs denote the column whose entries are the coordinates {gi | i ∈ ∆e } of F∗e (g) with respect to Bs . Let [F∗e (g)]B be the re q × 1 column that is composed of the columns [F∗e (g)]B0 , . . . , [F∗e (g)]Bq−1 respectively. Therefore ML (g, e) is the re q ×re q matrix over L whose columns are all s the columns [F∗e (jx  n+1 g)]B where 0 ≤ s ≤ q−1 and j ∈ ∆e . This means that ML (g, e) = C0 . . . Cq−1 where Cm is the re q × re matrix over L whose columns are the columns [F∗e (jxm n+1 g)]B for all j ∈ ∆e . If we define C(k,m) to be the re × re matrix over L whose columns are [F∗e (jxm n+1 g)]Bk for all j ∈ ∆e , then Cm consists of C(0,m) , . . . , C(q−1,m) 16 KHALED ALHAZMY AND MORDECHAI KATZMAN respectively and hence the matrix ML (g, e) is given by :   C(0,0) . . . C(0,q−1)   .. ..  (2) ML (g, e) = C0 . . . Cq−1 =  . . C(q−1,0) . . . C(q−1,q−1) Using the above discussion we can prove the following lemma Lemma 4.8. Let f ∈ S with A = MS (f, e) and let L = S[xn+1 ] if S = K[x1 , . . . , xn ] or (L = S[[xn+1 ]] if S = K[[x1 , . . . xn ]]). If 0 ≤ d ≤ q − 1, then   C(0,0) . . . C(0,q−1) .. ..  (3) ML (f xdn+1 , e) =  . . C(q−1,0) . . . C(q−1,q−1) where C(k,m)   A = xn+1 A  0 if (m, k) ∈ {(d, 0), (d + 1, 1), . . . , (q − 1, q − 1 − d)} if (m, k) ∈ {(0, q − d), (1, q − 1 − d), . . . , (d, q − 1)} otherwise Proof. IfLA = MS (f, e) = [f(i,j) ], for each j ∈ ∆e we can write F∗e (jf ) = i∈∆e f(i,j) F e (i). If g = f xdn+1 , for every 1 ≤ m ≤ q − 1 and L d+m e j ∈ ∆e , it follows that F∗e (jxm n+1 g) = i∈∆e f(i,j) F (ixn+1 ). Therefore, F∗e (jxm n+1 g) = (L f(i,j) F e (ixd+m if d + m ≤ q − 1 n+1 ) d+m−q e ) if d + m > q − 1 i∈∆e xn+1 f(i,j) F (ixn+1 Li∈∆e Accordingly, if m ≤ q − 1 − d, then ( A if k = d + m C(k,m) = 0 if k 6= d + m However, if m > q − 1 − d, it follows that ( xn+1 A if k = d + m − q C(k,m) = 0 if k 6= d + m − q This shows the required result.  Proposition 4.9. Let L = S[xn+1 ] (if S = K[x1 , . . . , xn ])or L = S[[xn+1 ]] (if S = K[[x1 , . . . , xn ]]) . Suppose that g ∈ L is given by g = g0 + g1 xn+1 + g2 x2n+1 + · · · + gd xdn+1 FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 17 where d < q and gk 0 ≤ k ≤ d then  A0 A  1      . ML (g, e) =   ..  A  d    ∈ S for all 0 ≤ k ≤ d . If Ak = MS (gk , e) for each A0 .. . .. . Ad  xn+1 Ad xn+1 Ad−1 . . . xn+1 A1 ..  xn+1 Ad .   ..  .  xn+1 Ad    .. .. . .        Ad Ad−1 Ad−2 ... A0 Proof. By Proposition [4.5], we get ML (g, e) = ML (g0 , e)+ML (g1 xn+1 , e)+ML (g2 x2n+1 , e)+· · ·+ML (gd xdn+1 , e) Applying Lemma 4.8 for ML (gj xjn+1 , e) for all 0 ≤ j ≤ n yields the result.  Example 4.10. Let K be a perfect field of prime characteristic 3 and let S = K[x] or S = K[[x]] . Assume L = S[y] (if S = K[x]) or L = S[[y]] (if S = K[[x]] ). Let f = x2 + xy, f0 = x, and f1 = x2 . By Proposition 4.9 it follows that        MS (f0 , 1) yMS (f1 , 1)  = ML (f, 1) = MS (f1 , 1) MS (f0 , 1)   MS (f1 , 1) MS (f0 , 1)     0 0 1 0 1 0 0 0 0 x 0 0 0 0 1 0 0 0 0 x 0 x 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 x 0 0 0 0 1 0 0 0 0 x 0 x 0 0 Proposition 4.11. Let f ∈ S be a non-zero non-unit element. If R = S/f S, then F∗e (R) is a maximal Cohen-Macaulay R-module isomorphic to CokS (MS (f, e)) as S-modules (and as R-modules). Proof. The first assertion follows from the fact that R is Cohen Macaulay. Write I = f S. Since {F∗e (j) | j ∈ ∆e } is a basis of F∗e (S) as free S-module, the module F∗e (R) is generated as S-module by the set 0 y 0 0 0 0 0 0 1  0 yx 0 0   y 0   0 0   0 0   0 0   x 0  0 x  0 0 18 KHALED ALHAZMY AND MORDECHAI KATZMAN {F∗e (j + I) | j ∈ ∆e }. For every g ∈ S, define φ(F∗e (g)) = F∗e (g + I). It is clear that φ : F∗e (S) −→ F∗e (R) is a surjective homomorphism of S-modules whose kernel is the S-module F∗e (I) that is generated by the set {F∗e (jf ) | j ∈ ∆e }. Now, define the S-linear map ψ : F∗e (S) → F∗e (S) by ψ(F∗e (h)) = F∗e (hf ) for all h ∈ S. We have an exact seψ φ quence F∗e (S) − → F∗e (S) → F∗e (R) − − → 0. Notice for each j ∈ ∆e that L e e ψ(F∗ (j)) = F∗ (jf ) = i∈∆e f(i,j) F e (i) and hence MS (f, e) represents the map ψ on the given free-bases. By Proposition 4.6 and Proposition 3.7(a), it follows that F∗e (R) is isomorphic to CokS (MS (f, e)) as R -modules.  Corollary 4.12. Let f ∈ S be a non-zero non-unit element. If 1 ≤ k ≤ q − 1 and R = S/f S, then (a) F∗e (S/f k S) is a maximal Cohen-Macaulay R-module isomorphic to CokS (MS (f k , e)) as S-modules (and as R-modules), and (b) F∗e (S/f k S) is a maximal Cohen-Macaulay S/f k S -modules isomorphic to CokS (MS (f k , e)) as S-modules (and as S/f k S-modules). Proof. (a) Since the pair (MS (f k , e), MS (f q−k , e)) is a matrix factorization of f , it follows that f CokS (MS (f k , e)) = 0. It is clear that f F∗e (S/f k S) = 0 . This makes F∗e (S/f k S) and CokS (MS (f k , e)) Rmodules and consequently F∗e (S/f k S) is isomorphic to CokS (MS (f k , e)) as R -modules. The result (b) can be proved by observing that (MS (f k , e), MS (f kq−k , e)) is a matrix factorization of f k and applying the same argument as above.  Lemma 4.13. Let K be a field of prime characteristic p > 2 with [K : K p ] < ∞ and let T = S[z] if S = K[x1 , . . . , xn ] ( or T = S[[z]] if S = K[[x1 , . . . , xn ]] ). If A = MS (f, e) for some f ∈ S, then F∗e (T /(f + z 2 )) = CokT " q−1 2 A zI −zI q+1 A 2 # Proof. Let I be the identity matrix in Mre (S). It follows by Proposition 4.9 that MT (f + z 2 , e) is a q × q matrix over the ring Mre (S) that is given by FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 19  A zI 0  0 A zI      I 0 A   2  I 0 A MT (f + z , e) =    .. .. ..   . . .     I 0 A I 0 A " q−1 # 2 A −zI By Corollary 3.2, we get F∗e (T /(f + z 2 )) = CokT q+1 zI A 2   Proposition 4.14. Let u and v be new variables on S and let L = S[u, v] if S = K[x1 , . . . , xn ] ( or L = S[[u, v]] if S = K[[x1 , . . . , xn ]] ). Let R⋆ = L/(f + uv). If A is the matrix MS (f, e) for some f ∈ S and I is the identity matrix in the ring Mre (S), then F∗e (L/(f ⋆ re + uv)) = CokF (ML (f + uv, e)) = (R ) q−1 MM CokL Bj j=1   k A −vI where Bk = for all 1 ≤ k ≤ q − 1. uI Aq−k Proof. Recall that D = {F∗e (jus v t ) | j ∈ ∆e , 0 ≤ s, t ≤ q − 1} is a free basis of F∗e (L) as L-module. We introduce a Z/qZ-grading on both L and F∗e (L) as follows: L is concentrated in degree 0, while deg(F∗e (xi )) = 0 for each 1 ≤ i ≤ n, deg(F∗e (u)) = 1 and deg(F∗e (v)) = Lq−1 −1. We can now write F∗e (L) = k=0 Mk where Mk is the free Le submodule of F∗ (L) of elements of homogeneous degree k, and which is generated by Dk = {F∗e (jus v t ) | deg(F∗e (jus v t )) = k} of the basis D. Note that D0 = {F∗e (jus v s ) | j ∈ ∆e , 0 ≤ s ≤ q − 1}, and that for all 1 ≤ k ≤ q − 1 Dk = {F∗e (juk+r v r ) | j ∈ ∆e , 0 ≤ r ≤ q − k − 1} ∪ {F∗e (jur v q−k+r ) | j ∈ ∆e , 0 ≤ r ≤ k − 1} Let J be the ideal (f + uv)L. Since deg(F∗e (f + uv)) = 0, it follows Lq−1 that F∗e (J) = k=0 Mk F∗e (f + uv) and consequently (4) F∗e (F/(f + uv)) = F∗e (F )/F∗e (J) = q−1 M k=0 Mk /Mk F∗e (f + uv) 20 KHALED ALHAZMY AND MORDECHAI KATZMAN   (−1)q Aq−1 uvI ∼ We now show that = CokL Ck where C0 = I A   (−1)q−k+1 Aq−k vI and Ck = for all 1 ≤ k ≤ q − 1. Recall uI (−1)k+1Ak L that if Ms (f, e) = [f(i,j) ], then F∗e (j) = i∈∆e f(i,j) F∗e (i) for all j ∈ ∆e . So now Mk /Mk F∗e (f +uv) (5) F∗e (jus v t (f + uv)) = F∗e (jf )F∗e (us v t ) + F∗e (jus+1 v t+1 ) M f(i,j) F∗e (ius v t ) ⊕ F∗e (jus+1v t+1 ) = i∈∆e Since deg(F∗e (ius v t )) = deg(F∗e (jus+1v t+1 )) for all i, j ∈ ∆e and all 0 ≤ s, t ≤ q − 1, it follows that F∗e (jus v t (f + uv)) ∈ Mk for all F∗e (jus v t ) ∈ Dk . This enables us to define the homomorphism ψk : Mk → Mk that is given by ψk (F∗e (jus v t )) = F∗e (jus v t (f + uv)) for all F∗e (jus v t ) ∈ Dk and consequently we have the following short exact sequence ψ φ k k Mk −→ Mk −→ Mk /Mk F∗e (f + uv) − →0 where φk : Mk → Mk /Mk F∗e (f + uv) is the canonical surjection. Notice that if 0 ≤ s < q − 1, equation (5) implies that M f(i,j) F∗e (ius v s ) ⊕ F e (jus+1 v s+1) (6) F∗e (jus v s (f + uv)) = i∈∆e and (7) F∗e (juq−1 v q−1 (f + uv)) = M f(i,j) F∗e (iuq−1 v q−1 ) ⊕ uvF∗e (j), i∈∆e   A uvI I A   which is therefore ψ0 is represented by the matrix  . .   .. .. I A a q × q matrix over the ring Mre (L). Now Corollary 3.4 implies that   (−1)q Aq−1 uvI e ∼ (8) M0 /M0 F∗ (f + uv) = CokL = (R⋆ )re I A Now let 1 ≤ k ≤ q − 1. If 0 ≤ r < q − k − 1, then it follows from equation (5) that M f(i,j) F∗e (iuk+r v r ) ⊕ F∗e (juk+r+1v r+1 ) (9) F∗e (juk+r v r (f + uv)) = i∈∆e FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 21 and (10) M f(i,j) F∗e (iuq−1 v q−k−1) ⊕ uF∗e (jv q−k ) F∗e (juq−1 v q−k−1(f + uv)) = i∈∆e However, if 0 ≤ r < k − 1, it follows from (5) that (11) M f(i,j) F∗e (iur v q−k−r ) ⊕ F∗e (jur+1 v q−k−r+1) F∗e (jur v q−k−r (f + uv)) = i∈∆e and (12) F∗e (juk−1v q−1 (f + uv)) = M f(i,j) F∗e (iuk−1 v q−1 ) ⊕ vF∗e (juk ) i∈∆e   A vI  I A    .. ..   . .     I A   As a result, ψk is represented by the matrix   uI A     I A     . . .. ..   I A which is a q × q matrix over the ring Mre (L) where uI is in the (q − k + 1, q − k) spot of this matrix. Therefore, Corollary 3.4 implies that   (−1)q−k+1 Aq−k vI e ∼ Mk /Mk F∗ (f + uv) = CokL uI (−1)k+1 Ak If k is odd integer, we notice that Mk /Mk F∗e (f (13)    −I 0 (−1)q−k+1Aq−k vI ∼ + uv) = CokL ( ) 0 I uI (−1)k+1 Ak  q−k  A −vI ∼ = CokL uI Ak Similar argument when k is even shows that  q−k  A −vI e ∼ (14) Mk /Mk F∗ (f + uv) = CokL uI Ak Now the proposition follows from (4), (8), (13) and (14). We shall need the following corollary later  22 KHALED ALHAZMY AND MORDECHAI KATZMAN Corollary 4.15. Let S = K[[x1 , . . . , xn ]] and let m be the maximal ideal of S. Let R = S/f S where f ∈ m \ {0}. Let R⋆ = S[[u, v]]/(f + uv). If A = MS (f, e), then ♯(F∗e (R⋆ ), R⋆ ) = re + 2 q−1 X ♯(CokS (Ak ), R) k=1 Proof. By Proposition 4.14, it follows that F∗e (R⋆ ) ⋆ re = (R ) q−1 MM CokS[[u,v]] j=1  Ak −vI uI Aq−k  However, For each 1 ≤ k ≤ q − 1 , we notice that   k A −vI CokS[[u,v]] = CokS[[u,v]] (Ak , Aq−k )z uI Aq−k Therefore, by Corollary 3.14 and the convention that CokS (Ak , Aq−k ) = CokS (Ak ) it follows that ♯(F∗e (R⋆ ), R⋆ ) = re + q−1 X ♯(CokS[[u,v]] (Ak , Aq−k )z , R⋆ ) k=1 q−1 X   ♯(CokS (Ak , Aq−k ), R) + ♯(CokS (Aq−k , Ak ), R) = re + k=1 = re + 2 q−1 X ♯(CokS (Ak , Aq−k ), R) k=1 = re + 2 q−1 X ♯(CokS (Ak ), R) k=1  5. When does S[[u, v]]/(f + uv) have finite F-representation type? We keep the same notation as in section 4 unless otherwise stated. The purpose of this section is to provide a characterization of when the ring S[[u, v]]/(f + uv) has finite F-representation type. This characterization enables us of exhibiting a class of rings in section 6 that have FFRT but not finite CM type. FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 23 Proposition 5.1. Let K be an algebraically closed field of prime characteristic p > 2 and q = pe . Let S := K[[x1 , . . . , xn ]] and let m be the maximal ideal of S and f ∈ m2 \ {0}. Let R = S/(f ) and R⋆ = S[[u, v]]/(f + uv). Then R⋆ = S[[u, v]]/(f + uv) has FFRT over R⋆ if and only if there exist indecomposable R-modules N1 , . . . , Nt such that F∗e (S/(f k )) is a direct sums with direct summands taken from N1 , . . . , Nt for every e ∈ N and 1 ≤ k < pe . Proof. First, suppose that R⋆ = S[[u, v]]/(f + uv) has FFRT over R⋆ by {R⋆ , M1 , . . . , Mt , } where Mj is an indecomposable non-free MCM R⋆ -module for all j. By Proposition 3.12 and 3.13, it follows that Mj = CokS[[u,v]] (αj , βj )z where (αj , βj ) is a reduced matrix factorization of f such that CokS (αj , βj ) is non-free indecomposable MCM R-module for all j. Now apply Proposition 4.14 to get that (15) F∗e (S[[u, v]]/(f + uv)) ∼ = (R⋆ )re ⊕ q−1 M CokS[[u,v]](Ak , Aq−k )z k=1 where A = MS (f, e) and Ak = (MS (f, e))k = MS (f k , e) (by Proposition 4.5). By Proposition 3.10 there exist a reduced matrix factorization (φk , ψk ) of f and non-negative integers tk and rk such that (Ak , Aq−k ) ∼ (φk , ψk ) ⊕ (f, 1)tk ⊕ (1, f )rk . This gives by Remark 3.9 (g), (h), and (i) that CokS[[u,v]] (Ak , Aq−k )z = CokS[[u,v]](φk , ψk )z ⊕ [R⋆ ]tk +rk . By Krull-Remak-Schmidt theorem (KRS)[LW12, Corollary 1.10], there exist non-negative integers n(e,k,1) , . . . ., n(e,k,t) such that t t L L n [CokS[[u,v]] (αj , βj )z ]⊕n(e,k,j) Mj (e,k,j) ∼ CokS[[u,v]] (φk , ψk )z ∼ = = j=1 j=1 Lt ⊕n(e,k,j) z ∼ ] . Now, from Proposition 3.16 and Re= CokS[[u,v]] [ j=1 (αj , βj ) Lt mark 3.9 (d) it follows that CokS (φk , ψk ) ∼ = = CokS [ j=1 (αj , βj )⊕n(e,k,j) ] ∼ Lt ⊕n(e,k,j) where Nj = CokS (αj , βj ) for all j ∈ {1, . . . , t} . Therej=1 Nj k e fore, F∗ (S/f S) ∼ = CokS (Ak , Aq−k ) = CokS [(φk , ψk )⊕(f, 1)rk ⊕(1, f )tk ] = L ⊕n Rrk ⊕ tj=1 Nj (e,k,j) . This shows that F∗e (S/(f k )), for every e ∈ N and 1 ≤ k < pe , is a direct sums with direct summands taken from {R, N1 , . . . , Nt }. No suppose F∗e (S/(f k )) is a direct sums with direct summands taken from indecomposable R-modules N1 , . . . , Nt for every e ∈ N and 1 ≤ k < pe . Therefore, for each 1 ≤ k ≤ q − 1, there exist non-negative integers n(e,k) , n(e,k,1), . . . ., n(e,k,t) such that k q−k (16) CokS (A , A )∼ = R⊕n(e,k) ⊕ = F∗e (S/f k S) ∼ t M j=1 ⊕n(e,k,j) Nj over R 24 KHALED ALHAZMY AND MORDECHAI KATZMAN Since F∗e (S/f k S) is a MCM R-module (by Corollary 4.12), it follows that Nj is an indecomposable non-free MCM R-module for each j ∈ {1, . . . , t} and hence by Proposition 3.13 Nj = CokS (αj , βj ) for some reduced matrix factorization (αj , βj ) for all j. If Mj = CokS[[u,v]] (αj , βj )z , t L n it follows that CokS[[u,v]] (Ak , Aq−k )z = (R⋆ )n(e,k) ⊕ Mj (e,k,j) and j=1 hence by Equation 15 R⋆ = S[[u, v]]/(f +uv) has FFRT by {R⋆ , M1 , . . . , Mt }.  The following result is a direct application of the above proposition Corollary 5.2. Let K be an algebraically closed field of prime characteristic p > 2 and q = pe . Let S := K[[x1 , . . . , xn ]] and let m be the maximal ideal of S and f ∈ m2 \ {0}. Let R = S/(f ) and R⋆ = S[[u, v]]/(f + uv). If R⋆ = S[[u, v]]/(f + uv) has FFRT over R⋆ , then S/f k S has FFRT over S/f k S for every positive integer k. The above corollary implies evidently the following. Corollary 5.3. Let K be an algebraically closed field of prime characteristic p > 2 and q = pe . Let S := K[[x1 , . . . , xn ]] and let m be the maximal ideal of S and f ∈ m2 \ {0}. Let R = S/(f ) and R⋆ = S[[u, v]]/(f + uv). If S/f k S does not have FFRT over S/f k S for some positive integer k, then R⋆ does not have FFRT. In particular, if R does not have FFRT , then R⋆ does not have FFRT An easy induction gives the following result. Corollary 5.4. Let K be an algebraically closed field of prime characteristic p > 2 and q = pe . Let S := K[[x1 , . . . , xn ]] and let m be the maximal ideal of S, f ∈ m2 \ {0} and let R = S/(f ). If R does not have FFRT, then the ring S[[u1 , v1 , u2 , v2 , . . . , ut , vt ]]/(f + u1 v1 + u2 v2 + · · · + ut vt ) does not have FFRT for all t ∈ N. 6. A Class of rings that have FFRT but not finite CM type We keep the same notation as in section 4 unless otherwise stated. Recall that, a local ring (R, m) is said to have finite CM representation type if there are only finitely many isomorphism classes of indecomposable MCM R-modules. It is clear that every F-finite local ring (R, m) of prime characteristic that has finite CM representation type has also FFRT. The main result of this section is to provide a class of rings that have FFRT but not finite CM representation type Proposition 6.3. FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 25 If α = (α1 , . . . , αn ) ∈ Z+ n , we write xα = xα1 1 . . . xαnn where x1 , . . . , xn are different variables. Lemma 6.1. Let f = xd11 xd22 . . . xdnn be a monomial in S where dj ∈ Z+ for each j. Let Γ = {(α1 , . . . , αn ) ∈ Z+ n | 0 ≤ αj ≤ dj for all 1 ≤ j ≤ n} , d = (d1 , . . . , dn ), and let e be a positive integer such that q = pe > max{d1 , . . . , dn } + 1. If A = MS (f, e), then for each 1 ≤ k ≤ q − 1 the matrix Ak = MS (f k , e) is equivalent to diagonal matrix, D, of size re × re in which the diagonal entries are of the form xc where c ∈ Γ. Furthermore, if c = (c1 , . . . , cn ) ∈ Γ and ( q − |cj q − kdj | if |cj q − kdj | < q ηk (cj ) = 0 otherwise then CokS (Aq , Aq−k ) = Qn M ⊕η (c) CokS (xc , xd−c ) k c∈Γ where ηk (c) = [K : K ] j=1 ηk (cj ) with the convention that M ⊕0 = {0} for any module M and (xc , xd−c ) is the 1 × 1 matrix factorization of f . q Proof. Choose e ∈ N such that q = pe > max{d1 , . . . , dn } + 1 and let 1 ≤ k ≤ q − 1. If j = λxβ1 1 . . . xβnn ∈ ∆e , we get F∗e (jf k ) = F∗e (λx1kd1 +β1 . . . xnkdn +βn ). Since dj , k ∈ {0, . . . , q − 1}, there exist 0 ≤ ci ≤ d and 0 ≤ ui ≤ q−1 for each 1 ≤ i ≤ n such that di k+βi = ci q+ui and hence F∗e (jf k ) = xc11 . . . xcnn F∗e (λxu1 1 . . . xunn ). Therefore each column and each row of MS (f k , e) contains only one non-zero element of the form xc11 . . . xcnn where 0 ≤ ci ≤ d for all 1 ≤ i ≤ n. Accordingly, using the row and column operations, the matrix MS (f k , e) is equivalent to a diagonal matrix, D, of size re × re in which the diagonal entries are of the form xc11 . . . xcnn where 0 ≤ ci ≤ d for all 1 ≤ i ≤ n. Now fix c = (c1 , . . . , cn ) ∈ Γ and let η(c) stand for how many times xc appears as an element in the diagonal of D. It is obvious that η(c) is exactly the same as the number of the n-tuples (α1 , . . . , αn ) with 0 ≤ αj ≤ q − 1 satisfying that (17) 1 +α1 F∗e (λxkd . . . xnkdn +αn ) = xc11 . . . xcnn F∗e (λxs11 . . . xsnn ) 1 where s1 , .., sn ∈ {0, . . . , q − 1} for all λ ∈ Λe . However, an n-tuple (α1 , . . . , αn ) with 0 ≤ αj ≤ q − 1 will satisfy (17) if and only if αj = cj q − kdj + sj for some 0 ≤ sj ≤ q − 1 whenever 1 ≤ j ≤ n. As a result, the n-tuples (α1 , . . . , αn ) ∈ Zn will satisfy (17) if and only if |cj q − kdj | < q for all 1 ≤ j ≤ n. Indeed, for 1 ≤ j ≤ n, set uj = cj q − kdj . If 0 ≤ uj < q, we can choose αj ∈ {uj , uj + 1, . . . , q − 1}. On the other hand, if −q < uj < 0, then αj can be taken from 26 KHALED ALHAZMY AND MORDECHAI KATZMAN {q − 1 + uj , q − 2 + uj , . . . , −uj + uj }. Therefore, if 0 ≤ |cj q − kdj | < q, then αj can be chosen by q − |cj q − kdj | ways. Set ( q − |cj q − kdj | if |cj q − kdj | < q ηk (cj ) = 0 otherwise Q Thus we get that ηk (c) = [K : K q ] nj=1 ηk (cj ). Now if Γ̃ = {c ∈ Γ | ηk (c) > 0}, it follows that M ⊕η (c) ⊕η (c) M  CokS (xc , xd−c ) k CokS (Aq , Aq−k ) = CokS (xc , xd−c ) k = c∈Γ c∈Γ̃  Corollary 6.2. Let K be an algebraically closed field of prime characteristic p > 2 and q = pe . Let S := K[[x1 , . . . , xn ]] and f = xd11 xd22 . . . xdnn where dj ∈ N for each j . Then R⋆ = S[[u, v]]/(f + uv) has FFRT over R⋆ . Furthermore, for every e ∈ N with q = pe > max{d1 , . . . , dn } + 1, F∗e (R⋆ ) has the following decomposition: # " q−1 M M M   n ⊕η (c) CokS[[u,v]] (xc , xd−c )z k F∗e (R⋆ ) = (R⋆ )q k=1 c∈Γ where ηk (c) and Γ as in the above lemma. Proof. Let e ∈ N with q = pe > max{d1 , . . . , dn } + 1 and let 1 ≤ k ≤ q − 1. Let Γ and ηk (c) be as in the above lemma. If A = MS (f, e), it follows that M ⊕η (c) CokS (xc , xd−c ) k F e (S/f k ) ∼ = CokS (Ak , Aq−k ) ∼ = ∗ c∈Γ c d−c j If M = {CokS (x , x ) | c ∈ Γ}∪{F (S/f i ) | pj ≤ max{d1 , . . . , dn } and 0 ≤ i ≤ pj }, then F∗e (S/(f k )) is a direct sums with direct summands taken from the finite set M for every e ∈ N and 1 ≤ k < pe . By Proposition 5.1 R⋆ has FFRT. Furthermore, we can describe explicitly the direct summands of e F∗ (R⋆ ). Indeed, if Γ̂ := {c ∈ Γ | ηk (c) > 0 and c ∈ / {d, 0}}, it follows that M M M (Ak , Aq−k ) ∼ (xc , xd−c )⊕ηk (c) (xd , 1)⊕ηk (d) (1, xd )⊕ηk (0) c∈Γ̂ Recall by Remark 3.9 that (Ak , Aq−k )z is a matrix factorization of f + uv and M ⊕η (c) M  d z ⊕ηk (d) M  ⊕η (0) (Ak , Aq−k )z ∼ (xc , xd−c )z k (x , 1) (1, xd )z k c∈Γ̂ FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 27 Therefore CokS[[u,v]] (Ak , Aq−k )z = M ⊕η (c) M  ⊕η (d) CokS[[u,v]] (xc , xd−c )z k CokS[[u,v]] (xd , 1)z k c∈Γ̂ M ⊕η (0) CokS[[u,v]] (1, xd )z k By Proposition 4.14, the above equation, and the convention that M ⊕0 = {0}, we can write # " q−1 M M M   n ⊕η (c) CokS[[u,v]] (xc , xd−c )z k F∗e (S[[u, v]]/(f +uv)) = (R⋆ )q k=1 c∈Γ  We will take benefit from the proof of Corollary 6.2 above when we compute the F -signature in section 9. The fact that the hypersurface in Corollary 6.2 has FFRT can be also proved differently in the following proof. Proof. Let Q+ and Z+ denote the sets of non-negative elements of Q and Z respectively. Let B be the (n + 1) × (n + 2) matrix over Z that is given by   1 d1 0  1 0 d2   .. ..  .. B= . . .     1 0 dn  0 1 −1 where d1 , . . . , dn are positive integers and let bj denote the j-th column of B. Consider the semigroup homomorphism π : Zn+2 → Zn+1 that is + given by   β n+2 1 X π(β) = Bβ = βi bi for each β =  ...  ∈ Zn+2 + i=1 βn+2 Pn+2 The image of π is the monoid Z+ B = { i=1 βi bi | β1 , . . . , βn+2 ∈ Z+ }. It is straightforward to see that 0 is the only unit in the monoid P Z+ B and Z+ B = Zn+1 ∩Q+ B where Q+ B = { n+2 i=1 βi bi | β1 , . . . , βn+2 ∈ Q+ }. This proves that Z+ B is a positive normal affine monoid and consequently there exists m ∈ Z+ and a subgroup U of Zm such that Z+ B is isomorphic to Zm + ∩U [BG09, Theorem 2.29]. Therefore, K[Z+ B] is a direct K[Z+ B]-summand of K[Zm + ] [BH93, Excercise 6.1.10] or [Bru07, Theorem 1.6]. Defining a relation ∼ on Zn+2 by α ∼ β if π(α) = π(β) + for every α, β ∈ Zn+2 makes ∼ a congruence on the semigroup Zn+2 + + and hence the semigroups S/ ∼ and Z+ B are isomorphic. However, 28 KHALED ALHAZMY AND MORDECHAI KATZMAN K[S/ ∼] is isomorphic to K[x1 , . . . , xn , u, v]/IB ( see [Gil84, Corollary 7.3]) where IB is the ideal of K[x1 , . . . , xn , u, v] generated by { n Y i=1 n Y xαi i uαn+1 v αn+1 − xβi i uβn+1 v βn+1 | n X i=1 i=1 αi bi = n X βi bi where αi , βi ∈ Z+ } i=1 It is straightforward to check that IB is generated only by f −uv and consequently K[x1 , . . . , xn , u, v]/(f −uv) is a direct K[x1 , . . . , xn , u, v]/(f − m uv)-summand of K[Zm + ]. Since K[Z+ ] is isomorphic to K[x1 , . . . , xm ] that has FFRT, then the ring S[u, v]/(f + uv) has FFRT ( [SV97, Proposition 3.1.6]) and hence S[[u, v]]/(f + uv) has FFRT (Remark 2.2).  If (S, n) is a regular local ring, and R = S/(g), where 0 6= g ∈ n2 , then R is a simple singularity (relative to the presentation R = S/(g)) provided there are only finitely many ideals L of S such that g ∈ L2 [LW12, Definition 9.1]. Proposition 6.3. Let K be an algebraically closed field with char(k) 6= 0, 2, 3, 5, and let S = K[[x1 , . . . , xk ]] where k ≥ 2. If f ∈ S is a monomial of degree grater than 3 and R⋆ = S[[u, v]]/(f + uv), then R⋆ has FFRT but it does not have finite CM representation type. Proof. Let t be the degree of the monomial f and let m be the maximal ideal of S. Clearly, t is the largest natural number satisfying f ∈ mt − mt+1 and consequently the multiplicity e(R) of the ring R is e(R) = t (by [LW12, Corollary A.24 page 435] ). Since e(R) = t > 3 , R is not a simple singularity [LW12, Lemma 9.3] . Therefore, by [LW12, Theorem 9.8] R does not have finite CM type. Consequently, by Proposition 3.12, R⋆ does not have finite CM type as well. However, Corollary 6.2 implies that R⋆ has FFRT.  7. The F-signature of S[[u,v]] f +uv when f is a monomial We will keep the same notation as in notation 4.1 unless otherwise stated. Notation 7.1. Let ∆ = {1, . . . , n} and let d, d1, . . . , dn be real numbers. For every 1 ≤ s ≤ n − 1, define Y X dj )] Ws(n) = [(d − dj1 ) . . . (d − djs )( j1 ,...,js ∈∆ j∈∆\{j1 ,...,js } FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 29 Wn(n) = n Y (n) (d − di ) and W0 = i=1 n Y di i=1 According to the above notation, we can observe the following remark (n) Remark 7.2. If n ≥ 2, then Wj every 1 ≤ j ≤ n − 1 (n−1) = (d − dn )Wj−1 (n−1) + dn Wj for The following lemma is needed to prove Proposition 7.4 Lemma 7.3. If r , q, dj and uj are real numbers for all 1 ≤ j ≤ n, then n n n−1 Y X q(d − dj ) q j (n) n−j X (n) (dj r + gc (q)r c + uj ) = Wj r + j d d j=1 j=0 c=0 (n) where gc (q) is a polynomial in q of degree n − 1 − c for all 0 ≤ c ≤ n − 1. Proof. By induction on n, we will prove this lemma. It is clear when n = 1. The induction hypothesis implies that n+1 Y q(d − dj ) + uj ) = A + B + C d (dj r + j=1 where A = dn+1 r n X n Y q(d − dj ) + uj ) (dj r + d j=1 n−1 X q j (n) = dn+1 j Wj r n−j+1 + dn+1 gc(n) (q)r c+1 d c=0 j=0 n q(d − dj ) q(d − dn+1 ) Y (dj r + + uj ) B = d d j=1 = n X n−1 (d − dn+1 ) j=0 q j+1 (n) n−j X q(d − dn+1 ) (n) W r + gc (q)r c dj+1 j d c=0 n Y q(d − dj ) + uj ) C = un+1 (dj r + d j=1 n X n−1 X q j (n) un+1gc(n) (q)r c = un+1 j Wj r n−j + d c=0 j=0 30 KHALED ALHAZMY AND MORDECHAI KATZMAN P P j j+1 (n) (n) If D = nj=0 dn+1 dq j Wj r n−j+1 and E = nj=0 (d − dn+1 ) dq j+1 Wj r n−j , it follows that n X q j (n) (n) D + E = dn+1W0 r n+1 + dn+1 j Wj r n−j+1 d j=1 + n−1 X (d − dn+1 ) j=0 = (n) dn+1W0 r n+1 + q j+1 (n) n−j q n+1 (n) W r + (d − d ) W n+1 dj+1 j dn+1 n n X dn+1 j=1 + n X (d − dn+1 ) j=1 (n) = dn+1W0 r n+1 + q j (n) n−j+1 W r dj j q j (n) n−j+1 q n+1 (n) W r + (d − d ) W n+1 dj j−1 dn+1 n n X qj j=1 dj (n) [dn+1Wj (n) + (d − dn+1)Wj−1 ]r n−j+1 n+1 q W (n) dn+1 n Now apply Remark 7.2 to get that +(d − dn+1 ) (18) D+E = n+1 j X q j=0 dj (n+1) n+1−j Wj r Now define (n) (n) gn(n+1) (q) = dn+1 gn−1 (q) + un+1W0 , (n+1) g0 q qn (n) (n) (q) = (d − dn+1 )g0 (q) + un+1 n Wn(n) + un+1g0 (q), d d and (n+1) gj (q) = q(d (n) dn+1 gj−1(q)+ − dn+1 ) (n) q n−j (n) (n) gj (q)+un+1 n−j Wn−j +un+1 gj (q) d d for every 1 ≤ j ≤ n − 1. (n+1) Notice that gj (q) is a polynomial in q of degree n − j for all (n) 0 ≤ j ≤ n because gc (q) is a polynomial in q of degree n − 1 − c for all 0 ≤ c ≤ n − 1 It is easy to verify that n−1 X c=0 dn+1 gc(n) (q)r c+1 + n−1 X q(d − dn+1 ) c=0 d gc(n) (q)r c + C = n X c=0 gc(n+1) (q)r c , FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 31 and hence n n+1 X Y q(d − dj ) + uj ) = A + B + C = E + D + gc(n+1) (q)r c (dj r + d c=0 j=1 = n+1 j X q j=0 d (n+1) n+1−j Wj r j + n X gc(n+1) (q)r c c=0  Proposition 7.4. Let f = xd11 . . . xdnn be a monomial in S = K[[x1 , . . . , xn ]] where dj is a positive integer for each 1 ≤ j ≤ n. If d = max{d1 , . . . , dn } and R⋆ = S[[u, v]]/(f + uv), then the F-signature of R⋆ is given by (19) S(R⋆ ) = 2 dn+1 (n) " d1 d2 . . . dn + n+1 (n) W1 n (n) Ws (n) W +···+ + · · · + n−1 n−s+1 2 # (n) where W1 , . . . , Wn−1 are defined as in the notation 7.1. Proof. Let R = S/f S and R⋆ = S[[u, v]]/(f + uv). Set [K : K p ] = b and recall from the notation 4.1 that Λe is the basis of K as K q -vector space where q = pe . We know from Corollary 4.15 that (20) ♯(F∗e (R⋆ ), R⋆ ) = re + 2 q−1 X ♯(CokS (Ak ), R) k=1 where re = be q n , A = MS (f, e) and Ak = MS (f k , e). Since f k is a monomial, it follows from Lemma 6.1 that the matrix Ak = MS (f k , e) is equivalent to a diagonal matrix D whose diagonal entries are taken from the set {xu1 1 . . . xunn |0 ≤ uj ≤ dj for all 1 ≤ j ≤ n}. This makes CokS (Ak ) = CokS (D) and consequently the number ♯(CokS (Ak ), R) is exactly the same as the number of the n-tuples (α1 , . . . , αn ) with 0 ≤ αj ≤ q − 1 satisfying that (21) 1 +α1 n +αn ) = xd11 . . . xdnn F∗e (λxs11 . . . xsnn ) F∗e (λxkd . . . xkd n 1 where s1 , .., sn ∈ {0, . . . , q − 1} for all λ ∈ Λe . However, an n-tuple (α1 , . . . , αn ) with 0 ≤ αj ≤ q − 1 will satisfy (21) if and only if αj = dj (q − k) + sj for some 0 ≤ sj ≤ q − 1 for each 1 ≤ j ≤ n. As a result, the n-tuples (α1 , . . . , αn ) ∈ Zn will satisfy (21) if and only if dj (q −k) ≤ αj < q for all 1 ≤ j ≤ n. Set Nj (k) := {αj ∈ Z | dj (q − k) ≤ αj < q} for all 1 ≤ j ≤ n. Therefore, (22) ♯(CokS (Ak ), R) = be |N1 (k)||N2 (k)| . . . |Nn (k)| 32 KHALED ALHAZMY AND MORDECHAI KATZMAN Since |Nj (k)| = q − dj q + dj k for all 1 ≤ j ≤ n, it follows that k (23) e ♯(CokS (A ), R) = b n Y (q − dj q + dj k) j=1 Let d = max{d1 , . . . , dn }, then ♯(CokS (Ak ), R) 6= 0 if and only if < k. Let q = du + t Nj (k) 6= 0 for all 1 ≤ j ≤ n if and only if q(d−1) d where t ∈ {0, .., d − 1}. If t 6= 0, then one can easily verify that q(d − 1) q−t q(d − 1) <q− < +1 d d d (24) Therefore, +r | r ∈ {0, . . . , q−t −1}}. ♯(CokS (Ak ), R) 6= 0 if and only if k ∈ {q − q−t d d q(d−1) q However, if t = 0, it follows that d = q − d ∈ Z and consequently ♯(CokS (Ak ), R) 6= 0 if and only if k ∈ {q − dq + r | r ∈ {1, . . . , dq − 1}} Assume now that t 6= 0. This implies that q−1 X ♯(CokS (Ak ), R) = be q−1 n Y X (q − dj q + dj k) j=1 k=q− q−t d k=1 q−t −1 d n X Y q−t = b )) (q − dj q + dj (r + q − d r=0 j=1 e q−t −1 d n X Y q(d − dj ) dj t (dj r + = b + ) d d r=0 j=1 e Recall by Lemma 7.3 that (25) n n n−1 Y X q(d − dj ) dj t q j (n) n−j X (n) (dj r + + )= W r + gc (q)r c j j d d d c=0 j=1 j=0 (n) where gc (q) is a polynomial in q of degree n − 1 − c for all 0 ≤ c ≤ −1. By Faulhaber’s formula [CG96], if s is a positive n−1. Set δ = q−t d integer, we get the following polynomial in δ of degree s + 1 (26)   s 1 X j s+1 Bj δ s+1−j r = (−1) j s + 1 r=1 j=0 δ X s FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 33 where Bj are Bernoulli numbers, B0 = 1 and B1 = δ X (27) rs = r=0 −1 . 2 This makes q s+1 + Vs (q) (s + 1)ds+1 where Vs (q) is a polynomial of degree s in q. From Faulhaber’s formula and the equations (25), and (27), we get that q−1 X δ X n n−1 X q j (n) n−j X (n) [ ♯(CokS (A ), R) = b Wj r + gc (q)r c ] j d r=0 j=0 c=0 k=1 k e n δ n−1 δ X q j (n) X n−j X (n) X c = b[ W r + gc (q) r] dj j r=0 c=0 r=0 j=0 e n X q n−j+1 q j (n) W ( + Vn−j (q)) = b[ dj j (n − j + 1)dn−j+1 j=0 e + n−1 X gc(n) (q)( c=0 q c+1 + Vc (q))] (c + 1)dc+1 (n) n n X be q n+1 X Wj e +b [ Vn−j (q) = dn+1 j=0 n − j + 1 j=0 + n−1 X c=0 Pn−1 Pn X q c+1 g (n) (q)Vc (q)] + (c + 1)dc+1 c=0 c n−1 gc(n) (q) Pn−1 (n) (n) q c+1 Since j=0 Vn−j (q) and c=0 gc (q) (c+1)d c+1 + c=0 gc (q)Vc (q) are e polynomials in q = p of degree n and n − 1 respectively, it follows that lim e→∞ 1 e be pe(n+1) b[ n X Vn−j (q)+ n−1 X c=0 j=0 gc(n) (q) n−1 X q c+1 + g (n) (q)Vc (q)] = 0 (c + 1)dc+1 c=0 c Therefore lim e→∞ 1 be pe(n+1) q−1 X k=1 ♯(CokS (Ak ), R) = n 1 X dn+1 j=0 (n) Wj n−j+1 By equation (20) and the above equation we conclude that the Fsignature of the ring R⋆ is given by (n) (n) (n) Wn−1 i Ws 2 h d1 d2 . . . dn W1 + +· · ·+ +· · ·+ (28) S(R ) = n+1 d n+1 n n−s+1 2 ⋆ 34 KHALED ALHAZMY AND MORDECHAI KATZMAN q(d−1) d q d ∈ Z and consequently q q ♯(CokS (Ak ), R) 6= 0 ⇔ k ∈ {q − + r | r ∈ {1, . . . , − 1}} d d Therefore q−1 q−1 n X X Y k e ♯(CokS (A ), R) = b (q − dj q + dj k) Second if q = du, then =q− k=q− dq +1 j=1 k=1 q = be −1 n d X Y q (q − dj q + dj (r + q − )) d r=1 j=1 q = be −1 n d X Y r=1 j=1 (dj r + q(d − dj ) ) d By an argument similar to the above argument, we conclude the same result that (29) S(R⋆ ) = (n) (n) (n) Wn−1 i Ws 2 h d1 d2 . . . dn W1 + +· · ·+ +· · ·+ dn+1 n+1 n n−s+1 2  8. The F-signature of S[[z]] (f +z 2 ) when f is a monomial We will keep the same notation as in notation 4.1 unless otherwise stated. Proposition 8.1. Let f = xd11 . . . xdnn be a monomial in S = K[[x1 , . . . , xn ]] where dj is a positive integer for each 1 ≤ j ≤ n and K is a field of prime characteristic p > 2 with [K : K p ] < ∞. Let R = S/f S and R♯ = S[[z]]/(f + z 2 ). It follows that: 1 1) If dj = 1 for each 1 ≤ j ≤ n, then S(S[[z]]/(f + z 2 )) = 2n−1 . 2 2) If d = max{d1 , . . . , dn } ≥ 2, then S(S[[z]]/(f + z )) = 0. Proof. Set [K : K p ] = b and recall from the notation 4.1 that Λe is the basis of K as K q -vector space. We know by lemma 4.13 that " q−1 # 2 A −zI F∗e (R♯ ) = CokS[[z]] where A = MS (f, e) q+1 zI A 2 It follows from Corollary 3.14 that (30) ♯(F∗e (R♯ ), R♯ ) = ♯(CokS (A q−1 2 ), R) + ♯(CokS (A q+1 2 ), R) FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 35 , q+1 } and set Nj (k) := {αj ∈ Z | dj (q − k) ≤ αj < q} for Let k ∈ { q−1 2 2 all 1 ≤ j ≤ n. Using the same argument that was previously used in the proof of Proposition 7.4, it follows that (31) n Y ♯(CokS (Ak ), R) = be |N1 (k)||N2 (k)| . . . |Nn (k)| = be (q − dj q + dj k) j=1 Now if d1 = d2 = · · · = dn = 1, it follows from equation (31) that ♯(CokS (Ak ), R) = be k n for k ∈ { q−1 , q+1 }. Therefore, the equation (30) 2 2 implies that q−1 n q+1 n (32) ♯(F∗e (R♯ ), R♯ ) = be [( ) +( ) ] 2 2 and consequently 1 S(R♯ ) = lim ♯(F∗e (R♯ ), R♯ )/be pen = n−1 e→∞ 2 Now let di = max{d1 , . . . , dn } for some 1 ≤ i ≤ n. First assume that , it follows that di (q − k) > q and consequently di = 2. If k = q−1 2 |Ni (k)| = 0. The equation (31) implies ♯(CokS (Ak ), R) = 0. When k = q+1 , we get that di (q−k) = q−1 and consequently Ni (k) = {q−1} 2 and dj = 1 , it which makes |Ni (k)| = 1. Notice that when k = q+1 2 q+1 q+1 follows that |Nj (k)| = 2 . As a result, if k = 2 , we conclude that ♯(CokS (Ak ), R) = be |N1 (k)||N2 (k)| . . . |Nn (k)| ≤ be ( q + 1 n−1 ) 2 Therefore, ♯(F∗e (R♯ ), R♯ ) = ♯(CokS (A q−1 2 ), R) + ♯(CokS (A q+1 2 ), R) ≤ be ( q + 1 n−1 ) 2 As a result, S(R♯ ) = lim ♯(F∗e (R♯ ), R♯ )/be pen = 0 e→∞ Second assume that di > 2. In this case, for every k ∈ { q−1 , q+1 }, it 2 2 follows that di (q − k) > q and consequently |Ni (k)| = 0. Therefore ♯(F∗e (R♯ ), R♯ ) = ♯(CokS (A q−1 2 ), R) + ♯(CokS (A q+1 2 and consequently S(R♯ ) = lim ♯(F∗e (R♯ ), R♯ )/be pen = 0 e→∞ ), R) = 0 36 KHALED ALHAZMY AND MORDECHAI KATZMAN Notice that when d = max{d1 , . . . , dn } > 2, we can prove that S(R♯ ) = 0 using Fedder’s Criteria [Fed83, Proposition 1.7]. Indeed, let m be the maximal ideal of S[[z]] and let R♯ = S[[z]]/(f + z 2 ). If d = max{d1 , . . . , dn } > 2, then (f + z 2 )q−1 ∈ m[q] which makes, by Fedder’s Criteria, ♯(F∗e (R♯ ), R♯ ) = 0 for all e ∈ Z+ . This means clearly that S(R♯ ) = lim ♯(F∗e (R♯ ), R♯ )/be pen = 0 e→∞  References [AL03] I. M. Aberbach and G. J. Leuschke: The F-signature and strong Fregularity, Math. Res. Lett. 10 (2003), 5156. 2 [BH93] W. Bruns and J. Herzog: Cohen-Macaulay Rings, vol. 39, Cambridge studies in advanced mathematics, 1993. 27 [Bru07] W. Bruns: Commutative Algebra Arising from the Anand-Dumir-Gupta Conjectures, Proc. Int. Conf. - Commutative Algebra and Combinatorics No. 4, 2007, pp. 1-38. 27 [BG09] W. Bruns and J. Gubeladze: Polytopes, rings, and K-theory, Springer 2009. 27 [BW13] N.R. Baeth and R. Wiegand: Factorization theory and decomposition of modules, Amer. Math. Monthly 120 (2013), no. 1, 3-34. 12 [CG96] J.H. Conway and R.K. Guy: The Book of Numbers. New York, NY: Copernicus, 1996. pp. 106-110. 32 [DQ16] H. Dao and H. Q. Quy: On the associated primes of local cohomology, arXiv:1602.00421. 1 [Eis80] D. Eisenbud: Homological algebra on a complete intersection, with an application to group representations, Transactions of the AMS 260 (1980), 3564. 9 [EP15] D. Eisenbud and I. Peeva: Matrix factorizations for complete intersections and minimal free resolutions. arXiv:1306.2615 9 [Fed83] R. Fedder: F-purity and rational singularity, Trans. Amer. Math. Soc. 278 (1983) 461480 36 [Gil84] R. Gilmer: Commutative Semigroup Rings. U. Chicago Press (1984). 28 [HL02] C. Huneke and G. Leuschke: Two theorems about maximal CohenMacaulay modules, Math. Ann. 324 (2002), no. 2, 391404. 2 [KSSZ13] M. Katzman, K. Schwede, A. K. Singh, and W. Zhang: Rings of Frobenius operators, Math. Proc. Cambridge Philos. Soc. 157 (2014), no. 1, 151–167. 1 [LR74] L. S. Levy and J. C. Robson: Matrices and pairs of modules, J. Algebra 29 (1974), 427-454. 8 [LW12] G. Leuschke and R. Wiegand: Cohen-Macaulay Representations, American Mathematical Society, Providence, RI, 2012. 9, 11, 23, 28 [Mat86] H. Matsumura: Commutative Ring Theory, Cambridge Studies in Adv. Math. 8, Cambridge University Press, Cambridge, 1986. 8 [Sei97] G. Seibert: The Hilbert-Kunz function of rings of finite Cohen-Macaulay type, Arch. Math. 69 (1997), 286-296. 1 FFRT PROPERTIES OF HYPERSURFACES AND THEIR F -SIGNATURES 37 [SV97] K. Smith, and M. Van den Bergh: Simplicity of rings of differential operators in prime characteristic, Proc. London Math. Soc. (3) 75 (1997), no. 1, 32-62. 1, 28 [Shi11] T. Shibuta: One-dimensional rings of finite F-representation type, Journal of Algebra, 15 April 2011, Vol. 332(1), pp. 434–441 3 [TT08] S. Takagi,and R. Takahashi: D-modules over rings with finite Frepresentation type Math. Res. Lett. 15 (2008), no. 3. 563-581. 3 [Tu12] K. Tucker: F-signature exists, Invent. Math. 190 (2012), no. 3, 743-765. 2 [Yosh90] Y. Yoshino: Cohen-Macaulay modules over Cohen-Macaulay rings, London Mathematical Society Lecture Note Series, vol. 146, Cambridge University Press, Cambridge, 1990. 11 [Yao05] Y. Yao: Modules with finite F-representation type, J. London Math. Soc. (2) 72 (2005), no. 1, 53-72 1, 3 [Yao06] Y.Yao: Observations on the F-signature of local rings of characteristic p, J. Algebra 299 (2006), no. 1, 198-218. 2 E-mail address: [email protected] School of Mathematics, University of Sheffield, Hicks Building, Sheffield S3 7RH, United Kingdom E-mail address: [email protected] School of Mathematics, University of Sheffield, Hicks Building, Sheffield S3 7RH, United Kingdom
0math.AC
INTEGRATING MULTIPLE RANDOM SKETCHES FOR SINGULAR VALUE DECOMPOSITION TING-LI CHEN∗ , DAWEI D. CHANG† , SU-YUN HUANG∗ , HUNG CHEN† , CHIENYAO arXiv:1608.08285v1 [math.NA] 29 Aug 2016 LIN∗ , AND WEICHUNG WANG† Abstract. The singular value decomposition (SVD) of large-scale matrices is a key tool in data analytics and scientific computing. The rapid growth in the size of matrices further increases the need for developing efficient large-scale SVD algorithms. Randomized SVD based on one-time sketching has been studied, and its potential has been demonstrated for computing a low-rank SVD. Instead of exploring different single random sketching techniques, we propose a Monte Carlo type integrated SVD algorithm based on multiple random sketches. The proposed integration algorithm takes multiple random sketches and then integrates the results obtained from the multiple sketched subspaces. So that the integrated SVD can achieve higher accuracy and lower stochastic variations. The main component of the integration is an optimization problem with a matrix Stiefel manifold constraint. The optimization problem is solved using Kolmogorov-Nagumo-type averages. Our theoretical analyses show that the singular vectors can be induced by population averaging and ensure the consistencies between the computed and true subspaces and singular vectors. Statistical analysis further proves a strong Law of Large Numbers and gives a rate of convergence by the Central Limit Theorem. Preliminary numerical results suggest that the proposed integrated SVD algorithm is promising. Key words. low-rank singular value decomposition, randomized algorithm, integration of multiple random sketches, Stiefel manifold, Kolmogorov-Nagumo-type average, consistency of singular vectors. AMS subject classifications. 65F15, 65C60, 68W20 1. Introduction. Singular value decomposition (SVD) of a matrix has been an essential tool in various theoretical studies and practical applications for decades. SVD has been studied in the fields of numerical linear algebra, applied mathematics, statistics, computer sciences, data analytics, physical sciences, engineering, and others. Its applications include imaging, medicine, social networks, signal processing, machine learning, information compression, and finance, just to name a few. In this article, we focus on low-rank SVD of a matrix, rather than the full SVD, which is sufficient in many scenarios. We concern the rank-k SVD of a given m × n real matrix A = U ΣV ⊤ ≈ Uk Σk Vk⊤ , (1.1) where U ΣV ⊤ is the full SVD and Uk Σk Vk⊤ is the truncated rank-k SVD. The columns of Uk and Vk are the k leading left and right singular vectors of A, respectively. The diagonal entries of Σk are the k largest singular values of A. The role of SVD in all types of applications remains vivid in the current big data era. However, as the size of data matrices generated or collected from simulations, experiments, detections, and observations continues to increase quickly, it is becoming a challenge to compute SVD for large matrices. Randomized algorithms have been proposed and studied recently to find a rank-k SVD of a large matrix. Such algorithms randomly project or sample from the underlying matrix A to obtain a reduced matrix in a low-dimensional subspace. SVD ∗ Institute of Statistical Science, Academia Sinica, Taipei 115, Taiwan ([email protected], [email protected], [email protected]) † Institute of Applied Mathematical Sciences, National Taiwan University, Taipei 106, Taiwan ([email protected], [email protected], send correspondence to [email protected]) 1 of this reduced matrix in low dimensions is performed and then mapped back to the original space to obtain an approximate SVD of A. Several survey papers have reviewed the algorithms, computed error bounds, and numerical experiments in detail [4, 10, 14, 15, 25, 30]. Randomized SVD algorithms have been not only investigated theoretically but also used to solve problems such as large data set analysis [8], overdetermined least squares [18], partial differential equations [19], and inverse problems [27]. Randomized SVD is also used to solve linear system problems [20, 26] or act as a preconditioner [2, 3, 6, 7, 16]. Randomized SVD implementations built on top of MATLAB [21], parallel computers [1, 10, 29], and emerging architectures, such as GPUs [28], have appeared and continue to be improved. Randomized SVD algorithms use a single random sketch and have demonstrated their advantages in various situations. In this article, we enhance randomized-type SVD by proposing a randomized SVD that integrates results obtained from multiple random sketches such that the integrated rank-k SVD can achieve higher accuracy and less stochastic variations. Our discussion and analysis of this new algorithm include the following. • We introduce a new way to compute rank-k SVD based on multiple random sketches in Algorithm 2. Then, we develop two equivalent optimization problems (Theorem 2.2) with the Stiefel manifold constraint to integrate multiple subspace information sources from multiple random sketches. The proposed algorithm can be viewed as a Monte Carlo method that randomly samples many subspaces with an integration procedure based on averaging. • To integrate the results obtained using multiple sketches, we propose Algorithm 3 to solve the constrained optimization problem iteratively and analyze its convergence behavior. In each iteration, the algorithm moves the current iterate using Kolmogorov-Nagumo-type averaging on top of the Stiefel manifold. The approach is motivated by averaging the independently identically distributed (i.i.d.) results from multiple sketches. • The algorithm is analyzed statistically. In a key argument shown in Theorem 2.1, we assert that singular vectors can be induced by population averaging. This key theorem connects the two subspaces formed by the integration process and by the true singular vectors. Furthermore, based on this key theorem, we are able to prove the consistencies in terms of the subspace and singular vectors, the strong Law of Large Numbers, and the Central Limit Theorem for convergence rate. • The numerical results, such as Figure 5.1, suggest that the integrated SVD can achieve higher accuracy and less stochastic variations using multiple random sketches. This paper is organized as follows. We introduce the integrated SVD algorithm in Section 2, followed by a detailed discussion regarding how we integrate the multiple sketched results in Section 3. We analyze the algorithm statistically in Section 4. We present numerical results in Section 5. Finally, we conclude the paper in Section 6. For the notations, we use lowercase letters or Greek letters for scalars (e.g., m, n, and τ ), bold face letters for vectors (e.g., x and u), and bold face uppercase letters or bold face Greek letters for matrices (e.g., A and Ω). We use k · ksp and k · kF to denote the matrix spectral norm and the matrix Frobenius norm, respectively. Table 1.1 summarizes the notations used in this article. We assume m ≤ n here; however, all the algorithms and theoretical results can be applied to other cases. 2 m, n k p ℓ q N A = U ΣV ⊤ A ≈ Uk Σk Vk⊤ e k Ve ⊤ ek Σ A≈U k b k Vb ⊤ bk Σ A≈U k Ω Ω[i] , i = 1 : N Q[i] , i = 1 : N Q P Sr,c TQ Sr,c Qc Q+ Q, W X F (Q) GF (Q) DF (Q) ϕQ ϕ−1 Q Row and column dimensions of a matrix A with the assumption m ≤ n Desired rank of approximate SVD Oversampling parameter Dimension of randomized sketches, i.e., ℓ = (k + p) ≪ n Exponent of the power method in Step 2 of Algorithms 1 and 2 Number of random sketches in Algorithm 2 An m × n matrix and its SVD Rank-k SVD defined in (1.1) Rank-k SVD defined in (2.1) and computed by Algorithm 1 (rSVD) Rank-k SVD defined in (2.2) and computed by Algorithm 2 (iSVD) A Gaussian random projection matrix in Algorithm 1 The ith Gaussian random projection matrix in Algorithm 2 The ith orthonormal basis of the sketched subspace in Algorithm 2 The integrated orthonormal basis of the sketched subspace The average of Q[i] Q⊤ [i] defined in (2.6) (P is simply for notation usage. It is not for computational purposes.) Matrix Stiefel manifold Sr,c := W ∈ Rr×c : W ⊤ W = Ic and r ≥ c Tangent space of Sr,c at Q The current iterate for computing Q in Algorithms 3 The updated iterate for computing Q in Algorithms 3 Points located on the matrix Stiefel manifold A point located on a tangent space The objective function defined in (2.7) for computing Q Gradient of the objective function F (Q) Projected gradient onto the tangent space TQ Sm,ℓ A lifting map to the tangent space in terms of Q A (specified version of) retraction map to the Stiefel manifold (ϕQ and ϕ−1 Q are associated with the Kolmogorov-Nagumo-type average.) Table 1.1: Notations used in this article. 2. Singular Value Decomposition via Multiple Random Sketches. Randomized algorithms have been proposed to compute an approximate rank-k SVD for matrices arising in various applications [10, 14, 25, 30]. The main idea of these algorithms is to (i) randomly project the matrix to a low-dimensional subspace, (ii) compute the SVD in this random subspace, and (iii) map this subspace SVD back to the original high-dimensional space. If the random sketch can capture most of the information regarding the largest k singular values and singular vectors, these algorithms can obtain satisfactory approximate rank-k SVDs. We briefly review these randomized SVDs in Section 2.1. To improve these randomized SVD algorithms based on a single sketch, it is natural to ask how we can find a better random subspace. Instead of exploring different single random sketching techniques, we propose a Monte Carlo integration method based on multiple random sketches in Section 2.2. The key idea is to repeat the process of random sketching multiple times. The multiple low-dimensional subspaces are then integrated. Based on this integrated subspace, we compute a rank-k approximate SVD accordingly. By taking multiple random sketches, the resulting integrated 3 SVD is expected to have higher accuracy and smaller stochastic variation. On the other hand, the multiple sketches can be performed on parallel computers to reduce the execution time. Furthermore, the aforementioned multiple sketches lead to multiple low-dimensional random subspaces. We present an optimal representation of the multiple subspaces in Section 2.3, which is defined by a constrained optimization problem. 2.1. Single Random Sketch. Algorithm 1 is a common procedure for randomized SVD (rSVD) [9, 17] used to compute a rank-k approximate SVD e k Ve ⊤ . ek Σ A≈U k (2.1) The algorithm includes the following steps. Step 1. The algorithm first generates a random matrix Ω ∈ Rn×ℓ . Step 2. The random matrix Ω is used to map the matrix A to a low-dimensional subspace by Y = (AA⊤ )q AΩ. The qth power of the matrix AA⊤ is applied here to improve the accuracy for the slow decay singular values [9, 24]. Step 3. Compute an orthonormal basis of Y by, e.g., QR factorization or SVD so that the matrix Q spans the randomized column subspace of AΩ. Steps 4 and 5. A smaller scale ℓ×n SVD and a matrix multiplication are performed to compute the SVD of the projected matrix in the column space of Q. These e ℓ Ve ⊤ . eℓ Σ two steps are equivalent to the operation QQ⊤ A = U ℓ e e e Step 6. Because the matrices Uℓ , Σℓ , and Vℓ contain over-sampled singular vectors and singular values, we extract the largest rank-k approximate SVD including ek , Σ e k , and Vek from these matrices. U Algorithm 1 Randomized SVD with a single sketch (rSVD). Require: A (real m × n matrix), k (desired rank of approximate SVD), p (oversampling parameter), ℓ = k +p (dimension of the sketched column space), q (exponent of the power method) e k Ve ⊤ ek Σ Ensure: Approximate rank-k SVD of A ≈ U k 1: Generate an n × ℓ random matrix Ω 2: Assign Y ← (AA⊤ )q AΩ 3: Compute Q whose columns are an orthonormal basis of Y e ℓ Ve ⊤ fℓ Σ 4: Compute the SVD of Q⊤ A = W ℓ eℓ ← QW fℓ 5: Assign U eℓ , Σ e ℓ , Veℓ to obtain U ek , Σ e k , Vek in (2.1) 6: Extract the largest k singular-pairs from U 2.2. Multiple Random Sketches. The rSVD (Algorithm 1) maps the matrix A onto a low-dimensional subspace using a single random sketch. We extend the rSVD by proposing an integrated singular value decomposition (iSVD), which uses multiple sketches. The procedure of iSVD is outlined in Algorithm 2. In addition to those input parameters listed in rSVD, the proposed iSVD (Algorithm 2) takes an extra parameter: the number of random sketches N . In return, iSVD outputs the integrated approximate rank-k SVD b k Vb ⊤ . bk Σ A≈U k (2.2) In Steps 1, 2, and 3 of Algorithm 2, iSVD performs multiple sketches by repeating the sketching process described in the first three steps of the rSVD algorithm N 4 Algorithm 2 Integrated SVD with multiple sketches (iSVD). Require: A (real m × n matrix), k (desired rank of approximate SVD), p (oversampling parameter), ℓ = k +p (dimension of the sketched column space), q (exponent of the power method), N (number of random sketches) b k Vb ⊤ bk Σ Ensure: Approximate rank-k SVD of A ≈ U k 1: Generate n × ℓ random matrices Ω[i] for i = 1, . . . , N 2: Assign Y[i] ← (AA⊤ )q AΩ[i] for i = 1, ..., N (in parallel) 3: Compute Q[i] whose columns are an orthonormal basis of Y[i] (in parallel) 4: Integrate Q ← {Q[i] }N i=1 (by Algorithm 3) ⊤ b ℓ Vb ⊤ cℓ Σ 5: Compute the SVD of Q A = W ℓ bℓ ← QW cℓ 6: Assign U bℓ , Σ b ℓ , Vbℓ to obtain U bk , Σ b k , Vbk in (2.2) 7: Extract the largest k singular pairs from U times. In Step 4, the multiple orthonormal basis matrices Q[i] are integrated. Using the integrated orthonormal basis matrix Q, we can obtain an approximate SVD by Steps 5, 6, and 7. Note that, in Step 1 of the two algorithms, we consider Gaussian random projection matrices Ω in rSVD and Ω[i] in iSVD. Either Ω or Ω[i] is an n × ℓ random matrix whereby each of the entries is i.i.d. standard Gaussian. The matrix AΩ (or AΩ[i] ) is a random mapping from Rm×n to a low-dimensional subspace Y (or Y[i] ) ∈ Rm×ℓ with ℓ ≪ n. Furthermore, each of the columns in AΩ (or AΩ[i] ) is a linear combination of the columns of A with random Gaussian mixing coefficients. We use a simple example to illustrate the ideas of iSVD. Let A = diag([25, 5, 1]) be a diagonal 3 × 3 matrix. We have the (true) SVD of A = U ΣU ⊤ , where U is the 3 × 3 identify matrix and Σ = diag([25, 5, 1]). As shown in Parts (a) and (b) of Figure 2.1, we randomly project A onto R3×1 by letting Ω[i] ∈ R3×1 with q = 0 and N = 2, 5. The bases of the projected subspaces Q[i] ∈ R3×1 are shown by the green vectors, and the integrated basis Q is shown as the red vector. It is clear that the Q corresponding to N = 5 is more close to the first singular vector [1, 0, 0]. Consequently, we can obtain b k Vb ⊤ by iSVD over the subspace Q. In Parts (c) and (d), bk Σ more accurate SVD U k we show similar results obtained by letting Ω[i] ∈ R3×2 . The Q is more close to the 2-dimensional subspace spanned by the first two singular vectors [1, 0, 0] and [0, 1, 0] using larger N . We have proposed the iSVD algorithm based on multiple random sketches in Section 2.2. Obviously, the key component of iSVD is the integration process in Step 4 of Algorithm 2. This is the focus of the next section. 2.3. An Optimal Representation of the Multiple Projected Subspaces. The integration process in Step 4 of Algorithm 2 finds a matrix Q that “best” represents the matrices Q[i] for i = 1, . . . , N . In other words, because each Q[i] contains the orthonormal basis of the randomly projected subspace Y[i] , the process intends to integrate these N randomly projected subspaces into a single subspace spanned by the columns of Q. Consequently, this integrated subspace contains as much information of the leading left singular vectors as possible. Then, in Steps 5 and 6 of ⊤ Algorithm 2, we compute the SVD in Q Q A, which is the low-dimensional projection of A onto the subspace spanned by the columns of Q. In particular, we define 5 (a) Q[i] ∈ R3×1 (k = ℓ = 1) and N = 2. (b) Q[i] ∈ R3×1 (k = ℓ = 1) and N = 5. (c) Q[i] ∈ R3×2 (k = ℓ = 2) and N = 2. (d) Q[i] ∈ R3×2 (k = ℓ = 2) and N = 5. Fig. 2.1: The orthonormal bases of randomly projected 1-dimensional subspaces Q[i] , i = 1, . . . , N , are plotted (in green) for (a) N = 2 and (b) N = 5. The basis of the integrated subspace Q (in red) is closer to the first singular vector [1, 0, 0] for N = 5. Similar plots on 2-dimensional subspaces are plotted for (c) N = 2 and (d) N = 5. The 2-dimensional subspace spanned by Q is closer to the subspace spanned by the first two singular vectors for N = 5. such best representation Q by solving the following optimization problem: Q := argmin N X Q∈Sm,ℓ i=1 ⊤ Q[i] Q⊤ [i] − QQ 2 F . (2.3) The matrix Q is constrained on the matrix Stiefel manifold because the columns of Q form the orthonormal basis of the integrated subspace. Next, we justify this definition of the Q from the viewpoints of geometry and stochastic expectation. At first glance, we can This definition of Q has its geometrical Pmotivations. N average the Q[i] by computing Qave = N1 i=1 Q[i] and then orthonormalize the columns of Qave to obtain an average representation of Q[i] . However, this simple averaging scheme can be misguided. For example, let Q[1] = [q1 , q2 ] and Q[2] = [q2 , q1 ] be two equivalent matrices with respect to an orthogonal transformation. The simple averaging schemes suggests that Qave = 21 [q1 + q2 , q1 + q2 ], which is rank deficient. Fortunately, we observe that the equivalence of Q[1] and Q[2] can be ⊤ revealed by the equation Q[1] Q⊤ [1] = Q[2] Q[2] . On the other hand, in general, any orthogonal transformation on the right-hand side of Q[i] can be represented by Q[i] R, where R is an orthogonal matrix. The fact that (Q[i] R)(Q[i] R)⊤ = Q[i] Q⊤ [i] suggests that the matrices Q[i] and Q[i] R are equivalent in the sense that they span the same column subspace. These geometric observations partially motivate us to define the integrated orthonormal matrix Q shown in (2.3). 6 Furthermore, we emphasize another important reason why we focus on the projection matrices Q[i] Q⊤ [i] by presenting the following key Theorem 2.1. The theorem suggests that the population average of the projection matrices E(Q[i] Q⊤ [i] ) can reveal the true left singular vectors of A. Furthermore, in Section 4, we will apply Theorem 2.1 to show the Strong Law of Large Numbers, the consistency of the singular vectors, and the Central Limit Theorem for iSVD. The proof of Theorem 2.1 can be found in Appendix A.1. Theorem 2.1 (Singular vectors induced by population averaging). Let Q[i] be the orthonormal basis of the ith random subspace computed by Algorithm 2 with Ω[i] having i.i.d. Gaussian entries. At the population level, the expected arithmetic mean of these projection matrices has the property of having the same left singular vectors as the matrix A. Specifically, ⊤ E(Q[i] Q⊤ [i] ) = U ΛU . (2.4) Here, U consists of left singular vectors of A, as shown in (1.1). For Λ defined in (A.1), we can show that (a) Λ is a diagonal matrix, (b) each of the diagonal entries belongs to (0, 1), and (c) these diagonal entries are strictly decreasing if the underlying matrix A has strictly decreasing singular values. It is worth noting that we can regard E(Q[i] Q⊤ [i] ) as the limiting case of taking an average over infinitely many projection matrices: E(Q[i] Q⊤ [i] ) = limN →∞ P , where P := N 1 X Q[i] Q⊤ [i] N i=1 (2.5) is the empirical arithmetic average of the N projection matrices. The theorem suggests the following essential property. Even a projection matrix Q[i] Q⊤ [i] is associated with a low-dimensional (rank-ℓ) subspace only, the arithmetic average P contains not only information of the leading rank-ℓ subspace but also information for other subspaces spanned by all true singular vectors if the number of random sketches N is sufficiently large. Furthermore, because the entries of Λ are strictly decreasing, the columns of U match the left singular vectors in a correct order. The following example illustrates the property given in Theorem 2.1. Let A = diag([25, 5, 1, 0.2]) be a diagonal 4 × 4 matrix. Then, we have the true SVD of A = U ΣU ⊤ , where U is the 4 × 4 identify matrix and Σ = diag([25, 5, 1, 0.2]). By computing the SVD of P ∈ R4×4 with a set of Q[i] ∈ R4×2 (i.e., the dimension of the random sketches ℓ = 2), we obtain the following estimations of     −1.00  −.021 U ≈ .004 .009 .021 −.998 .046 −.044 −.004 −.044 −.998 −.038 −1.00 .010 −.046   .020 and  −.002 −.036  .004 .998 −.020 −1.00 .003 −.009 .002 −.003 −1.00 −.001 .004 −.009  , −.001  1.00 for N = 10 and N = 100, respectively. The corresponding estimations of Λ ≈ diag([.997, .848, .149, .006]) and diag([.992, .819, .177, .012]). The approximate U for N = 100 is much closer to the whole true U even though the dimension of the random sketches is 2, rather than the dimension of the matrix, which is 4. Although Equation (2.4) reveals important insight into the average of the Q[i] Q⊤ [i] , the equation has its limits from the perspective of numerical computation. First, we cannot compute the true singular values Σ and the right singular vectors V using 7 Equation (2.4). Second, the diagonal entries of Λ are clustered in the interval (0, 1), and such clustering may affect the accuracy of the computed U . These difficulties can be overcome by considering another optimization problem shown in Theorem 2.2. In Theorem 2.2, we present two alternative optimization problems that are equivalent to the optimization problem (2.3). The first equivalent optimization problem is shown in (2.6). In this formulation, we apply the concept of (2.4) to compute Q. The second equivalent formulation is shown in (2.7), which is defined by a differentiable objective function. We will develop an algorithm to solve this problem in Section 3. This decision is based on the following two reasons. The dimension of Q[i] Q⊤ [i] in (2.6) ⊤ (m × m) can be much larger then the dimension of the matrix Q P Q in (2.7) (ℓ × ℓ). Furthermore, the objective function F (Q) is differentiable, which allows us to develop algorithms to solve the optimization problem based on the gradient of F (Q). The proof of Theorem 2.2 can be found in Appendix A.2. Theorem 2.2 (Equivalent optimization problems). The minimization problem (2.3) is equivalent to the following two optimization problems: (i) Q := argmin P − QQ⊤ Q∈Sm,ℓ 2 F (2.6) and (ii) Q := argmax F (Q), (2.7) Q∈Sm,ℓ  where P is defined in (2.5) and F (Q) = 12 tr Q⊤ P Q is a differential function. These equivalences are up to an orthogonal matrix multiplied on the right-hand side of Q. In short, in Step 4 of Algorithm 2, we need to integrate the orthogonal matrices Q[i] into one orthogonal matrix Q ∈ Rm×ℓ that “best” represents these matrices. We propose using the particular Q defined by the Stiefel-manifold-constrained optimization problem (2.7). In the next section, we will discuss how we compute Q by an iterative method based on the Kolmogorov-Nagumo-type average. In Section 4, we will prove that this optimal representation Q converges to the best rank-ℓ approximation with probability one when the number of sketches N tends to infinity. 3. Integration of Sketched Subspaces. The goal of this section is to develop an iterative method based on a Kolmogorov-Nagumo-type average to compute Q by solving the constrained optimization (2.7). We start the development of the integration algorithm by introducing some background in Section 3.1. This background includes the Kolmogorov-Nagumo-type average of sample points on a matrix Stiefel manifold and derives the gradients of the objective function. Because a KolmogorovNagumo-type average is defined by a lifting map and a corresponding retraction map, we derive a particular lifting and retraction map pair that can be applied to solve the constrained optimization (2.7) in Sections 3.2 and 3.3. Based on the lifting and retraction maps, we propose the integration algorithm in Section 3.4. The convergence analysis and some remarks on the algorithm are given in Section 3.5. 3.1. Background. We introduce the Kolmogorov-Nagumo-type average and derive the gradient of the objective function that will be used to integrate the sketched subspaces by solving the optimization problem (2.7). First, we introduce the Kolmogorov-Nagumo-type average. Taking an average is the most commonly used summary statistic for independently and identically distributed (i.i.d.) data. The orthogonal matrices {Q[i] }N i=1 from repeated runs of 8 random sketches are independently obtained from a common stochastic randomization mechanism and thus are i.i.d. The integration of multiple random sketches can be seen as an “average” of these orthogonal matrices. However, it is no longer in the traditional sense of taking an average in a Euclidean space; rather, it is a Kolmogorov-Nagumo-type average defined in (3.1). A Kolmogorov-Nagumo-type average of {µi }N i=1 is defined as ! N X 1 µKN = ϕ−1 ϕ(µi ) , (3.1) N i=1 where ϕ is a continuous and locally one-to-one lifting map and ϕ−1 is the paired retraction map. Note that the traditional arithmetic average can be defined by letting ϕ and ϕ−1 be the identity maps, and the geometric average of positive numbers can be defined by letting ϕ be the logarithm function and ϕ−1 be the exponential function. In our integration algorithm, we consider the case in which µi = Q[i] and use the notation ϕQ and ϕ−1 Q to emphasize that the lifting and retraction maps depend on a given Q ∈ Sm,ℓ . In the next two sections, we derive a lifting map ϕQ : Sm,ℓ → TQ Sm,ℓ and its corresponding retraction map ϕ−1 Q : TQ Sm,ℓ → Sm,ℓ , which satisfy certain properties for solving the optimization problem (2.7). Various Kolmogorov-Nagumotype averages of sample points on a Stiefel manifold can be found in [5, 11]. Second, we address the (projected) gradient of F (Q). Many optimization schemes, including the scheme to be proposed in Section 3, require the derivatives of the objective function. Theorem 2.2 has asserted that (2.3) is equivalent to the problem (2.7) with a differentiable objective function F (Q). We further present Theorem 3.1 to show how we can compute the gradient ascent direction of F (Q) at a certain Q ∈ Rm×ℓ by (3.2) and show how we can project the gradient ascent direction to the tangent space of Sm,ℓ at Q (denoted as TQ Sm,ℓ ), as shown in (3.3). See Appendix A.3 for the proof of Theorem 3.1. Theorem 3.1. Let GF (Q) denote the gradient (the usual derivative in the Euclidean space) of F (Q) with respect to Q ∈ Rm×ℓ , and let DF (Q) denote the projected gradient of GF (Q) onto the tangent space TQ Sm,ℓ . We have   ∂F (Q) (3.2) = P Q ∈ Rm×ℓ , GF (Q) := ∂Q where P is defined in (2.5), and DF (Q) := ΠTQ GF (Q) = (Im − QQ⊤ )GF (Q), (3.3) where ΠTQ is the projection from Rm×ℓ to TQ Sm,ℓ . 3.2. The Lifting Map. For a given Q ∈ Sm,ℓ , we define the lifting map ϕQ (W ) = (Im − Q Q⊤ )W W ⊤ Q : Sm,ℓ → TQ Sm,ℓ (3.4) for any W ∈ Sm,ℓ . Our definition of ϕ leads to an important property: N 1 X ϕQc (Q[i] ) = DF (Qc ), N i=1 (3.5) where Qc denotes the current iterate. Specifically, the average of the mapped points ϕQc (Q[i] ) on the tangent space of the current iterate is simply the projected gradient 9 at this current iterate. This property links the Kolmogorov-Nagumo-type average to the gradient ascent method for the optimal representation in (2.3) and its equivalent formulation in (2.7). If the projected gradient DF (Qc ) is zero (or numerically close to zero), then Qc has reached a stationary point for the optimization problem (2.7). If it is not zero, we search for the next iterate along the path Q(τ ) := ϕ−1 Qc (τ DF (Qc )) on the manifold, where τ > 0 is a step size. In the Kolmogorov-Nagumo-type average, we take τ = 1 for simplicity. Because ϕQc is only locally one to one, we need to specify a version of the retraction map ϕ−1 Qc to pull points on TQc Sm,ℓ back to Sm,ℓ . Below, we discuss the derivation of a proper version of ϕ−1 Qc . 3.3. The Retraction Map. Next, we derive the corresponding retraction map ϕ−1 Q : TQ Sm,ℓ → Sm,ℓ . For W ∈ Sm,ℓ , we can express it as W = QC + Q⊥ B, where ⊤ Q⊤ ⊥ Q⊥ = Im−ℓ and Q Q⊥ = 0. Without loss of generality, we may assume that C is symmetric. If not, we can find an orthogonal matrix R such that CR is symmetric. Because (W R)(W R)⊤ = W W ⊤ for any orthogonal matrix R, we treat W and W R as equivalent. Next, we present two lemmas that will be used in deriving ϕ−1 Q (X), where X ∈ TQ Sm,ℓ . The proofs are given in Appendices A.4 and A.5. Lemma 3.2. For a given Q ∈ Sm,ℓ , we have the following properties. (a) The matrix I4ℓ − ϕQ (W )⊤ ϕQ (W ) is non-negative definite for any arbitrary W ∈ Sm,ℓ . PN (b) Let X = N1 i=1 ϕQ (Q[i] ). Then, I4ℓ − X ⊤ X is non-negative definite. Lemma 3.3. For a given X ∈ TQ Sm,ℓ that satisfies the conditions Q⊤ X = 0 and − X ⊤ X being non-negative definite, there exists a W ∈ Sm,ℓ such that ϕQ (W ) = X. Furthermore, if W is restricted to the column span of Q and X, i.e., Iℓ 4 W ∈ {W ∈ Sm,ℓ : W = QC + XB, C symmetric}, then, up to an orthogonal transformation on the right side, W has to take the following n 1/2 o1/2 and the matrix form W = QC + XC −1 , where C = I2ℓ + I4ℓ − X ⊤ X square root is defined in Appendix A.6. Because the matrix square root is not unique, Lemma 3.3 presents many possible choices of W as a pre-image for X such that ϕQ (W ) = X. Here, we will confine the matrix square root involved in C to be symmetric and non-negative definite so −1 that the inverse map ϕ−1 is uniquely specified. Furthermore, Q (X) = QC + XC Iℓ if X ∈ TQ Sm,ℓ satisfies the condition that 4 − X ⊤ X is non-negative definite, then Iℓ ⊤ 4 − (τ X )(τ X) is also non-negative definite for any τ ∈ [0, 1]. Thus, we can extend Lemma 3.3 to obtain a unique path on the manifold, wherein all matrix square roots involved are taken to be symmetric and non-negative definite. Theorem 3.4 (Retraction Map). For a given X ∈ TQ Sm,ℓ that satisfies the conditions Q⊤ X = 0 and I4ℓ − X ⊤ X being non-negative definite, there exists a path Q(τ ) ∈ Sm,ℓ for τ ∈ [0, 1] such that ϕQ (Q(τ )) = τ X and the retraction map is given by −1 ϕ−1 , Q (τ X) = QC + τ XC (3.6) where C=  1/2 Iℓ  Iℓ + − τ 2X⊤X 2 4 1/2 with all matrix square roots taken to be symmetric and non-negative definite. 10 (3.7) 3.4. The Integration Algorithm. Now, we are ready to propose Algorithm 3, which solves the optimization problem (2.7) to find Q by iteratively updating the Kolmogorov-Nagumo-type averages. The inputs of Algorithm 3 are the matrices {Q[i] }N i=1 ∈ Sm,ℓ and an initial iterate Qini . The output of the algorithm is the (approximate) integrated Q defined in (2.7). Algorithm 3 Integration of {Q[i] }N i=1 based on the Kolmogorov-Nagumo-type average. Require: Q[1] , Q[2] , . . ., Q[N ] , Qini Ensure: Integrated Q defined in (2.7) 1: Initialize the current iterate Qc ← Qini 2: while (not convergent) do 3: Compute ϕQc (Q[i] ) defined in (3.9) by lifting and averaging   ϕ 4: Perform the retraction mapping ϕ−1 (Q ) to obtain Q+ defined in (3.10) Q [i] c Qc 5: 6: 7: Assign Qc ← Q+ end while Output Q = Qc More details of the algorithm are given below. For the choice of the initial iterate e [i] ) from the collection Qini , we select the iterate that has the largest value of tr(Σ e {Q[i] }N i=1 , where Σ[i] is the diagonal matrix consisting of the singular values of Y[i] computed in Step 2 of Algorithm 2. Specifically, we choose Qini = Q[imax ] , where e [i] ). In each iteration, namely Steps 3 and 4 of Algorithm 3, imax = argmaxi=1,...,N tr(Σ we move the current iterate Qc to the next iterate Q+ via the following procedure. One iteration of the integration Algorithm 3 is illustrated conceptually in Figure 3.1. In particular, Step 3 of Algorithm 3 is composed of the following two tasks. 1. As shown in Figure 3.1(a), we map (or lift) the matrices {Q[i] }N i=1 to the tangent space TQc Sm,ℓ . That is, each Q[i] ∈ Sm,ℓ is mapped to ⊤ ϕQc (Q[i] ) = (Im − Qc Q⊤ c )Q[i] Q[i] Qc ∈ TSm,ℓ ,Qc . (3.8) ⊤ Because Q⊤ c {ϕQc (Q[i] )} + {ϕQc (Q[i] )} Qc = 0, we know that ϕQc (Q[i] ) is indeed a point on TQc Sm,ℓ [22]. 2. As shown in Figure 3.1(b), we then take the average of the mapped matrix points. Because these mapped matrices are located on TQc Sm,ℓ , which is a flat space, we can compute the arithmetic average of ϕQc (Q[i] ) N 1 X ϕQc (Q[i] ) = (Im − Qc Q⊤ ϕQc (Q[i] ) = c )P Qc . N i=1 (3.9) In (3.9), we apply (3.8) and the definition of P in (2.6). This average is still on the tangent space. Furthermore, ϕQc (Q[i] ) = DF (Qc ) by (3.5). In Step 4, as shown in Figure 3.1(c), we pull the averaged matrix ϕQc (Q[i] ) back to the Stiefel manifold by the inverse map ϕ−1 Qc . Specifically, −1 (ϕQc (Q[i] )) = Qc C + ϕQc (Q[i] )C −1 , Q+ = ϕQ c 11 (3.10) (a) (b) (c) (d) Fig. 3.1: A conceptual illustration of one iteration of Algorithm 3 for solving the optimization problem (2.7). (a) Five Q[i] (blue dots) on the Stiefel manifold Sm,ℓ are lifted to ϕQc (Q[i] Q⊤ [i] ) on the tangent space TQc Sm,ℓ corresponding to the current iterate Qc (black dot). (b) We compute the KN-type average of the lifted points, which is identified by the green point. (c) The average of the lifted points (green dot) is mapped back to the Q+ (red dot) on the Stiefel manifold as the next iterate. (d) We have moved from Qc to Q+ and obtained the new Qc . where C =  Iℓ 2 + h Iℓ 4 i1/2 1/2 ⊤ − ϕQc (Q[i] ) ϕQc (Q[i] ) by Theorem 3.4 with fixed τ = 1. In short, we move the iterate from Qc to Q+ in the loop of Algorithm 3 by the following procedure. (i) Q[i] are mapped to TQc Sm,ℓ by ϕQc , (ii) the mapped matrices are averaged as ϕQc (Q[i] ) = DF (Qc ), and finally, (iii) DF (Qc ) is mapped back to Q+ . This process can the manifold by the inverse map ϕ−1 Qc toobtain the next iterate  P N 1 be summarized in one line: Q+ ← ϕ−1 Qc N i=1 ϕQc (Q[i] ) . 12 3.5. Convergence and Remarks. Algorithm 3 is a fixed-point iteration with step size τ = 1. The update from the current Qc to the next Q+ can be written as Q+ = g(Qc ) = Qc C + XC −1 , (3.11) where C and X both depend on Qc and can be denoted as C(Qc ) and X(Qc ), respectively. Recall that Algorithm 3 is used to find the maximizer of the objective function  F (Q) = 21 tr Q⊤ P Q . Let Q∗ consist of the leading ℓ eigenvectors of P . Specifically, Q∗ consists of the maximizer (uniquely up to an orthogonal transformation) of the objective function F (Q). Further, let Nε (Q∗ ) := {Q ∈ Sm,ℓ : kQ − Q∗ kF < ε} be an ε-neighborhood of Q∗ in Sm,ℓ . We can see that Q∗ is a fixed point for g in (3.11). We establish the convergence for the fixed-point iteration in Theorem 3.5. The theorem suggests that Algorithm 3 converges if it starts from an initial iterate that belongs the ε-neighborhood of an equivalent version of Q∗ . The equivalence is in the sense of an orthogonal transformation multiplied on the right side of Q∗ . The proof of Theorem 3.5 is given in Appendix A.8. Theorem 3.5. There exists an ε > 0 such that Algorithm 3 converges, provided that the iteration starts from an initial Qini ∈ Nε (Q∗ R0 ), where R0 is an arbitrary orthogonal matrix. We conclude the discussion of Algorithm 3 with the following remarks. First, we bridge the theoretical aspect of the optimal representation Q and the numerical scheme shown in Algorithm 3. Because Q is the solution of the optimization problem (2.7), we have DF (Q) = 0. Equation (3.5) further suggests that PN 1 i=1 ϕQ (Q[i] ) = 0. Moreover, by the definition (3.1), we can obtain the KolmogorovN Nagumo-type average of Q[i] in terms of Q: ! N 1 X −1 −1 (0) = Q. (3.12) ϕQ ϕ (Q[i] ) = ϕQ N i=1 Q The last equality holds because of the following. For X = 0, Equation (3.7) suggests that C = Iℓ , (3.13) −1 and Equation (3.6) further suggests that ϕQ (0) = Q. Equation (3.12) indicates that the optimal representation Q is a Kolmogorov-Nagumo type average and also a fixed point in Algorithm 3 with the corresponding projected gradient equal to zero. These facts represent a theoretical background for computing Q, and Algorithm 3 provides a numerical method to compute Q. Second, we use small kC − Iℓ k as the stopping criterion on Step 2 of Algorithm 3 based on the fact shown in (3.13). This choice of stopping criterion can be viewed from the small change between Q+ and Qc . When C is close to the identity matrix, Q+ is close to Qc . It is worth mentioning that C is a small matrix with dimensions ℓ×ℓ and is computed in the iteration of Algorithm 3. Therefore, the stopping criterion does not require extra computational effort. Third, the constrained maximization problem (2.7) can be solved using the gradient ascent method proposed in [23]. The method starts from an initial Qini ∈ Sm,ℓ and updates the current iterate Qc by searching the next iterate Q+ on a curve lying on the Stiefel manifold Sm,ℓ to satisfy the orthogonality constraint. The curve is obtained by mapping the projected gradient defined in (3.3) to the Stiefel manifold 13 via a Cayley transform. An efficient step size selection along the curve can accelerate the overall convergence. On the other hand, Theorem 3.4 presents a curve along the direction of the projected gradient on the manifold. In Algorithm 3, it is equivalent to setting the step size as τ = 1, and Algorithm 3 can consequently be viewed as a gradient ascent method. We have proposed and analyzed Algorithm 3 to compute Q by solving the constrained optimization (2.7) (and (2.3) equivalently). With the computed Q, we can use iSVD, i.e., Algorithm 2, to perform the approximate SVD defined in (2.2) with multiple random sketches. In the next section, the iSVD is analyzed statistically. 4. Statistical Analysis. In this section, we present some theoretic statistical analysis on iSVD. First, we prove a Strong Law of Large Numbers (SLNN) result in Theorem 4.1 to show that iSVD (2.2) can perform as well as the full data SVD (1.1) as the number of random sketches N goes to infinity. Next, consistencies in terms of subspace and singular vectors are asserted in Theorem 4.3. Finally, we determine a rate of convergence by the Central Limit Theorem (CLT) in Theorem 4.4. Strong Law of Large Numbers. From Theorem 2.1 and the fact that the absolute values of entries of a projection matrix are bounded by one, we have the following immediate result based on Theorem 2.1. Theorem 4.1 (Strong Law of Large Numbers). We have N 1 X ⊤ with probability one, Q[i] Q⊤ lim [i] = U ΛU N →∞ N i=1 where Λ is given in Theorem 2.1 and U is the true left singular vectors of the underlying matrix A in decreasing order. Consistency. Next, we establish the consistency between the left singular vectors computed by iSVD and the true left singular vectors. We prove Lemma 4.2 first. Based on the lemma, we prove the consistency in Theorem 4.3. See Appendix A.9 for the proofs of the lemma and the theorem. Lemma 4.2. Let U = [u1 , . . . , um ] be an arbitrary point in Sm,m , and let Λ be a diagonal matrix with decreasing diagonal entries 1 > λ1 ≥ λ2 ≥ . . . λℓ > λℓ+1 ≥ . . . ≥ λm ≥ 0. Consider the following minimization problem: Qopt = argmin U ΛU ⊤ − QQ⊤ Q∈Sm,ℓ 2 F . ⊤ Then, we have Qopt Q⊤ opt = Uℓ Uℓ , where Uℓ = [u1 , . . . , uℓ ]. Theorem 4.3 (Consistency of subspaces and singular vectors.). Assume that the diagonal entries of Σ (i.e., singular values of A) satisfy the condition: σ1 > σ2 > · · · > σℓ > σℓ+1 ≥ · · · ≥ σm ≥ 0. Then, we have the following properties. ⊤ cℓ consist of the left (a) limN →∞ Q Q = Uℓ Uℓ⊤ with probability one. (b) Let W ⊤ bℓ = QW cℓ as described in Algorithm 2. Then, for singular vectors of Q A, and let U any j ≤ ℓ, we have b⊤ lim u j uj = 1 N →∞ with probability one, b ℓ and uj is the jth column of Uℓ . b j is the jth column of U where u bℓ , Note that the consistency established in Theorem 4.3 is valid for the entire U b where ℓ is the sampling dimension. However, we expect a more accurate Uk using a larger sampling dimension ℓ. See Table 1.1 for the definitions of k and ℓ. 14 Central Limit Theorems. Because Q[1] , Q[2] , . . ., Q[N ] are i.i.d., so are ⊤ ⊤ Q[1] Q⊤ [1] , Q[2] Q[2] , . . ., Q[N ] Q[N ] ; and they have finite second moments. The following theorem is an immediate CLT result from Theorem 2.1. Theorem 4.4 (Central Limit Theorem I). We have N   1 X ⊤ √ vec Q[i] Q⊤ [i] − U ΛU N i=1 d N (0, T1 ), as N → ∞, (4.1) where T1 is a certain positive definite matrix. Theorem 4.4 is a CLT on the average of projection matrices. However, a more b j estimated by iSVD. Note that u bj sensible CLT should be for the singular vectors u PN ⊤ (or uj ) is a function of N1 i=1 Q[i] Q⊤ (or U ΛU ). By the delta-method to (4.1), [i] b j . See Appendix A.10 for the proof. we can establish the following CLT on u Theorem 4.5 (Central Limit Theorem II). We have √ N (b uj − uj ) where T2 = ∆j T1 ∆⊤ j and ∆j = d N (0, T2 ), as N → ∞, ∂uj ∂vec(U ΛU ⊤ )⊤ is given by (A.14) below. bℓ − Uℓ = b j − uj = Op (N −1/2 ) and so is U From Theorem 4.5, we know that u ⊤ ⊤ ⊤ 2 −1 −1/2 b b b b Op (N ). Then, kUℓ Uℓ − Uℓ Uℓ kF = Op (N ) and kUℓ Uℓ − Uℓ Uℓ⊤ ksp = −1/2 b ⊤ = Q Q⊤ . From kUℓ Σℓ Vℓ − Ak2 = σ 2 + . . . + σ 2 bℓ U Op (N ). Note that U m F k+1 ℓ and kUℓ Σℓ Vℓ − Aksp = σk+1 , we have ⊤ 2 2 kQ Q A − Ak2F = σk+1 + . . . σm + Op (N −1 ) (4.2) and ⊤ 2 kQ Q A − Ak2sp = σk+1 + Op (N −1 ). (4.3) Specifically, as N → ∞, we can achieve tight bounds in both the Frobenius norm and the spectral norm by integrating multiple random sketches. 5. Numerical Results. We conduct numerical experiments to study the performance of the proposed algorithms. To test the proposed iSVD, we construct the following test matrices, which are similar to the test matrices used in [17]. Let the mad d+1 ⊤ trix A = Hd Σ Hd+1 ∈ R2 ×2 , where Hd is the Hadamard matrix of size 2d × 2d and Σ is a diagonal matrix of size 2d × 2d+1 . Note that, for a Hadamard matrix, Hd⊤ = Hd and Hd⊤ Hd = I2d . Let the desired rank be k = 10. We set the jth diagonal entry of Σ as follows:  ⌊j/2⌋/5 σ1 , j = 1, 3, 5, 7, 9,      1.5σ j = 2, 4, 6, 8, 10, j+1 Σj,j = σj = (5.1)  0.001, j = 11,     m−j σ11 · m−11 , j = 12, . . . , m. Here, ⌊j/2⌋ is the greatest integer less than or equal to j/2. Our Σ is modified from [17] to distinguish the singular values, and thus, individual singular vectors can be uniquely identified. Note that Hd is an orthogonal matrix. Thus, the SVD of the 15 ⊤ test matrix A is known to be Hd Σ Hd+1 , where the columns of Hd and Hd+1 are the left and right singular vectors, respectively, and σj are singular values. The experimental settings are d = 9, 11, 13, 15, 17, 19, k = 10, p = 12, ℓ = k + p = 22, q = 0, 1, and N = 10, 50, 100, 200. For an initial Qini , we select from the collection e e {Q[i] }N i=1 . We choose the Q[i] that has the largest value of tr(Σ[i] ), where Σ[i] is the diagonal matrix consisting of the singular values of Y[i] computed in Step 2 of Algorithm 2. To evaluate the accuracy of approximate SVD, we use the following similarity for comparing the computed and true leading k individual singular vectors. e k = {u b k = {u e1, . . . , u ej , . . . , u e k } and U b1, . . . , u bj , . . . , u b k } consist of the Recall that U rank-k left singular vectors computed by Algorithm 1 (rSVD) and Algorithm 2 (iSVD), respectively. Uk = {u1 , . . . , uj , . . . , uk } consists of the true left singular vectors of e j (or u bj ) A. We measure the similarity between the jth computed singular vector u and the true singular vector uj by computing |e u⊤ u⊤ j uj | (or |b j uj |) for j = 1, . . . , k. If the computed singular vector has no error, then |e u⊤ u⊤ j uj | = 1 (or |b j uj | = 1). Note that we present only the results regarding the left singular vectors. The results involving the right singular vectors are similar and ignored here. Algorithm 3 is stopped if kC − Iℓ kF is less than 10−5 . The numerical experiments are conducted on a workstation equipped with an Intel E5-2650 v3 CPU (with a 25 MB cache and 2.30 GHz clock rate) and 256 GB of main memory. The algorithms are implemented in MATLAB version 2015b. We report the accuracies and variations in the computed singular values and singular vectors in Figure 5.1 and Table 5.1 using different parameters. We highlight the following observations. • The similarity (accuracy) of the singular vectors increases as the number of random sketches N increases. For each singular vector, we examine the accuracy performance in terms of the similarity between the computed and true singular vector. Figure 5.1 shows the singular vector similarity results with box plots. In the figure, the matrix size is 219 × 220 (d = 19), the sampling dimension ℓ = 22, the number of random sketches N =1, 10, 50, 100, and 200, and the exponent of the power method in Step 2 of Algorithms 1 and 2 (i.e., q) equals 0 or 1. Higher similarities (up to 1) are better. It is clear that larger N results in higher similarity in all the tested cases. Some of the improvements can be significant, especially for several cases when q = 0 and the 9th singular vector for q = 1. Note that the 10th singular vector is difficult to compute. This is because the 10th eigenvalue belongs to a cluster of singular values, and it is difficult to distinguish the singular vectors of these slow-decaying singular values. • The rank-k matrix error decreases as the number of random sketches N increases. We also examine the accuracy performance with respect to the combination of the singular values and singular vectors. In particular, we compute b k Vb ⊤ kF . This error evaluates the bk Σ the rank-k matrix error kUk Σk Vk⊤ − U k difference between the estimated and true rank-k SVD. We experiment with different d to better present the trend of the integration effect for d. The observations hold for all the experiments for d =9, 11, 13, 15, 17, and 19 with q = 0 and q = 1, as shown in Table 5.1. • Overall, the stochastic variation in similarity of a singular vector to its target decreases as the number of random sketches N increases. This welcomed result can be expected because more random sketches have been integrated, and thus, the averaged sketch becomes more stable and with less stochastic 16 Size of A: 524288 x 1048576 1 0.9 0.9 0.8 0.8 0.7 0.7 Similarity (higher is better) Similarity (higher is better) Size of A: 524288 x 1048576 1 0.6 0.5 0.4 0.3 0.2 0.6 0.5 0.4 0.3 0.2 N=1 N=10 N=50 N=100 N=200 0.1 0 1 2 N=1 N=10 N=50 N=100 N=200 0.1 0 3 4 5 6 7 8 9 10 (a) q = 0 1 2 3 4 5 6 7 8 (b) q = 1 Fig. 5.1: The similarity results for d = 19, ℓ = 22, q = 0, 1, and N =1, 10, 50, 100, 200. The figure also shows the box plots indicating the median and the 25th and 75th percentiles of the similarities out of 30 replicated runs. Higher similarities (up to 1) are better. variation. Such an observation holds for almost all the numerical results shown in Table 5.1. Furthermore, we investigate the effect of increasing the sampling dimension ℓ for rSVD (N = 1) and compare the results with iSVD (N > 1), which uses ℓ = 22 and N = 200, resulting in ℓ × N = 4400 samples in total. In these numerical experiments, d = 19, q = 0, and the number of replicated runs is 30. Table 5.2 shows e k Ve ⊤ kF for rSVD and ek Σ the Frobenius norm of the error matrix (i.e., kUk Σk Vk⊤ − U k b k Vb ⊤ kF for iSVD). Two main observations are highlighted below. bk Σ kUk Σk Vk⊤ − U k • In rSVD (N = 1), a larger ℓ results in smaller average errors and smaller standard deviations. This observation is reasonable because when we sketch a greater number of sampling dimensions, more information of the leading singular vectors is collected. • SVD computed by iSVD with smaller sampling dimensions (via multiple sketches) is better than rSVD with large sampling dimensions (via a single sketch). We compare the result obtained by iSVD with ℓ = 22 and N = 200 (4400 sampling dimensions in total) with the results obtained by rSVD with various ℓ and N = 1. As shown in Table 5.2, iSVD outperforms rSVD in all cases except for the case with ℓ = 4400. For the case in which ℓ = 4400, rSVD performs slightly better. This observation suggests the advantage of integration. In addition, even without adopting parallelism, taking 200 random sketches with ℓ = 22 and integrating them is relatively efficient compared to executing an rSVD with ℓ = 3000 in terms of both precision and time. 6. Conclusions. We have proposed and analyzed a Monte Carlo-type algorithm for computing the rank-k SVD of large matrices. The proposed algorithm integrates multiple leading low-dimensional subspaces projected by multiple random sketches. 17 9 10 d N=1 N=10 9 11 13 15 17 19 1.04e-02 1.89e-02 3.49e-02 6.20e-02 1.12e-01 1.92e-01 (6.56e-04) (1.12e-03) (2.69e-03) (4.20e-03) (5.76e-03) (1.26e-02) 3.79e-03 6.74e-03 1.22e-02 2.21e-02 4.03e-02 7.14e-02 (1.18e-04) (1.51e-04) (2.44e-04) (4.15e-04) (8.24e-04) (1.59e-03) 9 11 13 15 17 19 1.08e-03 1.53e-03 1.83e-03 2.14e-03 2.97e-03 4.14e-03 (1.50e-04) (1.03e-04) (5.54e-05) (9.61e-05) (2.81e-04) (2.77e-04) 4.30e-04 7.61e-04 1.23e-03 1.64e-03 1.93e-03 2.35e-03 (3.55e-05) (3.89e-05) (4.43e-05) (4.45e-05) (2.30e-05) (5.20e-05) N=50 (a) q = 0 1.74e-03 (4.37e-05) 3.25e-03 (5.94e-05) 5.83e-03 (5.45e-05) 1.06e-02 (9.62e-05) 1.95e-02 (1.72e-04) 3.52e-02 (2.93e-04) (b) q = 1 1.95e-04 (1.40e-05) 3.68e-04 (1.43e-05) 6.89e-04 (2.00e-05) 1.17e-03 (2.59e-05) 1.78e-03 (7.72e-06) 1.89e-03 (6.91e-06) N=100 N=200 1.23e-03 2.32e-03 4.32e-03 7.78e-03 1.44e-02 2.60e-02 (2.46e-05) (3.07e-05) (2.69e-05) (3.94e-05) (7.94e-05) (1.61e-04) 8.71e-04 1.67e-03 3.30e-03 5.72e-03 1.09e-02 1.95e-02 (1.52e-05) (1.90e-05) (1.63e-05) (2.11e-05) (5.12e-05) (6.30e-05) 1.37e-04 2.62e-04 5.05e-04 9.27e-04 1.75e-03 1.82e-03 (8.63e-06) (1.06e-05) (1.32e-05) (1.61e-05) (8.45e-06) (2.81e-06) 9.75e-05 1.87e-04 3.65e-04 7.22e-04 1.74e-03 1.78e-03 (5.96e-06) (6.84e-06) (7.55e-06) (1.26e-05) (9.44e-06) (9.79e-07) Table 5.1: The average norm and standard deviation (in parentheses) of the error b k Vb ⊤ kF ) over 30 replicated runs with various matrices bk Σ matrices (i.e., kU ΣV ⊤ − U k d d+1 of size 2 × 2 . The sampling dimension ℓ = 22 and the exponent q = 0 or q = 1. ℓ 22 500 1000 N (Alg.) 1 (rSVD) 1 (rSVD) 1 (rSVD) Ave (std) of errors 1.90e-01 (1.39e-02) 4.63e-02 (6.27e-04) 3.40e-02 (2.84e-04) ℓ 3000 4400 22 N (Alg.) 1 (rSVD) 1 (rSVD) 200 (iSVD) Ave (std) of errors 2.06e-02 (9.16e-05) 1.73e-02 (6.27e-05) 1.95e-02 (6.30e-05) Table 5.2: We use rSVD (with various sampling dimensions ℓ and N = 1) and iSVD (with ℓ = 22 and N = 200) to compute the first 10 singular values and singular vectors. The table shows the averages (and standard deviations) of the error matrix b k Vb ⊤ kF for iSVD) bk Σ e k Ve ⊤ kF for rSVD and kU ΣV ⊤ − U ek Σ norms (i.e., kU ΣV ⊤ − U k k 19 20 out of 30 replicated runs. The matrix size is 2 × 2 , and the power exponent q = 0. The integrated subspace is the solution of the optimization problem constrained by the matrix Stiefel manifold that best represents the multiple random projected subspaces. To solve the optimization problem, we propose an iterative method based on the Kolmogorov-Nagumo-type average of the multiple subspaces. Theoretical analyses reveal the insights of the proposed algorithms. Numerical experiments suggest that the integrated SVD can achieve higher accuracy and less stochastic variation in singular vectors using multiple random sketches. It is interesting to generalize iSVD to other problems. First, we plan to investigate how iSVD performs if we replace the Gaussian random projections by the column random sampling. Unlike the Gaussian random projections, which involve matrixmatrix multiplications A⊤ AΩ, the random column sampling can be implemented by column extractions without involving matrix-matrix multiplications, and therefore leads to a significant savings in computational time and memory usage, especially for large-scale matrices. However, the sketched subspaces contain less information about the leading subspaces, which may decrease the accuracy, and some statistical properties are different from the cases in Gaussian random projection. Other possible extensions of iSVD include eigenvalue problems, linear system problems, selected singular values within a given interval or of a given order, and tensor decompositions. Another future direction is to explore how we can efficiently compute the SVD if some of the columns or rows of A are added (updated) or removed (downdated) after an 18 SVD has been obtained for a given matrix A. iSVD can be accelerated using multi-level parallelism. It is obvious the N random sketches can be performed simultaneously in parallel. The operations in each sketch and the integration process can be parallelized as well. Efficient implementations of the proposed algorithms on parallel computers will allow us to quickly estimate the SVD of large-scale matrices on GPUs, parallel computers, or distributed systems such as Spark [12]. In addition to the development of new algorithms and parallel implementations, the tuning of parameters can affect the timing and accuracy. Depending on the requirements (e.g., accuracy and number of singular values), matrix structures (e.g., sparsity, size, and distribution of the singular values), and computer architectures (e.g., multi-core CPU or GPU cluster), we can choose between N = 1 (rSVD) and N > 1 (iSVD), the power exponent q, and the oversampling size p (and thus the dimension of the random sketches ℓ). Fine-tuning of Algorithm 3 or gradient-based optimization methods may further improve the performance of iSVD. One example is the step size used to move from the current iterate to the next iterate. In short, we have proposed and justified a new randomized algorithm to compute the approximate rank-k SVD of a large matrix by integrating multiple leading subspaces based on random sketches. The framework can be further improved and extended to benefit data analytics, computational sciences and engineering in a broad manner. Acknowledgments. This work is partially supported by the Ministry of Science and Technology, the National Center for Theoretical Sciences, and the Taida Institute for Mathematical Sciences in Taiwan. REFERENCES [1] Haim Avron, Costas Bekas, Christos Boutsidis, Kenneth Clarkson, Prabhanjan Kambadur, Giorgos Kollias, Michael Mahoney, Yves Ineichen Ilse Ipsen, Vikas Sindhwani, and David Woodruff. libSkylark: an open source software library for distributed randomized numerical linear algebra with applications to machine learning and statistical data analysis. IBM Research, in collaboration with Bloomberg Labs, NCSU, Stanford, UC Berkeley, and Yahoo Labs. Available at https://github.com/xdata-skylark/libskylark., 2015. [2] Edouard Coakley, Vladimir Rokhlin, and Mark Tygert. A fast randomized algorithm for orthogonal projection. SIAM Journal on Scientific Computing, 33(2):849–868, 2011. [3] Laurent Demanet, Pierre-David Létourneau, Nicolas Boumal, Henri Calandra, Jiawei Chiu, and Stanley Snelson. Matrix probing: a randomized preconditioner for the wave-equation hessian. Applied and Computational Harmonic Analysis, 32(2):155–168, 2012. [4] Petros Drineas and Michael W. Mahoney. RandNLA: Randomized numerical linear algebra. Commun. ACM, 59(6):80–90, May 2016. [5] Simone Fiori, Tetsuya Kaneko, and Toshihisa Tanaka. Mixed maps for learning a kolmogoroffnagumo-type average element on the compact Stiefel manifold. IEEE International Conference on Acoustic, Speech and Signal Processing (ICASSP), pages 4518– 4522, 2014. [6] Laura Grigori, Frédéric Nataf, Soleiman Yousef, et al. Robust algebraic schur complement preconditioners based on low rank corrections. 2014. [7] Ming Gu. Subspace iteration randomization and singular value problems. SIAM Journal on Scientific Computing, 37(3):A1139–A1173, 2015. [8] Nathan Halko, Per-Gunnar Martinsson, Yoel Shkolnisky, and Mark Tygert. An algorithm for the principal component analysis of large data sets. SIAM Journal on Scientific computing , 33(5):2580–2594, 2011. [9] Nathan Halko, Per-Gunnar Martinsson, and Joel A Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM review, 53(2):217–288, 2011. [10] Nathan P Halko. Randomized methods for computing low-rank approximations of matrices. PhD thesis, University of Colorado, 2012. 19 [11] Tetsuya Kaneko, Simone Fiori, and Toshihisa Tanaka. Empirical arithmetic averaging over the compact Stiefel manifold. IEEE Transations on Signal Processing, 61(4):883–894, 2013. [12] Min Li, Jian Tan, Yandong Wang, Li Zhang, and Valentina Salapura. Sparkbench: a comprehensive benchmarking suite for in memory data analytic platform spark. In Proceedings of the 12th ACM International Conference on Computing Frontiers, page 53. ACM, 2015. [13] Jan R Magnus and Heinz Neudecker. The commutation matrix: some properties and applications. The Annals of Statistics, pages 381–394, 1979. [14] Michael W Mahoney. Randomized algorithms for matrices and data. Foundations and Trends in Machine Learning, 3(2):123–224, 2011. [15] Gunnar Martinsson. Randomized algorithms for very large-scale linear algebra. [16] Haifeng Qian and Sachin S Sapatnekar. Stochastic preconditioning for diagonally dominant matrices. SIAM Journal on Scientific Computing , 30(3):1178–1204, 2008. [17] Vladimir Rokhlin, Arthur Szlam, and Mark Tygert. A randomized algorithm for principal component analysis. SIAM Journal on Matrix Analysis and Applications, 31(3):1100–1124, 2009. [18] Vladimir Rokhlin and Mark Tygert. A fast randomized algorithm for overdetermined linear least-squares regression. Proceedings of the National Academy of Sciences , 105(36):13212– 13217, 2008. [19] KK Sabelfeld. Stochastic boundary methods of fundamental solutions for solving pdes. Engineering Analysis with Boundary Elements, 36(7):1092–1103, 2012. [20] Thomas Strohmer and Roman Vershynin. A randomized solver for linear systems with exponential convergence. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, pages 499–507. Springer, 2006. [21] Arthur Szlam, Yuval Kluger, and Mark Tygert. An implementation of a randomized algorithm for principal component analysis. arXiv preprint arXiv:1412.3510, 2014. [22] Hemant D Tagare. Notes on optimization on stiefel manifolds. Technical report, Tech. Rep., Yale University, 2011. [23] Zaiwen Wen and Wotao Yin. A feasible method for optimization with orthogonality constraints. Mathematical Programming, 142(1-2):397–434, 2013. [24] Rafi Witten and Emmanuel Candès. Randomized algorithms for low-rank matrix factorizations: sharp performance bounds. Algorithmica, 72(1):264–281, 2013. [25] David P Woodruff. Sketching as a tool for numerical linear algebra. arXiv preprint arXiv:1411.4357, 2014. [26] Jianlin Xia, Yuanzhe Xi, and Ming Gu. A superfast structured solver for toeplitz linear systems via randomized sampling. SIAM Journal on Matrix Analysis and Applications, 33(3):837– 858, 2012. [27] Hua Xiang and Jun Zou. Regularization with randomized svd for large-scale discrete inverse problems. Inverse Problems, 29(8):085008, 2013. [28] Ichitaro Yamazaki, Jakub Kurzak, Piotr Luszczek, and Jack Dongarra. Randomized algorithms to update partial singular value decomposition on a hybrid cpu/gpu cluster. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, page 59. ACM, 2015. [29] Jiyan Yang, Xiangrui Meng, and Michael W Mahoney. Implementing randomized matrix algorithms in parallel and distributed environments. Proceedings of the IEEE, 104(1):58–92, 2016. [30] Zhihua Zhang. The singular value decomposition, applications and beyond. arXiv preprint arXiv:1510.08532, 2015. Appendix. A.1. Proof of Theorem 2.1. Proof. Since Ω[i] is a Gaussian random matrix, we have the expectation      −1 ⊤ ⊤ ⊤ ⊤ E Q[i] Q⊤ Ω A = E AΩ Ω A AΩ [i] [i] [i] [i] [i]    −1 2 ⊤ = U E ΣV ⊤ Ω[i] Ω⊤ Ω⊤ U ⊤ =: U ΛU ⊤ , [i] V Σ V Ω[i] [i] V Σ where    −1 ⊤ ⊤ 2 ⊤ ⊤ Λ = E ΣV Ω[i] Ω[i] V Σ V Ω[i] Ω[i] V Σ . 20 (A.1) 2 ⊤ Note that Ω⊤ [i] V Σ V Ω[i] is non-singular with probability one. (a) First, we show that Λ is a diagonal matrix. Its (j, j ′ )th entry is given by ! m X −1 ⊤ 2 ⊤ E σj σj ′ zj σl zl zl zj ′ , l=1 ⊤ where [z1 , . . . , zn ] = Ω⊤ [i] V . Note that zj = Ω[i] vj , where vj is the jth column of V . Let ωl denote the lth column of Ω[i] . Below we show that all off-diagonal entries of Λ are zero. Without loss of generality, consider the (1, j)th entry of Λ. Let V−1 := e [i] := V V ⊤ Ω[i] . Then, Ω e ⊤ V = Ω⊤ V−1 V ⊤ V = Ω⊤ V−1 . [−v1 , v2 , . . . , vn ] and Ω −1 [i] [i] [i] e ⊤ V . Then, ze1 = Ω e ⊤ v1 = −z1 and zej = Ω e ⊤ vj = zj , ∀j 6= 1. Let [e z1 , . . . , zen ] := Ω [i] [i] [i] e [i] have the same distribution, as Ω[i] have i.i.d. Gaussian entries Note that Ω[i] and Ω ⊤ ⊤ ⊤ and (V V−1 ) V V−1 = I. It implies that [e z1 , . . . , zen ] and [z1 , . . . , zn ] follow the same distribution. That is, z1⊤ m X σl2 zl zl⊤ l=1 −1 d d zj = ze1⊤ m X l=1 σl2 zel zel⊤ −1 zej = −z1⊤ m X σl2 zl zl⊤ l=1 −1 zj , where = means equal in distribution. Therefore, for the (1, j)th entry of Λ, we have ( ( ) ) m m X X −1 −1 ⊤ ⊤ 2 ⊤ 2 ⊤ E z1 σl zl zl zj = −E z1 σl zl zl zj = 0. l=1 l=1  P −1  m ⊤ 2 2 ⊤ zj , j = (b) Next, we show that all the diagonals, E σj zj l=1 σl zl zl Pm 2 ⊤ 1, . . . , n, are less than one. Let B(−j) := l6=j σl zl zl . As Ω[i] consists of i.i.d. Gaussian entries and ℓ < m, B(−j) is strictly positive definite with probability one. By Sherman-Morrison-Woodbury matrix identity, we have m X σl2 zl zl⊤ l=1 −1 −1 = B(−j) − −1 −1 zj zj⊤ B(−j) σj2 B(−j) −1 zj 1 + σj2 zj⊤ B(−j) . Then, σj2 zj⊤ m X σl2 zl zl⊤ l=1 = = σj2 −1 zj⊤ B(−j) zj − −1 σj2 zj⊤ B(−j) zj −1 zj 1 + σj2 zj⊤ B(−j) −1 zj = σj2 zj⊤ −1 B(−j) − −1 −1 σj2 zj⊤ B(−j) zj zj⊤ B(−j) zj −1 zj 1 + σj2 zj⊤ B(−j) =1− −1 −1 σj2 B(−j) zj zj⊤ B(−j) −1 zj 1 + σj2 zj⊤ B(−j) ! 1 < 1. −1 zj 1 + σj2 zj⊤ B(−j) ! zj (A.2) (b) can be obtained by taking expectation of the inequality above.   Pm 2 ⊤ −1 (c) Finally, we want to show that E σj2 zj⊤ zj is strictly del=1 σl zl zl creasing as j increases. Without loss of generality, we will only show the compari    Pm 2 Pm 2 ⊤ −1 ⊤ −1 z2 . z1 > E σ22 z2⊤ son for j = 1, 2, i.e., E σ12 z1⊤ l=1 σl zl zl l=1 σl zl zl 21 e [i] := V V ⊤ Ω[i] , where V1,2 := [v2 , v1 , v3 , . . . , vn ]. Let [x1 , x2 , . . . , xn ] := Consider Ω 1,2 e ⊤ V . Then, x1 = z2 , x2 = z1 , and xj = zj for all 3 ≤ j ≤ n. Similar to (A.2), Ω [i] σj2 x⊤ j m X σl2 xl x⊤ l l=1 −1 xj = 1 − 1 , e −1 σj2 x⊤ j B(−j) xj 1+ (A.3) e (−j) := Pm σ 2 xl x⊤ . Again, we only need to consider the case that B e (−j) is where B l l6=j l e (−2) = B(−1) + (σ 2 − of full rank, which holds with probability one. Observe that B 1 σ22 )z2 z2⊤ . Then, 2 2 ⊤ ⊤ e −1 x⊤ 2 B(−2) x2 = z1 B(−1) + (σ1 − σ2 )z2 z2 −1 = z1⊤ B(−1) z1 − (σ12 −1 −1 −1 σ22 )z1⊤ B(−1) z2 z2⊤ B(−1) z1 −1 ⊤ 1 + z2 B(−1) z2 − z1 −1 ≤ z1⊤ B(−1) z1 . −1 The equality holds only when z1⊤ B(−1) z2 = 0, which happens with zero probability. e −1 x2 < z ⊤ B −1 z1 , In the following, we will then only consider the case that x⊤ B 2 1 (−2) (−1) e −1 which holds with probability one. Since σ1 > σ2 > 0, we have σ22 x⊤ 2 B(−2) x2 < −1 z1 . Along with (A.3), we have σ12 z1⊤ B(−1) σ22 x⊤ 2 m X σl2 xl x⊤ l l=1 Similarly, we have σ12 x⊤ 1 σ12 z1⊤ P m l=1 m X > σ22 x⊤ 2 l=1 m X −1 x2 < σ12 z1⊤ −1 σl2 xl x⊤ l l=1 σl2 zl zl⊤ l=1 σl2 xl x⊤ l σl2 zl zl⊤ m X −1 x1 > σ22 z2⊤ z1 + σ12 x⊤ 1 −1 P m X x2 + σ22 z2⊤ m l=1 −1 σl2 zl zl⊤ σl2 xl x⊤ l l=1 m X −1 σl2 zl zl⊤ l=1 z1 . −1 z2 . Then, x1 −1 z2 . Take the expectation, and we have E >E σ12 z1⊤ m X σ22 x⊤ 2 l=1 m X σl2 zl zl⊤ −1 σl2 xl x⊤ l l=1 z1 −1 ! x2 +E ! +E σ12 x⊤ 1 m X σ22 z2⊤ σl2 xl x⊤ l l=1 m X −1 σl2 zl zl⊤ l=1 x1 −1 ! ! z2 . . (A.4) d e⊤ e [i] and Ω[i] have the same distribution, we have Ω⊤ V = Since Ω Ω[i] V = Ω⊤ [i] [i] V1,2 , d and hence [z1 , z2 , z3 , . . . , zn ] = [x1 , x2 , x3 , . . . , xn ]. Then, ! ! m m X X −1 −1 2 ⊤ 2 ⊤ 2 ⊤ 2 ⊤ E σ1 z1 σl zl zl z1 = E σ1 x1 σl xl xl x1 l=1 E σ22 x⊤ 2 m X l=1 σl2 xl x⊤ l −1 x2 ! l=1 =E σ22 z2⊤ m X l=1 22 σl2 zl zl⊤ −1 ! z2 . . Therefore, (A.4) becomes ) ) ( ( m m −1 X −1 X z2 . σl2 zl zl⊤ z1 > E σ22 z2⊤ σl2 zl zl⊤ E σ12 z1⊤ (A.5) l=1 l=1   P −1  P −1  m m 2 ⊤ 2 ⊤ 2 ⊤ 2 ⊤ zj ′ zj > E σj ′ zj ′ Similarly, we can have E σj zj l=1 σl zl zl l=1 σl zl zl for any pair of (j, j ′ ) satisfying j < j ′ . A.2. Proof of Theorem 2.2. Proof. Direct calculations lead to the following equalities for Q ∈ Sm,ℓ : n o 2 ⊤ ⊤ 2 Q[i] Q⊤ = tr (Q[i] Q⊤ [i] − QQ [i] − QQ ) F o n o n  ⊤ ⊤ QQ = tr Q[i] Q[i] + tr QQ⊤ − 2 tr Q[i] Q⊤ [i] o n ⊤ ⊤ = 2ℓ − 2 tr QQ Q[i] Q[i] . Hence the summation becomes PN i=1 ⊤ Q[i] Q⊤ [i] − QQ 2 2 F 2 = 2N ℓ − 2N tr(QQ⊤ P ). Similarly, one can also show that P − QQ⊤ F = tr(P ) + ℓ − 2 tr(QQ⊤ P ). Since ℓ and P are given and fixed, the two optimization problems are equivalent. A.3. Proof of Theorem 3.1. Note that the optimization in Stiefel manifold has been analyzed in [22, 23]. Here we derive the related properties by using fundamental matrix algebras and calculus. We hope this approach based on fundamental tools may benefit readers who are not familiar with the advanced differential geometry topics adopted in [22, 23]. Proof. First we find a necessary and sufficient condition for X being in TQ Sm,ℓ . For all X ∈ TQ Sm,ℓ , find a path Γ(t) in Sm,ℓ with Γ(0) = Q and Γ′ (0) = X. From Γ(t)⊤ Γ(t) = I, differentiate each side by t and take t = 0, we have X ⊤ Q + Q⊤ X = 0, (A.6) which gives a necessary condition for X ∈ TQ Sm,ℓ . There are ℓ(ℓ + 1)/2 conditions for X in (A.6) and the dimension of TQ Sm,ℓ is mℓ − ℓ(ℓ + 1)/2, which means (A.6) is also a sufficient condition for X ∈ TQ Sm,ℓ . By taking vec to each sides of (A.6), we get the equality [(Q⊤ ⊗ Iℓ )Km,ℓ + (Iℓ ⊗ Q⊤ )] vec(X) = 0, where ⊗ denotes the Kronecker product and Km,ℓ denotes the m × ℓ commutation matrix [13]. Define T = Kℓ,m (Q ⊗ Iℓ ) + (Iℓ ⊗ Q) and get T ⊤ vec(X) = 0. This shows that the tangent space (after vectorizing each elements) is contained in the null space of T ⊤ . One can compute the rank of T and shows that the null space of T ⊤ is actually the tangent space. Hence the projection matrix onto the tangent space is given by (I − PT ), where PT = T (T ⊤ T )+ T ⊤ and (T ⊤ T )+ denoted the MoorePenrose pseudo-inverse. With PT , DF can be given via vec(DF ) = (I −PT ) vec(GF ). With some calculation, we have T = (Iℓ ⊗ Q)(Iℓ2 + Kℓ,ℓ ) and thus T ⊤ T = (Iℓ2 + Kℓ,ℓ )⊤ (Iℓ ⊗ Q)⊤ (Iℓ ⊗ Q)(Iℓ2 + Kℓ,ℓ ) = (Iℓ2 + Kℓ,ℓ )(Iℓ2 + Kℓ,ℓ ) = 2(Iℓ2 + Kℓ,ℓ ). 23 Then the projection matrix PT can be calculated as: PT = T (T ⊤ T )+ T ⊤ 1 = (Iℓ ⊗ Q)(Iℓ2 + Kℓ,ℓ ) (Iℓ2 + Kℓ,ℓ )+ (Iℓ2 + Kℓ,ℓ )⊤ (Iℓ ⊗ Q)⊤ 2 1 1 1 = (Iℓ ⊗ Q)(Iℓ2 + Kℓ,ℓ )(Iℓ ⊗ Q⊤ ) (Iℓ ⊗ QQ⊤ ) + (Q⊤ ⊗ Q)Km,ℓ . 2 2 2 Hence, by vec(DF ) = (I − PT ) vec(GF ), 1 1 vec(DF ) = (Iℓ2 − (Iℓ ⊗ QQ⊤ ) − (Q⊤ ⊗ Q)Km,ℓ ) vec(GF ) 2 2 1 1 = vec(GF ) − (Iℓ ⊗ QQ⊤ ) vec(GF ) − (Q⊤ ⊗ Q)Km,ℓ vec(GF ) 2 2 1 1 = vec(GF ) − vec(QQ⊤ GF ) − vec(QG⊤ F Q) 2 2 and DF can be written as   1 1 ⊤ GF − QG⊤ DF = I − QQ F Q. 2 2 (A.7) Since we have the property Q⊤ GF (Q) = GF (Q)⊤ Q here, we can get DF (Q) = (I − QQ⊤ )GF (Q). This completes the proof. A.4. Proof of Lemma 3.2. Proof. (a) Express W as QC + Q⊥ B. Then, W ⊤ W = I will imply C 2 + B ⊤ B = I. Thus, C 4 + CB ⊤ BC = C 2 . Furthermore, ϕQ (W ) = (I − QQ⊤ )W W ⊤ Q = Q⊥ BC. Then, we have I I I − ϕQ (W )⊤ ϕQ (W ) = − CB ⊤ BC = − C 2 + C 4 = 4 4 4  I − C2 2 2 , which is non-negative definite. (b) Let X[i] = (I − QQ⊤ )Q[i] Q⊤ [i] Q. Then, for any ℓ vector v ∈ R   N 2 I kvk2 1 X ⊤ ⊤ v X[i] v −X X v = − 4 4 N i=1   N N 1 X 1 1 X kvk2 2 2 2 X[i] v = ≥ 0. − kvk − X[i] v ≥ 4 N i=1 N i=1 4 The last inequality holds since X[i] v ≤ kvk/2 for every i from (a). A.5. Proof of Lemma 3.3. Proof. We will show this lemma under the condition that X has full rank. For X being rank deficient, the proof is more complicated and is placed in Appendix A.7. Express W = QC + Q⊥ B. We want to find B and C satisfying (a) W ⊤ W = Iℓ and (b) X = ϕQ (W ). From condition (b), it leads to X = (I − QQ⊤ )(QC + Q⊥ B)(QC + Q⊥ B)⊤ Q = Q⊥ BC. Since X has full rank, C has to have full rank and hence is invertible. Then, Q⊥ B = XC −1 . From condition (a), it leads to I = (QC + Q⊥ B)⊤ (QC + Q⊥ B) = C 2 + C −1 X ⊤ XC −1 . Then, C 2 = C 4 + X ⊤ X. With the assumption that I4 − X ⊤ X is non-negative definite, we   1/2 1/2  2 I 2 I I I ⊤ ⊤ have C − 2 = 4 − X X, and then C = 2 + 4 − X X . 24 A.6. Matrix Square Root. A matrix square root for a symmetric and nonnegative definite matrix M ∈ Rℓ×ℓ is defined as follows. M 1/2 is any matrix T that satisfies T T ⊤ = M . (A.8) Express M in its spectrum M = GDG⊤ . If we restrict T to be symmetric, then p  p (A.9) T = GD 1/2 G⊤ , where D 1/2 = diag [± d1 , . . . , ± dℓ ] . If T is further restricted to be non-negative definite, then it is uniquely given by p p  T = GD 1/2 G⊤ , where D 1/2 = diag [ d1 , . . . , dℓ ] . (A.10) A.7. Proof of Lemma 3.3 for Rank Deficient X. Proof. Let W = QC + XB. It suffices to show that C is nonsingular. Then we have XB = XC −1 again, and the rest arguments of the proof for Lemma 3.3 remain the same. If Cv = 0 for some nonzero column vector v, we have Xv = XBCv = 0. Factorize C as #" # " T1⊤ 0ℓ1 ×(ℓ−ℓ1 ) Dℓ1 ×ℓ1 , C = [T1 , T2 ]ℓ×ℓ 0(ℓ−ℓ1 )×ℓ1 0(ℓ−ℓ1 )×(ℓ−ℓ1 ) T2⊤ ℓ×ℓ ⊤ where D is diagonal and nonsingular, and [T1 , T2 ] [T1 , T2 ] = h I. Since CT2 = 0, i so fm×ℓ1 , 0m×(ℓ−ℓ ) T ⊤ is XT2 , which means that X can be factorized as X = Y X 1 e = T ⊤ BT . (b) leads to where T = [T1 , T2 ], and Y Y = I. Let B # " h h i i 0ℓ1 ×(ℓ−ℓ1 ) Dℓ1 ×ℓ1 f f e Y Xm×ℓ1 , 0m×(ℓ−ℓ1 ) = Y Xm×ℓ1 , 0m×(ℓ−ℓ1 ) B , 0(ℓ−ℓ1 )×ℓ1 0(ℓ−ℓ1 )×(ℓ−ℓ1 ) # " e 12 e 11 B B e 11 = X fm×ℓ1 D −1 . fm×ℓ1 B e e with X which forces B to be of the form B = e 22 e 21 B B Then # " f⊤ XD f −1 D −1 X f⊤ X fB e 12 D −1 X ⊤ ⊤ T ⊤. B X XB = T e⊤ X f⊤ XD f −1 B e⊤ X f⊤ X fB e 12 B ⊤ 12 12 f⊤ X fB e 12 = 0 and B e⊤ X f⊤ X fB e 12 = I, which contradicts to each (a) leads to D −1 X 12 other. Therefore, C has to be nonsingular. A.8. Proof of Theorem 3.5. Since Ω[i] ’s consist of all i.i.d. Gaussian entries, we have that P has distinct eigenvalues almost  surely. Let the eigenvalue ⊤  Λ1 0   Q∗ Q⊥ , where decomposition of P be denoted by P = Q∗ Q⊥ 0 Λ2 Λ1 = diag([λ1 , . . . , λℓ ]) and Λ2 = diag([λℓ+1 , . . . , λm ]). Proof. Suppose we start from an initial Qini ∈ Nε (Q∗ R0 ), where R0 is an arbitrary orthogonal matrix and ε is determined later. Denote Q0 := Qini and Qt+1 := g(Qt ), where g is defined in (3.11). We can write Q0 as Q0 = Q∗ R0 C0,1 + Q⊥ C0,2 , ⊤ ⊤ where C0,1 ∈ Rℓ×ℓ , C0,2 ∈ R(m−ℓ)×ℓ and C0,1 C0,1 + C0,2 C0,2 = Iℓ . We first show ⊤ that R0,∗ R0 C0,1 is symmetric, where R0,∗ := argmin kQ0 −Q∗ RkF = argmin kQ∗ R0 C0,1 −Q∗ RkF = argmin kC0,1 −R⊤ 0 RkF . R∈Sℓ,ℓ R∈Sℓ,ℓ R∈Sℓ,ℓ 25 Denote the spectrum of C0,1 as C0,1 = LSH ⊤ , where the diagonal entries of S are less ⊤ than or equal to one. Therefore, the best approximation is given by R⊤ 0 R0,∗ = LH . ⊤ ⊤ ⊤ ⊤ Then, R0,∗ R0 C0,1 = HL LSH = HSH . This completes the proof of symmetry. With this symmetry property, we can write Q0 as Q0 = Q∗ R0,∗ C1 + Q⊥ C2 for some symmetric C1 ∈ Rℓ×ℓ and some C2 ∈ R(m−ℓ)×ℓ . Next, we (i) extend the definition of g to an open covering Oε0 of the compact Stiefel manifold Sm×ℓ for some small ε0 > 0. (ii) Compute its derivative (the usual derivative in the Euclidean space) D(Q∗ R0,∗ ) := ∂vec(g)/∂vec(M )⊤ M =Q∗ R0,∗ , where M ∈ Oε0 . (iii) Show that D’s spectral norm, when restricted to the subspace V √0 given below (A.11), is strictly less than one. (iv) kvec(Q1 ) − vec(Q∗ R0,∗ )k2 ≤ √α kvec(Q0 ) − vec(Q∗ R0,∗ )k2 for some 0 ≤ α < 1. (v) kvec(Q1 ) − vec(Q∗ R1,∗ )k2 ≤ α kvec(Q0 ) − vec(Q∗ R0,∗ )k2 , where R1,∗ is defined below (A.12). (vi) Iteratively obtain kvec(Qt+1 ) − vec(Q∗ Rt+1,∗ )k2 ≤ α(t+1)/2 kvec(Q0 ) − vec(Q∗ R0,∗ )k2 . (vii) Finally, establish the convergence of Qt . (i) For ε0 sufficiently small, matrices C(Q) and X(Q) as functions of Q can be extended to an open covering Oε0 := {M ∈ Rm×ℓ : inf Q∈Sm,ℓ kM − QkF < ε0 } of the compact Stiefel manifold Sm×ℓ . Then, g can be extended as well. From now on, we consider g as a function defined on this open covering Oε0 and we can take derivative of g in the usual Euclidean sense. n 1/2 o1/2 , and C (ii) Recall X(Q) = (I − QQ⊤ )P Q, C = I2 + I4 − X ⊤ X satisfies the equation C 4 − C 2 + X ⊤ X = 0. By taking derivative for both sides of the 4 −C 2 +X ⊤ X) = 0. The left side of the equation last equation, we have ∂vec(C∂vec(Q) ⊤ Q∗ R0,∗ can be calculated as follows.  3 C ⊗ I + C2 ⊗ C + C ⊗ C2 + I ⊗ C3 − C ⊗ I − I ⊗ C  + I ⊗ X ⊤ + (X ⊤ ⊗ I)Km,ℓ ∂vec(X) ∂vec(Q)⊤ Q∗ R0,∗ ∂vec(C) ∂vec(Q)⊤ 2∂vec(C) = , ∂vec(Q)⊤ Q∗ R0,∗ where the equality holds by the facts X(Q∗ R0,∗ ) = 0 and C(Q∗ R0,∗ ) = I. Hence, we ∂vec(C) have ∂vec(Q) = 0. Applying similar techniques to both sides of the equation ⊤ Q R ∗ 0,∗ g(Q)C = QC 2 + X, we get ∂vec(g) ∂vec(Q)⊤ = Imℓ + Q∗ R0,∗ ∂X ∂vec(Q)⊤ . Q∗ R0,∗ Some further calculation goes as follows. D(Q∗ R0,∗ ) = Imℓ + ∂vec(X) ∂vec(Q)⊤ = Imℓ + Q∗ R0,∗ ∂vec((I − QQ⊤ )P Q) ∂vec(Q)⊤ Q∗ R0,∗ = Imℓ + Iℓ ⊗ P − Q⊤ P Q ⊗ Im − (Q⊤ P ⊗ Q)Km,ℓ − Iℓ ⊗ QQ⊤ P = Imℓ + Iℓ ⊗ P − R⊤ 0,∗ Λ1 R0,∗ ⊗ Im − ⊤ (R⊤ 0,∗ Λ1 Q∗ Q∗ R0,∗ ⊗ Q∗ R0,∗ )Km,ℓ − Iℓ ⊗ (Q∗ Λ1 Q⊤ ∗ ). Let V0 := {V : V = Q∗ R0,∗ S1 + Q⊥ S2 with symmetric S1 }. 26 (A.11) For any m × ℓ matrix V ∈ V0 , we have ⊤ ⊤ D(Q∗ R0,∗ ) vec(V ) = vec V + P V − V R⊤ 0,∗ Λ1 R0,∗ − Q∗ R0,∗ V Q∗ Λ1 R0,∗ − Q∗ Λ1 Q∗ V  ⊤ ⊤ = vec V + Q⊥ Λ2 Q⊤ ⊥ V − V R0,∗ Λ1 R0,∗ − Q∗ R0,∗ V Q∗ Λ1 R0,∗  ⊤ ⊤ = vec Q∗ R0,∗ (S1 − S1 R⊤ 0,∗ Λ1 R0,∗ − S1 R0,∗ Λ1 R0,∗ )  + vec Q⊥ (S2 + Λ2 S2 − S2 R⊤ 0,∗ Λ1 R0,∗ ) .  (iii) Then, ⊤ kD(Q∗ R0,∗ ) vec(V )k22 = Q∗ R0,∗ (S1 − 2S1 R⊤ 0,∗ Λ1 R0,∗ ) + Q⊥ (S2 + Λ2 S2 − S2 R0,∗ Λ1 R0,∗ ) = ≤ ≤ 2 2 ⊤ S1 − 2S1 R⊤ 0,∗ Λ1 R0,∗ F + S2 + Λ2 S2 − S2 R0,∗ Λ1 R0,∗ F 2 2 (1 − 2λℓ )2 kS1 kF + (1 − λℓ + λℓ+1 )2 kS2 kF 2 2 2 β kS1 kF + β kS2 kF = β kvec(V )k2 , where β = max{(1 − 2λℓ )2 , (1 − λℓ + λℓ+1 )2 } < 1. Let α = 1+β 2 . By continuity 2 2 of D, there exists an ε ∈ (0, ε0 ) such that kD(M )vec(V )k2 ≤ α kvec(V )k2 for any M ∈ Bε (Q∗ R0,∗ ), where Bε (Q∗ R0,∗ ) is an ε-open ball in Euclidean space, and for any V ∈ V0 . The selection of ε can be made independent of R0,∗ due to the fact that the underlying matrix Stiefel manifold is compact and it can be covered by finitely many ε-ball for any given ε. (iv) Consider a path connecting Q∗ R0,∗ and Q0 : M (τ ) = τ (Q∗ R0,∗ C1 + Q⊥ C2 ) + (1 − τ )Q∗ R0,∗ , which is the line segment between Q0 and Q∗ R0,∗ with M (1) = Q0 and M (0) = Q∗ R0,∗ . We have M ′ (τ ) = Q∗ R0,∗ C1 − Q∗ R0,∗ + Q⊥ C2 ∈ V0 . By Mean Value Theorem on this curve, kvec(Q1 ) − vec(Q∗ R0,∗ )k2 = kvec(g(M (1))) − vec(g(M (0)))k2 √ ≤ sup DM (τ ) vec(M ′ (τ )) 2 ≤ α kvec(Q0 ) − vec(Q∗ R0,∗ )k2 . τ ∈[0,1] (v) We can define R1,∗ in a similar way as how R0,∗ is defined: R1,∗ := argmin kQ1 − Q∗ RkF . (A.12) R∈Sℓ,ℓ Note that Q1 is closer to Q∗ R1,∗ than to Q∗ R0,∗ . Then, kvec(Q1 ) − vec(Q∗ R1,∗ )k2 ≤ kvec(Q1 ) − vec(Q∗ R0,∗ )k2 ≤ √ α kvec(Q0 ) − vec(Q∗ R0,∗ )k2 . (vi) Furthermore, we can write Q1 as Q1 = Q∗ R0 C1,1 + Q⊥ C1,2 , where C1,1 ∈ ⊤ ⊤ Rℓ×ℓ , C1,2 ∈ R(m−ℓ)×ℓ and C1,1 C1,1 + C1,2 C1,2 = Iℓ . Following the same argu⊤ ments for R0,∗ , we have R1,∗ R0 C1,1 is symmetric. That is, Q1 can be expressed  as Q1 = Q∗ R1,∗ R⊤ 1,∗ R0 C1,1 + Q⊥ C1,2 . By similar arguments as in (iii)-(iv), we now work on D(Q∗ R1,∗ )vec(V ), where V ∈ V1 := {V : V = Q∗ R1,∗ S1 + Q⊥ S2 with symmetric S1 }, and similar derivations lead to √ kvec(Q2 ) − vec(Q∗ R2,∗ )k2 ≤ α kvec(Q1 ) − vec(Q∗ R1,∗ )k2 . 27 2 F Iteratively, we have kvec(Qt+1 ) − vec(Q∗ Rt+1,∗ )k2 ≤ ≤α t+1 2 √ α kvec(Qt ) − vec(Q∗ Rt,∗ )k2 kvec(Q0 ) − vec(Q∗ R0,∗ )k2 . (vii) Therefore, kvec(Qt ) − vec(Q∗ Rt,∗ )k2 converges to 0. This implies that ⊤ ⊤ ⊤ Qt Q⊤ t converges to Q∗ Rt,∗ Rt,∗ Q∗ = Q∗ Q∗ , which is independent of t. It further implies that X(Qt ) converges to 0, and then C(Qt ) to Iℓ . Finally, this leads to the convergence of Qt . A.9. Proof of Lemma 4.2 and Theorem 4.3. Proof of Lemma 4.2 is given below. For Q ∈ Sm,ℓ , we have kU ΛU ⊤ − QQ⊤ k2F = kΛ − U ⊤ QQ⊤ U k2F . Because U ⊤ Q ∈ Sm,ℓ , U ⊤ QQ⊤ U is a rank-ℓ projection matrix. The best rank-ℓ projection  I 0 ℓ matrix to approximate Λ is U ⊤ Qopt Q⊤ . This fact suggests that opt U = 0 0 ⊤ Qopt Q⊤ opt = Uℓ Uℓ . Proof of Theorem 4.3 is given below. (a) From Theorem 4.1, we know that P ⊤ ⊤ with probability one. By Theorem 2.2 and P = N1 N i=1 Q[i] Q[i] converges to U ΛU ⊤ Lemma 4.2, we have that Q Q converges to Uℓ Uℓ⊤ with probability one. (b) Because ⊤ ⊤ → Uℓ Uℓ⊤ with probability one, we have Q Q A → Uℓ Uℓ⊤ A = Uℓ Σℓ Vℓ⊤ ⊤ b ℓ Vb ⊤ , and Q Q⊤ A = QW b ℓ Vb ⊤ = cℓ Σ cℓ Σ with probability one. Note that Q A = W ℓ ℓ b ℓ Vb ⊤ → Uℓ Σℓ V ⊤ with probability one. By the bℓ Σ b ℓ Vb ⊤ . Specifically, we have U bℓ Σ U ℓ ℓ ℓ continuity of left singular vectors as functions of the matrix A, which has distinct b j converges with probability one to uj up to leading ℓ singular values, we have that u b⊤ a sign change. Specifically, u j uj → 1.  P ⊤ b j as u b j = hj N1 N A.10. Proof of Theorem 4.5. Denote u i=1 Q[i] Q[i] . Then, by SLLN QQ uj = lim hj N →∞ N  1 X Q[i] Q⊤ [i] = hj N i=1 N  1 X ⊤ Q[i] Q⊤ [i] = hj (U ΛU ). N →∞ N i=1 lim To apply the delta-method, we need to compute the derivative ∆j . Let M := U ΛU ⊤ . Since uj is the jth eigenvector, we have M uj = λj uj , where u⊤ j uj = 1. Let Ṁ denote a small perturbation to M , and u̇j and λ̇j be corresponding perturbations. Consider small perturbations to both sides of the equation above. Then, Ṁ uj + M u̇j = λ̇j uj + λj u̇j , where u⊤ j u̇j = 0. Rearrange the equation above, and we have + (λj Im − M ) u̇j = Ṁ uj − λ̇j uj . (A.13) Let (λj Im − M ) be the Moore-Penrose pseudo it to both sides of   inverse. Multiply + + Equation (A.13), we have u̇j = (λj Im − M ) Ṁ uj − λ̇j uj = (λj Im − M ) Ṁ uj .  ⊤  + Then, u̇j = uj ⊗ (λj Im − M ) vec(Ṁ ). Therefore, ∆j =  ∂uj + ⊤ ⊤ + = u⊤ . (A.14) j ⊗ (λj Im − M ) = uj ⊗ λj Im − U ΛU ⊤ ∂vec(M ) The asymptotic normality can be obtained by a straightforward application of the delta-method. 28
10math.ST
Pointwise convergence of ergodic averages of bounded measurable functions for amenable groups Xiongping Dai arXiv:1604.00611v3 [math.DS] 16 Jun 2016 Department of Mathematics, Nanjing University, Nanjing 210093, People’s Republic of China Abstract Given any amenable group G (with a left Haar measure | · | or dg), we can select out a Følner subnet {Fθ ; θ ∈ Θ} from any left Følner net in G, which is L∞ -admissible for G, namely, for any Borel G-space (X, X ) and any ϕ ∈ L∞ (X, X ), there exists some function ϕ∗ on X such that Z 1 Moore-Smith- lim ϕ(gx)dg = ϕ∗ (x) ∀x ∈ X and ϕ∗ = (gϕ)∗ ∀g ∈ G. θ∈Θ |F θ | F θ Moreover, if G is σ-compact such as a locally compact second countable Hausdorff amenable group, then ϕ∗ ∈ L∞ (X, X ), ϕ∗ (gx) = ϕ∗ (x) a.e., and ϕ∗ is a.e. independent of the choice of the L∞ -admissible Følner net {Fθ ; θ ∈ Θ} in G. Consequently, we may easily obtain: (1) a Universal Ergodic Disintegration Theorem; (2) the Khintchine Recurrence Theorem for σ-compact amenable group; (3) the existence of σfinite invariant Radon measures for any Borel action of an amenable group on a locally compact, σ-compact, metric space X by continuous maps of X; and (4) an L∞ -pointwise multiple ergodic theorem. Keywords: L∞ -pointwise (multi-) ergodic theorem · Ergodic decomposition · Recurrence theorem. 2010 MSC: Primary 37A30, 37A05; Secondary 37A15, 28A50, 22F50. 0. Introduction Følner sequences permit ergodic averages to be formed, and then the L p -mean and L1 pointwise ergodic theorems hold under “suitable conditions” for measure-preserving actions of σ-compact amenable groups; see [3, 43, 16, 11, 12, 15, 41, 35, 27, 10, 33, 6] and so on. Although the L1 -pointwise ergodic theorem has been well known over tempered Følner sequences since E. Lindenstrauss 2001 [27], yet there has been no one over Følner net for general amenable group that does not have any Følner sequence at all. On the other hand, is there any other kind of admissible Følner sequences for pointwise convergence but the tempered one? In this paper, we prove the L p -mean ergodic theorem, 1 ≤ p < ∞, over any Følner net (cf. Theorem 0.4); and moreover, for any amenable group G, we can select out some Følner Email address: [email protected] (Xiongping Dai) Preprint submitted to Nonlinearity (arXiv: 1604.00611v1 [math.DS], April 5) April 13, 2018 subnet from any Følner net in G, which is admissible for the L∞ -pointwise ergodic theorem for any Borel G-space X (cf. Theorem 0.5). An important setting that is beyond the ergodic theorems available in the literature is the topological action on a compact metric space X: • G y X, where G is a discrete uncountable abelian group. But our results are valid for this case. Consequently, as applications, we will present a new ergodic decomposition theorem for σcompact amenable groups by only a concise one-page proof (cf. Theorem 0.8), the Khintchine recurrence theorem for any continuous action of σ-compact amenable groups (cf. Theorem 0.9), a existence of σ-finite invariant measure (cf. Proposition 0.10), and a simple L∞ -pointwise convergence theorem of multiple ergodic averages for any topological module action on a measurable space (cf. Theorem 0.11). 0.1. Amenability By an amenable group, in one of its equivalent characterizations, it always refers to a locally compact Hausdorff (lcH) group G, with a left Haar measure mG (sometimes write | · | and dg if no confusion) on the Borel σ-field BG of G, for which it holds the left Følner condition [36]: for any compacta K of G and ε > 0, there exists a compacta F of G such that F is (K, ε)-invariant; i.e., |KF △ F| < ε|F|, where A △ B = (A \ B) ∪ (B \ A) is the symmetric difference. Recall from [36, Definition 4.15]) that a net {Kθ , θ ∈ Θ} (where (Θ, ≧) is a directed set) of compacta of positive Haar measure of G is called a summing net in G if the following conditions are satisfied: (1) Kθ ⊆ Kϑ if θ ≦ ϑ; S (2) G = θ∈Θ Kθ◦ where K ◦ is the interior of the set K; (3) limθ∈Θ |gKθ △ Kθ | · |Kθ |−1 = 0 uniformly for g on compacta of G. Here limθ∈Θ is in the sense of Moore-Smith limit; cf. [23]. Clearly, if G has a summing sequence it is σ-compact. From now on let G be an lcH group, then there holds the following very important lemma for our later arguments. Lemma 0.1 ([36, Theorem 4.16]). G is amenable if and only if there exists a summing net in G. G is a σ-compact amenable group if and only if there exists a summing sequence in G. We will need the following two basic concepts. Definition 0.2 ([36]). Let {Fθ ; θ ∈ Θ} be a net of compacta of positive Haar measure of G. (1) {Fθ ; θ ∈ Θ} is called a Følner net in G if and only if θ| = 0 ∀g ∈ G. • lim |gF|Fθ △F θ| θ∈Θ (2) {Fθ ; θ ∈ Θ} is called a K -Følner net (or uniform Følner net) in G if and only if θ| • lim |KF|Fθ △F = 0 for every compacta K of G. θ| θ∈Θ One can analogously define Følner sequence and K -Følner sequence in a σ-compact amenable group G. 2 A K -Følner sequence is simply called a Følner sequence in many literature like [27, 10]. Clearly, every K -Følner net/sequence in G must be a Følner net/sequence; but the converse is never true if G is not a discrete amenable group. In fact, one can easily construct a Følner sequence in R, with the usual Euclidean topology, that is not a K -Følner sequence (cf. [36, Problem 4.7]). We can then obtain the following fact from Lemma 0.1. Lemma 0.3. Every amenable group G has a (K -)Følner net in it. Moreover, if G is σ-compact, then it has a (K -)Følner sequence. Note that every subnet of a Følner net in G is also a Følner net in G. A non-σ-compact amenable group does not have any Følner sequence in it. For example, Rd , as a discrete abelian group, it is amenable but has no Følner sequence at all. 0.2. Ergodic theorems for amenable groups Let (X, X ) be a measurable space. By L∞ (X, X ), it denotes the Banach space composed of all the bounded X -measurable functions ϕ : X → R with the uniform convergence topology induced by the sup-norm kϕk∞ = supx∈X |ϕ(x)|. Let G yT X be a Borel action of an amenable group G on X, by X -measurable maps of X into itself, where T : (g, x) 7→ T g x or gx is the jointly measurable G-action map. In this case, X is called a Borel G-space. See §3.2 By M(G yT X) we mean the set of all the G-invariant probability measures on (X, X ). It is well known that if X is compact metrizable with X = BX and T is continuous, then M(G yT X) is non-void compact convex (cf. [14, 50]). In addition, independently of the Haar measure of G we can define, for 1 ≤ p < ∞, two linear closed subspaces of L p (X, X , µ): Fµp = {φ ∈ L p (X, X , µ) | T g φ = φ ∀g ∈ G} (0.1a) Nµp = {φ − T g φ | φ ∈ L p (X, X , µ), g ∈ G}, (0.1b) and where, for any g ∈ G, the Koopman operator T g : L p (X, X , µ) → L p (X, X , µ) associated to G yT X is defined by T g φ : X → X; x 7→ φ(T g x) for x ∈ X. We can then obtain the following L p -mean ergodic theorem, which generalizes the σ-compact amenable group case. Theorem 0.4. Let G yT X be a Borel action of an amenable group G on X and let µ belong to M(G yT X); then, for any 1 ≤ p < ∞, L p (X, X , µ) = Fµp ⊕ N µp . (0.2a) Moreover, for any Følner net {Fθ ; θ ∈ Θ} in G and any φ ∈ L p (X, X , µ), L p (µ)- lim θ∈Θ 1 |Fθ | Z T g φdg = P(φ). Fθ 3 (0.2b) Here P : Fµp ⊕ Nµp → Fµp (0.2c) is the projection with kPk ≤ 1. The statement also holds for σ-finite µ with µ(X) = ∞ when 1 < p < ∞. Remarks of Theorem 0.4. (1) For any Bore action of σ-compact amenable group G, the L p mean ergodic theorem, particularly L2 -case, over any summing sequence or K -Følner sequence {Fn } in G, has been showed since Bewley 1971 [3] and Greenleaf 1973 [16]. Also see [12, 15, 25, 26, 41, 27, 10] etc. However, Theorem 0.4 has no other restriction on the Følner sequence/net {Fθ ; θ ∈ Θ} in G. (2) One step in the recipe for proving L1 -pointwise ergodic theorem (cf. [33, §2.4]) is based on the following “fact”: R • |F1θ | Fθ T g φ(x)dg → φ(x) a.e. ∀φ ∈ Fµp . This is because if G is σ-compact, then for φ ∈ Fµp , one can find by Fubini’s theorem some µ-conull X0 ∈ X such that T g φ(x) = φ(x) mG -a.e. g ∈ G for any x ∈ X0 and thus Z 1 T g φ(x)dg = φ(x) ∀x ∈ X0 . |Fθ | Fθ However, if G is not σ-compact, then mG is not σ-finite and {Fθ ; θ ∈ Θ} is not countable. Thus the above “fact” is never a true fact. Since the action map T (g, x) is BG -measurable with respect to g for any fixed x in X, then for any compacta K of G and any observation ϕ ∈ L∞ (X, X ), by Fubini’s theorem we can well define the ergodic average of ϕ over K as follows: Z 1 ϕ(T g x)dg ∀x ∈ X. A(K, ϕ)(x) = |K| K Unlike the mean ergodic theorem, we can only obtain the L∞ -pointwise convergence over Følner subnet in G here. In this paper, we will only pay our attention to the following left-Haar-measure version which is more convenient for us to make use later on. Theorem 0.5. Let {Fθ′ ′ ; θ′ ∈ Θ′ } be any Følner net in any amenable group G. Then we can select out a Følner subnet {Fθ ; θ ∈ Θ} of {Fθ′ ′ ; θ′ ∈ Θ′ }, which is L∞ -admissible for G; namely, if G yT X is a Borel action of G on any X, then there is a continuous linear function A() : (L∞ (X, X ), k · k∞ ) → (RX , Tp-c ); ϕ 7→ ϕ∗ (0.3a) such that: ∀ϕ ∈ L∞ (X, X ), ϕ∗ = (T g ϕ)∗ ∀g ∈ G (0.3b) and lim A(Fθ , ϕ)(x) = ϕ∗ (x) θ∈Θ If G is abelian, then T g ϕ∗ = ϕ∗ for any g ∈ G. 4 ∀x ∈ X. (0.3c) Here RX is equipped with the product topology, i.e., the topology Tp-c of the usual pointwise convergence. Remarks of Theorem 0.5. (1) Here we cannot obtain that ϕ∗ (x) is X -measurable, since ϕ∗ is only a Moore-Smith limit of a net of measurable functions A(Fθ , ϕ); if limθ∈Θ is sequential, then the limit ϕ∗ is automatically X -measurable for any ϕ ∈ L∞ (X, X ) by the classical measure theory. Moreover, we cannot assert that ϕ∗ (x) is invariant too. However, this theorem is already useful for some questions; see, e.g., Theorem 0.6, Theorem 0.8 and Proposition 0.10 below for ergodic theory. (2) It should be noted here that it is illegal to arbitrarily take ϕ ∈ L∞ (X, X , µ) in place of ϕ ∈ L∞ (X, X ) in general, for mG does not need to be σ-finite and so we cannot employ Fubini’s theorem on G × X here. (3) The L p -mean ergodic theorem will play no role for proving Theorem 0.5 because of (2) in Remarks of Theorem 0.4. The following is an easy consequence of Theorems 0.4 and 0.5, in which we will not impose any additional restriction, like the Tempelman condition and the Shulman condition (cf. Remark (2) of Theorem 0.6 below), on the Følner sequences we will consider here. Theorem 0.6. Let G be an amenable group; then we can select out a Følner subnet {Fθ ; θ ∈ Θ} from any Følner net {Fθ′ ; θ′ ∈ Θ′ } in G, which is L∞ -admissible for G; namely, if G yT X is a Borel action of G on any X, then one can find a linear operator ϕ 7→ ϕ∗ from L∞ (X, X ) to RX (to L∞ (X, X ) if G is σ-compact by taking L∞ -admissible Følner sequence for G) such that for all ϕ ∈ L∞ (X, X ), • ϕ∗ = (T g ϕ)∗ ∀g ∈ G, • limn→∞ A(Fn , ϕ)(x) = ϕ∗ (x) ∀x ∈ X; • moreover, if M(G yT X) , ∅, then for each µ ∈ M(G yT X) – T g ϕ∗ (x) = ϕ∗ (x), µ-a.e., ∀g ∈ G, – ϕ∗ = P(ϕ) µ-a.e., and – if µ is ergodic, then ϕ∗ (x) ≡ R X ϕdµ for µ-a.e. x in X. Here P() is the projection for p = 1 as in Theorem 0.4. Remarks of Theorem 0.6. (1) The pointwise convergence at everywhere in Theorem 0.6 cannot be extended to L1 (X, X , µ) in stead of L∞ (X, X ). Let us consider the action of Z on the circle T = R/Z defined by T n : x 7→ x + nα (mod 1) where α is any fixed irrational number, and let ϕ(x) = x−1/2 ∈ L1 (T, BT , µ) where µ = dx. Then there is a summing sequence {S n ; n ∈ N} in Z so that lim sup n→∞ 1 X ϕ(T i x) = +∞ |S n | i∈S n 5 ∀x ∈ T; see [11, Theorem 1]. Now for any point x0 ∈ T we can find a Følner sequence {Fn′ ; n ∈ N} in Z such that 1 X lim ′ ϕ(T i x0 ) = +∞; n→∞ |F n | i∈F ′ n and then for any Følner subsequence {Fn } of {Fn′ }, there is no a desired limit ϕ∗ as in Theorem 0.6. In fact, Theorem 0.6 does not hold for L p (X, X , µ) instead of L∞ (X, X ), p < ∞, by [11, Proposition 5]. (2) The question of pointwise convergence of ergodic averages is much more delicate than mean convergence. When G is a second countable amenable group, in 2001 [27] Lindenstrauss proved the most general L1 -pointwise ergodic theorem that holds for G acting on Lebesgue spaces, over any K -Følner sequence {Fn ; n ∈ N} satisfying the so-called S Shulman/tempered Condition [41, 27]: k<n Fk−1 Fn ≤ C|Fn | for some C > 0 and all n ≥ 1. This condition is weaker than the so-called Tempelman Condition for summing sequence: Fn−1 Fn ≤ C|Fn | for some C > 0 and all n ≥ 1, needed in [3, 43, 11, 35] and so on. • The first point of our Theorem 0.6 is over Følner sequence neither K -Følner nor summing sequences. Although one can select out a tempered K -Følner subsequence from any K -Følner sequence (cf. [27, Proposition 1.4]), yet we cannot select out a tempered K -Følner subsequence from any Følner sequence that is not of K -Følner. • The other point is that our amenable group G we consider here is not necessarily second countable. The second countability is an important condition for Lindenstrauss’s basic covering result [27, Lemma 2.1] which is used in his proof of the L1 -pointwise ergodic theorem. So our Theorem 0.6 is not a consequence of Lindenstrauss’s L1 -pointwise ergodic theorem nor of his proving. In other words, there are other non-tempered Følner sequences which are admissible for L∞ -pointwise convergence. (3) A. del Junco and J. Rosenblatt showed in [21] that on every nontrivial Lebesgue space (X, B, µ) one can find an ergodic Z-action and some ϕ ∈ L∞ (X, B, µ) such that A(Fn′ , ϕ)(x) does not have a limit almost everywhere over the Følner sequence {Fn′ ; n ∈ N} in Z defined by Fn′ = n2 , n2 + 1, . . . , n2 + n that satisfies Tempelman’s condition but is not increasing. However, by our Theorem 0.6, it follows that we can always find some Følner subsequence {Fn } of {Fn′ } such that A(Fn , ϕ)(x) → ϕ∗ (x) a.e. (µ). This shows that the pointwise convergence is very sensitive to the choice of the Følner sequence in G. (4) The continuity of the Moore-Smith limit A() : L∞ (X, X ) → RX ; ϕ 7→ ϕ∗ in Theorem 0.5 is a new ingredient for non-ergodic systems; and it is another important point that ϕ∗ (x) is defined at everywhere x in X (not only a.e.) for any bounded observation ϕ (This point will be needed in Lemma 0.7 below); moreover, ϕ∗ does not depend on any invariant measure µ. These points are new observations in ergodic theory, since here G yT X is not assumed to be unique ergodic and even not topological. 6 We will provide a little later some applications of Theorem 0.5 and its proof idea in, respectively, §0.3.1 for probability theory, §§0.3.2, 0.3.3 and 0.3.4 for ergodic theory, and §0.3.5 for the L∞ -pointwise convergence of multiple ergodic averages of amenable module actions. Some further applications such as for product of amenable groups and quasi-weakly almost periodic points will be presented later in §3.5 and §4. Outline of the proof of Theorems 0.5 and 0.6 Since K. Yosida and S. Kakutani 1939 [48] the maximal ergodic theorem (or maximal inequality) has played an essential role in the proofs of the L p -pointwise ergodic theorems (cf. e.g., [43, 41, 27, 33, 5] etc.). In our situation, however, relative to a left Følner net {Fθ ; θ ∈ Θ} in G, yet there is no such a maximal inequality and even though M ∗ ϕ(x) := supθ∈Θ |A(Fθ , ϕ)(x)|, for ϕ ∈ L∞ (X, X ), is not X -measurable (cf. [33, §2.3.1]). Thus we here cannot expect to use the standard recipe for proving L p -pointwise ergodic theorems for 1 ≤ p < ∞ (cf. [33, §2.4]). In §3.2 not involving any ergodic theory, we will first prove the everywhere L∞ -pointwise convergence, by only using the classical Arzelá-Ascoli theorem, A(Fθ , ϕ)(x) → ϕ∗ (x) ∀x ∈ X, ∀ϕ ∈ L∞ (X, X ), for some Følner subnet {Fθ ; θ ∈ Θ} that relies on G yT X but not on the observation ϕ(x). To obtain a L∞ -admissible Følner subnet in G thatQis independent of an explicit Borel G-space X, we need to consider a “big” Borel G-space X = λ Xλ which is just the product space of all Borel G-spaces Xλ . See §3.3. But, since T h T g ϕ = T gh ϕ , T hg ϕ and mG is only a left Haar measure of G, we cannot deduce the G-invariance, and specially the measurability, of the Moore-Smith limit ϕ∗ . To obtain the invariance and measurability, we will need to utilize in §3.3 the mean ergodic theorem (i.e. Theorem 0.4) which will be proved in §2 using classical functional analysis (cf. §1). In other words, the L p -mean ergodic theorem will play a role in proving Theorem 0.6. Note that the mean ergodic theorem early played a role for a.e. L1 -pointwise convergence in [46, 47, 11] in a different way based on Banach’s convergence theorem. However, the latter is invalid in our situation because of having no the “L∞ -mean ergodic theorem” condition lim kA(Fn , ϕ) − ϕ∗ k∞,µ = 0 n→∞ as the condition (4) of [47, Theorem XIII.2.1] and of L∞ (X, X ) is never a subset of second category of (L1 (X, X , µ), k · k1 ). This means that even for Theorem 0.6, the standard recipe for proving L p -pointwise ergodic theorems for 1 ≤ p < ∞ is not valid here. 0.3. Applications We will present four applications of Theorem 0.5 and its proof methods here. Our L∞ pointwise convergence at everywhere is an important point for our arguments. 0.3.1. Universal conditional expectations We now present our first application of Theorems 0.5 and 0.6 in probability theory and ergodic theory. As in Theorem 0.6, let G yT X be a Borel action of an amenable group G on a measurable space (X, X ). Set  XG = B ∈ X | T g−1 [B] = B ∀g ∈ G 7 and   XG,µ = B ∈ X | µ T g−1 [B] △ B = 0 ∀g ∈ G ∀µ ∈ M(G yT X) which both form σ-subfields of X . Then P(φ) = Eµ (φ|XG,µ ) for φ ∈ L1 (X, X , µ) by Theorem 0.4; moreover, function φ is XG -measurable if and only if T g φ = φ ∀g ∈ G. Now by Theorems 0.5 and 0.6, we can obtain the following, which says that XG is sufficient to the family M(G yT X). Lemma 0.7. Let G be σ-compact amenable and X a Borel G-space with M(G yT X) , ∅. Then there exists a bounded linear operator E : L∞ (X, X ) → L∞ (X, X ) such that (1) kE()k ≤ 1, (2) E(φ) = φ if φ ∈ L∞ (X, XG ), and (3) for any µ ∈ M(G yT X), E(φ) is a version of Eµ (φ|XG,µ ) (i.e. E(φ) = Eµ (φ|XG,µ ) µ-a.e.) for any φ ∈ L∞ (X, X ). Proof. Define E : ϕ 7→ ϕ∗ for each ϕ ∈ L∞ (X, X ) where ϕ∗ is given as in Theorem 0.6 based on some L∞ -admissible Følner sequence, say {Fn ; n = 1, 2, . . . } for G. Then (1) and (2) of Lemma 0.7 both hold automatically. To check (3), let µ ∈ M(G yT X) and B ∈ XG,µ be arbitrary. Then by Theorem 0.6 and Fubini’s theorem follows that for φ ∈ L∞ (X, X ), Z Z Z 1 E(φ)dµ = lim 1B(x)T g φ(x)dµ(x)dg n→∞ |F n | F B X n Z Z 1 1B(T g x)φ(T g x)dµ(x)dg = lim n→∞ |F n | F X Z nZ 1 φdµdg = lim n→∞ |F n | F B n Z = φdµ B ∗ which proves (3) since φ = P(φ) a.e. is XG,µ -measurable by Theorem 0.6. In 1963 V. S. Varadarajan showed a universal conditional expectation theorem for any locally compact second countable Hausdorff (abbreviated to lcscH) group G by using harmonic analysis combining with the martingale theory [44, Theorem 4.1]. Here our ergodic-theoretic proof is very concise by using sufficiently the σ-compact amenability without assuming the second countability axiom. On the other hand, since the L1 -pointwise ergodic theorem of Lindenstrauss is for lcscH group and is for a.e. convergence, not for everywhere convergence as in our Theorem 0.6, hence the classical L p -pointwise ergodic theorems in the literature cannot play a role in the proof of Lemma 0.7 in place of Theorem 0.6. 0.3.2. Universal ergodic disintegration of invariant measures We now turn to the important decomposition of an invariant probability measure into ergodic components. Let’s consider a Borel G-space X, where G is an lcH group and X a compact Hausdorff space with X = BX the Borel σ-field. As usual, µ ∈ M(G y X) is said to be ergodic if and only if the 0-1 law holds: 8 • µ(B) = 0 or 1 ∀B ∈ XG,µ .1 The classical Ergodic Decomposition Theorem of Farrell-Varadarajan [13, 44] claims that if X is (G-isomorphically) compact metrizable and G is lcscH, then every µ ∈ M(G y X) has a.s. uniquely an ergodic disintegration β : x 7→ µ x . See also [10, Theorem 8.20]. However, if G is not second countable, then the methods developed in [13, 44, 10] are all invalid. Moreover, if (X, X , µ) is not (isomorphically) a compact metrizable probability space, then there exists no a disintegration of µ in general; see, e.g., [8] for counterexamples. Our Theorem 0.8 below shows that a universal ergodic disintegration (good for all µ ∈ M(G y X)) is always existent if X is G-isomorphically a compact metric space. Let M (X) consist of all the Borel probability measures on X endowed with the customary topology as follows: R • the function µ 7→ µ( f ) = X f dµ is continuous, for any fixed f ∈ C(X). Now based on Theorem 0.6 and Lemma 0.7, we can then concisely obtain a universal ergodic disintegration in a very general situation. Theorem 0.8. Let G yT X be a Borel action of a σ-compact amenable group G by continuous transformations of a compact metric space X to itself such that M(G yT X) , ∅. Then there exists an X -measurable mapping β : X → M(G yT X); x 7→ β x such that for any µ ∈ M(G yT X), (1) for any φ ∈ L1 (X, X , µ), it holds that  R (a) φ ∈ LR1 (X, X , β x ) and x ∈ X; R X φdβ xR= REµ φ|XG,µ (x) for µ-a.e. (b) µ = X β x dµ(x), i.e. X ϕdµ = X X ϕdβ x dµ(x) ∀ϕ ∈ L1 (X, X , µ); (2) moreover, β x satisfies the 0-1 law (i.e. β x is ergodic to G yT X) for µ-a.e. x ∈ X. Namely {β x ; x ∈ X}, characterized by (1), is a “universal ergodic disintegration” of G yT X. Proof. For the convenience of our later arguments in §0.3.4 we will illustrate our proof by dividing into three steps. Step 1. A universal construction. Let ϕ 7→ ϕ∗ from L∞ (X, X ) to RX be as in Theorem 0.6 associated to some L∞ -admissible Følner sequence {Fn }∞ 1 for G. Then for any x ∈ X, we can define a positive linear functional L x : C(X) → R by ϕ 7→ ϕ∗ (x) such that L x (1) = 1. By the Riesz representation theorem, it follows that for any x ∈ X, there exists a (unique) probability measure, write β x , on X (= BX ) such that Z ϕdβ x ∀ϕ ∈ C(X), L x (ϕ) = X and β x is independent of any µ in M(G yT X). Given any ϕ ∈ C(X), clearly x 7→ β x (ϕ) = ϕ∗ (x) is X -measurable by Theorem 0.6. Hence X ∋ x 7→ β x ∈ M (X) is X -measurable. 1 It should be noted here that sometimes µ is called ergodic if weakly µ(B) = 0 or 1 ∀B ∈ X . If G is lcscH, then the G two cases are equivalent to each other; see, e.g., [44, 13, 37]. However, in general, the latter is weaker than the former for XG ( XG,µ in general; see [13] and [37, §12] for a counterexample. 9 In order to check the G-invariance of β x , for any h ∈ G and ϕ ∈ C(X), we can see T h ϕ ∈ C(X) and that Z Z Z 1 1 ϕdβ x = lim T g ϕ(x)dg = lim T hg ϕ(x)dg n→∞ |F n | hF n→∞ |F n | F X n n Z 1 = lim T g T h ϕ(x)dg n→∞ |F n | F n Z T h ϕdβ x = X which implies that T h β x = β x . Thus, β x ∈ M(G yT X). (This also proves the classical result of M. Day: M(G yT X) , ∅.) Step 2. Checking property (1). First the property (b) is valid whenever (a) is true. Noting the property (a) holds, for any φ ∈ C(X), by Lemma 0.7. The general L1 -case follows from the standard approximation theorem and the Lebesgue dominated convergence theorem P of conditional 1 expectation (cf., e.g., [15, pp. 109]). Indeed, for φ ∈ L (X, X , µ) note that φ = n φn , µ-a.e., P k1 < ∞. φn ∈ C(X) where n kφnP Set A = {x : φ(x) , n φn (x)}. Then µ(A) = 0 and let An be open neighborhoods of A with An ⊃ An+1 and µ(An ) → 0. Let χn ∈ C(X) such that χn = 0 outside An and 0 < χn ≤ 1 on An . For each ε > 0, the power χεn is continuous and  Z Z Z ε χεn dµ ≤ µ(An ). χn dβ x dµ(x) = X X Letting first ε → 0 and then n → ∞, we find  Z Z Z Z ε 0 = lim lim χn dβ x dµ(x) = lim β x (An )dµ(x) = β x (∩n An )dµ(x). n→∞ ε→0 n→∞ X X X P Hence β x (A) = n φn , β x -a.e., for µ-a.e.  φP P x ∈ X.  P = 0 for µ-a.e. x ∈ X. This implies that E(|φ ||X )(x) = that X0 := x : Next, n kE(|φn ||XG,µ )k1 < ∞, so P n G,µ n β x (|φn |) < ∞ n is of µ-measure one. Now for x ∈ X0 , n |φn | ∈ L1 (X, X , β x ), and so Z X ! XZ φn dβ x . φn dβ x = X We also have µ-a.e. x ∈ X, Z Since φ = Z P n X φn dβ x = E(φn |XG,µ )(x), so that ! X X φn dβ x = E(φn |XG,µ )(x) (µ-a.e. x ∈ X). X n n φn (β x -a.e.), we find φdβ x = X X R n n X E(φn |XG,µ )(x) = E n X φn |XG,µ n This proves the property (b). 10 ! (x) = E(φ|XG,µ )(x) (µ-a.e. x ∈ X) Step 3. Checking property (2). Finally, we will proceed to prove the property (2). For this, let µ ∈ M(G yT X) be any given. By the property (1), it follows that for any B ∈ XG,µ ,  β x (B) = Eµ 1B |XG,µ (x) = 1 B (x) (µ-a.e. x ∈ X). That is to say, for B ∈ XG,µ , we have 1B ≡ β x (B) β x -a.e., for µ-a.e. x ∈ X. Thus, if ϕ ∈ L∞ (X, X ) is XG,µ -measurable, then Z ϕ≡ ϕdβ x , β x -a.e., (µ-a.e. x ∈ X). X Let B = {B1 , B2, . . . } be a countable algebra of X -subsets of X with σ(B) = X and E be as in Lemma 0.7. Then one can find some Eµ ∈ X with µ(Eµ ) = 1 such that for all x ∈ Eµ and B ∈ B, Z Z  β x -a.e. E(1 B) ≡ E(1 B )dβ x = Eβx 1B XG,βx dβ x = β x (B). X X Now for any x ∈ Eµ and any I ∈ XG,βx , choose a sequence Bnk ∈ B with 1Bnk → 1I a.e. (β x ); and then     β -a.e. β x -a.e. x β x (I) = lim β x (Bnk ) = lim Eβx 1Bnk XG,βx = Eβx lim 1Bnk XG,βx k→∞ k→∞ k→∞  β x -a.e. = Eβx 1I XG,βx = 1I β x -a.e. by Lemma 0.7 and β x ∈ M(G yT X). So β x (I) = 0 or 1 and thus β x is ergodic for any x ∈ Eµ . This therefore proves Theorem 0.8. In Theorem 0.8 G is not assumed commutative. The σ-compactness is needed in Theorem 0.8 to guarantee the measurability of β x and Lemma 0.7. We now conclude §0.3.2 with some remarks on Theorem 0.8. Remarks of Theorem 0.8. (1) In Theorem 0.8, our disintegration {β x , x ∈ X} is independent of µ and it is in fact a.s. unique. (2) Each invariant component β x is constructed over a same L∞ -admissible Følner sequence {Fn }∞ 1 for G. It should be noted that disintegration {β x ; x ∈ X}Ris important in many aspects of ergodic theory; for example, for defining fiber product Y µy ⊗ µy dν of a G-factor π : (X, X , µ) → (Y, Y , ν) with π−1 [Y ] = XG,µ in Furstenberg’s theory [15]. (3) If G acts by continuous maps on a compact metric space X, then one can obtain an ergodic integral representation for any µ ∈ M(G y X) by Choquet’s theorem (cf. [37, §12]); but no the disintegration {β x ; x ∈ X}. (4) Let G be a σ-compact amenable group, which is not second countable. Then the FarrellVaradarajan theorem plays no role in this case. Moreover, since G is not metrizable (otherwise it is second countable), hence [10, Theorem 8.20] cannot play a role too. (5) If G is not amenable, then Theorem 0.8 does not need to be true. For example, for G we take the discrete group of all permutations of N and we naturally act it on the compact metric space {0, 1}N (cf. [14, 44]). 11 0.3.3. A Khintchine-type recurrence theorem Let R be equipped with the standard Euclidean topology. Then A. Y. Khintchine’s recurrence theorem says that (cf. [24, 32]): • If R yT X is a continuous action of R on a compact metric space X preserving a Borel probability measure µ, then for any E ∈ BX with µ(E) > 0, the set  t ∈ R | µ(E ∩ T −t E) > µ(E)2 − ε , ∀ε > 0, is relatively dense in R V. Bergelson, B. Host and B. Kra have recently derived in 2005 [2] the following multiple version of Khintchine’s theorem, only valid in ergodic Z-action Z yT X: • {n ∈ Z | µ(E ∩ T −n E ∩ T −2n E) > µ(E)3 − ε} and {n ∈ Z | µ(E ∩ T −n E ∩ T −2n E ∩ T −3n E) > µ(E)4 − ε}, each of the above two sets is relatively dense in Z. Using Theorems 0.4, 0.6 and 0.8 and differently with [24, 32], we may now generalize Khintchine’s theorem from R-actions to amenable-group actions as follows: Theorem 0.9. Let G yT X be a µ-preserving Borel action of a σ-compact amenable group G, by continuous transformations on a compact R metric space X, not necessarily ergodic. Then for any ϕ ∈ L2 (X, BX , µ) with ϕ ≥ 0 a.e. and X ϕdµ > 0, the set ) (  Z Z 2 H(ϕ, ε) = g∈G ϕ(x)ϕ(T g x)dµ(x) > −ε , ϕdµ ∀ε > 0, X X is of positive lower Banach density; i.e., H(ϕ, ε) has positive lower density over any Følner sequence {Fn }∞ 1 in G. This implies that H(ϕ, ε) is syndetic in G. Proof. Let {Fn }∞ 1 be any Følner sequence in G. Let {β x , x ∈ X} be the universal ergodic disintegration of G yT X by Theorem 0.8. Then for µ-a.e. x0 ∈ X, by using Theorem 0.6 for β x0 in place of µ, Z Z  1 lim T g ϕ(x)dg = ϕ∗ (x) = in (L2 (X, X , β x0 ), k  k2 ) . ϕdβ x0 n→∞ |F n | F X n Furthermore, 1 n→∞ |F n | lim Z Z Fn X 2  Z ϕdβ x0 . ϕ(x)ϕ(T g x)dβ x0 (x) dg = X Therefore by Theorem 0.8, Fatou lemma, Fubini’s theorem and Jensen’s inequality, we can obtain that 2  Z Z Z Z 1 ϕdβ x0 dµ(x0 ) ϕ(x)ϕ(T g x)dµ(x) dg ≥ lim inf n→∞ |F n | F X X X n 2 Z Z ϕdβ x0 dµ(x0 ) ≥ X = 12 Z X X 2 ϕdµ . This means that for any ε > 0, the set H(ϕ, ε) has positive lower density over {Fn }∞ 1 in G. The proof of Theorem 0.9 is thus completed, for {Fn }∞ is arbitrary. 1 A special important case is that ϕ(x) = 1 B (x) for B ∈ BX with µ(B) > 0. Moreover, since here G is not necessarily an abelian group and so there is no an applicable analogue of HerglotzBochner spectral theorem (cf. [28, Theorem 36A] for locally compact abelian group) for the correlation function g 7→ hϕ, T g ϕi from G to C, our proof of Theorem 0.9 is of somewhat interest itself. We will consider the recurrence theorem in the case that G is not σ-compact in §4.2. 0.3.4. Existence of σ-finite invariant measures Replacing C(X) by Cc (X) = {φ : X → R | φ continuous with supp( f ) compact} in the above proof of Theorem 0.8, we in fact have proved the following byproduct, which generalizes the classical theorems of Kryloff-Bogoliouboff and of Day. Proposition 0.10 (σ-finite invariant measure). Let G yT X be a Borel action of an amenable group G by continuous maps of a “locally compact Hausdorff space” X to itself such that • ϕ∗ (x) . 0 for some ϕ ∈ Cc (X) over some Følner net {Fθ ; θ ∈ Θ} in G. Then there exists a nontrivial Borel measure µ on X with the following properties: (i) µ(K) < ∞ for every compact set K ⊆ X; (ii) µ(E) = inf{µ(V) : E ⊆ V, V open} for every E ∈ BX ; (iii) µ(E) = sup{µ(K) : K ⊆ E, K compact} for every open set E and for each E ∈ BX with µ(E) < ∞; and R R (iv) for every g ∈ G, X φdµ = X T g φdµ for each φ ∈ Cc (X). In particular, if X is a locally compact σ-compact metric space, then µ is a σ-finite invariant measure for G yT X. Proof. As in Step 1 of the proof of Theorem 0.8, it is easy to see that there exists a nontrivial Borel measure µ on X with the properties (i)–(iv). Now let X be an lc, σ-compact metric space. We first need to prove that µ is quasi-invariant for G yT X:  • ∀E ∈ BX and g ∈ G, µ(E) > 0 ⇔ µ T g−1 E > 0. If µ(E) > 0; then one can find some compact set K ⊆ E, µ(K) > 0 and φn ∈ Cc (X) with φn = 1 on K, 0 ≤ φn ≤ 1 and φn (x) ց 1K (x). By φn (T g x) → 1K (T g x) and (iv), it follows that Z Z Z  −1 µ Tg E ≥ 1K (T g x)dµ = lim φn (T g x)dµ = lim φn dµ ≥ µ(K) > 0. (0.4) X n→∞ n→∞ X X Conversely, if µ T g−1 E > 0, then by the above argument with E ′ := T g−1 E in place of E and  h := g−1 in place of g, we can see that 0 < µ T h−1 E ′ = µ(E). Thus µ is quasi-invariant for G yT X.  In fact, (0.4) also implies that µ T g−1 E ≥ µ(E) for any g ∈ G. Thus, µ is invariant. This proves Proposition 0.10.  13 Clearly, Day’s fixed-point theorem and Kryloff-Bogoliouboff’s construction proofs, for any amenable group G acting continuously on a compact metric space X, both does not work for proving the existence of a σ-finite ∞-invariant measure here; this is because the convex set of probability measures on X is not compact for X is not compact. In fact, we may read Proposition 0.10 as follows: • Let G yT X be a Borel action of an amenable group G, by continuous maps, on a locally compact σ-compact metric space X. If G yT X does not have any σ-finite invariant measure, then the Moore-Smith limit ϕ∗ ≡ 0 for any ϕ ∈ Cc (X) over any L∞ -admissible Følner net {Fθ ; θ ∈ Θ} in G; i.e., G yT X is dissipative. Clearly, this proposition has some interests of its own. 0.3.5. L∞ -Pointwise multi-ergodic theorem for topological modules In what follows, G is called a topological R-module if and only if G is a module over a ring (R, +, ·) such that • G is a topological group, (R, +, ·) is such that (R, +) is an lcH abelian group with a fixed Haar measure | · | or dt, and the scalar multiplication (t, g) 7→ tg from R × G to G is continuous. We now consider a Borel action of a topological R-module G on a measurable space (X, X ), T : G × X → X or write G yT X. Given any g ∈ G and t ∈ R, we customarily write T gt : X → X; x 7→ T gt x = T tg x ∀x ∈ X. Now for any g1 , . . . , gl ∈ G and any compacta K of R with |K| > 0, for any ϕ ∈ L∞ (X, X ), we may define the multiple ergodic average of ϕ over (g1 , . . . , gl ; K) as follows: Z 1 T t ϕ(x) · · · T gt l ϕ(x)dt ∀x ∈ X Ag1 ,...,gl (K, ϕ)(x) = |K| K g1 Z 1 = ϕ(T tg1 x) · · · ϕ(T tgl x)dt. |K| K Our methods developed for Theorem 0.5 is also valid for the following multiple ergodic theorem. Theorem 0.11. Let G be a topological R-module; then we can select out a subnet {Kθ ; θ ∈ Θ} from any net {Kθ′′ ; θ′ ∈ Θ′ } of positive Haar-measure compacta of (R, +) such that, if G yT X is a Borel action of G on X, then for any g1 , . . . , gl ∈ G and any ϕ ∈ L∞ (X, X ), lim Ag1 ,...,gl (Kθ , ϕ)(x) = Ag1 ,...,gl (ϕ)(x) ∀x ∈ X, θ∈Θ where Ag1 ,...,gl () : (L∞ (X, X ), k·k∞) → (RX , Tp-c ) is continuous. Moreover, if (R, +) is σ-compact and (X, X ) is countably generated, then for any ϕ ∈ L∞ (X, X ), weakly Ag1 ,...,gl (Kθ , ϕ) −−−−−→ Ag1 ,...,gl (ϕ) in L2 (X, X , µ) for any µ ∈ M(G yT X) if M(G yT X) , ∅. 14 Proof. This follows easily from a slight modification of the proof of Theorem 3.3 presented in §3.2 by noting Z 1 Ag1 ,...,gl (K, ϕ)(x) − Ag1 ,...,gl (K, ψ)(x) ≤ ϕ(T gt 1 x) · · · ϕ(T gt l x) − ψ(T gt 1 x) · · · ψ(T gt l x) dt |K| K l−1 X l−1−k kϕ − ψk∞ kϕk∞ kψkk∞ ≤ k=0 in place of (3.2). So we omit the details. The interesting point of Theorem 0.11 lies in that {Kθ , θ ∈ Θ} is independent of any observations ϕ in L∞ (X, X ). However, we have lost the independence (with subnets) and invariance of Ag1 ,...,gl (ϕ) in general. Of course, if we are only concerned with the classical case that R = Z and T gn1 = T n , T gn2 = T 2n , . . . , T gnl = T ln for a µ-preserving map T or T gn1 = T 1n , T gn2 = T 22n , . . . , T gnl = T lln for µ-preserving commuting maps T 1 , T 2 , . . . , T l , then combining with the multiple L2 -mean ergodic theorems of Host-Kra [19] (also Ziegler [49]) or of Tao [42] (also Austin [1]) we can see AT,T 2 ,...,T l (ϕ) or AT 1 ,T 2 ,...,T l (ϕ) is X -measurable and independent of the choice of Følner subsequence. Corollary 0.12. Let T 1 , . . . , T l be l commuting µ-preserving automorphism of X. Then one can select out a Følner subsequence {Fn } from any Følner sequence {Fn′ ′ } in (N, +) such that for any ϕ ∈ L∞ (X, X ), 1 X ϕ(T 1i x) · · · ϕ(T li x) = AT 1 ,...,T l (ϕ)(x) µ-a.e. n→∞ |F n | i∈F lim n ∞ with AT 1 ,...,T l (ϕ) ∈ L (X, X , µ) is independent of the choice of the subsequence {Fn }. We note that if the L∞ -pointwise convergence is required for the previously given Følner net itself, not over its Følner subnet, then the question is much harder and more delicate; see, e.g., [4] for 2-tuple commuting case and [20] for ergodic distal systems. Question 0.13. In Theorem 0.11, if we consider the sequential limit over a Følner sequence in a σ-compact (R, +), then it is possible that Ag1 ,...,gl (ϕ) is a.e. independent of the choice of the L∞ -admissible Følner subsequences. 1. The adjoint operators, null spaces and range spaces Let E be a Banach space and let L (E) denote the space of all continuous linear operators of E into itself. By E ∗ we denote the dual Banach space of E, which consists of all the bounded linear functionals of E. For x ∈ E and φ ∈ E ∗ , write φ(x) = hx, φi if no confusion. Recall that E is called reflexive if and only if E = E ∗∗ . In this section we will prove a preliminary theorem (Theorem 1.2 below). 15 1.1. Orthogonal complements, projection and adjoint operators Let H be a subset of E. Then we define H ⊥ = {φ ∈ E ∗ | hx, φi = 0 ∀x ∈ H}. ⊥ Clearly, H ⊥ = H is a closed linear subspace of E ∗ . A continuous linear operator P of E into itself satisfying P2 = P is called a projection of E to itself (cf. [30, Definition 6.1]). Given any T ∈ L (E), we define a continuous linear operator of E ∗ , T ∗ : E ∗ → E ∗ , by φ 7→ φ ◦ T , which is called the adjoint to T , such that kT ∗ k = kT k and (T L)∗ = L∗ T ∗ ∀T, L ∈ L (E). Moreover it holds that hT x, φi = hx, T ∗ φi ∀x ∈ E, φ ∈ E ∗ and T ∈ L (E). See, for example, [30, II.2] and [39, VI.2]. The following simple lemma will be useful in our proof of the mean ergodic theorem in §2. Lemma 1.1. Let G be an lcH group with a left Haar measure mG and {T g ; g ∈ G} a family of continuous linear operators of a reflexive Banach space E to itself satisfying conditions: (I) T h (T g x) = T gh x ∀g, h ∈ G, x ∈ E; (II) for x ∈ E and y∗ ∈ E ∗ , g 7→ hT g x, y∗ i is a Borel function on G; (III) for x ∈ E and y∗ ∈ E ∗ , g 7→ hT g x, y∗ i is mG -integrable restricted to any compacta of G.  Then T g∗−1 , g ∈ G is also such that (I), (II) and (III) with E ∗ in place of E. Proof. Let g, h ∈ G be arbitrary. Then ∗ T g∗−1 T h∗−1 = (T h−1 T g−1 )∗ = (T g−1 h−1 )∗ = T (hg) −1 . Thus T g∗−1 is contravariant in g. Next for any y∗ ∈ E ∗ and any x ∈ E ∗∗ = E, the function g 7→ hT g∗−1 y∗ , xi = hy∗ , T g−1 xi is obviously Borel measurable on G by (II). Thus g 7→ T g∗−1 is weakly measurable. Finally by Z T g−1 dg K ∗ = Z K T g∗−1 dg  for any compact set K of G, we can conclude that T g∗−1 completes the proof of Lemma 1.1. 16 g∈G satisfies condition (III) on E ∗ . This 1.2. Vanishing space and range space Let T = (T θ )θ∈Θ be a family of continuous linear operators of E to itself, where Θ is not necessarily a directed set. The vanishing space of T , written V(T ), is the set of vectors x ∈ E such that T θ x = 0 for all θ ∈ Θ. It is clear that \ ker(T θ ) V(T ) = θ∈Θ is a closed linear subspace of E. By the range of T ∈ L (E), write R(T ), is meant the set of vectors y of the form y = T x. Clearly R(T ) is a linear subspace. However, it need not be closed. Let R(T ) represent the minimal closed linear manifold that contains the ranges of all T θ , i.e., R(T ) = span{R(T θ ), θ ∈ Θ}, which is referred to as the closure of the range of T . 1.3. Preliminary theorem The following result is very important for proving our Theorem 0.4 in the next section, which is an extension of a theorem of E. Lorch [29, Theorem 1] or [30, Theorem 8.1] for a single operator of the reflexive Banach space E. Theorem 1.2. Let E be a reflexive Banach space and T = (T θ )θ∈Θ a family of continuous linear operators of E to itself. Let V(T ) and R(T ) denote the vanishing space and the closure of the range of T , respectively. Let T ∗ = (T θ∗ )θ∈Θ , V(T ∗ ) and R(T ∗ ) be the corresponding structures defined in the dual space E ∗ . Then V(T )⊥ = R(T ∗ ), R(T )⊥ = V(T ∗ ); (1.1) V(T ∗ )⊥ = R(T ), R(T ∗ )⊥ = V(T ). (1.2) and Proof. First of all we note that T ∗∗ = T for all T ∈ L (E) and E ∗∗ = E. We have therefore that R(T ∗∗ ) = R(T ) and V(T ∗∗ ) = V(T ) and that (1.1) implies (1.2) by applying (1.1) with T ∗ in place of T . Hence to prove the theorem, we need only prove (1.1). To start off, let φ ∈ V(T ∗ ) be arbitrarily given. Then T θ∗ (φ) = 0 for all θ ∈ Θ. Now if x ∈ E, then hT θ x, φi = hx, T θ∗ (φ)i = 0 for all θ ∈ Θ. Hence φ is orthogonal to the union of the ranges of all T θ and (by linearity and continuity) to R(T ). This implies that R(T )⊥ ⊃ V(T ∗ ). Now for the opposite inclusion, suppose that φ ∈ R(T )⊥ . Then hT θ x, φi = 0 for any x ∈ E and any θ ∈ Θ. But by hT θ x, φi = hx, T θ∗ (φ)i, we see that T θ∗ (φ) = 0 for all θ ∈ Θ and so φ ∈ V(T ∗ ). Thus it follows that R(T )⊥ ⊂ V(T ∗ ) and in consequence we have R(T )⊥ = V(T ∗ ). Next we let φ ∈ E ∗ and θ ∈ Θ be arbitrarily given and set ψ = T θ∗ (φ). If x ∈ V(T ) is arbitrary, then hx, ψi = hx, T θ∗ (φ)i = hT θ x, φi = 0. Thus ψ ⊥ V(T ). This means that V(T )⊥ ⊃ R(T ∗ ) since V(T )⊥ is a closed linear manifold. To get V(T )⊥ ⊂ R(T ∗ ), we now assume V(T )⊥ 1 R(T ∗ ) and then we can choose a functional φ ∈ V(T )⊥ in E ∗ satisfying φ < R(T ∗ ). Then there exists a functional in E ∗∗ which is 0 restricted to R(T ∗ ) and is 1 on φ by the Hahn-Banach theorem. Therefore by the reflexivity of E, we have the existence of a vector x ∈ E such that x ⊥ R(T ∗ ) and φ(x) = 1. Since x ⊥ R(T ∗ ), hence hx, T θ∗ (ψ)i = 0 for each ψ ∈ E ∗ and any θ ∈ Θ. Hence 17 hT θ x, ψi = 0 for any ψ ∈ E ∗ and any θ ∈ Θ. This means that x ∈ V(T ) and since φ ∈ V(T )⊥ , we get φ(x) = 0. This contradicts φ(x) = 1. Whence the hypothesis that V(T )⊥ 1 R(T ∗ ) is false. Thus V(T )⊥ ⊂ R(T ∗ ) and hence V(T )⊥ = R(T ∗ ). The proof of Theorem 1.2 is therefore completed. Remark 1.3. The spaces V(T ), R(T ), V(T ∗), and R(T ∗ ) all are defined by T independently of any Følner net in G. This is a crucial point in the proof of Theorem 0.4 in §2. We note that the weak compactness of a bounded set of E plays no a role in the above proof of Theorem 1.2. 1.4. Topologies for linear transformations To better understand our mean ergodic theorems, it is necessary to know the various topologies on the Banach space L (E). 1. The uniform topology in L (E) is the topology defined by the usual operator norm. 2. Let T, T 1 , T 2 , . . . belong to L (E). Suppose that for every x ∈ E, kT x − T n xkE → 0 as n → ∞. Then {T n } is said to converge strongly to T . 3. Let T, T 1, T 2 , . . . belong to L (E). Suppose for every vector x ∈ E and for any functional φ ∈ E ∗ , hT x − T n x, φi → 0 as n → ∞. Then we say {T n } converges weakly to T . Clearly, uniform convergence implies strong convergence; and strong convergence implies weak convergence. Our mean ergodic theorems all are in the sense of the strong topology on L (E). 2. The mean ergodic theorems of continuous operators In this section, we will first prove an abstract mean ergodic theorem (Theorem 2.1 which implies Theorem 0.4 except p = 1) using Theorem 1.2. Secondly we shall prove the case p = 1 of Theorem 0.4 provided µ(X) < ∞. Before proving, we first point out that our approaches introduced here are only valid for groups, for we need to involve the adjoint operators T g∗−1 in our procedure. 2.1. Abstract mean ergodic theorem Let E be a Banach space, and let G be an amenable group with any fixed left Følner net {Fθ , θ ∈ Θ} in it as in §0.1. We can now generalize Lorch’s mean ergodic theorem ([30, Theorem 9.1]) as follows. Theorem 2.1. Let {T g : E → E}g∈G be a family of continuous linear operators of a reflexive Banach space E to itself, which is such that: (1) T g T h = T hg ∀g, h ∈ G, (2) for x ∈ E and y∗ ∈ E ∗ , g 7→ hT g x, y∗ i is Borel measurable on G, and (3) {T g }g∈G is mG -almost surely uniformly bounded; i.e., kT g k ≤ β for mG -a.e. g ∈ G. Set F = {x ∈ E | T g x = x ∀g ∈ G} and N = {x − T g x | x ∈ E, g ∈ G}. Then E = F⊕N 18 and 1 |Fθ | Z T g xdg → P(x) ∀x ∈ E. Fθ Here P: F ⊕ N → F is the projection, kPk ≤ β; i.e., A(Fθ , ) converges strongly to P() in L (E). This type of mean ergodic theorem was first introduced by J. von Neumann in 1932 [34] for the case that {T g : H → H } is generated by a single unitary operator T of a Hilbert space H to itself, and then it was extended to more general spaces than Hilbert space. See, e.g., F. Riesz in 1938 [40] for the case kT k ≤ 1, E = L p where 1 < p < ∞; E. Lorch in 1939 [29] for the case where E is a reflexive Banach space and T is power bounded; and K. Yosida and S. Kakutani for weakly completely continuous T of a Banach space E to itself, respectively, in 1938 [45] and [22]; also see [9, Theorem 9.13.1]. We notice here that condition (3) ensures that for any x ∈ E and any compact subset K of G with |K| > 0, the Pettis integral of the vector-valued function T  x : g 7→ T g x over K Z 1 T g xdg, A(K, x) := |K| K is a well-defined vector in E by hA(K, x), y∗ i = 1 |K| Z hT g x, y∗ idg ∀y∗ ∈ E ∗ . K See, e.g., [9, Proposition 8.14.11] and [18, Chap. III]. Thus A(K, ) : E → E makes sense for any compacta K of G, which is linear with respect to x ∈ E with kA(K, )k ≤ supg∈K kT g k. Proof of Theorem 2.1. Let T = {I − T g , g ∈ G} and then F = V(T ) and N = R(T ) which are independent of {Fθ ; θ ∈ Θ}, where I is the identity operator of E. Suppose first that x ∈ E is in F; thus T g x = x for all g ∈ G and then Z 1 T g xdg = x ∀θ ∈ Θ. |Fθ | Fθ Thus restricted to F, we have lim θ∈Θ 1 |Fθ | Z T g xdg = x. Fθ Now let y ∈ N be arbitrary. This means that for any ǫ > 0, there are finite number of elements, say g1 , . . . , gℓ ∈ G, and vectors z1 , . . . , zℓ , z ∈ E such that y = (z1 − T g1 z1 ) + · · · + (zℓ − T gℓ zℓ ) + z, kzkE < ǫ. By the asymptotical invariance of the Følner net {Fθ ; θ ∈ Θ} and the a.s. uniform boundedness of {T g }, an easy calculation shows that Z 1 T g ydg ≤ βǫ. lim sup |Fθ | Fθ θ∈Θ E 19 It is now clear that y ∈ N implies that 1 |Fθ | Z T g ydg → 0 Fθ since ǫ is arbitrary. Meanwhile the above argument shows that F ∩ N = {0} and so F + N = F ⊕ N. Suppose that x ∈ F and y ∈ N. Then Z 1 T g (x + y)dg → x and kxk ≤ βkx + yk. |Fθ | Fθ We have therefore shown that A(Fθ , ), restricted to vectors in F ⊕ N, converges to the projection P of F ⊕ N onto F for which kPk ≤ β. To prove Theorem 2.1, it remains to show that E = F ⊕ N. By similar arguments, according to Lemma 1.1 we see that for the adjoint operator group n o T g∗−1 : E ∗ → E ∗ , g∈G which is such that ∗ T g∗−1 T h∗−1 = T (hg) −1 and (T g∗ )−1 = T g∗−1 ∀g, h ∈ G, if we restrict to the manifold F(T ∗ ) ⊕ N(T ∗ ) that is associated to n n o o T ∗ = I ∗ − T g∗−1 = I ∗ − T g∗ −1 g∈G g∈G , R there follows that |F1θ | Fθ T g∗−1 ()dg converges to the projection of F(T ∗ ) ⊕ N(T ∗ ) onto F(T ∗ ). In particular, F(T ∗ ) ∩ N(T ∗ ) = {0}. Now to the contrary suppose that there is some x , 0 in E such that x < F(T ) ⊕ N(T ). Then there exists some functional φ ∈ E ∗ such that φ ⊥ F ⊕ N and φ(x) = 1 by the Hahn-Banach theorem; hence φ , 0. But φ ∈ F⊥ = N(T ∗ ) and φ ∈ N ⊥ = F(T ∗ ) by virtue of Theorem 1.2 and Remark 1.3. Hence φ = 0. This contradiction shows that E = F ⊕ N. The proof of Theorem 2.1 is thus completed. We note here that in Theorem 2.1 the projection P is independent of the Følner net {Fθ ; θ ∈ Θ} in G. This thus completes the proof of our Theorem 0.4 in the case 1 < p < ∞ since L p (X, X , µ), for 1 < p < ∞, are reflexive Banach spaces. 2.2. Proof of Theorem 0.4 We need only say some words for the case p = 1 under the condition µ(X) < ∞. In fact, let F1µ = {φ ∈ L1 (X, X , µ) | φ = T g φ ∀g ∈ G} and N 1µ = {ψ − T g ψ | ψ ∈ L1 (X, X , µ), g ∈ G}. Then we can easily see that F1µ ∩ N 1µ = {0} and that for any φ = φ1 + φ2 ∈ F1µ ⊕ N1µ with φ1 ∈ F1µ and φ2 ∈ N1µ there follows A(Fθ , φ) → φ1 with kφ1 k1 ≤ kφk1 and A(Fθ , φ2 ) → 0 in L1 -norm. Now let φ ∈ L1 (X, X , µ) be arbitrary; and then ∃ψn ∈ L2 (X, X , µ) with ψn → φ in L1 -norm. Since ψn = P(ψn ) + (ψn − P(ψn )) where ψn − P(ψn ) ∈ N1µ and kP(ψm ) − P(ψn )k1 ≤ kψm − ψn k1 for all m, n ≥ 1, it follows that ϕ := L1 - limn→∞ P(ψn ) ∈ F1µ and φ − ϕ ∈ N1µ . Thus, L1 (X, X , µ) = F1µ ⊕ N1µ . This hence completes the proof of the case p = 1 of Theorem 0.4 whenever µ(X) < ∞. 20 2.3. A mean ergodic theorem for product amenable groups Let G1 , . . . , Gl be l σ-compact amenable groups which respectively have fixed left Haar measures m1 , . . . , ml , where l ≥ 2 is an integer. By m we denote the usual l-fold product measure m1 ⊗ · · · ⊗ ml on the l-fold product space G1 × · · · × Gl . Let {T gi }gi ∈Gi , 1 ≤ i ≤ l, be families of continuous linear operators of a same reflexive Banach space E to itself satisfying conditions (1), (2) and (3) of Theorem 2.1. ∞ Then by Theorem 2.1, for any Følner sequences Fn(i) n=1 in Gi , 1 ≤ i ≤ l, we can obtain in the sense of the strong operator topology that Z 1   T gi ()dgi . Pi () = lim n→∞ Fn(i) mi Fn(i) Under the above situation, the following result generalizes [31]. Theorem 2.2. There follows that P1 · · · Pl = lim n→∞ 1   m Fn(1) × · · · × Fn(l) Z Fn(1) ×···×Fn(l) T g1 · · · T gl dg1 · · · dgl . Proof. First of all, we note that for any bounded linear operator L : E → E, Z Z LT gi dgi = L T gi dgi Fn(i) Fn(i) and Z Fn(i) T gi Ldgi = Z Fn(i)  T gi dgi L    for all 1 ≤ i ≤ l; and m Fn(1) × · · · × Fn(l) = m1 Fn(1) · · · ml Fn(1) . Let l = 2. Then by Fubini’s theorem, Z 1 T g1 T g2 dg1 dg2 lim  n→∞ m F n(1) × F n(2) Fn(1) ×Fn(2) # Z " Z 1 1 T g1 T g2 dg2 dg1 = lim  (2)  n→∞ m F n(1) Fn(1) m2 F n Fn(2) 1 " # Z Z 1 1 = lim T g1 T g2 dg2 dg1   n→∞ m F n(1) m2 Fn(2) Fn(2) Fn(1) 1 #" # " Z Z 1 1 T g1 dg1 T g2 dg2 = lim   n→∞ m F n(1) m2 Fn(2) Fn(2) Fn(1) 1 = P1 P2 . By induction on l, we can easily prove the statement for any 2 ≤ l < ∞. This completes the proof of Theorem 2.2. 21 Whenever G1 = · · · = Gl = Z, then this result reduces to an analogous case of [31, Theorem 1]. For a single continuous linear operator T of E, Cox [7] showed that if supn kI − T n k < 1, then T = I. Similar to [31, Theorem 4], using Theorem 2.2 we can generalize and strengthen Cox’s theorem as follows. Corollary 2.3. Under the same situation of Theorem 2.2, let kI − P1 · · · Pl k < 1; then T g = I for all g ∈ Gi , 1 ≤ i ≤ l. Proof. Let kI − P1 · · · Pl k = α < 1. Then P1 · · · Pl is invertible and kP1 · · · Pl k ≤ (1 − α)−1 . Since for any h ∈ Gl and any vector x ∈ E we have kx − T h (x)k = k(I − T h )(x)k = k(P1 · · · Pl )−1 (P1 · · · Pl )(I − T h )(x)k 1 ≤ kP1 · · · Pl (I − T h )(x)k, 1−α the last term is equal to 0 by Theorem 2.2. So T h = I for each h ∈ Gl . Similarly, it follows T h = I for all h ∈ Gi for 1 ≤ i ≤ l − 1. This proves the corollary. 3. Pointwise ergodic theorem for amenable groups This section will be devoted to proving our L∞ -pointwise ergodic theorems (Theorems 0.5 and 0.6 stated in §0.2) by using classical analysis and our L p -mean ergodic theorem (Theorem 0.4). 3.1. Arzelá-Ascoli theorem Recall that a topological space X is call a k-space, provided that if a subset A of X intersects each closed compact set in a closed set then A is closed. The two most important examples of k-spaces are given in the following. Lemma 3.1 ([23, Theorem 7.13]). If X is a Hausdorff space which is either locally compact or satisfies the first axiom of countability, then X is a k-space. Thus each metric space is a k-space like L∞ (X, X ) with the uniform norm k · k∞ over any measurable space (X, X ). A uniformity for a set X is a non-void family U of subsets of X × X such that: (a) each member of U contains the diagonal ∆(X); (b) if U ∈ U , then U −1 = {(y, x) | (x, y) ∈ U} ∈ U ; (c) if U ∈ U , then V ◦ V ⊆ U for some V in U ; (d) if U and V are members of U , then U ∩ V ∈ U ; and (e) if U ∈ U and U ⊂ V ⊂ X × X, then V ∈ U . The pair (X, U ) is called a uniform space. If (X, U ) is a uniform space, then the uniform topology T of X associated to U is the family of all subsets T of X such that for each x ∈ T there is U ∈ U with U[x] ⊂ T . In this case, X is called a uniform topological space. Lemma Q 3.2 ([23, Theorem 6.10]). Let Xα , α ∈ A, be a family of uniform topological space; then α∈A Xα , with the product topology (in other words, the pointwise topology), is a uniform topological space. Thus, the product space RX with the topology Tp-c of pointwise convergence is a uniform topological space. Now it is time to formulate our important tool—the classical Arzelá-Ascoli theorem (cf., e.g., [23, Theorem 7.18]). 22 Arzelá-Ascoli Theorem. Let C(X, Y) be the family of all continuous functions on a k-space X which is either Hausdorff or regular to a Hausdorff uniform topological space Y, and let C(X, Y) be equipped with the compact-open topology. Then a subfamily F of C(X, Y) is compact if and only if (a) F is closed in C(X, Y), (b) F is equicontinuous on every compact subset of X, and (c) F[x] = { f (x) | f ∈ F} has compact closure in Y for each x ∈ X. 3.2. L∞ -Pointwise convergence everywhere Let (X, X ) be a measurable space and G an amenable group with the identity e. We now consider a Borel dynamical system, i.e., G acts Borel measurably on X, T:G×X →X or write G yT X. That is to say, the action map T satisfies the following conditions: (1) T : (g, x) 7→ T (g, x) is jointly measurable; and (2) T e x = x and T g1 T g2 x = T g1 g2 x for all x ∈ X and g1 , g2 ∈ G. In such case, (X, X ) is called a Borel G-space. If X is a topological space with X = BX and T (g, x) is jointly continuous, then X is called a topological G-space. By KG we denote the family of all compacta of G. For any K ∈ KG , define the continuous linear operator A(K, ) : L∞ (X, X ) → L∞ (X, X ), which is called the ergodic average over K, by Z 1 A(K, ϕ)(x) = T g ϕ(x)dg ∀ϕ ∈ L∞ (X, X ). |K| K Clearly, the operator norms kA(K, )k ≤ 1 and kT g k = 1. Next we will simply write (E, k · kE ) = (L∞ (X, X ), k · k∞ ), which is a Banach space, and let Y = RX endowed with the topology of pointwise convergence (i.e. the product topology). Then E is a k-space by Lemma 3.1 and Y is a Hausdorff uniform topological space by Lemma 3.2. In fact, Y is a vector space by γ(r x ) x∈X + (r′x ) x∈X = (γr x + r′x ) x∈X for γ ∈ R and r, r′ ∈ Y. Now, for any K ∈ KG , we can define the function A(K, ) : E → Y by the following way: E ∋ ϕ 7→ A(K, ϕ) = (A(K, ϕ)(x))x∈X ∈ Y. (3.1) Since for any ϕ, ψ ∈ E and x ∈ X there follows |A(K, ϕ)(x) − A(K, ψ)(x)| ≤ kϕ − ψkE , (3.2) we can see that A(K, ) is continuous on E valued in Y and {A(K, ), K ∈ KG } is an equicontinuous subfamily of C(X, Y), noting that here C(X, Y) is equipped with the compact-open topology. Under these facts we can obtain the following L∞ -pointwise convergence theorem, which is completely independent of ergodic theory of G yT X. 23 Theorem 3.3. Given any Følner net {Fθ′ ′ ; θ′ ∈ Θ′ } in G and any Borel G-space X, one can find a Følner subnet {Fθ ; θ ∈ Θ} of {Fθ′ ′ ; θ′ ∈ Θ′ } in G and a continuous linear function A() : E → Y such that in the sense of Moore-Smith limit lim A(Fθ , ) = A() in C(E, Y) θ∈Θ with the property: for each ϕ ∈ E, lim A(Fθ , ϕ)(x) = A(ϕ)(x) ∀x ∈ X θ∈Θ and A(ϕ) = A(T g ϕ) ∀g ∈ G. Moreover, if ϕn → ψ as n → ∞ in (E, k · kE ), then A(ϕn )(x) → A(ψ)(x) in R for all x ∈ X. Proof. Let F = Clcpt-op ({A(Fθ′ ′ , ); θ′ ∈ Θ′ }) be the closure of the family {A(Fθ′ ′ , ); θ′ ∈ Θ′ } in C(E, Y) under the compact-open topology. To employ the Arzelá-Ascoli Theorem, in light of Lemmas 3.1 and 3.2, it is sufficient to check conditions (b) and (c). For that, let L : E → Y be any cluster point of {A(Fθ′ ′ , ); θ′ ∈ Θ′ } in C(E, Y), ϕ ∈ E, x ∈ X and ε > 0. Define an open neighborhood of L(ϕ) in Y  εo ε n = ξ ∈ RX |ξ(x) − L(ϕ)(x)| < , Vϕ := V L(ϕ); x, 3 3 and for any ψ ∈ E with kϕ − ψkE < 3ε define another open neighborhood of L(ψ) in Y  ε n εo Vψ := V L(ψ); x, = ξ ∈ RX |ξ(x) − L(ψ)(x)| < . 3 3 Since   U (L; ϕ, Vϕ ) = S ∈ C(E, Y) | S (ϕ) ∈ Vϕ and U (L; ψ, Vψ ) = S ∈ C(E, Y) | S (ψ) ∈ Vψ both are open neighborhoods of the point L in C(E, Y), then  VL := U (L; ϕ, Vϕ ) ∩ U (L; ψ, Vψ ) ∩ {A(Fθ′ ′ , ), θ′ ∈ Θ′ } , ∅. Now take any S from the above non-void intersection VL . So |L(ϕ)(x) − L(ψ)(x)| ≤ |L(ϕ)(x) − S (ϕ)(x)| + |S (ϕ)(x) − S (ψ)(x)| + |S (ψ)(x) − L(ψ)(x)| < ε, which implies that F is equicontinuous; that is to say, condition (b) holds. In addition, to check condition (c), for any ϕ ∈ E with kϕkE ≤ N − ε and any x ∈ X, we have ε |L(ϕ)(x)| ≤ |L(ϕ)(x) − S (ϕ)(x)| + |S (ϕ)(x)| ≤ + kϕkE . 3 Therefore  F[ϕ] := A(Fθ′ ′ , ϕ) | θ′ ∈ Θ′ ⊆ [−N, N]X . Because [−N, N]X is a closed compact subset of Y, F[ϕ] has a compact closure in Y and so condition (c) holds. If the Moore-Smith limit A(ϕ) exists, then it is easy to see A(ϕ) = A(T g ϕ) for g ∈ G by the asymptotical invariance of Følner nets. Therefore, the statement follows immediately from the Arzelá-Ascoli Theorem. It should be noted that although the Moore-Smith limit A(ϕ) is a function on X bounded by kϕk∞ , yet it does not need to be X -measurable in general for Y = RX is only with the pointwise topology. 24 3.3. Pointwise ergodic theorem Now we are ready to prove Theorem 0.5 and Theorem 0.6. 3.3.1. Proof of Theorem 0.5 Let G be any given amenable group and {Fθ′ ′ ; θ′ ∈ Θ′ } a Følner net in G. Theorem 3.3 implies that for any Borel action G yT (X, X ), one always can find some Følner subnet {Fθ ; θ ∈ Θ} from the given net {Fθ′ ′ ; θ′ ∈ Θ′ }, which is L∞ -admissible for G yT (X, X ); namely, Z 1 Moore-Smith AT (Fθ , ϕ)(x) := ϕ(T g x)dg −−−−−−−−−→ ϕ∗ (x) ∀x ∈ X |Fθ | Fθ for any ϕ ∈ L∞ (X, X ). In view of this, we can prove Theorem 0.5 as follows. Proof. In contrast to Theorem 0.5, for arbitrary Følner subnet {Fθ ; θ ∈ Θ} of {Fθ′ ′ ; θ′ ∈ Θ′ } in G, there are two disjoint families of Borel G-actions  F1 := G yT γ (Xγ , Xγ ); γ ∈ Γ and  F2 := G yT λ (Xλ , Xλ ); λ ∈ Λ , where {Fθ ; θ ∈ Θ} is L∞ -admissible for G yT γ (Xγ , Xγ ) for each γ ∈ Γ and {Fθ ; θ ∈ Θ} is not L∞ -admissible for G yT λ (Xλ , Xλ ) for each λ ∈ Λ, such that every Borel G-action G yT (X, X ) belongs either to F1 or to F2 and with F2 , ∅ (and in fact F1 , ∅). In order to arrive at a contradiction, noting that F1 , ∅ and so F2 is not the class of all Borel G-actions, we can set O Y Xλ Xλ , X = X= λ∈Λ λ∈Λ and then define the Borel action of G on X as follows: T : G × X → X or G yT X;   (g, (xλ)λ∈Λ ) 7→ T g (xλ )λ∈Λ = T λ,g xλ λ∈Λ . Now every ϕ ∈ L∞ (Xλ0 , Xλ0 ), for any λ0 ∈ Λ, may be thought of as an element ϕ in L∞ (X, X ) by the following way: ϕ(x) = ϕ(xλ0 ) ∀x = (xλ )λ∈Λ ∈ X. Clearly, AT (K, ϕ)(x) = AT λ0 (K, ϕ)(xλ0 ), ∀x = (xλ )λ∈Λ ∈ X, over any compacta K of G. Then by Theorem 3.3 with G yT (X, X ) in place of G yT (X, X ), we can further select out a Følner subnet {Fθ′′′′ ; θ′′ ∈ Θ′′ } from the Følner subnet {Fθ ; θ ∈ Θ} of {Fθ′ ′ ; θ′ ∈ Θ′ } in G, which is L∞ -admissible for G yT X. Clearly, {Fθ′′′′ ; θ′′ ∈ Θ′′ } in G is L∞ -admissible for G yT λ Xλ for each λ ∈ Λ. 25 Let λ0 ∈ Λ be arbitrarily given. Let A() : L∞ (Xλ0 , Xλ0 ) → RXλ0 be given by A(ϕ) = A(ϕ), where A() is defined by Theorem 3.3 for G yT X over {Fθ′′′′ ; θ′′ ∈ Θ′′ }. Then A(ϕ) is linear continuous in the sense: A(aϕ + ψ) = aA(ϕ) + A(ψ) ∀a ∈ R and ϕ, ψ ∈ L∞ (Xλ0 , Xλ0 ) and A(ϕn )(x) → A(ψ)(x) ∀x ∈ Xλ0 as ϕn → ψ in (L∞ (Xλ0 , Xλ0 ), k · k∞ ). Since {Fθ′′′′ ; θ′′ ∈ Θ′′ } is itself a left Følner net in G, hence A(ϕ) = A(T g ϕ) for any g in G and all ϕ in L∞ (Xλ0 , Xλ0 ). Finally, by the same manner as defining F1 and F2 above, we now define two new families of Borel G-actions F1′′ and F2′′ over {Fθ′′′′ ; θ′′ ∈ Θ′′ } instead of {Fθ ; θ ∈ Θ}. Since {Fθ′′′′ ; θ′′ ∈ Θ′′ } is a subnet of {Fθ ; θ ∈ Θ}, we have F1 ⊆ F1′′ . But F2 ⊆ F1′′ and F1 ∪ F2 contains all Borel G-actions, this implies that F1′′ = ∅, a contradiction. This proves Theorem 0.5. 3.3.2. Proof of Theorem 0.6 Let G be a σ-compact amenable group. We now assume M(G yT X) , ∅ where X is a Borel G-space with a Borel structure, i.e., σ-field X on X. Then L∞ (X, X ) ⊂ L p (X, X , µ), 1 ≤ p ≤ ∞, for any µ ∈ M(G yT X). The following statement is clearly contained in the standard proof of Completeness of L p , which also holds in the case µ(X) = ∞. Lemma 3.4. If 1 ≤ p ≤ ∞ and if ϕn → ϕ in L p (X, X , µ) as n → ∞, then {ϕn }∞ 1 has a subsequence which converges pointwise µ-almost everywhere to ϕ. There is no a net version of Lemma 3.4 in the literature yet. Now we are ready to complete the proof of Theorem 0.6 combining Theorem 0.4 and Theorem 0.5. Proof of Theorem 0.6. Let A : ϕ 7→ ϕ∗ from L∞ (X, X ) to RX over some L∞ -admissible Følner net {Fθ ; θ ∈ Θ} for G by Theorem 0.5. Next let µ ∈ M(G yT X) and ϕ ∈ L∞ (X, X ) be arbitrarily given. Then from Theorem 0.4, it follows that under the L1 -norm,  lim A(Fθ , ϕ) = P(ϕ) ∈ F1µ = φ ∈ L1 (X, X , µ) | T g φ = φ ∀g ∈ G ; θ∈Θ   Z ϕdµ if µ ergodic . = X Since (L1 (X, X , µ), k  k1 ) is a Banach space, we can choose a sequence {Fθn ; n = 1, 2, . . . } from {Fθ ; θ ∈ Θ} such that lim A(Fθn , ϕ) = P(ϕ). n→∞ So by Lemma 3.4, we can obtain that ϕ∗ (x) = P(ϕ)(x) for µ-a.e. x ∈ X. The proof of Theorem 0.6 is thus completed. 26 Remark 3.5. Let G be a σ-compact amenable group with an L∞ -admissible Følner sequence {Fn ; n = 1, 2, . . . }. We note that in Theorem 0.6, for any ϕ ∈ L∞ (X, X , µ), we may take ϕ′ a version of ϕ with ϕ′ ∈ L∞ (X, X ) such that kϕ′ k∞ = kϕk∞,µ and ψ := |ϕ′ − ϕ| = 0 a.e. (µ). Then T g ψ = ψ a.e. for each g ∈ G. By Fubini’s theorem, we can take some µ-conull X0 ∈ X such that for any x0 ∈ X0 and for mG -a.e. g ∈ G, ψ(T g x0 ) = ψ(x0 ) (= 0). Thus lim A(Fn , ψ) = ψ = 0 a.e. n→∞ This means that ϕ′ ∗ (x) = lim A(Fn , ϕ′ )(x) = lim A(Fn , ϕ)(x) = ϕ∗ (x) n→∞ n→∞ µ-a.e. x ∈ X. Hence the a.e. pointwise convergence holds for ϕ ∈ L∞ (X, X , µ) for any σ-compact amenable group. 3.4. Stability under perturbation of Følner nets The pointwise convergence we consider in Theorem 0.5 is stable under perturbation of Følner net in the following sense, which makes it is impossible to find a necessary condition of pointwise convergence for Følner net in G. Proposition 3.6. Let G yT X be a Borel action of an amenable group G on X, ϕ ∈ L∞ (X, X ), and let {Fθ ; θ ∈ Θ} be a Følner net in G satisfying that lim A(Fθ , ϕ)(x) = ϕ∗ (x) θ∈Θ ∀x ∈ X (or a.e. x ∈ X). Assume {Dθ ; θ ∈ Θ} is a net of compacta of G with limθ∈Θ |Dθ |/|Fθ | = 0, and set Cθ = Fθ △ Dθ . Then lim A(Cθ , ϕ)(x) = ϕ∗ (x) ∀x ∈ X (or a.e. x ∈ X). θ∈Θ Proof. Set ϕθ (x) = A(Fθ , ϕ)(x) − A(Cθ , ϕ)(x) for each x ∈ X and θ ∈ Θ. Then,   Z Z Z 1 1 1 T g ϕ(x)dg + ϕθ (x) = T g ϕ(x)dg − T g ϕ(x)dg, − |Fθ | |Fθ | |Cθ | Cθ Fθ Cθ consequently, since Fθ △ Cθ = Dθ and |Cθ | − |Fθ | ≤ |Dθ |,   Z Z 1 1 |Dθ | |T g ϕ(x)|dg + |T g ϕ(x)|dg |ϕθ (x)| ≤ |Fθ | |Dθ | Dθ |Cθ | Cθ 2kϕk∞ |Dθ | ≤ . |Fθ | Thus, by our hypothesis, limθ∈Θ ϕθ (x) = 0. This proves the proposition. Thus we may read Proposition 3.6 backwards to obtain that if {Fθ ; θ ∈ Θ} and {S θ ; θ ∈ Θ} are two Følner nets in G satisfying {S θ ; θ ∈ Θ} is admissible for pointwise convergence of G yT X and limθ∈Θ |Fθ △ S θ |/|S θ | = 0, then {Fθ ; θ ∈ Θ} is also admissible for pointwise convergence of G yT X. 27 3.5. The Dunford-Zygmund theorem Using Theorem 2.2 and Theorem 0.6, we can easily obtain the following L∞ -pointwise ergodic theorem for product of amenable groups. ∞ Proposition 3.7. Let G, H be any two σ-compact amenable groups; and let {Fn }∞ 1 , {Kn }1 be two ∞ L -admissible Følner sequences in G and H, respectively. Then for any Borel actions G yT X and G yS X and any ϕ ∈ L∞ (X), Z Z 1 lim T g S h ϕ(x)dgdh = AT (AS (ϕ))(x) ∀x ∈ X. n→∞ |F n ||Kn | F Kn n Moreover, for any µ ∈ M(G yT X) ∩ M(H yS X), AT (AS (ϕ)) = Eµ Eµ (ϕ|XS ,µ ) XG,µ  a.e. Here AT () = limn AT (Fn , ) and AS () = limn AS (Kn , ) as in Theorem 0.5. This idea may be useful for L∞ -pointwise ergodic theorem for connected Lie groups. See [12] and [33, §7] for other generalizations of the Dunford-Zygmund theorem. 4. Further applications In this section we shall present some simple and standard applications of our mean and pointwise ergodic theorems. Please keeping in mind that we have only convergence in the mean, which is not even convergence almost everywhere, in all of our L p -mean ergodic theorems below. 4.1. L p -mean ergodic theorems Another interesting application is to extend [15, Proposition 6.6]. Let σ : G → X be a Borel homomorphism from the amenable group G to an lcH group X. Let µ be a fixed left-invariant σ-finite Haar measure of X. We then consider the dynamical system: T : G × X → X; (g, x) 7→ g(x) = lσ(g) (x), (4.1) where ly : x 7→ yx is the left translation of X by y for any y ∈ X. Then, T g : φ(x) 7→ φ(lσ(g) x) is a unitary operator of L p (X, BX , µ) for any g ∈ G. Next by [28, Theorem 30C], for 1 ≤ p < ∞ and fixed φ ∈ L p (X, BX , µ), g 7→ T g (φ) is Borel measurable from G into (L p (X, BX , µ), k · k p ). Therefore Theorem 2.1 follows the following L p -mean ergodic theorem, even though µ is not finite when X is not compact. Corollary 4.1. Let σ : G → X be a Borel homomorphism from the amenable group G to an lcH group X. Then under (4.1), for 1 < p < ∞, over any Følner net (Fθ )θ∈Θ in G, Z 1 T g φdg = P(φ) ∀φ ∈ L p (X, BX , µ) L p - lim θ∈Θ |F θ | F θ Here P : L p (X, BX , µ) = Fµp ⊕ N µp → Fµp is the projection. 28 Proposition 6.6 of [15] only asserts the weak convergence under the much more restricted conditions: G  Zr , p = 2 and X is a compact metrizable abelian group as an illuminated case of the weak mean ergodic theorem of Zr [15, Proposition 6.11]. If G is not abelian or compact, then Z T g (φ)dg ; T g (φ̄) = φ̄ ∀g ∈ G and φ̄ is not well defined. φ̄ := G Whence Furstenberg’s proof idea of [15, Proposition 6.6] is not valid for our Corollary 4.1 above. The above application is for a measure-preserving system. It turns out that we can do something for non-singular systems. Let (X, X ) be a Borel G-space. A probability measure µ on X is said to be quasi-invariant if µ ∼ g(µ), that is to say, µ(B) = 0 if and only if µ(g−1 [B]) = 0 ∀B ∈ X , for all g ∈ G. Let ρ(g, x) > 0 be the Radon-Nikodym derivative defined by ρ(g, x) = dg(µ) dµ (x) for µ-a.e. x ∈ X, for any g ∈ G. Then ρ(g, x) is a Borel function of the variable (g, x) ∈ G × X whenever (X, X ) is a standard Borel space (cf. [50, Example 4.2.4]). If supg∈G,x∈X ρ(g, x) < ∞, then T g : φ 7→ φ ◦ g is uniformly bounded from L p (X, X , µ) to itself for g ∈ G and hence there follows the following result: Corollary 4.2. Let G be a σ-compact amenable group and let (X, X ) be a standard Borel G-space with a quasi-invariant probability measure µ. If Radon-Nikodym derivative satisfies supg∈G,x∈X ρ(g, x) < ∞, then, for 1 ≤ p < ∞, any Følner sequence {Fn }∞ 1 in G, Z 1 L p - lim T g φdg = P(φ) ∀φ ∈ L p (X, X , µ) n→∞ |F n | F n and moreover 1 n →∞ |F n′ ′ | lim ′ Z Fn′ ′ φ(T g x)dg = P(φ)(x) ∀x ∈ X and φ ∈ L∞ (X, X ) over some Følner subsequence {Fn′ ′ } of {Fn }. Here P : L p (X, X , µ) = Fµp ⊕ Nµp → Fµp is the projection. In addition, we note that in Corollary 4.1 the case p = 1 cannot be obtained from the case of p = 2 since µ(X) = ∞ whenever X is not a compact group. 4.2. Recurrence theorems for amenable groups We now indicate briefly how our ergodic theorems apply to “phenomena of physics” as follows. Let G be an amenable group not necessarily σ-compact and let (X, X , µ) a probability space. We now consider that G acts Borel on X by X -transformations T g : X → X; x 7→ g(x), which preserve µ. We note that in many cases such an G-invariant measure always exists (cf. [9, 14, 44] and Theorem 0.8 and Proposition 0.10). Then we may apply Theorem 0.4 to show that for each φ ∈ L p (X, X , µ), Z L p (µ) 1 T g φdg −−−−→ P(φ) as n → ∞ (4.2) |Fθ | Fθ over any Følner net {Fθ ; θ ∈ Θ} in G. There holds 29 • P : L2 (X, X , µ) = F2µ ⊕ N 2µ → F2µ is an orthogonal, self-adjoint and positive definite operator, so that hP(φ), φi ≥ 0 for all φ ∈ L2 (X, X , µ). Also P(1) = 1. Setting φ = 1Σ −µ(Σ) for any Σ ∈ X we deduce that hP(1Σ ), 1Σ i ≥ µ(Σ)2 . Hence for any Σ ∈ X there follows P(1Σ )(x) > 0 µ-a.e. x ∈ Σ. For if B = {x ∈ Σ | P(1Σ )(x) = 0} we will have µ(B)2 ≤ hP(1 B), 1Bi ≤ hP(1 B ), 1Σ i = h1B , P(1Σ)i = 0. We then can obtain by Theorem 0.4 the following pointwise recurrence theorem, which generalizes the classical Poincaré recurrence theorem [38] from Z or R to amenable groups: Theorem 4.3 (Positive recurrence). Let (X, X ) be a Borel G-space and µ an invariant probability measure on it. Then for any Σ ∈ X and any Følner net F = {Fθ ; θ ∈ Θ} in G, D∗F (x, Σ) := lim sup θ∈Θ |{g ∈ G : g(x) ∈ Σ} ∩ Fθ | >0 |Fθ | for µ-a.e. x ∈ Σ. Proof. Let µ(Σ) > 0. Given any point x ∈ Σ with 1∗Σ (x) = P(1Σ )(x) > 0, if D∗F (x, Σ) = 0 then Z 1 lim 1Σ (T g x)dg = 0. θ∈Θ |F θ | F θ Further by Theorem 0.5, it follows that one can find a L∞ -admissible Følner subnet over which 1∗Σ (x) = 0, a contradiction. This proves Theorem 4.3. It should be noted that since the classical L2 -mean ergodic theorem and Lindenstrauss’s pointwise ergodic theorem is relative to a tempered K -Følner/summing sequence [16, 27], the above result cannot be directly concluded from those; since our Følner net {Fθ ; θ ∈ Θ} in G as in §0.1 is essentially weaker than a K -Følner/summing sequence. 4.3. Quasi-weakly almost periodic points of metric G-space Based on the foregoing Theorem 4.3, we next shall consider another generalized version of Poincaré’s recurrence theorem associated to a measurable function. Theorem 4.4 (Quasi-weakly almost periodic points). Let X be a separable metric and G y X a Borel action of an amenable group G on X preserving a Borel probability measure µ. If (Y, d) is a separable metric space and ϕ is a measurable map of X to Y, then µ-a.e. x ∈ X is such that to any ǫ > 0, T = {g ∈ G | d(ϕ(x), ϕ(gx)) < ǫ} has positive upper density relative to any Følner net {Fn ; n ∈ Θ} in G. Proof. Let µϕ be the probability distribution of the random variable ϕ valued in Y, that is to say, µϕ = µ ◦ ϕ−1 , and write its support Y1 = supp(µϕ ). Set F = {Fn ; n ∈ Θ}. Then for any r > 0, µ(ϕ−1 [B(y, r)]) > 0 for any y ∈ Y1 , where B(y, r) is the open ball of radius r centered at y in Y. By Theorem 4.3, it follows that for any y ∈ Y1 and ǫ > 0 we have D∗F (x, Σ) > 0, µ-a.e. x ∈ Σ := ϕ−1 [B(y, ǫ)], 30 therefore D∗F ({g ∈ G | d(ϕ(x), ϕ(gx)) < ǫ}) > 0, µ-a.e. x ∈ Σ. (4.3) S By the separability of Y, one can find a sequence of points yk ∈ Y1 such that Y1 ⊆ k B(yk , ǫ). Combined with (4.3) this yields that there exists a set Xǫ ∈ BX with µ(Xǫ ) = 1 such that D∗F ({g ∈ G | d(ϕ(x), ϕ(gx)) < ǫ}) > 0 ∀x ∈ Xǫ . T Letting ǫℓ ↓ 0 as ℓ → ∞ and Q = ℓ Xǫℓ ; then µ(Q) = 1 and every point x ∈ Q has the desired property. This thus completes the proof of Theorem 4.4. Let G be a σ-compact amenable group. A very interesting case of the above theorem is that ϕ is the identity mapping of X onto itself for a separable metric Borel G-space X. Given any Følner sequence F = {Fn ; n ∈ N} in G, write Z 1 D∗F (x, r) = lim sup 1B(x,r) (gx)dg, x ∈ X and r > 0, (4.4) n→∞ |F n | Fn and  Qwap (G y X) = x ∈ X | D∗F (x, ǫ) > 0 ∀ǫ > 0 . (4.5) The latter is called the set of quasi-weakly almost periodic points of the Borel G-space X relative to the Følner sequence {Fn ; n ∈ N} in G (cf., e.g., [17] for the special case of G = Z and Fn = {1, 2, . . . , n} a Følner sequence in Z). Clearly, Qwap (G y X) is G-invariant if G is abelian. A new ingredient of Theorem 4.4, however, is that our dynamical system T : G × X → X is only Borel measurable and so T g : X → X is not necessarily continuous for each g ∈ G. Since D∗F (x, ǫ) is a measurable function of x, Qwap (G y X) rel. {Fn ; n ∈ N} is µ-measurable and further by Theorem 4.4 we easily see that µ(Qwap (G y X)) = 1 for any µ ∈ M(G yT X). Therefore, if X is a compact metric G-space, then Qwap (G y X) rel. {Fn ; n ∈ N} is of full measure 1. So the phenomenon of quasi-weakly almost periodic motion is by no means rare. This generalizes and meanwhile strengthens the classical Birkhoff recurrence theorem. Corollary 4.5. Let T : (X, BX , µ) → (X, BX , µ) be a measure-preserving, not necessarily continuous, transformation of a separable metric space X. Then for µ-a.e. x ∈ X, one can find nk → ∞ with T nk x → x. Why do we need to introduce the concept q.w.a.p. point for amenable group actions? Let’s recall that for any cyclic topological dynamical system T : X → X, a point x is called recurrent iff ∃nk → ∞ such that T nk x → x as k → ∞ (cf. [15]). For a group action dynamical system, G yS X, in many literature a point x is said to be recurrent if ∃tn ∈ G such that S tn x → x as n → ∞. However, this cannot actually capture the recurrence of the orbit G(x); for example, to a one-parameter flow R yS X, S tn x → x for any tn → 0 in R. In view of this, we need to introduce the upper density D∗ (x, ǫ) > 0 over a Følner net in G instead of nk → ∞. Acknowledgments This work was partly supported by National Natural Science Foundation of China grant #11271183 and PAPD of Jiangsu Higher Education Institutions. 31 References [1] T. Austin, On the norm convergence of non-conventional ergodic averages, Ergod. Th. & Dynam. Sys., 30 (2010), 321–338. [2] V. Bergelson, B. Host and B. Kra, Multiple recurrence and nilsequences, Invent. Math., 160 (2005), 261–303. [3] T. Bewley, Extension of the Birkhoff and von Neumann ergodic theorems to semigroup actions, Ann. Inst. H. Poincaré, 7 (1971), 283–291. [4] J. Bourgain, Double recurrence and almost sure convergence, J. Reine Angew. Math., 404 (1990), 140–161. [5] L. Bowen and A. Nevo, Pointwise ergodic theorems beyond amenable groups, Ergod. Th. & Dynam. Sys., 33 (2013), 777–820. [6] Q. Chu and N. Frantzikinakis, Pointwise convergence for cubic and polynomial ergodic averages of non-commuting transformations, Ergod. Th. & Dynam. Sys., 32 (2012), 877-897. [7] R. H. Cox, Matrices all whose powers lie close to the identity, Amer. Math. Monthly, 73 (1966), 183. [8] J. Dieudonné, Sur le théorème de Lebesgue-Nikodym (III), Ann. Inst. Fourier (Grenoble) Ser. 2, 23 (1948), 25–53. [9] R. E. Edwards, Fuctional Analysis: Theory and Applications, Dover Publications, INC. New York, 1965. [10] M. Einsiedler and T. Ward, Ergodic Theory with a view towards Number Theory, GTM 259, Springer-Verlag, 2011. [11] W. R. Emerson, The pointwise ergodic theorem for amenable groups, Amer. J. Math., 96 (1974), 472–487. [12] W. R. Emerson and F. P. Greenleaf, Group structure and the pointwise ergodic theorem for connected amenable groups, Adv. Math., 14 (1974), 153–172. [13] R. H. Farrell, Representation of invariant measures, Illinois J. Math., 6 (1962), 447–467. [14] S. V. Fomin, On measures invariant under certain groups of transformations, Ivz. Akad. Nauk. SSSR, 14 (1950), 261–274. [15] H. Furstenberg, Recurrence in Ergodic Theory and Combinatorial Number Theory, Princeton University Press, Princeton, New Jersey, 1981. [16] F. P. Greenleaf, Ergodic theorems and the construction of summing sequences in amenable locally compact groups, Comm. Pure Appl. Math., 26 (1973), 29–46. [17] W.-H. He, J.-D. Yin and Z.-L. Zhou, On quasi-weakly almost periodic points, Sci. China Ser. A, 56 (2013), 597–606. [18] E. Hille and P. S. Phillips, Functional Analysis and Semi-Groups, AMS, Providence, Rhode Island, 1957. [19] B. Host and B. Kra, Nonconventional ergodic averages and nilmanifolds, Ann. of Math., 161 (2005), 397–488. [20] W. Huang, S. Shao and X. Ye, Pointwise convergence of multiple ergodic averages and strictly ergodic models, arXiv:1406.5930v1 [math.DS]. [21] A. del Junco and J. Rosenblatt, Counterexamples in ergodic theory and number theory, Math. Ann., 245 (1979), 185–197. [22] S. Kakutani, Iteration of linear operators in complex Banach spaces, Proc. Imp. Acad. Tokyo, 14 (1938), 295–300. [23] J. L. Kelley, General Topology, GTM 27, Springer-Verlag, New York Berlin Heidelberg Yokyo, 1955. [24] A. Khintchine, Eine Verschärfung des Poincáreschen “Wiederkehrsatzes”, Compositio Math., 1 (1934), 177–179. [25] K. Kido and W. Takahashi, Mean ergodic theorems for semigroups of linear operators, J. Math. Anal. Appl., 103 (1984), 387–394. [26] U. Krengel, Ergodic Theorems, de Gruyter Studies in Math., Vol 6, de Gruyter, 1985. [27] E. Lindenstrauss, Pointwise theorems for amenable groups, Invent. Math., 146 (2001), 259–295. [28] L. H. Loomis, An Introduction to Abstract Harmonic Analysis, Van Nostrand, New York, 1953. [29] E. Lorch, Means of iterated transformations in reflexive vector spaces, Bull. Amer. Math. Soc., 45 (1939), 945–947. [30] E. Lorch, Spectral Theory, Oxford Univ. Press, London New York, 1962. [31] M. Nagisa and S. Wada, An extension of the mean ergodic theorem, Math. Japon., 47 (1998), 429–438. [32] V.V. Nemytskii and V.V. Stepanov, Qualitative Theory of Differential Equations, Princeton University Press, Princeton, New Jersey, 1960. [33] A. Nevo, Pointwise ergodic theorems for actions of groups. Handbook of Dynamical Systems, vol. 1B. Eds. B. Hasselblatt and A. Katok. Elsevier, Amsterdam, 2006, pp. 871–982. [34] J. von Neumann, Proof of the quasiergodic hypothesis, Proc. Nat. Acad. Sci. (U.S.A.), 18 (1932), 70–82. [35] D. Ornstein and B. Weiss, Subsequence ergodic theorems for amenable groups, Israel J. Math., 79 (1992), 113–127. [36] A. T. Paterson, Amenability, Math. Surveys & Monographs 29, Amer. Math. Soc., 1988. [37] R. R. Phelps, Lectures on Choquet’s Theorem, 2nd Ed., Lecture Notes in Math., vol. 1757, Springer-Verlag, Berlin Heidelberg New York, 2001. [38] H. Poincaré, Les méthodes nouvelles de la mécanique céleste, vol. 3, Gauthier-Villars, Paris, 1899. [39] M. Reed and B. Simon, Functional Analysis I, Academic Press, New York, 1980. [40] F. Riesz, Some mean ergodic theorems, J. London Math. Soc., 13 (1938), 70–82. [41] A. Shulman, Maximal ergodic theorems on groups, Dep. Lit. NIINTI, No. 2184, 1988. 32 [42] T. Tao, Norm convergence of multiple ergodic averages for commuting transformations, Ergod. Th. & Dynam. Sys., 28 (2008), 657–688. [43] A. Tempelman, Ergodic theorems for general dynamical systems, Trudy Moskov. Mat., 26 (1972), 95–132. [44] V. S. Varadarajan, Groups of transformations of Borel spaces, Trans. Amer. Math. Soc., 109 (1963), 191–220. [45] K. Yosida, Mean ergodic theorem in Banach spaces, Proc. Imp. Acad. Tokyo, 14 (1938), 292–294. [46] K. Yosida, An abstract treatment of the individual ergodic theorems, Proc. Imp. Acad. Tokyo, 16 (1940), 280–284. [47] K. Yosida, Functional Analysis 6th Ed., Springer-Verlag, Berlin Heidelberg 1980. [48] K. Yosida and S. Kakutani, Birkhoff ergodic theorem and the maximal ergodic theorem, Proc. Imp. Acad. Tokyo, 15 (1939), 165–168. [49] T. Ziegler, Universal characteristic factors and Furstenberg averages, J. Amer. Math. Soc., 20 (2007), 53–97. [50] R. J. Zimmer, Ergodic Theory and Semisimple Groups, Birkäuser, Boston, 1984. 33
4math.GR
TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS arXiv:1308.5901v1 [math.AG] 27 Aug 2013 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER A BSTRACT. We formalize, at the level of D-modules, the notion that A-hypergeometric systems are equivariant versions of the classical hypergeometric equations. For this purpose, we construct a functor Πà B on a suitable category of torus equivariant D-modules and show that it preserves key properties, such as holonomicity, regularity, and reducibility of monodromy representation. We also examine its effect on solutions, characteristic varieties, and singular loci. When applied to certain binomial D-modules, Πà B produces saturations of the classical hypergeometric differential equations, a fact that sheds new light on the D-module theoretic properties of these classical systems. In memory of Mikael Passare. I NTRODUCTION Hypergeometric systems of Horn type were introduced in the late nineteenth century as multivariate generalizations of the Gauss hypergeometric equation. While their series solutions have been studied extensively, few of these works answer D-module theoretic questions. Indeed, Horn systems depend on parameters whose variation impacts their properties as D-modules, and stratifying their parameter spaces accordingly is difficult. Binomial D-modules are generalizations of the A-hypergeometric systems of Gelfand, Graev, Kapranov, and Zelevinsky [GGZ87, GKZ89, DMM10b]. They are torus equivariant, the parameters acting as characters. As it turns out, homogenization with respect to the torus action provides an isomorphism between the holomorphic solutions of a classical Horn system and its equivariant binomial counterpart; however, the D-modules themselves are related in a more subtle way. In this article, we introduce an invariantizing functor Πà B that, in particular, links Horn systems to certain binomial D-modules and induces the above homogenization process on solutions. This involves a general procedure for realizing as D-modules on (C∗ )n−d the modules of invariants of (C∗ )d -equivariant D-modules on (C∗ )n . The construction of Πà B and the study of its properties occupy Part I, while Part II is concerned with the application of Πà B to binomial D-modules. Outline for Part I. In §1, we provide background on D-modules and define the torus actions we will consider, while we introduce important categories of equivariant D-modules in §2. We work with the torus invariants functor for D-modules on X = (C∗ )n in §3. Over X̄ = Cn in §4, we define and state initial properties of the functor Πà B , while §5 provides more refined information. Outline for Part II. In §6, we discuss binomial DX̄ -modules, and we apply Πà B to them in §7. This yields explicit characterizations of D-module properties for saturated Horn systems in terms of the parameter sets; in §§8-9, we consider other variants of Horn systems, see Definition 0.3. We conclude by explaining the relationship between the image under Πà B of an A-hypergeometric system and the Horn–Kapranov uniformization of discriminantal varieties in §10. 2010 Mathematics Subject Classification. Primary: 14L30, 33C70; Secondary: 13N10, 14M25, 32C38. CBZ was partially supported by NSF Grants DMS 1303083, OISE 0964985, and DMS 0901123. LFM was partially supported by NSF Grants DMS 0703866, DMS 1001763, and a Sloan Research Fellowship. UW was partially supported by NSF Grant DMS 0901123. 1 2 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER Construction of the functor. Throughout, on any C-scheme, we mean by “differential operators” the sheaf of C-linear differential operators on the corresponding structure sheaf. Since we consider only products of affine spaces and tori as underlying manifolds, which are all D-affine, we may restrict our attention to global sections. If T := (C∗ )d acts on X̄ := Cn , then the action extends naturally to the differential operators on X̄. In order to produce DCn−d -modules from T -equivariant DX̄ -modules, one could try GIT type constructions. However, the GIT quotient of X̄ by T is singular and would not fit our desired applications for Horn systems. Instead, we restrict T -equivariant DX̄ -modules to X := X̄ r Var(x1 · · · xn ), the open torus of X̄, and consider the family of toric maps from the quotient of X by T to the open torus Z in an affine space Z̄ = Cm , where m := n − d. This family is parametrized by invertible matrices à that extend A and the Gale duals B of A. Theorem 3.6 states that, over X, taking T -invariants and endowing the resulting module with a DZ -module structure, a functor denoted ∆à B , behaves well with respect to a number of D-module theoretic properties. Returning to X̄, we produce a functor Πà B that sends T -equivariant DX̄ -modules to DZ̄ -modules. With moderate restrictions on its source category, Πà B preserves L-holonomicity, regular holonomicity, and reducibility of monodromy representation, as shown in Theorem 4.2. Under an additional irreducibility assumption in §5, we obtain an explicit presentation for Πà B and describe its impact on solutions, characteristic varieties, and singular loci. Binomial D-modules. In Part II, we consider an important class of equivariant DX̄ -modules, whose images under the functor Πà B are DZ̄ -modules of hypergeometric type. We show that there is an equivalence between the (regular) holonomicity of a binomial DX̄ -module M and Πà B (M ). Definition 0.1. For a d × n integer matrix A = (aij ) ∈ Zd×n , let I be an A-graded binomial C[∂x ]ideal, meaning that I is generated by elements of the form ∂xu − λ∂xv . In this definition, λ = 0 is allowed; in other words, monomials are admissible generators in a binomial ideal. A binomial DX̄ -module depends on a choice of some β ∈ Cd and has the form DX̄ /(I + hE − βi) := DX̄ /(DX̄ · I + hE − βi). P Here Ei := nj=1 aij xi ∂xi for 1 ≤ i ≤ d, and E − β is the sequence E1 − β1 , . . . , Ed − βd of Euler operators of A, see Remark 1.6. Example 0.2. For special kinds of binomial ideals, we obtain special kinds of binomial DX̄ modules. The toric ideal IA := h∂xu − ∂xv | Au = Avi ⊆ C[∂x ] gives rise to a binomial DX̄ -module called an A-hypergeometric DX̄ -module. The left DX̄ -ideal HA (β) := DX̄ · IA + hE − βi is called an A-hypergeometric system, or GKZ-system. If B is a Gale dual of A (see Convention 3.2), then the lattice basis ideal associated to B is I(B) := h∂xw+ − ∂xw− | w = w+ − w− is a column of Bi ⊆ C[∂x ] The lattice basis binomial DX̄ -module is DX̄ /(I(B) + hE − βi). 7 TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 3 Horn hypergeometric systems. The explicit description of Πà B in Corollary 5.8 yields a method to show that saturated Horn systems arise essentially by applying Πà B to lattice basis binomial D-modules. Corollaries 7.2.(vi) and 7.5 characterize holonomicity, regularity, and reducibility of monodromy representation of saturated Horn systems. To explain the use of the word saturated, we now provide three ways of viewing Horn systems. Definition 0.3. Let B be an n×m integer matrix of full rank m with rows B1 , . . . , Bn . Let κ ∈ Cn . With Z̄ = Cm , let η := [z1 ∂z1 , . . . , zm ∂zm ] and construct the following elements of DZ̄ : qk := ik −1 Y bY (Bi · η + κi − `) bik >0 `=0 and ik |−1 Y |bY pk := (Bi · η + κi − `). bik <0 `=0 (1) The Horn hypergeometric system associated to B and κ is the left DZ̄ -ideal Horn(B, κ) := DZ̄ · hqk − zk pk | k = 1, . . . mi ⊆ DZ̄ . (0.1) (2) The saturated Horn hypergeometric system associated to B and κ is the left DZ̄ -ideal sHorn(B, κ) := DZ · hqk − zk pk | k = 1, . . . mi ∩ DZ̄ = DZ · Horn(B, κ) ∩ DZ̄ ⊆ DZ̄ . (0.2) (3) Assume that B has an m × m submatrix which is diagonal with strictly positive entries, and assume that the corresponding entries of κ are all zero. The normalized Horn hypergeometric system associated to B and κ is the left DZ̄ -ideal   1 qk − pk k = 1, . . . m ⊆ DZ̄ . (0.3) nHorn(B, κ) := DZ̄ · zk Example 0.4. Hypergeometric series are expressions of the form ∞ km X z1k1 · · · zm Ωk1 ,...,km , k1 ! · · · km ! k ,...,k =0 1 m where Ωk1 ,...,km is a ratio of products of ascending (or descending) factorials of integer linear combinations of the indices k1 , . . . , km , translated by certain fixed parameters. They have been extensively studied and include the (generalized) Gauss hypergeometric function(s), Appell functions, Horn series in two variables, Lauricella series, and Kampé de Feriét functions, among others. All such series are solutions of systems of differential equations of the form Horn(B, κ), where the rows of B are determined by the factorials that appear in the series. Having k1 ! · · · km ! in the denominator of the series coefficients implies that B has an m × m identity submatrix, and the corresponding parameters κj are zero. In particular, all of the above named hypergeometric series are solutions of normalized Horn systems, as in Definition 0.3.(3). 7 Once B and κ are fixed, the holomorphic solutions of the three types of Horn systems in Definition 0.3 coincide; however, the modules themselves are truly different. As illustrated in Example 9.1, it can happen that DZ̄ /sHorn(B, κ) is holonomic while DZ̄ /Horn(B, κ) is not. For previous results about Horn D-modules, we are aware of only [Sad02, DMS05]. We show in Corollary 5.10 that saturated Horn systems are essentially captured by the image of Πà B . This leads to precise results about saturated Horn systems in Theorems 7.1.(vi) and 6.7, in addition to our general results on images of binomial D-modules. We use alternate approaches in §8 and §9 to obtain results about normalized and usual Horn systems. In particular, we show that the holonomicity of DZ̄ /Horn(B, κ) and DX̄ /(I(B) + hE − βi) is not equivalent; however, Theorem 9.4 provides a sufficient condition on κ to ensure the holonomicity of DZ̄ /Horn(B, κ). 4 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER Acknowledgements. We are grateful to Frits Beukers, Alicia Dickenstein, Brent Doran, Anton Leykin, Ezra Miller, Christopher O’Neill, Mikael Passare, and Bernd Sturmfels, who have generously shared their insight and expertise with us while we worked on this project. Part of this work was carried out at the Institut Mittag-Leffler program on Algebraic Geometry with a view towards Applications and the MSRI program on Commutative Algebra. We thank the program organizers and participants for exciting and inspiring research atmospheres. Part I: Torus invariants and D-modules 1. D- MODULES AND TORUS ACTIONS Fix integers n > m > 0 and set d := n − m. After reviewing some background on D-modules and their solutions, we describe the action of the algebraic d-torus T := (C∗ )d on Cn and show how this action extends to regular functions, differential operators, and holomorphic germs. 1.1. D-modules. Let X̄ := Cn with coordinates x := (x1 , . . . , xn ). The Weyl algebra DX̄ is the ring of differential operators on X̄, which is a quotient of the free associative C-algebra generated by x1 , . . . , xn , ∂x1 , . . . , ∂xn by the two-sided ideal xi xj = xj xi , ∂xi ∂xj = ∂xj ∂xi , ∂xi xj = xj ∂xi + δij | i, j ∈ {1, . . . , n} , where δij is the Kronecker δ-function. Let Z̄ := Cm with coordinates z := (z1 , . . . , zm ), and define its Weyl algebra DZ̄ analogously, with ∂zi denoting the operator for differentiation with respect to zi . Throughout this article, let θi := xi ∂xi , ηi := zi ∂zi , θ := [θ1 θ2 · · · θn ], and η := [η1 η2 · · · ηm ]. Other relevant rings are the Laurent Weyl algebras DX and DZ , defined as the rings of linear partial differential operators with Laurent polynomial coefficients, that is, DX = C[x± ] ⊗C[x] DX̄ and DZ = C[z ± ] ⊗C[z] DZ̄ , where C[x± ] and C[z ± ] denote denote the rings of differential operators on X := X̄ r Var (x1 · · · xn ) = (C∗ )n and Z := Z̄ r Var (z1 · · · zm ) = (C∗ )m . We say that L = (Lx , L∂x ) ∈ Q2n is a weight vector on DX̄ if Lx + L∂x ≥ 0 coordinate-wise. Writing 1n := (1, . . . , 1) ∈ Zn , we assume throughout that Lx + L∂x = c · 1n for some c ∈ Q>0 . A weight vector L defines an increasing filtration L on DX̄ by Lk DX̄ := C · {xu ∂xv | L · (u, v) ≤ k} for k ∈ Q. Set L<k DX̄ := `<k L` DX̄ . By our convention, the associated graded ring grL DX̄ is isomorphic to the coordinate ring of T ∗ X̄ ∼ = C2n . S If P ∈ Lk DX̄ r L<k DX̄ , then P is said to have L-order k. For any P in Lk DX̄ r L<k DX̄ , we denote its symbol by inL (P ) := P + L<k D ∈ grL,k D := Lk D/L<k D ⊆ grL D. The weight filtration induced by F = (Fx , F∂x ) := (0n , 1n ) ∈ Q2n is called the order filtration on DX̄ . Its kth filtered piece F k DX̄ consists of all operators of order at most k. The associated graded ring of DX̄ with respect to the order filtration is denoted by grF DX̄ . Denoting inF (∂xi ) = ξi and abusing language by writing xi for inF (xi ), we have grF DX̄ ∼ = C[x1 , . . . , xn , ξ1 , . . . , ξn ]. Similarly, grF DZ̄ ∼ C[z , . . . , z , ζ , . . . , ζ ], where ζ is the symbol of ∂zi . = 1 m 1 m i TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 5 Let M be a finitely generated left DX̄ -module. A weight vector L on DX̄ induces a filtration on (a presentation of) M . When Lx + L∂x > 0n , the L-characteristic variety of M is supp(grL (M )) ⊆ T ∗ X̄ ∼ = C2n . We denote this set by CharL (M ); it is well-defined (see [SW08] for references), Zariski closed, and agrees with the zero set of the ideal ann(grL (M )). We say that M is Lholonomic if its L-characteristic variety has dimension n. The F -characteristic variety of M is called its characteristic variety, denoted Char(M ). We say that M is holonomic if its characteristic variety has dimension n. Bernstein’s inequality says that the characteristic variety of a left DX̄ -ideal has dimension at least n [Bern72]. Smith [Smi01] refined this result, showing that every component of CharL (M ) has dimension at least n. The rank of the module M is rank(M ) := dimC(x) (C(x) ⊗C[x] M ). If M is holonomic, then rank(M ) is finite, see [SST00, Proposition 1.4.9]. The projection of Char(M ) r Var(ξ1 , . . . , ξn ) onto the x-coordinates is called the singular locus of M , denoted Sing(M ). Any p ∈ Sing(M ) is called a singular point of M . Let Y be a complex manifold of dimension n with a point p ∈ Y . The holonomic left DY module M is said to be regular at p if for any curve C ⊆ Y passing through p, with smooth locus ι : Cs ,→ Y , there is an open neighborhood U of p in Y such that all the sheaves Lk ι∗ (M |U ) are connections on Cs with regular singular ODEs on a smooth compactification C of Cs . (These sheaves are zero outside the range −n + 1 ≤ k ≤ 0.) The module M is regular holonomic if it is regular holonomic at every point p ∈ X̄. The notion of regularity is equivalent to requiring that the natural restriction map from formal to analytic solutions of M be an isomorphism in the derived category. As such, it generalizes the classical definition of regular (Fuchsian) singularities for an ordinary differential equation. Note that, since we consider a compactification of C, regular holonomicity on Y includes information about the behavior of (derived) solutions at infinity. Regular holonomicity is a crucial property in the theory of D-modules. Bounded complexes of regular holonomic modules provide the input for the de Rham functor, which appears in the Riemann–Hilbert correspondence. A larger category cannot be used, as regularity is needed so that the DeRham functor is fully faithful. Moreover, regular holonomic modules are particularly suitable for computations. For example, the Frobenius algorithm for solving Fuchsian ODEs has been successfully generalized to regular holonomic systems in [SST00, §2.5]. The categories of holonomic and regular holonomic DY -modules are Abelian and closed under the formation of extensions, and they form full subcategories of the category of D-modules. Both holonomicity and regularity are preserved by direct and inverse images along morphisms of smooth varieties. See [BGK+ 87] for more details. A holonomic left DY -module M is said to have irreducible monodromy representation if the module M (y) := C(Y ) ⊗C[Y ] M is an irreducible module over D(y) := C(Y ) ⊗C[Y ] DY . Here, C[Y ] and C(Y ) are the rings of regular and rational functions on Y , respectively. If M does not have irreducible monodromy representation, then its solution space has a nontrivial proper subspace that is monodromy invariant, since the fundamental group of Y r Sing(M ) is finitely presented. an 1.2. Solutions of D-modules. Let Op, be the space of germs of holomorphic functions at p ∈ X, X̄ an and use • for the action of DX̄ on Op,X̄ . Given a left DX̄ -ideal J, the solution space Solp (DX̄ /J) 6 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER an at p consists of elements of Op, that are annihilated by J: X̄ ∼ an an HomDX̄ (DX̄ /J, Op, ) −→ {f ∈ Op, | P • f = 0 ∀P ∈ I} = Solp (DX̄ /J). X̄ X̄ Φ 7→ f (x) := Φ(1 + J) Theorem 1.1 (Kashiwara, see [SST00, Theorem 1.4.19]). Let J be a left DX̄ -ideal such that DX̄ /J is holonomic, and let p be a nonsingular point of DX̄ /J. Then dimC (Solp (DX̄ /J)) is finite,  independent of p, and equal to rank(DX̄ /J). Given w ∈ Rn , (−w, w) ∈ R2n induces a filtration on DX̄ . Note that gr(−w,w) DX̄ ∼ = DX̄ , which 2n is in contrast to the case in §1.1 for a weight vector L ∈ R ; however, for P ∈ DX̄ , we may analogously define in(−w,w) (P ) ∈ DX̄ . If J ⊆ DX̄ is a left DX̄ -ideal, then set gr(−w,w) (J) := hin(−w,w) (P ) | P ∈ Ji, which by abuse of notation, we view as a left DX̄ -ideal. Definition 1.2. Let J ⊆ DX̄ be a left DX̄ -ideal. We say that w ∈ Rn is a generic weight vector for DX̄ /J if there exists an (n-dimensional) open rational polyhedral cone Σ ⊆ Rn>0 with trivial 0 0 lineality space such that w ∈ Σ and for all w0 ∈ Σ, gr(−w,w) (J) = gr(−w ,w ) (J). Definition 1.3. Let J ⊆ DX̄ be a left DX̄ -ideal, and assume that w ∈ Rn is a generic weight vector for DX̄ /J. Write log(x) := (log(x1 ), . . . , log(xn )). A formal solution φ of DX̄ /J is called a basic Nilsson solution of DX̄ /J in the direction of w if it has the form X φ(x) = xv+u pu (log(x)), u∈C n for some vector v ∈ C , such that the following conditions are satisfied: (1) C is contained in Σ∗ ∩ Zn , where Σ is as in Definition 1.2. Here, Σ∗ is the dual cone of Σ, which consists of the vectors u ∈ Rn with u · w0 ≥ 0 for all w0 ∈ Σ. (2) the pu are polynomials, and there exists k ∈ Z such that deg(pu ) ≤ k for all u ∈ C. (3) p0 6= 0. The set supp(φ) := {u ∈ C | pu 6= 0} is called the support of φ. The C-span of the basic Nilsson solutions of DX̄ /J in the direction of w is called the space of formal Nilsson solutions of DX̄ /J in the direction of w, denoted Nw (DX̄ /J). Theorem 1.4 ([SST00, Theorems 2.5.1 and 2.5.14]). Let J be a left DX̄ -ideal such that DX̄ /J is regular holonomic. If w ∈ Rn is a generic weight vector for DX̄ /J, then dimC (Nw (DX̄ /J)) = rank(DX̄ /J). Further, there is an open set U ⊆ X̄ r Sing(DX̄ /J) such that the basic Nilsson solutions of DX̄ /J in the direction of w simultaneously converge at each p ∈ U and form a basis for Solp (DX̄ /J).  1.3. Torus actions in the Weyl algebra. Convention 1.5. Fix a d × n integer matrix A of rank d whose columns span Zd as a lattice. We denote the columns of A by a1 , . . . , an . Throughout this article we assume that A is pointed; in other words, there exists h ∈ Rd such that h · ai > 0 for all i = 1, . . . , n. 7 We consider the action of the torus T = (C∗ )d on X̄ given by (t1 , . . . , td )  (x1 , . . . , xn ) := (ta1 x1 , . . . , tan xn ). TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 7 We let T denote the torus orbit of 1n in X̄. By our assumptions on A, the map T → T given by t 7→ t  1n is an isomorphism of varieties. This torus action induces an action of T on DX̄ via t  xi := tai xi , t  ∂xi := t−ai ∂xi , for 1 ≤ i ≤ n and t = (t1 , . . . , td ) ∈ T. (1.1) An element P ∈ DX̄ is torus homogeneous of weight a ∈ Zd if t  P = ta P for all t ∈ T . A left DX̄ -ideal is torus equivariant if and only if it is generated by torus homogeneous elements. The torus action on DX̄ imposes a multigrading, called the A-grading, given by deg(xi ) := ai and deg(∂xi ) := −ai . d The grading group is ZA = Z , the Abelian group generated by the columns of A. An element P P = λu,v xu ∂xv ∈ DX̄ has degree a ∈ ZA = Zd if and only if Au − Av = a whenever λu,v 6= 0. The term A-graded is used to emphasize that the torus action is defined by A. The torus action also passes to germs of functions on X̄. For t ∈ T and x ∈ X̄, denote t  x := (ta1 x1 , . . . , tan xn ). A function that satisfies ϕ(t  x) = tβ ϕ(x1 , . . . , xn ) for all t in an open subset of T has degree β ∈ Cd . Note that any β ∈ Cd may occur as aweight  of a function. The subspace an an of Op,X̄ consisting of A-graded germs of degree β is denoted Op,X̄ β .  an  Remark 1.6. The space Op, can be viewed as the set of β-eigenvectors for the Euler operators X̄ β E of A from Definition 0.1. As β defines a character of T , the action of T on X (really, on T ∗ X) can be viewed as an action of its Lie algebra. Loosely, the operators in E are the (Fourier transforms of the) pushforwards of generators of the Lie algebra of the torus. Thus, the solutions of the Euler operators E − β are precisely the functions which are infinitesimally torus homogeneous of weight β. In other words,   Hom(DX̄ /hE − βi, Oan ) ∼ 7 = Oan . p,X̄ p,X̄ β Remark 1.7. If J is an A-graded left DX̄ -ideal, then any series solution of DX̄ /J may be decomposed as a sum of A-homogeneous series, each of which is also a solution of DX̄ /J. In particular, for a generic P weight vector w, Nw (DX̄ /J) of Definition 1.3 is spanned by basic Nilsson series φ(x) = u∈C xv+u pu (log(x)) whose support is contained in Σ∗ ∩ kerZ (A). Further, if hE − βi ⊆ J, then Av = β. 7 2. C ATEGORIES OF A- GRADED D- MODULES In this section, Y is either X or X̄, and D-mods(Y ) is the category of finitely generated DY modules. We introduce certain subcategories of D-mods(Y ) that will be used in this article, and prove some of their basic properties. Definition 2.1. Let A-mods(Y ) denote the category of finitely generated A-graded DY -modules with A-graded morphisms of A-degree zero. We let A-hol(Y ) denote the full subcategory of A-mods(Y ) given by A-graded holonomic DY -modules. Remark 2.2. Recall that T = T 1n ∼ = T . The ring of differential operators on T is the subgroup DT of DX /(hxu − 1 | u ∈ Zn , Au = 0i · DX ) generated by the monomials xv with v ∈ Zn and the operators E1 , . . . , Ed . This is indeed a ring and is isomorphic to DT via xv 7→ tAv for v ∈ Zn and Ei 7→ ti ∂ti for i = 1, . . . , d. Note that [DT ]T = C[E1 , . . . , Ed ] =: C[E] is (isomorphic to) a polynomial ring in d variables generated by the T -equivariant vector fields on X. The containment DX̄ ⊆ DX is such that we may endow DX̄ with a [DT ]T -action using the Ei . We shall use this lifted action in the sequel without further mention. 7 8 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER Definition 2.3. We denote by T -hol(Y ) the smallest full subcategory of A-mods(Y ) that contains each module M with the property that, for each homogeneous element γ ∈ M , the DT -module DT /(DT · ann[DT ]T (γ)) is holonomic. Note that there is a natural functor from T -hol(X̄) to T -hol(X) given by restriction to X. Also, note that the categories A-mods(Y ), A-hol(Y ), and T -hol(Y ) are all Abelian, and A-mods(Y ) and A-hol(Y ) are clearly closed under extensions. Lemma 2.4. The category T -hol(Y ) is closed under extensions. Proof. Let 0 → M → N → P → 0 be a short exact sequence in A-mods(Y ) with M andP in T -hol(Y ). For any homogeneous γ ∈ N , let J := DT · ann[DT ]T (γ + M ), the annihilator of γ + M ∈ P , be generated by P1 , . . . , Pk ∈ [DT ]T . Then P1 · γ, . . . , Pk · γ all lie in M and are hence annihilated by ideals I1 , . . . , Ik with generators in [DT ]T . Therefore T  T  T  DT · ann[DT ]T (γ) ⊇ j Ij · P1 + . . . + j Ij · Pk ⊇ j Ij · J. Note that if J1 and J2 are left DT -ideals such that each DT /Ji is holonomic, then DT /(J1 ∩ J2 ) is also holonomic because there is an exact sequence DT DT DT DT 0 → → ⊕ → → 0. J1 ∩ J2 J1 J2 J1 + J2 T Since each DT /Ij is holonomic by assumption, so is DT / j Ij . Now if J1 , J2 are such that DT /Ji are holonomic for each i, then DT /(J1 J2 ) is also holonomic. Indeed, the exact sequence J2 DT DT 0 → → → → 0 J1 J2 J1 J2 J2 shows that it suffices to prove holonomicity for J2 /(J1 J2 ), which is the quotient of theTholonomic module (DT /J1 )k under the map induced by any surjection DTk  J2 . Thus DT /( j Ij · J) is holonomic, so the same is true for DT /DT · ann[DT ]T (γ), as desired.  Theorem 2.5. The category A-hol(Y ) is a subcategory of T -hol(Y ). Proof. We begin by proving the result when the matrix A consists of the top d rows of an n × n identity matrix and Y = X̄. In this case, the torus T is simply Var(xd+1 − 1, . . . , xn − 1) ⊆ X. ± T Thus DT is the C[x± 1 , . . . , xd ]-algebra generated by θ1 , . . . , θd , while the invariant ring [DT ] is C[θ1 , . . . , θd ]. If M is a holonomic A-graded DX̄ -module and γ ∈ M is a fixed homogeneous element, then the annihilator of γ is a holonomic A-graded ideal, say I := annDX̄ (γ). As such, the b-function bγ,i (s) for restriction to xi = 0, 1 ≤ i ≤ d, exists (i.e., is nonzero) and satisfies bγ,i (θi ) ∈ I + Vi−1 DX̄ . Here Vi• DX̄ (2.1) denotes the Kashiwara–Malgrange filtration on DX̄ , which is given by Vik DX̄ := SpanC {xu ∂ v ∈ DX̄ | vi − ui ≤ k}. (A discussion of b-functions for restriction can be found in [SST00, §§5.1-5.2].) Taking the Adegree zero part of any equation expressing the containment (2.1) shows that bγ,i (θi ) ∈ I because no element of Vi−1 DX̄ has A-degree 0. (Recall that A consists of the top d rows of an n × n identity matrix.) In other words, for all i, the DX̄ -annihilator of γ contains a polynomial in Ei . Now since P C[θi ]/hbγ,i (θi )i is Artinian, so is the quotient C[θ1 , . . . , θd ]/ ann[DT ]T (γ) of C[θ1 , . . . , θd ]/ i hbγ,i (θi )i. Theorem 2.7 below completes this special case. TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 9 We next observe that the case Y = X follows from the case Y = X̄ (for any fixed A). Indeed, if M is holonomic and A-graded on X, then the pushforward of M to X̄ (which is just M , viewed as a DX̄ -module) has the same properties and is therefore in T -hol(X̄) ⊇ T -hol(X). We next consider Y = X but general A. The theory of elementary divisors ascertains the existence of matrices P ∈ GL(d, Z) and Q ∈ GL(n, Z) such that P AQ is the top d rows of a diagonal n × n matrix. Substituting P A for A is just a change of coordinates on the grading group and the Euler operators. On the other hand, replacing A by AQ corresponds to the change on the grading group and the Euler operators induced by the monomial change of coordinates x 7→ xQ on X. This change is T -invariant on the category of DX -modules, and thus also on A-hol(X) and T -hol(X). Now ZA = Zd implies that P AQ can be chosen to equal the first d rows of an n × n identity matrix, which settles the case that A is arbitrary and Y = X. Finally, we reduce the case Y = X̄ to the case Y = X. To that end, use induction on n. Let i : X ,→ X̄ be the natural embedding and fix a module M in A-hol(X̄). For n = 0, the result is trivial. For n = 1, consider the exact sequence of local cohomology 0 → Hx01 (M ) → M → i∗ i∗ M → Hx11 (M ) → 0. The outer terms are supported in x1 = 0. By Kashiwara equivalence, the case n = 0, and since T -hol(X̄) is closed under extensions, the proposition holds for M precisely if it holds for i∗ i∗ M . But we already proved it holds for i∗ M , so the case n = 1 is proven. The general case is slightly more involved, but it suffices to indicate the case n = 2. Given i1 : X1 = X̄ r Var(x1 ) ,→ X̄ and i2 : X2 = X1 r Var(x2 ) ,→ X1 , there are two exact sequences: 0 → Hx01 (M ) → M → i1∗ i1 ∗ M → Hx11 (M ) → 0 and 0 → Hx02 (i1∗ i1 ∗ M ) → i1∗ i1 ∗ M → i2∗ i2 ∗ i1∗ i1 ∗ M → Hx12 (i1∗ i1 ∗ M ) → 0. By Kashiwara equivalence and the case n = 1, the outer terms in both sequences satisfy the proposition. As T -hol(X̄) is closed under extensions, the proposition holds for M if and only if it holds for i1∗ i1 ∗ M , and that happens if and only if it holds for i2∗ i2 ∗ i1∗ i1 ∗ M . However, the latter module is the pushforward to X̄ of the restriction of M to X, so the case n = 2 follows from the case Y = X above.  Example 2.6. The module DX̄ /(DX̄ · E) is in T -hol(X̄) but does not belong to A-hol(X̄). 7 The following result can be used to give alternative descriptions for the objects of T -hol(Y ), where Y is still X or X̄. The equivalence of the second and last items in Theorem 2.7 was proven in [SST00, Proposition 2.3.6] for cyclic modules, using different methods. Theorem 2.7. The following are equivalent for a finitely generated A-graded DT -module M : (1) (2) (3) (4) M is regular holonomic. M is holonomic. M is L-holonomic for all L = (Lx , L∂x ) on X with Lx + L∂x = c · 1n for some c ∈ Q>0 . C[E]/ annC[E] (γ) is Artinian for all γ ∈ M . Proof. The isomorphism between DT and DT in Remark 2.2 induces an equivalence of categories between A-mods(T ) and the category of finitely generated left DT -modules that are equivariant with respect to the action induced by T acting on itself by multiplication. Under this equivalence of categories, (regular) holonomic modules correspond to (regular) holonomic modules. Moreover, 10 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER the filtration on DT induced by a weight vector L = (Lx , L∂x ) with Lx + L∂x = c · 1n for some c > 0 corresponds, under our isomorphism, to the filtration induced on DT by the weight vector ((ALx )t , c · 1d − (ALx )t ). Given these considerations, it is enough to prove the statements in the context of DT -modules. First note that the module DT /(hti ∂ti − βi | i = 1, . . . , di · DT ) is regular holonomic and L0 holonomic for any L0 = (L0t , L0∂t ) ∈ C2d such that L0t + L0∂t = c · 1d for some constant c > 0. Regularity follows from the fact that these are Fuchsian equations in disjoint variables, while L0 holonomicity is clear. This implies that if I is an equivariant left DT -ideal whose degree zero part I0 is an Artinian ideal in the polynomial ring C[t1 ∂t1 , . . . , td ∂td ], then the module DT /I is regular holonomic, and L0 -holonomic, since the categories involved are Abelian and closed under extensions. This shows that (4) implies (1), (2), and (3) in the cyclic case. For the reverse implications, still in the cyclic case, suppose that I is an equivariant left DT -ideal. If C[t∂t ]/I0 = C[t∂t ]/ annC[t∂t ] (1) is not Artinian, then DT /I has infinite rank, and therefore cannot be L0 -holonomic or regular holonomic. The previous sentence uses the fact that L0 -holonomic modules are holonomic [SST00, Theorem 1.4.12]. Finally, we consider the general case. Let M be a finitely generated A-graded equivariant DT module. Since the categories involved are closed under extensions, it is not hard to show that M is holonomic (L-holonomic, regular holonomic) if and only if it has a finite composition chain such that each composition factor is cyclic and holonomic (L-holonomic, regular holonomic). Note that the maximal length of such a composition chain depends only on M (and is called the holonomic length of M ). Let γ ∈ M , and let N be the T -submodule of M generated by γ. The C[E]-annihilator of γ as an element of M is equal to the C[E]-annihilator of γ as an element of N . Since N is cyclic, we have already shown that N satisfies (1), (2), or (3) precisely if it satisfies (4). But M/N has smaller holonomic length than M , so the result follows by induction.  3. T ORUS INVARIANTS OF DX - MODULES In this section, we consider the exact functor [−]T : M 7→ M0 on A-mods(X), which selects the A-degree zero part (that is, the torus invariant part) of a module M . The natural target of this functor is the category of [DX ]T -modules. Viewing X as the product (X/T ) × T , M0 inherits an action by DX/T . Any étale morphism X/T → Z induces (by D-affinity) an action of DZ on DX/T and hence on the category of DX/T -modules. This section explains how we may consider the category of DZ -modules to be the target of the invariant functor [−]T . For our purposes, the important cases are those for which the composition X → X/T → Z is a monomial map. These situations are parameterized by two pieces of data: the possible splittings of X and the Gale duals of A. We encode this information in two matrices, à and B, and denote our invariants functor [−]T by ∆à B , as defined in (3.1). We construct this functor in Definition 3.4 and then show in Theorem 3.6 that, upon restricting its source to T -hol(X), it behaves well with respect to several D-module theoretic properties. Notation 3.1. If G is an integer p × q matrix then we denote by µG the monomial morphism from (C∗ )p to (C∗ )q that sends v ∈ (C∗ )p to v G = (v g1 , . . . , v gq ), where g1 , . . . , gq are the columns of G. We also denote the corresponding morphism on the structure sheaves by µG . For example, µA : T → X is the map with image T . 7 TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 11 Recall that m = n − d and ZA = Zd . The splittings of X that factor through monomial maps from X to (X/T ) × T are in bijection with those matrices à ∈ GL(n, Z) whose top d rows agree with A. We denote the bottom n − d rows of such à by A⊥ . We let C ⊥ and C respectively denote the n × d and n × m matrices that form the left and right parts of the inverse matrix C̃ to Ã. Note that µC : X → X/T comes from a splitting of X. Convention 3.2. An n×m integer matrix B is a Gale dual of A if the columns of B span kerQ (A). For the remainder of this article, fix a Gale dual B of A and a matrix à ∈ GL(n, Z) whose top d rows agree with A. Since ÃC̃ is the identity, AC = 0. Thus the equation AB = 0 implies the existence of a full rank integer m × m matrix K such that B = CK, inducing µK : X/T → Z via y 7→ y K as in Notation 3.1. Call the composition µK ◦ µC : X → X/T → Z the split Gale morphism attached to (Ã, B). 7 Notation 3.3. Suppose (C∗ )q has a monomial action on (C∗ )p given by a matrix H, and let Q := (C∗ )q  1p ⊆ (C∗ )p . Let H̃ ∈ GL(p, Z) be such that its top q rows agree with H, and denote its bottom p − q rows by H ⊥ . Let G̃ = (H̃)−1 , and let G denote the matrix given by the final p − q columns of G̃. Using v and y for the respective coordinates of (C∗ )p and (C∗ )p−q ∼ = (C∗ )p /Q, set χi := vi ∂vi , χ := [χ1 χ2 · · · χp ], λi := yi ∂yi , and λ := [λ1 λ2 · · · λp−q ]. In accordance with Notation 3.1, the matrix G induces a quotient map µG : (C∗ )p → (C∗ )p−q ∼ = ∗ )q ∗ p G ⊥ (C (C ) /Q, and via µG , y acts as v and λ acts as H χ, both of which lie in [D(C∗ )p ] . From ∗ )q ±1 (C H̃ this we obtain an action of D(C∗ )p−q = C[y ]hλi on [D(C∗ )p ] . We denote by ΥG the process (C∗ )q ∗ p ∗ q of endowing a [D(C ) ] -module with a D(C ) -module structure via µG . 7 We will apply Notation 3.3 in two cases. The first is for à and µC : X → X/T , and the second is for K −1 and µK : X/T → Z, where X/T has a trivial torus action. Note that the functors Υà C −1 and ΥK are related to the maps in the split Gale morphism X → X/T → Z attached to ( Ã, B). K Definition 3.4. Using Convention 3.2 and Notation 3.3, define the functor K ∆à B := ΥK −1 T ◦ Υà C ◦ [−] : M 7→ M0 , (3.1) which sends a finitely generated DX -module M to the [DX ]T -module M0 , viewed as DZ -module. Example 3.5. Suppose that à = C̃ is an identity matrix and B = C. In this situation, we may write X = T × Z, and T acts on X by t  (s, z) = (ts, z). Even in this case, it becomes apparent why, if we desire nice output, we must restrict ∆à B to T -hol(X). To wit, the torus invariants of DT ×Z are generated by DZ and C[t1 ∂t1 , . . . , td ∂td ]. In particular, ]T = DZ [t∂t ] is a L while [DT ×ZL α DZ -module, it is not finitely generated. Fortunately, if M = α∈ZA Mα = α∈ZA M0 · t is T in A-mods(T × Z), then [M ] = M0 is a finitely generated DZ [t∂t ]-module. In order for M0 to be a finitely generated DZ -module, more assumptions are needed to govern the impact of t∂t ; the holonomicity requirement in the definition of T -hol(X) provides precisely that. 7 We are now prepared to state the main result of this section, which concerns the restriction of ∆à B to T -hol(X) (see Definition 2.3). This restriction guarantees that the output of the functor is a finitely generated DZ -module and compatible with a number of D-module theoretic properties. Recall from §2 that we have the following inclusions of categories: A-hol(X) ⊆ T -hol(X) ⊆ A-mods(X) ⊆ D-mods(X). 12 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER Theorem 3.6. If M is in T -hol(X), then ∆à B (M ) is a finitely generated DZ -module, so that we have a restricted functor ∆à B : T -hol(X) → D-mods(Z). Further, the following statements hold for M in T -hol(X). (1) Let L := (Lx , L∂x ) ∈ Q2n be a weight vector with Lx + L∂x = c · 1n for some c > 0. Let L0 := (Lx B, c · 1m − Lx B) ∈ Q2m . Then M is L-holonomic if and only if ∆à B (M ) is 0 L -holonomic. (2) A module M in A-hol(X) is regular holonomic if and only if ∆à B (M ) is regular holonomic. (3) If M has reducible monodromy representation, then so does ∆à B (M ). If the columns of B span kerZ (A) as a lattice, then the converse also holds. Note that if L = F induces the order filtration on DX , then L0 induces the order filtration on DZ . Thus, as a special case of Theorem 3.6.(1), if M is in T -hol(X), then M is holonomic if and only if ∆à B (M ) is holonomic. Proof of Theorem 3.6. This proof occupies the remainder of this section and will be accomplished through a series of reductions. Lemma 3.7. If Theorem 3.6 holds when K is the identity matrix, then it holds in general. −1 Proof. We wish to show that, for general K, Theorem 3.6 holds for the functor ΥK K . Up to a −1 coordinate change on the base and range, ΥK corresponds to the covering map induced by a K diagonal matrix. In this case, DX/T is a free DZ -module of rank | det(K)| = [kerZ (A) : ZB], and −1 in particular, ΥK preserves finiteness, as desired. K Suppose now L = (Ly , L∂y ) is a weight vector on X/T with Lx + L∂y = c · 1m for some c > 0. On Z, consider the weight L0 = (L0z , L0∂z ) given by L0z = Ly K and L0∂z = c · 1m − Ly K. This is compatible with z = y K , and the weights of λ and η are c. Hence to the L-filtered DX/T -module −1 M corresponds the L0 -filtered DZ -module ΥK K (M ) (which as an underlying filtered set is exactly K −1 M ). Hence, (1) of Theorem 3.6 holds for ΥK . Part (2) follows from the fact that µK (see Notation 3.1) is an algebraic coordinate change that induces (locally on X/T ) a diffeomorphism. Exponential solution growth along the germ of an embedded curve on X/T is then equivalent to such growth along its image in Z. −1 K Here only the first half of (3) applies, and this follows because ∆à B , and thus ΥK , is exact.  We continue with the proof of Theorem 3.6, assuming now that K is the identity matrix. In parallel to the proof of Theorem 2.5, we next prove the theorem in the case of the simplest diagonal torus action. In this situation, we write X = T ×Z, where T acts on X by scaling the first factor, namely t  (s, z) = (ts, z), so the matrix A consists of the first d rows of the n × n identity matrix Ã. Lemma 3.8. If à = C̃ and K are identity matrices, then Theorem 3.6 holds. Proof. Since à is the identity map in this lemma, we suppress writing Υà C in the remainder, so that T à [M ] represents ∆B (M ). With a slight abuse of notation, write T = T and X = T × Z. Recall that T -hol(T × Z), A-hol(T × Z), L-holonomic A-graded modules on T × Z with Adegree zero morphisms, and regular holonomic A-graded modules on T × Z with A-degree zero TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 13 morphisms are all Abelian categories that are closed under extensions. Thus, in order to show (1) and (2) of Theorem 3.6 in this case, it is enough by Theorem 2.7 to consider a module N for which there exists a β ∈ Cd such that for each nonzero homogeneous element γ ∈ N , annC[E] (γ) = ht∂t − β − deg(γ)i. Then DZ · γ = DZ [E] · γ = [DT ×Z ]T · γ for all γ ∈ N . In other words, each ti ∂ti acts on N as a multiplication by some scalar βi . Since [N ]T = N0 is a finitely generated [DT ×Z ]T -module and [DT ×Z ]T = DL Z [t∂t ], we see that α [N ]T isLa finitely generated DZ -module. To continue, note that since N = α∈ZA N0 · t and DT = α∈ZA C[t∂t ] · tα , we have that, as DT ×Z -modules, N= DT ⊗C [N ]T , DT · ht∂t − βi (3.2) with DT ×Z = DT ⊗C DZ , so that DT is acting on DT /(DT · ht∂t − βi) and DZ is acting on [N ]T . For (1) and (2), consider a weight vector L = (Lt , Lz , L∂t , L∂z ), where (Lt , Lz )+(L∂t , L∂z ) = c·1n for some rational number c > 0. Set LT := (Lt , L∂t ) and LZ := (Lz , L∂z ), and note that the L0 in  T 0 the theorem is just LZ . Thus grL (DT ×Z ) = grLT ([DT ]T ) ⊗C grL (DZ ), and (3.2) implies that     DT DT 0 L L T LT gr (N ) = gr ⊗C [N ] = gr ⊗C grL ([N ]T ). (3.3) ht∂t − βi ht∂t − βi The module H(β) := DT /ht∂t − βi. (3.4) is a regular connection on T . It follows from (3.3) that N is L-holonomic if and only if [N ]T is L0 -holonomic. Thus, (1) and (2) hold for N , from which the general case of the lemma follows. We now consider (3), still assuming that for each homogeneous element γ ∈ N , annC[E] (γ) = ht∂t − β − deg(γ)i. Set N (t, z) := C(t, z) ⊗C[t,z] N and DT ×Z (t, z) := C(t, z) ⊗C[t,z] DT ×Z . From (3.2), we see that N (t, z) =   C(t) ⊗C[t] H(β) ⊗C C(z) ⊗C[z] [N ]T ⊗C(t)⊗C C(z) C(t, z). Since C(t) ⊗C[t] H(β) is an irreducible (C(t) ⊗C[t] DT )-module, irreducibility of N (t, z) is equivalent to that of C(z) ⊗C[z] [N ]T , and (3) holds for N . For the general case of (3), suppose now that M is in T -hol(X) such that for some nonzero γ ∈ M , C[t∂t ]/ annC[t∂t ] (γ) is Artinian, but annC[t∂t ] (γ) is not a maximal ideal. Then M has a filtration by A-graded modules 0 = M (0) ( M (1) ( · · · ( M (r) = M, (3.5) where r > 1 and the C[t∂t ]-annihilators of nonzero homogeneous elements γ (i) in the successive quotients M (i) /M (i−1) have the form ht∂t − β (i) − deg(γ (i) )i for suitable β (i) . Since M is finitely generated, one may choose such a finite filtration that works simultaneously for all homogeneous elements of M . In particular, M does not have irreducible monodromy representation, since C(t, z) ⊗C[t,z] M (1) provides a nonzero nontrivial submodule of C(t, z) ⊗C[t,z] M . At the same time, applying the exact functor C(z) ⊗C[z] [−]T to (3.5) also shows that [M ]T has reducible monodromy representation, completing the proof of (3), and thus of Lemma 3.8.  14 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER Continuing with the proof of Theorem 3.6, by Lemma 3.7 we are left to consider other choices for à in Lemma 3.8 with K still equal to the identity matrix, so that Z = X/T ∼ = (C∗ )m and DZ acts 0 ∗ d ∗ m on DX via C. Let X := (C ) ×(C ) and consider the change of coordinates µÃ : X 0 → X. The action of T on X 0 given by identifying T with (C∗ )d agrees with the action of T on X through µÃ . At the same time, µÃ identifies X 0 /T with X/T , so since K is the identity matrix, Z = X/T . à ∗ T If M is in T -hol(X), then ∆à B (M ) = ΥC ([µÃ (M )] ), with the D(C∗ )m -action coming from the decomposition X 0 = (C∗ )d × (C∗ )m . This implies parts (2) and (3) of Theorem 3.6. For part (1), note that the monomial map µÃ identifies the filtration on DX induced by L with the filtration on DX 0 induced by L · (Ã)−1 = L · C̃ = (LC ⊥ , LC). Thus M is L-holonomic on X if and only if µ∗à (M ) is LC̃-holonomic on X 0 . Now by Lemma 3.8, µ∗à (M ) is (LC ⊥ , LC)-holonomic on X 0 if and only if ΥÃC ([µ∗à (M )]T ) is LC-holonomic on Z = (C∗ )m , completing the proof.  We conclude this section with an example to illustrate how a module M with irreducible monodromy representation could have a reducible image under ∆à B. Example 3.9. Consider the case that à is the 2 × 2 identity matrix, B = [0 2]t , K = [2], with M = DX /DX · hx1 ∂x1 , ∂x2 − 1i = DX • exp(x2 ). Here, ∆à B (M ) = DZ ⊕ DZ · z 1/2 DZ · h(2z∂z , −1 · z 1/2 ), (−z, (2z∂z − 1) · z 1/2 )i √ is isomorphic to DZ /DZ · h4z∂z2 + 2∂z − 1i, whose solution space is spanned by exp( z) and √ exp(− z). The fundamental group Z of the regular locus of ∆à ) acts on the solution space B (M √ √ by switching the two distinguished generators. In particular, f = exp( z) + exp(− z) generates a monodromy invariant subspace. As f is holomorphic on z 6= 0, ∞, it satisfies the first order equation (∂z · f1 ) • f = 0. 7 4. T ORUS INVARIANTS AND DX̄ - MODULES Let i : X ,→ X̄ and j : Z ,→ Z̄ be the natural inclusions. In Convention 3.2, we fixed a splitting of X, encoded by an n × n matrix Ã, and a Gale dual B of A. In Theorem 3.6, we examined the functor ∆à B : T -hol(X) → D-mods(Z), which is given by taking torus invariants and adjusting module structure (see Definition 3.4). Definition 4.1. The main subject of study in this article is the functor Πà B on T -hol(X̄) given by à ∗ Πà B := j+ ◦ ∆B ◦ i , where j+ is the D-module direct image and i∗ is the D-module inverse image. à In this section, we extend our results about ∆à B from §3 to statements for ΠB . In §5, we provide further consequences when we further restrict the source category of Πà B. Note that functor Πà B : T -hol(X̄) → D-mods(Z̄) is exact. Indeed, since i : X → X̄ is faithfully flat, i∗ is exact. Note also that i∗ sends T -hol(X̄) to T -hol(X), the restricted source category for à ∆à B . Since ∆B essentially takes the A-degree 0 part of a module, it is exact. We thus obtain the result from the exactness of j+ . TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 15 Theorem 4.2. If M is in T -hol(X̄), then Πà B (M ) is a finitely generated DZ̄ -module. In particular, à ΠB : T -hol(X̄) → D-mods(Z̄), and the following statements hold. (1) Let L := (Lx , L∂x ) ∈ Q2n be a weight vector with Lx + L∂x = c · 1n for some c > 0. Let 0 L0 := (Lx B, c · 1m − Lx B) ∈ Q2m . If M is L-holonomic, then Πà B (M ) is L -holonomic. (2) If M in A-hol(X̄) is regular holonomic, then Πà B (M ) is regular holonomic. (3) If M has reducible monodromy representation, then so does Πà B (M ). If the columns of B span kerZ (A) as a lattice, then the converse also holds. Proof. Since T ⊆ X ⊆ X̄, Theorem 2.7 ensures that, with input from T -hol(X̄), i∗ returns objects in T -hol(X). Therefore by Theorem 3.6 and the fact that the direct image functor j+ will preserve finite generation, Πà B (M ) is a finitely generated DZ -module when M is in T -hol(X̄). The properties considered in (1), (2), and (3) are compatible with the inverse and direct image functors in the directions of the implications stated, so the proof reduces to Theorem 3.6.  The reverse implications in the first two items of Theorem 4.2 do not hold, because the restriction i∗ of a module which is not (regular, L-) holonomic might be (regular, L-) holonomic. In Theorem 7.1, we show that these converses do hold for binomial DX̄ -modules. We conclude this section with a description of the characteristic varieties and singular loci of à Πà B (M ) in terms of those of ∆B (M ). In §5.3, we will obtain more refined descriptions of these objects under additional assumptions. An application of the following Proposition 4.3 to the singular locus of the image under Πà B of the A-hypergeometric system HA (β) can be found in §10. Proposition 4.3. Let M be a nonzero regular holonomic module in T -hol(X̄), and recall that i : X ,→ X̄ is the natural inclusion. Then the characteristic variety of Πà B (M ) is the union of the à characteristic variety of ∆B (DX ⊗DX̄ M ) with the coordinate hyperplane conormals in Z̄: à ∗ Char(Πà B (M )) = Char(∆B (DX ⊗DX̄ M )) ∪ Var(z1 ζ1 , . . . , zm ζm ) ⊆ T Z̄. à Further, the singular locus of Πà B (M ) is the union of the singular locus of ∆B (DX ⊗DX̄ M ) with the coordinate hyperplanes in Z̄: à Sing(Πà B (M )) = Sing(∆B (DX ⊗DX̄ M )) ∪ Var(z1 z2 · · · zm ) ⊆ Z̄. à ∗ Proof. Note that DX ⊗DX̄ M = i∗ M . Since Πà B (M ) is the direct image of ∆B (i M ) along the open embedding j : Z ,→ Z̄, [Gin86, Theorem 3.2] implies that the characteristic variety of Πà B (M ) is à ∗ the union of the characteristic variety of ∆B (i M ) with the set of coordinate hyperplane conormals in Z̄. In addition, saturation and projection commute with taking associated graded objects, so the final statement holds.  5. T ORUS INVARIANTS FOR A FIXED TORUS CHARACTER In this section, let Y be X or X̄. We now restrict our attention to certain subcategories of T -hol(Y ) called T -irred(Y ) and T -irred(Y, β), over which we are able to obtain more detailed information à about the functors ∆à B and ΠB , still following Convention 3.2. We provide explicit expressions for these functors, show how they affect solutions, and, under certain assumptions on B, describe 16 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER some of their geometric properties. In Corollary 5.10, we explain the relationship between lattice basis binomial DX̄ -modules and saturated Horn DZ̄ -modules. Definition 5.1. Let T -irred(Y ) denote the subcategory of T -hol(Y ) consisting of modules M such that for each nonzero homogeneous element γ ∈ M , annC[E] (γ) is a maximal ideal in C[E]. To provide a D-module theoretic understanding of the definition of T -hol(Y ), we note the parallel to Theorem 2.7. Recall that each A-graded DT -module M has a filtration 0 = M (0) ⊂ M (1) ⊂ · · · ⊂ M (r) = M, such that for each i and each nonzero homogeneous element γ in M (i) /M (i−1) has the form hE − β (i) − deg(γ)i for some β (i) . Thus, an A-graded DT -module M is irreducible if and only if there is such a filtration with r = 1. In the sequel, we consider subcategories of T -irred(Y ) given by fixing β. To this end, let T -irred(Y, β) denote the subcategory of T -irred(Y ) given by objects M such that for each nonzero homogeneous element γ ∈ M , annC[E] (M ) = hE − β − deg(γ)i. Note that when γ ∈ DY is homogeneous, γ(E − β) = (E − β − deg(γ))γ. Thus, when M = DY /J is a cyclic element in T -irred(Y ), it lies in T -irred(Y, β) precisely when hE − βi is contained in J. Example 5.2. If I ⊆ C[∂x ] is an A-graded ideal, then DX̄ /(I + hE − βi) is in T -irred(X̄, β). 7 à à 5.1. Explicit expressions for the functors ∆à B and ΠB . We provide explicit computations of ∆B T and Πà B on T -irred(X, β). We begin by first relating [DX ] /hE − βi and DZ via DX/T . Convention 5.3. For each β ∈ Cd , fix a vector κ(β) = κ ∈ Cn such that Aκ = β. In addition, recall that the m × m matrix K from Convention 3.2 has full rank, and therefore its Smith normal form is an integer diagonal matrix with nonzero diagonal entries called the elementary divisors of K. Let κ := (κ1 , . . . , κm ) denote the elementary divisors of K. 7 Proposition 5.4. Let B be a Gale dual of A whose columns span kerZ (A) as a lattice, so that [DX ]T is C-spanned by monomials xBv θu , where v ∈ Zm and u ∈ Nn . Denote the rows of B by B1 , . . . , Bn . For v ∈ Zm and u ∈ Nn , define n Y Bv u v δB,κ (x θ ) := z (Bi · η + κi )ui . (5.1) i=1 This extends linearly to a surjective homomorphism of C-algebras δB,κ : [DX ]T −→ DZ , whose kernel is the (two-sided) [DX ]T -ideal generated by the sequence E − β. Corollary P 5.5. Let B be any Gale dual of A, and let κ and κ be as in Convention 5.3, and set εC := m i=1 ci . Then there is an isomorphism, denoted δ B,κ , given by the composition of δC,κ+εC : [DX ]T ∼ −→ DZ hE − βi and the isomorphism induced by µK : DZ ∼ = M DZ · z k/κ , 0≤k<κ where the comparison k < κ is component-wise and k/κ is the vector (k1 /κ1 , . . . , km /κm ). (5.2) TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 17 Proof. The map δC,κ+εC is an isomorphism by Proposition 5.4, so it is enough to understand (5.2). 1/κ First note that by identifying yi with zi i , M DZ [y1 , . . . , ym ] DZ · z k/κ ∼ . = κi hy − z i | i = 1, . . . , mi i 0≤k<κ By Convention 5.3, there are matrices P, Q ∈ GL(m, Z) such that P KQ is the diagonal matrix whose diagonal entries are the components of κ. The maps µP and µQ both induce isomorphisms of DZ ; for the matrix P P , whose columns−1are denoted by p1 , . . . , pm , this isomorphism is given by = [pij ]. zi 7→ z pi and ηi 7→ m j=1 pij ηj , where P Since P and Q induce isomorphisms, we may assume that K is diagonal with diagonal entries κ1 , . . . , κm . In this case, the ring homomorphism DZ → DZ [y1 , . . . , ym ]/hyiκi − zi | i = 1, . . . mi by zi 7→ yi and ηi 7→ κi ηi is clearly an isomorphism.  Proof of Proposition 5.4. If Bv = Bv 0 , then v = v 0 because B has full rank. Moreover, since the columns of B span kerZ (A) as a lattice, the elements xBv θu form a basis of [DX ]T as a C-vector space. Thus δB,κ is well-defined. For δB,κ to be a ring homomorphism, it is enough to show that δB,κ (θik xBv ) = δB,κ (θik )δB,κ (xBv ). This follows from two key identities that hold for any 1 ≤ i ≤ n and k ∈ Z: θik xBv = xBv (θi + Bi · v)k and [Bi · η + κi ]k z v = z v [Bi · v + Bi · η + κi ]k . For surjectivity, observe that zi±1 = δB,κ (x±Bei ). We thus need to show that η1 , . . . , ηm belong to the image of δB,κ . For notational convenience, assume that the first m rows of B are linearly independent. Call N the corresponding submatrix of B. Let Ni−1 denote the ith row of N −1 . Then δB,κ (Ni−1 · [θ1 − κ1 , . . . , θm − κm ]) = ηi . P Bvi pi (θ), where the Now consider F ∈ ker(δB,κ ). Since F ∈ [DX ]T , we can write F = ix vP are distinct, the p are polynomials in n variables, and the sum is finite. Then δB,κ (F ) = i i vi µ the zero operator annihilates every monomial z with µ ∈ Zm , i z pi (Bη + κ) = 0. P Since µ vi µ 0 = δB,κ (F ) • z = i z pi (Bµ + κ)z , and, since the vi are distinct, pi (Bµ + κ) = 0 for all µ ∈ Zm and for all i. Hence each pi vanishes on the Zariski closure of κ + kerZ (A), so by the Nullstellensatz, every pi (θ) is an element of C[θ] · hE − βi. It follows that F belongs to the [DX ]T -ideal generated by E − β, as desired.  Example 5.6. Consider the matrices     1 1 1 1 1 0 0 1 2 3  1 , C =  0  à =  1 0 0 0 −3 −2 , 0 1 0 0 2 1   −1 2  0 −3 , B=  3 0 −2 1  and  −1 2 K= . 0 −3 From Corollary 5.5, using y23 = 1/(z12 z2 ), we obtain the isomorphism  1/3  2/3 [DX ]T ∼ 1 1 ⊕ DZ · 2 . = DX/T ∼ = DZ ⊕ DZ · 2 hE − βi z1 z2 z1 z2 7 For a module M in T -irred(X, β) or T -irred(X̄, β), the isomorphism δ B,κ can be used to explicà itly compute ∆à B (M ) or ΠB (M ), respectively. 18 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER Corollary 5.7. Suppose that φ : (DX )p → (DX )q is a presentation matrix for a module M in T -irred(X, β), and let κ and κ be as in Convention 5.3. Then the DZ -module ∆à B (M ) is presented up to isomorphism by !q   M [DX ]T à p k/κ T ∆ (φ) ⊗ : (DZ ) −→ δ B,κ DZ · z . B hE − βi [DX ] 0≤k<κ In particular, if J + hE − βi is a torus equivariant left DX -ideal, then there is an isomorphism   L k/κ DX 0≤k<κ DZ · z à ∼ .  ∆B = J + hE − βi δB,κ (J) Proof. If K is not invertible over Z and M is irreducible, change coordinates so that K is diagonal L with diagonal entries κ. Then write (in the new coordinates) M = (  DX/T · )/I. Applying L L Corollary 5.5 and sorting by (rational) powers of z, M = ( 0≤k<κ  DZ ·  · z k/κ )/I, where I is being expanded in terms of the DZ · z k/κ . The result now follows from Corollary 5.5.  Corollary 5.8. Suppose that φ : (DX̄ )p → (DX̄ )q is a presentation matrix for a module M in T -irred(X̄, β), and let κ and κ be as in Convention 5.3. Then the DZ̄ -module Πà B (M ) is isomorq phic to the quotient of (DZ̄ ) by !q    M [DX ]T k/κ à DZ̄ · z ∩ image δ B,κ . ⊗[DX ]T DX · ∆B (φ) hE − βi 0≤k<κ In particular, if I + hE − βi is a torus equivariant left DX̄ -ideal, then there is an isomorphism L   k/κ D 0≤k<κ DZ̄ · z X̄ à ∼ . L ΠB  = k/κ J + hE − βi δB,κ (DX · J) ∩ 0≤k<κ DZ̄ · z Note that if we change our choice of κ in Convention 5.3, we obtain different isomorphisms in Proposition 5.4 and Corollary 5.5. Thus, different choices of κ will produce (isomorphic) preà sentations of ∆à B (M ) (respectively, ΠB (M )) if M is an element of T -irred(X, β) (respectively, T -irred(X̄, β)). Likewise, different choices of Gale duals B will also produce different isomorphisms, and therefore different presentations. Example 5.9 (Example 5.6, first variant). We use Corollary 5.8 to apply Πà B to the A-hypergeometric DX̄ -module associated to A and β (see Example 0.2). Let C1 , . . . , C4 denote the rows of C. Under δ C,κ+εC , the generators of IA = h∂x23 − ∂x2 ∂x4 , ∂x2 ∂x3 − ∂x1 ∂x4 , ∂x22 − ∂x1 ∂x3 i map respectively to (C3 · λ + κ3 − 2)(C3 · λ + κ3 − 3) − y2 (C2 · λ + κ2 + 1)(C4 · λ + κ4 + 1), y2 (C2 · λ + κ2 + 1)(C3 · λ + κ3 − 2) − (C1 · λ + κ1 )(C4 · λ + κ4 + 1), and y1 2 y (C2 · λ + κ2 + 1)(C2 · λ + κ2 ) − 2 (C1 · λ + κ1 )(C3 · λ + κ3 − 2). y1 TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 19 Thus, under δ B,κ , the binomial generators of IA map to  (B3 · η + κ3 )(B3 · η + κ3 − 1) −  (B2 · η + κ2 )(B3 · η + κ3 ) − z1 z2 1 2 z1 z2  13 (B2 · η + κ2 )(B4 · η + κ4 ), (5.3)  13 (B1 · η + κ1 )(B4 · η + κ4 ),  (B2 · η + κ2 )(B2 · η + κ2 − 1) − Going modulo these equations in DZ̄ ⊕ DZ̄ · by Corollary 5.8. 1 z1 z22  and (5.4) (B1 · η + κ1 )(B3 · η + κ3 ). (5.5)  13 1 z12 z2 1/3 ⊕ DZ̄ ·  1 z12 z2 2/3 , we obtain Πà B (HA (β)) 7 With Corollary 5.8 in hand, we now have the tools to relate lattice basis binomial DX̄ -modules and saturated Horn DZ̄ -modules via Πà B (see Example 0.2 and Definition 0.3.(2)). This result will be further exploited in Part II. Corollary 5.10. If κ is as in Convention 5.3, then Πà B  DX̄ I(B) + hE − βi  ∼ = DZ̄ · z k/κ . sHorn(B, κ + Ck) 0≤k<κ M Proof. If the columns of B span kerZ (A) as a lattice, then the statement follows immediately from the definitions of the systems, via Corollary 5.8. For an arbitrary choice of Gale dual B, we again apply Corollary 5.8. Since passage of z k/κ through the equations of sHorn(B, κ) results in a shift by Ck, the summands separate to yield the desired isomorphism.  Example 5.11 (Example 5.9, continued). Since (5.3) does not lie in a single DZ -summand of [DX ]T /hE − βi, we see immediately that Πà B (DX̄ /(IA + hE − βi) does not possess the nice decomposition that arises in the lattice basis situation. After multiplying (5.4) and (5.5) by z1−1 , it is also clear that neither of these elements lie in a single DZ -summand of [DX ]T /hE − βi. 7 Example 5.12 (Example 5.6, second variant). We now use Corollary 5.8 to compute Πà B (DX̄ /(I(B)+ hE − βi)). In this example, I(B) = h∂x33 − ∂x1 ∂x24 , ∂x21 ∂x4 − ∂x32 i. Since εC = [1, 1, −5, 3]t , under δ B,κ , the binomials generating I(B) map respectively to (C3 · λ + κ3 − 5)(C3 · λ + κ3 − 6)(C3 · λ + κ3 − 7) − y1−1 (C1 · λ + κ1 + 1)(C4 · λ + κ4 + 3)(C4 · λ + κ4 + 2) and (C1 · λ + κ1 + 1)(C1 · λ + κ1 )(C4 · λ + κ4 + 3) − y12 (C2 · λ + κ2 + 1)(C2 · λ + κ2 )(C2 · λ + κ2 − 1). (5.6) y23 20 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER Then under δ B,κ , the expressions of (5.6) map to the generators of sHorn(B, κ), while y2 times the expressions of (5.6) map respectively to [(B3 · η + κ3 − 2)(B3 · η + κ3 − 3)(B3 · η + κ3 − 4)  − z1 (B1 · η + κ1 )(B4 · η + κ4 + 1)(B4 · η + κ4 )] · 1 2 z1 z2  13 and [(B1 · η + κ1 )(B1 · η + κ1 − 1)(B4 · η + κ4 + 1)  − z2 (B2 · η + κ2 + 1)(B2 · η + κ2 )(B2 · η + κ2 − 1)] · 1 2 z1 z2  13 . (5.7) Similarly, we can compute y22 times the expressions of (5.6). Together, these show that the image of the lattice basis binomial DX̄ -module DX̄ /(I(B) + hE − βi) under Πà B is isomorphic to   13   23 DZ̄ DZ̄ DZ̄ 1 1 ⊕ . ⊕ · · sHorn(B, κ) sHorn(B, κ + c2 ) z12 z2 sHorn(B, κ + 2c2 ) z12 z2 This agrees with Corollary 5.10. 7 5.2. Solution spaces. We now consider the effect of Πà B on solutions of objects in T -irred(X̄, β). Using b1 , . . . , bm to denote the columns of a Gale dual B of A, the map µB : X → Z given by x 7→ xB := (xb1 , . . . , xbm ) is onto, since C is algebraically closed. If p ∈ X, this surjection an an B induces a map µ]B : OZ,p B → OX,p via g(z) 7→ g(x ). If the columns of B span kerZ (A) as a lattice, then µ]B is an isomorphism. Otherwise, it will be a [kerZ (A) : ZB]-to-1 covering map. Let s1 , . . . , s[kerZ (A):ZB] denote the distinct sections of this map. Together, these can be used to analyze the behavior of solution spaces under Πà B. Suppose that a module M in T -irred(X̄, β) is such that at a sufficiently generic (nonsingular) point p ∈ X, Solp (M ) has a basis of basic Nilsson solutions in the direction of a generic weight vector w ∈ Rn . (This occurs when M is regular holonomic, but regularity is not a necessary condition, see Theorems 1.4 and 6.5.) Then Solp (M ) is spanned by vectors of the form φ = (φ1 , . . . , φr ), where the φi are Nilsson solutions that converge at p. Further, by Remark 1.7, any solution φ of M can be written φ = xκ f (xL ), where L is a collection of m vectors that Z-span kerZ (A). Theorem 5.13. Let M be a module in T -irred(X̄, β) and let p ∈ X be a generic nonsingular point of M so that µB (p) = pB ∈ Z is a nonsingular point of Πà B (M ). Choose κ so that Aκ = β and κC = 0. If Solp (M ) has a basis of basic Nilsson solutions in the direction of a generic weight vector, then SolpB (Πà B (M )) is isomorphic to the sum over i ∈ {1, . . . , [kerZ (A) : ZB]} of the images of the maps κ L Solp (M ) −→ SolpB (Πà B (M )) given by x f (x ) 7→ f (si (z)). Corollary 5.14. If M is a regular holonomic module in T -irred(X̄, β), then the rank of Πà B (M ) is equal to [kerZ (A) : ZB] · rank(M ). Moreover, if the columns of B span kerZ (A) as a lattice (so that [kerZ (A) : ZB] = | det(K)| = 1) and p ∈ X is a generic nonsingular point of M , then there  is an isomorphism Solp (M ) ∼ = SolpB (Πà B (M )). Proof of Theorem 5.13. Since p ∈ X is nonsingular for M , restriction provides an isomorphism between the solutions of M at p and those of i∗ M = DX ⊗DX̄ M at p. By the genericity of p, TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 21 ∗ à ∗ B pB ∈ Z will be a nonsingular point of ∆à B (i M ), and moreover, the solutions of ∆B (i M ) at p B can be extended to solutions of Πà B (M ) at p . This means that we may assume that M is a DX à module and work with the functor ∆à B instead of ΠB . Further, as solutions of M are represented by vectors of functions, for simplicity, it is enough to consider case that M is cyclic. Consider first the case that the columns of B do not Z-span kerZ (A). Then µK : X/T → Z induces a | det(K)|-fold cover of Z, which induces an isomorphism between the solutions of B à ∆à B (M ) at p and the sum over all sections of µK of the image of the solution space of ∆C (M ) = T Υà C ([M ] ). Thus, we have reduced the proof of the theorem to the case that the columns of B span kerZ (A) as a lattice, so that µB is an isomorphism. We assume this case for the remainder of the proof; in particular, without loss of generality, we may assume that B = C = L . Consider now the case that X = T 0 × Z, where T 0 = (C∗ )d , and T 0 × Z has a torus action given by a a t  (s, z) = (t11,1 s1 , . . . , tdd,d sd , z1 , . . . , zn ). Let E 0 denote the Euler operators on T 0 × Z, viewed as elements in DT 0 . If N is a module in T -irred(T 0 × Z, β), then by the same argument used to obtain (3.2), N can be expressed as a module over DT 0 ×Z = DT 0 ⊗C DZ as N= DT 0 DT 0 T ⊗C Υà ⊗C ∆à C ([N ] ) = C (N ). 0 hE − βi hE 0 − βi (5.8) Suppose that (t0 , z0 ) ∈ T 0 × Z is a generic nonsingular point of N . From (5.8), we see that Solp (N ) = HomDT 0 ×Z (N, OTan0 ×Z,p )     0 D T an à an ∼ ,O 0 ⊗C HomDZ ∆C (N ), OZ,z0 . (5.9) = HomDT 0 hE 0 − βi T ,t0  For the isomorphism (5.9), use the fact that HomDT 0 DT 0 /hE 0 − βi, OTan0 ,t0 is spanned by the Q β /a homomorphism 1 7→ di=1 ti i i,i . In particular, it is a one-dimensional C-vector space. We now return to the general case that M is in T -irred(X, β). Let φ : X → T 0 × Z be a T equivariant change of coordinates, whose existence follows from the existence of a Smith normal form for Ã. Let C and C 0 denote the appropriate C-matrices for X and T 0 × Z, respectively. With (t0 , z0 ) := φ(p), since κC = 0, we have the following isomorphisms: Solp (M ) ∼ = Solφ(p) (φ∗ M ) ∼ (using an argument similar to (5.8)) = Solt0 ((φ+ M )|T 0 ) ⊗C Solz0 (∆à C 0 (φ+ M )) ∼ (by applying (5.9) to φ+ (M )) = Solt0 (DT 0 /hE 0 − βi) ⊗C Solz0 (∆à C 0 (φ+ M )) ∼ = Sol(ta0 1 ,...,ta0 n ) (DT /hE − βi) ⊗C SolpB (∆à C (M )) ∼ = SolpB (∆à C (M )). The final equality follows since Sol(ta0 1 ,...,ta0 n ) (DT /hE − βi) is spanned by the function xκ . In fact, it is spanned by any function xv such that Av = β, but observe that if Au = 0, then xu ≡ 1 on T . Finally, note that two different versions of [−]T are used above; however, they are compatible via the isomorphism φ because µB = π2 ◦ φ : X → T 0 × Z → Z.  Example 5.15. The assumption that the module M belongs to T -irred(X̄, β) is crucial for Theorem 5.13. The key fact here is that hE − βi is a maximal ideal in C[E]. 22 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER Consider instead the case that d = m = 1 and X = T × Z, where T acts by scaling on the first factor. The torus equivariant module M := DT ×Z /DT ×Z · h(t∂t )3 , t∂t − ∂z i is holonomic, and its solution space at a nonsingular point (t0 , z0 ) is Sol(t0 ,z0 ) (M ) = SpanC {1, z + log(t), log2 (t) + 2z log(t)}. In this case, since annC[E] (M ) = h(t∂t )3 i, the operator t∂t does not act as a constant on M , and therefore, the operator t∂t − ∂z cannot be written modulo annC[E] (M ) as an element of DZ . This is the reason that the solutions of M are not as well-behaved as in Theorem 5.13. 7 Remark 5.16. Note that in the proof of Theorem 5.13, µK is used to describe the behavior of solutions when the columns of B do not Z-span kerZ (A). Combining this argument with the direct sum decomposition in Corollary 5.10 reveals that for sufficiently generic p ∈ X, there is an isomorphism of solution spaces for lattice basis binomial and Horn hypergeometric D-modules:     DX̄ DZ̄ ∼ Solp . 7 = SolpB I(B) + hE − Aκi sHorn(B, κ) 5.3. Characteristic varieties and singular loci. The homomorphism δB,κ can be used to explain the image of the L-characteristic variety of M under ∆à B when M is in T -irred(X, β). Proposition 5.17. Let M be a module in T -irred(X, β), let L := (Lx , L∂x ) ∈ Q2n be a weight vector with Lx + L∂x = c · 1n for some c > 0, and set L0 := (Lx B, c · 1m − Lx B) ∈ Q2m . If B has columns that Z-span kerZ (A), then the L0 -characteristic variety and singular locus of ∆à B (M ) are geometric quotients of the L-characteristic variety and singular locus of M , respectively. Proof. Note first that taking L-associated graded objects commutes with taking invariants. Also, taking invariants produces a [DX ]T -module [M ]T . Moreover, by the definition of T -irred(X, β) and Proposition 5.4, we see that [M ]T is already naturally a DZ -module that is isomorphic to ∆à B (M ). We now have the result, since taking torus invariants induces categorial quotients, which in this case separates orbits.  Combining Propositions 4.3 and 5.17, we can compute the characteristic variety and singular locus of Πà B (M ) in terms of those for M under certain assumptions. Corollary 5.18. Let M be a nonzero regular holonomic module in T -irred(X̄, β). If B has à columns that Z-span kerZ (A), then Char(Πà B (M )) and Sing(ΠB (M )) are the unions of the geometric quotient of the Char(DX ⊗DX̄ M ) and Sing(DX ⊗DX̄ M ) with, respectively, the coordinate hyperplane conormals in Z̄ and the coordinate hyperplanes in Z̄.  Part II: Binomial D-modules and hypergeometric systems 6. B INOMIAL D- MODULES We introduced binomial D-modules in Definition 0.1 and Example 0.2. In this section, we summarize results from [DMM10b, CF12, BMW13] regarding the holonomicity and regularity of binomial D-modules. We also generalize results from [DMM12, SW12] to provide criteria for regular holonomicity and reducibility of monodromy representation for binomial D-modules. TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 23 6.1. Overview. The holonomicity of a binomial D-module is controlled by the primary decomposition of the underlying binomial ideal. Primary decomposition of binomial ideals has several special features. Eisenbud and Sturmfels have shown that the associated primes of a binomial ideal are binomial ideals themselves and that the primary decomposition of a binomial ideal can be chosen to be binomial [ES96]. A more detailed study of the primary components of a binomial ideal, geared towards applications to binomial D-modules, appears in [DMM10a]. Binomial ideals can have two types of primary components, toral and Andean, according to how they behave with respect to the inherited torus action. We recall from [ES96] that if I ⊆ C[∂x ] is a binomial ideal, then every associated prime of I is of the form I 0 + h∂xi | i ∈ / σi, where 0 σ ⊆ {1, . . . , n}, I is generated by elements of C[∂σ ] := C[∂xi | i ∈ σ], and the intersection I 0 ∩ C[∂σ ] is a toric ideal after rescaling the variables in C[∂σ ]. Definition 6.1. Let I be an A-graded binomial ideal in C[∂x ], and let p = I 0 + h∂xi | i ∈ / σi be an associated prime of I as above, where we have rescaled the variables so that I 0 ∩ C[∂σ ] is a toric ideal. Denote by Aσ the submatrix of A consisting of the columns in σ. If I 0 ∩ C[∂σ ] = IAσ , then p is called a toral associated prime of I, and the corresponding primary component p is also called toral. An associated prime (or primary component) that is not toral is called Andean. It is the Andean components of a binomial ideal that cause failure of holonomicity for the corresponding binomial DX̄ -module. To make this precise, let V be an A-graded C[∂x ]-module. The Zariski set of quasidegrees of V is qdeg(V ) := {α ∈ Zd ⊆ Cd | Vα 6= 0} , where the closure is taken d with respect to the Zariski topology in C . If I is an A-graded binomial C[∂x ]-ideal, then the set S qdeg(C[∂x ]/C ), where the union runs over the Andean components C of I, is called the Andean arrangement of I. The following theorem collects results about binomial DX̄ -modules. Except for items (iv) and (v), which are from [BMW13] and [CF12] respectively, all of these facts are proved in [DMM10b]. Theorem 6.2 ([DMM10b, CF12, BMW13]). Let I ⊆ C[∂x ] be an A-graded binomial ideal, and consider the binomial DX̄ -module M = DX̄ /(I + hE − βi). The module M is holonomic if and only if β does not lie in the Andean arrangement of I. The module M is holonomic if and only if its holonomic rank is countable. The module M is holonomic if and only if its holonomic rank is finite. The module M is holonomic if and only if M is L-holonomic for all L = (Lx , L∂x ) ∈ Q2n such that Lx + L∂x = c · 1n for some constant c > 0. Moreover, if M fails to be L-holonomic for some L, then CharL (M ) has a component in T ∗ X of dimension more than n. (v) Assume that β does not lie on the Andean arrangement of I. Consider the set (i) (ii) (iii) (iv) {C toral primary component of I | β ∈ qdeg(C )}. (6.1) Then M is regular holonomic if and only if each ideal in (6.1) is standard Z-graded. (vi) A lattice basis binomial DX̄ -module associated to a matrix B is regular holonomic if and only if it is holonomic and the ideal I(B) is standard Z-graded. (vii) The holonomic rank of M is minimal as a function of only if β does to  not belong Lβ if and i i the union of the Andean arrangement of I with qdeg i<d Hm (C[∂x ]/Itoral ) , where Hm (−) denotes local cohomology with support m = h∂x1 , . . . , ∂xn i and Itoral is the intersection of the toral primary components of I. (viii) Suppose that the Andean arrangement of I is not all of Cd . For each toral associated prime of I, let Aσ be the matrix from Definition 6.1, and denote by vol(Aσ ) the lattice volume of the 24 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER polytope conv(0, Aσ ) in the lattice ZAσ . The minimal rank attained by M is the sum over the toral primary components of I of mult(I, σ) · vol(Aσ ), where mult(I, σ) is the multiplicity of the associated prime IAσ + h∂xj | j ∈ / σi in I. (ix) Define a module PI by the exact sequence M C[∂x ] C[∂x ] 0 −→ −→ −→ PI −→ 0 I C where the direct sum is over the primary components C of I. If β lies outside the union of qdeg(PI ) with the Andean arrangement of I, then M is isomorphic to the direct sum over  the modules DX̄ /(C + hE − βi), where C lies in (6.1). The Andean arrangement and all other quasidegree sets in Theorem 6.2 are unions of finitely many integer translates of subspaces of the form CAσ , where σ ⊆ {1, . . . , n}. If the Andean arrangement of I is not all of Cd , then the other quasidegree sets are also proper subsets of Cd . The holonomicity of an A-hypergeometric system was first shown in [GGZ87, Ado94], and information on the rank of these systems can be found in [MMW05, Berk11]. 6.2. Regular holonomicity and Nilsson series. We now discuss Nilsson solutions of binomial D-modules, generalizing statements in [DMM12] for A-hypergeometric systems. We will make use of a homogenization operation. In this direction, set   1 1 ··· 1  0  . ρ(A) :=  .  ..  A 0 Given an A-graded binomial ideal I ⊆ C[∂x ], let ρ(I) denote the homogenization of I with respect to an additional variable ∂x0 . Here, ∂x0 corresponds to a variable x0 giving rise to coordinates (x0 , x1 , . . . , xn ) on X̆ := Cn+1 . Note that ρ(I) is ρ(A)-graded. For a fixed β0 ∈ C and β ∈ Cd , write Eρ − (β0 , β) for the sequence of d + 1 Euler operators associated to ρ(A) and the vector (β0 , β). We define the homogenization of the binomial D-module M = DX̄ /(I + hE − βi) to be ρ(M, β0 ) := DX̆ . ρ(I) + hEρ − (β0 , β)i A vector w ∈ Rn is a generic binomial weight vector for a binomial D-module M = DX̄ /(I + hE − βi), if it satisfies the conditions from Definition 1.2 and also, for all w0 ∈ Σ, we have 0 grw (I) = grw (I). We say that w ∈ Rn is a perturbation of w0 ∈ Rn>0 if there exists an open cone Σ as in the previous definition, with w ∈ Σ such that w0 lies in thePclosure of Σ. Our proofs also make use of the homogenization of a basic Nilsson solution φ = u∈C xv+u pu (log(x)) of M in the direction of a binomial weight vector w ∈ Rn for M . From the definition of ρ(φ) in [DMM12, §3], it follows as in [DMM12, Proposition 3.17] that if |u| ≥ 0 for all u ∈ C, then ρ(φ) is a basic Nilsson solution of ρ(M, β0 ) in the direction of (0, w). Proposition 6.3. Let I ⊆ C[∂x ] be an A-graded binomial ideal, and set M = DX̄ /(I + hE − βi). Suppose that β0 ∈ C is generic, in that, if J is the intersection of the C in (6.1), then (β0 , β) is not in the Andean arrangement of Pρ(J) from Theorem 6.2.(ix). If β is not in the Andean arrangement of I, then the binomial D-module ρ(M, β0 ) is regular holonomic. TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 25 Proof. Since β is not in the Andean arrangement of I, we may assume that all primary components of I are toral. Since β0 is generic and ρ commutes with taking primary decompositions, ρ(I) also L has only toral primary components. Further, by Theorem 6.2.(ix), ρ(M, β0 ) is isomorphic to DX̆ /(ρ(C ) + hEρ − (β0 , β)i), where the direct sum is over the toral primary components C of I. Since each ideal ρ(C ) is Z-graded, the result now follows from Theorem 6.2.(v).  We now generalize [Berk10, Theorem 7.3], which was first stated for A-hypergeometric systems. Proposition 6.4. Let I ⊆ C[∂x ] be an A-graded binomial ideal, and set M = DX̄ /(I + hE − βi). If β does not lie in the Andean arrangement of I and β0 ∈ C is generic as in Proposition 6.3, then rank(M ) = rank(ρ(M, β0 )). Proof. We may assume that I is equal to the intersection of the C in (6.1). By Theorem 6.2.(i) and the genericity of β0 , M and ρ(M, β0 ) are holonomic and thus of finite rank. L Given the collection {C } of toral primary components of I, we may extend 0 → C[∂x ]/I → C[∂x ]/C to a primary resolution of C[∂x ]/I, see [BM09, §4]. To compute the rank of M , we then apply Euler–Koszul homology to this resolution and follow the resulting spectral sequence, as in the proof of [BM09, Theorem 4.5]. That argument and the fact that the theorem has been proven for A-hypergeometric systems in [Berk10, Theorem 7.3] imply that this procedure and its associated numerics are compatible with ρ, and this compatibility yields the desired result.  With the definitions of homogenization and Propositions 6.3 and 6.4 in hand, the necessary ingredients are in place to apply the original proof of [DMM12, Theorem 6.4] to arbitrary holonomic binomial D-modules. This result, appearing now in Theorem 6.5, provides a method to compute the rank of these modules via certain Nilsson solutions. Note also that the statement runs in parallel to Theorem 1.4, without requiring regular holonomicity. Theorem 6.5. Let I ⊆ C[∂x ] be an A-graded binomial ideal, and set M = DX̄ /(I + hE − βi). Assume that β does not lie in the Andean arrangement of I. If w ∈ Rn is a generic binomial weight vector of M that is a perturbation of 1n , then dimC (Nw (M )) = rank(M ). Further, there exists an open set U ⊆ X̄ such that the basic Nilsson solutions of M in the direction of w simultaneously converge at each p ∈ U , and as such, they form a basis for Solp (M ).  Finally, we generalize [DMM12, Proposition 7.4] in Theorem 6.6. Combining this result with Theorem 1.4, we obtain a new criterion for the regular holonomicity of binomial D-modules. In particular, instead of considering a family of derived solutions, regularity of a binomial D-module can be tested through a single collection of Nilsson solutions. Theorem 6.6. Let I ⊆ C[∂x ] be an A-graded binomial ideal such that M = DX̄ /(I + hE − βi) is not regular holonomic. If β does not lie in the Andean arrangement of I, then there exists a generic binomial weight vector w ∈ Rn of M such that dimC (Nw (M )) < rank(M ). Proof. The original proof of [DMM12, Proposition 7.4] can be applied, since ρ is commutes with taking primary decompositions. Note that Propositions 6.3 and 6.4 provide the binomial generalizations of the originally toric results needed in this proof.  26 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER 6.3. Irreducible monodromy representation. We now characterize when a binomial D-module has reducible monodromy representation. To achieve this, we extend [SW12, Theorems 3.1 and 3.2] (see also [Beu11a, Sai11]) on A-hypergeometric systems to arbitrary binomial D-modules. Given σ ⊆ {1, . . . , n}, let Aσ denote the submatrix of A given by the columns of A that lie in σ, and let IAσ ⊆ C[∂xi | i ∈ σ] denote the toric ideal given by Aσ in the variables corresponding to σ. A face G of A, denoted G  A, is a subset G of the column set of A such that there is a linear functional φG : ZA → Z that vanishes on G and is positive on any element of A r G. If G  A, then the parameter β ∈ Cd is G-resonant if β ∈ ZA + CG. If β is H-resonant for all faces H properly containing G, but not for G itself, then G is called a resonance center for β. It is said that A is a pyramid over a face G if volZG (G) = volZA (A), where volume is a normalized (or simplicial) volume computed with respect to the given ambient lattices. Theorem 6.7. Let I be an A-graded binomial ideal in C[∂x ] and suppose that β ∈ Cd does not lie in the Andean arrangement of I. The binomial DX̄ -module DX̄ /(I + hE − βi) has irreducible monodromy representation if and only if the following conditions hold: (1) For some σ ⊆ {1, . . . , n}, the intersection of the toral components C of I for which β ∈ qdeg(C ) equals IAσ + h∂xi | i ∈ / σi. (2) For any σ as in (1), there is a unique resonance center G  Aσ of β, and Aσ is a pyramid over G. Proof. We may assume that I is equal to the intersection of the toral components C of I for which β ∈ qdeg(C ). If I is not prime, pick an associated prime of I. After possibly rescaling the variables, since β does not lie in the Andean arrangement of I, such an associated prime is / / σi for some σ ⊆ {1, . . . , n}. Let N = DX̄ /(IAσ + h∂xi | i ∈ of the form IAσ + h∂xi | i ∈ σi+hE −βi). Then N is a submodule of M such that C(x)⊗C[x] N is a nonzero proper submodule of C(x) ⊗C[x] M . Thus M always has reducible monodromy representation in this case. We may now assume that I is prime. Then since β does not lie in the Andean arrangement of I, there exists a subset σ ⊆ {1, . . . , n} such that I = IAσ + h∂xi | i ∈ / σi, after possibly rescaling the variables. Since the pyramid condition implies the uniqueness of a resonance center G of β by [SW12, Lemma 2.9], we have reduced the proof of the statement for binomial D-modules to the A-hypergeometric setting, which was already proven in [SW12, Theorems 3.1 and 3.2].  7. T ORUS INVARIANTS AND BINOMIAL DX̄ - MODULES In this section, we strengthen our results on the transfer of (regular) holonomicity through Πà B from Theorem 4.2, still following Convention 3.2, in the case that the input is a binomial DX̄ -module. Remark 7.3 provides an explicit description of the characteristic variety of Πà B applied to a regular holonomic binomial DX̄ -module. Theorem 7.1. Let I ⊆ C[∂x ] be an A-graded binomial ideal. Then the following hold for the binomial DX̄ -module M = DX̄ /(I + hE − βi). (1) Let L := (Lx , L∂x ) ∈ Q2n be a weight vector with Lx + L∂x = c · 1n for some c > 0. Let L0 := (Lx B, c · 1m − Lx B) ∈ Q2m . Then the binomial DX̄ -module M is L-holonomic if 0 and only if Πà B (M ) is L -holonomic. (2) If M is holonomic, then the rank of Πà B (M ) is equal to [kerZ (A) : ZB] · rank(M ). (3) The module M is regular holonomic if and only if Πà B (M ) is regular holonomic. TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 27 Corollary 7.2. Let I ⊆ C[∂x ] be an A-graded binomial ideal. The statements of Theorem 6.2 hold if we replace the binomial DX̄ -module M = DX̄ /(I + hE − βi) by Πà B (M ). Minor modifications are needed; for clarity, we explain the changes in four items. (iv) The weight vector L must be replaced with L0 := (Lx B, c · 1m − Lx B) ∈ Q2m . In the second statement, T ∗ X and n are respectively replaced by T ∗ Z and m. (vi) The saturated Horn DZ̄ -module DZ̄ /sHorn(B, κ) is (regular) holonomic if and only if the binomial DX̄ -module DX̄ /(I(B) + hE − Aκi) is (regular) holonomic. In particular, it follows that DZ̄ /sHorn(B, κ) is regular holonomic if and only if it is holonomic and the rows of the matrix B sum to 0m . (viii) The minimal rank value above must be scaled by [kerZ (A) : ZB]. (ix) If β does not lie in the union of qdeg(PI ) with the Andean arrangement of I, then Πà B (M ) is isomorphic to the direct sum over the toral primary components C of I of the modules Πà B (DX̄ /(C + hE − βi)), where C lies in (6.1). Proof. Only (vi) does not follow immediately from Theorem 7.1. For this, we must also use the decomposition of Πà B (DX̄ /(I(B) + hE − Aκi)) from Corollary 5.10. Note that each summand in this decomposition is actually isomorphic to the first summand, DZ̄ /sHorn(B, κ). The parameter shifts κ + Ck in the remaining summands are a red herring, thanks to the graded shifts induced by multiplication by z k/κ .  Proof of Theorem 7.1. The forward implication of (1) is Theorem 4.2.(1). For the converse, we first define a map ψB,κ : DZ → [DX ]T /hE − βi that is essentially an inverse to δB,κ from (5.1), but without the assumption that the columns of B span kerZ (A) as a lattice. For notational convenience, assume that the first m rows of B are linearly independent. Call N the corresponding submatrix of B. Let Ni−1 denote the ith row of N −1 . To define ψB,κ , set ψB,κ (z u ) := xBu + hE − βi and ψB,κ (ηi ) := Ni−1 · [θ1 − κ1 , . . . , θm − κm ] + hE − βi. By the proof of Corollary 5.5, ψB,κ is injective. Note also that ψB,κ respects the L0 − and L−filtrations 0 0 on its source and target, respectively. Therefore grL (ψB,κ ) : grL (DZ ) ,→ grL (DX /hE − βi) in0 duces the a dominant map from CharL (DX ⊗DX̄ M ) to CharL (∆à B (M )), which we denote by ΨB,κ . In addition, since the each fiber of ΨB,κ is a T -orbit, it is of dimension d. It now follows that 0 L dim CharL (∆à B (M )) = dim Char (DX ⊗DX̄ M ) − d. (7.1) Now suppose that M is not L-holonomic. Then in the proof of Theorem 6.2.(iv), we show that 0 there is a component of CharL (DX ⊗DX̄ M ) of dimension greater than n. Since CharL (∆à B (M )) L0 à is contained in Char (ΠB (M )), we have by (7.1) that 0 dim CharL (Πà B (M )) > n − d = m. 0 Therefore Πà B (M ) is not L -holonomic, completing the proof of (1). To prove (2), since M is holonomic, by Theorem 6.5 there is a generic binomial weight vector w ∈ Rn such that at a nonsingular point p, the basic Nilsson solutions of M in the direction of w span Solp (M ). Thus Theorem 5.13 implies (2). The forward implication of (3) is Theorem 4.2.(2), so it remains to establish the converse in the binomial setting. Suppose that M is not regular holonomic. Then by Theorem 6.6, there exists a 28 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER generic weight vector w ∈ Rn for M such that dimC Nw (M ) < rank(M ). Thus by Theorem 5.13 applied to these Nilsson solutions, we see that, with ` = wB, dimC N` (Πà B (M )) = [kerZ (A) : ZB] · dimC Nw (M ). By slight perturbation of w, if necessary, ` will be a generic weight vector for Πà B (M ). But then à by (2), we see that dimC N` (ΠB (M )) < [kerZ (A) : ZB] · rank(M ) = rank(Πà B (M )). Thus à Theorem 1.4 implies that ΠB (M ) cannot be regular holonomic.  Remark 7.3. Let I be an A-graded binomial C[∂x ]-ideal, and assume that β ∈ Cd lies outside of the Andean arrangement of I, so that M = DX̄ /(I + hE − βi) is holonomic. Theorem 4.3 in [CF12] states that Char(M ) is equal to the union of the characteristic varieties of the binomial DX̄ -modules corresponding to associated primes of I whose components belong to (6.1). Since prime binomial ideals are isomorphic to toric ideals, it suffices to compute the characteristic varieties of A-hypergeometric systems, which is done explicitly by Schulze and Walther in [SW08]. Therefore, combining [CF12, SW08] with Proposition 5.17 yields a description of the characteristic variety of ∆à B (DX /(I + hE − βi)). If M is regular holonomic, then Proposition 4.3 provides 7 an explicit description of Char(Πà B (M )).   −2 1  1 −2, then when κ = [0, 0, 0], Example 7.4. If A = [1 2 3] and B = 0 1   DX̄ = Var(hξ1 , ξ2 , ξ3 i) ∪ Var(hξ1 , ξ2 , x3 i) Char I(B) + hE − Aκi by computation in Macaulay2 [M2]. Thus by Proposition 4.3,   DZ̄ Char = Var(hz1 ζ1 , z2 ζ2 i). sHorn(B, κ) On the other hand, Macaulay2 [M2] reveals that   DZ̄ Char = Var(hz1 ζ1 , z2 ζ2 i) ∪ Var(hz1 , 4z2 − 1i), Horn(B, κ) so the component Var(hz1 , 4z2 − 1i) of Char(DZ̄ /Horn(B, κ)) cannot be obtained from those of DX̄ /(I(B) + hE − Aκi). In particular, the holonomicity of DX̄ /(I(B) + hE − Aκi) does not by itself guarantee the holonomicity of DZ̄ /Horn(B, κ). However, we show in Theorem 9.4 that this will be the case under strong conditions on β. In this example, this assumption is equivalent to lying outside of the Andean arrangement of A. Example 9.1 will further address the subtleties of the holonomicity of (non-saturated) Horn D-modules. 7 We conclude this section by addressing the irreducibility of monodromy representation of Horn DZ̄ -modules. Note first that Theorem 4.2 and Theorem 6.7 together provide a test for the reducibility of monodromy representation for the image of a binomial DX̄ -module under Πà B. Corollary 7.5. If β = Aκ does not lie in the Andean arrangement of I(B), then the Horn DZ̄ -modules DZ̄ /Horn(B, κ), DZ̄ /nHorn(B, κ), and DZ̄ /sHorn(B, κ) all have irreducible monodromy representation if and only if (1) and (2) in Theorem 6.7 hold for I = I(B). TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 29 Proof. Note that the three incarnations of Horn systems are isomorphic after tensoring with C(z), so it is enough to consider DZ̄ /sHorn(B, κ). The result thus follows from combining Theorem 6.7 with Corollary 5.10 and Remark 5.16.  8. O N NORMALIZED H ORN SYSTEMS We now concentrate on a certain subclass of normalized Horn systems, whose members arise from matrices B that contain an m × m identity submatrix. For convenience in the notation, we assume that this identity submatrix is formed by the first m rows of B. Note that the most widely studied classical hypergeometric systems (e.g., Gauss 2 F1 , its generalizations p Fq , the Appell and Horn systems in two variables, the four Lauricella families of systems in m variables, etc.) satisfy this hypothesis (see Example 0.4). Thus the following results apply to all of these classical systems. The approach of this section generalizes and makes more precise an idea of Beukers; namely, classical Horn systems can be obtained from their corresponding A-hypergeometric systems by setting certain variables equal to one (see [Beu11b, §§11-13]). Theorem 8.1. Suppose that the top m rows of B form an identity matrix and κ1 = · · · = κm = 0. Let r denote the inclusion r : Z̄ ,→ X̄ given by (z1 , . . . , zm ) 7→ (z1 , . . . , zm , 1, . . . , 1). If r∗ is a restriction of DX̄ -modules, then there is an equality   DZ̄ DX̄ ∗ =r . nHorn(B, κ) I(B) + hE − Aκi Corollary 8.2. Under the hypotheses of Theorem 8.1, the (regular) holonomicity of the modules DZ̄ /nHorn(B, κ) and DX̄ /(I(B) + hE − Aκi) are equivalent. In particular, Corollary 7.2.(vi) holds when sHorn(B, κ) is replaced by nHorn(B, κ). Proof. If DX̄ /(I(B) + hE − Aκi) is (regular) holonomic, then so is DZ̄ /nHorn(B, κ) by Theorem 8.1, since restrictions preserve (regular) holonomicity. For the converse, if DX̄ /(I(B) + hE − Aκi) is not (regular) holonomic, then neither is DZ̄ /sHorn(B, κ) by Corollary 7.2.(vi). Since nHorn(B, κ) ⊆ sHorn(B, κ), and the category of (regular) holonomic DZ̄ -modules is closed un der quotients of DX̄ -modules, DZ̄ /nHorn(B, κ) also fails to be (regular) holonomic. By [SST00, §5.2], the restriction r∗ of a cyclic DX̄ -module DX̄ /J is given by   DX̄ C[x1 , . . . , xn ] D ∗ r = ⊗C[x] X̄ . (8.1) J hxm+1 − 1, . . . , xn − 1i J Note that the restriction of a cyclic DX̄ -module is not necessarily cyclic. To establish Theorem 8.1, our first task is to show that the restriction module r∗ (DX̄ /(I(B) + hE − Aκi)) is indeed cyclic. To do this, we compute the b-function for the restriction (see [SST00, §§5.1-5.2]). Lemma 8.3. If the matrix formed by the top m rows of B has rank m, then the b-function of I(B) + hE − Aκi for restriction to Var(xm+1 − 1, . . . , xn − 1) divides s. Proof. Begin with the change of variables xj 7→ xj + 1 for m + 1 ≤ j ≤ m, and let J denote the DX̄ -ideal obtained from I(B) + hE − Aκi via this change of variables. As usual, set β = Aκ. We now wish to compute the b-function of J for restriction to Var(xm+1 , . . . , xn ). With w = (0m , 1d ) ∈ Rn , the vector (−w, w) induces a filtration on DX̄ , and the b-function we wish to compute is the generator of the ideal gr(−w,w) (J) ∩ C[s], where s := θm+1 + · · · + θn . Note 30 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER that, since the submatrix of B formed by its first m rows has rank m, the submatrix of A consisting of its last n − m = d columns has rank d. Thus there are vectors ν (m+1) , . . . , ν (n) ∈ Rd such that (ν (j) A)k = δjk for m + 1 ≤ k ≤ n. For m + 1 ≤ j ≤ n, d X (j) νi E i −ν (j) ·β = i=1 m X (ν (j) A)k θk + θj − ν (j) · β ∈ hE − βi. k=1 Using our change of variables and multiplying by xj with m + 1 ≤ j ≤ n, we obtain m X (ν (j) A)k xj θk + x2j ∂xj + θj − ν (j) · βxj ∈ J. k=1 Taking initial terms with respect to (−w, w) of this expression, it follows that θj ∈ gr(−w,w) (J) for each m + 1 ≤ j ≤ n. Therefore s = θm+1 + · · · + θn ∈ gr(−w,w) (J), and the result follows.  Proof of Theorem 8.1. By Lemma 8.3, r∗ (DX̄ /(I(B) + hE − Aκi)) is of the form DZ̄ /J. In order to find the ideal J, we must to perform the intersection (I(B) + hE − Aκi) ∩ Rm , where Rm := C[x1 , . . . , xn ]h∂x1 , . . . , ∂xm i ⊆ DX̄ , (8.2) and set xm+1 = · · · = xn = 1. We proceed by systematically producing elements of the intersection (8.2). Using the same argument as in the proof of Lemma 8.3, we see that for m + 1 ≤ j ≤ n, each θj can be expressed as a linear combination of θ1 , . . . , θm and the parameters κ modulo DX̄ · hE − Aκi. By our assumption on B, θj can be written explicitly as follows: θj = κj + m X bji θi mod DX̄ · hE − Aκi for m + 1 ≤ j ≤ n. (8.3) i=1 Now if P ∈ DX̄ , then there is a monomial µ in xm+1 , . . . , xn so that the resulting operator µP can be written in terms of x1 , . . . , xn , ∂x1 , . . . , ∂xm and θm+1 , . . . , θn . In addition, working modulo DX̄ · hE − Aκi for j > m one can replace θj by the expressions (8.3). Thus µP is an element of Rm modulo Rm · hE − Aκi. If this procedure is applied to Ei − (Aκ)i , the result is zero. We now (b ) (b ) apply it to one of the generators ∂x k + − ∂x k − of I(B), where b1 , . . . , bm denote the columns of Q |b | B. An appropriate monomial in this case is µk = nj=m+1 xj jk . Then the fact that bkk = 1 for 1 ≤ k ≤ m and (8.3) together imply that µk (∂x(bk )+ − ∂x(bk )− ) Q Q Q −bjk  b b Q −b = ∂xk bkk j>m,bjk >0 xjjk ∂xj bjk − j>m,bjk >0 xjjk bjk <0 xj jk ∂xj −bjk bjk <0 xj Q Q Qbjk −1 P −bjk  = ∂xk j>m,bjk >0 `=0 (κj + m bjk <0 xj i=1 bji θi − `) (8.4) Q Q−b −1 P b Q b θ − `). − j>m,bjk >0 xjjk bjk <0 `=0jk (κj + m ji i i=1 Note that setting xm+1 = · · · = xn = 1 in (8.4), we obtain the kth generator of the normalized Horn system nHorn(B, κ), since bjk < 0 implies j > m. Now suppose that P is an element of the intersection (8.2). In particular, P belongs to I(B) + hE − Aκi, so there are P1 , . . . , Pm , Q1 , . . . , Qd ∈ DX̄ such that P = m X k=1 Pk (∂x(bk )+ − ∂x(bk )− ) + d X i=1 Qi (Ei − (Aκ)i ). TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 31 If we multiply P on the left by a monomial in xm+1 , . . . , xn and set xm+1 = · · · = xn = 1, the result is the same as if we set xm+1 = · · · = xn = 1 on P directly. Thus we choose an appropriate monomial µ such that µP = m X P̃k µk (∂x(bk )+ − ∂x(bk )− ) k=1 +µ d X Qi (Ei − (Aκ)i ) i=1 for some operators P̃1 , . . . , P̃m . But then, the result of setting xm+1 = · · · = xn = 1 on µP (the same as if this were done to P ) is a combination of the generators of nHorn(B, κ). We have shown that r∗ (I(B) + hE − Aκi) contains the generators of nHorn(B, κ). Since the module DZ̄ /nHorn(B, κ) has a nontrivial solution space, it follows that the b-function for restriction of I(B) + hE − Aκi to Var(xm+1 − 1, . . . , xn − 1) is s. Thus r∗ (DZ̄ /(I(B) + hE − Aκi)) is indeed a nonzero cyclic DZ̄ -module, and it is equal to DZ̄ /nHorn(B, κ), completing the proof.  9. C HARACTERISTIC VARIETIES OF H ORN DZ̄ - MODULES In this section, we study the characteristic variety of the Horn DZ̄ -module DZ̄ /Horn(B, κ). By Corollary 7.2.(vi), the saturated Horn DZ̄ -module DZ̄ /sHorn(B, κ) is holonomic if and only if the corresponding lattice basis binomial DX̄ -module is holonomic. This provides a characterization for holonomicity of DZ̄ /sHorn(B, κ) in terms of the Andean arrangement of I(B), via Theorem 6.2.(i). While it is clear that if DZ̄ /Horn(B, κ) is holonomic, then so is DZ̄ /sHorn(B, κ), the following example shows that the converse is not true. Example 9.1. For the matrices     2 1 1 2  0  −1 −1 0      0 −1  0  0      0 0  , κ = 0 , A =  B= 1      1 0  0  0 0  −1 0 0  0 0 −1 0 1 1 2 0 1 0 0 −1 0 0 −1 0 0 0 0 1 1 0 0 −1 1 0 0 1    2 0 0 0   , β = Aκ =   , 0 0  0 1 a Macaulay2 [M2] computation shows that the binomial DX̄ -module DX̄ /(I(B) + hE − βi) is holonomic; this is the easiest way of verifying the holonomicity of DZ̄ /sHorn(B, κ), as it avoids computing a saturation. On the other hand, DZ̄ /Horn(B, κ) is not holonomic, since its characteristic variety has the component Var(hz3 , z1 ζ1 + z2 ζ2 i) ⊆ T ∗ Z̄ = C6 . Since the rank of DZ̄ /Horn(B, κ) equals that of DZ̄ /sHorn(B, κ) and DX̄ /(I(B) + hE − βi), which in this case is 6, this example provides an instance of a Horn system of finite rank that is not holonomic. On the other hand, we have seen that binomial DX̄ -modules and saturated Horn DZ̄ -modules of finite rank are necessarily holonomic by Theorems 6.2.(iii) and 7.1.(1). 7 In Theorem 9.4, the main result of this section, we provide a sufficient condition for the holonomicity of a Horn DZ̄ -module by constraining the parameters. The key notions follow. Let A be as in Convention 1.5 and let B be a Gale dual of A. If γ ⊆ {1, . . . , m}, we denote by Bγ the matrix whose columns are the columns of B indexed by γ. Let A[γ] be a matrix for which Bγ is a Gale dual, where we assume that the matrix A is included in A[γ] as its first d rows. We compute the Andean arrangement of I(Bγ ) using the grading induced by the matrix A[γ]. 32 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER Definition 9.2. A parameter β ∈ Cd is toral for B if it does not lie in the Andean arrangement of I(B). We say β ∈ Cd is completely toral for B if it is toral for B and for every γ ⊆ {1, . . . , m}, β does not lie in the projection of the Andean arrangement of I(Bγ ) onto the first d coordinates. Lemma 9.3. The set of completely toral parameters for B is Zariski open in Cd . Proof. This follows from the fact that Andean arrangements are unions of affine spaces.  Theorem 9.4. If β is completely toral for B and Aκ = β, then DZ̄ /Horn(B, κ) is holonomic. Before proving this theorem, we state some consequences. Note that these results generalize and refine previous work of Sadykov [Sad02] and Dickenstein, Matusevich, and Sadykov [DMS05]. Corollary 9.5. If B has a completely toral parameter, then DZ̄ /Horn(B, κ) is holonomic for generic choices of κ. Proof. Since the set of completely toral parameters for B is Zariski open in affine d-space, the fact that it is nonempty implies that it is dense. Thus the result follows from Theorem 9.4.  Corollary 9.6. If m = 2, then DZ̄ /Horn(B, κ) is holonomic if and only if Aκ is toral for B. Equivalently, DZ̄ /Horn(B, κ) is holonomic if and only if DX̄ /(I(B) + hE − Aκi) is holonomic. Proof. Since m = 2, the only possible matrices Bγ for ∅ ( γ ( {1, 2} have one column. In this case, the Andean arrangement of I(Bγ ) is empty, and therefore a parameter is toral for B if and only if it is completely toral for B. Since DX̄ /(I(B) + hE − Aκi) is holonomic precisely when Aκ is toral, the result follows from Theorem 9.4.  Example 9.7 (Example 9.1, continued). The condition that Aκ be completely toral for B is sufficient to guarantee that DZ̄ /Horn(B, κ) is holonomic, but it is not necessary. If we let B 0 be B in Example 9.1 with third column multiplied by −1, then I(B) = I(B 0 ). Using the same A, it follows that B and B 0 have the same (empty set of) completely toral parameters. Thus, since Aκ = β = [2, 0, 0, 0]t is not completely toral for B, it is not completely toral for B 0 . However, it is still the case that DZ̄ /Horn(B 0 , κ) is holonomic. To see why this might be the case, note that multiplying the third column of B by −1 corresponds to the change of variables z3 7→ 1/z3 . Thus the higher dimensional component that prevented the Horn module DZ̄ /Horn(B, κ) from being holonomic does not appear in the characteristic variety of DZ̄ /Horn(B 0 , κ) because it is moved to infinity when B is replaced by B 0 . 7 To prove Theorem 9.4, we describe the characteristic variety of a Horn module under the assumption that the parameter β is completely toral for B. To achieve this, for each subset γ ⊆ {1, . . . , m}, we show that the intersection of Char(DZ̄ /Horn(B, κ)) with {(z, ζ) ∈ T ∗ Z̄ | zi 6= 0 if i ∈ γ, zi = 0 if i ∈ / γ} is naturally contained in the characteristic variety of a saturated Horn module arising from the matrix Bγ . The completely toral condition on β guarantees that this saturated Horn module is holonomic, thus providing a bound the dimension of Char(DZ̄ /Horn(B, κ)). We discuss this approach further after Corollary 9.10. We first need some facts about the primary decomposition of lattice basis ideals. To begin, we study lattice ideals, which play a fundamental role in this primary decomposition. Our key lattice will be ZB, which is spanned by the columns of a Gale dual B of a matrix A. TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 33 Let L ⊆ Zn be a lattice. The ideal IL := h∂xu − ∂xv | u − v ∈ L i ⊆ C[∂x ] is called a lattice ideal. Note that the toric ideal IA is the lattice ideal associated to kerZ (A). Proposition 9.8. The variety Var(hgrF (IZB ), grF (E)i) ⊆ T ∗ X = (C∗ )n × Cn is T -equivariant of dimension at most n, with generic T -orbit of dimension d. Proof. Since the generators of the ideal hgrF (IZB ), grF (E)i are homogeneous with respect to the T -action on C[x± , ξ] given by t  xi = tai xi and t  ξi = t−ai ξi , the given variety is T -equivariant. The rest of this argument is based on the fact that the binomial DX̄ -module DX̄ /(IZB + hE − βi) is holonomic for all parameters β, and its characteristic variety can be described set-theoretically. For the holonomicity statement, we use the primary decomposition of IZB from [ES96]; if g is the order of the finite group kerZ (A)/ZB, then there are g group homomorphisms ρ1 , . . . , ρg : kerZ (A) → C∗ , called partial characters, that extend the trivial character ZB → C∗ , so that IZB = I(ρ1 ) ∩ · · · ∩ I(ρg ), where I(ρj ) = h∂xu − ρj (u − v)∂xv | u − v ∈ kerZ (A)i. Note that C[∂x ]/I(ρj ) is isomorphic to C[∂x ]/IA via ∂xi 7→ ρ̃j (ei )∂xi , where ρ̃j is any extension of ρj to Zn and ei is the ith standard basis vector. By Theorem 6.2.(i), DX̄ /(IZB + hE − βi) is holonomic for all β, since all of the primary (actually, prime) components of IZB are toral. Now by [CF12, Theorem 4.3], Char(DX̄ /(IZB + hE − βi)) is the union of the characteristic varieties of the DX̄ /(I(ρj ) + hE − βi). Each of these is isomorphic to DX̄ /HA (β) = DX̄ /(IA + hE − βi) by appropriately rescaling the variables, so we first describe the characteristic variety of an A-hypergeometric DX̄ -module. To do this, we recall notions and results from [SW08]. The polyhedral subcomplex of the face lattice of conv({0, a1 , . . . , an }) consisting of faces not containing the origin is called the A-umbrella Φ(A). (More general umbrellas were introduced by Schulze and Walther in [SW08] in order to study L-characteristic varieties of A-hypergeometric systems. Here we need only consider the umbrella induced by the order filtration on the Weyl algebra DX̄ .) Note that when the rational row span of A contains 1n , Φ(A) is isomorphic to the face lattice of conv(A). Notation 9.9. If σ ⊆ {1, . . . , n}, let Aσ denote the matrix consisting of the columns of A indexed by σ, and let B σ denote the matrix consisting of the rows of B indexed by σ. For τ ⊆ {1, . . . , n}, let Cτ be the closure of the conormal space to the T -orbit of the point 1τ , where (1τ )i = 1 if i ∈ τ and (1τ )i = 0 if i ∈ τ c = {1, . . . , n} r τ . Then Cτ has dimension n and has defining ideal equal to the radical of hξτ c , grF (Eτ ), grF (IAτ )i, where ξτ c = {ξi | i ∈ τ c } and Eτ is the sequence S of Euler operators given by the matrix Aτ . It is shown in [SW08] that Char(DX̄ /HA (β)) = τ ∈Φ(A) Cτ , which is equidimensional and set-theoretically independent of β. If τ ⊆ {1, . . . , n}, then since Cτ has dimension n, so does the ring Kτ := C[x, ξ] hξτ c , grF (Eτ ), grF (IAτ )i . We claim that C[x± ] ⊗ Kτ is also of dimension n. If τ is not a pyramid, then the row span of Aτ does not contain basis vectors. Thus a generic point on Cτ has all x-coordinates nonzero, so dim(C[x± ] ⊗ Kτ ) = dim(Kτ ) = n. On the other hand, if τ is a pyramid over the ith column ai of 34 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER A, then in C[x, ξ] we have hgrF (Eτ )i = hAτ (xξ)τ i = hAτ r{i} (xξ)τ r{i} , xi i ∩ hAτ r{i} (xξ)τ r{i} , ξi i, where (xξ)τ is the column vector whose components are xi ξi for i ∈ τ , and similarly for (xξ)τ r{i} . In particular, C[x± ]⊗C[x] Kτ = C[x± ]⊗C[x] Kτ r{i} because grF (IAτ ) = grF (IAτ r{i} ). Note also that c c by the pyramid assumption and since τ and τ r {i} belong to Φ(A), rank(B τ ) = rank(B (τ r{i}) ). Iteration thus reduces this case to the non-pyramid case, as handled in the previous paragraph. This establishes the claim. We next claim that for any τ , the generic T -orbit in Cτ is of the full dimension d. To see this, observe that a generic point of Cτ has ξi 6= 0 for i ∈ τ . Moreover, if i ∈ / τ , then the variable xi is not involved in the definition of the ideal of Cτ , so a generic point in Cτ must be nonzero in the x-coordinates indexed by τ c . Since the orbit of a point with nonzero coordinates in ξτ and xτ c has dimension d, the claim holds. The above discussion regarding Char(DX̄ /HA (β)) also applies to the study of the characteristic varieties of DX̄ /(I(ρj ) + hE − βi), after a rescaling of the variables. We now consider the ideal hgrF (IZB ), grF (E)i ⊆ C[x± , ξ]. The monomials in ξ that belong to grF (IZB ) also belong to grF (IA ), as IZB ⊆ IA . If ξ u ∈ grF (IA ), then there is a v ∈ Nn such that ∂xu − ∂xv ∈ IA and |u| > |v|; in particular, u − v ∈ kerZ (A). Since g > 0 is the order of kerZ (A)/ZB, g(u − v) = gu − gv ∈ ZB. This implies that the monomial (ξ u )g belongs to grF (IZB ). We conclude that, up to radical, grF (IZB ) and grF (IA ) have the same monomials in ξ. This means that, in order to compute the dimension of Var(hgrF (IZB ), grF (E)i) ⊆ T ∗ X, we need only consider the components of this variety contained in the sets {(x, ξ) ∈ T ∗ X | ξi 6= 0, i ∈ τ ; ξi = 0, i ∈ / τ } for τ ∈ Φ(A). Q Fixing τ ∈ Φ(A), consider the ideal hgrF (IZB ), grF (E), ξi | i ∈ / τ i : ξτ∞ , where ξτ := i∈τ ξi . Since τ ∈ Φ(A), the ideal grF (IZB τ ) is the lattice ideal corresponding to B τ in the variables ξτ and can be decomposed as an intersection of ideals that are isomorphic to grF (IAτ ), up to a rescaling of the variables. Thus the zero set of hgrF (IZB ), grF (E), ξi | i ∈ / τ i : ξτ∞ is the union of F F ∞ Var(hgr (I(ρτ,j )), gr (Eτ ), ξi | i ∈ / τ i) : ξτ , where the ρτ,j are the partial characters appearing in the prime decomposition of IZB τ . Since I(ρτ,j ) is obtained from IAτ by rescaling the variables, it follows that Var(hgrF (I(ρτ,j )), grF (Eτ ), ξi | i ∈ / τ i : ξτ∞ ) has dimension n with generic T -orbit of full dimension d, completing the proof.  Corollary 9.10. The ring R := C[z ±1 ] ⊗C[z]  w+ (Bw)− z (Bzζ) (Bzζ)(Bw)− −z w− C[z, ζ]  (Bzζ)(Bw)+ if w ∈ Zm , |Bw| = 0, if w ∈ Zm , |Bw| < 0 has dimension at most m, where zζ is the m × 1 vector with entries z1 ζ1 , . . . , zm ζm . Proof. Let b1 , . . . , bm denote the columns of B. Since B has rank m, we may assume that the first m rows of B form a matrix M of rank m. Let Mi−1 denote the ith row of the matrix M −1 ∈ Qm×m . Consider the ring homomorphism R → C[x± , ξ]/hgrF (IZB ), grF (E)i given by zi 7→ xbi and ζi 7→ x−bi Mi−1 · [x1 ξ1 , . . . , xm ξm ]t . Since this homomorphism is injective, it gives rise to a dominant morphism between the corresponding varieties. We conclude that dim(R) ≤ n − d = m because TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 35 this morphism is also constant on T -orbits, the dimension of Var(hgrF (IZB ), grF (E)i)) ⊆ T ∗ X is n, and the generic T -orbit (in every component) of this variety has dimension d.  Our next step towards a proof of Theorem 9.4 is to find the equations satisfied by the components of Char(DZ̄ /Horn(B, κ)) that lie in T ∗ Z = T ∗ Z̄ r Var(z1 . . . zm ). To do this, we first summarize facts about the primary decomposition of lattice basis ideals from [HS00, DMM10a]. For each associated prime p of I(B), there exist subsets σ ⊆ {1, . . . , n} and ω ⊆ {1, . . . , m} such that p = C[∂x ] · J + h∂xi | i ∈ / σi and J ⊆ C[∂xi | i ∈ σ] is one of the associated primes of the lattice ideal IZBσ,ω , where Bσ,ω is the submatrix of B whose rows are indexed by σ and whose columns are indexed by ω. Further, in order for Bσ,ω to appear as a toral component in the primary decomposition of I(B), the matrix whose rows are Bi for i ∈ / σ consists of a square, invertible block with columns indexed by j ∈ / ω, together with a zero block. If p as above is associated to I(B), then so is C[∂x ] · J 0 + h∂xi |∈ / σi for every associated prime J 0 of IZBσ,ω . Recall that the associated primes of a lattice ideal are all isomorphic (by rescaling the variables) to the toric ideal arising from the saturation (QBσ,ω ) ∩ Zn of the lattice ZBσ,ω . If p is a toral associated prime of I(B), then so are the other associated primes arising from the same lattice ideal IZBσ,ω . Here, the p-primary component of I(B) is of the form (I(B)+C[∂x ]·J) : Q ∞ + Mσ , where J is an associated prime of IZBσ,ω as above and Mσ is a monomial ideal i∈σ ∂xi generated in the variables ∂xj for j ∈ / σ. The monomial ideal Mσ depends only on the rows of B indexed by {1, . . . , n} r σ and is therefore the same in each primary component involving a fixed associated prime J of IZBσ,ω . Consequently, I(B) + C[∂x ] · IZBσ,ω + Mσ is contained in the intersection of the primary components of I(B) arising from the lattice ideal IZBσ,ω . We will also use that if p and p0 are two toral associated primes of I(B) arising from the same lattice ideal IZBσ,ω with primary components C and C 0 , then qdeg(C[∂x ]/C ) = qdeg(C[∂x ]/C 0 ). Lemma 9.11. Let S be a set of pairs (σ, ω), where σ ⊆ {1, . . . , n} and ω ⊆ {1, . . . , m}, such that if J is an associated prime of IZBσ,ω , then J + h∂xi | i ∈ / σi is a toral associated prime of I(B). Then for each pair (σ, ω) ∈ S , the ideal IZBσ,ω + Mσ is contained in the intersection of the primary components of I(B) arising from the lattice ZBσ,ω . Further, if E DQ Q ui ui ∈ M ∂ (B zζ) Jσ,ω := σ i xi i∈σ / i∈σ /  w  (Bw) − z + (Bσ,ω zζ) − z w− (Bσ,ω zζ)(Bw)+ if w ∈ Z|ω| , |Bw| = 0, + ⊆ C[z ± , ζ], (Bσ,ω ζ)(Bw)− if w ∈ Z|ω| , |Bw| < 0 then the ring Rσ,ω := C[z ± , ζ]/Jσ,ω has dimension at most m. Consequently, the ring RS := Q C[z ± , ζ]/ (σ,ω)∈S Jσ,ω also has dimension at most m. √ Proof. It is enough to show that dim(Rσ,ω ) ≤ m. Note that since M / σi, the Q Qσ = h∂uxi i | i ∈ ui polynomials Bi zζ, for i ∈ / σ, belong to the radical of (B zζ) | ∂ ∈ M i xi σ . Recall i∈σ / i∈σ / that the matrix with rows Bi for i ∈ / σ consists of a square, invertible block with columns indexed by j ∈ / ω, as well as a zero block. Thus hzj ζj | j ∈ {1, . . . , m} r ωi belongs to the radical of Q Q ui ui ∈ Mσ , so the statement follows from Corollary 9.10.  i∈σ / (Bi zζ) | i∈σ / ∂xi Proof of Theorem 9.4. Since β = Aκ is toral for B, the module DZ̄ /sHorn(B, κ) is holonomic by Corollary 7.2.(vi) Qn and Theorem 6.2.(i). The components of Char(DZ̄ /Horn(B, κ)) that are not contained in Var( i=1 xi ) form Char(DZ̄ /sHorn(B, κ)), and consequently have dimension m. 36 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER We now consider the components of Char(DZ̄ /Horn(B, κ)) that are contained in coordinate hyperplanes. To do this, fix γ ⊆ {1, . . . , m}, and note that Q it is enough to show that Q the components0 of Char(DZ̄ /Horn(B, κ)) that are contained in Var( j ∈γ / zj ) but not in Var( j ∈γ / 0 zj ) for any γ strictly containing γ are of dimension at most m. For simplicity of notation for the remainder of this proof, set B̂ := Bγ and  := A[γ]. By [DMM10b, Proposition 6.4], I(B̂) + hE − βi = Iˆ + hE − βi, where Iˆ is the intersection of the associated components C of I(B̂) for which β ∈ qdeg(C[∂x ]/C ). (Here, quasidegrees are computed with respect to the A-grading.) Since β is completely toral for B, the components C that appear in the intersection Iˆ are all toral components of I(B̂). By the discussion before Lemma 9.11, Iˆ contains a product of ideals of the form IZB̂σ,ω + M̂σ , where σ ⊆ {1, . . . , n}, ω ⊆ γ, and M̂σ is a monomial ideal whose radical is h∂xi | i ∈ / σi and whose generators involve only those variables. Let S be the set of pairs (σ, ω) that appear in this product. Q We claim that, with Sγ := C[z, ζ, zγ± ]/hzγ c i, there is a surjection from Sγ / (σ,ω)∈S Jσ,ω to Sγ /Sγ · grF (Horn(B, κ)), where Jσ,ω ⊆ Sγ are ideals with generators as in Lemma 9.11. With this surjection, Lemma 9.11 implies that the components of Char(DZ̄ /Horn(B, κ)) contained in Q Q 0 Var( j ∈γ z ) but not in Var( z 0 j j ) for any γ ) γ have dimension at most m, as desired. / j ∈γ / Q To establish this final claim, let f := (σ,ω)∈S fσ,ω , where each fσ,ω is either of the form: (B̂ u) (B̂ (B̂ u) u) (i) xσ σ,ω + (∂xσ σ,ω + − ∂xσ σ,ω − ), where u ∈ Z|ω| and xσ = {xi | i ∈ σ}; or / σ}. (ii) xvσc ∂xvσc , where ∂xvσc ∈ M̂σ and xσc = {xi | i ∈ Note that f is invariant under the T -action, and it belongs to DX · I(B̂) + hE − βi because Q (σ,ω)∈S  IZB̂σ,ω + M̂σ + hE − βi ⊆ I(B̂) + hE − βi. In fact, since B̂ is a submatrix of B and for every (σ, ω) ∈ S , Bω consists of Bσ,ω and a block of zeros, it follows that f belongs to the subring of [DX ]T generated by θ and xBu , where u ∈ Zm . We denote this subring by [DX ]TB and define a homomorphism δB,κ : [DX ]TB → DZ by xBu p(θ) 7→ z u p(Bη + κ). As in Proposition 5.4, this δB,κ is surjective, with kernel given by hE − βi. Since f ∈ (DX · I(B̂) + hE − βi) ∩ [DX ]TB , it can be written as a combination of the |γ| binomial generators of I(B̂) and the sequence E − β, all of which belong to [DX ]TB . Further, the coefficients in this combination also belong to [DX ]TB , since g ∈ [DX ]TB and h ∈ [DX ]T r [DX ]TB together imply that hg ∈ / [DX ]TB . Applying δB,κ to such an expression for f and clearing denominators, we conclude that there exists a v ∈ N|γ| such that zγv δB,κ (f ) is a DZ̄ -combination of the generators of Horn(B, κ) indexed by γ. Allowing f to range through all possibilities allowed by Q (i) and (ii) above, the images of the set of F v gr (zγ δB,κ (f )) in Sγ generate precisely the ideal Sγ · (σ,ω)∈S Jσ,ω . This yields the containment Sγ · Y Jσ,ω ⊆ Sγ · grF (Horn(B, κ)), (σ,ω)∈S which induces the surjection of rings needed to complete the proof.  TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 37 10. T ORUS INVARIANTS AND THE H ORN –K APRANOV UNIFORMIZATION In this section, we consider the singular locus of the image of an A-hypergeometric system under à Πà B , still following Convention 3.2. We show that our framework for constructing ΠB can be thought of as a generalization of Kapranov’s ideas in [Kap91]. In this direction, we restrict our attention to the case that the Q-rowspan of A contains 1n , so that the A-hypergeometric system DX̄ /(IA + hE − βi) = DX̄ /HA (β) is regular holonomic for all β [Hot98, SW08]. This allows us to apply Proposition 4.3, which provides a precise description à of the singular locus Sing(Πà B (DX̄ /HA (β))). Namely, it is the union of Sing(∆B (DX̄ /HA (β))) with the coordinate hyperplanes in Z̄. The former is a geometric quotient by the torus T of Sing(DX̄ /HA (β)). We note that in [HT11], Gröbner bases and D-module theory are used to determine the singular locus of the Lauricella FC system, as well as that of its associated binomial D-module. The secondary polytope of A is the Newton polytope of the principal A-determinant, which is the defining equation for the codimension one part of Sing(DX̄ /HA (β)). Since the principal Adeterminant is A-graded, its Newton polytope lies in an m-dimensional subspace of Cn . Thus, as a direct consequence of Proposition 4.3, we have the following result. Corollary 10.1. The Newton polytope of the defining polynomial of the codimension one part of m  Sing(Πà B (DX̄ /HA (β))) is the secondary polytope of A viewed in R . By following essentially the same argument as the one given in the proof in [Kap91, Theorem 2.1.a], we recover the Horn–Kapranov uniformization of the A-discriminant from our setup for the construction of Πà B . Let [n] := {1, . . . , n}, and recall the definition of C[n] from Notation 9.9. Since we have assumed that the rational row span of A contains the vector 1n , the A-discriminant is the defining polynomial of the projection onto the x-coordinates of C[n] r Var(ξ1 , . . . , ξn ), as long as this projection is a hypersurface. Otherwise, the A-discriminant is defined to be the polynomial 1. In the hypersurface case, the reduced A-discriminant is the polynomial ∇A given by saturating x1 · · · xn out of the principal A-determinant, and thus cuts out the intersection of the A-discriminantal hypersurface with (C∗ )n . Note that the A-discriminant is A-graded, and thus ∇A is invariant with respect to the torus action. Since the algebraic counterpart of projection is elimination, we see that ∇A , considered as a polynomial in 2n variables, vanishes on C[n] r Var(hx1 · · · xn i P ∩ hξ1 , . . . , ξn i), and in particular on ¯ belongs to C[n] r Var(x1 · · · xn · ξ1 · · · ξn ). Write ∇A as a finite sum w∈Zm λw xBw . If (x̄, ξ) C[n] r Var(x1 · · · xn · ξ1 · · · ξn ), then X X X ¯ = ¯ Bw , 0 = ∇A (x̄, ξ) λw x̄Bw = λw x̄Bw ξ¯Bw = λw (x̄ξ) w∈Zm w∈Zm w∈Zm as ξ Bw = 1 on C[n] r Var(x1 · · · xn · ξ1 · · · ξn ). Dehomogenizing, we obtain ! X X X δB,κ λw (xξ)Bw = λw (Bzζ)Bw = λw ((Bzζ)B )w , w∈Zm w∈Zm w∈Zm where, for x ∈ X and b1 , . . . , bm the columns of B, we write xB := (xb1 , . . . , xbm ), as in §5. 38 CHRISTINE BERKESCH ZAMAERE, LAURA FELICIA MATUSEVICH, AND ULI WALTHER Replacing zζ by (s1 , . . . , sm ), it is now easy to see that the dehomogenized reduced A-discriminant is the defining equation for the variety with the desired parametrization: ! n [ Cm r Var((Bs)i ) 3 s 7→ (Bs)B , i=1 known as the Horn–Kapranov uniformization. R EFERENCES [Ado94] [Berk10] [Berk11] [BM09] [BMW13] [Bern72] [Beu11a] [Beu11b] [BGK+ 87] [CF12] [DMM12] [DMM10a] [DMM10b] [DMS05] [ES96] [GGZ87] [GKZ89] [Gin86] [HT11] [HS00] [Hot98] [Kap91] [M2] Alan Adolphson, Hypergeometric functions and rings generated by monomials, Duke Math. J. 73 (1994), 269–290. 24 Christine Berkesch, Euler–Koszul methods in algebra and geometry, PhD thesis, Purdue University, 2010. 25 Christine Berkesch, The rank of a hypergeometric system, Compos. Math. 147 (2011), no. 1, 284–318. 24 Christine Berkesch and Laura Felicia Matusevich, A-graded methods for monomial ideals, J. Algebra, 322 (2009), 2886–2904. 25 Christine Berkesch Zamaere, Laura Felicia Matusevich, and Uli Walther, Singularities of binomial Dmodules, preprint (2013). 22, 23 I. N. Bernšteı̆n, Analytic continuation of generalized functions with respect to a parameter, Funkcional. Anal. i Priložen. 6 (1972), no. 4, 26–40. 5 Frits Beukers, Irreducibility of A-hypergeometric systems, Indag. Math. (N.S.) 21 (2011), no. 1-2, 30–39. 26 Frits Beukers, Notes on A-hypergeometric functions, Séminaires & Congrès, 23 (2011), 25–61. 29 A. Borel, P.-P. Grivel, B. Kaup, A. Haefliger, B. Malgrange, and F. Ehlers, Algebraic D-modules, Perspectives in Mathematics, 2. Academic Press Inc., Boston, MA, 1987. 5 Francisco-Jesús Castro-Jiménez and Marı́a-Cruz Fernández-Fernández, On irregular binomial D-modules, Math. Z. 272 (2012), no. 3-4, 1321–1337. 22, 23, 28, 33 Alicia Dickenstein, Federico Martı́nez, and Laura Felicia Matusevich, Nilsson solutions for irregular hypergeometric systems, Rev. Mat. Iberoam. 28 (2012), no. 3, 723–758. 22, 24, 25 Alicia Dickenstein, Laura Felicia Matusevich, and Ezra Miller, Combinatorics of binomial primary decomposition, Math Z., 264, no. 4, (2010) 745–763. 23, 35 Alicia Dickenstein, Laura Felicia Matusevich, and Ezra Miller, Binomial D-modules, Duke Math. J. 151 no. 3 (2010), 385–429. 1, 22, 23, 36 Alicia Dickenstein, Laura Felicia Matusevich, and Timur Sadykov, Bivariate hypergeometric D-modules, Advances in Mathematics, 196 (2005), 78–123. 3, 32 David Eisenbud and Bernd Sturmfels, Binomial ideals, Duke Math. J. 84 (1996), no. 1, 1–45. 23, 33 I. M. Gel0 fand, M. I. Graev, and A. V. Zelevinskiı̆, Holonomic systems of equations and series of hypergeometric type, Dokl. Akad. Nauk SSSR 295 (1987), no. 1, 14–19. 1, 24 I. M. Gel0 fand, A. V. Zelevinskiı̆, and M. M. Kapranov, Hypergeometric functions and toric varieties, Funktsional. Anal. i Prilozhen. 23 (1989), no. 2, 12–26. Correction in ibid, 27 (1993), no. 4, 91. 1 V. Ginsburg, Characteristic varieties and vanishing cycles, Invent. Math. 84 (1986), 327–402. 15 Ryohei Hattori and Nobuki Takayama, The singular locus of Lauricella’s FC , 2011, available at arXiv:1110.6675. 37 Serkan Hoşten and Jay Shapiro, Primary decomposition of lattice basis ideals. (English summary) Symbolic computation in algebra, analysis, and geometry (Berkeley, CA, 1998). J. Symbolic Comput. 29 (2000), no. 4-5, 625–639. 35 Ryoshi Hotta, Equivariant D-modules, 1998, available at arXiv:math/9805021. 37 M. M. Kapranov, A characterization of A-discriminantal hypersurfaces in terms of the logarithmic Gauss map, Math. Ann. 290 (1991), 277–285. 37 Daniel R. Grayson and Michael E. Stillman, Macaulay2, a software system for research in algebraic geometry, available at http://www.math.uiuc.edu/Macaulay2/. 28, 31 TORUS EQUIVARIANT D-MODULES AND HYPERGEOMETRIC SYSTEMS 39 [MMW05] Laura Felicia Matusevich, Ezra Miller, and Uli Walther, Homological methods for hypergeometric families, J. Amer. Math. Soc. 18 (2005), no. 4, 919–941. 24 [Sad02] Timur Sadykov, On the Horn system of partial differential equations and series of hypergeometric type, Math. Scand. 91 (2002), no. 1, 127–149. 3, 32 [Sai11] Mutsumi Saito, Irreducible quotients of A-hypergeometric systems, Compos. Math. 147 (2011), no. 2, 613–632. 26 [SST00] Mutsumi Saito, Bernd Sturmfels, and Nobuki Takayama, Gröbner Deformations of Hypergeometric Differential Equations, Springer–Verlag, Berlin, 2000. 5, 6, 8, 9, 10, 29 [SW08] Mathias Schulze and Uli Walther, Irregularity of hypergeometric systems via slopes along coordinate subspaces, Duke Math. J. 142 (2008), no. 3, 465–509. 5, 28, 33, 37 [SW12] Mathias Schulze and Uli Walther, Resonance equals reducibility for A-hypergeometric systems, Algebra Number Theory 6 (2012), no. 3, 527–537. 22, 26 [Smi01] Gregory G. Smith, Irreducible components of characteristic varieties, J. Pure Appl. Algebra 165 (2001), no. 3, 291–306. 5 S CHOOL OF M ATHEMATICS , U NIVERSITY OF M INNESOTA , M INNEAPOLIS , MN 55455. E-mail address: [email protected] D EPARTMENT OF M ATHEMATICS , T EXAS A&M U NIVERSITY , C OLLEGE S TATION , TX 77843. E-mail address: [email protected] D EPARTMENT OF M ATHEMATICS , P URDUE U NIVERSITY , W EST L AFAYETTE , IN 47907. E-mail address: [email protected]
0math.AC
Noname manuscript No. (will be inserted by the editor) A Framework for Deadlock Detection in core ABS arXiv:1511.04926v1 [cs.PL] 16 Nov 2015 Elena Giachino · Cosimo Laneve · Michael Lienhardt Received: date / Accepted: date Abstract We present a framework for statically detecting deadlocks in a concurrent object-oriented language with asynchronous method calls and cooperative scheduling of method activations. Since this language features recursion and dynamic resource creation, deadlock detection is extremely complex and state-of-the-art solutions either give imprecise answers or do not scale. In order to augment precision and scalability we propose a modular framework that allows several techniques to be combined. The basic component of the framework is a front-end inference algorithm that extracts abstract behavioural descriptions of methods, called contracts, which retain resource dependency information. This component is integrated with a number of possible different back-ends that analyse contracts and derive deadlock information. As a proof-of-concept, we discuss two such back-ends: (i) an evaluator that computes a fixpoint semantics and (ii) an evaluator using abstract model checking. 1 Introduction Modern systems are designed to support a high degree of parallelism by letting as many system components as possible operate concurrently. When such systems also exhibit a high degree of resource and data sharing then deadlocks represent an insidious and recurring threat. In particular, deadlocks arise as a consequence of exclusive resource access and circular wait for accessing resources. A standard example is when two processes Partly funded by the EU project FP7-610582 ENVISAGE: Engineering Virtualized Services. Department of Computer Science and Engineering, University of Bologna – INRIA Focus Team, Italy are exclusively holding a different resource and are requesting access to the resource held by the other. That is, the correct termination of each of the two process activities depends on the termination of the other. The presence of a circular dependency makes termination impossible. Deadlocks may be particularly hard to detect in systems with unbounded (mutual) recursion and dynamic resource creation. A paradigm case is an adaptive system that creates an unbounded number of processes such as server applications. In these systems, the interaction protocols are extremely complex and stateof-the-art solutions either give imprecise answers or do not scale – see Section 8 and, for instance, [32] and the references therein. In order to augment precision and scalability we propose a modular framework that allows several techniques to be combined. We meet scalability requirement by designing a front-end inference system that automatically extracts abstract behavioural descriptions pertinent to deadlock analysis, called contracts, from code. The inference system is modular because it (partially) supports separate inference of modules. To meet precision of contracts’ analysis, as a proof-of-concept we define and implement two different techniques: (i) an evaluator that computes a fixpoint semantics and (ii) an evaluator using abstract model checking. Our framework targets core ABS [23], which is an abstract, executable, object-oriented modelling language with a formal semantics, targeting distributed systems. In core ABS, method invocations are asynchronous: the caller continues after the invocation and the called code runs on a different task. Tasks are cooperatively scheduled, that is there is a notion of group of objects, called cog, and there is at most one active task at each time per cog. The active task explicitly returns the control in 2 order to let other tasks progress. The synchronisation between the caller and the called methods is performed when the result is strictly necessary [6, 24, 40]. Technically, the decoupling of method invocation and the returned value is realised using future variables (see [3] and the references in there), which are pointers to values that may be not available yet. Clearly, the access to values of future variables may require waiting for the value to be returned. We discuss the syntax and the semantics of core ABS, in Section 2. Because of the presence of explicit synchronisation operations, the analysis of deadlocks in core ABS is more fine-grained than in thread-based languages (such as Java). However, as usual with (concurrent) programming languages, analyses are hard and time-consuming because most part of the code is irrelevant for the properties one intends to derive. For this reason, in Section 4, we design an inference system that automatically extracts contracts from core ABS code. These contracts are similar to those ranging from languages for session types [14] to process contracts [29] and to calculi of processes as Milner’s CCS or pi-calculus [30, 31]. The inference system mostly collects method behaviours and uses constraints to enforce consistencies among behaviours. Then a standard semiunification technique is used for solving the set of generated constraints. Since our inference system addresses a language with asynchronous method invocations, it is possible that a method triggers behaviours that will last after its lifetime (and therefore will contribute to future deadlocks). In order to support a more precise analysis, we split contracts of methods in synchronised and unsynchronised contracts, with the intended meaning that the formers collect the invocations that are explicitly synchronised in the method body and the latter ones collect the other invocations. The current release of the inference system does not cover the full range of features of core ABS. In Section 3 we discuss the restrictions of core ABS and the techniques that may be used to remove these restrictions. Our contracts feature recursion and resource creation; therefore their underlying models are infinite states and their analysis cannot be exhaustive. We propose two techniques for analysing contracts (and to show the modularity of our framework). The first one, which is discussed in Section 5, is a fixpoint technique on models with a limited capacity of name creation. This entails fixpoint existence and finiteness of models. While we lose precision, our technique is sound (in some cases, this technique may signal false positives). The second technique, which is detailed in Section 6, is an abstract model checking that evaluates the contract program up-to some point, which is possible to Elena Giachino et al. determine by analysing the recursive patterns of the program. This technique is precise when the recursions are linear, while it is over-approximating in general. We have prototyped an implementation of our framework, called the DF4ABS tool and, in Section 7, we assess the precision and performance of the prototype. In particular, we have applied it to an industrial case study that is based on the Fredhopper Access Server (FAS) developed by SDL Fredhopper1 . It is worth to recall that, because of the modularity of DF4ABS, the current analyses techniques may be integrated and/or replaced by other ones. We discuss this idea in Section 9. Origin of the material. The basic ideas of this article have appeared in conference proceedings. In particular, the contract language and (a simplified form of) the inference system have been introduced in [15, 17], while the fixpoint analysis technique has been explored in [15] and an introduction to the abstract model checking technique can be found in [18], while the details are in [19]. This article is a thoroughly revised and enhanced version of [15] that presents the whole framework in a uniform setting and includes the full proofs of all the results. A more detailed comparison with other related work is postponed to Section 8. 2 The language core ABS The syntax and the semantics (of the concurrent object level) of core ABS are defined in the following two subsections; the third subsection is devoted to the discussion of examples, and the last one to the definition of deadlock. In this contribution we overlook the functional level of core ABS that defines data types and functions because their analysis can be performed with techniques that may (easily) complement those discussed in this paper (such as data-flow analysis). Details of core ABS, its semantics and its standard type system can be also found in [23]. 2.1 Syntax Figure 1 displays core ABS syntax, where an overlined element corresponds to any finite sequence of such element. The elements of the sequence are separated by commas, except for C, which has no separator. For example T means a (possibly empty) sequence T1 , · · · ,Tn . When we write T x ; we mean a sequence T1 x1 ; · · · ; Tn xn ; when the sequence is not empty; we mean the empty sequence otherwise. 1 http://sdl.com/products/fredhopper/ A Framework for Deadlock Detection in core ABS P T I S C M s z e v ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= 3 I C {T x ; s} D | Fut<T > | I interface I { S ; } T m(T x) class C(T x) [implements I] { T x ; M } S{ T x ; s } skip | x = z | if e { s } else { s } | return e | s ; s | await e? e | e.m(e) | e!m(e) | new C (e) | new cog C (e) | e.get v | x | this | arithmetic-and-bool-exp null | primitive values program type interface method signature class method definition statement expression with side effects expression value Fig. 1 The language core ABS A program P is a list of interface and class declarations (resp. I and C) followed by a main function { T x ; s }. A type T is the name of either a primitive type D such as Int, Bool, String, or a future type Fut<T >, or an interface name I. A class declaration class C(T x) { T ′ x′ ; M } has a name C and declares its fields T x, T ′ x′ and its methods M . The fields T x will be initialised when the object is created; the fields T ′ x′ will be initialised by the main function of the class (or by the other methods). A statement s may be either one of the standard operations of an imperative language or one of the operations for scheduling. This operation is await x? (the other one is get, see below), which suspends method’s execution until the argument x, is resolved. This means that await requires the value of x to be resolved before resuming method’s execution. former releases cog’s lock when the value of x is still unavailable; the latter does not release cog’s lock (thus being the potential cause of a deadlock). A pure expression e is either a value, or a variable x, or the reserved identifier this. Values include the null object, and primitive type values, such as true and 1. In the whole paper, we assume that sequences of field declarations T x, method declarations M , and parameter declarations T x do not contain duplicate names. It is also assumed that every class and interface name in a program has a unique definition. 2.2 Semantics core ABS semantics is defined as a transition relation between configurations, noted cn and defined in Figure 2. Configurations are sets of elements – therefore An expression z may have side effects (may change we identify configurations that are equal up-to assothe state of the system) and is either an object creciativity and commutativity – and are denoted by the ation new C(e) in the same group of the creator or juxtaposition of the elements cn cn; the empty configan object creation new cog C(e) in a new group. In uration is denoted by ε. The transition relation uses core ABS, (runtime) objects are partitioned in groups, three infinite sets of names: object names, ranged over called cogs, which own a lock for regulating the execuby o, o′ , · · · , cog names, ranged over by c, c′ , · · · , and tions of threads. Every threads acquires its own cog lock future names, ranged over by f , f ′ , · · · . Object names in order to be evaluated and releases it upon terminaare partitioned according to the class and the cog they tion or suspension. Clearly, threads running on different belongs. We assume there are infinitely many object cogs may be evaluated in parallel, while threads running names per class and the function fresh(C) returns a on the same cog do compete for the lock and interleave new object name of class C. Given an object name o, the their evaluation. The two operations new C(e) and new function class(o) returns its class. The function fresh( ) cog C(e) allow one to add an object to a previously crereturns either a fresh cog name or a fresh future name; ated cog or to create new singleton cogs, respectively. the context will disambiguate between the twos. Runtime values are either values v in Figure 1 or An expression z may also be either a (synchronous) method call e.m(e) or an asynchronous method call e!m(e). object and future names or an undefined value, which is denoted by ⊥. Synchronous method invocations suspend the execution Runtime statements extend normal statements with of the caller, without releasing the lock of the correcont(f ) that is used to model explicit continuations in sponding cog; asynchronous method invocations do not synchronous invocations. With an abuse of notation, suspend caller’s execution. Expressions z also include we range over runtime values with v, v ′ , · · · and over the operation e.get that suspends method’s execution runtime statements with s, s′ , · · · . We finally use a and until the value of e is computed. The type of e is a ful, possibly indexed, to range over maps from fields to ture type that is associated with a method invocation. runtime values and local variables to runtime values, The difference between await x? and e.get is that the 4 Elena Giachino et al. cn p q s ::= ::= ::= ::= ǫ | fut(f, val) | ob(o, a, p, q) | invoc(o, f, m, v) | cog(c, act) | cn cn {l | s} | idle ǫ | {l | s} | q q cont(f ) | . . . act val a v ::= ::= ::= ::= o|ε v|⊥ [· · · , x 7→ v, · · · ] o | f | ... Fig. 2 Runtime syntax of core ABS. respectively. The map l also binds the special name destiny to a future value. The elements of configurations are – objects ob(o, a, p, q) where o is an object name; a returns the values of object’s fields, p is either idle, representing inactivity, or is the active process {l | s}, where l returns the values of local identifiers and s is the statement to evaluate; q is a set of processes to evaluate. – future binders fut(f, v) where v, called the reply value may be also ⊥ meaning that the value has still not computed. – cog binders cog(c, o) where o is the active object; it may be ε meaning that the cog c has no active object. – method invocations invoc(o, f, m, v). The following auxiliary functions are used in the semantic rules (we assume a fixed core ABS program): – dom(l) and dom(a) return the domain of l and a, respectively. – l[x 7→ v] is the function such that (l[x 7→ v])(x) = v and (l[x 7→ v])(y) = l(y), when y 6= x. Similarly for a[x 7→ v]. – [[e]](a+l) returns the value of e by computing the arithmetic and boolean expressions and retrieving the value of the identifiers that is stored either in a or in l. Since a and l are assumed to have disjoint domains, we denote the union map with a + l. [[e]](a+l) returns the tuple of values of e. When e is a future name, the function [[·]](a+l) is the identity. Namely [[f ]](a+l) = f . – C.m returns the term (T x){T ′ z; s} that contains the arguments and the body of the method m in the class C. – bind(o, f, m, v, C) = {[destiny 7→ f, x 7→ v, z 7→ ⊥] | s[o/this]}, where C.m = (T x){T ′ z; s}. – init(C, o) returns the process {∅[destiny 7→ f⊥ ] | s[o/this]} where {T x; s} is the main function of the class C. The special name destiny is initialised to a fresh (future) name f⊥ . 7 – atts(C, v, c) returns the map [cog 7→ c, x 7→ v, x′ → ⊥], where the class C is defined as class C(T x){ T ′ x′ ; M } and where cog is a special field storing the cog name of the object. The transition relation rules are collected in Figures 3 and 4. They define transitions of objects ob(o, a, p, q) according to the shape of the statement in p. We focus on rules concerning the concurrent part of core ABS, since the other ones are standard. Rules (Await-True) and (Await-False) model the await e? operation: if the (future) value of e has been computed then await terminates; otherwise the active process becomes idle. In this case, if the object owns the control of the cog then it may release such control – rule (Release-Cog). Otherwise, when the cog has no active process, the object gets the control of the cog and activates one of its processes – rule (Activate). Rule (Read-Fut) permits the retrieval of the value returned by a method; the object does not release the control of the cog until this value has been computed. The two types of object creation are modeled by (New-Object) and (New-Cog-Object). The first one creates the new object in the same cog. The new object is idle because the cog has already an active object. The second one creates the object in a new cog and makes it active by scheduling the process corresponding to the main function of the class. The special field cog is initialized accordingly; the other object’s fields are initialized by evaluating the arguments of the operation – see definition of atts. Rule (Async-Call) defines asynchronous method invocation x = e!m(e). This rule creates a fresh future name that is assigned to the identifier x. The evaluation of the called method is transferred to a different process – see rule (Bind-Mtd). Therefore the caller can progress without waiting for callee’s termination. Rule (Cog-Sync-Call) defines synchronous method invocation on an object in the same cog (because of the premise a′ (cog) = c and the element cog(c, o) in the configuration). The control is passed to the called object that executes the body of the called method followed by a special statement cont(f ′ ), where f ′ is a fresh future name. When the evaluation of the body terminates, the caller process is scheduled again using the name f ′ – see rule (Cog-Sync-Return-Sched). Rules (Self-Sync-Call) and (Rem-Sync-Call) deal with synchronous method invocations of the same object and of objects in different cogs, respectively. The former is similar to (Cog-Sync- A Framework for Deadlock Detection in core ABS (Skip) ob(o, a, {l | skip; s}, q) → ob(o, a, {l | s}, q) 5 (Assign-Local) (Assign-Field) x ∈ dom(l) v = [[e]](a+l) ob(o, a, {l | x = e; s}, q) → ob(o, a, {l[x 7→ v] | s}, q) x ∈ dom(a) \ dom(l) v = [[e]](a+l) ob(o, a, {l | x = e; s}, q) → ob(o, a[x 7→ v], {l | s}, q) (Cond-True) (Cond-False) true = [[e]](a+l) ob(o, a, {l | if e then {s1 } else {s2 }; s}, q) → ob(o, a, {l | s1 ; s}, q) false = [[e]](a+l) ob(o, a, {l | if e then {s1 } else {s2 }; s}, q) → ob(o, a, {l | s2 ; s}, q) (Await-True) (Await-False) f = [[e]](a+l) v 6= ⊥ ob(o, a, {l | await e ?; s}, q) fut(f, v) → ob(o, a, {l | s}, q) fut(f, v) f = [[e]](a+l) ob(o, a, {l | await e ?; s}, q) fut(f, ⊥) → ob(o, a, idle, q ∪ {l | await e ?; s}) fut(f, ⊥) (Release-Cog) ob(o, a, idle, q) cog(c, o) → ob(o, a, idle, q) cog(c, ǫ) (Activate) (Read-Fut) c = a(cog) ob(o, a, idle, q ∪ {l | s}) cog(c, ǫ) → ob(o, a, {l | s}, q) cog(c, o) f = [[e]](a+l) v 6= ⊥ ob(o, a, {l | x = e.get; s}, q) fut(f, v) → ob(o, a, {l | x = v; s}, q) fut(f, v) (New-Object) (New-Cog-Object) o′ = fresh(C) p = init(C, o′ ) a′ = atts(C, [[e]](a+l) , c) ob(o, a, {l | x = new C(e); s}, q) cog(c, o) → ob(o, a, {l | x = o′ ; s}, q) cog(c, o) ob(o′ , a′ , idle, {p}) c′ = fresh( ) o′ = fresh(C) p = init(C, o′ ) a′ = atts(C, [[e]](a+l) , c′ ) ob(o, a, {l | x = new cog C(e); s}, q) → ob(o, a, {l | x = o′ ; s}, q) ob(o′ , a′ , p, ∅) cog(c′ , o′ ) Fig. 3 Semantics of core ABS(1). (Async-Call) (Bind-Mtd) o′ = [[e]](a+l) v = [[e]](a+l) f = fresh( ) ob(o, a, {l | x = e!m(e); s}, q) → ob(o, a, {l | x = f ; s}, q) invoc(o′ , f, m, v) fut(f, ⊥) {l | s} = bind(o, f, m, v, class(o)) ob(o, a, p, q) invoc(o, f, m, v) → ob(o, a, p, q ∪ {l | s}) (Cog-Sync-Call) o′ = [[e]](a+l) v = [[e]](a+l) f = fresh( ) c = a′ (cog) f ′ = l(destiny) {l′ | s′ } = bind(o′ , f, m, v, class(o′ )) ob(o, a, {l | x = e.m(e); s}, q) ob(o′ , a′ , idle, q ′ ) cog(c, o) → ob(o, a, idle, q ∪ {l | await f ?; x = f.get; s}) fut(f, ⊥) ob(o′ , a′ , {l′ | s′ ; cont f ′ }, q ′ ) cog(c, o′ ) (Cog-Sync-Return-Sched) c = a′ (cog) f = l′ (destiny) ob(o, a, {l | cont f }, q) cog(c, o) ob(o′ , a′ , idle, q ′ ∪ {l′ | s}) → ob(o, a, idle, q) cog(c, o′ ) ob(o′ , a′ , {l′ | s}, q ′ ) (Self-Sync-Call) f ′ = l(destiny) o = [[e]](a+l) v = [[e]](a+l) f = fresh( ) {l′ | s′ } = bind(o, f, m, v, class(o)) ob(o, a, {l | x = e.m(e); s}, q) → ob(o, a, {l′ | s′ ; cont(f ′ )}, q ∪ {l | await f ?; x = f.get; s}) fut(f, ⊥) (Rem-Sync-Call) o′ = [[e]](a+l) f = fresh( ) a(cog) 6= a′ (cog) ob(o, a, {l | x = e.m(e); s}, q) ob(o′ , a′ , p, q ′ ) → ob(o, a, {l | f = e!m(e); x = f.get; s}, q) ob(o′ , a′ , p, q ′ ) (Return) v = [[e]](a+l) f = l(destiny) ob(o, a, {l | return e; s}, q) fut(f, ⊥) → ob(o, a, {l | s}, q) fut(f, v) (Self-Sync-Return-Sched) f = l′ (destiny) ob(o, a, {l | cont(f )}, q ∪ {l′ | s}) → ob(o, a, {l′ | s}, q) (Context) cn → cn′ cn cn′′ → cn′ cn′′ Fig. 4 Semantics of core ABS(2). Call) except that there is no control on cogs. The latter one implements the synchronous invocation through an asynchronous one followed by an explicit synchronisation operation. It is worth to observe that the rules (Activate), (Cog-Sync-Call) and (Self-Sync-Call) are different from the corresponding ones in [23]. In fact, in [23] rule (Activate) uses an unspecified select predicate that activates one task from the queue of processes to evaluate. According to the rules (Cog-Sync-Call) and (Self-Sync- Call) in that paper, the activated process might be a caller of a synchronous invocation, which has a get oper- ation. To avoid potential deadlock of a wrong select implementation, we have prefixed the gets in (Cog-SyncCall) and (Self-Sync-Call) with await operations. The initial configuration of a core ABS program with main function {T : x ; s} is ob(start , ε, {[destiny 7→ fstart , x 7→ ⊥] | s}, ∅) cog(start, start ) 6 where start and start are special cog and object names, respectively, and fstart is a fresh future name. As usual, let −→∗ be the reflexive and transitive closure of −→. A configuration cn is sound if (i) different elements cog(c, o) and cog(c′ , o′ ) in cn are such that c 6= c′ and o 6= ε implies o 6= o′ , (ii) if ob(o, a, p, q) and ob(o′ , a′ , p′ , q ′ ) are different objects in cn such that a(cog) = a′ (cog) then either p = idle or p′ = idle. We notice that the initial configurations of core ABS programs are sound. The following statement guarantees that the property “there is at most one active object per cog” is an invariance of the transition relation. Proposition 1 If cn is sound and cn −→ cn′ then cn′ is sound as well. As an example of core ABS semantics, in Figure 7 we have detailed the transitions of the program in Example 2. The non-interested reader may safely skip it. Elena Giachino et al. class Math { Int fact_g(Int n){ Fut<Int> x ; Int m ; if (n==0) { return 1; } else { x = this!fact_g(n-1); m = x.get; return n*m; } } Int fact_ag(Int n){ Fut<Int> x ; Int m ; if (n==0) { return 1; } else { x = this!fact_ag(n-1); await x?; m = x.get; return n*m; } } Int fact_nc(Int n){ Fut<Int> x ; Int m ; Math z ; if (n==0) { return 1 ; } else { z = new cog Math(); x = z!fact_nc(n-1); m = x.get; return n*m; } } } 2.3 Samples of concurrent programs in core ABS Fig. 5 The class Math The core ABS code of two concurrent programs are discussed. These codes will be analysed in the following sections. Example 1 Figure 5 collects three different implementations of the factorial function in a class Math. The function fact_g is the standard definition of factorial: the recursive invocation this!fact_g(n-1) is followed by a get operation that retrieves the value returned by the invocation. Yet, get does not allow the task to release the cog lock; therefore the task evaluating this!fact_g(n-1) is fated to be delayed forever because its object (and, therefore, the corresponding cog) is the same as that of the caller. The function fact_ag solves this problem by permitting the caller to release the lock with an explicit await operation, before getting the actual value with x.get. An alternative solution is defined by the function fact_nc , whose code is similar to that of fact_g , except for that fact nc invokes z!fact_nc(n-1) recursively, where z is an object in a new cog. This means the task of z!fact_nc(n-1) may start without waiting for the termination of the caller. Programs that are particularly hard to verify are those that may manifest misbehaviours according to the schedulers choices. The following example discusses one case. Example 2 The class CpxSched of Figure 6 defines three methods. Method m1 asynchronously invokes m2 on its own argument y, passing to it the field x as argument . interface I { Fut<Unit> m1(I y); Unit m2(I z); Unit m3() ; } class CpxSched (I u) implements I { Fut<Unit> m1(I y) { Fut<Unit> h; Fut<Unit> g ; h = y!m2(u); g = u!m2(y); return g; } Unit m2(I z) { Fut<Unit> h ; h = z!m3(); h.get; } Unit m3(){ } } Fig. 6 The class CpxSched Then it asynchronously invokes m2 on the field x, passing its same argument y. Method m2 invokes m3 on the argument z and blocks waiting for the result. Method m3 simply returns. Next, consider the following main function: { I x; I y; I z; Fut<Fut<Unit>> w ; x = new CpxSched(null); y = new CpxSched(x); z = new cog CpxSched(null); A Framework for Deadlock Detection in core ABS w = y!m1(z); } The initial configuration is ob(start, ε, {l | s}, ∅)cog(start, start) where l = [destiny 7→ fstart , x 7→ ⊥, y 7→ ⊥, z 7→ ⊥, w 7→ ⊥] and s is the statement of the main function. The sequence of transitions of this configuration is illustrated in Figure 7, where s′ , s′′ , lo lo′ lo′′ lo′ ′ lo′′ = = = = = anull = ao = so ′ = so = s′′′ are the obvious sub-statements of the main function [destiny 7→ f ′′ , z 7→ o′′ , u 7→ ⊥, h 7→ ⊥] [destiny 7→ f, y 7→ o′′ , g 7→ ⊥, h 7→ ⊥] [destiny 7→ f ′ , z 7→ o, u 7→ ⊥, h 7→ ⊥] [destiny 7→ f ′′′′ ] [destiny 7→ f ′′′ ] [cog 7→ start, x 7→ null] [cog 7→ start, x 7→ o] h= y!m2(this.x); g= this.x!m2(y); return g; so′′ = h= z!m3(); h.get; We notice that the last configuration of Figure 7 is stuck, i.e. it cannot progress anymore. In fact, it is a deadlock according the forthcoming Definition 1. 2.4 Deadlocks The definition below identifies deadlocked configurations by detecting chains of dependencies between tasks that cannot progress. To ease the reading, we write – p[f.get]a whenever p = {l|s} and s is x = y.get; s′ and [[y]](a+l) = f ; – p[await f ]a whenever p = {l|s} and s is await e?; s′ and [[e]](a+l) = f ; – p.f whenever p = {l|s} and l(destiny) = f . Definition 1 A configuration cn is deadlocked if there are ob(o0 , a0 , p0 , q0 ), · · · , ob(on−1 , an−1 , pn−1 , qn−1 ) ∈ cn and p′i ∈ pi ∪ qi , with 0 ≤ i ≤ n − 1 such that (let + be computed modulo n in the following) 1. p′0 = p0 [f0 .get]a0 and if p′i [fi .get]ai then p′i = pi ; 2. if p′i [fi .get]ai or p′i [await fi ]ai then fut(fi , ⊥) ∈ cn and – either p′i+1 [fi+1 .get]ai+1 and p′i+1 = {li+1 |si+1 } and fi = li+1 (destiny); – or p′i+1 [await fi+1 ]ai+1 and p′i+1 = {li+1 |si+1 } and fi = li+1 (destiny); 7 – or p′i+1 = pi+1 = idle and ai+1 (cog) = ai+2 (cog) and p′i+2 [fi+2 .get]ai+2 (in this case pi+1 is idle, by soundness). A configuration cn is deadlock-free if, for every cn −→∗ cn′ , cn′ is not deadlocked. A core ABS program is deadlockfree if its initial configuration is deadlock-free. According to Definition 1, a configuration is deadlocked when there is a circular dependency between processes. The processes involved in such circularities are performing a get or await synchronisation or they are idle and will never grab the lock because another active process in the same cog will not return. We notice that, by Definition 1, at least one active process is blocked on a get synchronisation. We also notice that the objects in Definition 1 may be not pairwise different (see example 1 below). The following examples should make the definition clearer; the reader is recommended to instantiate the definition every time. 1. (self deadlock) ob(o1 , a1 , {l1 |x1 = e1 .get; s1 }, q1 ) ob(o2 , a2 , idle, q2 ∪ {l2 |s2 }) fut(f2 , ⊥), where [[e1 ]](a1 +l1 ) = l2 (destiny) = f2 and a1 (cog) = a2 (cog). In this case, the object o1 keeps the control of its own cog while waiting for the result of a process in o2 . This process cannot be scheduled because the corresponding cog is not released. A similar situation can be obtained with one object: ob(o1 , a1 , {l1 |x1 = e1 .get; s1 }, q1 ∪ {l2 |s2 }) fut(f2 , ⊥), where [[e1 ]](a1 +l1 ) = l2 (destiny) = f2 . In this case, the objects of the Definition 1 are ob(o1 , a1 , p1 , q1 ) ob(o1 , a1 , p2 , q2 ∪ {l2 |s2 }) where p′1 = p1 = {l1 |x1 = e1 .get; s1 }, p′2 = {l2 |s2 } and q1 = q2 ∪ {l2 |s2 }. 2. (get-await deadlock) ob(o1 , a1 , {l1 |x1 = e1 .get; s1 }, q1 ) ob(o2 , a2 , {l2 |await e2 ?; s2 }, q2 ) ob(o3 , a3 , idle, q3 ∪ {l3 |s3 }) where l3 (destiny) = [[e2 ]]a2 +l2 , l2 (destiny) = [[e1 ]]a1 +l1 , a1 (cog) = a3 (cog) and a1 (cog) 6= a2 (cog). In this case, the objects o1 and o2 have different cogs. However o2 cannot progress because it is waiting for a result of a process that cannot be scheduled (because it has the same cog of o1 ). 8 Elena Giachino et al. ob(start, ε, {l | s}, ∅) cog(start, start) −→2 (New-Object) and (Assign-Local) ob(start, ε, {l[x 7→ o] | y = new C(x); s′′ }, ∅) cog(start, start) ob(o, anull , idle, ∅) −→2 (New-Object) and (Assign-Local) ob(start, ε, {l[x 7→ o, y 7→ o′ ] | z = new cog C(null); s′′′ }, ∅) cog(start, start) ob(o, anull , idle, ∅) ob(o′ , ao , idle, ∅) −→2 (New-Cog-Object) and (Assign-Local) ob(start, ε, {l[x 7→ o, y 7→ o′ , z 7→ o′′ ] | w = y!m1(z);}, ∅) cog(start, start) ob(o, anull , idle, ∅) ob(o′ , ao , idle, ∅) ob(o′′ , [cog 7→ c, x 7→ null], idle, ∅) cog(c, o′′ ) −→ (Async-Call) ob(start, ε, {l[x 7→ o, y 7→ o′ , z 7→ o′′ ] | w = f;}, ∅) cog(start, start) ob(o, anull , idle, ∅) ob(o′ , ao , idle, ∅) ob(o′′ , [cog 7→ c, x 7→ null], idle, ∅) cog(c, o′′ ) invoc(o′ , f, m1, o′′ ) fut(f, ⊥) −→ (Bind-Mtd) ob(start, ε, {l[x 7→ o, y 7→ o′ , z 7→ o′′ ] | w = f;}, ∅) cog(start, start) ob(o, anull , idle, ∅) ob(o′ , ao , idle, {lo′ | so′ }) ob(o′′ , [cog 7→ c, x 7→ null], idle, ∅) cog(c, o′′ ) fut(f, ⊥) −→+ (Activate) and twice (Async-Call) and (Return) ob(start, ε, {l[x 7→ o, y 7→ o′ , z 7→ o′′ ] | w = f;}, ∅) cog(start, start) ob(o, anull , idle, ∅) ob(o′ , ao , idle, ∅) ob(o′′ , [cog 7→ c, x 7→ null], idle, ∅) cog(c, o′′ ) fut(f, f ′′ ) fut(f ′ , ⊥) fut(f ′′ , ⊥) (⋆) invoc(o′′ , f ′ , m2, o) invoc(o, f ′′ , m2, o′′ ) −→2 twice (Bind-Mtd) ob(start, ε, {l[x 7→ o, y 7→ o′ , z 7→ o′′ ] | w = f;}, ∅) cog(start, start) ob(o, anull , idle, {lo | so }) ob(o′ , ao , idle, ∅) ob(o′′ , [cog 7→ c, x 7→ null], idle, {lo′′ | so′′ }) cog(c, o′′ ) fut(f, f ′′ ) fut(f ′ , ⊥) fut(f ′′ , ⊥) −→+ twice (Activate) and twice (Async-Call) ob(start, ε, {l[x 7→ o, y 7→ o′ , z 7→ o′′ , w 7→ f ] | idle}, ∅) cog(start, o) ob(o, anull , {lo [h 7→ f ′′′ ] | h.get;s′o }, ∅) ob(o′ , ao , idle, ∅) ob(o′′ , [cog 7→ c, x 7→ null], {lo′′ [h 7→ f ′′′′ ] | h.get;s′o′′ }, ∅) cog(c, o′′ ) fut(f, f ′′ ) fut(f ′ , ⊥) fut(f ′′ , ⊥) invoc(o′′ , f ′′′ , m3, ε) fut(f ′ , ⊥) fut(f ′′′ , ⊥) invoc(o, f ′′′′ , m3, ε) fut(f ′′ , ⊥) fut(f ′′′′ , ⊥) −→2 twice (Bind-Mtd) ob(start, ε, {l[x 7→ o, y 7→ o′ , z 7→ o′′ , w 7→ f ] | idle}, ∅) cog(start, o) ob(o, anull , {lo [h 7→ f ′′′ ] | h.get;s′o }, {lo′ |skip;}) ob(o′ , ao , idle, ∅) ob(o′′ , [cog 7→ c, x 7→ null], {lo′′ [h 7→ f ′′′′ ] | h.get;s′o′′ }, {lo′ ′′ | skip;}) cog(c, o′′ ) fut(f, f ′′ ) fut(f ′ , ⊥) fut(f ′′ , ⊥) fut(f ′ , ⊥) fut(f ′′′ , ⊥) fut(f ′′ , ⊥) fut(f ′′′′ , ⊥) Fig. 7 Reduction of Example 2 3. (get-idle deadlock) ob(o1 , a1 , {l1 |x1 = e1 .get; s1 }, q1 ) ob(o2 , a2 , idle, q1 ∪ {l2 |s2 }) ob(o3 , a3 , {l3 |x3 = e3 .get; s3 }, q3 ) ob(o4 , a4 , idle, q4 ∪ {l4 |s4 }) ob(o5 , a5 , {l5 |x5 = e5 .get; s5 }, q5 ) fut(f1 , ⊥), fut(f2 , ⊥), fut(f4 , ⊥) (i) a dependency (c, c′ ) if ob(o, a, {l|x = e.get; s}, q), ob(o′ , a′ , p′ , q ′ ) ∈ cn with [[e]](a+l) = f and a(cog) = c and a′ (cog) = c′ and (a) either fut(f, ⊥) ∈ cn, l′ (destiny) = f and {l′ |s′ } ∈ p′ ∪ q ′ ; (b) or invoc(o′ , f, m, v) ∈ cn. where f2 = l2 (destiny) = [[e1 ]]a1 +l1 , f4 = l4 (destiny) = (ii) a dependency (c, c′ )w if [[e3 ]]a3 +l3 , f1 = l1 (destiny) = [[e5 ]]a5 +l5 and a2 (cog) = a3 (cog) and a4 (cog) = a5 (cog). ob(o, a, p, q), ob(o′ , a′ , p′ , q ′ ) ∈ cn A deadlocked configuration has at least one object that is stuck (the one performing the get instruction). This means that the configuration may progress, but future configurations will still have one object stuck. Proposition 2 If cn is deadlocked and cn −→ cn′ then cn′ is deadlocked as well. and {l|await e?; s} ∈ p ∪ q and [[e]](a+l) = f and (a) either fut(f, ⊥) ∈ cn, l′ (destiny) = f and {l′ |s′ } ∈ p′ ∪ q ′ ; (b) or invoc(o′ , f, m, v) ∈ cn. Given a set A of dependencies, let the get-closure of A, noted Aget , be the least set such that 1. A ⊆ Aget ; Definition 1 is about runtime entities that have no static counterpart. Therefore we consider a notion weaker 2. if (c, c′ ) ∈ Aget and (c′ , c′′ )[w] ∈ Aget then (c, c′′ ) ∈ Aget , where (c′ , c′′ )[w] denotes either the pair (c′ , c′′ ) than deadlocked configuration. This last notion will be or the pair (c′ , c′′ )w . used in the Appendices to demonstrate the correctness of the inference system in Section 4. A configuration contains a circularity if the getclosure of its set of dependencies has a pair (c, c). Definition 2 A configuration cn has A Framework for Deadlock Detection in core ABS Proposition 3 If a configuration is deadlocked then it has a circularity. The converse is false. Proof The statement is a straightforward consequence of the definition of deadlocked configuration. To show that the converse is false, consider the configuration ob(o1 , a1 , {l1 |x1 = e1 .get; s1 }, q1 ) ob(o2 , a2 , idle, q2 ∪ {l2 |await e2 ?; s2 }) ob(o3 , a3 , {l3 |return e3 }, q3 ) cn where l3 (destiny) = [[e1 ]]a1 +l1 , l1 (destiny) = [[e2 ]]a2 +l2 , c2 = a2 (cog) = a3 (cog) and c1 = a1 (cog) 6= c2 . This configuration has the dependencies {(c1 , c2 ), (c2 , c1 )w } whose get-closure contains the circularity (c1 , c1 ). However the configuration is not deadlocked. ⊓ ⊔ Example 3 The final configuration of Figure 7 is deadlocked according to Definition 1. In particular, there are two objects o and o′′ running on different cogs whose active processes have a get-synchronisation on the result of process in the other object: o is performing a get on a future f ′′′ which is lo′ ′′ (destiny), and o′′ is performing a get on a future f ′′′′ which is lo′ (destiny) and fut(f ′′′ , ⊥) and fut(f ′′′′ , ⊥). We notice that, if in the configuration (⋆) we choose to evaluate invoc(o′′ , f ′ , m2, o) when the evaluation of invoc(o, f ′′ , m2, o′′ ) has been completed (or conversely) then no deadlock is manifested. 3 Restrictions of core ABS in the current release of the contract inference system The contract inference system we describe in the next section has been prototyped. To verify its feasibility, the current release of the prototype addresses a subset of core ABS features. These restrictions permit to ease the initial development of the inference system and do not jeopardise its extension to the full language. Below we discuss the restrictions and, for each of them, either we explain the reasons why they will be retained in the next release(s) or we detail the techniques that will be used to remove them. (It is also worth to notice that, notwithstanding the following restrictions, it is still possible to verify large commercial cases, such as a core component of FAS discussed in this paper.) Returns. core ABS syntax admits return statements with continuations – see Figure 1 – that, according to the semantics, are executed after the return value has been delivered to the caller. These continuations can be hardly controlled by programmers and usually cause unpredictable behaviours, in particular as regards deadlocks. 9 To increase the precision of our analysis we assume that core ABS programs have empty continuations of return statements. We observe that this constraint has an exception at run-time: in order to define the semantics of synchronous method invocation, rules (Cog-Sync-Call) and (Self-Sync-Call) append a cont f continuation to statements in order to let the right caller be scheduled. Clearly this is the core ABS definition of synchronous invocation and it does not cause any misbehaviour. Fields assignments. Assignments in core ABS (as usual in object-oriented languages) may update the fields of objects that are accessed concurrently by other threads, thus could lead to indeterminate behaviour. In order to simplify the analysis, we constrain field assignments as follows. If the field is not of future type then we keep field’s record structure unchanging. For instance, if a field contains an object of cog a, then that field may be only updated with objects belonging to a (and this correspondence must hold recursively with respect to the fields of objects referenced by a). When the field is of a primitive type (Int, Bool, etc.) this constraint is equivalent to the standard type-correctness. It is possible to be more liberal as regards fields assignments. In [20] an initial study for covering full-fledged field assignments was undertaken using so-called union types (that is, by extending the syntax of future records with a + operator, as for contracts, see below) and collecting all records in the inference rule of the field assignment (and the conditional). When the field is of future type then we disallow assignments. In fact, assignments to such fields allow a programmer to define unexpected behaviours. Consider for example the following class Foo implementing I_Foo : class Foo(){ Fut<T> x ; Unit foo_m () { Fut<T> local ; I_Foo y = new cog Foo() ; I_Foo z = new cog Foo() ; local = y!foo_n(this) ; x = z!foo_n(this) ; await local? ; await x? } T foo_n(I_Foo x){ . . . } } 1 2 3 4 5 6 7 8 9 10 11 12 13 If the main function is { I_Foo x ; Fut<Unit> u ; Fut<Unit> v ; x = new cog Foo() ; u = x!foo_m() ; v = x!foo_m() ; } 14 15 16 17 18 19 10 then the two invocations in lines 18 and 19 run in parallel. Each invocation of foo_m invokes foo_n twice that apparently terminate when foo_m returns (with the two final await statements). However this may be not the case because the invocation of foo_n line 8 is stored in a field: consider that the first invocation of foo_m (line 18) starts executing, sets the field x with its own future f , and then, with the await statement in line 9, the second invocation of foo_m (line 19) starts. That second invocation replaces the content of the field x with its own future f ′ : at that point, the second invocation (line 19) will synchronise with f ′ before terminating, then the first invocation (line 18) will resume and also synchronised with f ′ before terminating. Hence, even after both invocations (line 18 and 19) are finished, the invocation of foo_n in line 8 may still be running. It is not too difficult to trace such residual behaviours in the inference system (for instance, by grabbing them using a function like unsync(Γ )). However, this extension will entangle the inference system and for this reason we decided to deal with generic field assignments in a next release. It is worth to recall that these restrictions does not apply to local variables of methods, as they can only be accessed by the method in which they are declared. Actually, the foregoing inference algorithm tracks changes of local variables. Interfaces. In core ABS objects are typed with interfaces, which may have several implementations. As a consequence, when a method is invoked, it is in general not possible to statically determine which method will be executed at runtime (dynamic dispatch). This is problematic for our technique because it breaks the association of a unique abstract behaviour with a method invocation. In the current inference system this issue is avoided by constraining codes to have interfaces implemented by at most one class. This restriction will be relaxed by admitting that methods have multiple contracts, one for every possible implementation. In turn, method invocations are defined as the union of the possible contracts a method has. Synchronisation on booleans. In addition to synchronisation on method invocations, core ABS permits synchronisations on Booleans, with the statement await e. When e is False, the execution of the method is suspended, and when it becomes True, the await terminates and the execution of the method may proceed. It is possible that the expression e refers to a field of an object that can be modified by another method. In this case, the await becomes synchronised with any method that may set the field to true. This subtle synchronisation Elena Giachino et al. pattern is difficult to infer and, for this reason, we have restricted the current release of DF4ABS. Nevertheless, the current release of DF4ABS adopts a naive solution for await statements on booleans, namely let programmers annotate them with the dependencies they create. For example, consider the annotated code: class ClientJob(...) { Schedules schedules = EmptySet; ConnectionThread thread; ... Unit executeJob() { thread = ...; thread!command(ListSchedule); [thread] await schedules != EmptySet; ... } } The statement await compels the task to wait for schedules to be set to something different from the empty set. Since schedules is a field of the object, any concurrent thread (on that object) may update it. In the above case, the object that will modify the boolean guard is stored in the variable thread . Thus the annotation [thread] in the await statement. The current inference system of DF4ABS is extended with rules dealing with await on boolean guard and, of course, the correctness of the result depends on the correctness of the await annotations. A data-flow analysis of boolean guards in await statements may produce a set of cog dependencies that can be used in the inference rule of the corresponding statement. While this is an interesting issue, it will not be our primary concern in the near future. Recursive object structures. In core ABS, like in any other object-oriented language, it is possible to define circular object structures, such as an object storing a pointer to itself in one of its fields. Currently, the contract inference system cannot deal with recursive structures, because the semi-unification process associates each object with a finite tree structure. In this way, it is not possible to capture circular definitions, such as the recursive ones. Note that this restriction still allows recursive definition of classes. We will investigate whether it is possible to extend the semi-unification process by associating regular terms [9] to objects in the semi-unification process. These regular terms might be derived during the inference by extending the core ABS code with annotations, as done for letting syntonisations on booleans. Discussion. The above restrictions do not severely restrict both programming and the precision of our analysis. As we said, despite these limitations, we were able A Framework for Deadlock Detection in core ABS to apply our tool to the industrial-sized case study FAS from SDL Fredhopper and detect that it was dead-lockfree. It is also worth to observe that most of our restrictions can be removed with a simple extension of the current implementation. The restriction that may be challenging to remove is the one about recursive object structures, which requires the extension of semiunification to such structures. We finally observe that other deadlock analysis tools have restrictions similar to those discussed in this section. For instance, DECO doesn’t allow futures to be passed around (i.e. futures cannot be returned or put in an object’s field) and constraints interfaces to be implemented by at most one class [13]. Therefore, while DECO supports the analysis in presence of field updates, our tool supports futures to be returned. 4 Contracts and the contract inference system The deadlock detection framework we present in this paper relies on abstract descriptions, called contracts, that are extracted from programs by an inference system. The syntax of these descriptions, which is defined in Figure 8, uses record names X, Y , Z, · · · , and future names f , f ′ , · · · . Future records r, which encode the values of expressions in contracts, may be one of the following: – a dummy value that models primitive types, – a record name X that represents a place-holder for a value and can be instantiated by substitutions, – [cog:c, x :r] that defines an object with its cog name c and the values for fields and parameters of the object, r, which specifies that accessing r requires – and c control of the cog c (and that the control is to be released once the method has been evaluated). The future record c r is associated with method invocations: c is the cog of the object on which the method is invoked. The name c in [cog:c, x:r] and c r will be called root of the future record. Contracts collect the method invocations and the dependencies inside statements. In addition to 0, 0.(c, c ′ ), and 0.(c, c ′ )w that respectively represent the empty behaviour, the dependencies due to a get and an await operation, we have basic contracts that deal with method invocations. There are several possibilities: – C.m r(r) → r′ (resp. C!m r(r) → r′ ) specifies that the method m of class C is going to be invoked synchronously (resp. asynchronously) on an object r, with arguments r, and an object r′ will be returned; – C!m r(r) → r′.(c, c ′ ) indicates that the current method execution requires the termination of method C!m 11 running on an object of cog c ′ in order to release the object of the cog c. This is the contract of an asynchronous method invocation followed by a get operation on the same future name. – C!m r(r) → r′.(c, c ′ )w , indicating that the current method execution requires the termination of method C.m running on an object of cog c ′ in order to progress. This is the contract of an asynchronous method invocation followed by an await operation, and, possibly but not necessarily, by a get operation. In fact, a get operation on the same future name does not add any dependency, since it is guaranteed to succeed because of the preceding await . The composite contracts # ′ and + ′ define the abstract behaviour of sequential compositions and conditionals, respectively. The contract k ′ require a separate discussion because it models parallelism, which is not explicit in core ABS syntax. We will discuss this issue later on. Example 4 As an example of contracts, let us discuss the terms: (a) C.m[cog:c1 , x:[cog:c2 ]]() → [cog:c1′ , x:[cog:c2 ]] # C.m[cog:c3 , x:[cog:c4 ]]() → [cog:c3′ , x:[cog:c4 ]]; (b) C!m[cog:c1 , x:[cog:c2 ]]() → [cog:c1′ , x:[cog:c2 ]].(c, c1 ) # C!m[cog:c3 , x:[cog:c4 ]]() → [cog:c3′ , x:[cog:c4 ]].(c, c3 )w . The contract (a) defines a sequence of two synchronous invocations of method m of class C. We notice that the cog names c′1 and c′3 are free: this indicates that C.m returns an object of a new cog. As we will see below, a core ABS expression with this contract is x.m() ; y.m() ;. The contract (b) defines an asynchronous invocation of C.m followed by a get statement and an asynchronous one followed by an await. The cog c is the one of the caller. A core ABS expression retaining this contract is u = x!m() ; w = u.get ; v = y!m() ; await v? ;. The inference of contracts uses two additional syntactic categories: x of future record values and z of typing values. The former one extends future records with future names, which are used to carry out the alias analysis. In particular, every local variable of methods and every object field and parameter of future type is associated to a future name. Assignments between these terms, such as x = y, amounts to copying future names instead of the corresponding values (x and y become aliases). The category z collects the typing values of future names, which are either (r, ), for unsynchronised futures, or (r, 0)X , for synchronised ones (see the comments below). 12 Elena Giachino et al. r ::= r | X | [cog:c, x: ] | c r future record rr ::= 0 | 0.(c, c ′ ) | 0.(c, c ′ )w | C.m ( ) → | C!m ( ) → ′.(c, c ′ )w | # | + | rr r r′ rr | C!m ( ) → k r′ rr | C!m ( ) → x ::= r | f z ::= (r, ) | (r, 0)X r′.(c, c ′ ) contract extended future record future reference values Fig. 8 Syntax of future records and contracts. The abstract behaviour of methods is defined by method contracts r(s) {h , ′ i} r′ , where r is the future record of the receiver of the method, s are the future records of the arguments, h , ′ i is the abstract behaviour of the body, where is called synchronised contract and ′ is called unsynchronised contract, and r′ is the future record of the returned object. Let us explain why method contracts use pairs of contracts. In core ABS, invocations in method bodies are of two types: (i) synchronised, that is the asynchronous invocation has a subsequent await or get operation in the method body and (ii) unsynchronised, the asynchronous invocation has no corresponding await or get in the same method body. (Synchronous invocations can be regarded as asynchronous invocations followed by a get.) For example, let x = u!m() ; await x? ; y = v!m() ; be the main function of a program (the declarations are omitted). In this statement, the invocation u!m() is synchronised before the execution of v!m(), which is unsynchronised. core ABS semantics tells us that the body of u!m() is performed before the body of v!m(). However, while this ordering holds for the synchronised part of m, it may not hold for the unsynchronised part. In particular, the unsynchronised part of u!m() may run in parallel with the body of v!m(). For this reason, in this case, our inference system returns the pair hC!m [cog:c′ ]( ) → .(c, c′ )w , C!m [cog:c′′ ]( ) → i where c, c′ and c′′ being the cog of the caller, of u and v, respectively. Letting C!m [cog:c′ ]( ) → = h u , ′u i and C!m [cog:c′′ ]( ) → = h v , ′v i, one has (see Sections 5 and 6) hC!m [cog:c′ ]( ) → .(c, c′ )w , C!m [cog:c′′ ]( ) → i = h u.(c, c′ )w , ′u k ( v # ′v )i that adds the dependency (c, c′ )w to the synchronised contract of u!m() and makes the parallel (the k operator) of the unsynchronised contract of u!m() and the contract of v!m(). Of course, in alternative to separating synchronised and unsynchronised contracts, one might collect all the dependencies in a unique contract. This will imply that the dependencies in different configurations will be gathered in the same set, thus significantly reducing the precision of the analyses in Sections 5 and 6. The above discussion also highlights the need of contracts k ′ . In particular, this operator models parallel behaviours, which is not a first class operator in core ABS, while it is central in the semantics (the objects in the configurations). We illustrate the point with a statement similar to the above one, where we have swapped the second and third instruction x = u!m() ; y = v!m() ; await x? ; According to core ABS semantics, it is possible that the bodies of u!m() and of v!m() run in parallel by interleaving their executions. In fact, in this case, our inference system returns the pair of contracts (we keep the same notations as before) h C!m [cog:c′ ]( ) → .(c, c′ )w k C!m [cog:c′′ ]( ) → C!m [cog:c′′ ]( ) → , i which turns out to be equivalent to C!m1 [cog:c′ ]( ) → .(c, c′ )w k C!m2 [cog:c′ ]( ) → (see Sections 5 and 6). The subterm r(s) of the method contract is called header ; r′ is called returned future record. We assume that cog and record names in the header occur linearly. Cog and record names in the header bind the cog and record names in and in r′ . The header and the returned future record, written r(s) → r′ , are called contract signature. In a method contract r(s) {h , ′ i} r′ , cog and record names occurring in or ′ or r′ may be not bound by header. These free names correspond to new cog instructions and will be replaced by fresh cog names during the analysis. A Framework for Deadlock Detection in core ABS 13 expressions and addresses (T-Fut) (T-Var) x Γ ⊢c x : x (T-Field) z Γ ⊢c f : z Γ (f ) = Γ (x) = x 6∈ dom(Γ ) Γ (this.x) = Γ ⊢c x : r (T-Value) r Γ ⊢c e : (T-Val) e (T-Pure) Γ ⊢c e : primitive value or arithmetic-and-bool-exp r r Γ ⊢c f : ( , )[X] Γ ⊢c e : f r r Γ ⊢c e : , 0 ⊲ true | Γ Γ ⊢c e : expressions with side effects (T-Get) Γ ⊢c x : f r Γ ⊢c f : ( , ) Γ ⊢c x.get : X, .(c, c ) k unsync(Γ (T-NewCog) fields(C) = T x X, c ′ fresh ′ ′ ) ⊲ (T-Get-tick) r r Γ ⊢c x.get : X, 0 ⊲ r = c ′ Γ ′ = Γ [f 7→ ( , 0)X ] r=c ′ X|Γ Γ ⊢c x : f ′ Γ ⊢c f : ( , )X (T-New) r Γ ⊢c e : param(C) = T ′ x′ X, c ′ fresh r Γ ⊢c new cog C(e) : [cog:c ′ , x:X, x′ : ], 0 ⊲ true | Γ (T-AInvk) class(types(e)) = C ′ (T-SInvk) class(types(e)) = C rs r X |Γ X fresh Γ ⊢c new C(e) : [cog:c, x:X, x′ : ], 0 ⊲ true | Γ r s Γ ⊢c e : Γ ⊢c e : fields(C) ∪ param(C) = T x Γ ⊢c e!m(e) : f, 0 ⊲ [cog:c , x:X] = r Γ ⊢c e : param(C) = T ′ x′ fields(C) = T x X, c ′ fresh X, X, c ′ , f fresh r ∧ C.m  r(s) → X | Γ [f 7→ (c ′ r s Γ ⊢c e : Γ ⊢c e : fields(C) ∪ param(C) = T x ′ Γ ⊢c e.m(e) : X, C.m ( ) → X k unsync(Γ ) ⊲ [cog:c , x:X] = rs X, C!m ( ) → X)] X, X fresh r ∧ C.m  r(s) → X | Γ Fig. 9 Contract inference for expressions and expressions with side effects. 4.1 Inference of contracts Contracts are extracted from core ABS programs by means of an inference algorithm. Figures 9 and 11 illustrate the set of rules. The following auxiliary operators are used: – fields(C) and param(C) respectively return the sequence of fields and parameters and their types of a class C. Sometime we write fields(C) = T x, Fut<T ′ > x′ to separate fields with a non-future type by those with future types. Similarly for parameters; – types(e) returns the type of an expression e, which is either an interface (when e is an object) or a data type; – class(I) returns the unique (see the restriction Interfaces in Section 3) class implementing I; and – mname(M ) returns the sequence of method names in the sequence M of method declarations. The inference algorithm uses constraints U, which are defined by the following syntax U ::= true | c = c′ | r = r′ | r(r) → s  r′ (r′ ) → s′ | U ∧U where true is the constraint that is always true; r = r′ is a classic unification constraint between terms; r(r) → s  r′ (r′ ) → s′ is a semi-unification constraint; the con- straint U ∧ U ′ is the conjunction of U and U ′ . We use semi-unification constraints [21] to deal with method invocations: basically, in r(r) → s  r′ (r′ ) → s′ , the left hand side of the constraint corresponds to the method’s formal parameter, r being the record of this, r being the records of the parameters and r′ being the record of the returned value, while the right hand side corresponds to the actual parameters of the call, and the actual returned value. The meaning of this constraint is that the actual parameters and returned value must match the specification given by the formal parameters, like in a standard unification: the necessity of semi-unification appears when we call several times the same method. Indeed, there, unification would require that the actual parameters of the different calls must all have the same records, while with semi-unification all method calls are managed independently. The judgments of the inference algorithm have a typing context Γ mapping variables to extended future records, future names to future name values and methods to their signatures. They have the following form: – Γ ⊢c e : x for pure expressions e and Γ ⊢c f : z for future names f , where c is the cog name of the 14 Elena Giachino et al. statements (T-Field-Record) x 6∈ dom(Γ ) Γ ⊢c z : T-Skip Γ ⊢c skip : 0 ⊲ true | Γ Γ ⊢c x = z : Γ (this.x) = ′ , ⊲ U | Γ′ r ⊲ U∧ Γ ⊢c x = z : (T-Await) r Γ ⊢c x = z : (T-Var-FutRecord) Γ ⊢c z : f ′ , ⊲ U | Γ′ ′ ⊲ U | Γ [x 7→ f ] r r′ ] r ⊲ U | Γ [f 7→ ( , 0)] (T-Await-Tick) r ⊲ U | Γ ′ [x 7→ ⊲ U | Γ′ ′ Γ ⊢c x = z : Γ ⊢c e : f Γ ⊢c f : ( , ) X, c ′ fresh Γ ′ = Γ [f 7→ ( , 0)X ] Γ ⊢c await e? : .(c, c ′ )w k unsync(Γ ′ ) ⊲ = c ′ X |Γ′ r r Γ ⊢c z : , Γ (x) = f ′ r Γ (x) = Γ ⊢c z : ′ , ⊲ U | Γ ′ r = r′ | Γ ′ (T-Var-Future) Γ (x) = f (T-Var-Record) r r Γ ⊢c e : f Γ ⊢c f : ( , )X Γ ⊢c await e? : 0 ⊲ = c ′ r X, c ′ fresh X |Γ (T-If) U =  ^ Γ ⊢c e : Bool ⊢c s1 : 1 ⊲ U1 | Γ1 Γ⊢c s2 : 2 ⊲ U2 | Γ2   Γ^ Γ1 (x) = Γ2 (x) ∧ Γ1 (Γ1 (x)) = Γ2 (Γ2 (x)) Γ ′ = Γ1 + Γ2 |{f x∈dom(Γ ) | f ∈Γ / 2 (Fut(Γ ))} x∈Fut(Γ ) Γ ⊢c if e { s1 } else { s2 } : 1 + 2 ⊲ U1 ∧ U2 ∧ U | Γ ′ (T-Seq) (T-Return) Γ ⊢c s1 : 1 ⊲ U1 | Γ1 Γ ⊢c s 1 ; s 2 : 1 # r r Γ (destiny) = ′ Γ ⊢c e : Γ ⊢c return e : 0 ⊲ = ′ | Γ Γ1 ⊢c s2 : 2 ⊲ U2 | Γ2 2 ⊲ U1 ∧ U2 | Γ2 r r Fig. 10 Contract inference for statements. object executing the expression and x and z are their inferred values. – Γ ⊢c z : r, ⊲ U | Γ ′ for expressions with side effects z, where c, and x are as for pure expressions e, is the contract for z created by the inference rules, U is the generated constraint, and Γ ′ is the environment Γ with updates of variables and future names. We use the same judgment for pure expressions; in this case = 0, U = true and Γ ′ = Γ . – for statements s: Γ ⊢c s : ⊲ U | Γ ′ where c, and U are as before, and Γ ′ is the environment obtained after the execution of the statement. The environment may change because of variable updates. Since Γ is a function, we use the standard predicates x ∈ dom(Γ ) or x 6∈ dom(Γ ). Moreover, given a function Γ , we define Γ [x 7→ x] to be the following function Γ [x 7→ x](y) =  x if y = x Γ (y) otherwise We also let Γ |{x1 ,··· ,xn } be the function Γ |{x1 ,··· ,xn } (y) =  Γ (y) undefined if y ∈ {x1 , · · · , xn } otherwise Moreover, provided that dom(Γ ) ∩ dom(Γ ′ ) = ∅, the environment Γ + Γ ′ be defined as follows  def Γ (x) if x ∈ dom(Γ ) (Γ + Γ ′ )(x) = Γ ′ (x) if x ∈ dom(Γ ′ ) Finally, we write Γ (this.x) = x whenever Γ (this) = [cog:c, x : x, x : x′ ] and we let def Fut(Γ ) = {x | Γ (x) is a future name} def unsync(Γ ) = where { (r, ′ )}. 1, · · · 1 , k ··· k n} = { n ′ | there are f, r : Γ (f ) = The inference rules for expressions and future names are reported in Figure 9. They are straightforward, except for (T-Value) that performs the dereference of variables and return the future record stored in the future name of the variable. (T-Pure) lifts the judgment of a pure expression to a judgment similar to those for expressions with side-effects. This expedient allows us to simplify rules for statements. Figure 9 also reports inference rules for expressions with side effects. Rule (T-Get) deals with the x.get synchronisation primitive and returns the contract .(c, c ′ ) k unsync(Γ ), where is stored in the future name of x and (c, c ′ ) represents a dependency between the cog of the object executing the expression and the root of X is used the expression. The constraint r = c ′ to extract the root c′ of r. The contract may have = C!m r(s) → r′ or (ii) = two shapes: either (i) 0. The subterm unsync(Γ ) lets us collect all the contracts in Γ that are stored in future names that are not check-marked. In fact, these contracts correspond A Framework for Deadlock Detection in core ABS to previous asynchronous invocations without any corresponding synchronisation (get or await operation) in the body. The evaluations of these invocations may interleave with the evaluation of the expression x.get. For this reason, the intended meaning of unsync(Γ ) is that the dependencies generated by the invocations must be collected together with those generated by .(c, c ′ ). We also observe that the rule updates the environment by check-marking the value of the future name of x and by replacing the contract with 0 (because the synchronisation has been already performed). This allows subsequent get (and await) operations on the same future name not to modify the contract (in fact, in this case they are operationally equivalent to the skip statement) – see (T-Get-Tick). Rule (T-NewCog) returns a record with a new cog name. This is in contrast with (T-New), where the cog of the returned record is the same of the object executing the expression 2 . Rule (T-AInvk) derives contracts for asynchronous invocations. Since the dependencies created by these invocations influence the dependencies of the synchronised contract only if a subsequent get or await operation is performed, the rule stores the invocation into a fresh future name of the environment and returns the contract 0. This models core ABS semantics that lets asynchronous invocations be synchronised by explicitly getting or awaiting on the corresponding future variable, see rules (T-Get) and (T-Await). The future name storing the invocation is returned by the judgment. On the contrary, in rule (T-SInvk), which deals with synchronous invocations, the judgement returns a contract that is the invocation (because the corresponding dependencies must be added to the current ones) in parallel with the unsynchronised asynchronous invocations stored in Γ . The inference rules for statements are collected in Figure 10. The first three rules define the inference of contracts for assignment. There are two types of assignments: those updating fields and parameters of the this object and the other ones. For every type, we need to address the cases of updates with values that are expres2 It is worth to recall that, in core ABS, the creation of an object, either with a new or with a new cog, amounts to executing the method init of the corresponding class, whenever defined (the new performs a synchronous invocation, the new cog performs an asynchronous one). In turn, the termination of init triggers the execution of the method run, if present. The method run is asynchronously invoked when init is absent. Since init may be regarded as a method in core ABS, the inference system in our tool explicitly introduces a synchronous invocation to init in case of new and an asynchronous one in case of new cog. However, for simplicity, we overlook this (simple) issue in the rules (T-New) and (T-NewCog), acting as if init and run are always absent. 15 sions (with side effects) (rules (T-Field-Record) and (TVar-Record)), or future names (rule (T-Var-Future)). Rules for fields and parameters updates enforce that their future records are unchanging, as discussed in Section 3. Rule (T-Var-Future), define the management of aliases: future variables are always updated with future names and never with future names’ values. Rule (T-Await) and (T-AwaitTick) deal with the await synchronisation when applied to a simple future lookup x?. They are similar to the rules (T-Get) and (T-Get-Tick). Rule (T-If) defines contracts for conditionals. In this case we collect the contracts 1 and 2 of the two branches, with the intended meaning that the dependencies defined by 1 and 2 are always kept separated. As regards the environments, the rule constraints the two environments Γ1 and Γ2 produced by typing of the two branches to be the same on variables in dom(Γ ) and on the values of future names bound to variables in Fut(Γ ). However, the two branches may have different unsynchronised invocations that are not bound to any variable. The environment Γ1 + Γ2 |{f | f ∈Γ / 2 (Fut(Γ ))} allows us to collect all them. Rule (T-Seq) defines the sequential composition of contracts. Rule (Return) constrains the record of destiny, which is an identifier introduced by (T-Method), shown in Figure 11, for storing the return record. The rules for method and class declarations are defined in Figure 11. Rule (T-Method) derives the method contract of T m (T x){T ′ u; s} by typing s in an environment extended with this, destiny (that will be set by return statements, see (T-Return)), the arguments x, and the local variables u. In order to deal with alias analysis of future variables, we separate fields, parameters, arguments and local variables with future types from the other ones. In particular, we associate future names to the former ones and bind future names to record variables. As discussed above, the abstract behaviour of the method body is a pair of contracts, which is h , unsync(Γ ′′ )i for (T-Method). This term unsync(Γ ′′ ) collects all the contracts in Γ ′′ that are stored in future names that are not check-marked. In fact, these contracts correspond to asynchronous invocations without any synchronisation (get or await operation) in the body. These invocations will be evaluated after the termination of the body – they are the unsynchronised contract. The rule (T-Class) yields an abstract class table that associates a method contract with every method name. It is this abstract class table that is used by our analysers in Sections 5 and 6. The rule (T-Program) derives the contract of a core ABS program by typing the main function in the same way as it was a body of a method. 16 Elena Giachino et al. (T-Method) fields(C) ∪ param(C) = Tf x Fut<Tf′ > x′ ′ y ′ :f ′ c, X, X ′ , Y , Y ′ , W , W ′ , f, f ′ , f ′′ , Z fresh w ′ :f ′′ Γ = y:Y + + w:W + + f :(X ′ , 0) + f ′ :(Y ′ , 0) + f ′′ :(W ′ , 0) Γ + this : [cog:c, x:X, x:f] + Γ ′ + destiny : Z ⊢c s : ⊲ U | Γ ′′ T , Tf , Tl are not future types C, Γ ⊢ T m (T y, Fut<T ′ > y ′ ){Tl w; Fut<Tl′ > w ′ ; s} : (T-Class) C, Γ ⊢ M : Γ ⊢ class C(T x) {T ′ x′ ; [cog : c, x:X, x′ :X ′ ](Y , Y ′ ){h , unsync(Γ ′′ )i} Z ⊲ U ∧ [cog : c, x:X, x′ :X ′ ](Y , Y ′ ) → Z = C.m C⊲U M} : C.mname(M ) 7→ C⊲U (T-Program) Γ ⊢C:S ⊲ U X, X ′ , f fresh Γ + x:X + x′ :f + f :(X ′ , 0) ⊢start s : Γ ⊢ I C {T x; Fut<T ′ > x′ ; s} : S, h , unsync(Γ ′ ⊲ U | Γ′ T are not future types )i ⊲ U ∧ U Fig. 11 Contract rules of method and class declarations and programs. The contract class tables of the classes in a program derived by the rule (Class), will be noted cct. We will address the contract of m of class C by cct(C.m). In the following, we assume that every core ABS program is a triple (ct, {T x ; s}, cct), where ct is the class table, {T x ; s} is the main function, and cct is its contract class table. By rule (Program), analysing (the deadlock freedom of) a program, amounts to verifying the contract of the main function with a record for this which associates a special cog name called start to the cog field (start is intended to be the cog name of the object start ). Example 5 The methods of Math in Figure 5 have the following contracts, once the constraints are solved (we always simplify # 0 into ): – fact g has contract [cog:c]( ) {h0 + Math!fact g [cog:c]( ) → .(c, c), 0i} . any dependency because the future name has a checkmarked value in the environment. In fact, in this case, the success of get is guaranteed, provided the success of the await synchronisation. – fact nc has contract [cog:c]( ) {h0+Math!fact nc [cog:c ′ ]( ) → .(c, c ′ ), 0i} . This method contract differs from the previous ones in that the receiver of the recursive invocation is a free name (i.e., it is not bound by c in the header). This because the recursive invocation is performed on an object of a new cog (which is therefore different from c). As a consequence, the dependency added by the get relates the cog c of this with the new cog c ′ . Example 6 Figure 12 displays the contracts of the methods of class CpxSched in Figure 6. The name c in the header refers to the cog name associated with this in the code, and binds the According to the contract of the main function, the occurrences of c in the body. The contract body two invocations of m2 are second arguments of k operahas a recursive invocation to fact g, which is pertors. This will give rise, in the analysis of contracts, to formed on an object in the same cog c and followed the union of the corresponding cog relations. by a get operation. This operation introduces a dependency (c, c). We observe that, if we replace the We notice that the inference system of contracts disstatement Fut<Int> x = this!fact_g(n-1) in fact g cussed in this section is modular because, when prowith Math z = new Math() ; Fut<Int> x = z!fact_g(n-1), grams are organised in different modules, it partially we obtain the same contract as above because the supports the separate contract inference of modules with new object is in the same cog as this. a well-founded ordering relation (for example, if there – fact ag has contract are two modules, classes in the second module use definitions or methods in the first one, but not conversely). w [cog:c]( ) {h0 + Math!fact ag [cog:c]( ) → .(c, c) , 0i} . In this case, if a module B includes a module A then a In this case, the presence of an await statement patch to a class of B amounts to inferring contracts for w in the method body produces a dependency (c, c) . B only. On the contrary, a patch to a class of A may also The subsequent get operation does not introduce require a new contract inference of B. A Framework for Deadlock Detection in core ABS 17 – method m1 has contract [cog:c, x : [cog:c′ , x : X]]([cog:c′′ , x : Y ]) {h0, i} c′ where . = CpxSched!m2 [cog:c′′ , x : Y ]([cog:c′ , x : X]) → c′′ k CpxSched!m2 [cog:c′ , x : X]([cog:c′′ , x : Y ]) → c′ – method m2 has contract [cog:c, x : X]([cog:c′ , x : Y ]) {hCpxSched!m3 [cog:c′ , x : Y ]( ) → – method m3 has contract .(c, c′ ), 0i} . [cog:c, x : X]( ) {h0, 0i} . Fig. 12 Contracts of CpxSched. 4.2 Correctness results 5 The fix-point analysis of contracts In our system, the ill-typed programs are those manifesting a failure of the semiunification process, which does not address misbehaviours. In particular, a program may be well-typed and still manifest a deadlock. In fact, in systems with behavioural types, one usually demonstrates that The first algorithm we define to analyse contracts uses the standard Knaster-Tarski fixpoint technique. We first give an informal introduction of the notion used in the analysis, and start to formally define our algorithm in Subsection 5.1 (a simplified version of the algorithm may be found in [17], see also Section 8). 1. in a well-typed program, every configuration cn has a behavioural type, let us call it bt(cn); 2. if cn → cn′ then there is a relationship between bt(cn) and bt(cn′ ); 3. the relationship in 2 preserves a given property (in our case, deadlock-freedom). Based on a contract class table and a main contract (both produced by the inference system in Section 4), our fixpoint algorithm generates models that encode the dependencies between cogs that may occur during the program’s execution. These models, called lams (an acronym for deadLock Analysis Models [18,19] are sets of relations between cog names, each relation representing a possible configuration of program’s execution. Consider for instance the main function: Item 1, in the context of the inference system of this section, means that the program has a contract class table. Its proof needs a contract system for configurations, which we have defined in Appendix A. The theorem corresponding to this item is Theorem 3. Item 2 requires the definition of a relation between contracts, called later stage relation in Appendix A. This later stage relation is a syntactic relationship between contracts whose basic law is that a method invocation is larger than the instantiation of its method contract (the other laws, except 0 E and i E 1 + 2 , are congruence laws). The statement that relates the later stage relationship to core ABS reduction is Theorem 4. It is worth to observe that all the theoretical development up-to this point are useless if the later stage relation conveyed no relevant property. This is the purpose of item 3, which requires the definition of contract models and the proof that deadlock-freedom is preserved by the models of contracts in later stage relation. The reader can find the proofs of these statements in the Appendices B and C (they correspond to the two analysis techniques that we study). { I x ; I y ; Fut<Unit> f ; x = new cog C() ; y = new cog C() ; f = x!m() ; await f? ; f = y!m() ; await f? ; } In this case, the configurations of the program may be represented by two relations: one containing a dependency between the cog name start and the cog name of x and the other containing a dependency between start and the cog name of y. This would be represented by the following lam (where cx and cy respectively being the cog names of x and y): [(c, cx )w ], [(c, cy )w ] (in order to ease the parsing of the formula, we are representing relations with the notation [ · ] and we have removed the outermost curly brackets). Our algorithm, being a fixpoint analysis, returns the lam of a program by computing a sequence of approximants. In particular, the algorithm performs the following steps: 18 Elena Giachino et al. 1. compute a new approximant of the lam of every method using the abstract class table and the previously computed lams; 2. reiterate step 1 till a fixed approximant – say n (if a fixpoint is found before, go to 4); 3. when the n-th approximant is computed then saturate, i.e. compute the next approximants by reusing the same cog names (then a fixpoint is eventually found); 4. replace the method invocations in the main contract with the corresponding values; and 5. analyse the result of 4 by looking for a circular dependency in one of the relations of the computed lam (in such case, a possible deadlock is detected). The critical issue of our algorithm is the creation of fresh cog names at each step 1, because of free names in method contracts (that correspond to new cogs created during method’s execution). For example, consider the contract of Math.fact nc that has been derived in Section 4 Math.fact nc [cog:c]( ){ h0 + Math!fact nc [cog:c ′ ]( ) → .(c, c ′ ), 0i } According to our definitions, the cog name c′ is free. In this case, our fixpoint algorithm will produce the following sequence of lams when computing the model of Math.fact nc[cog:c0 ]( ): approximant approximant approximant ··· approximant ··· 0 : 1 : 2 : h[∅], 0i h[(c0 , c1 )], 0i h[(c0 , c1 ), (c1 , c2 )], 0i n: h[(c0 , c1 ), (c1 , c2 ), · · · (cn−1 , cn )], 0i While every lam in the above sequence is strictly larger than the previous one, an upper bound element cannot be obtained by iterating the process. Technically, the lam model is not a complete partial order (the ascending chains of lams may have infinite length and no upper bound). In order to circumvent this issue and to get a decision on deadlock-freedom in a finite number of steps, we use a saturation argument. If the n-th approximant is not a fixpoint, then the (n + 1)-th approximant is computed by reusing the same cog names used by the n-th approximant (no additional cog name is created anymore). Similarly for the (n + 2)-th approximant till a fixpoint is reached (by straightforward cardinality arguments, the fixpoint does exist, in this case). This fixpoint is called the saturated state. For example, for Math.fact nc[cog:c0 ]( ), the n-th approximant returns the pairs of lams h[(c0 , c1 ), · · · , (cn−1 , cn )], 0i . Saturating at this stage yields the lam h[(c0 , c1 ), · · · , (cn−1 , cn ), (c1 , c1 )], 0i that contains a circular dependency – the pair (c1 , c1 ) – revealing a potential deadlock in the corresponding program. Actually, in this case, this circularity is a false positive that is introduced by the (over)approximation: the original code never manifests a deadlock. Note finally that a lam is the result of the analysis of one contract. Hence, to match the structures that are generated during the type inference, our analysis uses three extensions of lams: (i) a pair of lams hL, L′ i for analysing pairs of contracts h , ′ i; (ii) parameterised pair of lams λc.hL, L′ i for analysing methods: here, c are the cog names in the header of the method (the this object and the formal parameters), and hL, L′ i is the result of the analysis of the contract pair typing the method; and (iii) lam tables (· · · , λci .hLi , L′i i, · · · ) that maps each method in the program to its current approximant. We observe that λc.hL, L′ i is hL, L′ i whenever c is empty. 5.1 Lams and lam operations The following definition formally introduce the notion of lam. Definition 3 A relation on cog names is a set of pairs either of the form (c1 , c2 ) or of the form (c1 , c2 )w , generically represented as (c1 , c2 )[w] . We denote such relation by [(ci0 , ci1 )[w] , · · · , (cin−1 , cin )[w] ]. A lam, ranged over L, L′ , · · · , is a set of relations on cog names. Let 0 be the lam [∅] and let cog names(L) be the cog names occurring in L. The pre-order relation between lam, pair of lams and parameterised pair of lam, noted ⋐ is defined below. This pre-order is central to prove that our algorithm indeed computes a fix point. Definition 4 Let L and L′ be lams and κ be an injective function between cog names. We note L ⋐κ L′ iff for every L ∈ L there is L′ ∈ L′ with κ(L) ⊆ L′ . Let – λc.hL1 , L′1 i ⋐κ λc.hL2 , L′2 i iff κ is the identity on c and hL1 , L′1 i ⋐κ hL2 , L′2 i. Let also ⋐ be the relation – L ⋐ L′ iff there is κ such that L ⋐κ L′ ; – λc.hL1 , L′1 i ⋐ λc.hL2 , L′2 i iff there is κ such that λc.hL1 , L′1 i ⋐κ λc.hL2 , L′2 i. A Framework for Deadlock Detection in core ABS def LN(c, c ′ )[w] = {L ∪ {(c, c ′ )[w] } | L ∈ L}. [extension] ′ def LkL = {L ∪ L′ | L ∈ L and L′ ∈ L′ } [parallel] [extension (on pairs of lams)] [parallel (on pairs of lams)] [sequence (on pairs of lams)] [plus (on pairs of lams)] 19 def hL, L′ iN(c, c ′ )[w] = hLN(c, c ′ )[w] , L′ i def hL1 , L′1 i k hL2 , L′2 i = h(L1 ∪ L′1 )k(L2 ∪ L′2 ), 0i def hL1 , L′1 i # hL2 , L′2 i =   hL1 , L′1 kL′2 i  hL1 ∪ (L2 kL′1 ), L′1 kL′2 i if L2 = 0 otherwise def hL1 , L′1 i + hL2 , L′2 i = hL1 ∪ L2 , L′1 ∪ L′2 i. Fig. 13 Lam operations. The set of lams with the ⋐ relation is a pre-order with a bottom element, which is either 0 or λc.h0, 0i or (· · · , λci .h0, 0i, · · · ) according to the domain we are considering. In Figure 13 we define a number of basic operations on the lam model that are used in the semantics of contracts. The relevant property for the following theoretical development is the one below. We say that an operation is monotone if, whenever it is applied to arguments in the pre-order relation ⋐, it returns values in the same pre-order relation ⋐). The proof is straightforward and therefore omitted. Proposition 4 The operations of extension, parallel, sequence and plus are monotone with respect to ⋐. Ad′ ′ ditionally, if L ⋐ L′ then L[c /c] ⋐ L′ [c /c]. 5.2 The finite approximants of abstract method behaviours. As explained above, the lam model of a core ABS program is obtained by means of a fixpoint technique plus a saturation applied to its contract class table. In particular, the lam model of the class table is a lam table that maps each method C.m of the program to λcC.m .hLC.m , L′C.m i where cC.m = ⌈r, s⌉, with r(s) being the header of the method contract of C.m. The definition of ⌈r, s⌉ is given in Figure 14 (we recall that names in headers occur linearly). The following definition presents the algorithm used to compute the next approximant of a method class table. Definition 5 Let cct be a contract class table of the form  · · · , C.m 7→ rC.m (sC.m ) {h C.m , ′C.m i} r′C.m , · · · 1. the approximant 0 is defined as  · · · , λ(⌈rC.m , sC.m ⌉).h0, 0i, · · · ;  2. let L = · · · , λ⌈rC.m , sC.m ⌉.hLC.m , L′C.m i, · · · be the nth approximant; the n+1-th approximant is defined  i, · · · where hL′′C.m , L′′′ as · · · , λ⌈rC.m , sC.m ⌉.hL′′C.m , L′′′ C.m C.m i ′ = C.m (L)c # C.m (L)c with c being the cog of rC.m and the function (L)c being defined by structural induction in Figure 16. It is worth to notice that there are two rules for synchronous invocations in Figure 16: (L-SInvk) dealing with synchronous invocations on the same cog name of the caller – the index c of the transformation –, (LRSInvk) dealing with synchronous invocations on different cog names. Let     0 · · · , λcC,m .hLC,m 0 , L′C,m i, · · · = · · · , λcC,m .h0, 0ii, · · · , and let   0 · · · , λcC,m .hLC,m 0 , L′C,m i, · · · ,   1 · · · , λcC,m .hLC,m 1 , L′C,m i, · · · ,   2 · · · , λcC,m .hLC,m 2 , L′C,m i, · · · , · · · be the sequence obtained by the algorithm of Definition 5 (this is the standard Knaster-Tarski technique). This sequence is non-decreasing (according to ⋐) because it is defined as a composition of monotone operators, see Proposition 5. Because of the creation of new cog names at each iteration, the fixpoint of the above sequence may not exist. We have already discussed the example of Math.fact nc. In order to let our analysis terminate, after a given approximant, we run the Knaster-Tarski technique using a different semantics for the operations (L-SInvk), (L-RSInvk), (LAInvk), and (L-GAinvk) (these are the rules where cog names may be created). In particular, when these operations are used at approximants larger than n, the renaming of free variables is disallowed. That is, the ′ substitutions [bD,n /bD,n ] in Figure 16 are removed. It 20 Elena Giachino et al. def def ⌈⌉ = ε ⌈X⌉ = ε ⌈[cog:c, x1 : = c ⌈r1 ⌉ · · · ⌈rn ⌉ r1 , · · · , xn :rn ]⌉ def r⌉ def = c ⌈r⌉ ⌈c rs def r s ⌈ , ⌉ = ⌈ ⌉⌈ ⌉ Fig. 14 The extraction process. r def ( y ) = ε def ′ ([cog:c , x1 : ( y X) = ε ′ ′ r′1 , · · · , xn :r′n ] y [cog:c, x1 :r1 , · · · , xn :rn ]) def = c ′ (r1 y r1 ) · · · (rn y rn ) r′ y c ′ (c r) def r′ y r) = c′ ( Fig. 15 The cog mapping process. 1. let bC,m = (cog names(LC,m ) ∪ cog names(L′C,m )) \ cC,m . These are the free cog names that are replaced by fresh cog names at every transformation step; 2. the transformation C,m (· · · λcC,m .hLC,m , L′C,m i, · · · )c is defined inductively as follows: – h0, 0iN(c1 , c2 )[w] if C,m = (c1 , c2 )[w] ; – (λcD,n .hLD,n , L′D,n iN(c, c)w [bD,n /bD,n ])( y D,n )( ′ y D,n ) if C,m = D.n ′ ( ′ ) → ′′ , ′ = [cog:c, x: ′ ], and cct(D)(n) = and b′D,n are fresh cog names; – (L-GAzero) r′ ′ r s r r r r r s r s s s ′ ′ (λcD,n .hLD,n , L′D,n iN(c, c′ )[bD,n /bD,n ])( y D,n )( ′ y D,n ) ′ ′′ ′ ′ if C,m = D.n ( ) → , = [cog:c′ , x: ′ ], and c 6= c′ and cct(D)(n) = ′ and bD,n are fresh cog names; r s r r r – ′′′ h0, L′′ D,n ∪ LD,n i if C,m = D!n – ′ ′ (λcD,n .hLD,n , L′D,n iN(c1 , c2 )[w] [bD,n /bD,n ])( y D,n )( ′ y if C,m = D!n ′ ( ′ ) → ′′.(c1 , c2 )[w] and cct(D)(n) = – rD,n (sD,n ) {h D,n , ′ D,n i} (L-SInvk) r′D,n rD,n (sD,n ) {h (L-RSInvk) D,n , ′ i} D,n r′D,n r′ (s′ ) → r′′ and cct(D)(n) = rD,n (sD,n ) {h D,n , ′D,n i} r′D,n ′ ′ ′ ′′ ′′′ and hLD,n , LD,n i = (λcD,n .hLD,n , L′D,n i[bD,n /bD,n ])(r y rD,n )(s y sD,n ) and b′D,n are fresh cog names; r s ′ C,m (· · · if r r , λcC,m .hLC,m , L′C,m i, · · · )c # = ′C,m # ′′ C,m ; ′′ C,m (· · · s sD,n) rD,n (sD,n ) {h (L-GAinvk) D,n , ′ i} D,n r′D,n and b′D,n are fresh cog names; , λcC,m .hLC,m , L′C,m i, · · · )c (L-Seq) C,m , λcC,m .hLC,m , L′C,m i, · · · )c + if C,m = ′C,m + ′′ C,m ; – ′ C,m (· · · – ′ (· · · C,m if r (L-AInvk) , λcC,m .hLC,m , L′C,m i, · · · )c k ′ ′′ C,m = C,m k C,m . ′′ C,m (· · · , λcC,m .hLC,m , L′C,m i, · · · )c (L-Plus) ′′ (· · · C,m , λcC,m .hLC,m , L′C,m i, · · · )c (L-Par) Fig. 16 Lam transformation of cct. is straightforward to verify that these operations are still monotone. It is also straightforward to demonstrate by a simple cardinality argument the existence of fixpoints in the lam domain by running the Knaster-Tarski technique with this different semantics. This method is called a saturation technique at n. For example, if we compute the third approximant of Math.fact nc 7→ [cog:c]( ){h0 + Math!fact nc [cog:c ′ ]( ) → .(c, c ′ ), 0i } we get the sequence λc.h0, 0i λc.h[(c, c0 )], 0i λc.h[(c, c0 ), (c0 , c1 )], 0i λc.h[(c, c0 ), (c0 , c1 ), (c1 , c2 )], 0i and, if we saturate a this point, we obtain λc.h[(c, c0 )(c0 , c0 ), (c0 , c1 ), (c1 , c2 )], 0i λc.h[(c, c0 )(c0 , c0 ), (c0 , c1 ), (c1 , c2 )], 0i fixpoint Definition 6 Let(ct, {T x ; s}, cct) be a coreABS n+h i, · · · be · · · λcC,m .hLC,m n+h , L′C,m program and let A Framework for Deadlock Detection in core ABS the fixpoint (unique up to renaming of cog names) obtained by the saturation technique at n. The abstract class table at n, written act[n] , is a map that takes C.m n+h i. and returns λcC,m .hLC,m n+h , L′C,m Let (ct, {T x ; s}, cct) be a core ABS program and Γ ⊢start {T x ; s} : h , ′i ⊲ U | Γ . The abstract semantics saturated at n of (ct, {T x ; s}, cct) is ( (act[n] )start ) # ( ′ (act[n] )start ). As an example, in Figure 17 we compute the abstract semantics saturated at 2 of the class Math in Figure 5. 5.3 Deadlock analysis of lams. Definition 7 Let L be a relation on cog names (pairs in L are either of the form (c1 , c2 ) or of the form (c1 , c2 )w . L contains a circularity if Lget has a pair (c, c) (see Definition 2). Similarly, hL, L′ i (or λc.hL, L′ i) has a circularity if there is L ∈ L ∪ L′ that contains a circularity. A core ABS program with an abstract class table saturated at n is deadlock-free if its abstract semantics hL, L′ i does not contain a circularity. The fixpoints for Math.fact_g and Math.fact_ag are found at the third iteration. According to the above definition of deadlock-freedom, Math.fact_g yields a deadlock, whilst Math.fact_ag is deadlock-free because {(c, c)w }get does not contain any circularity. As discussed before, there exists no fixpoint for Math.fact_nc . If we decide to stop at the approximant 2 and saturate, we get λc.h[(c, c′ ), (c′ , c′ ), (c′ , c′′ )], 0i, which contains a circularity that is a false positive. Note that saturation might even start at the approximant 0 (where every method is λc.h0, 0i). In this case, for Math.fact_g and Math.fact_ag , we get the same answer and the same pair of lams as the above third approximant. For Math.fact_nc we get λc.h[(c, c′ ), (c′ , c′ )], 0i, which contains a circularity. In general, in techniques like the one we have presented, it is possible to augment the precision of the analysis by delaying the saturation. However, assuming that pairwise different method contracts have disjoint free cog names (which is a reasonable assumption), we have not found any sample core ABS code where saturating at 1 gives a better precision than saturating at 0. While this issue is left open, the current version of our 21 tool DF4ABS allows one to specify the saturation point; the default saturation point is 0. The computation of the abstract class table for class CpxSched does not need any saturation, all methods are non-recursive and encounter their fixpoint by iteration 2. (See Figure 18.) The abstract class table shows a circularity for method m1, manifesting the presence of a deadlock. The correctness of the fixpoint analysis of contracts discussed in this section is demonstrated in Appendix B. We remark that this technique is as modular as the inference system: once the contracts of a module have been computed, one may run the fixpoint analysis and attach the corresponding abstract values to the code. Analysing a program reduces to computing the lam of the main function. 6 The model-checking analysis of contracts The second analysis technique for the contracts of Section 4 consists of computing contract models by expanding their invocations. We therefore begin this section by introducing a semantics of contracts that is alternative to the one of Section 5. 6.1 Operational semantics of contracts. The operational semantics of a contract is defined as a reduction relation between terms that are contract pairs p, whose syntax is defined in Figure 19. These contract pairs highlight (in the operational semantics) the fact that every contract actually represents two collections of relations on cog names: those corresponding to the present states and those corresponding to future states. We have discussed this dichotomy in Section 4. In Figure 19 we have also defined the contract pair contexts, noted C[ ]c , which are indexed contract pairs with a hole. The index c indicates that the hole is immediately enclosed by h·, ·ic . The reduction relation that defines the evaluation of contract pairs h p1 , p′1 ic −→ h p2 , p′2 ic is defined in Figure 19. There are four reduction rules: (Red-SInvk) for synchronous invocation on the same cog name of the caller (which is stored in the index of the enclosing pair), (Red-RSInvk) for synchronous invocations on different cog name, (Red-AInvk) for asynchronous invocations, and (Red-GAInvk) for asynchronous invocations with synchronisations. We observe that every evaluation step amounts to expanding method invocations by replacing free cog names in method contracts with fresh names and without modifying the syntax tree of contract pairs. 22 Elena Giachino et al. method approx. 0 approx. 1 approx.2 saturation Math.fact_g Math.fact_ag Math.fact_nc λc.h0, 0i λc.h0, 0i λc.h0, 0i λc.h[(c, c)], 0i λc.h[(c, c)w ], 0i λc.h[(c, c′ )], 0i λc.h[(c, c)], 0i λc.h[(c, c)w ], 0i λc.h[(c, c′ ), (c′ , c′′ )], 0i λc.h[(c, c′ ), (c′ , c′ ), (c′ , c′′ )], 0i Fig. 17 Abstract class table computation for class Math. method approx. 0 approx. 1 approx.2 CpxSched.m1 CpxSched.m2 CpxSched.m3 λc, c′ , c′′ .h0, 0i λc, c′ .h0, 0i λc.h0, 0i λc, c′ , c′′ .h0, [(c′ , c′′ ), (c′′ , c′ )]i λc, c′ .h[(c, c′ )], 0i λc.h0, 0i λc, c′ , c′′ .h0, [(c′ , c′′ ), (c′′ , c′ )]i λc, c′ .h[(c, c′ )], 0i Fig. 18 Abstract class table computation for class CpxSched. contract pairs p ::= | h p, pic pN(c, c′ )[w] | p+ p | | p# p h p, C[ ]c ic pk p | contract pairs contexts (♯ ∈ {+, #, k}) D[ ] ::= [] C[ ]c ::= hD[ ], D[ ]N(c′ , c′′ )[w] | pic | | D[ ]♯ p, D[ ]ic h | p p♯D[ ] hC[ ]c , pic | | ′ | ′ C[ ]c N(c′ , c′′ )[w] | C[ ]c ♯ p | p♯C[ ]c reduction relation (Red-SInvk) ss s (Red-RSInvk) r r ss rrss ss C.m = ( ){h , ′ i} ′ = [cog:c, x: ′′ ] cog names(h , ′ i) \ cog names( , ) = ze e/ze][ , / , ] = h ′′ , ′′′ i w e are fresh h , ′ i[w rr C[C.m ( ) → (Red-AInvk) ss r′ ]c −→ C[h ′′ , s ′′′ rr r′ ]c −→ C[h ′′ , ′′′ C[C.m ( ) → (Red-GAInvk) , , r rrss r′ ]c −→ C[h ′′ , ss r ss = [cog:c′ , x: ′′ ] c 6= c′ i) \ cog names( , ) = ze ′ w i[ e/ze][ , / , ] = h ′′ , ′′′ i ′ s ′′′ ic′ N(c, c′ )]c r r ss rrss = [cog:c′ , x: ′′ ] C.m = ( ){h , ′ i} ′ cog names(h , ′ i) \ cog names( , ) = ze e/ze][ , / , ] = h ′′ , ′′′ i w e are fresh h , ′ i[w C.m = ( ){h , ′ i} ′ = [cog:c′ , x: ′′ ] cog names(h , ′ i) \ cog names( , ) = ze e/ze][ , / , ] = h ′′ , ′′′ i w e are fresh h , ′ i[w C[C!m ( ) → rr ic ]c r r ss rrss s′ C.m = ( ){h , ′ i} cog names(h w e are fresh h rr ic′ ]c C[C!m ( ) → r′.(c′′ , c′′′ )[w] ]c −→ C[h ′′ , ′′′ ic′ N(c′′ , c′′′ )[w] ]c Fig. 19 Contract reduction rules. To illustrate the operational semantics of contracts we discuss three examples: 1. Let F.f = [cog : c](x : [cog : c′ ], y : [cog : c′′ ]){ h(F.g [cog : c′ ](x : [cog : c′′ ]) → ).(c, c′ ) + 0.(c′ , c′′ ), 0i } and F.g = [cog : c](x : [cog : c′ ]){h0.(c, c′ ) + 0.(c′ , c), 0i} Then , hF!f [cog : c](x : [cog : c′ ], y : [cog : c′′ ]) → 0istart −→ hh0 (F.g [cog : c′ ](x : [cog : c′′ ]) → ).(c, c′ ) + 0.(c′ , c′′ )ic 0istart −→ hh0 h0.(c′ , c′′ ) + 0.(c′′ , c′ ) 0ic′ N(c, c′ ) + 0.(c′ , c′′ )ic 0istart , , , , , The contract pair in the final state does not contain method invocations. This is because the above main function is not recursive. Additionally, the evaluation of F.f [cog : c](x : [cog : c′ ], y : [cog : c′′ ]) has not created names. This is because names in the bodies of F.f and F.g are bound. 2. Let F.h = [cog : c]( ){h0, (F.h[cog : c′ ]( ) → )k0.(c, c′ )i} Then , hF!h [cog : c]( ) → 0istart −→ hh0 (F.h[cog : c′ ]( ) → )k0.(c, c′ )ic 0istart −→ hh0 h0 (F.h[cog : c′′ ]( ) → )k0.(c′ , c′′ )ic′ k0.(c, c′ )ic 0istart −→ · · · , , , , , where, in this case, the contract pairs grow in the number of dependencies as the evaluation progresses. This growth is due to the presence of a free name in the definition of F.h that, as said, corresponds to generating a fresh name at every recursive invocation. A Framework for Deadlock Detection in core ABS 23 3. Let F.l = [cog : c]( ){h0.(c, c ) # (0.(c, c ) k F!l [cog : c]( ) → ), 0i} ′ ′ Then , hF!l [cog : c]( ) → 0istart −→ hh0 0.(c, c′ ) # (0.(c, c′ ) k F!l [cog : c]( ) → )ic 0istart −→ hh0 0.(c, c′ ) # (0.(c, c′ ) k h0 0.(c′ , c′′ ) # (0.(c′ , c′′ ) k F!l [cog : c′′ ]( ) → )ic′ )ic 0istart −→ · · · , , , , , In this case, the contract pairs grow in the number of “#”-terms, which become larger and larger as the evaluation progresses. It is clear that, in presence of recursion and of free cog names in method contracts, a technique that analyses contracts by expanding method invocations is fated to fail because the system is infinite state. However, it is possible to stop the expansions at suitable points without losing any relevant information about dependencies. In this section we highlight the technique we have developed in [19] that has been prototyped for core ABS in DF4ABS. 6.2 Linear recursive contract class tables. Since contract pairs models may be infinite-state, instead of resorting to a saturation technique, which introduces inaccuracies, we exploit a generalisation of permutation theory that let us decide when stopping the evaluation with the guarantee that if no circular dependency has been found up to that moment then it will not appear afterwards. That stage corresponds to the order of an associated permutation. It turns out that this technique is suited for so-called linear recursive contract class tables. Definition 8 A contract class table is linear recursive if (mutual) recursive invocations in bodies of methods have at most one recursive invocation. It is worth to observe that a core ABS program may be linear recursive while the corresponding contract class table is not. For example, consider the following method foo of class Foo that prints integers by invoking a printer service and awaits for the termination of the printer task and for its own termination: Void foo(Int n, Print x){ Fut<Void> u, v ; if (n == 0) return() ; else { u = this!foo(n-1, x) ; v = x!print(n) ; await v? ; await u? ; return() ; } } While foo has only one recursive invocation, its contract written in Figure 20 is not. That is, the contract of Foo.foo displays two recursive invocations because, in correspondence of the await v? instruction, we need to collect all the effects produced by the previous unsynchronised asynchronous invocations (see rule (T-Await)) 3 . 6.3 Mutations and flashbacks The idea of our technique is to consider the patterns of cog names in the formal parameters and the (at most unique) recursive invocation of method contracts and to study the changes. For example, the above method contracts of F.h and F.l transform the pattern of cog names in the formal parameters, written (c) into the pattern of recursive invocation (c′ ). We write this transformation as (c) (c′ ) . In general, the transformations we consider are called mutations. Definition 9 A mutation is a transformation of tuples of (cog) names, written (x1 , · · · , xn ) (x′1 , · · · , x′n ) where x1 , · · · , xn are pairwise different and x′i may not occur in {x1 , · · · , xn }. Applying a mutation (x1 , · · · , xn ) (x′1 , · · · , x′n ) to a tuple of cog names (that may contain duplications) (c1 , · · · , cn ) gives a tuple (c′1 , · · · , c′n ) where – c′i = cj if x′i = xj ; – c′i is a fresh name if x′i 6∈ {x1 , · · · , xn }; – c′i = c′j if they are both fresh and x′i = x′j . We write (c1 , · · · , cn ) →mut (c′1 , · · · , c′n ) when (c′1 , · · · , c′n ) is obtained by applying a mutation (which is kept implicit) to (c1 , · · · , cn ). For example, given the mutation (x, y, z, u) (y, x, z ′ , z ′ ) (1) we obtain the following sequence of tuples: (c, c′ , c′′ , c′′′ ) →mut (c′ , c, c1 , c1 ) (2) ′ →mut (c, c , c2 , c2 ) →mut (c′ , c, c3 , c3 ) →mut ··· 3 It is possible to define sufficient conditions on core ABS programs that entail linear recursive contract class tables. For example, two such conditions are that, in (mutual) recursive methods, recursive invocations are either (i) synchronous or (ii) asynchronous followed by a get or await synchronisation on the future value, without any other get or await synchronisation or synchronous invocation in between. 24 Elena Giachino et al.  .(c, c′ )w k Foo.foo = [cog : c]( , x : [cog : c′ ]){ h0 + ′ where = Print!print [cog : c ]( ) → ′ = Foo!foo [cog : c]( , x : [cog : c′ ]) → ′  # ′ .(c, c)w  , 0i } → Fig. 20 Method contract of Foo.foo. When a mutation (x1 , · · · , xn ) (x′1 , · · · , x′n ) is such ′ ′ that {x1 , · · · , xn } = {x1 , · · · , xn } then the mutation is a permutation [8]. In this case, the permutation theory guarantees that, by repeatedly applying the same permutation to a tuple of names, at some point, one obtains the initial tuple. This point, which is known as the order of the permutation, allows one to define the following algorithm for linear recursive method contracts whose mutation is a permutation: 6.4 Evaluation of the main contract pair The generalisation of permutation theory in Theorem 1 allows us to define the notion of order of the contract of the main function in a linear recursive contract class table. This order is the length of the evaluation of the contract obtained 1. by unfolding every recursive function as many times as twice its ordering 4 ; 2. by iteratively applying 1 to every invocation of recursive function that has been produced during the unfolding. 1. compute the order of the permutation associated to the recursive method contract and 2. correspondingly unfold the term to evaluate. It is clear that, when method contract bodies have no In order to state the theorem of the correctness of free cog names, further unfoldings of the recursive method our analysis technique, we need to define the lam of a contract cannot add new dependencies. Therefore the contract pair. The following functions will do the job. evaluation, as far as dependencies are concerned, may Let [[·]] be a map taking a contract pair and returning stop. a pair of lams that is defined by When a mutation is not a permutation, as in the example above, it is not possible to get again an old [[C.m r(r) → r′ ]] = h0, 0i tuple by applying the mutation because of the presence [[C!m r(r) → r′ ]] = h0, 0i of fresh names. However, it is possible to demonstrate [[C!m r(r) → r′ .(c, c′ )[w] ]] = h[(c, c′ )[w] ], 0i that a tuple is equal to an old one up-to a suitable map, [[h p, p′ ic ]] = h[[ p]], [[ p′ ]]i called flashback. and it is homomorphic with respect to the operations +, Definition 10 A tuple of cog names (c1 , · · · , cn ) is #, k (whose definition on pairs of lams is in Figure 13). equivalent to (c′1 , · · · , c′n ), written (c1 , · · · , cn ) ≈ (c′1 , · · · , Let t be terms of the following syntax c′n ), if there is an injection ı called flashback such that: t ::= L | ht, ti 1. (c1 , · · · , cn ) = (ı(c′1 ), · · · , ı(c′n )) 2. ı is the identity on “old names”, that is, if c′i ∈ and let (L)♭ = L and (ht, t′ i)♭ = (t)♭ , (t′ )♭ . {c1 , · · · , cn } then ı(c′i ) = c′i . For example, in the sequence of transitions (2), there is a flashback from the last tuple to the second one and there is (and there will be, by applying the mutation (1)) no tuple that is equivalent to the initial tuple. It is possible to generalize the result about permutation orders: Theorem 1 ( [19]) Let (x1 , · · · , xn ) (x′1 , · · · , x′n ) be a mutation and let Theorem 2 ( [19]) Let h p1 , p′1 i be a main function contract and let h p1, p′1 istart −→ h p2, p′2 istart −→ h p3, p′3 istart −→ · · · be its evaluation. Then there is a k, which is the order of h p1 , p′1 istart such that if a circularity occurs in ([[h pk+h , p′k+h istart ]])♭ , for every h, then it also occurs in ([[h pk , p′k istart ]])♭ . (c1 , · · · , cn ) →mut (cn+1 , · · · , c2n ) →mut (c2n+1 , · · · , c3n ) →mut · · · be a sequence of applications of the mutation. Then there are 0 ≤ h < k such that (chn+1 , · · · , c(h+1)n ) ≈ (ckn+1 , · · · , c(k+1)n ) The value k is called order of the mutation. For example, the order of the mutation (1) is 3. Example 7 The reduction of the contract of method Math.fact nc is as in Figure 21. The theory of mutations provide us with an order for this evaluation. In particular, the mutation associated to Math.fact nc is 4 The interested reader may find in [19] the technical reason for unfolding recursive methods as many times as twice the length of the order of the corresponding mutation. A Framework for Deadlock Detection in core ABS c c′ , with order 1, such that after one step we can encounter a flashback to a previous state of the mutation. Therefore, we need to reduce our contract for a number of steps corresponding to twice the ordering of Math.fact nc: after two steps we find the flashback associating the last generated pair (c′ , c′′ ) to the one produced in the previous step (c, c′ ), by mapping c′ to c and c′′ to c′ . The flattening and the evaluation of the resulting contract are shown in Figure 22 and produce the pair of lams h[(c′ , c′′ ), (c, c′ )], 0i which does not present any deadlock. Thus, differently from the fixpoint analysis for the same example, with this operational analysis we get a precise answer instead of a false positive. (See Figure 17 and Section 5.3.) The correctness of the technique based on mutations is demonstrated in Appendix C. 25 class table and the contract of the main function of the program. (3) Fixpoint Analysis uses dynamic structures to store lams of every method contract (because lams become larger and larger as the analysis progresses). At each iteration of the analysis, a number of fresh cog names is created and the states are updated according to what is prescribed by the contract. At each iteration, the tool checks whether a fixpoint has been reached. Saturation starts when the number of iterations reaches a maximum value (that may be customised by the user). In this case, since the precision of the algorithm degrades, the tool signals that the answer may be imprecise. To detect whether a relation in the fixpoint lam contains a circular dependency, we run Tarjan algorithm [35] for connected components of graphs and we stop the algorithm when a circularity is found. (4) Abstract model checking algorithm for deciding the circularity-freedom problem in linear recursive contract class tables performs the following steps. (i) Find (linear) recursive methods: by parsing the contract class core ABS (actually full ABS [23]) comes with a suite [39] table we create a graph where nodes are function names that offers a compilation framework, a set of tools to and, for every invocation of D.n in the body of C.m, analyse the code, an Eclipse IDE plugin and Emacs there is an edge from C.m to D.n. Then a standard mode for the language. We extended this suite with an depth first search associates to every node a path of implementation of our deadlock analysis framework (at (mutual) recursive invocations (the paths starting and the time of writing the suite has only the fixpoint analending at that node, if any). The contract class table is yser, the full framework is available at http://df4abs.nws.cs.unibo.it). linear recursive if every node has at most one associated The DF4ABS tool is built upon the abstract syntax tree path. (ii) Computation of the orders: given the list of (AST) of the core ABS type checker, which allows us to recursive methods, we compute the corresponding muexploit the type information stored in every node of the tations. (iii) Evaluation process: the contract pair cortree. This simplifies the implementation of several conresponding to the main function is evaluated till every tract inference rules. The are four main modules that recursive function invocation has been unfolded up-to comprise DF4ABS: twice the corresponding order. (iv ) Detection of circularities: this is performed with the same algorithm of (1) Contract and Constraint Generation. This is perthe fixpoint analysis. formed in three steps: (i) the tool first parses the classes of the program and generates a map between interAs regards the computational complexity, the confaces and classes, required for the contract inference tract inference system is polynomial time with respect of method calls; (ii) then it parses again all classes of to the length of the program in most of the cases [21]. the program to generate the initial environment Γ that The fixpoint analysis is is exponential in the number of maps methods to the corresponding method signatures; cog names in a contract class table (because lams may and (iii) it finally parses the AST and, at each node, double the size at every iteration). However, this exit applies the contract inference rules in Figures 9, 10, ponential effect actually bites in practice. The abstract and 11. model checking is linear with respect to the length of (2) Constraint Solving is done by a generic semithe program as far as steps (i) and (ii) are concerned. unification solver implemented in Java, following the Step (iv) is linear with respect to the size of the final algorithm defined in [21]. When the solver terminates lam. The critical step is (iii), which may be exponential (and no error is found), it produces a substitution that with respect to the length of the program. Below, there satisfies the input constraints. Applying this substituis an overestimation of the computational complexity. tion to the generated contracts produces the abstract Let 7 The DF4ABS tool and its application to the case study 26 Elena Giachino et al. hMath!fact nc [cog : c]( ) → , 0istart −→ hh0, 0 + Math!fact nc[cog : c′ ]( ) → .(c, c′ )ic , 0istart −→ hh0, 0 + h0, 0 + Math!fact nc[cog : c′′ ]( ) → .(c′ , c′′ )ic′.(c, c′ )ic , 0istart Fig. 21 Reduction for contract of method Math.fact nc. ([[hh0, 0 + h0, 0 + Math!fact nc[cog : c′′ ]( ) → .(c′ , c′′ )ic′.(c, c′ )ic , 0istart ]])♭ = (hh0, 0 + h0, 0 + h[(c′ , c′′ )], 0ii.(c, c′ )i, 0i)♭ = h0 + 0 + [(c′ , c′′ )]N(c, c′ ), 0i = h[(c′ , c′′ ), (c, c′ )], 0i Fig. 22 Flattening and evaluation of resulting contract of method Math.fact nc. omax be the largest order of a recursive method contract (without loss of generality, we assume there is no mutual recursion). mmax be the maximal number of function invocations in a body or in the contract of the main function. An upper bound to the length of the evaluation till the saturated state is X (2 × omax × mmax )i , 0≤i≤ℓ where ℓ is the number of methods in the program. Let kmax be the maximal number of dependency pairs in a body. Then the size of the saturated state is O(kmax × (omax × mmax )ℓ ), which is also the computational complexity of the abstract model checking. 7.1 Assessments We tested DF4ABS on a number of medium-size programs written for benchmarking purposes by core ABS programmers and on an industrial case study based on the Fredhopper Access Server (FAS)5 developed by SDL Fredhopper [10], which provides search and merchandising IT services to e-Commerce companies. The (leftmost two columns of the) table in Figure 23 reports the experiments: for every program we display the number of lines, whether the analysis has reported a deadlock (D) or not (X), the time in seconds required for the analysis. Concerning time, we only report the time of the analysis of DF4ABS (and not the one taken by the inference) when they run on a QuadCore 2.4GHz and Gentoo (Kernel 3.4.9). The rightmost column of the table in Figure 23 reports the results of another tool that has also been developed for the deadlock analysis of core ABS programs: DECO [13]. This technique integrates a point-to analysis with an analysis returning (an over-approximation 5 Actually, the FAS module has been written in ABS [10], and so, we had to adapt it in order to conform with core ABS restrictions (see Section 3). This adaptation just consisted of purely syntactic changes, and only took half-day work (see also the comments in [15]). of) program points that may be running in parallel. As highlighted by the above table, the three tools return the results as regards deadlock analysis, but are different as regards performance. In particular the fixpoint and model-checking analysis of DF4ABS are comparable on small/mid-size programs, DECO appears less performant (except for PeerToPeer, where our modelchecking analysis is quite slow because of the number of dependencies produced by the underlying algorithm). On the FAS module, our two analysis are again comparable, while DECO has a better performance (DECO worst case complexity is cubic in the size of the input). Few remarks about the precision of the techniques follow. DF4ABS/model-check is the most powerful tool we are aware of for linear recursive contract class table. For instance, it correctly detect the deadlock-freedom of the method Math.fact nc (previously defined in Figure 5) while DF4ABS/fixpoint signals a false positive. Similarly, DECO signals a false positive deadlock for the following program, whereas DF4ABS/model-check returns its deadlock-freedom. class C implements C { Unit m(C c){ C w ; w = new cog C() ; w!m(this) ; c!n(this) ; } Unit n(C a){ Fut<Unit> x ; x = a!q() ; x.get ; } Unit q(){ } } { C a; C b ; Fut<Unit> x ; a = new cog C() ; b = new cog C() ; x = a!m(b) ; } However, DF4ABS/model-check is not defined on nonlinear recursive contract class tables. Non-linear recursive contract class tables can easily be defined, as shown A Framework for Deadlock Detection in core ABS program PingPong MultiPingPong BoundedBuffer PeerToPeer FAS Module lines 61 88 103 185 2645 DF4ABS/fixpoint result time X 0.311 D 0.209 X 0.126 X 0.320 X 31.88 27 DF4ABS/model-check result time X 0.046 D 0.109 X 0.353 X 6.070 X 39.78 DECO result time X 1.30 D 1.43 X 1.26 X 1.63 X 4.38 Fig. 23 Assessments of DF4ABS. with the following two contracts: C.m = [cog : c] () {h0, (C!m [cog : c]() → ).(c, c′ ) + C!n [cog : c′′ ]([cog : c]) → i} → C.n = [cog : c] ([cog : c′ ]) {h(C!m [cog : c]() → ).(c, c′ ), 0i} → Here, DF4ABS/model-check fails to analyse C.m while DF4ABS/fixpoint and DECO successfully recognise as deadlock-free6 . We conclude this section with a remark about the proportion between programs with linear recursive contract class tables and those with nonlinear ones. While this proportion is hard to assess, our preliminary analyses strengthen the claim that nonlinear recursive programs are rare. We have parsed the three case-studies developed in the European project HATS [10]. The case studies are the FAS module, a Trading System (TS) modelling a supermarket handling sales, and a Virtual Office of the Future (VOF) where office workers are enabled to perform their office tasks seamlessly independent of their current location. FAS has 2645 codelines, TS has 1238 code-lines, and VOF has 429 codelines. In none of them we found a nonlinear recursion in the corresponding contract class table, TS and VOF have respectively 2 and 3 linear recursive method contracts (there are recursions in functions on data-type values that have nothing to do with locks and control). This substantiates the usefulness of our technique in these programs; the analysis of a wider range of programs is matter of future work. 8 Related works A preliminary theoretical study was undertaken in [17], where (i) the considered language is a functional subset of core ABS; (ii) contracts are not inferred, they are provided by the programmer and type-checked; (iii) the deadlock analysis is less precise because it is not iterated as in this contribution, but stops at the first 6 In [19], we have defined a source-to-source transformation taking nonlinear recursive contract class tables and returning linear recursive ones. This transformation introduces fake cog dependencies that returns a false positive when applying DF4ABS/model-check on the example above. approximant, and (iv ), more importantly, method contracts are not pairs of lams, which led it to discard dependencies (thereby causing the analysis, in some cases, to erroneously yield false negatives). This system has been improved in [15] by modelling method contracts as pairs of lams, thus supporting a more precise fixpoint technique. The contract inference system of [15] has been extended in this contribution with the management of aliases of futures and with the dichotomy of present contract and future contract in the inference rules of statements. The proposals in the literature that statically analyse deadlocks are largely based on (behavioural) types. In [1, 4, 12, 36] a type system is defined that computes a partial order of the locks in a program and a subject reduction theorem demonstrates that tasks follow this order. Similarly to these techniques, the tool Java PathFinder [37] computes a tree of lock orders for every method and searches for mismatches between such orderings. On the contrary, our technique does not compute any ordering of locks during the inference of contracts, thus being more flexible: a computation may acquire two locks in different order at different stages, being correct in our case, but incorrect with the other techniques. The Extended Static Checking for Java [11] is an automatic tool for contract-based programming: annotation are used to specify loop invariants, pre and post conditions, and to catch deadlocks. The tool warns the programmer if the annotations cannot be validated. This techniques requires that annotations are explicitly provided by the programmer, while they are inferred in DF4ABS. A well-known deadlock analyser is TyPiCal, a tool that has been developed for pi-calculus by Kobayashi [22, 26–28]. TyPiCal uses a clever technique for deriving inter-channel dependency information and is able to deal with several recursive behaviours and the creation of new channels without committing to any pre-defined order of channel names. Nevertheless, since TyPiCal is based on an inference system, there are recursive behaviours that escape its accuracy. For instance, it returns false positives when recursion create networks with arbitrary numbers of nodes. To illustrate the issue 28 we consider the following deadlock-free program computing factorial class Math implements Math { Int fact(Int n, Int r){ Math y ; Fut<Int> v ; if (n == 0) return r ; else { y = new cog Math() ; v = y!fact(n-1, n*r) ; w = v.get ; return w ; } } } { Math x ; Fut<Int> fut ; Int r ; x = new cog Math(); fut = x!fact(6,1); r = fut.get ; } that is a variation of the method Math.fact ng in Figure 5. This code is deadlock free according to DF4ABS/ model-check, however, its implementation in pi-calculus 7 is not deadlock-free according to TyPiCal. The extension of TyPiCal with a technique similar to the one in Section 6, but covering the whole range of lam programs, has been recently defined in [16]. Type-based deadlock analysis has also been studied in [34]. In this contribution, types define objects’ states and can express acceptability of messages. The exchange of messages modifies the state of the objects. In this context, a deadlock is avoided by setting an ordering on types. With respect to our technique, [34] uses a deadlock prevention approach, rather than detection, and no inference system for types is provided. In [33], the author proposes two approaches for a type and effect-based deadlock analysis for a concurrent extension of ML. The first approach, like our ones, uses a type and effect inference algorithm, followed by an analysis to verify deadlock freedom. However, their analysis approximates infinite behaviours with a chaotic behaviour that non-deterministically acquires and releases locks, thus becoming imprecise. For instance, the 7 The pi-calculus factorial program is *factorial?(n,(r,s)). if n=0 then r?m. s!m else new t in (r?m. t!(m*n)) | factorial!(n-1,(t,s)) In this code, factorial returns the value (on the channel s) by delegating this task to the recursive invocation, if any. In particular, the initial invocation of factorial, which is r!1 | factorial!(n,(r,s)), performs a synchronisation between r!1 and the input r?m in the continuation of factorial?(n,(r,s)). In turn, this may delegate the computation of the factorial to a subsequent synchronisation on a new channel t. TyPiCal signals a deadlock on the two inputs r?m because it fails in connecting the output t!(m*n) with them. Elena Giachino et al. previous example should be considered a potential deadlock in their approach. The second approach is an initial result on a technique for reducing deadlock analysis to data race analysis. Model-theoretic techniques for deadlock analysis have also been investigated. defined. In [5], circular dependencies among processes are detected as erroneous configurations, but dynamic creation of names is not treated. Similarly in [2] (see the discussion below). Works that specifically tackle the problem of deadlocks for languages with the same concurrency model as that of core ABS are the following: [38] defines an approach for deadlock prevention (as opposed to our deadlock detection) in SCOOP, an Eiffel-based concurrent language. Different from our approach, they annotate classes with the used processors (the analogue of cogs in core ABS), while this information is inferred by our technique. Moreover each method exposes preconditions representing required lock ordering of processors (processors obeys an order in which to take locks), and this information must be provided by the programmer. [2] studies a Petri net based analysis, reducing deadlock detection to a reachability problem in Petri nets. This technique is more precise in that it is thread based and not just object based. Since the model is finite, this contribution does not address the feature of object creation and it is not clear how to scale the technique. We plan to extend our analysis in order to consider finer-grained thread dependencies instead of just object dependencies. [25] offers a design pattern methodology for CoJava to obtain deadlock-free programs. CoJava, a Java dialect where data-races and data-based deadlocks are avoided by the type system, prevents threads from sharing mutable data. Deadlocks are excluded by a programming style based on ownership types and promise (i.e. future) objects. The main differences with our technique are (i) the needed information must be provided by the programmer, (ii) deadlock freedom is obtained through ordering and timeouts, and (iii) no guarantee of deadlock freedom is provided by the system. The relations with the work by Flores-Montoya et al. [13] has been largely discussed in Section 7. Here we remark that, as regards the design, DECO is a monolithic code written in Prolog. On the contrary, DF4ABS is a highly modular Java code. Every module may be replaced by another; for instance one may rewrite the inference system for another language and plug it easily in the tool, or one may use a different/refined contract analysis algorithm, in particular one used in DECO (see Conclusions). A Framework for Deadlock Detection in core ABS 9 Conclusions 29 5. Carlsson, R., Millroth, H.: On cyclic process dependencies and the verification of absence of deadlocks in reactive systems (1997) We have developed a framework for detecting dead6. Caromel, D.: Towards a method of object-oriented conlocks in core ABS programs. The technique uses (i) an current programming. Commun. ACM 36(9), 90–102 inference algorithm to extract abstract descriptions of (1993) 7. Caromel, D., Henrio, L., Serpette, B.P.: Asynchronous methods, called contracts, (ii) an evaluator of contracts, and deterministic objects. In: Proc. POPL’04, pp. 123– which computes an over-approximated fixpoint seman134. ACM (2004) tics, (iii) a model checking algorithm that evaluates con8. Comtet, L.: Advanced Combinatorics: The Art of Finite tracts by unfolding method invocations. and Infinite Expansions. Dordrecht, Netherlands (1974) 9. Coppo, M.: Type Inference with Recursive Type EquaThis study can be extended in several directions. tions. In: Proc. FoSSaCS, LNCS, vol. 2030, pp. 184–198. As regards the prototype, the next release will provide Springer (2001) indications about how deadlocks have been produced 10. Requirement elicitation (2009). Deliverable 5.1 of project FP7-231620 (HATS), available at by pointing out the elements in the code that generhttp://www.hats-project.eu/sites/default/files/Deliverable51_re ated the detected circular dependencies. This way, the 11. Flanagan, C., Leino, K.R.M., Lillibridge, M., Nelson, G., programmer will be able to check whether or not the Saxe, J.B., Stata, R.: Extended static checking for java. detected circularities are actual deadlocks, fix the probSIGPLAN Not. 37(5), 234–245 (2002) 12. Flanagan, C., Qadeer, S.: A type and effect system for lem in case it is a verified deadlock, or be assured that atomicity. In: In PLDI 03: Programming Language Dethe program is deadlock-free. sign and Implementation, pp. 338–349. ACM (2003) DF4ABS, being modular, may be integrated with other 13. Flores-Montoya, A., Albert, E., Genaim, S.: May-happenanalysis techniques. In fact, in collaboration with Kobayashi [16],in-parallel based deadlock analysis for concurrent objects. In: Proc. FORTE/FMOODS 2013, Lecture Notes we have recently defined a variant of the model checkin Computer Science, vol. 7892, pp. 273–288. Springer ing algorithm that has no linearity restriction. For the (2013) same reason, another direction of research is to anal14. Gay, S., Hole, M.: Subtyping for session types in the πcalculus. Acta Informatica 42(2-3), 191–225 (2005) yse contracts with the point-to analysis technique of 15. Giachino, E., Grazia, C.A., Laneve, C., Lienhardt, M., DECO [13]. We expect that such analyser will be simpler Wong, P.Y.H.: Deadlock analysis of concurrent objects: than DECO because, after all, contracts are simpler than Theory and practice. In: iFM’13, LNCS, vol. 7940, pp. core ABS programs. 394–411. Springer-Verlag (2013) 16. Giachino, E., Kobayashi, N., Laneve, C.: Deadlock detecAnother direction of research is the application of tion of unbounded process networks. In: Proceedings of our inference system to other languages featuring asynCONCUR 2014, LNCS, vol. 8704, pp. 63–77. Springerchronous method invocation, possibly after removing Verlag (2014) or adapting or adding rules. One such language that 17. Giachino, E., Laneve, C.: Analysis of deadlocks in object groups. In: FMOODS/FORTE, Lecture Notes in Comwe are currently studying is ASP [7]. While we think puter Science, vol. 6722, pp. 168–182. Springer-Verlag that our framework and its underlying theory are ro(2011) bust enough to support these applications, we observe 18. Giachino, E., Laneve, C.: A beginner’s guide to the deadthat a necessary condition for demonstrating the results Lock Analysis Model. In: Trustworthy Global Computing - 7th International Symposium, TGC 2012, Revised Seof correctness of the framework is that the language has lected Papers, Lecture Notes in Computer Science, vol. a formal semantics. 8191, pp. 49–63. Springer (2013) 19. Giachino, E., Laneve, C.: Deadlock detection in linear recursive programs. In: Proceedings of SFM-14:ESM, LNCS, vol. 8483, pp. 26–64. Springer-Verlag (2014) References 20. Giachino, E., Lascu, T.A.: Lock Analysis for an Asynchronous Object Calculus. In: Proc. 13th ICTCS (2012) 1. Abadi, M., Flanagan, C., Freund, S.N.: Types for safe 21. Henglein, F.: Type inference with polymorphic recursion. locking: Static race detection for java. ACM Trans. ProACM Trans. Program. Lang. Syst. 15(2), 253–289 (1993) gram. Lang. Syst. 28 (2006) 22. Igarashi, A., Kobayashi, N.: A generic type system for 2. de Boer, F., Bravetti, M., Grabe, I., Lee, M., Steffen, M., the pi-calculus. Theor. Comput. Sci. 311(1-3), 121–163 Zavattaro, G.: A petri net based analysis of deadlocks (2004) for active objects and futures. In: Proc. of Formal As23. Johnsen, E.B., Hähnle, R., Schäfer, J., Schlatte, R., Stefpects of Component Software - 9th International Workfen, M.: ABS: A core language for abstract behavioral shop, FACS 2012, Lecture Notes in Computer Science, specification. In: B. Aichernig, F.S. de Boer, M.M. vol. 7684, pp. 110–127. Springer (2012) Bonsangue (eds.) Proc. 9th International Symposium on 3. de Boer, F., Clarke, D., Johnsen, E.: A complete guide Formal Methods for Components and Objects (FMCO to the future. In: Progr. Lang. and Systems, LNCS, vol. 2010), LNCS, vol. 6957, pp. 142–164. Springer-Verlag 4421, pp. 316–330. Springer (2007) (2011) 4. Boyapati, C., Lee, R., Rinard, M.: Ownership types for 24. Johnsen, E.B., Owe, O.: An asynchronous communicasafe program.: preventing data races and deadlocks. In: tion model for distributed concurrent objects. Software Proc. OOPSLA ’02, pp. 211–230. ACM (2002) and System Modeling 6(1), 39–58 (2007) 30 25. Kerfoot, E., McKeever, S., Torshizi, F.: Deadlock freedom through object ownership. In: T. Wrigstad (ed.) 5rd International Workshop on Aliasing, Confinement and Ownership in object-oriented programming (IWACO), in conjunction with ECOOP 2009 (2009) 26. Kobayashi, N.: A partially deadlock-free typed process calculus. TOPLAS 20(2), 436–482 (1998) 27. Kobayashi, N.: A new type system for deadlock-free processes. In: Proc. CONCUR 2006, LNCS, vol. 4137, pp. 233–247. Springer (2006) 28. Kobayashi, N.: TyPiCal (2007). At kb.ecei.tohoku.ac.jp /~koba/typical/ 29. Laneve, C., Padovani, L.: The must preorder revisited. In: Proc. CONCUR 2007, LNCS, vol. 4703, pp. 212–225. Springer (2007) 30. Milner, R.: A Calculus of Communicating Systems. Springer (1982) 31. Milner, R., Parrow, J., Walker, D.: A calculus of mobile processes, ii. Inf. and Comput. 100, 41–77 (1992) 32. Naik, M., Park, C.S., Sen, K., Gay, D.: Effective static deadlock detection. In: IEEE 31st International Conference on Software Engineering, 2009. ICSE 2009., pp. 386–396 (2009) 33. Pun, K.I.: behavioural static analysis for deadlock detection. Ph.D. thesis, Faculty olf Mathematics and Natural Sciences, University of Oslo, Norway (2013) 34. Puntigam, F., Peter, C.: Types for active objects with static deadlock prevention. Fundam. Inform. 48(4), 315– 341 (2001) 35. Tarjan, R.E.: Depth-first search and linear graph algorithms. SIAM J. Comput. 1(2), 146–160 (1972) 36. Vasconcelos, V.T., Martins, F., Cogumbreiro, T.: Type inference for deadlock detection in a multithreaded polymorphic typed assembly language. In: Proc. PLACES’09, EPTCS, vol. 17, pp. 95–109 (2009) 37. Visser, W., Havelund, K., Brat, G., Park, S., Lerda, F.: Model checking programs. Automated Software Engineering 10(2), 203–232 (2003) 38. West, S., Nanz, S., Meyer, B.: A modular scheme for deadlock prevention in an object-oriented programming model. In: ICFEM, pp. 597–612 (2010) 39. Wong, P.Y.H., Albert, E., Muschevici, R., Proença, J., Schäfer, J., Schlatte, R.: The ABS tool suite: modelling, executing and analysing distributed adaptable objectoriented systems. Journal on Software Tools for Technology Transfer 14(5), 567–588 (2012) 40. Yonezawa, A., Briot, J.P., Shibayama, E.: Objectoriented concurrent programming in ABCL/1. In: Proc. OOPSLA’86, pp. 258–268 (1986) A Properties of Section 4 The initial configuration of a well-typed core ABS program is ob(start, ε, {[destiny 7→ fstart , x 7→ ⊥] | s}, ∅) cog(start, start) where the activity {[destiny 7→ fstart , x 7→ ⊥] | s} corresponds to the activation of the main function. A computation is a sequence of reductions starting at the initial configuration according to the operational semantics. We show in this appendix that such computations keep configurations welltyped; in particular, we show that the sequence of contracts corresponding to the configurations of the computations is in the later-stage relationship (see Figure 28). Elena Giachino et al. Runtime contracts. In order to type the configurations we use a runtime type system. To this aim we extend the syntax of contracts in Figure 8 and define extended futures F , extended contracts that, with an abuse of notation, we still denote and runtime contracts as follows: k F ::= f | ıf ::= as in Figure 8 | f | f.(c, c′ ) | f.(c, c′ )w | h , ic k ::= 0 rr r | h , icf | [C!m ( ) → ]f | kkk As regards F , they are introduced for distinguishing two kind of future names: i) f that has been used in the contract inference system as a static time representation of a future, but is now used as its runtime representation; ii) ıf now replacing f in its role of static time future (it’s typically used to reference a future that isn’t created yet). As regards and , the extensions are motivated by the fact that, at runtime, the informations about contracts are scattered in all the configuration. However, when we plug all the parts to type the whole configuration, we can merge the different informations to get a runtime contract ′ such that every contract ∈ ′ does not contain any reference to futures anymore. This merging is done using a set of rewriting rules ⇒ defined in Figure 24 that let one replace the occurrences of runtime futures in runtime contracts with the corresponding contract of the future. We write f ∈ names( ) not as an index. The substitution whenever f occurs in [ /f ] replaces the occurrences of f in contracts ′′ of (by definition of our configurations, in these cases f can never occur as index in ). It is easy to demonstrate that the merging process always terminates and is confluent for non-recursive contracts and, in the following, we let L M be the normal form of with respect to ⇒: k k k k k k k k k k k Definition 11 A runtime contract k k is non-recursive if: k – all futures f ∈ names( ) are declared once in – all futures f ∈ names( ) are not recursive, i.e. for all h , ′ icf ∈ , we have f 6∈ names(h , ′ icf ) k k Typing Runtime Configurations. The typing rules for the runtime configuration are given in Figures 25, 26 and 27. Except for few rules (in particular, those in Figure 25 which type the runtime objects of a configuration), all the typing rules have a corresponding one in the contract inference system defined in Section 4. Additionally, the typing judgments are identical to the corresponding one in the inference system, with three minor differences: i) the typing environment, that now contains a reference to the contract class table and mappings object names to pairs (C, ), is called ∆; ii) the typing rules do not collect constraints; iii) the rt unsync(·) function on environments ∆ is similar to unsync(·) in Section 4, except that it now grabs all ıf and all futures f ′ that was created by the current thread f . More precisely r def rt unsync(∆, f ) = 1 k ··· k n r k f1 k · · · k fm r where { 1 , · · · , n } = { ′ | ∃ıf , : ∆(ıf ) = ( , {f1 , . . . , fm } = {f ′ | ∆(f ′ ) = ( ′ , f )}. r Finally, few remarks about the auxiliary functions: ′ )} and A Framework for Deadlock Detection in core ABS 31 f ∈ names(k) ′ c kkh , ′ icf ⇒ k[h , i /f ] f ∈ names(k) kk[C!m r(r) → r]f ⇒ k[C!m r(r) → r/f ] Fig. 24 Definition of ⇒ – init(C, o) is supposed to return the init activity of the class C. However, we have assumed that these activity is always empty, see Footnote 2. Therefore the corresponding contract will be h0, 0i. – atts(C, v, o, c) returns a substitution provided that v have records and o and c are object and cog identifiers, respectively. – bind(o, f, m, v ′ , C) returns the activity corresponding to the method C.m with the parameters v ′ provided that f has type c and v ′ have the types ′ . r r r Theorem 3 Let P = I C {T x; s} be a core ABS program and let Γ ⊢ P : cct, h , ′ i ⊲ U . Let also σ be a substitution satisfying U and , 0) ∆ = σ(Γ + cct) + start : [cog : start] + fstart : (start Then , ∆ ⊢R ob(start, ε, {l | s}, ∅) cog(start, start) : σ(h ′ Proof By (TR-Configuration) and (TR-Object) we are reduced to prove: , ′ i)start fstart (3) To this aim, let X be the variables used in the inference rule of (T-Program). To demonstrate (3) we use (TR-Process). Therefore we need to prove: start,start s : σ( ) | ∆′ ∆[destiny 7→ fstart , x 7→ σ(X)] ⊢R with rt unsync(∆′ ) = σ( ′′ ). This proof is done by a standard induction on s, using a derivation tree identical to the one used for the inference (with the minor exception of replacing the f s used in the inference with corresponding ıf s). This is omitted because straightforward. ⊔ ⊓ k Definition 12 A runtime contract is well-formed if it is non recursive and if futures and method calls in are placed as described by the typing rules: i.e. in a sequence 1 # . . . # n , they are present in all i , i1 ≤ i ≤ ik with i1 being when the method is called, and ik being when the method is synchronised with. Formally, for all h , ′ icf ∈ , we can derive ∅ ⊢ : ′ with the following rules: k k 0 ⊢ C.m r(r) → 0⊢0:0 = C!m r(r) → ′ =0∨ ′ = ′ ⊢ ′ ⊢ ′ ′ ⊢ : 1 1 : ′ ⊢ ′′ ⊢ ′′ 1 ′′ 1 ′ + 2 # ⊢ : 2 . ′ ⊢ f (c, c′ ) ⊢ ′ 2 : [w] : ′′ ′ ⊢0 ′′′ ′ ′ ′ 1 ⊢ ′ 1 k =f ⊢f :f : ′ 2 ⊢ ⊢ 1 1 k ′′ : #0: ′′ ′ 2 ′ ′′ 1 ⊢ r ′ .(c, c′ )[w] : 0 ⊢ ′ : ⊢ ′′ 1 k is a valid statement, then k is In the following theorem we use the so-called later-stage relation D that has been defined in Figure 28 on runtime contracts. We observe that the later-stage relation uses a substitution process that also performs a pattern matching operation – therefore it is partial because the pattern matching may fail. In particular, [ / ] (i) extracts the cog names and terms ′ in that corresponds to occurrences of cog names and record variables in and (ii) returns the corresponding substitution. sr s s r k and Theorem 4 (Subject Reduction) Let ∆ ⊢R cn : cn → cn′ . Then there exist ∆′ , ′ , and an injective renaming of cog names ı such that – ∆′ ⊢R cn′ : ′ and – ı( ) D ′ . k k k Proof The proof is a case analysis on the reduction rule used in cn → cn′ and we assume that the evaluation of an expression [[e]]σ always terminates. We focus on the most interesting cases. We remark that the injective renaming ı is used to identify fresh cog names that are created by the static analysis with fresh cog names that are created by the operational semantics. In fact, the renaming is not the identity only in the case of cog creation (second case below). – Skip Statement. (Skip) ob(o, a, {l | skip; s}, q) → ob(o, a, {l | s}, q) By (TR-Object), (TR-Process), (TR-Seq) and (TRSkip), there exists ∆′′ and such that ∆′′ ⊢c,o R skip; s : s : | ∆′′ . 0 # | ∆′′ . It is easy to see that ∆′′ ⊢c,o R Moreover, by (LS-Delete), we have 0 # Dcog(o) which proves that D ′ . – Object creation. k k (New-Object) o′ = fresh(C) p = init(C, o′ ) a′ = atts(C, [[e]](a+l) , c) ob(o, a, {l | x = new C(e); s}, q) cog(c, o) → ob(o, a, {l | x = o′ ; s}, q) cog(c, o) ob(o′ , a′ , idle, {p}) By (TR-Object) and (TR-Process), there exists ∆′′ ′′ that extends ∆ such that ∆′′ ⊢c,o R new C(e) : , 0 | ∆ . Let ∆′ = ∆[o′ 7→ ]. The theorem follows by the assumption that p is empty (see Footnote 2). – Cog creation. r r (New-Cog-Object) = C!m r(r) → ′ =0∨ ′ = =f ′′′ : 2 ′′ =0∨ ′ =0∨ ′ : ′ ′ r ′ r′ : 0 k Proof The result is given by the way rt unsync(·) is used in the typing rules. ⊓ ⊔ k i)start fstart where l = [destiny 7→ fstart , x 7→ ⊥]. start,start ∆ ⊢R {destiny 7→ fstart , x 7→ ⊥|s} : σ(h Lemma 1 If ∆ ⊢ cn : well-formed. : ′′ 2 ′′ 2 c′ = fresh( ) o′ = fresh(C) p = init(C, o′ ) a′ = atts(C, [[e]](a+l) , c′ ) ob(o, a, {l | x = new cog C(e); s}, q) → ob(o, a, {l | x = o′ ; s}, q) ob(o′ , a′ , p, ∅) cog(c′ , o′ ) By (TR-Object) and (TR-Process), there exists ∆′′ that extends ∆ such that ∆′′ ⊢c,o new C(e) : [cog : R c′′ , x : ], 0 | ∆′′ for some c′′ and records . Let ∆′ = ∆[o′ 7→ [cog : c′ , x : ], c′ 7→ cog] and ı(c′′ ) = c′ , where ı is an injective renaming on cog names. The theorem follows by the assumption that p is empty (see Footnote 2). r r r 32 Elena Giachino et al. (TR-Invoc) (TR-Future-Tick) r r X , ) ∆ ⊢ val : ∆(f ) = (c ∆ ⊢R fut(f, val) : 0 (TR-Object) (TR-Future) r ∆(o) = [cog : c, x: ] ∆ ⊢c,o R val : c,o ∆ ⊢R p : ∆ ⊢c,o R p : k r ∆(f ) = (c , ) ∆ ⊢R fut(f, ⊥) : 0 k kk x r r s r′ ] f r x ′′ c ∆ ⊢c,o R {destiny 7→ f, x 7→ val | s} : h , rt unsync(∆ , f )if (TR-Parallel) (TR-Idle) ∆ ∆ ⊢R ′ ∆ ⊢c,o ∆(f ) = (c , f ′ )[X] R val : ∆[destiny 7→ f, x 7→ ] ⊢c,o s : | ∆′′ R ∆ ⊢R ob(o, [cog 7→ c; x 7→ val], p, p) : k ⊢c,o R r (TR-Process) r r ′ ∆(f ) = (c , ) ∆(o) = [cog : c, x: ] ∆ ⊢R v = invoc(o, f, m, v) : [C!m [cog : c, x: ]( ) → ∆ ⊢R cn1 : idle : 0 k1 ∆ ⊢R cn2 : ∆ ⊢R cn1 cn2 : k1 k k2 k2 Fig. 25 The typing rules for runtime configurations. – Asynchronous calls. o′ = [[e]](a+l) v = [[e]](a+l) f = fresh( ) ob(o, a, {l | x = e!m(e); s}, q) → ob(o, a, {l | x = f ; s}, q) invoc(o′ , f, m, v) fut(f, ⊥) rr r By (TR-Object) and (TR-Process), there exist , ∆′1 , and ′′ such that (let f ′ = l(destiny)) k k x k r r r r r r f and [X] = X iff ∆′1 (ıf ) is checked). By construction of the rt unsync function, there exist a term t′ such that rt unsync(∆′1 ) = t′ [ ıf /ıf ] and rt unsync(∆′2 ) = t′ [f /ıf ]. r Finally, if we note ∆′ , ∆[f 7→ ( , f ′ )], we can type the invocation message with [ ıf ]f (as c′ is the cog of the record of this in ′ ), we have ′ – ∆′ ⊢R cn′ : ht[f /ıf ], t′ [f /ıf ]ifc k [ ıf ]f k ′′ – the rule (LS-AInvk) gives us that k k D ht[f /ıf ], t′ [f /ıf ]ifc ′ k[ ıf ] f k k′′ (Bind-Mtd) {l | s} = bind(o, f, m, v, class(o)) ob(o, a, p, q) invoc(o, f, m, v) → ob(o, a, p, q ∪ {l | s}) r r k rrss rrss By assumption and rules (TR-Parallel), (TR-Object) and (TR-Future-Tick), there exists ∆′′ , , ′′ such that (let f ′ =l[destiny]) ′ cog(o),o – ∆ ⊢R {l|x = e.get; s} : h , rt unsync(∆′′ , f ′ )ifcog(o) k r k k k k s x ∈ dom(l) v = [[e]](a+l) ob(o, a, {l | x = e; s}, q) → ob(o, a, {l[x 7→ v] | s}, q) r k ss s s s k cog(o),o – ∆ ⊢R q : ′′ – ∆ ⊢R fut(f, v) : 0 ′ – = h , rt unsync(∆′′ , f ′ )ifcog(o) k ′′ , and – [[e]]a◦l = f . Moreover, as fut(f, v) is typable and contains a value, we know that = 0 # ′ (e.get has contract 0). With cog(o),o the rule (TR-Pure), have that ∆ ⊢R {l|x = v; s} : ′ ′′ ′ f ′ h , rt unsync(∆ , f )icog(o) , and with = , we have the result. – Remote synchronous call. Similar to the cases of asynchronous call with a get-synchronisation. The result follows, in particular, from rule (LS-RSInvk) of Figure 28. – Cog-local synchronous call. Similar to case of asynchronous call. The result follows, in particular, from rules (LSSimpleNull) of Figure 28 and from the Definition of C.m ( ) → . – Local Assignment. (Assign-Local) By assumption and rules (TR-Parallel) and (R-Invoc) ′ , 0), c = cog( ) and we have ∆(o) = (C, ), ∆(f ) = (c = [C!m ( ) → ′ ]f k ′ with ∆ ⊢R invoc(o, f, m, v) : [C!m ( ) → ′ ]f and ∆ ⊢R ob(o, a, p, q) : ′ . Let x be the formal parameters of m in C. The auxiliary function bind(o, f, m, v, C) returns a process {[destiny 7→ f, x 7→ v] | s}. It is possible to demonstrate that ∆ ⊢c,o R {l[destiny 7→ f, x 7→ v]|s} : h m , ′m ifc , where ∆(C.m) = ( ){h 0 , ′0 i} ′ and m = 0 [c/c′ ][ , / , ] and c′ ∈ ′ \ ( ∪ ) with c fresh and ′m = ′0 [c/c′ ][ , / , ]. rr rr r k k f = [[e]](a+l) v 6= ⊥ ob(o, a, {l | x = e.get; s}, q) fut(f, v) → ob(o, a, {l | x = v; s}, q) fut(f, v) rr – Method instantiations. k r (Read-Fut) k ′ = h , rt unsync(∆′1 , f ′ )ifcog(o) k ′′ – – ∆ ⊢c,o (with l = [y 7→ v]) R v : ′′ – ∆ ⊢c,o R q : | ∆′1 – ∆[y 7→ ] ⊢c,o R x = e!m(e); s : Let ∆1 = ∆[y 7→ ]: by either (TR-Var-Record) or (TR′ Field-Record) and (TR-AInvk), there exist = c′ (where c′ is the cog of the record of e), ıf and ıf such that ∆1 ⊢c,o R e!m(e) : ıf , 0 | ∆1 [ıf 7→ ( , ıf )]. By construction of the type system (in particular, the rules (TRGet∗ ) and (TR-Await∗ )), there exists a term t such that = t[ ıf /ıf ] and such that ∆1 [f 7→ ( , f ′ )] ⊢c,o x = R f ; s : t[f /ı ] | ∆′2 (with ∆′2 , ∆′1 \ {ıf }[f 7→ ( , f ′ )[X] ] r By rules (TR-Process) and (TR-Object), it follows that ∆ ⊢R ob(o, a, p, q ∪ {bind(o, f, m, v, C)}) : ′ kh m , ′m ifc . Moreover, by applying the rule (LS-Bind), we have that [C!m ( ) → ′ ]f D h m , ′m ifc which implies with the rule (LS-Global) that D ′ . – Getting the value of a future. k (Async-Call) s By assumption and rules (TR-Object), (TR-Process), (TR-Seq), (TR-Var-Record) and (TR-Pure), there exists ∆′′ , , ′′ such that (we note ∆1 for ∆[y : ] and f for l[destiny]) cog(o),o – ∆ ⊢R {l|x = e; s} : h0 # , rt unsync(∆′′ , f )ifcog(o) k cog(o),o – ∆ ⊢R x q: k′′ A Framework for Deadlock Detection in core ABS 33 runtime expressions (TR-Obj) (TR-Fut) r ∆ ⊢c,o o : r R ∆(o) = (C, ) ∆(F ) = ∆ ⊢c,o R z F : (TR-Var) (TR-Field) x ∆ ⊢c,o x : x R ∆(x) = z x 6∈ dom(∆) ∆ ∆(o.x) = ⊢c,o R x: r ∆ ⊢c,o R e : F (TR-Pure) ∆ ⊢c,o R e : primitive value or arithmetic-and-bool-exp ∆ ⊢c,o R r r [X] ∆ ⊢c,o R F : ( , ) ∆ (TR-Val) e (TR-Value) r ⊢c,o R e: r r ∆ ⊢c,o R e : ,0|∆ e: expressions with side-effects (TR-Get) ∆ ⊢c,o R x : ıf ∆[destiny] = f ∆ ⊢c,o R x.get : r ∆ x.get : r ,0|∆ ′ ∆ ⊢c,o R e : )X r r′ , f.(c, c ′ ) k rt unsync(∆′ , f ′) | ∆′ ∆ ⊢c,o R e : ∆ r ⊢c,o R param(C) = T x c ′ fresh fields(C) = T ′ x′ param(C) = T x ⊢c,o R ∆ (TR-New) (TR-AInvk) ∆ ⊢c,o R x.get : r r ′ ′ , ) ∆ ⊢c,o R f : (c ′ ∆ = ∆[f 7→ ( , 0)X ] (TR-NewCog) r′ , ′ ∆ ⊢c,o R F : (c ⊢c,o R ∆ ⊢c,o R x : f ∆[destiny] = f ′ r′ , .(c, c ′ ) k rt unsync(∆′ , f ) | ∆′ (TR-Get-tick) ∆ ⊢c,o R x : F (TR-Get-Runtime) r ′ ′ ∆ ⊢c,o , ) R ıf : (c ′ ∆ = ∆[ıf 7→ ( , 0)X ] ′ new cog C(e) : [cog:c , x: r r , x′ : ′ ], 0 | ∆ fields(C) = T ′ x′ r r new C(e) : [cog:c, x: , x′ : ′ ], 0 | ∆ r s fields(C), param(C) = T x r s c, ıf fresh s′′ = r′′ [c/c′ ][r, s/r′ , s′] ′′ ′′ s , C!m r(s) → s )] ′ ∆ ⊢c,o class(types(e)) = C ∆ ⊢c,o R e : [cog:c , x: ] R e : ′ ′ ′ ′′ ′′ ′ c = cog names( ) \ cog names( ′ , ′ ) ∆(C.m) = ( ){h , i} r s r r ′ ∆ ⊢c,o R e!m(e) : ıf , 0 | ∆[ıf 7→ (c (TR-SInvk) ∆(C.m) = r s ′ ∆ ⊢c,o class(types(e)) = C ∆ ⊢c,o R e : [cog:c , x: ] R e : ′ ′ ( ){h , ′ i} ′′ c′ = cog names( ′′ ) \ cog names( ′ , ′ ) r s r ∆ ⊢c,o R e.m(e) : s r ′′ rs , C.m ( ) → fields(C), param(C) = T x ′′ = ′′ [c/c′ ][ , / ′ , c fresh k rt unsync(∆) | ∆ s r s ′′ s r s r s′] r Fig. 26 Runtime typing rules for expressions {l[x 7→ [[e]](a+l) ]|s} : h , rt unsync(∆′′ , f )ifcog(o) which gives us the result with ′ . k k′ = h , rt unsync(∆′′ , f )icf k ⊔ ⊓ B Properties of Section 5 In this section, we will prove that the statements given in Section 5 are correct, i.e. that the fixpoint analysis does detect deadlocks. To prove that statement, we first need to define the dependencies generated by the runtime contract of a running program. Then, our proof works in three steps: i) first, we show that our analysis (performed at static time) contains all the dependencies of the runtime contract of the program; ii) second that the dependencies in a program at runtime are contained in the dependencies of its runtime contract; and finally iii) when cn (typed with ) reduces to cn′ (typed with ′ ), we prove that the dependencies of ′ are contained in . Basically, we prove that the following diagram holds: k k k h , ... cn1 P ′ k1 i cnn kn ... A1 ⋑ cog(o),o ∆ ⊢R k′′ , and k hL, L′ i ⋑ hL1 , L′1 i An ⋑ k – = h , rt unsync(∆′′ , f )ifcog(o) k – [[e]]a◦l = v. We have ... ⋑ ⋑ hLn , L′n i Hence, the analysis hL, L′ i contains all the dependencies Ai that the program can have at runtime, and thus, if the program has a deadlock, the analysis would have a circularity. In the following, we introduce how we compute the dependencies of a runtime contract. This computation is difficult in general, but in case the runtime contract is as we constructed it in the subject-reduction theorem, then the definition is very simple. First, let say that a contract that does not contain any future is closed. It is clear that we can compute (act[n] ) when is closed. k Proposition 5 Let ∆ ⊢ cn : be a typing derivation constructed as in the proof of Theorem 4. Then is well formed and ′ are closed. and L M = h , ′ istart fstart where k k Proof The first property is already stated in Lemma 1. The second property comes from the fact that when we create a new future f (in the Asynchronous calls case for instance), we 34 Elena Giachino et al. statements (TR-Var-Record) ∆ ⊢c,o R x : ∆ ⊢c,o R x (TR-Field-Record) x′ , | ∆′ ′ | ∆ [x 7→ x′ ] ∆ ⊢c,o R z : x=z: x 6∈ dom(∆) ∆(this.x) = ∆ ⊢c,o R r x=z: r ′ ∆ ⊢c,o R z : , |∆ ′ |∆ (TR-Await) ∆ ⊢c,o R x : ıf ∆[destiny] = f (TR-Var-Future) ∆ ⊢c,o R x:F ∆ ⊢c,o R x = f : 0 | ∆[x 7→ f ] ∆ ⊢c,o R await x? : (TR-Await-Runtime) ∆ ⊢c,o R x : f ∆[destiny] = f ′ ∆ ⊢c,o R ′ ∆ ⊢c,o R f : (c ′ ∆ = ∆[f 7→ (c ′ r, ) r, 0)X ] .(c, c ′ )w k rt ′ ′ unsync(∆′ , f ) | ∆′ (TR-Await-Tick) ∆ ⊢c,o R x : F await x? : f.(c, c ) k rt unsync(∆ , f ) | ∆ ′ w r, ) r, 0)X ] ′ ∆ ⊢c,o R ıf : (c ′ ∆ = ∆[ıf 7→ (c ′ ′ ∆ r, ′ ∆ ⊢c,o R F : (c ⊢c,o R )X await x? : 0 | ∆ (TR-If) ∆ ⊢c,o ∆ ⊢c,o ∆ ⊢c,o R e : Bool R s1 : 1 | ∆1 R s2 : 2 | ∆2 x ∈ dom(∆) =⇒ ∆1 (x) = ∆2 (x) x ∈ Fut(∆) =⇒ ∆1 (∆1 (x)) = ∆2 (∆2 (x)) ∆′ = ∆1 + (∆2 \ (dom(∆) ∪ {∆2 (x) | x ∈ Fut(∆2 )})) ′ ∆ ⊢c,o R if e { s1 } else { s2 } : 1 + 2 | ∆ (TR-Return) r ∆ ⊢c,o R e : ∆(destiny) = f ∆(f ) = (c r, ∆ ⊢c,o R return e : 0 | ∆ (TR-Seq) ∆ ⊢c,o R s1 : ∆1 ⊢c,o R s2 : ∆ ⊢c,o s 1 ; s2 : R (TR-Skip) ∆ ⊢c,o R skip : 0 | ∆ (TR-Cont) ∆(f ) = ) | ∆1 | ∆2 1 # 2 | ∆2 1 2 z ∆ ⊢c,o R cont(f ) : 0 | ∆ Fig. 27 Runtime typing rules for statements map it in ∆′ to its father process, which will then reference f because of the rt unsync(·) function. Hence, if we consider the relation of which future references which other future in , we get a dependency graph in the shape of a directed tree, where the root is fstart . So, L M reduces to a simple pair of contract of the form h , ′ istart and ′ are closed. fstart where ⊔ ⊓ k k In the following, we will suppose that all runtime contracts come from a type derivation constructed as in Theorem 4. k Definition 13 The semantics of a closed runtime pair (unique up to remaning of cog names) for the saturation at i, noted Jh , ′ icf Kn , is defined as Jh , ′ icf Kn = ( (act[n] )c )#( ′ (act[n] )c ). We extend that definition for any runtime contract with J Kn , JL MKn . k We now prove the second property: all the dependencies of a program at a given time is included in the dependencies generated from its contract. k Proof By Definition 2, if cn has a dependency (c, c′ ), then there exist cn1 = ob(o, a, {l|x = e.get; s}, q) ∈ cn, cn2 = fut(f, ⊥) ∈ cn and cn3 = ob(o′ , a′ , p′ , q ′ ) ∈ cn such that [[e]](a+l) = l′ (destiny) = f , {l′ | s′ } ∈ p′ ∪ q ′ and a(cog) = c and a′ (cog) = c′ . By runtime typing rules (TR-Object), (TR-Process), (TR-Seq) and (TR-Get-Runtime), the contract of cn1 is k Now that we can compute the dependencies of a runtime contract, we can prove our first property: the analysis performed at static time contains all the dependencies of the initial runtime contract of the program (note that σ( )(act[n] ) # σ( ′ )(act[n] ) is the analysis performed at static time, and Jσ(h , ′ istart fstart )Kn is the set of dependencies of the initial runtime contract of the program): Proposition 6 Let P = I C {T x; s} be a core ABS program and let Γ ⊢ P : cct, h , ′ i ⊲ U . Let also σ be a substitution satisfying U . Then we have that Jσ(h , ′ istart fstart )Kn ⋐ σ( )(act[n] ) # σ( ′ )(act[n] ). Proof The result is direct with an induction on and ′ , and with the fact that +, # and k are monotone with respect to ⋐. ⊔ ⊓ k Proposition 7 Let suppose ∆ ⊢R cn : and let A be the set of dependencies of cn. Then, with J Kn = hL, L′ i, we have A ⊂ L. hf.(c, c′ ) # s, ′ a(cog) s il(destiny) k kq we indeed know that the dependency in the contract is toward c′ because of (TR-Invoc) or (TR-Process). Hence a(cog) = hf.(c, c′ ) # s , ′s il(destiny) k ′ . It follows, with the lam transformation rule (L-GAinvk), that (c, c′ ) is in L. ⊔ ⊓ k k Proposition 8 Given two runtime contracts D ′ , we have that J ′ Kn ⋐ J Kn . k k k k k and k′ with Proof We refer to the rules (LS-*) of the later-stage relation defined in Figure 28 and to the lam transformation rules (L-*) defined in Figure 16 . The result is clear for the rules (LSGlobal), (LS-Fut), (LS-Empty), (LS-Delete) and (LSPlus). The result for the rule (LS-Bind) is a consequence of (L-AInvk). The result for the rule (LS-AInvk) is a consequence of the definition of ⇒. The result for the rule (LSSInvk) is a consequence of the definition of ⇒ and (L-SInvk). The result for the rule (LS-RSInvk) is a consequence of the A Framework for Deadlock Detection in core ABS 35 the substitution process def [/] = ε r ′ ′ [[cog:c , x1 : 1 , · · · , xn : r r r r def [ /X ] = [ /X ] ′ ′ [c /c ] [ 1 / 1 ] · · · [ ′ ′ /c ] = [c /c ] [ / ] r r r r r def ′ ] n /[cog:c, x1 : 1 , · · · , xn : n ]] = def ′ ′ r [c r r′n /rn ] the later-stage relation is the least congruence with respect to runtime contracts that contains the rules LS-Global ′ 1 D 1 k LS-Bind ∆(C.m) = rthis (rthis ) {h , ′ i} r′this c = fn(h , ′ i) \ fn(rthis , rthis , r′this ) rp = [cog : c, x:r] c′ ∩ fn(rp , rp , r′p ) = ∅ ′ [C!m rp (rp ) → r′p ]f D h , ′ icf [c′ /c][rp , rp , rp /rthis , rthis , r′this ] k k2 D k k1 k k2 D k′1 k k′2 ′ 2 LS-AInvk h , LS-SInvk rs h(C.m ( ) → rs rp (rp ) → r ′ p /f ′ ] f ′ ∈ fn(h , r ′ LS-RSInvk h(C.m ( ) → f ′ ∈ fn(h , ′ c C!m if [ r k )# ′ , ′′ c if f ′ ∈ fn(h , ′ k )# ′ , ′ i) ′ k [C!m ′ , rp = [cog : c′ , x:r] ′ ′ D h(f .(c, c ) k ) # LS-Empty 0.(c, c′ )[w] D 0 rp (rp ) → r′p ]f rp = [cog : c, x:r] LS-DepNull ′ h , ′ icf k h0, 0icf ′ D h [0/f ′ ], LS-Fut fD0 i) ′ c if D h(f .(c, c)w k ) # i) ′′ c if ′ Dh , ′ ′ ′ , ′′ c if k [C!m c′ 6= c ′′ c if k [C!m ′ rp (rp ) → r′p ]f rp (rp ) → r′p ]f ′ ′ ′ [0/f ′ ]icf k h0, 0icf ′ LS-Delete 0# D LS-Plus 1 + 2 D i Fig. 28 The later-stage relation definition of ⇒ and (L-RSInvk). Finally, the result for the rule (LS-DepNull) is a consequence of the definition of ⇒. ⊔ ⊓ Proof To demonstrate item 1, let We can finally conclude by putting all these results together: We prove that every dependencies occurring in cn is also contained in one state of ([[h n , ′n istart ]])♭ . By Definition 2, if cn has a dependency (c, c ′ ) then it contains cn′′ = ob(o, a, {l|x = e.get; s}, q) fut(f, ⊥), where f = [[e]](a+l) , a(cog) = c and there is ob(o′ , a′ , {l′ |s′ }, q ′ ) ∈ cn such that a′ (cog) = c′ and l′ (destiny) = f . By the typing rules, the contract of cn′ is f.(c, c ′ ) # s , where, by typing rule (TConfigurations), f is actually replaced by a C!m ( ) → produced by a concurrent invoc configuration, or by the contract pair h m , ′m i corresponding to the method body. As a consequence [[cn′′ ]][n] = ([[C[h ′′ N(c, c′ ), ′′′ ic ]c′′ ]])♭ . Let [[ob(o′ , a′ , {l′ |s′ }, q ′ )]][n] = ([[C′ [h m , ′m ic ]c′′ ]])♭ , with [[e]](a+l) = l′ (destiny), then Theorem 5 If a program P has a deadlock at runtime, then its abstract semantics saturated at n contains a circle. Proof This property is a direct consequence of Propositions 6, 7 and 8. ⊔ ⊓ C Properties of Section 6 The next theorem states the correctness of our model-checking technique. Below we write [[cn]][n] = ([[h n , ′n istart ]])♭ , if ∆ ⊢R cn : h 1 , ′1 i and n is the order of h 1 , ′1 istart . p p p p p p Theorem 6 Let (ct, {T x ; s}, cct) be a core ABS program and cn be a configuration of its operational semantics. 1. If cn has a circularity, then a circularity occurs in [[cn]][n] ; 2. if cn → cn′ and [[cn′ ]][n] has a circularity, then a circularity is already present in [[cn]][n] ; 3. let ı be an injective renaming of cog names; [[cn]][n] has a circularity if and only if [[ı(cn)]][n] has a circularity. [[cn]][n] = ([[h pn , p′n istart]])♭ . p p rs [[ob(o′ , a′ , {l′ |s′ }, q ′ ) cn′′ ]][n] = ([[C[h ′′ N(c, c′ ), ′′′ ic ]c′′ k C′ [h m , ′ ′ ′′′ ♭ m ic ]c ]]) s . In general, if k dependencies occur in a state cn, then there is cn′′ ⊆ cn that collects all the tasks manifesting the dependencies. [[cn′′ ]][n] = ′ ′′′ ([[C1 [h ′′ k C′1 [h m1 , ′m1 ic′1 ]c′′′ ]])♭ 1 N(c1 , c1 ), 1 ic1 ]c′′ 1 1 ′ ′′′ ′ ′ ′′ k C [h m , N (c , c ) , i ] ]])♭ k · · · k ([[Ck [h ′′ c k c mk ic′k ]c′′′ k k k k k k k k 36 Elena Giachino et al. By definition of k composition in Section 5, the initial state contains all the above pairs (ci , ci′ ). Let us prove the item 2. We show that the transition cn −→ cn′ does not produce new dependencies. That is, the set of dependencies in the states of [[cn′ ]][n] is equal or smaller than the set of dependencies in the states of [[cn]][n] . By Theorem 4, if ∆ ⊢R cn : then ∆′ ⊢R cn′ : ′ , with D ′ . We refer to the rules (LS-*) of the later-stage relation defined in Figure 28 and to the contract reduction rules (Red*) defined in Figure 19 . The result is clear for the rules (LSGlobal), (LS-Fut), (LS-Empty), (LS-Delete) and (LSPlus). The result for the rule (LS-Bind) is a consequence of (Red-AInvk). The result for the rule (LS-AInvk) is a consequence of the definition of ⇒. The result for the rule (LS-SInvk) is a consequence of the definition of ⇒ and (RedSInvk). The result for the rule (LS-RSInvk) is a consequence of the definition of ⇒ and (Red-RSInvk). Finally, the result for the rule (LS-DepNull) is a consequence of the definition of ⇒. k k k k Item 3 is obvious because circularities are preserved by injective renamings of cog names. ⊓ ⊔
6cs.PL
Stanley depth of quotient of monomial complete intersection ideals Mircea Cimpoeaş arXiv:1210.2214v2 [math.AC] 27 Apr 2013 Abstract We compute the Stanley depth for a particular, but important case, of the quotient of complete intersection monomial ideals. Also, in the general case, we give sharp bounds for the Stanley depth of a quotient of complete intersection monomial ideals. In particular, we prove the Stanley conjecture for quotients of complete intersection monomial ideals. Keywords: Stanley depth, Stanley conjecture, monomial ideal. 2000 Mathematics Subject Classification:Primary: 13P10. Introduction Let K be a field and S = K[x1 , . . . , xn ] the polynomial ring over K. LetL M be a Zn -graded r S-module. A Stanley decomposition of M is a direct sum D : M = i=1 mi K[Zi ] as a Zn -graded K-vector space, where mi ∈ M is homogeneous with respect to Zn -grading, Zi ⊂ {x1 , . . . , xn } such that mi K[Zi ] = {umi : u ∈ K[Zi ]} ⊂ M is a free K[Zi ]-submodule of M. We define sdepth(D) = mini=1,...,r |Zi | and sdepthS (M) = max{sdepth(D)| D is a Stanley decomposition of M}. The number sdepthS (M) is called the Stanley depth of M. Stanley [9] conjectured that sdepthS (M) ≥ depthS (M) for any Zn -graded S-module M. Herzog, Vladoiu and Zheng show in [4] that sdepthS (M) can be computed in a finite number of steps if M = I/J, where J ⊂ I ⊂ S are monomial ideals. However, it is difficult to compute this invariant, even in some very particular cases. In section 1, we consider the case of quotients of irreducible monomial ideals, and we compute their Stanley depth, see Theorem 1.5. In section 2, we consider the general case of two complete intersection monomial ideals I ⊂ J ⊂ S. In Theorem 2.4 we give sharp bounds for sdepthS (J/I). Remark 2.10 shows that these bounds are best possible. However, in a particular case, we give an explicit formula for sdepthS (J/I), see Theorem 2.9. 1 The case of irreducible ideals First, we give the following technical Lemma. Lemma 1.1. Let b be a positive integer, denote L S ′ = K[x2 , . . . , xn ] and let I ( J ⊂ S ′ b−1 i n ′ be two monomial ideals. Then (xb1 , J)/(xb1 , I) ∼ = i=0 x1 (J/I), as Z -graded S -modules. Moreover, sdepthS ((xb1 , J)/(xb1 , I)) = sdepthS ′ (J/I). 1 The support from grant ID-PCE-2011-1023 of Romanian Ministry of Education, Research and Innovation is gratefully acknowledged. 1 Proof. Let u ∈ (xb1 , J) \ (xb1 , I) be a monomial. Then u = xi1 · u′ , for some nonnegative integer i and some monomial u′ ∈ S ′ . Since u ∈ / (xb1 , I), it follows that i < b and, also, u′ ∈ / I. On the other hand, since u ∈ (xb1 , J) and u ∈ / xb1 S, it follows that u′ ∈ J. Therefore, i u ∈ x1 (J \ I). Conversely, if we take a monomial u′ ∈ J \ I and an integer 0 ≤ i < b, one (xb1 , I). can easily see that u := xi1 · u′ ∈ (xb1 , J) \ L b−1 i b b The decomposition (xb1 , J)/(xb1 , I) ∼ = i=0 x1 (J/I) implies sdepthS ((x1 , J)/(x1 , I)) ≥ b b ′ sdepthS ′ (J/I) and, also, J/I = ((x1 , J)/(x1 , I)) ∩ (S /I), via the natural injection S ′ /I ֒→ S/(xb1 , J). In order toLprove the other inequality, we consider a Stanley decomposition r ′ of (xb1 , J)/(xb1 , I) = i K[Zi ] ∩ S = {0} if x1 |u and, otheri=1 vi K[Zi ]. Note that vL ′ wise, vi K[Zi ] ∩ S = vi K[Zi ]. Therefore, J/I = x1 ∤vi vi K[Zi ] and thus sdepthS ′ (J/I) ≥ sdepthS ((xb1 , J)/(xb1 , I)) as required. An easy corollary of Lemma 1.1 is the following. Corollary 1.2. Let 0 ≤ m < n be an integer. Then,  n−m . sdepthS ((x1 , . . . , xn )/(x1 , . . . , xm )) = n − m − 2  Proof. We use induction on m. If m = 0, then, by [1, Theorem 1.1], sdepthS ((x1 , . . . , xn )) =  n ⌈n/2⌉ = n − 2 , as required. The case m = n is trivial. Now, assume 1 ≤ m < n. Let S ′ = K[x2 , . . . , xn ] and denote J = (x2 , . . . , xn ) ⊂ S ′ and I = (x2 , . . . , xm ) ⊂ S ′ . According to Lemma 1.1, (x1 , J)/(x1 , I) ∼ = J/I and thus, by induction hypothesis, 1 , . . . , xn )/(x1 , . . . , xm )) = sdepthS ′ (J/I) = (n−1)−(m− k sdepthS ((x j  n−m  (n−1)−(m−1) = n − m − 2 , which complete the proof. 1) − 2 If we denote S ′′ = K[xm+1 , . . . , xn ], note that the above Corollary follows also from the isomorphism of multigraded S ′′ -modules, (x1 , . . . , xn )/(x1 , . . . , xm ) ∼ = (xm+1 , . . . , xn ). Lemma 1.3. Let 1 ≤ a < b be two integers, denote S ′ = K[x2 , . . . , xn ] and let J ⊂ S ′ L b−1 i ′ n ′ be a monomial ideals. Then (xa1 , J)/(xb1 , J) ∼ = i=a x1 (S /J), as Z -graded S -modules. a b ′ Moreover, sdepthS ((x1 , J)/(x1 , J)) = sdepthS ′ (S /J). Proof. The proof is similar to the proof of Lemma 1.1. In order to prove the Zn -graded L b−1 i ′ isomorphism (xa1 , J)/(xb1 , J) ∼ = i=a x1 (S /J), it is enough to see that a monomial u ∈ ′ i b a (x1 , J) \ (x1 , J) if and only if u = x1 · u , for some integer a ≤ i < b and some monomial u′ ∈ S \ J. The isomorphism implies sdepthS ((xa1 , J)/(xb1 , J)) ≥ sdepthS ′ (S ′ /J) and in order to prove the other inequality, as in Lemma 1.1, it is enough to note that xa1 (S ′ /J) = ((xa1 , J)/(xb1 , J)) ∩ xa1 (S ′ /J). Lemma 1.4. Let 1 ≤ a < b be two integers and denote S ′ := K[x2 , . . . , xn ]. Let I ⊂ J ⊂ S ′ be two monomial ideals. Then: sdepthS ((xa1 , J)/(xb1 , I)) ≥ min{sdepthS ′ (J/I), sdepthS ′ (S ′ /I)}. Proof. Note that (xa1 , J)/(xb1 , I) ∼ = (xa1 , J)/(xa1 , I)⊕(xa1 , I)/(xb1 , I) as Zn -graded S ′ -modules. Using Lemma 1.1 and Lemma 1.3 we get the required result. 2 Theorem 1.5. Let 0 ≤ m ≤ n be two integers. Let ai ≥ 1, for 1 ≤ i ≤ n and bi ≥ ai , for 1 ≤ i ≤ m, be some integers. Then sdepth((xa11 , . . . , xann )/(xb11 , . . . , xbmm )) = n − m − n−m 2 and thus, sdepthS ((xa11 , . . . , xann )/(xb11 , . . . , xbmm )) ≥ depthS ((xa11 , . . . , xann )/(xb11 , . . . , xbmm )). We use induction on m. If m = 0, by [2, Theorem 1.3], sdepthS ((xa11 , . . . , xann )) =   Proof. n = n − n2 , as required. If m = n, then (xa11 , . . . , xann )/(xb11 , . . . , xbnm ) is a finite K-vector 2 space and thus its Stanley depth is 0. Now, assume 1 ≤ m < n. We denote S ′ = K[x2 , . . . , xn ], J = (xa22 , . . . , xann ) ⊂ S ′ and I = (xb22 , . .. , xbmm) ⊂ S ′ . By induction hypothesis, we have sdepthS ′ (J/I) =  n−m  n − 1 − (m − 1) − n−m = n − m − . On the other hand, by [7, Theorem 1.1] 2 2 ′ or [4, Lemma 3.6], sdepthS ′ (S /I) = n − m. Thus, according to Lemma 1.4, we have  a1 b1 n−m an bm sdepthS ((x1 , . . . , xn )/(x1 , . . . , xm )) ≥ sdepthS ′ (J/I) = n − m − 2 . If a1 = b1 , by Lemma 1.1, we are done. Assume a1 L < b1 . We denoteL a = a1 , b = a−1 i b−1 i ′ a b ∼ b1 and we consider the decomposition (x1 , J)/(x1 , I) = i=0 x1 (J/I) ⊕ i=a x1 (S /I) given by Lemma L 1.4. As in the proof of Lemma 1.1, we consider a Stanley decomposition r b a b ′ (xa1 , J)/(x , I) = j=1 vj K[Zj ]. It follows that J/I = ((x1 , J)/(x1 , I)) ∩ (S /I) and thus, L1 J/I = x1 ∤vi vi K[Zi ]. In order to complete the proof, notice that depth((xa11 , . . . , xann )/(xb11 , . . . , xbmm )) = 1 if n > m and 0, if m = n. 2 The case of complete intersection ideals Lemma 2.1. Let 1 ≤ m < n be an integer, I1 ( J1 ⊂ S ′ := K[x1 , . . . , xm ] be two distinct monomial ideals and let I ⊂ S ′′ = K[xm+1 , . . . , xn ] be a monomial ideal. Then    ′′  J1 S (J1 , I) + sdepthS ′ . ≥ sdepthS ′′ sdepthS (I1 , I) I I1 Proof. Let u ∈ (J1 , I) \ (I1 , I) be a monomial. We write u = u′ · u′′ , where u′ ∈ S ′ and u′′ ∈ S ′′ . Since u ∈ (J1 , I), it follows that u ∈ J1 S or u ∈ IS. On the other hand, since u∈ / (I1 , I), it follows that u ∈ / I1 S and u ∈ / IS. Therefore, we get u ∈ J1 S and so u′ ∈ J1 . ′′ Also, since u ∈ / IS, it follows that u ∈ / I. Similarly, we have u′ ∈ / I1 . Thus, u is a product ′′ between a monomial from J1 \ I1 and a monomial from S \ I. Also, if we take two arbitrary ′ ′′ monomials u′ ∈ J1 \ I1 and u′′ ∈ S ′′ \ I1 , one can easily check that 1 , I). Lru · u ∈ (J1 , I) \ (I ′′ u K[Z ] and S /I = In consequence, given two Stanley decompositions J /I = i i=1 i Ls Lr Ls 1 1 j=1 ui vj K[Zi ∪ Yj ] is a Stanley dej=1 vj K[Yj ], it follows that (J1 , I)/(I1 , I) = i=1 composition and, thus, sdepthS ((J1 , I)/(I1 , I)) ≥ sdepthS ′ (J1 /I1 ) + sdepthS ′′ (S ′′ /I). Lemma 2.2. Let 1 ≤ m < n be an integer, I1 ( J1 ⊂ S ′ := K[x1 , . . . , xm ] be two monomial ideals and I2 ⊂ J2 ( S ′′ := K[xm+1 , . . . , xn ] be other monomial ideals. Then:    ′′     ′ (J1 , J2 ) J2 S J1 S sdepthS +sdepthS ′′ , sdepthS ′′ +sdepthS ′ }. ≥ min{sdepthS ′ (I1 , I2 ) J1 I2 I2 I1 3 Proof. We apply [5, Lemma 2.1] to the short exact sequence 0 −→ (J1 , I2 )/(I1 , I2 ) −→ (J1 , J2 )/(I1 , I2 ) −→ (J1 , J2 )/(J1 , I2 ) −→ 0, and thus we are done by Lemma 2.1. If u ∈ S is a monomial, denote supp(u) = {xi : xi |u} the support of the monomial u. Lemma 2.3. Let u1 , . . . , um ∈ S and v1 , . . . , vm ∈ S be two regular sequence of monomials, such that ui |vi and vj 6= uj for some index j. Then sdepthS ((u1 , . . . , um )/(v1 , . . . , vm )) = n−m. Moreover, (u1 , . . . , um )/(v1 , . . . , vm ) has a Stanley decomposition with all its Stanley spaces of dimension n − m. Proof. We use induction on m ≥ 1. If m = 1, then (u1 )/(v1 ) ∼ = S/(v1 /u1 ) and therefore sdepthS ((u1 )/(v1 )) = n − 1, by [7, Theorem 1.1]. Assume m > 1. We apply Lemma 2.2 for J1 = (u1, . . . , um−1 ), J2 = (um ), I1 = (v1 , . . . , vm−1 ) and I2 = (vm ). We get sdepthS ((u1 , . . . , um )/(v1 , . . . , vm )) ≥ min{sdepthS (S/J1 ) − 1, sdepthS (S/I2 ) − 1} = n − m + 1 − 1 = n − m. In order to prove the opposite inequality, let uK[Z] be a s Stanley space of (u1 , . . . , um )/(v1 , . . . , vm ). Since vi S ∩ uK[Z] = (0), it follows that there exists an index ji such that xji ∈ / Z. Now, since the v1 , . . . vm is a regular sequence, their supports are disjoint and therefore {xj1 , . . . , xjm } is a set of m variables which do not belong to Z and thus |Z| ≤ n − m. Note that the ” ≤ ” follows also from the inequalities sdepthS ((u1 , . . . , um )/(v1 , . . . , vm )) ≤ dim((u1, . . . , um )/(v1 , . . . , vm )) ≤ dim(S/(v1 , . . . , vm )) = n − m. Theorem 2.4. Let I ( J ⊂ S be two monomial complete intersection ideals. Assume J is generated by q monomials and I is generated by p monomials. Then:   q−p . n − p ≥ sdepth(J/I) ≥ n − p − 2 Proof. Assume J = (u1 , . . . , uq ) and I = (v1 , . . . , vp ). Since v1 , . . . , vp is a regular sequence on S, their supports are disjoint. If we take a Stanley space vK[Z] ⊂ J/I it follows, as in the proof of Lemma 2.3 that |Z| ≤ n − p, and thus n − p ≥ sdepthS (J/I). Now, we prove the second inequality. If p = 0, then, by [8, Theorem 1.1], we have q sdepthS (J/I) = sdepthS (J) = n − 2 and we are done. Also, in the case p = q, we are done by Lemma 2.3. Assume 1 ≤ p < q. Since I ⊂ J we can assume that u1 |v1 . Note that u1 ∤ vj for all j > 1. Indeed, if p ≥ 2 and u1 |v2 , then supp(v1 ) ∩ supp(v2 ) ⊇ supp(u1 ), a contradiction with the fact that v1 , v2 is a regular sequence. Thus, using induction, we may assume vi |ui for all 1 ≤ i ≤ p. We denote J1 = (u1 , . . . , up ) and J2 = (up+1 , . . . , uq ). We use decomposition (J1 , J2 )/I = (J1 , J2 )/J1 ⊕ J1 /I. Using [3, 2.4(5)] and   q−p   Corollary = n − p − . [7, Theorem 1.1], we get sdepthS ((J1 , J2 )/J1 ) ≥ sdepthS (S/J1 ) − q−p 2 2 On the other hand if I ( J1, by Lemma 2.3, sdepthS (J1 /I) = n − p. Thus, we get sdepthS ((J1 , J2 )/I) ≥ n − p − q−p , as required. 2 4 Corollary 2.5. With the notations of 2.4, if q = p + 1, then sdepthS (J/I) = n − p. Corollary 2.6. If J ( I ⊂ S are two monomial complete intersection ideals, then sdepthS (J/I) ≥ depthS (J/I). Proof. It is enough to notice that depthS (J/I) = n − q + 1 if q > p, or depthS (J/I) = n − q if q = p and then apply Theorem 2.4. Lemma 2.7. Let 1 ≤ m < n be an integer, I ( J ⊂ S ′ := K[x1 , . . . , xm ] be two distinct monomial ideals and let u ∈ S ′′ = K[xm+1 , . . . , xn ] be a monomial. Then   JS (J, u) − 1. = sdepthS sdepthS (I, u) IS Proof. Since sdepthS ′′ (S ′′ /(u)) = n − m − 1, the ” ≥ ” inequality follows by Lemma L 2.1. In order to prove the other inequality, let (J, u)/(I, u) = rj=1 vj K[Zj ] be a Stanley decomposition, with its Stanley depth equal with sdepthS ((J, u)/(I, u)). Note that J/I = ((J, u)/(I, u)) ∩ (S ′ /I). Indeed, as in the proof of Lemma 1.1, one can easily see that a monomial v ∈ (J, u) \ (I, u) if and only if v = v ′ · v ′′ for some monomials v ′ ∈ J \ I and v ′′ ∈ S ′′ \ (u). L L / S ′, It follows that J/I = ( rj=1 vj K[Zj ]) ∩ (S ′ /I) = rj=1 (vj K[Zj ] ∩ (S ′ /I)). If vj ∈ obviously, then vj K[Zj ] ∩ (S ′ /I) = {0}. If vj ∈ S ′ , then vj K[Zj ] ∩ (S ′ /I) = vj K[Zj \ {xm+1 , . . . , xn }]. Note that {xm+1 , . . . , xn } * Zj , because uS ∩ vj K[Zj ] = {0}. Thus, |Zj \{xm+1 , . . . , xn }| ≥ |Zj |−n+m+1. Thus, we obtained a Stanley decomposition for J/I with its Stanley depth ≥ sdepth((J, u)/(I, u))−n+m+1. It follows that sdepthS (JS/IS) = sdepthS ′ (J/I) + n − m ≥ sdepth((J, u)/(I, u)) + 1, as required. Lemma 2.8. Let 1 ≤ m < n be an integer, J ⊂ S ′ := K[x1 , . . . , xm ] be a monomial ideal and let u, v ∈ S ′′ = K[xm+1 , . . . , xn ] be two distinct monomials with u|v. Then   (J, u) S sdepthS − 1. = sdepthS (J, v) JS Proof. As in the proof of the previous lemma, by 2.1, we get the ” ≥ ” inequality. In order to prove the other inequality, note that (J, u) \ (J, v) ∩ u(S ′/J) = u(S ′ /J). Indeed, a monomial w ∈ (J, u)/(J, v) if and only if w = w ′ · w ′′ for some monomials w ′ ∈ S ′ \ J and w ′′ ∈ (u) \ (v). Using a similar argument as in the proof of Lemma 2.7, we are done. Now, we are able to prove the following result, which generalizes Theorem 1.5. Theorem 2.9. Let u1 , . . . , uq ∈ S and v1 , . . . , vp ∈ S be two regular sequences with ui |vi for all 1 ≤ i ≤ p, where q ≥ p are positive integers. We consider the monomial ideals J = (u1 , . . . , uq ) ⊂ S and I = (v1 , . . . , vp ). Weassume  also that up+1, . . . , uq is a regular q−p sequence on S/I. Then sdepth(J/I) = n − p − 2 . 5 Proof. We use induction on p. If p = 0, by [8] and [4, Lemma 3.6], we have sdepthS (J/I) = n−⌊q/2⌋ as required. If q = p, by Lemma 2.4, we get sdepth(J/I) = n−p and we are done. Now, assume 1 ≤ p < q. We denote J1 = (u2 , . . . , uqj) and I1 = k(v2 , . . . , vp ). By induction  q−p  = n − p − + 1. If hypothesis, we have sdepthS (J1 /I1 ) = n − p + 1 − (q−1)−(p−1) 2 2  q−p  u1 = v1 , by Lemma 2.7, it follows that sdepthS (J/I) = n − p − 2 , sowe may assume u1 6= v1 . Either way, by Theorem 2.4, we have sdepth(J/I) ≥ n − p − q−p . Note that this 2 inequality can be deduced also from Lemma 2.7 and Lemma 2.8, using the decomposition J/I = (J1 , u1 )/(I1 , u1) ⊕ (I1 , u1 )/(I1 , v1 ). Lr In order to prove the other inequality, we consider a Stanley decomposition J/I = j=1 wj K[Zj ] with its Stanley depth equal to sdepth(J/I). Since, by hypothesis, u2 , . . . , uq is a regular sequence on S/(v1 ), by reordering of variables, we may assume that supp(v1 ) = {xm+1 , . . . , xn } and u2 , . . . , uq ∈ S ′ := K[x1 , . . . , xm ], where 1 ≤ m < n is an integer. Thus J1 and I1 are the extension in S for some monomial ideals in J¯1 , I¯1 ⊂ S ′ generated by the same monomials as J1 and I1 . Note that J¯1 /I¯1 = (J/I) ∩ (S ′ /I¯1 ) , where we regard S ′ /I¯1 as a submodule of S/I. Using the same argument as in the proof of Lemma 2.7, we get sdepthS ′ (J¯1 /I¯1 ) ≥ sdepthS (J/I) − n + m+ 1.On the other hand, by induction hypothesis, we have sdepthS ′ (J¯1 /I¯1 ) = m − p + 1 − q−p , and thus we are done. 2 Remark 2.10. Note that the hypothesis up+1, . . . , uq is a regular sequence on S/I from the Theorem 2.9 is essential in order to have the equality. Take for instance J = (x1 , x2 , x3 ) ⊂ S and I = (x1 x2 x3 ). Then J/I = x1 K[x1 , x2 ] ⊕ x2 K[x2 , x3 ] ⊕ x3 K[x  1 , x3 ] is a Stanley decomposition for J/I and therefore sdepthS (J/I) = 2 > 3 − 1 − 3−1 = 1. 2 We end our paper with the following result, which generalize [3, Proposition 2.7] and [6, Proposition 1.3]. Proposition 2.11. Let I ⊂ J ⊂ S be two monomial ideals and let u ∈ S be a monomial. Then, either (I : u) = (J : u), either sdepthS ((J : u)/(I : u)) ≥ sdepthS (J/I). Proof. It is enough to consider the case u = x1 and to assume that (I : x1 ) ( (J : x1 ). Firstly, note that x1 (I : x1 ) = I ∩ (x1 ) and x1 (J : x1 ) = J ∩ (x1 ). Therefore, we have (J : x1 )/(I : x1 )L∼ = (J/I) ∩ (x1 ), as multigraded K-vector spaces. = (J ∩ (x1 ))/(I ∩ (x1 )) ∼ r Let L J/I = i=1 ui K[Zi ] be a Stanley decomposition for J/I. It follows that (J/I) ∩ (x1 ) = ri=1 (ui K[Zi ] ∩ x1 S). One can easily see that, if x1 ∈ / supp(ui ) ∪ Zi , then ui K[Zi ] ∩ x1 S = {0}. Otherwise, we claim that ui K[Zi ] ∩ x1 S = LCM(ui , x1 )K[Zi ]. Indeed, if x1 |ui , then ui K[Zi ] ⊂ x1 S and the previous equality holds. If x1 ∤ ui , then x1 ∈ Zi and LCM(ui , x1 ) = x1 ui . Obviously, we get x1 ui K[Zi ] ⊂ ui K[Zi ]∩x1 S. For the other inclusion, chose v ∈ ui K[Zi ] ∩ x1 S a monomial. It follows that v ∈ ui K[Zi ] and x1 |v and thus x1 ui |v, since x1 ∤ ui . Therefore, v ∈ x1 ui K[Zi ] and we are done. By our assumption that (I : x1 ) ( (J : x1 ), there exists some i such that ui K[Zi ]∩x1 S 6= {0}. Thus, we obtain a Stanley decomposition for (J/I) ∩ (x1 ) with its Stanley depth ≥ than the Stanley depth of the given decomposition for J/I. 6 References [1] Csaba Biro, David M.Howard, Mitchel T.Keller, William T.Trotter, Stephen J.Young ”Interval partitions and Stanley depth”, Preprint 2008. [2] M. Cimpoeas, Stanley depth for monomial complete intersection, Bull. Math. Soc. Sc. Math. Roumanie 51(99), no.3, (2008), 205-211. [3] M. Cimpoeas, Several inequalities regarding Stanley depth, Romanian Journal of Math. and Computer Science 2(1), (2012), 28-40. [4] J. Herzog, M. Vladoiu, X. Zheng, How to compute the Stanley depth of a monomial ideal, Journal of Algebra 322(9), (2009), 3151-3169. [5] R. Okazaki, K. Yanagawa, Alexander duality and Stanley decomposition of multigraded modules, Journal of Algebra 340, (2011), 32-52. [6] D. Popescu, An inequality between depth http://arxiv.org/pdf/0905.4597.pdf, Preprint 2010. and Stanley depth, [7] A. Rauf, Stanley Decompositions, Pretty Clean Filtrations and Reductions Modulo Regular Elements, Bull. Math. Soc. Sc. Math. Roumanie, 50(98), (2007), 347-354. [8] Y. Shen, Stanley depth of complete intersection monomial ideals and upper-discrete partitions, Journal of Algebra 321(2009), 1285-1292. [9] R. P. Stanley, Linear Diophantine equations and local cohomology, Invent. Math. 68, 1982, 175-193. Mircea Cimpoeaş, Simion Stoilow Institute of Mathematics, Research unit 5, P.O.Box 1-764, Bucharest 014700, Romania E-mail: [email protected] 7
0math.AC
arXiv:1704.06818v2 [cs.DS] 11 Oct 2017 Adaptive Cuckoo Filters Michael Mitzenmacher1 , Salvatore Pontarelli2 , and Pedro Reviriego3 1 Harvard University, 33 Oxford Street, Cambridge, MA 02138, USA., [email protected] 2 Consorzio Nazionale Interuniversitario per le Telecomunicazioni (CNIT), Via del Politecnico 1, 00133 Rome, Italy., [email protected] 3 Universidad Antonio de Nebrija, C/ Pirineos, 55, E-28040 Madrid, Spain., [email protected] October 12, 2017 Abstract We introduce the adaptive cuckoo filter (ACF), a data structure for approximate set membership that extends cuckoo filters by reacting to false positives, removing them for future queries. As an example application, in packet processing queries may correspond to flow identifiers, so a search for an element is likely to be followed by repeated searches for that element. Removing false positives can therefore significantly lower the false positive rate. The ACF, like the cuckoo filter, uses a cuckoo hash table to store fingerprints. We allow fingerprint entries to be changed in response to a false positive in a manner designed to minimize the effect on the performance of the filter. We show that the ACF is able to significantly reduce the false positive rate by presenting both a theoretical model for the false positive rate and simulations using both synthetic data sets and real packet traces. 1 Introduction Modern networks need to classify packets at high speed. A common function in packet processing is to check if a packet belongs to a set S. As a simple example, if the source of the packet is on a restricted list, the packet should be subject to further analysis. In some applications, the cost of such a check can be beneficially reduced via an approximate membership check that may produce false positives but not false negatives; that is, it may with small probability say an element is in a set even when it is not. We first use the approximate 1 membership check, and if we are told the element is not in the set we can safely continue regular processing. On a positive response a more expensive full check may be done to find the false positives, removing them from further analysis. Packets with a source on the restricted list are always correctly identified. This approach speeds the common case by storing the approximate representation of the set S in a small fast memory, and the exact representation of S in a bigger but slower memory that is accessed infrequently. The well known example of a data structure for approximate set membership is the Bloom filter [1], which is widely used in networking applications. Many variants and enhancements for Bloom filters have been proposed [2]. There are other data structures that also provide approximate membership checks with improved performance, such as the recently proposed cuckoo filter [3] that stores fingerprints of the elements in a suitable cuckoo table [4], as we describe in more detail in Section 2. A key parameter for such data structures is the false positive probability, which gives the probability that an element not in the set yields a false positive. A slightly different quantity is the false positive rate, which gives the fraction of false positives for a given collection of queries (or, in some settings, for a given distribution of the input queries). If an element that gives a false positive is queried for many times, the false positive rate may be much higher than the false positive probability, even though in expectation over suitably randomly chosen hash functions the false positive rate should be close to the false positive probability. In many network applications, the queried elements are repeated. For example, let us consider an application in which we track the packets of a subset of the 5-tuple flows on a link. We may use an approximate membership check for each packet to tell us if the packet belongs to one of the flows that we are tracking, in which case it is subject to more expensive processing. In this application, receiving a packet with 5-tuple x makes it very likely that we will receive other packets with the same 5-tuple value in the near future. Now suppose that a packet with 5-tuple x returns a false positive on the approximate membership check. It is clear that we would like to adapt the approximate membership check structure so that x will not return a false positive for the following packets of the same flow. Ideally, the false positive responses could theoretically be reduced to one per flow, lowering the false positive rate. Such adaptation cannot be easily done for the existing approximate membership check structures. A variation of a Bloom filter, referred to as a retouched Bloom filter, removes false positives (by changing some bits in the filter to 0), but can create false negatives by doing so [5]. Other options include changing the number of hash functions according to the likelihood of an element being in a set [6],[7], but this approach requires additional offline information and computation that does not appear natural for many settings. In all of these cases, removing the false positives significantly changes the nature of the data structure. We introduce the adaptive cuckoo filter (ACF), an approximate membership check structure that is able to selectively remove false positives without introducing false negatives. The scheme is based on cuckoo hashing [4] and uses 2 fingerprints, following standard cuckoo filters [3]. In contrast with the cuckoo filter, where movements in the cuckoo table can be based solely on the fingerprints, here we assume we have the original elements available, although they can be in a slower, larger memory. When inserting a new element, existing elements can be moved. Our enhancement is to allow different hash functions for the fingerprints, which allows us to remove and reinsert elements to remove false positives without affecting the functionality of the filter. The removal of false positives is almost as simple as a search operation, and does not substantially impact performance. Instead, the impact is felt by having a slightly more complex insertion procedure, and requiring slightly more space than a standard cuckoo filter to achieve the same false positive probability. Of course, since the ACF is adaptive, it generally achieves a better false positive rate than a standard cuckoo filter with the same space, and our goal here is to improve the false positive rate (as opposed to the false positive probability). We provide a theoretical model that provides accurate estimates for ACF performance. We validate ACF performance through simulations using synthetic data and real packet traces. The results confirm that the ACF is able to reduce false positives, making it of interest for many networking applications. Before beginning, we emphasize that the ACF is not a general replacement for a Bloom filter or cuckoo filter, but an optimization that is particularly wellsuited to the setting when a pre-filter is desired to avoid unnecessary accesses to memory for data that is not stored there. There are many applications where the original, complete data is required in any case, and the filter is used as a first stage screen to prevent the need to access slower memory to check the original data. For example, for both whitelists and blacklists, a pre-filter could make lookups much more efficient, but all proposed positives would be checked against the original data. Even if only an approximate set membership data structure without the original data is required, in some architectures the memory cost of a slower and larger memory to hold the original data may be relatively inexpensive. However, we note that our need for storing the original data might make the use of ACFs unsuitable for many applications. The rest of the paper is organized as follows. Section 2 briefly reviews the data structures on which the ACF is based, namely cuckoo hash tables and cuckoo filters. Section 3 introduces the ACF, describing its implementation and providing a model of its expected performance. The ACF is evaluated in Section 4 using both randomly generated packets and real packet traces to show its effectiveness. We conclude with a summary and some ideas for future work. 2 Preliminaries We provide a brief overview of cuckoo hashing [4] and cuckoo filters [3]. 3 2.1 Cuckoo hashing Cuckoo hash tables provide an efficient dictionary data structure [4]. A cuckoo hash table can be implemented as a collection of d subtables composed of b buckets each, with each bucket having c cells. The hash table uses d hash functions h1 , h2 , . . . , hd , where the domain is the universe of possible input elements and the range is [0, b). We assume that all functions are independent and uniform; such assumptions are often reasonable in practice [8]. A given element x can be placed in bucket hi (x) in the ith subtable; each element is placed in only one bucket. The placement is done so that there are at most c elements in any bucket. This limitation can require moving elements among their choices of buckets when a new element is inserted. Values associated with elements can be stored with them if that is required by the application; alternatively, pointers to associated values kept in an external memory can also be stored. The structure supports the following operations: Lookup: Given an element x, the buckets given by the hi (x) are examined to see if x is in the table. Insertion: Given an element x, we first check that x is not already in the table via a lookup. If not, we sequentially examine the buckets hi (x). If there is empty space, x is inserted into the first available space. If no space is found, a value j is chosen independently and uniformly at random from [1, d], and x is stored in the jth subtable at bucket hj (x). This displaces an element y from that bucket, and then the insertion process is recursively executed for y. Deletion: Given an element x, x is searched for via a lookup; if it is found it is removed. Cuckoo hash tables are governed by a threshold effect; asymptotically, if the load, which is the number of elements divided by the number of cells, is below a certain threshold (which depends on c and d), then with high probability all elements can be placed. The above description of insertion is somewhat incomplete, as there is room for variation. For example, the displaced element y is often chosen uniformly at random from the bucket, and it is often not allowed to put y immediately back into the same bucket. The description also does not suggest what to do in case of a failure. Generally after some number of recursive placement attempts, a failure occurs, in which case elements can be re-hashed, or an additional structure referred to as a stash can be used to hold a small number of items that would not otherwise be placed [9]. An alternative implementation of cuckoo hashing uses a single table of buckets, so each hash function can return any of the buckets. The two alternatives provide the same asymptotic performance in terms of memory occupancy. As previously stated, the asymptotic load threshold depends on the values of c and d, the number of cells per bucket and the number of hash functions. In practice, even for reasonably sized systems one obtains performance close to the asymptotic load threshold. Two natural configurations include d = 2 and 4 c = 4, which gives a threshold over 98%, and d = 4 and c = 1 which gives a threshold of over 97%. These configurations give high memory utilization, while requiring a small memory bandwidth [10]. The decision for what configuration to use may depend on the size of the item being stored and the natural cell size for memory. Note that if subtables can be put on distinct memory devices, then lookup operations can possibly be completed in one memory access cycle by searching subtables in parallel [11]. 2.2 Cuckoo filters A cuckoo filter is an approximate membership check data structure based on cuckoo hash tables [3]. Instead of storing set elements, a cuckoo filter stores fingerprints of the elements, obtained using an additional hash function. In this way, it uses less space, while still being able to ensure a low false positive probability. In the suggested implementation, each element is hashed to d = 2 possible buckets, with up to c = 4 elements per bucket. To achieve small space, the cuckoo filter does not store the original elements. A difficulty arises in moving the fingerprints when buckets are full, as is required by the underlying cuckoo hash table. The cuckoo filter uses the following method, referred to as partial-key cuckoo hashing. If the fingerprint of an element x is f (x), its two bucket locations will be given by h1 (x) and h1 (x) ⊕ h2 (f (x)). Notice that, given a bucket location and a fingerprint, the other bucket location can be determined by computing h2 (f (x)) and xoring the result with the current bucket number. The structure supports the following operations, where in what follows we assume an insertion is never performed for an element already in the structure: Lookup: Given an element x, compute its fingerprint f (x), and the bucket locations h1 (x) and h1 (x) ⊕ h2 (f (x)). The fingerprints stored in these buckets are compared with f (x). If any fingerprints match f (x), then a positive result is returned, otherwise a negative result is returned. Insertion: Given an element x, compute the two bucket locations and the fingerprint f (x). If a cell is open in one of these buckets, place f (x) in the first available open cell. Otherwise, a fingerprint f (y) in one of the buckets is displaced, and then recursively placed, in the same manner as in a cuckoo hash table. Here we use that both buckets for y can be determined from f (y) and the bucket from which f (y) was displaced. Deletion: Given an element x, x is searched for via a lookup. If the fingerprint f (x) is found in one of the buckets, one copy of the fingerprint is removed. The false positive probability of a cuckoo filter can be roughly estimated as follows. If a bits are used for the fingerprints and the load of the hash table is `, the false positive probability will be approximately 8`/2a . This is because on average the search will compare against 8` fingerprints (assuming 2 choices of 5 buckets with 4 cells per bucket), with each having a probability 2−a of yielding a false positive. 3 Adaptive Cuckoo Filter Construction Before beginning, we note that pseudocode for our algorithms appear in the Appendix. Our proposed ACF stores the elements of a set S in a cuckoo hash table. A replica of the cuckoo hash table that stores fingerprints instead of full elements is constructed, and acts as a cuckoo filter. The key difference from the cuckoo filter is that we do not use partial-key cuckoo hashing; the buckets an element can be placed in are determined by hash values of the element, and not solely on the fingerprint. To be clear, the filter uses the same hash functions as the main cuckoo hash table; the element and the fingerprint are always placed in corresponding locations. Using the filter, false positives occur when an element not in the set has the same fingerprint as an element stored in one of the positions accessed during the search. A false positive is detected by examining the cuckoo hash table when a positive result is found; if the element is not found in the corresponding location – specifically, in the same bucket and same position within that bucket as the corresponding fingerprint – a false positive has occurred, and moreover we know what element has caused the false positive. As we explain below, to remove the false positive, we need to change the fingerprint associated with that element, by using a different fingerprint function. We suggest two ways of accomplishing this easily below. Before describing the structure in more detail, we define the parameters that will be used. • The number of tables used in the Cuckoo hash: d. • The number of cells per bucket: c. • The total number of cells over all tables: m. • The number of buckets per table: b = m/(d · c). • The occupancy or load of the ACF: `. • The number of bits used for the fingerprints: a. To see the potential benefits of the ACF, let us consider its behavior over a window of time. Let us suppose that a fraction p1 of operations are lookups, p2 are insertions, and p3 are deletions. Let us further suppose that of the lookup operations, a fraction q1 are true positives, and the remaining fraction 1 − q1 have a false positive rate of q2 . If we assume costs cI , cD , cP , and cF for the inserts, deletes, positive lookups, and negative lookups, we find the total cost is: p1 ((q1 + (1 − q1 )q2 )cP + (1 − q1 )(1 − q2 )cF ) + p2 cI + p3 cD . 6 In the types of implementations we target, we expect p1 to be large compared to p2 and p3 , so that the cost of lookups dominate the costs of insertions and deletions. We also expect q1 to be small, and cF to be much less than cP , so a filter can successfully and at low cost prevent lookups to slow memory. In this case the dominant cost corresponds to the term p1 (q1 + (1 − q1 )q2 )cP , and as q1 is small, the importance of minimizing the false positive rate q2 is apparent. We now present variants of the ACF and discuss their implementation. 3.1 ACF for buckets with one cell We present the design of the ACF when the number of tables is d = 4 and the number of cells per bucket is c = 1. This configuration achieves similar utilization as d = 2 and c = 4 and requires less memory bandwidth [10] at the cost of using more tables. The ACF consists of a filter and a cuckoo hash table, with both having the same number of tables and numbers of cell per bucket, so that there is a one-to-one correspondence of cells between the two structures. The ACF stores only a fingerprint of the element stored in the main table. To implement the ACF we use a small number of bits within each bucket in the ACF filter to represent a choice of hash function for the fingerprint, allowing multiple possible fingerprints for the same element. We use s hash selector bits, which we denote by α, to determine which hash function is used to compute the fingerprint stored in that bucket. We refer to the fingerprint hash functions as f0 , f1 , . . . , f2s −1 . For example, by default we can set α = 0 and use f0 (x). If we detect a false positive for an element in that bucket then we increment α to 1 and use f1 (x) (For convenience we think of the s bits as representing values 0 to 2s − 1). In most cases this will eliminate the false positive. On a search, we first read the hash selector bits, and then we compute the fingerprint using the corresponding fingerprint function before comparing it with the stored value. The downside of this approach is we are now using a small number of additional bits per cell to represent the choice of hash function, increasing the overall space required. In more detail, to remove a false positive, we increment α (modulo 2s ) and update the fingerprint on the filter accordingly (Sequential selection is slightly better than random selection as it avoids picking a value of α that recently produced another false positive). We verify that the adaptation removes the false positive by checking that the new fingerprint is different from the new fingerprint for the element that led to the false positive. For example, if x created a false positive with an element y stored on the ACF when α = 1, we can increment α and check that f2 (x) 6= f2 (y); if the fingerprints match we can increment α again. This refinement is not considered in the rest of the paper as the probability of removing the false positive is already close to one (1 − 1/2a ) and we want to keep the adaptation procedure as simple as possible. The insertion and deletion procedures use the standard insertion or deletion methods for the cuckoo hash table, with the addition that any insertions, deletions, or movement of elements are also performed in the filter to maintain the one-to-one relationship between elements and fingerprints. 7 To perform a search for an element x, the filter is accessed and buckets h1 (x), . . . , h4 (x) are read. From each bucket the corresponding fingerprint and α value is read and the fingerprint value is compared against fα (x). If there is no match in any table, the search returns that the element is not found. If there is a match, the cuckoo hash table is accessed to see if x is indeed stored there. If there is a match but x is not found, a false positive is detected. The search in the filter of an ACF is similar to a search in a cuckoo filter and should have a similar false positive probability; however, we can reduce the false positive rate. We emphasize again that the false positive probability corresponds to the probability that a “fresh,” previously unseen element not in the set yields a false positive. Instead, the false positive rate corresponds to the fraction of false positives over a given sequence of queries, which may repeatedly query the same element multiple times. To model the behavior of the ACF, we will define a Markov chain that describes the evolution of α in a single bucket of the filter, with changes to α triggered by the occurrence of false positives. We assume that we have ζ elements that are not in the hash table that are currently checked on a given bucket; this is the set of potential false positives on that bucket. We assume that requests from the ζ elements are generated independently and uniformly at random; while arguably this assumption is not suitable in many practical situations, it simplifies the analysis, and is a natural test case to determine the potential gains of this approach. (More skewed request distributions will generally lead to even better performance for adaptive schemes.) We further assume that the hash table is stable, that is no elements are inserted and deleted, in the course of this analysis of the false positive rate. Finally, we first perform the analysis from the point of view of a single bucket; we then use this to determine the overall expected false positive rate over all buckets. We analyze the false positive rate assuming that these are the only queries; true matches into the hash table are not counted in our analysis, as the frequency with which items in the table are queried as compared to items not in the table is applicationdependent. Without loss of generality we may assume that an element x is in the hash table, and the fingerprint value f0 (x) is located in the cell. (If there is no element in the cell, then there are no false positives on that cell.) The number of elements that provide a false positive on the first hash function is a binomial random variable Bin(ζ, 2−a ), which we approximate by a Poisson random variable with mean ζ2−a for convenience. We refer to this value by the random variable Z1 , and similarly use Zj to refer to the corresponding number of elements that provide a false positive for the j-th hash function. It is a reasonable approximation to treat the Zj as independent for practical values of ζ and a, and we do so henceforth. We can now consider a Markov chain with states 0, 1, . . . , 2s − 1; the state i corresponds to α = i, so the cell’s fingerprint is fi (x). The transitions of this Markov chain are from i to i + 1 modulo 2s with probability Zi /ζ; all other transitions are self-loops. Note that if any of the Zi are equal to zero, we obtain a finite number of false positives before finding a configuration with 8 no additional false positives for this set of ζ elements; if all Zi are greater than zero, then we obtain false positives that average to a constant rate over time. Using this chain, we can determine the false positive rate. Specifically, let us suppose that we run for n queries. Let µ = ζ2−a , so that −µ e is our approximation for the probability that there are no false positives for a given hash function. We first note that for any value k < 2s we have a probability Pstop (k) = (1 − e−µ )k e−µ to finish in a configuration with no additional false positives after the bucket is triggered by k false positives. For this case the false positive rate is simply k/n, if we suppose that n is sufficiently large to trigger the system up to the final state. For the case where all hash functions have at least one element that yields a false positive, so that all the Zi are greater than 0, the expected number of queries to complete a cycle from the first hash function and back again, given the Zi values, is given by the following expression: s 2X −1 j=0 ζ . Zj Over this many queries, we obtain 2s false positives, The overall asymptotic false positive rate F (ζ, n) for a bucket which stores an element and to which ζ > 0 elements not in the hash table map can therefore be expressed as: F (ζ, n) = s 2X −1 (1 − e −µ i −µ i=1 )e i + n X s 2Y −1 Z0 ,Z1 ,...,Z2s −1 >0 i=0 e−µ µZi Zi ! ! 2s P2s −1 i=0 ζ Zi . Notice that this expression is a good approximation even for reasonably small values of n. Further, when n is large, the first term will be comparatively small compared to the second. The previous analysis considered a bucket in isolation. We now move to consider the false positive rate for an entire table that has bd buckets with an occupancy `. The number of elements ζ that map to each bucket is a binomial random variable, asymptotically well-approximated by a Poisson random variable. Let us assume that there are A elements not stored that are searched for in the table; then ζ can be approximated by a Poisson random variable with mean eb = A/b. Over a collection of N queries to the table, the total number of queries j that map to a bucket with ζ items is itself a binomial random variable, asymptotically well-approximated by a Poisson random variable with mean N ζ/A. We conclude that the (asymptotic, approximate) average false positive rate F over all buckets is: F = bd` X e−eb eb ζ X e−ζN/A (ζN/A)j F (ζ, j)(j/N ) . ζ! j! ζ>0 j≥0 9 While we do not provide a full proof here, we note that standard concentration results can be used to show that in this model the false positive rate over all the buckets is close to the expected false positive rate calculated above. Such concentration means we should not see large variance in performance over instantiations of the ACF structure in this setting. Although we have looked at a model where each query is equally likely to come from each of the ζ flows, so each has approximately the same size ne , we could generalize this model to settings where the ζ flows correspond to a small number of types (or rates), and then consider similar calculations based on the number of false positives of each rate. Intuitively, the setting we have chosen where each flow is equally likely to be queried at each step is the worst case for us, as it leads to the fastest cycling through the 2s fingerprint hash functions in the case that each fingerprint has at least one false positive. This will be confirmed by the results presented in the evaluation section. 3.2 ACF for buckets with multiple cells We now examine the case where the number of tables is d = 2 and the number of cells per bucket is c = 4, the case that was studied originally in constructing cuckoo filters [3]. The ACF again consists of a filter and a cuckoo hash table with a one-to-one correspondence of cells between the two structures; the ACF holds the fingerprint of the element stored in the main table. To reduce the false positive rate, the hash functions used for the fingerprint are different for each of the cell locations, so that in our example there will be four possible fingerprints for an element, f1 (x), f2 (x), f3 (x) and f4 (x), each corresponding to a cell (1, 2, 3, and 4) in the bucket. The insertion and deletion procedures use the standard insertion or deletion methods for the cuckoo hash table, with the addition that any changes are matched in the filter to maintain the one-to-one relationship between elements and fingerprints. Note that if an element is moved via insertion to a different cell location, its fingerprint may correspondingly change; if an element x moves from cell 1 to cell 2 (either in the same bucket or a different bucket), its fingerprint changes from f1 (x) to f2 (x). The search is similar to the case described in the previous subsection. When there is a match in the filter but not the main table, a false positive is detected. We describe how this ACF responds when a false positive occurs. Suppose a search for an element x yields a false positive; the fingerprints match, but element y is stored at that location in the cuckoo hash table. For convenience let us assume that the false positive was caused by the fingerprint stored in the first cell of the first table, and that there is another element z in the second cell on the first table. Then, we can swap y and z in the ACF, keeping them in the same bucket, so that now instead of f1 (y) and f2 (z), the bucket will hold f1 (z) and f2 (y) in the first two cells. If subsequently we search again for x, in most cases f1 (z) and f2 (y) will be different from f1 (x) and f2 (x), and therefore the false positive for x will be removed. If we search for y or z, we still obtain a match. As a result of the change, however, we might create false positives 10 for other elements that have also been recently queried. More precisely, when a lookup provides a positive response but the cuckoo hash table does not have the corresponding element, there was a false positive and the filter adapts to remove it by randomly selecting one of the elements in the other c − 1 cells on the bucket and performing a swap. To model the ACF for buckets with multiple cells, we define a Markov chain that takes into account the evolution of a bucket as cells are swapped. As before we assume fingerprints of a bits, with ζ elements creating potential false positives, and each request being independently and uniformly chosen from this set of elements. Without loss of generality we may assume that elements w, x, y, and z are in the bucket being analyzed, initially in positions 1, 2, 3, and 4 respectively. Let Zw,1 be the number of elements that yield a false positive with element w when it is in position 1, that is when the corresponding value is f1 (w), and similarly for the other elements and positions. Here, since some buckets may not be full, we can think of some of these elements as possibly being “null” elements that do not match with any of the ζ potential false positives. For non-null elements, as before, Zw,1 is distributed as a binomial random variable Bin(ζ, 2−a ), approximated by Poisson random variable with mean µ = ζ2−a , and we treat the random variables as independent. We use Ẑ to refer to a 16-dimensional vector of values for Zw,1 , Zw,2 , etc. In this setting, we consider a Markov chain with states being the 24 ordered tuples corresponding to all possible orderings of w, x, y, and z. The transition probability from for example the ordering (w, x, y, z) to (x, w, y, z) is given by Zx,2 Zw,1 + ; 3ζ 3ζ that is, with probability Zw,1 /ζ the query is for an element that gives a false positive against w, and then with probability 1/3 the elements x and w are swapped, and similarly for the second term in the expression. Any transition corresponds to either a swap of two elements or a self-loop. It is possible an absorbing state can be reached where there is no transition that leaves that state – that is, there are no false positives in the given state – if there is some permutation where the corresponding Z variables for transitions out of that state are all 0. However, there may be no such absorbing state, in which case the false positives average to a constant rate over time. (This is similar to what we have previously seen in the ACF with one cell per bucket.) While there is no simple way to write an expression for the false positive rate for a bucket based on Ẑ, as there was in the setting of one cell per bucket, the calculations are straightforward. Given values for a vector of Ẑ, we can determine the false positive rate by determining either the expected number of transitions to reach the stable state, or the expected overall rate of false positives, depending on the values. Thus, in theory, we can determine the overall expected false positive rate, similarly to the case of buckets with one cell. That is, we can calculate the probability of each vector Ẑ, and determine either the probability distribution on the number of false positives before reaching an absorbing state (if one exists), or the expected 11 time between false positives (which can be derived from the equilibrium distribution if there is no absorbing state), and take the corresponding weighted sum. In practice we would sum over vectors Ẑ of sufficient probability to obtain an approximation good to a suitable error tolerance; however, we find the number of relevant vectors Ẑ is very large, making this computation impractical. Instead, we suggest a sampling-based approach to determine the false positive rate. Vectors Ẑ are sampled a large number of times with the appropriate probability, with the corresponding false positive rate for a bucket determined for each sampled Ẑ, to obtain a reasonable approximation. This sampling process must take into account that some cells may be left unoccupied. Based on this, we can calculate an estimate for the expected false positive rate for a single bucket to which ζ elements map, and then find the overall false positive rate by taking appropriate weighted averages, again similarly to the case of one cell per bucket. 3.3 Implementation considerations Both variants of the ACF we have proposed are simple, and straightforward to implement. The search operation is similar to that of a cuckoo hash table, with the cuckoo filter acting as a prefilter. Indeed, if there is no false positive, the cuckoo filter will determine what bucket the element is in, so that only one bucket in the cuckoo hash table will need to be checked for the element. On a false positive, after checking the table the additional work to modify the table to adapt requires only a few operations. Both variants of the ACF require the computation of different hash functions to obtain the fingerprints. This adds some complexity to the implementation. However the overhead is expected to be small as hash functions can be computed in very few clock cycles (e.g. CLHASH is able to process 64 bytes in one clock cycle [12]) in modern processors exploiting the last x86 ISA extensions [13] or implemented in hardware with low cost. In both variants, it may be possible to compute multiple fingerprints of an element at once, since most hash functions return either 32 or 64 bits, and these bits can be split into multiple fingerprints. In a hardware or modern processor implementation, hash computations are commonly much faster than memory accesses. Therefore, the time required to perform a lookup in the filter is typically dominated by the memory accesses to the filter cells. The number of such memory accesses is the same for both the cuckoo filter and the ACF. Therefore, we can argue that they will achieve similar lookup speeds. We have assumed thus far that adaptation, or the procedure to remove a false positive, is done every time a false positive is found. This is straightforward, but might not be optimal in some settings, depending on the costs of changing the ACF cuckoo hash table and filter. We leave consideration of alternative schemes that do not try to modify the ACF on each false positive for future work. For our algorithms, we have not considered the additional possibility of moving items to another bucket when false positives are detected, although this is possible with cuckoo hashing. Our motivation is in part theoretical and in part practical. On 12 the practical side, such movements would potentially be expensive, similar to additional cuckoo hash table insertions. On the theoretical side, analyzing the false positive rate when items are moving in the table seems significantly more difficult. Again, considerations of such schemes would be interesting for future work. 4 Evaluation To evaluate the performance of our proposed ACF implementations, we have simulated both with queries that are generated according to different parameters and also with real packet traces. In the first case, the goal is to gain understanding about how the performance of the ACF depends on the different parameters while in the second, the goal is to show that the ACF can provide reductions on the false positive rate for real applications. The results are also compared with those of the analytic estimates presented in Section 3. We note that we do not compare with possible alternatives such as the retouched Bloom filter or varying the number of hash functions because they are not directly comparable with the ACF; the retouched Bloom filter introduces false negatives, and varying the number of hash functions requires additional offline information. The original cuckoo filter is the best natural alternative with which to compare. 4.1 Simulations with generated queries The first set of simulations aims to determine the effect of the different parameters on the performance of the ACF. The ACF is filled with randomly selected elements up to 95% occupancy; let S be the number of elements stored in the ACF. Then A elements that are not in the ACF are randomly generated.The queries are then generated by taking randomly elements from A with all elements having the same probability and the false positive rate is measured. We consider the following configurations: • ACF with d = 4, c = 1 (first variant) and s = 1, 2, 3. • ACF with d = 2, c = 4 (second variant). • Cuckoo filter with d = 4, c = 1. We note that we only provide results for the cuckoo filter with d = 4, c = 1 and not for the cuckoo filter with d = 2, c = 4 in our comparisons as the former achieves a significantly better false positive rate than the latter. To provide an initial understanding of the ACF performance, we fix the same probability of being selected for a query for all elements, so that on average each has ne queries. For the first variant we set the number of buckets to 32768 for each table, so the overall number of cells is 131072. For the second variant there are two tables and each table has 16384 buckets. The overall number of cells 13 is 131072 also in this case. The number of bits for the fingerprint a is set to 8,12 and 16 so that the standard cuckoo filter with d = 4, c = 1 gets a false positive rate of approximately 1.5%, 0.1%, and 0.006% at 95% occupancy. The same number of bits per cell is used for the different ACF configurations. This means that for the first variant the number of fingerprint bits are 8 − s, 12 − s, and 16 − s. The ACFs are adapted on every false positive. The value of ne is set to 10, 100, and 1000 and the experiment is repeated for several ratios of elements not in the set (A) to elements in the set (S) that appear in the queries ranging from 1 to 100. The A/S ratios used in the experiment are {1, 2, 3, 4, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100}. Figure 1: False positive rate versus A/S ratio for the different configurations when using 8 bits per cell. Figure 2: False positive rate versus A/S ratio for the different configurations when using 12 bits per cell. Figures 1, 2, and 3 present results for 8, 12 and 16 bits per cell respectively. The average over 10 trials is reported. We observe, as expected, that the false positive rates for the ACFs are better for lower A/S ratios, and that the performance of the ACF improves when the number of queries per element ne increases. We also see that the second variant of the ACF (d = 2, c = 4) provides better performance than the first variant (d = 4, c = 1) in almost all cases. This result backs the intuition that the second variant would perform better as it does not require any bits to track the hash function currently selected in the cell. Focusing on a comparison with a standard cuckoo filter, the ACFs outperform the cuckoo filter for all A/S ratios considered when the number of bits per cell is 12 or 16. (Here we count only the data in the filter part, and do not 14 Figure 3: False positive rate versus A/S ratio for the different configurations when using 16 bits per cell. count the additional memory for the original data.) When the number of bits per cell is 8, the ACF has a lower false positive rate only when the A/S ratio is small. In configurations where A/S is large and the number of bits per cell is small, there are a large number of false positives, causing many cells to fail to adapt sufficiently, as they simply rotate through multiple false positives. In contrast, the reductions in the false positive rate for ACFs can be of several orders of magnitude for small values of the A/S ratio and large values of ne . This confirms the potential of the ACF to reduce the false positive rate on networking applications. In fact, the configuration considered in which all elements are queried the same number of times is a worst case for the ACF; if some elements have more queries than others, the ACF is able to more effectively remove the false positives that occur on those elements. This holds in simulations, and is seen in the next subsection with real data. (Generally network traffic is highly skewed [14].) Finally, the theoretical estimates were computed using the Markov chains and equations discussed in the previous section for all the configurations.The estimates matched the simulation results and the error was in most cases well below 5%. We note that in cases with larger error, the deviations appear to be primarily due to the variance in the simulation results; low probability events can have a significant effect on the false positive rate. For example, in the first ACF variant when s = 1 (so there are two fingerprints available for an element in the cell), the probability of having a false positive on the two fingerprints when the A/S ratio is 5 and the number of bits per cell is 16 is below 10−6 , but when that event occurs it can create up to ne false positives and thereby significantly contribute to the false positive rate, particularly when ne is large. Our results demonstrate that the theoretical estimates can be used as an additional approach to guide choosing parameters for performance, along with simulations. 4.2 Simulations with packet traces We also utilized packet traces taken from the CAIDA datasets [15] to validate the ACF with real-world data. For each trace, a number of flows was selected to be in the set S and placed on the ACF. Then all the packets were queried and the false positive rate was logged. To simulate several values of the A/S 15 Figure 4: False positive rate versus A/S ratio for the three CAIDA traces when using 8 bits per cell. Figure 5: False positive rate versus A/S ratio for the three CAIDA traces when using 12 bits per cell. ratio, the size of the ACF was changed. The two variants of the ACF and the cuckoo filter were evaluated as in the previous subsection. The ACF was able to consistently reduce the false positive rate of the cuckoo filter. We selected the 5-tuple as the key to insert in the ACF, and the set of 5-tuples in each trace as the A ∪ S set. Then we select the same A/S ratios used in the previous experiment and set the size of the S set, and consequently the size of the ACF so that the it reaches the 95% load when it is filled. After, the ACF is loaded picking the first |S| 5-tuples in the trace. The remaining flows were considered as potential false positives for the ACF. We provide results for three distinct traces1 , with each corresponding to 60 seconds of traffic. The first trace has approximately 18.5 million packets and 691,371 different flows, giving an average value of ne ≈ 26.7 packets per flow. The distribution of ne is highly skewed with the largest flow having 130,675 packets, the largest one thousand flows each having more than ten thousand packets and the largest ten thousand flows each having more than two thousand packets. The other two traces have 14.6 and 37.4 million packets and 632,543 and 2,313,092 flows respectively, and the number of packets per flow is also highly skewed. The false positive rates for the three traces are shown in Figures 4, 5 and 6 for 8, 12, and 16 bits per cell. The results are similar for the three traces. 1 The traces used were taken from the CAIDA 2014 dataset and are equinixchicago.dirA.20140619-130900, equinix-chicago.dirB.20140619-132600, and equinixsanjose.dirA.20140320-130400. 16 Figure 6: False positive rate versus A/S ratio for the three CAIDA traces when using 16 bits per cell. The best ACF configurations are the first variant (d = 2, c = 1) with s = 1 and the second variant (d = 2, c = 4). Both provide similar false positive rates and clearly outperform the cuckoo filter for all the values of the bits per cell tested. An interesting observation is that the ACF reduces the false positive rate for all A/S ratios even when the number of bits per cell is only eight. This was not the case with simulated queries, and the empirical result can be explained by how the ACF benefits from the skewness of the traffic. For example, let us consider the first ACF first variant (d = 2, c = 1) with s = 1, and consider a case where there are two flows that create false positives on a bucket, one on each of the hash selector values. If one of the flows has 1000 packets and the other has only 10, in the worst case, the ACF gives only 20 false positives on the bucket, because after 10 packets the hash selector value that gave a false positive for the small flow will give no more false positives, and the ACF will stop on that hash selector. Also, when the number of bits per cell increases, the results for the cuckoo filter show high variability. This is again due to the traffic skewness because as the false positive probability gets smaller, only a few flows contribute to the false positive rate, and the rate therefore depends heavily on the number of packets of those flows. This variability does not appear on the ACF as false positives on flows with many packets are effectively removed by the ACF as explained before. 5 Conclusions and future work This paper has presented the adaptive cuckoo filter (ACF), a variant of the cuckoo filter that attempts to remove false positives after they occur so that the following queries to the same element do not cause further false positives, thereby reducing the false positive rate. The performance of the ACF has been studied theoretically and evaluated with simulations. The results confirm that when queries have a temporal correlation the ACF is able to significantly reduce the false positive rate compared to the cuckoo filter, which itself offers improvements over the original Bloom filter. The main novelty of the ACF is its ability to adapt to false positives by identifying the element that caused the false positive, removing it and re-inserting 17 it again in a different way so that the false positive is removed, but the element can still be found when searched for. This paper has studied two variants of the ACF, in both of which the elements remain in the same bucket when false positives are found; other more complex schemes could move elements to different buckets as well, but we leave studying such variants to future work. We believe the simple variants we have proposed, because of their simplicity and strong performance, can find uses in many natural applications. Acknowledgments Michael Mitzenmacher is supported in part by NSF grants CCF-1563710, CCF1535795, CCF-1320231, and CNS-1228598. Salvatore Pontarelli is partially supported by the Horizon 2020 project 5G-PICTURE (grant #762057). Pedro Reviriego would like to acknowledge the support of the excellence network Elastic Networks TEC2015-71932-REDT funded by the Spanish Ministry of Economy and competitivity. References [1] B. Bloom, “Space/time tradeoffs in hash coding with allowable errors,” Communications of the ACM, vol. 13, no. 7, pp. 422–426, 1970. [2] A. Broder and M. Mitzenmacher, “Network applications of Bloom filters: A survey,” Internet Math., vol. 1, no. 4, pp. 485–509, 2003. [3] B. Fan, D. Andersen, M. Kaminsky and M. Mitzenmacher “Cuckoo Filter: Practically Better Than Bloom” in Proceedings of CoNext 2014. [4] R. Pagh and F. Rodler “Cuckoo hashing”, Journal of Algorithms, 2004, pp. 122-144. [5] B. Donnet, B. Baynat, and T. Friedman, “Retouched bloom filters: allowing networked applications to trade off selected false positives against false negatives”, In Proceedings of the ACM CoNEXT conference, 2006. [6] M. Zhong, P. Lu, K. Shen, and J. Seiferas, “Optimizing data popularity conscious bloom filters,” in Proceedings of the twenty-seventh ACM symposium on Principles of distributed computing (PODC), 2008. [7] J. Bruck, J. Gao and A. Jiang, “Weighted Bloom filter,” in Proceedings of the IEEE International Symposium on Information Theory 2006. [8] K. Chung, M. Mitzenmacher, and S. Vadhan, ”Why Simple Hash Functions Work: Exploiting the Entropy in a Data Stream”, Theory of Computing 9(2013), 897-945. 18 [9] A. Kirsch, M. Mitzenmacher, and U. Wieder. ”More robust hashing: Cuckoo hashing with a stash”, SIAM Journal on Computing 39(4):15431561, 2009. [10] U. Erlingsson, M. Manasse, and F. Mcsherry, “A cool and practical alternative to traditional hash tables”, in Proc. of the Seventh Workshop on Distributed Data and Structures (WDAS), 2006. [11] S. Pontarelli, P. Reviriego and J.A. Maestro, ”Parallel d-Pipeline: a Cuckoo Hashing Implementation for Increased Throughput”, IEEE Transactions on Computers, vol. 65, no 1, January 2016, pp. 326-331. [12] D. Lemire and O. Kaser. ”Faster 64-bit universal hashing using carry-less multiplications.” Journal of Cryptographic Engineering (2015): 1-15. [13] Intel R 64 and IA-32 Architectures Software Developer’s Manual Volume 2. [14] N. Sarrar, N., S. Uhlig, A. Feldmann, R. Sherwood, & X. Huang, (2012). Leveraging Zipf’s law for traffic offloading. ACM SIGCOMM Computer Communication Review, 42(1), 16-22. [15] CAIDA realtime passive network www.caida.org/data/realtime/passive. 19 monitors, available online: Appendix: Algorithms We provide pseudocode for our algorithms. Algorithm 1 ACF for buckets with a single cell: Lookup for an element x Require: Element x to search for Ensure: Positive/negative 1: for i ← 1 to 4 do 2: Access bucket hi (x) 3: Read α and fα (y) stored on the cell 4: Compute fα (x) 5: Compare fα (y) in the cell with fα (x) 6: if Match then 7: return positive 8: end if 9: end for 10: return negative Algorithm 2 ACF for buckets with a single cell: Adaptation to remove a false positive Require: False positive on bucket hi (y) Ensure: update α and fα (y) 1: Access bucket hi (y) 2: Read α stored on the cell 3: Retrieve element y stored on bucket hi (y) from the main table 4: Increment α modulo 2s 5: Compute fα (y) 6: Store the new value of α and fα (y) on bucket hi (y) in the ACF 20 Algorithm 3 ACF for buckets with multiple cells: Lookup for an element x Require: Element x to search for Ensure: Positive/negative 1: Compute f1 (x), f2 (x), f3 (x), f4 (x) 2: for i ← 1 to 2 do 3: Access bucket hi (x) 4: for j ← 1 to 4 do 5: Compare fingerprint stored in cell j with fj (x) 6: if Match then 7: return positive 8: end if 9: end for 10: end for 11: return negative Algorithm 4 ACF for buckets with multiple cells: Adaptation to remove a false positive Require: False positive in cell j on bucket hi (y) Ensure: update bucket hi (y) 1: Select randomly a cell k different from j on bucket hi (y) 2: Retrieve elements y, z stored in cells j, k on bucket hi (y) from the main table 3: Compute fj (z) and fk (y) 4: Write fj (z) and fk (y) in cells j and k on bucket hi (y) of the ACF 5: Write z in cell j and y in cell k on bucket hi (y) in the main table 21
8cs.DS
Geometric Median in Nearly Linear Time arXiv:1606.05225v1 [cs.DS] 16 Jun 2016 Michael B. Cohen MIT [email protected] Yin Tat Lee MIT [email protected] Jakub Pachocki Carnegie Mellon University [email protected] Gary Miller Carnegie Mellon University [email protected] Aaron Sidford Microsoft Research New England [email protected] Abstract In this paper we provide faster algorithms for solving the geometric median problem: given n points in Rd compute a point that minimizes the sum of Euclidean distances to the points. This is one of the oldest non-trivial problems in computational geometry yet despite an abundance of research the previous fastest algorithms for computing a (1 + )-approximate geometric median were O(d · n4/3 −8/3 ) by Chin et. al, Õ(d exp −4 log −1 ) by Badoiu et. al, O(nd + poly(d, −1 ) by Feldman and Langberg, and O((nd)O(1) log 1 ) by Parrilo and Sturmfels and Xue and Ye. In this paper we show how to compute a (1 + )-approximate geometric median in time O(nd log3 1 ) and O(d−2 ). While our O(d−2 ) is a fairly straightforward application of stochastic subgradient descent, our O(nd log3 1 ) time algorithm is a novel long step interior point method. To achieve this running time we start with a simple O((nd)O(1) log 1 ) time interior point method and show how to improve it, ultimately building an algorithm that is quite non-standard from the perspective of interior point literature. Our result is one of very few cases we are aware of outperforming traditional interior point theory and the only we are aware of using interior point methods to obtain a nearly linear time algorithm for a canonical optimization problem that traditionally requires superlinear time. We hope our work leads to further improvements in this line of research. 1 Introduction One of the oldest easily-stated nontrivial problems in computational geometry is the Fermat-Weber problem: given a set of n points in d dimensions a(1) , . . . , a(n) ∈ Rd , find a point x∗ ∈ Rd that minimizes the sum of Euclidean distances to them: X def x∗ ∈ arg min f (x) where f (x) = kx − a(i) k2 x∈Rd i∈[n] This problem, also known as the geometric median problem, is well studied and has numerous applications. It is often considered over low dimensional spaces in the context of the facility location problem [29] and over higher dimensional spaces it has applications to clustering in machine learning and data analysis. For example, computing the geometric median is a subroutine in popular expectation maximization heuristics for k-medians clustering. The problem is also important to robust estimation, where we like to find a point representative of given set of points that is resistant to outliers. The geometric median is a rotation and translation invariant estimator that achieves the optimal breakdown point of 0.5, i.e. it is a good estimator even when up to half of the input data is arbitrarily corrupted [18]. Moreover, if a large constant fraction of the points lie in a ball of diameter  then the geometric median lies in that ball with diameter O() (see Lemma 24). Consequently, the geometric median can be used to turn expected results into high probability results: e.g. if the a(i) are drawn independently such that Ekx − a(i) k2 ≤  for some  > 0 and x ∈ Rd then this fact, Markov bound, and Chernoff Bound, imply kx∗ − xk2 = O() with high probability in n. Despite the ancient nature of the Fermat-Weber problem and its many uses there are relatively few theoretical guarantees for solving it (see Table 1). To compute a (1 + )-approximate solution, i.e. x ∈ Rd with f (x) ≤ (1 + )f (x∗ ), the previous fastest running times were either O(d · n4/3 −8/3 ) by [7], Õ(d exp −4 log −1 ) by [1], Õ(nd + poly(d, −1 )) by [10], or O((nd)O(1) log 1 ) time by [24, 31]. In this paper we improve upon these running times by providing an O(nd log3 n ) time algorithm1 as well as an O(d/2 ) time algorithm, provided we have an oracle for sampling a random a(i) . Picking the faster algorithm for the particular value of  improves the running time to O(nd log3 1 ). We also extend these P results to compute a (1 + )-approximate solution to the more general Weber’s problem, minx∈Rd i∈[n] wi kx − a(i) k2 for non-negative wi , in time O(nd log3 1 ) (see Appendix F). Our O(nd log3 n ) time algorithm is a careful modification of standard interior point methods for solving the geometric median problem. We provide a long step interior point method tailored to the geometric median problem for which we can implement every iteration in nearly linear time. While our analysis starts with a simple O((nd)O(1) log 1 ) time interior point method and shows how to improve it, our final algorithm is quite non-standard from the perspective of interior point literature. Our result is one of very few cases we are aware of outperforming traditional interior point theory [20, 17] and the only we are aware of using interior point methods to obtain a nearly linear time algorithm for a canonical optimization problem that traditionally requires superlinear time. We hope our work leads to further improvements in this line of research. Our O(d−2 ) algorithm is a relatively straightforward application of sampling techniques and stochastic subgradient descent. Some additional insight is required simply to provide a rigorous analysis of the robustness of the geometric median and use this to streamline our application of stochastic subgradient descent. We include it for completeness however, we defer its proof to Appendix C. The bulk of the work in this paper is focused on developing our O(nd log3 n ) time algorithm which we believe uses a set of techniques of independent interest. 1 If z is the total number of nonzero entries in the coordinates of the a(i) then a careful analysis of our algorithm improves our running time to O(z log3 n ). 1 Year Authors Runtime Comments 1659 1937 Torricelli [28] Weiszfeld [30] - Assuming n = 3 Does not always converge 1990 1997 2000 2001 2002 2003 2005 Chandrasekaran and Tamir[6] e · poly(d) log −1 ) O(n Ellipsoid method Interior point with barrier method Optimizes only over x in the input Reduction to SDP Sampling Assuming d, −1 = O(1) Assuming d = O(1) 2011 Feldman and Langberg [10] 2013 - Chin et al. [7] This paper This paper Xue and Ye [31] Indyk [13] Parrilo and Sturmfels [24] Badoiu et al. [1] Bose et al. [4] Har-Peled and Kushal [12]  e d3 + d2 n √n log −1 ) O( Õ(dn · −2 ) e O(poly(n, d) log −1 ) e · exp(O(−4 ))) O(d e O(n) e + poly(−1 )) O(n e O(nd + poly(d, −1 )) 4/3 e O(dn · −8/3 ) O(nd log3 (n/)) O(d−2 ) Coreset Multiplicative weights Interior point with custom analysis Stochastic gradient descent Table 1: Selected Previous Results. 1.1 Previous Work The geometric median problem was first formulated for the case of three points in the early 1600s by Pierre de Fermat [14, 9]. A simple elegant ruler and compass construction was given in the same century by Evangelista Torricelli. Such a construction does not generalize when a larger number of points is considered: Bajaj has shown the even for five points, the geometric median is not expressible by radicals over the rationals [2]. Hence, the (1 + )-approximate problem has been studied for larger values of n. Many authors have proposed algorithms with runtime polynomial in n, d and 1/. The most cited and used algorithm is Weiszfeld’s 1937 algorithm [30]. Unfortunately Weiszfeld’s algorithm may not converge and if it does it may do so very slowly. There have been many proposed modifications to Weiszfeld’s algorithm [8, 25, 23, 3, 27, 16] that generally give non-asymptotic runtime guarantees. In light of more modern multiplicative weights methods his algorithm can be viewed as a re-weighted least squares iteration. Chin et al. [7] considered the more general L2 embedding problem: placing the vertices of a graph into Rd , where some of the vertices have fixed positions while the remaining vertices are allowed to float, with the objective of minimizing the sum of the Euclidean edge lengths. Using the multiplicative weights method, they obtained a run time of O(d · n4/3 −8/3 ) for a broad class of problems, including the geometric median problem.2 Many authors consider problems that generalize the Fermat-Weber problem, and obtain algorithms for finding the geometric median as a specialization. Badoiu et al. gave an approximate e · exp(O(−4 ))) [1]. Parrilo k-median algorithm by sub-sampling with the runtime for k = 1 of O(d and Sturmfels demonstrated that the problem can be reduced to semidefinite programming, thus e obtaining a runtime of O(poly(n, d) log −1 ) [24]. Furthermore, Bose et al. gave a linear time al−1 gorithm for fixed d and  , based on low-dimensional data structures [4] and it has been show e how to obtain running times of O(nd + poly(d, −1 )) for this problem and a more general class of problems.[12, 10]. An approach very related to ours was studied by Xue and Ye [31]. They give an interior point √ method with barrier analysis that runs in time Õ((d3 + d2 n) n log −1 ). 2 The result of [7] was stated in more general terms than given here. However, it easy to formulate the geometric median problem in their model. 2 1.2 Overview of O(nd log3 n ) Time Algorithm Interior Point Primer Our algorithm is broadly inspired by interior point methods, a broad class of methods for efficiently solving convex optimization problems [32, 22]. Given an instance of the geometric median problem we first put the problem in a more natural form for applying interior point methods. Rather than writing the problem as minimizing a convex function over Rd X def kx − a(i) k2 (1.1) min f (x) where f (x) = x∈Rd i∈[n] we instead write the problem as minimizing a linear function over a convex set: n o min 1> α where S = α ∈ Rn , x ∈ Rd | kx(i) − a(i) k2 ≤ αi for all i ∈ [n] . {α,x}∈S (1.2) Clearly, these problems are the same as at optimality αi = kx(i) − a(i) k2 . To solve problems of the form (1.2) interior point methods replace the constraint {α, x} ∈ S through the introduction of a barrier function. In particular they assume that there is a real valued function p such that as {α, x} moves towards the boundary of S the value of p goes to infinity. A popular class of interior point methods known as path following methods [26, 11], they consider relaxations of (1.2) of the form min{α,x}∈Rn ×Rd t · 1> α + p(α, x). The minimizers of this function form a path, known as the central path, parameterized by t. The methods then use variants of Newton’s method to follow the path until t is large enough that a high quality approximate solution is obtained. The number of iterations of these methods are then typically governed by a property of p known as its self concordance ν. Given a ν-self concordant barrier, typically interior point √ methods require O( ν log 1 ) iterations to compute a (1 + )-approximate solution. For our particular convex set, the construction of our barrier function is particularly simple, we consider each constraint kx − a(i) k2 ≤  αi individually. In particular, it is known that the function p(i) (α, x) = − ln αi2 − kx − a(i) k22 is a 2-self-concordant barrier function for the set S (i) =  x ∈ Rd , α ∈ Rn | kx − a(i) k2 ≤ αi [21, Lem 4.3.3]. Since ∩i∈[n] S (i) = S we can use the barrier P (i) i∈[n] p (α, x) for p(α, x) and standard self-concordance theory shows that this is an O(n) self concordant barrier for S. Consequently, this easily yields an interior point method for solving the geometric median problem in O((nd)O(1) log 1 ) time. Difficulties Unfortunately obtaining a nearly linear time algorithm for geometric median using interior point methods as presented poses numerous difficulties. Particularly troubling is the number of iterations required by standard interior point algorithms. The approach outlined in the previous section produced an O(n)-self concordant barrier and even if we use more advanced self concordance machinery, barrier [22], the best known self concordance of barrier for the convex P i.e. the universal (i) set i∈[n] kx − a k2 ≤ c is O(d). An interesting open question still left open by our work is to determine what is the minimal self concordance of a barrier for this set. Consequently, even if we could implement every iteration of an interior point scheme in nearly linear time it is unclear whether one should hope for a nearly linear time interior point algorithm for the geometric median. While there are a instances of outperforming standard self-concordance analysis [20, 17], these instances are few, complex, and to varying degrees specialized to the problems they solve. Moreover, we are unaware of any interior point scheme providing a provable nearly linear time for a general nontrivial convex optimization problem. 3 Beyond Standard Interior Point Despite these difficulties we do obtain a nearly linear time interior point based algorithm that only requires O(log n ) iterations, i.e. increases to the path parameter. After choosing the natural penalty functions p(i) described above, we optimize in closed form over the αi to obtain the following penalized objective function:3   q Xq 1 + t2 kx − a(i) k22 − ln 1 + 1 + t2 kx − a(i) k22 min ft (x) where ft (x) = x i∈[n] def We then approximately minimize ft (x) for increasing t. We let xt = arg minx∈Rd ft (x) for x ≥ 0, and thinking of {xt : t ≥ 0} as a continuous curve known as the central path, we show how to approximately follow this path. As limt→∞ xt = x∗ this approach yields a (1 + )-approximation. √ So far our analysis is standard and interior point theory yields an Ω( n) iteration interior point scheme. To overcome this we take a more detailed look at xt . We note that for any t if there is any rapid change in xt it must occur in the direction of the smallest eigenvector of ∇2 ft (x), denoted vt , what we henceforth may refer to as the bad direction at xt . More precisely, for all directions d ⊥ vt it is the case that d> (xt − xt0 ) is small for t0 ≤ ct for a small constant c. In fact, we show that this movement over such a long step, i.e. a constant increase in t, in the directions orthogonal to the bad direction is small enough that for any movement around a ball of this size the Hessian of ft only changes by a small multiplicative constant. In short, starting at xt there exists a point y obtained just by moving from xt in the bad direction, such that y is close enough to xt0 that standard first order method will converge quickly to xt0 ! Thus, we might hope to find such a y, quickly converge to xt0 and repeat. If we increase t by a multiplicative constant in every such iterations, standard interior point theory suggests that O(log n ) iterations suffices. Building an Algorithm To turn the structural result in the previous section into a fast algorithm there are several further issues we need to address. We need to • (1) Show how to find the point along the bad direction that is close to xt0 • (2) Show how to solve linear systems in the Hessian to actually converge quickly to xt0 • (3) Show how to find the bad direction • (4) Bound the accuracy required by these computations Deferring (1) for the moment, our solution to the rest are relatively straightforward. Careful inspection of the Hessian of ft reveals that it is well approximated by a multiple of the identity matrix minus a rank 1 matrix. Consequently using explicit formulas for the inverse of of matrix under rank 1 updates, i.e. the Sherman-Morrison formula, we can solve such systems in nearly linear time thereby addressing (2). For (3), we show that the well known power method carefully applied to the Hessian yields the bad direction if it exists. Finally, for (4) we show that a constant approximate geometric median is near enough to the central path for t = Θ( f (x1 ∗ ) ) and that it suffices to compute a central path point at t = O( f (xn∗ ) ) to compute a 1 + -geometric median. Moreover, for these values of t, the precision needed in other operations is clear. 3 It is unclear how to extend our proof for the simpler function: 4 P i∈[n] p 1 + t2 kx − a(i) k22 . The more difficult operation is (1). Given xt and the bad direction exactly, it is still not clear how to find the point along the bad direction line from xt that is close to xt0 . Just performing binary search on the objective function a priori might not yield such a point due to discrepancies between a ball in Euclidean norm and a ball in hessian norm and the size of the distance from the optimal point in euclidean norm. To overcome this issue we still line search on the bad direction, however rather than simply using f (xt + α · vt ) as the objective function to line search on, we use the function g(α) = minkx−xt −α·vt k2 ≤c f (x) for some constant c, that is given an α we move α in the bad direction and take the best objective function value in a ball around that point. For appropriate choice of c the minimizers of α will include the optimal point we are looking for. Moreover, we can show that g is convex and that it suffices to perform the minimization approximately. Putting these pieces together yields our result. We perform O(log n ) iterations of interior point (i.e. increasing t), where in each iteration we spend O(nd log n ) time to compute a high quality approximation to the bad direction, and then we perform O(log n ) approximate evaluations on g(α) to binary search on the bad direction line, and then to approximately evaluate g we perform gradient descent in approximate Hessian norm to high precision which again takes O(nd log n ) time. Altogether this yields a O(nd log3 n ) time algorithm to compute a 1 +  geometric median. Here we made minimal effort to improve the log factors and plan to investigate this further in future work. 1.3 Overview of O(d−2 ) Time Algorithm In addition to providing a nearly linear time algorithm we provide a stand alone result on quickly computing a crude (1+)-approximate geometric median in Section C. In particular, given an oracle for sampling a random a(i) we provide an O(d−2 ), i.e. sublinear, time algorithm that computes such an approximate median. Our algorithm for this result is fairly straightforward. First, we show that random sampling can be used to obtain some constant approximate information about the optimal point in constant time. In particular we show how this can be used to deduce an Euclidean ball which contains the optimal point. Second, we perform stochastic subgradient descent within this ball to achieve our desired result. 1.4 Paper Organization The rest of the paper is structured as follows. After covering preliminaries in Section 2, in Section 3 we provide various results about the central path that we use to derive our nearly linear time algorithm. In Section 4 we then provide our nearly linear time algorithm. All the proofs and supporting lemmas for these sections are deferred to Appendix A and Appendix B. In Appendix C we provide our O(d/2 ) algorithm, in Appendix D we provide the derivation of our penalized objective function, in Appendix E we provide general technical machinery we use throughout and in Appendix F we show how to extend our results to Weber’s problem, i.e. weighted geometric median. 2 2.1 Notation General Notation We use bold to denote a matrix. For a symmetric positive semidefinite matrix (PSD), A, we let λ1 (A) ≥ ... ≥ λn (A) ≥ 0 denote√the eigenvalues of A and let v1 (A), ..., vn (A) denote corresponding def eigenvectors. We let kxkA = x> Ax and for PSD we use A  B and B  A to denote the conditions that x> Ax ≤ x> Bx for all x and x> Bx ≤ x> Ax for all x respectively. 5 2.2 Problem Notation The central problem of this paper is as follows: we are given points a(1) , ...,P a(n) ∈ Rd and we wish to compute a geometric median, i.e. x∗ ∈ arg minx∈Rd f (x) where f (x) = i∈[n] ka(i) − xk2 . We call a point x ∈ Rd an (1 + )-approximate geometric median if f (x) ≤ (1 + )f (x∗ ). 2.3 Penalized Objective Notation To solve this problem, we smooth the objective function f and instead consider the following family of penalized objective functions parameterized by t > 0   q Xq 2 2 (i) (i) 2 2 min ft (x) where ft (x) = 1 + t kx − a k2 − ln 1 + 1 + t kx − a k2 x∈Rd i∈[n] This penalized objective function is derived from a natural interior point formulation of the geometric def median problem (See Section D). For all path parameters t > 0, we let xt = arg minx ft (x). Our primary goal is to obtain good approximations to the central path {xt : t > 0} for increasing values of t. q P def def (i) (i) (i) (i) (i) We let gt (x) = 1 + t2 kx − a(i) k22 and ft (x) = gt (x)−ln(1+gt (x)) so ft (x) = i∈[n] ft (x). def P 1 We refer to the quantity wt (x) = i∈[n] as weight as it is a natural measure of total con(i) 1+gt (x) tribution of the a(i) to ∇2 ft (x). We let −1  def ḡt (x) = wt (x)  1 X (i) (i) i∈[n] (1 + gt (xt ))gt (xt )  1 i∈[n] 1+g (i) (x ) t t P 1 i∈[n] (1+g (i) (x ))g (i) (x ) t t t t P = denote a weighted harmonic mean of g that helps upper bound the rate of change of the central def path. Furthermore, we let u(i) (x) denote the unit vector corresonding to x − a(i) , i.e. u(i) (x) = x − def def a(i) /kx − a(i) k2 when kx − a(i) k2 6= 0 and u(i) (x) = 0 otherwise. Finally we let µt (x) = λd (∇2 ft (x)) denote the minimum eigenvalue of ∇2 ft (x), and let vt (x) denote a corresponding eigenvector. To simplify notation we often drop the (x) in these definitions when x = xt and t is clear from context. 3 Properties of the Central Path Here provide various facts regarding the penalized objective function and the central path. While we use the lemmas in this section throughout the paper, the main contribution of this section is Lemma 5 in Section 3.3. There we prove that with the exception of a single direction, the change in the central path is small over a constant multiplicative change in the path parameter. In addition, we show that our penalized objective function is stable under changes in a O( 1t ) Euclidean ball (Section 3.1), we bound the change in the Hessian over the central path (Section 3.2), and we relate f (xt ) to f (x∗ ) (Section 3.4). 3.1 How Much Does the Hessian Change in General? Here, we show that the Hessian of the penalized objective function is stable under changes in a O( 1t ) sized Euclidean ball. This shows that if we have a point which is close to a central path point in Euclidean norm, then we can use Newton method to find it. 6 Lemma 1. Suppose that kx − yk2 ≤  t with  ≤ 1 20 . Then, we have (1 − 62/3 )∇2 ft (x)  ∇2 ft (y)  (1 + 62/3 )∇2 ft (x). 3.2 How Much Does the Hessian Change Along the Path? Here we bound how much the Hessian of the penalized objective function can change along the central path. First we provide the following lemma bound several aspects of the penalized objective function and proving that the weight, wt , only changes by a small amount multiplicatively given small multiplicative changes in the path parameter, t. Lemma 2. For all t ≥ 0 and i ∈ [n] the following hold  d 1 d (i) 1  (i) xt ≤ 2 ḡt (xt ) , gt (xt ) ≤ gt (xt ) + ḡt , and dt t dt t 2  0 2 2 Consequently, for all t0 ≥ t we have that tt0 wt ≤ wt0 ≤ tt wt . d 2 wt ≤ wt dt t Next we use this lemma to bound the change in the Hessian with respect to t. Lemma 3. For all t ≥ 0 we have − 12 · t · wt I   d  2 ∇ ft (xt )  12 · t · wt I dt (3.1) and therefore for all β ∈ [0, 18 ] ∇2 f (xt ) − 15βt2 wt I  ∇2 f (xt(1+β) )  ∇2 f (xt ) + 15βt2 wt I . 3.3 (3.2) Where is the Next Optimal Point? Here we prove our main result of this section. We prove that over a long step the central path moves very little in directions orthogonal to the smallest eigenvector of the Hessian. We begin by noting the Hessian is approximately a scaled identity minus a rank 1 matrix. Lemma 4. For all t, we have i 1h 2 t · wt I − (t2 · wt − µt )vt vt>  ∇2 ft (xt )  t2 · wt I − (t2 · wt − µt )vt vt> . 2 Using this and the lemmas of the previous section we bound the amount xt can move in every direction far from vt . 1 Lemma 5 (The Central Path is Almost Straight). For all t ≥ 0, β ∈ [0, 600 ], and any unit vector wδ 1 > y with |hy, vt i| ≤ t2 ·κ where κ = maxδ∈[t,(1+β)t] µδ , we have y (x(1+β)t − xt ) ≤ 6β t . 3.4 Where is the End? In this section, we bound the quality of the central path with respect to the geometric median objective. In particular, we show that if we can solve the problem for some t = f2n (x∗ ) then we obtain an (1 + )-approximate solution. As our algorithm ultimately starts from an initial t = 1/O(f (x∗ )) and increases t by a multiplicative constant in every iteration, this yields an O(log n ) iteration algorithm. Lemma 6. f (xt ) − f (x∗ ) ≤ 2n t for all t > 0. 7 4 Nearly Linear Time Geometric Median Here we show how to use the structural results from the previous section to obtain a nearly linear time algorithm for computing the geometric median. Our algorithm follows a simple structure (See Algorithm 1). First we use simply average the a(i) to compute a 2-approximate median, denoted x(0) . Then for a number of iterations we repeatedly move closer to xt for some path parameter t, compute the minimum eigenvector of the Hessian, and line search in that direction to find an approximation to a point further along the central path. Ultimately, this yields a point x(k) that is precise enough approximation to a point along the central path with large enough t that we can simply out x(k) as our (1 + )-approximate geometric median. Algorithm 1: AccurateMedian() Input: points a(1) , ..., a(n) ∈ Rd Input: desired accuracy  ∈ (0, 1) // Compute a 2-approximate geometric median and use it to center P Compute x(0) := n1 i∈[n] a(i) and fe∗ := f (x(0) ) // Note f˜∗ ≤ 2f (x∗ ) by Lemma 18 1 i−1 ) , ˜∗ = 13 , and t̃∗ = ˜2n . Let ti = 1 e (1 + 600 ·f˜ 400f∗ ˜∗ 2 v = 81 ( 7n ) ∗ ∗ v 32 ( 36 ) Let and let c = . x(1) = LineSearch(x(0) , t1 , t1 , 0, c ) . // Iteratively improve quality of approximation Let k = maxi∈Z ti ≤ t̃∗ for i ∈ [1, k] do // Compute v -approximate minimum eigenvalue and eigenvector of ∇2 fti (x(i) ) (λ(i) , u(i) ) = ApproxMinEig(x(i) , ti , v ) . // Line search to find x(i+1) such that kx(i+1) − xti+1 k2 ≤ c ti+1 x(i+1) = LineSearch(x(i) , ti , ti+1 , u(i) , c ) . end Output: -approximate geometric median x(k+1) . We split the remainder of the algorithm specification and its analysis into several parts. First in Section 4.1 we show how to compute an approximate minimum eigenvector and eigenvalue of the Hessian of the penalized objective function. Then in Section 4.2 we show how to use this eigenvector to line search for the next central path point. Finally, in Section 4.3 we put these results together to obtain our nearly linear time algorithm. Throughout this section we will want an upper bound to f (x∗ ) and a slight lower bound on , the geometric median accuracy we are aiming for. We use an easily computed f˜∗ ≤ 2f (x∗ ) for the former and ˜∗ = 13  throughout the section. 4.1 Eigenvector Computation and Hessian Approximation Here we show how to compute the minimum eigenvector of ∇2 ft (x) and thereby obtain a concise approximation to ∇2 ft (x). Our main algorithmic tool is the well known power method and the fact that it converges quickly on a matrix with a large eigenvalue gap. To improve our logarithmic terms we need a slightly non-standard analysis of the method and therefore we provide and analyze this method for completeness in Section B.1. Using this tool we estimate the top eigenvector as follows. 8 Algorithm 2: ApproxMinEig(x, t, ) Input: Point x ∈ Rd , path parameter t, and target accuracy . 4 (i) (i) )> P Let A = i∈[n] t (x−a(i) )(x−a (i) 2 (1+gt (x)) gt (x)  Let u := PowerMethod(A, Θ(log n )) Let λ = u> ∇2 ft (x)u Output: (λ, u) Lemma 7 (Computing Hessian Approximation). Let x ∈ Rd , t > 0, and  ∈ (0, 41 ). The algorithm ApproxMinEig(x, t, ) outputs (λ, u) in O(nd log n ) time such that if µt (x) ≤ 41 t2 wt (x) 2  t (x) then then hvt (x), ui2 ≥ 1 −  with high probability in n/. Furthermore, if  ≤ 8t2µ·w t (x)  def 1 2 2 2 > 4 Q  ∇ ft (x)  4Q with high probability in n/ where Q = t · wt (x) − t · wt (x) − λ uu . Furthermore, we show that the v (i) computed by this algorithm is sufficiently close to the bad direction. Combining 7 with the structural results from the previous section and Lemma 29, a minor technical lemma regarding the transitivity of large inner products,we provide the following lemma. 3 v 2 ) . If Lemma 8. Let (λ, u) = ApproxMinEig(x, t, v ) for v < 18 and kx − xt k2 ≤ tc for c ≤ ( 36 1 2 2 µt ≤ 4 t · wt then with high probability in n/v for all unit vectors y ⊥ u, we have hy, vt i ≤ 8v . Note that this lemma assumes µt is small. When µt is large, we instead show that the next central path point is close to the current point and hence we do not need to compute the bad direction to center quickly. Lemma 9. Suppose µt ≥ 14 t2 · wt and let t0 ∈ [t, (1 + 4.2 1 600 )t] then kxt0 − xt k2 ≤ 1 100t . Line Searching Here we show how to line search along the bad direction to find the next point on the central path. Unfortunately, simply performing binary search on objective function directly may not suffice. If we search over α to minimize fti+1 (y (i) + αv (i) ) it is unclear if we actually obtain a point close to xt+1 . It might be the case that even after minimizing α we would be unable to move towards xt+1 efficiently. To overcome this difficulty, we use the fact that over the region kx − yk2 = O( 1t ) the Hessian changes by at most a constant and therefore we can minimize ft (x) over this region extremely quickly. Therefore, we instead line search on the following function def gt,y,v (α) = min 1 kx−(y+αv)k2 ≤ 49t ft (x) (4.1) and use that we can evaluate gt,y,v (α) approximately by using an appropriate centering procedure. We can show (See Lemma 31) that gt,y,v (α) is convex and therefore we can minimize it efficiently just by doing an appropriate binary search. By finding the approximately minimizing α and outputting the corresponding approximately minimizing x, we can obtain x(i+1) that is close enough to xti+1 . For notational convenience, we simply write g(α) if t, y, v is clear from the context. First, we show how we can locally center and provide error analysis for that algorithm. 9 Algorithm 3: LocalCenter(y, t, ) Input: Point y ∈ Rd , path parameter t > 0, target accuracy  > 0. Let (λ, v) := ApproxMinEig(x, t, ).  Let Q = t2 · wt (y)I − t2 · wt (y) − λ vv > Let x(0) = y for i = 1, ..., k = 64 log 1 do Let x(i) = minkx−yk2 ≤ 1 f (x(i−1) ) + h∇ft (x(i−1) ), x − x(i−1) i + 4kx − x(i−1) k2Q . 49t end Output: x(k) Lemma 10. Given some y ∈ Rd , t > 0 and 0 ≤  ≤  µt (x) 8t2 ·wt (x) 2 In O(nd log( n )) time . LocalCenter(y, t, ) computes x(k) such that with high probability in n/. ! ft (x(k) ) − min 1 kx−yk2 ≤ 49t ft (x) ≤  ft (y) − min 1 kx−yk2 ≤ 49t ft (x) . Using this local centering algorithm as well as a general result for minimizing one dimensional convex functions using a noisy oracle (See Section E.3) we obtain our line search algorithm. Algorithm 4: LineSearch(y, t, t0 , u, ) Input: Point y ∈ Rd , current path parameter t, next path parameter t0 , bad direction u, target accuracy  2 ˜ ∗ , ` = −6fe∗ , u = 6fe∗ . Let O = 160n 2 Define the oracle q : R → R by q(α) = ft0 (LocalCenter (y + αu, t0 , O )) Let α0 = OneDimMinimizer(`, u, O , q, t0 n) Output: x0 = LocalCenter (y + αu, t0 , O ) Lemma 11. Let 1 0 400f (x∗ ) ≤ t ≤ t ≤ y ∈ Rd such that ky ˜∗ 2 v ≤ 81 ( 3n ) and calls to the LocalCenter, probability in n/. 1 2n 600 )t ≤ ˜∗ ·f˜∗ and let (λ, u) = ApproxMinEig(y, t, v ) for v 32 n − xt k2 ≤ 1t ( 36 ) . In O(nd log2 ( ˜∗ ·· )) time and O(log( ˜∗n· )) v LineSearch(y, t, t0 , u, ) outputs x0 such that kx0 − xt0 k2 ≤ t0 with high (1 + We also provide the following lemma useful for finding the first center. Lemma 12. Let ≤ t ≤ t0 ≤ (1 + Then, vector 1 400f (x∗ ) n in O(nd log2 ( ·˜ ∗ )) u ∈ Rd . time, LineSearch(x, t, t, u, ) outputs y such that ky − xt k2 ≤ 4.3 Putting It All Together 1 600 )t ≤ 2n ˜∗ ·f˜∗ and let x ∈ Rd satisfy kx − xt k2 ≤  t 1 100t . for any Combining the results of the previous sections, we prove our main theorem. Theorem 1. In O(nd log3 ( n )) time, Algorithm 1 outputs an (1 + )-approximate geometric median with constant probability. 10 5 Acknowledgments We thank Yan Kit Chim, Ravi Kannan, and Jonathan A. Kelner for many helpful conversations. We thank the reviewers for their help in completing the previous work table. This work was partially supported by NSF awards 0843915, 1065106 and 1111109, NSF Graduate Research Fellowship (grant no. 1122374) and Sansom Graduate Fellowship in Computer Science. Part of this work was done while authors were visiting the Simons Institute for the Theory of Computing, UC Berkeley. References [1] Mihai Badoiu, Sariel Har-Peled, and Piotr Indyk. Approximate clustering via core-sets. In Proceedings on 34th Annual ACM Symposium on Theory of Computing, May 19-21, 2002, Montréal, Québec, Canada, pages 250–257, 2002. [2] Chanderjit Bajaj. The algebraic degree of geometric optimization problems. Discrete & Computational Geometry, 3(2):177–191, 1988. [3] Egon Balas and Chang-Sung Yu. A note on the weiszfeld-kuhn algorithm for the general fermat problem. Managme Sci Res Report, (484):1–6, 1982. [4] Prosenjit Bose, Anil Maheshwari, and Pat Morin. Fast approximations for sums of distances, clustering and the Fermat-Weber problem. Computational Geometry, 24(3):135 – 146, 2003. [5] Sébastien Bubeck. Theory of convex optimization for machine learning. arXiv:1405.4980, 2014. arXiv preprint [6] R. Chandrasekaran and A. Tamir. Open questions concerning weiszfeld’s algorithm for the fermat-weber location problem. Mathematical Programming, 44(1-3):293–295, 1989. [7] Hui Han Chin, Aleksander Madry, Gary L. Miller, and Richard Peng. Runtime guarantees for regression problems. In ITCS, pages 269–282, 2013. [8] Leon Cooper and I.Norman Katz. The weber problem revisited. Computers and Mathematics with Applications, 7(3):225 – 234, 1981. [9] Zvi Drezner, Kathrin Klamroth, Anita SchÃPbel, and George Wesolowsky. Facility location, chapter The Weber problem, pages 1–36. Springer, 2002. [10] Dan Feldman and Michael Langberg. A unified framework for approximating and clustering data. In Proceedings of the forty-third annual ACM symposium on Theory of computing, pages 569–578. ACM, 2011. [11] Clovis C Gonzaga. Path-following methods for linear programming. SIAM review, 34(2):167– 224, 1992. [12] Sariel Har-Peled and Akash Kushal. Smaller coresets for k-median and k-means clustering. In Proceedings of the twenty-first annual symposium on Computational geometry, pages 126–134. ACM, 2005. [13] P. Indyk and Stanford University. Computer Science Dept. High-dimensional computational geometry. Stanford University, 2000. 11 [14] Jakob Krarup and Steven Vajda. On torricelli’s geometrical solution to a problem of fermat. IMA Journal of Management Mathematics, 8(3):215–224, 1997. [15] Richard A. Kronmal and Arthur V. Peterson. The alias and alias-rejection-mixture methods for generating random variables from probability distributions. In Proceedings of the 11th Conference on Winter Simulation - Volume 1, WSC ’79, pages 269–280, Piscataway, NJ, USA, 1979. IEEE Press. [16] HaroldW. Kuhn. A note on fermat’s problem. Mathematical Programming, 4(1):98–107, 1973. [17] Yin Tat Lee and Aaron Sidford. Path-finding methods for linear programming : Solving linear programs in õ(sqrt(rank)) iterations and faster algorithms for maximum flow. In 55th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2014, 18-21 October, 2014, Philadelphia, PA, USA, pages 424–433, 2014. [18] Hendrik P. Lopuhaa and Peter J. Rousseeuw. Breakdown points of affine equivariant estimators of multivariate location and covariance matrices. Ann. Statist., 19(1):229–248, 03 1991. [19] Hendrik P Lopuhaa and Peter J Rousseeuw. Breakdown points of affine equivariant estimators of multivariate location and covariance matrices. The Annals of Statistics, pages 229–248, 1991. [20] Aleksander Madry. Navigating central path with electrical flows: from flows to matchings, and back. In Proceedings of the 54th Annual Symposium on Foundations of Computer Science, 2013. [21] Yu Nesterov. Introductory Lectures on Convex Optimization: A Basic Course, volume I. 2003. [22] Yurii Nesterov and Arkadii Semenovich Nemirovskii. Interior-point polynomial algorithms in convex programming, volume 13. Society for Industrial and Applied Mathematics, 1994. [23] Lawrence M. Ostresh. On the convergence of a class of iterative methods for solving the weber location problem. Operations Research, 26(4):597–609, 1978. [24] Pablo A. Parrilo and Bernd Sturmfels. Minimizing polynomial functions. In DIMACS Workshop on Algorithmic and Quantitative Aspects of Real Algebraic Geometry in Mathematics and Computer Science, March 12-16, 2001, DIMACS Center, Rutgers University, Piscataway, NJ, USA, pages 83–100, 2001. [25] Frank Plastria and Mohamed Elosmani. On the convergence of the weiszfeld algorithm for continuous single facility location allocation problems. TOP, 16(2):388–406, 2008. [26] James Renegar. A polynomial-time algorithm, based on newton’s method, for linear programming. Mathematical Programming, 40(1-3):59–93, 1988. [27] Yehuda Vardi and Cun-Hui Zhang. The multivariate l1-median and associated data depth. Proceedings of the National Academy of Sciences, 97(4):1423–1426, 2000. [28] Vincenzo Viviani. De maximis et minimis geometrica divinatio liber 2. De Maximis et Minimis Geometrica Divinatio, 1659. [29] Alfred Weber. The Theory of the Location of Industries. Chicago University Press, 1909. Aber den I der Industrien. 12 [30] E. Weiszfeld. Sur le point pour lequel la somme des distances de n points donnes est minimum. Tohoku Mathematical Journal, pages 355–386, 1937. [31] Guoliang Xue and Yinyu Ye. An efficient algorithm for minimizing a sum of euclidean norms with applications. SIAM Journal on Optimization, 7:1017–1036, 1997. [32] Yinyu Ye. Interior point algorithms: theory and analysis, volume 44. John Wiley & Sons, 2011. A Properties of the Central Path (Proofs) Here we provide proofs of the claims in Section 3 as well as additional technical lemmas we use throughout the paper. A.1 Basic Facts Here we provide basic facts regarding the central path that we will use throughout our analysis. First we compute various derivatives of the penalized objective function. Lemma 13 (Path Derivatives). We have ∇ft (x) = X t2 (x − a(i) ) (i) i∈[n] 1 + gt (x) 2 , ∇ ft (x) = t2 X I− (i) i∈[n] 1 + gt (x) t2 (x − a(i) )(x − a(i) )> (i) ! , and (i) gt (x)(1 + gt (x)) −1 X d t(xt − a(i) ) xt = − ∇2 ft (xt ) (i) (i) dt i∈[n] (1 + gt (xt ))gt (xt ) Proof of Lemma 13. Direct calculation shows that t2 (x  a(i) ) t2 (x a(i) )  1 − − (i) q  q − ∇ft (x) = q 2 2 2 (i) (i) (i) 2 2 2 1 + t kx − a k2 1 + 1 + t kx − a k2 1 + t kx − a k2 = t2 (x − a(i) ) t2 (x − a(i) ) q = (i) 1 + gt (x) 1 + 1 + t2 kx − a(i) k22 and (i) ∇2 ft (x) = t2 2  1  q q I− 1 + 1 + t2 kx − a(i) k22 1 + 1 + t2 kx − a(i) k22 ! t2 t2 (x − a(i) )(x − a(i) )> = I− (i) (i) (i) 1 + gt (x) gt (x)(1 + gt (x)) 13 t4 (x − a(i) )(x − a(i) )> q 1 + t2 kx − a(i) k22 and   2t(x − a(i) ) d t2 · (x − a(i) ) · tkx − a(i) k22 (i) q (x) = ∇ft − 2 q p dt 1 + 1 + t2 kx − a(i) k22 1 + t2 kx − a(i) k22 1 + 1 + t2 kx − a(i) k ! (i) t · (x − a(i) ) gt (x)2 − 1 = 2− (i) (i) (i) 1 + gt (x) (1 + gt (x))gt (x) ! (i) (i) t · (x − a(i) ) t · (x − a(i) ) 2gt (x) − (gt (x) − 1) = = (i) (i) (i) 1 + gt (x) gt (x) gt (x) Finally, by the optimality of xt we have that ∇ft (xt ) = 0. Consequently,   d d 2 ∇ ft (xt ) xt + ∇ft (xt ) = 0. dt dt and solving for d dt xt then yields    −1 d d 2 xt = − ∇ ft (xt ) ∇ft (xt ) dt dt    −1 d 1 2 = − ∇ ft (xt ) ∇ft (xt ) − ∇ft (xt ) dt t   # " X  t t −1  (xt − a(i) ) . = − ∇2 ft (xt ) − (i) (i) 1 + gt i∈[n] gt Next, in we provide simple facts regarding the Hessian of the penalized objective function. Lemma 14. For all t > 0 and x ∈ Rd ∇2 ft (x) = X t2 i∈[n] (i) gt (x) 1+ I− 1− ! 1 ! u(i) (x)u(i) (x)> (i) gt (x) and therefore t2 X (i) (i) i∈[n] (1 + gt (x))gt (x) I  ∇2 ft (x)  t2 X I (i) i∈[n] 1 + gt (x) Proof of Lemma 14. We have that ∇2 ft (x) = = X t2 I− (i) i∈[n] 1 + gt (x) X t2 i∈[n] 1 + (i) gt (x) (1 + (i) (i) gt (x))gt (x) (i) ! (i) gt (x)(1 + gt (x)) I− ! t2 kx − a(i) k22 (1 + Since t2 kx − a(i) k22 t2 (x − a(i) )(x − a(i) )> (i) (i) gt (x))gt (x) u(i) (x)u(i) (x)> (i) = gt (x)2 − 1 (i) gt (x)(1 the result follows. 14 + (i) gt (x)) =1− 1 (i) gt (x) . A.2 Stability of Hessian Here we show that moving a point x ∈ Rd in `2 , does not change the Hessian, ∇2 ft (x), too much (i) spectrally. First we show that such changes do not change gt (x) by too much (Lemma 15) and then we use this to prove the claim, i.e. we prove Lemma 1. Lemma 15 (Stability of g). For all x, y ∈ Rd and t > 0 , we have (i) (i) (i) gt (x) − tkx − yk2 ≤ gt (y) ≤ gt (x) + tkx − yk2 Proof of Lemma 15. Direct calculation reveals that (i) gt (y)2 = 1 + t2 kx − a(i) + y − xk22 = 1 + t2 kx − a(i) k22 + 2t2 (x − a(i) )> (y − x) + t2 ky − xk22 (i) = gt (x)2 + 2t2 (x − a(i) )> (y − x) + t2 ky − xk22 . Consequently by Cauchy Schwarz (i) (i) (i) (i) gt (y)2 ≤ gt (x)2 + 2t2 kx − a(i) k2 · ky − xk2 + t2 ky − xk22  2 (i) ≤ gt (x) + tky − xk2 and gt (y)2 ≥ gt (x)2 − 2t2 kx − a(i) k2 · ky − xk2 + t2 ky − xk22  2 (i) ≥ gt (x) − tky − xk2 . Lemma 1. Suppose that kx − yk2 ≤  t with  ≤ 1 20 . Then, we have (1 − 62/3 )∇2 ft (x)  ∇2 ft (y)  (1 + 62/3 )∇2 ft (x). Proof of Lemma 1. Here we prove the following stronger statement, for all i ∈ [n] (i) (i) (i) (1 − 62/3 )∇2 ft (x)  ∇2 ft (y)  (1 + 62/3 )∇2 ft (x) . Without loss of generality let y − x = αv + βu(i) (x) for some v ⊥ u(i) (x) with kvk2 = 1. 2 2 Since kx − yk22 ≤ t2 , we know that α2 , β 2 ≤ t2 . Also, let x̄ = x + βu(i) (x), so that clearly, u(i) (x) = u(i) (x̄). Now some manipulation reveals that for all unit vectors z ∈ Rd the following holds (so long as u(i) (x) 6= 0 and u(i) (y) 6= 0) 15 h i2 h i2 u(i) (x)> z − u(i) (y)> z = h i2 h i2 u(i) (x̄)> z − u(i) (y)> z " (x̄ − a(i) )> z kx̄ − a(i) k2 #2 " (x̄ − a(i) )> z kx̄ − a(i) k2 #2 = ≤ " #2 " #2 (y − a(i) )> z − ky − a(i) k2 (x̄ − a(i) )> z − ky − a(i) k2 " + (x̄ − a(i) )> z ky − a(i) k2 #2 " (y − a(i) )> z − ky − a(i) k2 #2  2  2 (x̄ − a(i) + αv)> z − (x̄ − a(i) )> z kx̄ − a(i) k22 + ≤ 1− ky − a(i) k22 ky − a(i) k22      2 α2 + 2 (x̄ − a(i) )> z · αv > z + αv > z = kx̄ − a(i) k22 + αi2 where we used that y = x̄ + αv and ky − a(i) k22 = α2 + kx̄ − a(i) k22 (since v ⊥ (x̄ − a(i) )). Now we 2 know that α2 ≤ t2 and therefore, by Young’s inequality and Cauchy Schwarz we have that for all γ>0     h i2 h i2 2 + 2 (x̄ − a(i) )> z · αv > z 2α u(i) (x)> z − u(i) (y)z ≤ kx̄ − a(i) k22 + α2  2  2 2α2 + γ (x̄ − a(i) )> z + γ −1 α2 v > z ≤ kx̄ − a(i) k22 + α2  2  h i2 α2 2 + γ −1 v > z (i) > ≤ + γ (u (x)) z kx̄ − a(i) k22 + α2   h i2 2 1  > 2 (i) > ≤ 2 2 + v z + γ (u (x)) z . (A.1) γ t kx̄ − a(i) k22 + 2 Note that    2 t2 kx̄ − a(i) k22 = t2 kx − a(i) k22 + 2β(x − a(i) )> u(i) (x) + β 2 = tkx − a(i) k2 + tβ  n o2 . ≥ max tkx − a(i) k2 − , 0 Now, we separate the proof into two cases depending if tkx − a(i) k2 ≥ 21/2 q (i) 1 (i) 1/3 If tkx − a k2 ≥ 2 gt (x) then since  ≤ 20 we have that  a(i) k 2 tkx − 2 tkx − a(i) k2 ≥  q ≥ 42/3 . (i) gt (x) 16 q (i) gt (x). and tky − a(i) k ≥ , justifying our assumption that u(i) (x) 6= 0 and u(i) (y) 6= 0. Furthermore, this implies that  2 3 (i) 2 (i) 2 t2 kx − a(i) k22 ≥ 22/3 gt (x). t kx̄ − a k2 ≥ 4 2/3 and therefore letting γ = yields (i) gt (x) ! (i) i2 gt (x) h > i2 2/3 h (i) > 2 + 2/3 v z + (i) (u (x)) z − ≤ (i)  2gt (x) gt (x) i2 2/3 h > i2 4/3 2/3 h (i) ≤ v z + (i) + (i) (u (x))> z 2 gt (x) gt (x) h i 2/3 2 3 2/3  v>z + . ≤ 2 2 g (i) (x) t  2 Since v ⊥ u(i) (x) and v, z are unit vectors, both v > z and (i)1 are less than h i2 (i) > ut (x) z h 4/3 i2 (i) ut (y)z gt (x) " z > I− ! 1 1− # (i) > (i) u (y)(u (y)) (i) z. gt (x) Therefore, we have h i2 (i) ut (x)> z − h i2 (i) ut (y)z " ≤ 22/3 z > I − 1− (i) = 22/3 1 + gt (x) t2 ! 1 # u(i) (y)(u(i) (y))> z (i) g (x) !t kzk2 2 (i) ∇ ft (x) and therefore if we let t2 def H= 1+ (i) gt (x) I− 1− 1 ! (i) gt (x) ! u(i) (y)(u(i) (y))> , we see that for unit vectors z,   (i) z > H − ∇2 ft (x) z ≤ 22/3 kzk2 2 (i) ∇ ft (x) Otherwise, tkx − a(i) k2 < 21/3 q (i) gt (x) and therefore (i) (i) gt (x)2 = 1 + t2 kx − a(i) k22 ≤ 1 + 42/3 gt (x) Therefore, we have (i) gt (x) ≤ 42/3 + p (42/3 )2 + 4 ≤ 1 + 42/3 . 2 Therefore independent of (A.1) and the assumption that u(i) (x) 6= 0 and u(i) (y) 6= 0 we have   1 t2 t2 2 (i) 2/3 H I  ∇ ft (x)  I  1 + 4 H. (i) (i) (i) 1 + 42/3 (1 + gt (x))gt (x) (1 + gt (x)) 17 In either case, we have that   (i) z > H − ∇2 ft (x) z ≤ 42/3 kzk2 2 (i) ∇ ft (x) Now, we note that kx − yk2 ≤  t . (i) ≤· gt (x) . t (i) Therefore, by Lemma 15 we have that (i) (i) (1 − )gt (x) ≤ gt (y) ≤ (1 + )gt (x) Therefore, we have 1 1 1 + 42/3 2 (i) 1 − 42/3 2 (i) 2 (i) ∇ f (x)  H  ∇ f (y)  H  ∇ ft (x) t t (1 + )2 (1 + )2 (1 − )2 (1 − )2 Since  < 1 20 , the result follows. Consequently, so long as we have a point within a O( 1t ) sized Euclidean ball of some xt , Newton’s method (or an appropriately transformed first order method) within the ball will converge quickly. A.3 How Much Does the Hessian Change Along the Path? Lemma 2. For all t ≥ 0 and i ∈ [n] the following hold d xt dt 1 ḡt (xt ) , t2  d (i) 1  (i) gt (xt ) ≤ gt (xt ) + ḡt , and dt t 2  0 2 2 Consequently, for all t0 ≥ t we have that tt0 wt ≤ wt0 ≤ tt wt . ≤ d 2 wt ≤ wt dt t Proof of Lemma 2. From Lemma 13 we know that −1 X t(xt − a(i) ) d xt = − ∇2 ft (xt ) (i) (i) dt i∈[n] (1 + gt (xt ))gt (xt ) and by Lemma 14 we know that ∇2 ft (xt )  X t2 i∈[n] (1 + gt (xt ))gt (xt ) (i) I= (i) (i) Using this fact and the fact that tkxt − a(i) k2 ≤ gt d xt dt 2 t2 X 1 I. (i) ḡt (xt ) i∈[n] 1 + gt (xt ) we have −1 d = − ∇2 ft (xt ) ∇ft (xt ) dt 2  −1 X t2 X t(xt − a(i) ) 1  ≤ (i) (i) (i) ḡt (xt ) i∈[n] 1 + gt (xt ) i∈[n] gt (xt )(1 + gt (xt )) ≤ 2 Next, we have 1 d (i) d  2 gt (xt ) = 1 + t2 kxt − a(i) k22 dt dt   1 (i) −1 (i) 2 2 (i) > d = · gt (xt ) 2tkxt − a k2 + 2t (xt − a ) xt 2 dt 18 ḡt (xt ) . t2 (i) which by Cauchy Schwarz and that tkxt − a(i) k2 ≤ gt (xt ) yields the second equation. Furthermore, X d X d d X 1 1 1 d (i) ≤ = wt = gt (xt ) (i) (i) (i) 2 dt dt dt dt 1 + gt (xt ) i∈[n] i∈[n] (1 + gt (xt )) i∈[n] 1 + gt (xt ) (i) 1 X gt (xt ) + ḡt wt ≤ ≤2 (i) 2 t t i∈[n] (1 + gt (xt )) which yields the third equation. Therefore, we have that  0 2 ˆ t0 wα  ˆ t0 ˆ t0 d 2α w 1 t α dα 0 dα ≤ dα = 2 . dα = ln |ln wt − ln wt | = w w α t α α t t t Exponentiating the above inequality yields the final inequality. Lemma 3. For all t ≥ 0 we have − 12 · t · wt I   d  2 ∇ ft (xt )  12 · t · wt I dt (3.1) and therefore for all β ∈ [0, 18 ] ∇2 f (xt ) − 15βt2 wt I  ∇2 f (xt(1+β) )  ∇2 f (xt ) + 15βt2 wt I . (3.2) Proof of Lemma 3. Let (i) def At = and recall that ∇2 ft (xt ) = t2 i∈[n] 1+g (i) t P  d 2 d  ∇ ft (xt ) = dt dt X t2 t2 (xt − a(i) )(xt − a(i) )> (i) (i) (1 + gt )gt   (i) I − At . Consequently   (i) I − At   1 + i∈[n]    X X − d gt(i)  1 t2 d (i) (i) 2 2 dt = 2t 2 ∇ ft (xt ) + t − A I − A t (i) (i) 2 t dt t i∈[n] (1 + gt ) i∈[n] 1 + gt (i) Now, since 0  At yields v >  (i) gt  I we have 0  ∇2 ft (xt )  t2 wt I. For all unit vectors v, using Lemma 2 d (i)    X X dt gt d 2 t2 d (i) 2 2 2 > v ∇ ft (xt ) v ≤ 2t · wt · kvk2 + t kvk2 + A v (i) 2 (i) dt dt t i∈[n] (1 + gt ) i∈[n] 1 + gt   X t2 d (i) > ≤ 4t · wt + v A v . (i) dt t i∈[n] 1 + gt Next  1 t2  !2   d (i) (i) d (i) gt + gt gt (xt − a(i) )(xt − a(i) )> − (1 + (i) (i) dt dt (1 + gt )gt " #  >   2 d d t (xt − a(i) ) xt + xt (xt − a(i) )> , + (i) (i) dt dt (1 + gt )gt d (i) A = 2t dt t (i) At t (i) gt ) 19 (i) and therefore by Lemma 2 and the fact that tkxt − a(i) k2 ≤ gt v>  we have   d (i)  2 kx − a(i) k k d x k 2t2 dt gt 2t d (i) 2 t 2 dt t 2  kvk22 v ≤ + kxt − a(i) k22 + A (i) (i) 2 (i) (i) dt t t (1 + gt )(gt ) (1 + gt )gt (i) ≤ 2 2 gt + ḡt 2 4 4 ḡt ḡt + · ≤ + . + · (i) (i) t t 1+g t 1+g t t 1 + g (i) t t t Consequently, we have v >   X ḡt d 2 ∇ ft (xt ) v ≤ 8t · wt + 4t ≤ 12t · wt (i) 2 dt i∈[n] (1 + gt ) which completes the proof of (3.1). To prove (3.2), let v be any unit vector and note that ˆ v > 2 ˆ t(1+β)  d  2 ∇ fα (xα ) v · dα ≤ 12 v α · wα dα dα t t   ˆ t(1+β)   12 1 1 4 α 2 4 wt dα ≤ 2 [t(1 + β)] − t wt ≤ 12 α t t 4 4 t   2 4 2 = 3t (1 + β) − 1 wt ≤ 15t βwt 2 where we used Lemma 3 and 0 ≤ β ≤ A.4 t(1+β)  ∇ ft(1+β) (x) − ∇ ft (x) v = 1 8 > at the last line. Where is the next Optimal Point? Lemma 16. For all t, we have i 1h 2 t · wt I − (t2 · wt − µt )vt vt>  ∇2 ft (xt )  t2 · wt I − (t2 · wt − µt )vt vt> . 2 Proof of Lemma 16. This follows immediately from Lemma 14, regarding the hessian of the penalized objective function, and Lemma 26, regarding the sum of PSD matrices expressed as the identity matrix minus a rank 1 matrix. 1 Lemma 5 (The Central Path is Almost Straight). For all t ≥ 0, β ∈ [0, 600 ], and any unit vector wδ 1 > y with |hy, vt i| ≤ t2 ·κ where κ = maxδ∈[t,(1+β)t] µδ , we have y (x(1+β)t − xt ) ≤ 6β t . Proof of Lemma 5. Clearly ˆ > (1+β)t y (x(1+β)t − xt ) = t ˆ (1+β)t ≤ d y xα dα ≤ dα ˆ −1 X y > ∇2 fα (xα ) i∈[n] (1+β)t k ∇2 fα (xα ) ≤ −1 t 20 y> β t ˆ (1+β)t > yk2 · d xα dα dα α (1 + X (i) (i) gα )gα (xα − a(i) ) dα α (i) (i) i∈[n] (1 + gα )gα (xα − a(i) ) dα 2 (i) Now since clearly αkxα − a(i) k2 ≤ gα , invoking Lemma 2 yields that X α(xα − a(i) ) (i) ≤ (i) i∈[n] (1 + gα )gα 2 1 X (i) i∈[n] 1 + gα = wα ≤  α 2 t wt . Now by invoking Lemma 3 and the Lemma 16, we have that i 1h 2 ∇2 fα (xα )  ∇2 ft (xt ) − 15βt2 wt I  t · wt I − (t2 · wt − µt )vt vt> − 15βt2 wt I. 2 def For notational convenience let Ht = ∇2 ft (xt ) for all t > 0. Then Lemma 3 shows that Hα = Ht +∆α where k∆α k2 ≤ 15βt2 wt . Now, we note that H2α = H2t + ∆α Ht + Ht ∆α + ∆2α . Therefore, we have kH2α − H2t k2 ≤ k∆α Ht k2 + kHt ∆α k2 + k∆2α k2 ≤ 2k∆k2 kHt k2 + k∆k22 ≤ 40βt4 wt2 . Let S be the subspace orthogonal to vt . Then, Lemma 16 shows that Ht  12 t2 wt I on S and hence H2t  41 t4 wt2 I on S.4 Since kH2α − H2t k2 ≤ 40βt4 wt2 , we have that   1 4 2 H2α  t wt − 40βt4 wt2 I on S 4 and hence H−2 α   1 4 2 t wt − 40βt4 wt2 4 −1 I on S. Therefore, for any z ∈ S, we have −1 ∇2 fα (xα ) z 2 = H−1 α z 2 ≤q kzk2 1 4 2 4 t wt . − 40βt4 wt2 Now, we split y = z + hy, vt ivt where z ∈ S. Then, we have that −1 −1 −1 ∇2 fα (xα ) y ≤ ∇2 fα (xα ) z + |hy, vt i| ∇2 fα (xα ) vt 2 2 1 1 ≤q + 2 t ·κ 1 4 2 4 2 4 t wt − 40βt wt −1 ∇ fα (xα ) vt 2 2 2 . Note that, we also know that λmin (∇2 fα (xα )) ≥ µα and hence λmax (∇2 fα (xα )−2 ) ≤ µ−2 α . Therefore, we have    1 1 µα 1 1 1 −1 ≤ 5 . q ∇2 fα (xα ) y ≤ + 2 ≤ 2 2 + q t w µ t w t2 wt 2 1 α α t t2 w 1 − 40β − 40β t 4 4 Combining these and using that β ∈ [0, 1/600] yields that   ˆ (1+β)t 5 1 1 3 5  α 2 3 3 > y (x(1+β)t − xt ) ≤ wt dα ≤ 4 (1 + β) t − t t 2 wt t t 3 3 t  5  6β ≤ (1 + β)3 − 1 ≤ . 3t t 4 By A  B on S we mean that for all x ∈ S we have x> Ax ≤ x> Bx. The meaning of A  B on S is analagous. 21 A.5 Where is the End? 2n t Lemma 6. f (xt ) − f (x∗ ) ≤ for all t > 0. Proof of Lemma 6. Clearly, ∇ft (xt ) = 0 by definition of xt . Consequently 1t ∇ft (xt )> (xt − x∗ ) = 0 and using Lemma 13 to give the formula for ∇ft (xt ) yields 0= X t(xt − a(i) )> (xt − x∗ ) (i) 1 + gt (x) i∈[n] = X tkxt − a(i) k2 + t(xt − a(i) )> (a(i) − x∗ ) 2 (i) . 1 + gt (xt ) i∈[n] (i) (i) Therefore, by Cauchy Schwarz and the fact that tkxt − a(i) k2 ≤ gt (xt ) ≤ 1 + gt X t(xt − a(i) )> (a(i) − x∗ ) (i) ≥− 1 + gt (xt ) i∈[n] X tkxt − a(i) k2 ka(i) − x∗ k2 (i) 1 + gt (xt ) i∈[n] ≥ −f (x∗ ) . (i) Furthermore, since 1 + gt (xt ) ≤ 2 + tkxt − a(i) k2 we have X tkxt − a(i) k2 2 i∈[n] 1+ (i) gt (xt ) ≥ X kxt − a(i) k2 − i∈[n] X 2kxt − a(i) k2 i∈[n] 1+ (i) gt (xt ) ≥ f (xt ) − 2n . t Combining yields the result. A.6 Simple Lemmas Here we provide various small technical Lemmas that we will use to bound the accuracy with which we need to carry out various operations in our algorithm. Here we use some notation from Section 4 to simplify our bounds and make them more readily applied. Lemma 17. For any x, we have that kx − xt k2 ≤ f (x). P Proof of Lemma 17. Since i∈[n] kx − a(i) k2 = f (x), we have that kx − a(i) k2 ≤ f (x) for all i ∈ [n]. Since ∇f (xt ) = 0 by Lemma 13 we see that xt is a convex combination of the a(i) and therefore kx − xt k2 ≤ f (x) by convexity. Lemma 18. x(0) = 1 n P i∈[n] a (i) is a 2-approximate geometric median, i.e. f˜∗ ≤ 2 · f (x∗ ). Proof. For all x ∈ Rd we have kx(0) − xk2 = 1 X (i) 1 X a − x n n i∈[n] i∈[n] ≤ 2 1 X (i) f (x) ka − xk2 ≤ . n n i∈[n] Consequently, f (x(0) ) ≤ X i∈[n] kx(0) − a(i) k2 ≤ X  kx(0) − x∗ k2 + kx∗ − a(i) k2 ≤ 2 · f (x∗ ) i∈[n] 22 Lemma 19. For all t ≥ 0, we have 1≤ In particular, if t ≤ 2n ˜∗ ·f (x∗ ) , t2 · wt (x) (i) ≤ ḡt (x) ≤ max gt (x) ≤ 1 + t · f (x) . µt (x) i∈[n] we have that (i) gt ≤ 3n + tnkx − xt k2 . ˜∗ P t2 ·wt (x) t2 i∈[n] g (i) (x)(1+g (i) (x)) µt (x) ≤ ḡt (x), follows from µt (x) ≥ t t that the largest eigenvalue of ∇2 ft (x) is at most t2 · wt (x). The second follows from (i) ḡt (x) is a weighted harmonic mean of gt (x) and therefore Proof of Lemma 19. The first claim 1 ≤ and the fact the fact that (i) ḡt (x) ≤ max gt (x) ≤ 1 + t · max kx − a(i) k2 ≤ 1 + t · f (x) . i∈[n] i∈[n] For the final inequality, we use the fact that f (x) ≤ f (xt ) + nkx − xt k2 and the fact that f (xt ) ≤ f (x∗ ) + 2n t by Lemma 6 and get   2n 3n (i) + nkx − xt k2 ≤ + tnkx − xt k2 . gt ≤ 1 + t f (x∗ ) + t ˜∗ Lemma 20. For all x ∈ Rd and t > 0, we have n 2 3n t·˜ ∗ kx − xt k2 + nkx − xt k2 !2 ≤ ft (x) − ft (xt ) ≤ nt2 kx − xt k22 2 Proof of Lemma 20. For the first inequality, note that ∇2 ft (x)  quently, if we let n · t2 I = H in Lemma 30, we have that P t2 i∈[n] 1+g (i) (x) I t 1 nt2 ft (x) − ft (xt ) ≤ kx − xt k2H ≤ kx − xt k22 . 2 2 For the second inequality, note that Lemma 14 and Lemma 19 yields that ∇2 ft (x)  X t2 i∈[n] (1 + gt (x))gt (x) (i) In (i) 3n ˜∗ t + tnkx − xt k2 Consequently, applying 30 again yields the lower bound. B Nearly Linear Time Geometric Median (Proofs) Here we provide proofs, algorithms, and technical lemmas from Section 4. 23 !2 I.  n · t2 I. Conse- B.1 Eigenvector Computation and Hessian Approximation Below we prove that the power method can be used to compute an -approximate top eigenvector 2 (A) of a symmetric PSD matrix A ∈ Rd×d with a non-zero eigenvalue gap g = λ1 (A)−λ . While it λ1 (A) is well know that this can be by applying A to a random initial vector O( αg log( d )) times in the following theorem we provide a slightly less known refinement that the dimension d can be replaced P λi (A) with the stable rank of A, s = i∈[d] λ1 (A) . We use this fact to avoid a dependence on d in our logarithmic factors. Algorithm 5: PowerMethod(A, k) Input: symmetric PSD matrix A ∈ Rd×d and a number of iterations k ≥ 1. Let x ∼ N (0, I) be drawn from a d dimensional normal distribution. Let y = Ak x Output: u = y/kyk2 2 (A) Lemma 21 (Power Method). Let A ∈ Rd×d be a symmetric PSD matrix , let g = λ1 (A)−λ , λ1 (A) P λi (A) ns α s = i∈d λ1 (A) , and let  > 0 and k ≥ g log(  ) for large enough constant α. In time O(nnz(A) · 2 log( ns  )), the algorithm PowerMethod(A, k) outputs a vector u such that hv1 (A), ui ≥ 1 −  and > u Au ≥ (1 − )λ1 (A)with high probability in n/. P Proof. We write x = i∈[d] αi vi (A). Then, we have * +2 P k X αj2  λj (A) 2k α12 i∈[d] αi λi (A) vi (A) 2 hv1 (A), ui = v1 (A), qP =  ≥1−  P 2 λ (A)2k α2 λ1 (A) λj (A) 2k 2 2 α i j6=1 1 α1 + j6=1 αj λ1 (A) i∈[d] i def Re arranging terms we have X αj2  λj (A)   λj (A) 2k−1 X αj2  λj (A)   λ2 (A) 2k−1 ≤ 1 − hv1 (A), ui ≤ λ1 (A) λ1 (A) α2 λ1 (A) α2 λ1 (A) j6=1 1 j6=1 1     X αj2 X αj2 λj (A) λj (A) 2k−1 · · (1 − g) ≤ · · exp(−(2k − 1)g) = 2 2 λ1 (A) λ1 (A) α1 α1 2 j6=1, j6=1 where we used that λλ12 = 1 − g ≤ e−g . Now with high probability in n/ we have that α12 ≥ 1 O(poly(n/)) chi-squared distribution. All that remains is to upper bound qP def 2 consider h(α) = j6=1 αj (λj (A)/λ1 (A)). Note that k∇h(α)k2 =  λj (A) λ1 (A j6=1 1j v uP   u λ (A) 2 u j6=1 αj2 λ1j (A)   ≤ 1. =u tP 2 λj (A) α j6=1 j λ1 (A)  ~ · αj r   P 2 λj (A) α j6=1 j λ1 (A) P by known properties of the   λj (A) 2 j6=1 αj · λ1 (A) . To bound this P 2 where ~1j is the indicator vector for coordinate j. Consequently h is 1-Lipschitz and by Gaussian concentration for Lipschitz functions we know there are absolute constants C and c such that Pr [h(α) ≥ Eh(α) + λ] ≤ C exp(−cλ2 ) . 24 By the concavity of square root and the expected value of the chi-squared distribution we have v  v   uX  u X √ u u λj (A) λ (A) j 2 =t ≤ s. Eh(α) ≤ tE αj · λ1 (A) λ1 (A) j6=i j6=i √ Consequently, since s ≥ 1 we have that Pr[h(α) ≥ (1 + λ) · s] ≤ C exp(−c · λ2 ) for λ ≥ 1 and  P λ (A) that j6=1 αj · λ1j (A) = O(ns/) with high probability in n/. Since k = Ω( g1 log( ns  )), we have hv1 (A), ui2 ≥ 1 −  with high probability in n/. Furthermore, this implies that   X λi (A)vi (A)vi (A)>  u ≥ λ1 (A)hv1 (A), ui2 ≥ (1 − )λ1 (A) . u> Au = u>  i∈[d] Lemma 7 (Computing Hessian Approximation). Let x ∈ Rd , t > 0, and  ∈ (0, 41 ). The algorithm ApproxMinEig(x, t, ) outputs (λ, u) in O(nd log n ) time such that if µt (x) ≤ 41 t2 wt (x)  2 t (x) then hvt (x), ui2 ≥ 1 −  with high probability in n/. Furthermore, if  ≤ 8t2µ·w then t (x)  def 2 1 2 2 > 4 Q  ∇ ft (x)  4Q with high probability in n/ where Q = t · wt (x) − t · wt (x) − λ uu . Proof of Lemma 7. By Lemma 16 we know that 12 Z  ∇2 ft (x)  Z where  Z = t2 · wt (x)I − t2 · wt (x) − µt (x) vt (x)vt (x)> . Consequently, if µt (x) ≤ 41 t2 wt (x), then for all unit vectors z ⊥ vt (x), we have that 1 1 z > ∇2 ft (x)z ≥ z > Zz ≥ t2 wt (x). 2 2 Since ∇2 ft (x) = t2 · wt (x) − A, for A in the definition of ApproxMinEig (Algorithm 2) this implies that vt (x)> Avt (x) ≥ 43 t2 · wt (x) and z > Az ≤ 21 t2 wt (x). Furthermore, we see that X i∈[d] λi (A) = tr(A) = X t4 kx − a(i) k22 (i) (i) 2 i∈[n] (1 + gt (x)) gt (x) ≤ t2 · wt (x) Therefore, in this case, A has a constant multiplicative gap between its top two eigenvectors and stable rank at most a constant (i.e. g = Ω(1) and s = O(1) in Theorem 21). Consequently, by Theorem 21 we have hvt (x), ui2 ≥ 1 − . For the second claim, we note that t2 · wt (x) − µt (x) ≥ u> Au ≥ (1 − )λ1 (A) = (1 − )(t2 · wt (x) − µt (x)) Therefore, since λ = u> ∇2 ft (x)u = t2 · wt (x) − u> Au, we have (1 − )µt (x) −  · t2 wt (x) ≤ λ ≤ µt (x). (B.1) On the other hand, by Lemma 27, we have that √ √ I  vt (x)vt (x)> − uu>  I. (B.2)  2 t (x) Combining (B.1) and (B.2), we have 12 Z  Q  2Z if  ≤ 8t2µ·w and 14 Q  ∇2 ft (x)  4Q t (x) follows. On the other hand, when µt (x) > 41 t2 wt (x). It is the case that 41 t2 ·wt (x)I  ∇2 ft (x)  t2 ·wt (x)I and 14 t2 · wt (x)I  Q  t2 · wt (x)I again yielding 41 Q  ∇2 ft (x)  4Q. 25 3 v 2 Lemma 8. Let (λ, u) = ApproxMinEig(x, t, v ) for v < 81 and kx − xt k2 ≤ tc for c ≤ ( 36 ) . If 1 2 2 µt ≤ 4 t · wt then with high probability in n/v for all unit vectors y ⊥ u, we have hy, vt i ≤ 8v . Proof of Lemma 8. By Lemma 7 we know that hvt (x), ui2 ≥ 1 − v . Since clearly kx − xt k2 ≤ by assumption, Lemma 1 shows 1 20t , 2 2 2/3 2 (1 − 62/3 c )∇ ft (xt )  ∇ ft (x)  (1 + 6c )∇ ft (xt ). Furthermore, since µt ≤ 41 t2 · wt , as in Lemma 7 we know that the largest eigenvalue of A defined in ApproxMinEig(x, t, ) is at least 34 t2 · wt while the second largest eigenvalue is at most 12 t2 · wt . Consequently, the eigenvalue gap, g, defined in Lemma 28 is at least 13 and this lemma shows that 2/3 hvt , ui2 ≥ 1 − 36c ≥ 1 − v . Consequently, by Lemma 29, we have that hu, vt i2 ≥ 1 − 4v . To prove the final claim, we write u = αvt + βw for an unit vector w ⊥ vt . Since y ⊥ u, we have that 0 = αhvt , yi + βhw, yi. Then, either hvt , yi = 0 and the result follows or α2 hvt , yi2 = β 2 hw, yi2 and since α2 + β 2 = 1, we have hvt , yi2 ≤ 1 − α2 β 2 hw, yi2 ≤ ≤ 2(1 − α2 ) ≤ 8v α2 α2 where in the last line we used that α2 ≥ 1 − 4v > 1 2 Lemma 9. Suppose µt ≥ 14 t2 · wt and let t0 ∈ [t, (1 + since v ≤ 81 . 1 600 )t] then kxt0 − xt k2 ≤ 1 100t . 1 Proof of Lemma 9. Note that t0 = (1 + β)t where β ∈ [0, 600 ]. Since 41 t2 · wt I  µt I  ∇2 f (xt ) 0 applying Lemma 3 then yields that for all s ∈ [t, t ]   1 t2 · wt 2 2 2 ∇ f (xs )  ∇ f (xt ) − 15βt wt I  − 15β t2 · wt I  I. 4 5 (i) Consequently, by Lemma 13, the fact that tkxt − a(i) k2 ≤ gt , and Lemma 2 we have ˆ t0 kx − xt k2 ≤ t0 t ˆ t0 ≤ t = B.2 d xs ds ˆ ∇2 fs (xs ) ds = 2 t0 t s −1 X i∈[n] (1 + (i) (i) gs )gs (xs − a(i) ) ˆ t0 ˆ t0 5  s 2 5ws 5 X skxs − a(i) k2 d ≤ d ≤ · ds s (i) (i) s t 2 · wt t 2 · wt t2 t t t (1 + g )g s s i∈[n] ds 2  6β 5 5  1 [(t0 )2 − (t)3 ] = (1 + β)3 − 1 ≤ ≤ . 4 3t 3t t 100t Line Searching Here we prove the main results we use on centering, Lemma 10, and line searching Lemma 11. These results are our main tools for computing approximations to the central path. To prove Lemma 11 we also include here two preliminary lemmas, Lemma 22 and Lemma 23, on the structure of gt,y,v defined in (4.1).  2 t (x) Lemma 10. Given some y ∈ Rd , t > 0 and 0 ≤  ≤ 8t2µ·w . In O(nd log( n )) time t (x) LocalCenter(y, t, ) computes x(k) such that with high probability in n/. ! ft (x(k) ) − min 1 kx−yk2 ≤ 49t ft (x) ≤  ft (y) − 26 min 1 kx−yk2 ≤ 49t ft (x) . Proof of Lemma 10. By Lemma 7 we know that 14 Q  ∇2 ft (y)  4Q with high probability in n/. 1 Furthermore for x such that kx − yk2 ≤ 50t Lemma 1 shows that 12 ∇2 ft (x)  ∇2 ft (y)  2∇2 ft (x). 1 1 2 Combining these we have that 8 Q  ∇ ft (x)  8Q for all x with kx − yk2 ≤ 50t . Therefore, Lemma 30 shows that !  k 1 ft (x) ≤ 1 − ft (x) . ft (x(k) ) − min ft (x(0) ) − min 1 1 64 kx−yk2 ≤ 49t kx−yk2 ≤ 49t The guarantee on x(k) then follows from our choice of k. For the running time, Lemma 7 showed the cost of ApproxMinEig is O(nd log( n )). Using Lemma 32 we see that the cost per iteration is O(nd) and therefore, the total cost of the k iterations is O(nd log( 1 )). Combining yields the running time. Lemma 22. For t > 0, y ∈ Rd , and unit vector v ∈ Rd , the function gt,y,v : R → R defined by (4.1) is convex and nt-Lipschitz. def Proof. Changing variables yields gt,y,v (α) = minz∈S ft (z + αv) for S = {z ∈ Rd : kz − yk2 ≤ Since ft is convex and S is a convex set, by Lemma 31 we have that gt,y,v is convex. (i) Next, by Lemma 13, triangle inequality, and the fact that tkx − a(i) k2 ≤ gt (x) we have k∇ft (x)k2 = X t2 (x − a(i) ) ≤ (i) i∈[n] 1 + gt (x) X t2 kx − a(i) k2 (i) (B.3) 1 + gt (x) i∈[n] 2 ≤ tn . 1 49t }. Consequently, ft (x) is nt-Lipschitz, i.e., for all x, y ∈ Rn we have |ft (x) − ft (y)| ≤ ntkx − yk2 . Now def 1 if we consider the set Sα = {x ∈ Rd : kx − (y + αv)k2 ≤ 49t } then we see that for all α, β ∈ R there is a bijection from Sα to Sβ were every point in the set moves by at most k(α − β)vk2 ≤ |α − β|. Consequently, since gt,y,v (α) simply minimizes ft over Sα we have that gt,y,v is nt-Lipschitz as desired. v ≤ (4.1) 1 400f (x∗ ) y ∈ Rd ≤ t ≤ t0 ≤ (1 + 2n and let (u, λ) = ApproxMinEig(y, t, v ) for ˜∗ ·f˜∗ 3 v 2 1 ˜∗ 2 such that ky − xt k2 ≤ 1t ( 36 ) . The function gt,0 y,v : R → R defined in 8 ( 3n ) and 0 satisfies gt ,y,v (α∗ ) = minα gt,y,v (α) = ft (xt ) for some α∗ ∈ [−6f (x∗ ), 6f (x∗ )]. Lemma 23. Let 1 600 )t ≤ 1 Proof. Let z ∈ Rd be an arbitrary unit vector and β = 600 . 1 2 If µt ≤ 4 t · wt then by Lemma 8 and our choice of v we have that if z ⊥ u then  2 |hz, vt i| ≤ 8v ≤ ˜∗ 3n 2 . t2 ·wδ µδ 1 100t . Now by Lemma 19 and our bound on t0 we know that maxδ∈[t,t0 ] minδ∈[t,t0 ] t2µ·wδ . δ 6β t ≤ 3n ˜∗ and hence |hz, vt i| ≤ By Lemma 5, we know that z > (xt0 − xt ) ≤ ≤ 1 1 2 . Otherwise, we have µt ≥ 4 t · wt and by Lemma 9 we have kxt0 − xt k2 ≤ 100t 1 In either case, since ky − xt k2 ≤ 100t , we can reach xt0 from y by first moving an Euclidean 1 distance of 100t to go from y to xt , then adding some multiple of v, then moving an Euclidean 1 distance of 100t in a direction perpendicular to v. Since the total movement perpendicular to v is 1 1 1 0 0 0 100t + 100t ≤ 49t0 we have that minα gt ,y,v (α) = ft (xt ) as desired. 27 All that remains is to show that there is a minimizer of gt0 ,y,v in the range [−6f (x∗ ), 6f (x∗ )]. However, by Lemma 6 and Lemma 17 we know that ky − xt0 k2 ≤ ky − xt k2 + kxt − x∗ k2 + kx∗ − xt0 k2 ≤ 1 + f (x∗ ) + f (x∗ ) ≤ 6f (x∗ ) . 100t Consequently, α∗ ∈ [−6f (x∗ ), 6f (x∗ )] as desired. Lemma 11. Let 1 0 400f (x∗ ) ≤ t ≤ t ≤ y ∈ Rd such that ky ˜∗ 2 v ≤ 81 ( 3n ) and calls to the LocalCenter, probability in n/. 1 2n 600 )t ≤ ˜∗ ·f˜∗ and let (λ, u) = ApproxMinEig(y, t, v ) for v 32 n )) time and O(log( ˜∗n· )) − xt k2 ≤ 1t ( 36 ) . In O(nd log2 ( ˜∗ ·· v 0 0 LineSearch(y, t, t , u, ) outputs x such that kx0 − xt0 k2 ≤ t0 with high (1 + Proof of Lemma 11. By (B.3) we know that ft0 is nt0 Lipschitz and therefore ft0 (y) − min 1 kx−yk2 ≤ 49t 0 ft0 (x) ≤ n nt0 = . 0 49t 49 Furthermore, for α ∈ [−6f (x∗ ), 6f (x∗ )] we know that by Lemma 17 ky + αu − xt0 k2 ≤ ky − xt k2 + |α| + kxt − x∗ k2 + kxt0 − x∗ k2 ≤ 1 + 8f (x∗ ) t consequently by Lemma 19 we have (t0 )2 · wt0 (y + αu) 3n 3n ≤ + t0 nky + αu − xt0 k2 ≤ + 2n + 8t0 nf (x∗ ) ≤ 20n2 ˜−1 ∗ . µt0 (y + αu) ˜∗ ˜∗ 2 ˜∗ , invoking Lemma 10 yields that |q(α) − gt0 ,y,u (α)| ≤ n49O with high probability Since O ≤ 160n 2 in n/˜ ∗ by and each call to LocalCenter takes O(nd log nO ) time. Furthermore, by Lemma 22 we have that gt0 ,y,u is a nt’-Lipschitz convex function and by Lemma 23 we have that the minimizer has value ft0 (xt0 ) and is achieved in the range [−6f˜∗ , 6f˜∗ ]. Consequently, combining all these facts and invoking Lemma E.3, i.e. our result on on one dimensional function minimization, we have 0 ft0 (x0 ) − ft0 (xt0 ) ≤ 2O using only O(log( nt fO(x∗ ) )) calls to LocalCenter. Finally, by Lemma 20 and Lemma 6 we have !2 n kx0 − xt0 k2 O . ≤ ft0 (x0 ) − ft0 (xt0 ) ≤ 2 3n/t0 + nkx0 − xt0 k2 2 ˜∗ Hence, we have that r 0 kx − xt0 k2 ≤ Since O = 2 ˜ ∗ , 160n2 O n  3n/t0 ˜∗  + √ nO kx0 − xt0 k2 . we have r 0 kx − xt0 k2 ≤ O 6n  ≤ 0. n ˜∗ t0 t Lemma 12. Let ≤ t ≤ t0 ≤ (1 + Then, vector time, LineSearch(x, t, t, u, ) outputs y such that ky − xt k2 ≤ 1 400f (x∗ ) n in O(nd log2 ( ·˜ ∗ )) d u∈R . 1 600 )t ≤ 2n ˜∗ ·f˜∗ and let x ∈ Rd satisfy kx − xt k2 ≤  t for any Proof of Lemma 12. The proof is strictly easier than the proof of Lemma 11 as kx−α∗ u−xt k2 ≤ is satisfied automatically for α∗ = 0. Note that this lemma assume less for the initial point. 28 1 100t . 1 100t B.3 Putting It All Together Theorem 1. In O(nd log3 ( n )) time, Algorithm 1 outputs an (1 + )-approximate geometric median with constant probability. Proof of Theorem 1. By Lemma 18 we know that x(0) is a 2-approximate geometric median and therefore f (x(0) ) = f˜∗ ≤ 2 · f (x∗ ). Furthermore, since kx(0) − xt1 k2 ≤ f (x(0) ) by Lemma 17 and 1 t1 = 4001f˜ we have kx(0) − xt1 k2 ≤ 400t . Hence, by Lemma 12, we have kx(1) − xt1 k2 ≤ t1c with high 1 ∗ probability in n/. Consequently, by Lemma 11 we have thatkx(k) − xti k2 ≤ tci for all i with high probability in n/. Now, Lemma 6 shows that       2n 1 1 2 1 2n ∗ ˜ f (xtk ) − f (x ) ≤ 1+ ≤ ˜∗ · f∗ 1 + ≤ 1+  · f (x∗ ) . ≤ tk 600 600 3 600 t̃∗ Since kx(k) −xtk k2 ≤ tkc ≤ 400· f˜∗ ·c we have that f (xk ) ≤ f (xtk )+400n· f˜∗ ·c by triangle inequality. Combining these facts and using that c is sufficiently small yields that f (x(k) ) ≤ (1 + )f (x∗ ) as desired. To bound the running time, Lemma 7 shows ApproxMinEvec takes O(nd log( n )) per iteration  2 n and Lemma 11 shows LineSearch takes O nd log  time per iteration, using that v and c are n 1 O(Ω(/n)). Since for l = Ω(log n ) we have that tl > t̃∗ we have  that k = O(log  ). ti+1 ≤ 400 . 2 n n Since there are O(log(  )) iterations taking time O nd log  the running time follows. C Pseudo Polynomial Time Algorithm Here we provide a self-contained result on computing a 1 +  approximate geometric median P in O(d−2 ) time. Note that it is impossible to achieve such approximation for the mean, minx∈Rd i∈[n] kx− a(i) k22 , because the mean can be changed arbitrarily by changing only 1 point. However, [19] showed that the geometric median is far more stable. In Section C.1, we show how this stability property allows us to get an constant approximate in O(d) time. In Section C.2, we show how to use stochastic subgradient descent to then improve the accuracy. C.1 A Constant Approximation of Geometric Median We first prove that the geometric median is stable even if we are allowed to modify up to half of the points. The following lemma is a strengthening of the robustness result in [19]. Lemma 24. Let x∗ be a geometric median of {a(i) }i∈[n] and let S ⊆ [n] with |S| < n2 . For all x  kx∗ − xk2 ≤ 2n − 2|S| n − 2|S|  max ka(i) − xk2 . i∈S / (i) − xk . Proof. For notational convenience let r = kx∗ − xk2 and let M = maxi∈S 2 / ka (i) For all i ∈ / S, we have that kx − a k2 ≤ M , hence, we have kx∗ − a(i) k2 ≥ r − kx − a(i) k2 ≥ r − 2M + kx − a(i) k2 . 29 Furthermore, by triangle inequality for all i ∈ S, we have kx∗ − a(i) k2 ≥ kx − a(i) k2 − r . Hence, we have that X kx∗ − a(i) k2 ≥ i∈[n] Since x∗ is a minimizer of X kx − a(i) k2 + (n − |S|)(r − 2M ) − |S|r . i∈[n] P i∈[n] kx∗ − a(i) k2 , we have that (n − |S|)(r − 2M ) − |S|r ≤ 0. Hence, we have kx∗ − xk2 = r ≤ 2n − 2|S| M. n − 2|S| Now, we use Lemma 24 to show that the algorithm CrudeApproximate outputs a constant approximation of the geometric median with high probability. Algorithm 6: CrudeApproximateK Input: a(1) , a(2) , · · · , a(n) ∈ Rd . Sample two independent random subset of [n] of size K. Call them S1 and S2 . Let i∗ ∈ arg mini∈S2 αi where αi is the 65 percentile of the numbers {ka(i) − a(j) k2 }j∈S1 . ∗ Output: Output a(i ) and αi∗ . Lemma 25. Let x∗ be a geometric median of {a(i) }i∈[n] and (e x, λ) be the output of CrudeApproximateK .  ek2 ≤ 6d60 x). We define dkT (x) be the k-percentile of kx − a(i) k i∈T . Then, we have that kx∗ − x [n] (e Furthermore, with probability 1 − e−Θ(K) , we have d60 x) ≤ λ = d65 x) ≤ 2d70 S1 (e [n] (e [n] (x∗ ). Proof. Lemma 24 shows that for all x and T ⊆ [n] with |T | ≤ n2   2n − 2|T | kx∗ − xk2 ≤ max ka(i) − xk2 . n − 2|T | i∈T / Picking T to be the indices of largest 40% of ka(i) − x ek2 , we have   2n − 0.8n x). kx∗ − x ek2 ≤ d60 x) = 6d60 [n] (e [n] (e n − 0.8n (C.1) 65 −Θ(K) because S is a For any point x, we have that d60 1 [n] (x) ≤ dS1 (x) with probability 1 − e random subset of [n] with size K. Taking union bound over elements on S2 , with probability 1 − Ke−Θ(K) = 1 − e−Θ(K) , for all points x ∈ S2 65 d60 [n] (x) ≤ dS1 (x). 30 (C.2) yielding that d60 x) ≤ λ. [n] (e Next, for any i ∈ S2 , we have ka(i) − a(j) k2 ≤ ka(i) − x∗ k2 + kx∗ − a(j) k2 . and hence (i) (i) − x∗ k2 + d70 d70 [n] (x∗ ). [n] (a ) ≤ ka (i) 70 (i) Again, since S1 is a random subset of [n] with size K, we have that d65 S1 (a ) ≤ d[n] (a ) with probability 1 − Ke−Θ(K) = 1 − e−Θ(K) . Therefore, (i) (i) d65 − x∗ k2 + d70 S1 (a ) ≤ ka [n] (x∗ ). Since S2 is an independent random subset, with probability 1 − e−Θ(K) , there is i ∈ S2 such that ka(i) − x∗ k2 ≤ d70 [n] (x∗ ). In this case, we have (i) 70 d65 S1 (a ) ≤ 2d[n] (x∗ ). (i) Since i∗ minimize d65 S1 (a ) over all i ∈ S2 , we have that def def ∗ (i ) (i) 70 λ = d65 x) = d65 ) ≤ d65 S1 (e S1 (a S1 (a ) ≤ 2d[n] (x∗ ) . C.2 A 1 +  Approximation of Geometric Median Here we show how to improve the constant approximation in the previous section to a 1 +  approximation. Our algorithm is essentially stochastic subgradient where we use the information from the previous section to bound the domain in which we need to search for a geometric median. Algorithm 7: ApproximateMedian(a(1) , a(2) , · · · , a(n) , ) Input: a(1) , a(2) , · · · , a(n) ∈ Rdq . 2 T . CrudeApproximate√T (a(1) , a(2) , · · · Let T = (60/)2 and let η = 6λ n , a(n) ) . Let (x(1) , λ) = for k ← 1, 2, · · · , T do Sample ik ( from [n] and let n(x(k) − a(ik ) )/kx(k) − a(ik ) k2 if x(i) 6= a(ik ) g (k) = 0 otherwise (k+1) (k) Let x = arg minkx−x(1) k2 ≤6λ η g , x − x(k) + 12 kx − x(k) k22 . end P Output: Output T1 Ti=1 x(k) . Theorem 2. Let x be the output of ApproximateMedian. With probability 1 − e−Θ(1/) , we have Ef (x) ≤ (1 + ) min f (x). x∈Rd Furthermore, the algorithm takes O(d/2 ) time. 31 Proof. After computing x(1) and λ the remainder of our algorithm is the stocastic subgradient descent method applied to f (x). It is routine to check that Ei(k) g (k) is a subgradient of f at x(k) . Furthermore, since the diameter of the domain, x : kx − x(1) k2 ≤ 6λ , is clearly λ and the norm of sampled gradient, g (k) , is at most n, we have that ! r T 1 X (k) 2 Ef x − min f (x) ≤ 6nλ T T kx−x(1) k2 ≤6λ i=1 ∗ (see [5, Thm 6.1]). Lemma 25 shows that kx∗ − x(1) k2 ≤ 6λ and λ ≤ 2d70 [n] (x ) with probability √ −Θ(√T ) . In this case, we have 1 − Te √ ! T 12 2nd70 1 X (k) [n] (x∗ ) √ Ef x − f (x∗ ) ≤ . T T i=1 ∗ Since d70 [n] (x ) ≤ 1 ∗ 0.3n f (x ), Ef we have T 1 X (k) x T ! ≤ i=1 D   60 1+ √ f (x∗ ) ≤ (1 + ) f (x∗ ) . T Derivation of Penalty Function Here we derive our penalized objective function. Consider the following optimization problem:   X ft (x, α) where t · 1T α + − ln αi2 − kx − a(i) k22 . min x∈Rd ,α≥0∈Rn i∈[n] def  2 Since pi (α, x) = − ln αi2 − kx − a(i) k2 is a barrier function for the set αi2 ≥ kx − a(i) k22 , i.e. as αi → kx − a(i) k2 we have pi (α, x) → ∞, we see that as we minimize ft (x, α) for increasing values of t the x values converge to a solution to the geometric median problem. Our penalized objective function, ft (x), is obtain simply by minimizing the αi in the above formula and dropping terms that do not affect the minimizing x. In the remainder of this section we show this formally. Fix some x ∈ Rd and t > 0. Note that for all j ∈ [n] we have ! ∂ 1 2αj . ft (x, α) = t − ∂αj αj2 − kx − a(i) k22 Since f (x, α) is convex in α, the minimum αj∗ must satisfy t  2 αj∗ − kx − a(i) k22  − 2αj∗ = 0 . (D.1) Solving for such αj∗ under the restriction αj∗ ≥ 0 we obtain αj∗ 2+ = q 4 + 4t2 kx − a(i) k22 2t   q 1 2 (i) 2 = 1 + 1 + t kx − a k2 . t 32 (D.2) Using (D.1) and (D.2) we have that    q q X 2 2 2 (i) (i) 2 2 . 1 + 1 + t kx − a k2 − ln 2 1 + 1 + t kx − a k2 min ft (x, α) = α≥0∈Rn t i∈[n] If we drop the terms that do not affect the minimizing x we obtain our penalty function ft :   q X q 2 2 (i) (i) 2 2 ft (x) = 1 + t kx − a k2 − ln 1 + 1 + t kx − a k2 . i∈[n] E Technical Facts Here we provide various technical lemmas we use through the paper. E.1 Linear Algebra First we provide the following lemma that shows that any matrix obtained as a non-negative linear combination of the identity minus a rank 1 matrix less than the identity results in a matrix that is well approximated spectrally by the identity minus a rank 1 matrix. We use this lemma to characterize the Hessian of our penalized objective function and thereby imply that it is possible to apply the inverse of the Hessian to a vector with high precision.  P Lemma 26. Let A = i αi I − βi ai a> ∈ Rd×d where the ai are unit i P vectors and 0 ≤ βi ≤ αi for all i. Let v denote a unit vector that is the maximum eigenvector of i βi ai a> i and let λ denote the corresponding eigenvalue. Then, ! X 1 X αi I − λvv >  A  αi I − λvv > . 2 i i  P def P > v it suffices to show that for > > Proof. Let α = i αi I − λvv i αi . Since clearly v Av = v or equivalently, that λi (A) ∈ [ 12 α, α] for i 6= d. w ⊥ v it is the case thatP12 αkwk22  w> Aw  αkwk22 P However we know that i∈[d] λi (A) = tr(A) = dα − i βi ≥ (d − 1)α and λi (A) ≤ α for all i ∈ [d]. Consequently, since λd (A) ∈ [0, λd−1 (A)] we have 2 · λd−1 (A) ≥ (d − 1)α − d−2 X λi (A) ≥ (d − 1)α − (d − 2)α = α . i=1 Consequently, λd−1 (A) ∈ [ α2 , α] and the result holds by the monotonicity of λi . Next we bound the spectral difference between the outer product of two unit vectors by their inner product. We use this lemma to bound the amount of precision required in our eigenvector computations. Lemma 27. For unit vectors u1 and u2 we have > 2 > 2 ku1 u> 1 − u2 u2 k2 = 1 − (u1 u2 ) Consequently if u> 1 u2 2 ≥ 1 −  for  ≤ 1 we have that √ √ > − I  u1 u> I 1 − u2 u2  33 (E.1) > Proof. Note that u1 u> 1 − u2 u2 is a symmetric matrix and all eigenvectors are either orthogonal to both u1 and u2 (with eigenvalue 0) or are of the form v = αu1 +βu2 where α and β are real numbers that are not both 0. Thus, if v is an eigenvector of non-zero eigenvalue λ it must be that   > λ (αu1 + βu2 ) = u1 u> − u u 2 2 (αu1 + βu2 ) 1 > = (α + β(u> 1 u2 ))u1 − (α(u1 u2 ) + β)u2 or equivalently  (1 − λ) u> 1 u2 > −(u1 u2 ) −(1 + λ)  α β   = 0 0  . By computing the determinant we see this has a solution only when 2 −(1 − λ2 ) + (u> 1 u2 ) = 0 Solving for λ then yields (E.1) and completes the proof. Next we show how the top eigenvectors of two spectrally similar matrices are related. We use this to bound the amount of spectral approximation we need to obtain accurate eigenvector approximations. Lemma 28. Let A and B be symmetric PSD matrices such that (1 − )A  B  (1 + )A. Then def 2 (A) if g = λ1 (A)−λ satisfies g > 0 we have [v1 (A)> v1 (B)]2 ≥ 1 − 2(/g). λ1 (A) Proof. Without loss of generality v1 (B) = αv1 (A)+βv for some unit vector v ⊥ v1 (A) and α, β ∈ R such that α2 + β 2 = 1. Now we know that   v1 (B)> Bv1 (B) ≤ (1 + )v1 (B)> Av1 (B) ≤ (1 + ) α2 λ1 (A) + β 2 λ2 (A) Furthermore, by the optimality of v1 (B) we have that v1 (B)> Bv1 (B) ≥ (1 − )v1 (A)> Av1 (A) ≥ (1 − )λ1 (A) . Now since β 2 = 1 − α2 combining these inequalities yields (1 − )λ1 (A) ≤ (1 + )α2 (λ1 (A) − λ2 (A)) + (1 + )λ2 (A) . Rearranging terms, using the definition of g, and that g ∈ (0, 1] and  ≥ 0 yields α2 ≥ λ1 (A) − λ2 (A) − (λ1 (A) + λ2 (A)) 2λ1 (A) =1− ≥ 1 − 2(/g) . (1 + )(λ1 (A) − λ2 (A)) (1 + )(λ1 (A) − λ2 (A)) Here we prove a an approximate transitivity lemma for inner products of vectors. We use this to bound the accuracy need for certain eigenvector computations. Lemma 29. Suppose that we have vectors v1 , v2 , v3 ∈ Rn such that hv1 , v2 i2 ≥ 1 −  and hv2 , v3 i2 ≥ 1 −  for 0 <  ≤ 21 then hv1 , v3 i2 ≥ 1 − 4. Proof. Without loss of generality, we can write v1 = α1 v2 + β1 w1 for α12 + β12 = 1 and unit vector w1 ⊥ v2 . Similarly we can write v3 = α3 v2 + β3 w3 for α32 + β32 = 1 and unit vector w3 ⊥ v2 . Now, by √ √ the inner products we know that α12 ≥ 1 −  and α32 ≥ 1 −  and therefore |β1 | ≤  and |β3 | ≤ . Consequently, since  ≤ 12 , |β1 β3 | ≤  ≤ 1 −  ≤ |α1 α3 |, and we have hv1 , v3 i2 ≥ hα1 v2 + β1 w1 , α3 v2 + β3 w3 i2 ≥ (|α1 α3 | − |β1 β3 |)2 ≥ (1 −  − )2 = (1 − 2)2 ≥ 1 − 4. 34 E.2 Convex Optimization First we provide a single general lemma about about first order methods for convex optimization. We use this lemma for multiple purposes including bounding errors and quickly compute approximations to the central path. Lemma 30 ([21]). Let f : Rn → R be a twice differentiable function, let B ⊆ R be a convex set, and let x∗ be a point that achieves the minimum value of f restricted to B. Further suppose that for a symmetric positive definite matrix H ∈ Rn×n we have that µH  ∇2 f (y)  LH for all y ∈ B.Then for all x ∈ B we have µ L kx − x∗ k2H ≤ f (x) − f (x∗ ) ≤ kx − x∗ k2H 2 2 and 1 1 k∇f (x)k2H−1 ≤ f (x) − f (x∗ ) ≤ k∇f (x)k2H−1 . 2L 2µ Furthermore, if   L x(1) = arg min f (x(0) ) + h∇f (x(0) ), x − x(0) i + kx(0) − xk2H 2 x∈B then   µ f (x(1) ) − f (x∗ ) ≤ 1 − f (x(0) ) − f (x∗ ) . L (E.2) Next we provide a short technical lemma about the convexity of functions that arises naturally in our line searching procedure. def Lemma 31. Let f : Rn → R ∪ {∞} be a convex function and and let g(α) = minx∈S f (x + αd) for any convex set S and d ∈ Rn . Then g is convex. Proof. Let α, β ∈ R and define xα = arg minx∈S f (x + αd) and xβ = arg minx∈S f (x + βd). For any t ∈ [0, 1] we have g (tα + (1 − t)β) = min f (x + (tα + (1 − t)β) x∈S ≤ f (txα + (1 − t)xβ + (tα + (1 − t)β)d) (Convexity of S) ≤ t · f (xα + αd) + (1 − t) · f (xβ + β · d) (Convexity of f ) = t · g(α) + (1 − t) · g(β) Lemma 32. For any vectors y, z, v ∈ Rd and scalar α, we can compute arg minkx−yk22 ≤α kx−zk2I−vv> exactly in time O(d). Proof. Let x∗ be the solution of this problem. If kx∗ − yk22 < α, then x∗ = z. Otherwise, there is λ > 0 such that x∗ is the minimizer of min kx − zk2I−vv> + λkx − yk22 . x∈Rd Let Q = I − vv > . Then, the optimality condition of the above equation shows that Q(x∗ − z) + λ(x∗ − y) = 0 . 35 Therefore, x∗ = (Q + λI)−1 (Qz + λy) . (E.3) Hence, α = kx∗ − yk22 = (z − y)> Q(Q + λI)−2 Q(z − y). Let η = 1 + λ, then we have (Q + λI) = ηI − vv > and hence Sherman–Morrison formula shows that   vv > η −2 vv > −1 −1 −1 I+ . (Q + λI) = η I + =η 1 − kvk2 η −1 η − kvk2 Hence, we have −2 (Q + λI) =η −2  2vv > vv > kvk2 I+ + η − kvk2 (η − kvk2 )2  =η −2   2η − kvk2 > I+ . vv (η − kvk2 )2 2 Let c1 = kQ(z − y)k22 and c2 = v > Q(z − y) , then we have α = η −2 2η − kvk2  c1 + (η − kvk2 )2  c2 . Hence, we have αη 2 η − kvk2 2 = c1 η − kvk2 2  + c2 2η − kvk2 . Note that this is a polynomial of degree 4 in η and all coefficients can be computed in O(d) time. Solving this by explicit formula, one can test all 4 possible η’s into the formula (E.3) of x. Together with trivial case x∗ = z, we simply need to check among 5 cases to check which is the solution. E.3 Noisy One Dimensional Convex Optimization Here we show how to minimize a one dimensional convex function giving a noisy oracle for evaluating the function. While this could possibly be done using general results on convex optimization with a membership oracle, the proof in one dimension is much simpler and we provide it here for completeness. Lemma 33. Let f : R → R be an L-Lipschitz convex function defined on the [`, u] interval and let g : R → R be an oracle such that |g(y) − f (y)| ≤  for all y. In O(log( L(u−`) )) time and with  L(u−`) O(log(  )) calls to g, the algorithm OneDimMinimizer(`, u, , g, L) outputs a point x such that f (x) − min f (y) ≤ 4. y∈[`,u] Proof. First, note that for any y, y 0 ∈ R if f (y) < f (y 0 ) − 2 then g(y) < g(y 0 ). This directly follows from our assumption on g. Second, note that the output of the algorithm, x, is simply the point queried by the algorithm (i.e. ` and the z`i and zui ) with the smallest value of g. Combining these facts implies that f (x) is within 2 of the minimum value of f among the points queried. It thus suffices to show that the algorithm queries some point within 2 of optimal. (i) (i) To do this, we break into two cases. First, consider the case where the intervals [y` , yu ] all contain a minimizer of f . In this case, the final interval contains an optimum, and is of size at most  L . Thus, by the Lipschitz property, all points in the interval are within  ≤ 2 of optimal, and at least one endpoint of the interval must have been queried by the algorithm. 36 Algorithm 8: OneDimMinimizer(`, u, , g, L) Input: Interval [`, u] ⊆ R and target additive error  ∈ R Input: noisy additive evaluation oracle g : R → R and Lipschitz bound L > 0 (0) (0) Let x(0) = `, ly` = `, yu =mu for i = 1, ..., log3/2 ( L(u−`) ) do  (i−1) 2y` (i−1) (i−1) (i−1) +yu y +2yu (i) and zu = ` 3 3 (i) (i) if g(z` ) ≤ g(zu ) then (i) (i) (i−1) (i) Let (y` , yu ) = (y` , zu ). (i) (i) (i−1) If g(z` ) ≤ g(x ) update x(i) = z` .. (i) (i) else if g(z` ) > g(zu ) then (i) (i) (i) (i−1) Let (y` , yu ) = (z` , yu ). (i) (i) If g(zu ) ≤ g(x(i−1) ) update x(i) = zu . (i) Let z` = end end Output: x(last) For the other case, consider the last i for which this interval does contain an optimum of f . (i) (i) (i) This means that g(z` ) ≤ g(zu ) while a minimizer x∗ is to the right of zu , or the symmetric (i) case with a minimizer is to the left of z` . Without loss of generality, we assume the former. We (i) (i) (i) (i) (i) (i) (i) then have z` ≤ zu ≤ x∗ and x∗ − zu ≤ zu − z` . Consequently zu = αzl + (1 − α)x∗ where (i) (i) (i) α ∈ [0, 12 ] and the convexity of f implies f (zu ) ≤ 21 f (zl )+ 12 f (x∗ ) or equivalently f (zu )−f (x∗ ) ≤ (i) (i) (i) (i) (i) (i) (i) f (z` ) − f (zu ). But f (z` ) − f (zu ) ≤ 2 since g(z` ) ≤ g(zu ). Thus, f (zu ) − f (x∗ ) ≤ 2, and (i) zu is queried by the algorithm, as desired. F Weighted Geometric Median In this section, we show how to extend our results to the weighted geometric median problem, also known as the Weber problem: given a set of n points in d dimensions, a(1) , . . . , a(n) ∈ Rd , with corresponding weights w(1) , . . . , w(n) ∈ R>0 , find a point x∗ ∈ Rd that minimizes the weighted sum of Euclidean distances to them: X def x∗ ∈ arg min f (x) where f (x) = w(i) kx − a(i) k2 . x∈Rd i∈[n] As in the unweighted problem, our goal is to compute (1 + )-approximate solution, i.e. x ∈ Rd with f (x) ≤ (1 + )f (x∗ ). First, we show that it suffices to consider the case where the weights are integers with bounded sum (Lemma 34). Then, we show that such an instance of the weighted geometric median problem can be solved using the algorithms developed for the unweighted problem. Lemma 34. Given points a(1) , a(2) , . . . , a(n) ∈ Rd , non-negative weights w(1) , w(2) , . . . , w(n) ∈ R>0 , (1) (2) (n) and  ∈ (0, 1), we can compute in linear time weights w1 , w1 , . . . , w1 such that: 37 (1) (n) • Any (1+/5)-approximate weighted geometric median of a(1) , . . . , a(n) with the weights w1 , . . . , w1 is also a (1 + )-approximate weighted geometric median of a(1) , . . . , a(n) with the weights w(1) , . . . , w(n) , and P (1) (n) (i) • w1 , . . . , w1 are nonnegative integers and i∈[n] w1 ≤ 5n−1 . Proof. Let f (x) = X w(i) ka(i) − xk i∈[n] P (i) and W = w(i) . Furthermore, let 0 = /5 and for each i ∈ [n], define w0 = 0nW w(i) , j k i∈[n] (i) (i) (i) (i) (i) w1 = w0 and w2 = w0 − w1 . We also define f0 , f1 , f2 , W0 , W1 , W2 analogously to f and W . Now, assume f1 (x) ≤ (1 + 0 )f1 (x∗ ), where x∗ is the minimizer of f and f0 . Then: f0 (x) = f1 (x) + f2 (x) ≤ f1 (x) + f2 (x∗ ) + W2 kx − x∗ k2 and W2 kx − x∗ k2 =  W2 X (i) W2 X (i)  w1 kx − x∗ k2 ≤ w1 kx − a(i) k2 + ka(i) − x∗ k W1 W1 i∈[n] i∈[n] W2 (f1 (x) + f1 (x∗ )) . ≤ W1 Now, since W0 = n 0 and W1 ≥ W0 − n we have W2 W0 − n W0 − W1 W0 W0 − = = = −1≤ W1 W1 W1 W0 − n W0 − n n 0 n 0 = . −n 1 − 0 Combining these yields that 0 (f1 (x) + f1 (x∗ )) f0 (x) ≤ f1 (x) + f2 (x∗ ) + 1 − 0   0 0 0 ∗ ≤ 1+ (1 +  )f (x ) + f1 (x∗ ) + f2 (x∗ ) 1 1 − 0 1 − 0 ≤ (1 + 50 )f0 (x∗ ) = (1 + )f0 (x∗ ) . We now proceed to show the main result of this section. Lemma 35. A (1 + )-approximate weighted geometric median of n points in Rd can be computed in O(nd log3 −1 ) time. Proof. By applying Lemma 34, we can assume that the weights are integer and their sum does not exceed n−1 . Note that computing the weighted geometric median with such weights is equivalent to computing an unweighted geometric median of O(n−1 ) points (where each point of the original input is repeated with the appropriate multiplicity). We now show how to simulate the behavior of our unweighted geometric median algorithms on such a set of points without computing it explicitly. If  > n−1/2 , we will apply the algorithm ApproximateMedian, achieving a runtime of O(d−2 ) = O(nd). It is only necessary to check that we can implement weighted sampling from our points with O(n) preprocessing and O(1) time per sample. This is achieved by the alias method [15]. 38 Now assume  < n−1/2 . We will employ the algorithm AccurateMedian. Note that we can implement the subroutines LineSearch and ApproxMinEig on the implicitly represented multiset of O(n−1 ) points. It is enough to observe only n of the points are distinct, and all computations performed by these subroutines are identical for identical points. The total runtime will thus be O(nd log3 (n/2 )) = O(nd log3 −1 ). 39
8cs.DS
arXiv:1512.09047v7 [quant-ph] 1 Jun 2017 Tight continuity bounds for the quantum conditional mutual information, for the Holevo quantity and for capacities of quantum channels M.E. Shirokov∗ Abstract We start with Fannes’ type and Winter’s type tight continuity bounds for the quantum conditional mutual information and their specifications for states of special types. Then we analyse continuity of the Holevo quantity with respect to nonequivalent metrics on the set of discrete ensembles of quantum states. We show that the Holevo quantity is continuous on the set of all ensembles of m states with respect to all the metrics if either m or the dimension of underlying Hilbert space is finite and obtain Fannes’ type tight continuity bounds for the Holevo quantity in this case. In general case conditions for local continuity of the Holevo quantity for discrete and continuous ensembles are found. Winter’s type tight continuity bound for the Holevo quantity under constraint on the average energy of ensembles is obtained and applied to the system of quantum oscillators. The above results are used to obtain tight and close-to-tight continuity bounds for basic capacities of finite-dimensional channels (refining the Leung-Smith continuity bounds). ∗ Steklov Mathematical Institute, RAS, Moscow, email:[email protected] 1 Contents 1 Introduction 2 2 Preliminaries 4 3 Tight continuity bounds for the quantum conditional mutual information (QCMI) 7 3.1 Fannes’ type continuity bounds for QCMI. . . . . . . . . . . . 9 3.2 Winter’s type continuity bound for QCMI. . . . . . . . . . . . 12 3.3 QCMI at the output of n copies of a channel . . . . . . . . . . 17 4 On continuity of the Holevo quantity 4.1 Discrete ensembles . . . . . . . . . . . . . . . . . . . 4.1.1 Three metrics on the set of discrete ensembles 4.1.2 The case of global continuity . . . . . . . . . . 4.1.3 General case . . . . . . . . . . . . . . . . . . . 4.2 Generalized (continuous) ensembles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Applications 5.1 Tight continuity bounds for the Holevo capacity and for the entanglement-assisted classical capacity of a quantum channel 5.2 Refinement of the Leung-Smith continuity bounds for classical and quantum capacities of a channel . . . . . . . . . . . . . . 5.3 Other applications . . . . . . . . . . . . . . . . . . . . . . . . 1 20 20 20 24 26 30 32 32 34 36 Introduction Quantitative analysis of continuity of basis characteristics of quantum systems and channels is a necessary technical tool in study of their information properties. It suffices to mention that the famous Fannes continuity bound for the von Neumann entropy and the Alicki-Fannes continuity bound for the conditional entropy are essentially used in the proofs of several important results of quantum information theory [14, 23, 32]. During the last decade many papers devoted to finding continuity bounds (estimates for variation) for different quantities have been appeared (see [2, 3, 4, 18, 26, 33] and the references therein). 2 Although in many applications a structure of continuity bound of a given quantity is more important than concrete values of its coefficients, a task of finding optimal values of these coefficients seems interesting from both mathematical and physical points of view. This task can be formulated as a problem of finding so called ”tight” continuity bound, i.e. relatively ε-sharp estimates for variations of a given quantity. The most known decision of this problem is the sharpest continuity bound for the von Neumann entropy obtained by Audenaert [2] (it refines the Fannes continuity bound mentioned above). Other result in this direction is the tight bound for the relative entropy difference via the entropy difference obtained by Reeb and Wolf [26]. Recently Winter presented tight continuity bound for the conditional entropy (improving the Alicki-Fannes continuity bound) and tight continuity bounds for the entropy and for the conditional entropy in infinite-dimensional systems under energy constraint [33]. By using Winter’s technique a tight continuity bound for the quantum conditional mutual information in infinitedimensional tripartite systems under the energy constraint on one subsystem is obtained in [29, the Appendix]. In this paper we specify Fannes’ type and Winter’s type continuity bounds for the quantum conditional mutual information (obtained respectively in [28] and [29]). Then, by using the Leung-Smith telescopic trick from [18] tight continuity bounds of both types for the output quantum conditional mutual information for n-tensor power of a channel are obtained. We analyse continuity properties of the Holevo quantity with respect to two nonequivalent metrics D0 and D∗ on the set of discrete ensembles of quantum states. The metric D0 is a trace norm distance between ensembles considered as ordered collections of states, the metric D∗ is a factorization of D0 obtained by identification of all ensembles corresponding to the same probability measure on the set of quantum states, which coincides with the EHS-distance between ensembles introduced by Oreshkov and Calsamiglia in [24]. It follows that D∗ is upper bounded by the Kantorovich metric DK and that D∗ generates the weak convergence topology on the set of all ensembles considered as probability measures (so, the metrics D∗ and DK are equivalent in the topological sense). We show that the Holevo quantity is continuous on the set of all ensembles of m states with respect to all the metrics D0 , D∗ and DK if either m or the dimension of underlying Hilbert space is finite and obtain Fannes’ type tight continuity bounds for the Holevo quantity with respect to these metrics in this case. 3 In general case conditions for local continuity of the Holevo quantity with respect to the metrics D0 and D∗ and their corollaries are found. Winter’s type tight continuity bound for the Holevo quantity under the constraint on the average energy of ensembles is obtained and applied to the system of quantum oscillators. The case of generalized (continuous) ensembles (with the Kantorovich metric DK in the role of a distance) is considered separately. The above results are used to obtain tight and close-to-tight continuity bounds for basic capacities of channels with finite-dimensional output (significantly refining the Leung-Smith continuity bounds from [18]). In [30] these results are used to prove uniform continuity of the entanglement-assisted and unassisted classical capacities of infinite-dimensional energy-constrained channels (as functions of a channel) with respect to the strong convergence topology (which is substantially weaker than the diamond-norm topology). 2 Preliminaries Let H be a finite-dimensional or separable infinite-dimensional Hilbert space, B(H) the algebra of all bounded operators with the operator norm k · k and T(H) the Banach space of all trace-class operators in H with the trace norm k · k1. Let S(H) be the set of quantum states (positive operators in T(H) with unit trace) [14, 23, 32]. Denote by IH the unit operator in a Hilbert space H and by IdH the identity transformation of the Banach space T(H). A finite or countable collection {ρi } of states with a probability distribution {pi } is conventionally called (discrete) ensemble and denoted {pi , ρi }. . P The state ρ̄ = i pi ρi is called average state of this ensemble. If quantum systems A and B are described by Hilbert spaces HA and HB then the bipartite system AB is described by the tensor product of these . spaces, i.e. HAB = HA ⊗HB . A state in S(HAB ) is denoted ρAB , its marginal states TrHB ρAB and TrHA ρAB are denoted respectively ρA and ρB . In this paper a special role is plaid by so called qc-states having the form ρAB = m X pi ρi ⊗ |iihi|, (1) i=1 where {pi , ρi }m i=1 is an ensemble of m ≤ +∞ quantum states in S(HA ) and {|ii}m is an orthonormal basis in HB . i=1 4 The von Neumann entropy H(ρ) = Trη(ρ) of a state ρ ∈ S(H), where η(x) = −x log x, is a concave nonnegative lower semicontinuous function on S(H), it is continuous if and only if dim H < +∞ [22, 31]. The concavity of the von Neumann entropy is supplemented by the inequality H(pρ + (1 − p)σ) ≤ pH(ρ) + (1 − p)H(σ) + h2 (p), p ∈ (0, 1), (2) where h2 (p) = η(p) + η(1 − p), valid for any states ρ and σ [23]. Audenaert obtained in [2] the sharpest continuity bound for the von Neumann entropy: |H(ρ) − H(σ)| ≤ ε log(d − 1) + h2 (ε) (3) for any states ρ and σ in S(H) such that ε = 12 kρ − σk1 ≤ 1 − 1/d, where d = dim H. This continuity bound is a refinement of the well known Fannes continuity bound [12]. The quantum conditional entropy H(A|B)ρ = H(ρAB ) − H(ρB ) (4) of a bipartite state ρAB with finite marginal entropies is essentially used in analysis of quantum systems [14, 32]. It is concave and satisfies the following inequality H(A|B)pρ+(1−p)σ ≤ pH(A|B)ρ + (1 − p)H(A|B)σ + h2 (p) (5) for any p ∈ (0, 1) and any states ρAB and σAB . Inequality (5) follows from concavity of the entropy and inequality (2). The conditional entropy can be extended the set of all bipartite states ρAB with finite H(ρA ) by the formula H(A|B)ρ = H(ρA ) − I(A : B)ρ (6) preserving all the basic properties of the conditional entropy (including concavity and inequality (5)) [17]. Winter proved in [33] the following refinement of the Alicki-Fannes continuity bound for the conditional entropy (obtained in [1]):   ε (7) |H(A|B)ρ − H(A|B)σ | ≤ 2ε log d + (1 + ε)h2 1+ε 5 for any states ρ, σ ∈ S(HAB ) such that ε = 12 kρ − σk1 , where d = dim HA . He showed that this continuity bound is tight1 for large d and that the factor 2 in (7) can be removed if ρ and σ are qc-states, i.e. states having form (1). Winter also obtained tight continuity bounds for the entropy and for the conditional entropy for infinite-dimensional quantum states with bounded energy (see details in [33]). The quantum relative entropy for two states ρ and σ in S(H) is defined as follows X H(ρkσ) = hi| ρ log ρ − ρ log σ |ii, i where {|ii} is the orthonormal basis of eigenvectors of the state ρ and it is assumed that H(ρkσ) = +∞ if suppρ is not contained in suppσ [22]. Several continuity bounds for the relative entropy are proved by Audenaert and Eisert [3, 4]. Tight bound for the relative entropy difference expressed via the entropy difference is obtained by Reeb and Wolf [26]. A quantum channel Φ from a system A to a system B is a completely positive trace preserving linear map T(HA ) → T(HB ), where HA and HB are Hilbert spaces associated with these systems [14, 23, 32]. Denote by F(A, B) the set of all quantum channels from a system A to a system B. We will use two metrics on the set F(A, B) induced respectively by the operator norm . kΦk = kΦ(ρ)k1 sup ρ∈T(HA ),kρk1 =1 and by the diamond norm . kΦk⋄ = kΦ ⊗ IdR (ρ)k1 , sup ρ∈T(HAR ),kρk1 =1 of a map Φ : T(HA ) → T(HB ). The latter coincides with the norm of complete boundedness of the dual map Φ∗ : B(HB ) → B(HA ) to Φ [14, 32]. 1 A continuity bound |f (x) − f (y)| ≤ Ba (x, y), x, y ∈ Sa depending on a parameter a |f (x) − f (y)| = 1. is called tight for large a if lim sup sup Ba (x, y) a→+∞ x,y∈Sa 6 3 Tight continuity bounds for the quantum conditional mutual information (QCMI) The quantum mutual information of a bipartite state ρAB is defined as follows I(A : B)ρ = H(ρAB kρA ⊗ ρB ) = H(ρA ) + H(ρB ) − H(ρAB ), (8) where the second expression is valid if H(ρAB ) is finite [21]. Basic properties of the relative entropy show that ρ 7→ I(A : B)ρ is a lower semicontinuous function on the set S(HAB ) taking values in [0, +∞]. It is well known that I(A : B)ρ ≤ 2 min {H(ρA ), H(ρB )} (9) for any state ρAB and that I(A : B)ρ ≤ min {H(ρA ), H(ρB )} (10) for any separable state ρAB [21, 19, 32]. The quantum conditional mutual information (QCMI) of a state ρABC of a tripartite finite-dimensional system is defined by the formula . I(A : B|C)ρ = H(ρAC ) + H(ρBC ) − H(ρABC ) − H(ρC ). (11) This quantity plays important role in quantum information theory [11, 32], its nonnegativity is a basic result well known as strong subadditivity of von Neumann entropy [20]. If system C is trivial then (11) coincides with (8). In infinite dimensions formula (11) may contain the uncertainty ”∞−∞”. Nevertheless the conditional mutual information can be defined for any state ρABC by one of the equivalent expressions I(A : B|C)ρ = sup [I(A : BC)QA ρQA − I(A : C)QA ρQA ] , QA = PA ⊗ IBC , (12) PA I(A : B|C)ρ = sup [I(B : AC)QB ρQB − I(B : C)QB ρQB ] , QB = PB ⊗ IAC , (13) PB where the suprema are over all finite rank projectors PA ∈ B(HA ) and PB ∈ B(HB ) correspondingly and it is assumed that I(X : Y )QX ρQX = cI(X : Y )c−1 QX ρQX , where c = TrQX ρABC [28]. 7 It is shown in [28, Th.2] that expressions (12) and (13) define the same lower semicontinuous function on the set S(HABC ) possessing all basic properties of the conditional mutual information valid in finite dimensions. In particular, the following relation (chain rule) I(X : Y Z|C)ρ = I(X : Y |C)ρ + I(X : Z|Y C)ρ (14) holds for any state ρ in S(HXY ZC ) (with possible values +∞ in both sides). To prove (14) is suffices to note that it holds if the systems X, Y, Z and C are finite-dimensional and to apply Corollary 9 in [28]. If one of the marginal entropies H(ρA ) and H(ρB ) is finite then the conditional mutual information is given, respectively, by the explicit formula2 I(A : B|C)ρ = I(A : BC)ρ − I(A : C)ρ , (15) I(A : B|C)ρ = I(B : AC)ρ − I(B : C)ρ . (16) and By applying upper bound (9) to expressions (15) and (16) we see that I(A : B|C)ρ ≤ 2 min {H(ρA ), H(ρB ), H(ρAC ), H(ρBC )} (17) for any state ρABC . The quantum conditional mutual information is not concave or convex but the inequality pI(A : B|C)ρ + (1 − p)I(A : B|C)σ − I(A : B|C)pρ+(1−p)σ ≤ h2 (p) (18) holds for p ∈ (0, 1) and any states ρABC , σABC with finite I(A : B|C)ρ , I(A : B|C)σ . If ρABC , σABC are states with finite marginal entropies then (18) can be easily proved by noting that I(A : B|C)ρ = H(A|C)ρ − H(A|BC)ρ, (19) and by using concavity of the conditional entropy and inequality (5). The validity of inequality (18) for any states ρABC , σABC with finite conditional mutual information is proved by approximation (using Theorem 2B in [28]). 2 The correctness of these formulae follows from upper bound (9). 8 3.1 Fannes’ type continuity bounds for QCMI. Property (18) makes it possible to directly apply Winter’s modification of the Alicki-Fannes method (cf.[1, 33]) to the conditional mutual information. [ ρ−σ ]± 3 Proposition 1. Let ρ and σ be states in S(HABC ) and τ± = Tr[ . ρ−σ ]± If I(A : B|C)ρ , I(A : B|C)σ , I(A : B|C)τ+ and I(A : B|C)τ− are finite then |I(A : B|C)ρ − I(A : B|C)σ − ε(I(A : B|C)τ+ − I(A : B|C)τ− )| ≤ 2g(ε) (20) and hence |I(A : B|C)ρ − I(A : B|C)σ | ≤ Dε + 2g(ε), (21) . . where D = max{I(A : B|C)τ− , I(A : B|C)τ+ }, ε = 21 kρ − σk1 and g(ε) =  ε (1 + ε)h2 1+ε = (1 + ε) log(1 + ε) − ε log ε.4 If the states ρX and σX , where X is one of the subsystems A, B, AC, BC, are supported by some d-dimensional subspace of HX then (21) holds with D = 2 log d. If either ρAC = σAC or ρBC = σBC then the factor 2 in the right hand sides of (20) and (21) can be removed. Proof. Following [33] note that 1 ε 1 ε ρ+ τ− = ω∗ = σ+ τ+ , 1+ε 1+ε 1+ε 1+ε (22) where ω ∗ = (1 + ε)−1(ρ + [ρ − σ ]− ) is a state in S(HABC ). By applying (18) to the convex decompositions (22) of ω∗ we obtain   (1 − p) [I(A : B|C)ρ − I(A : B|C)σ ] ≤ p I(A : B|C)τ+ − I(A : B|C)τ− + 2h2 (p) and   (1−p) [I(A : B|C)σ − I(A : B|C)ρ ] ≤ p I(A : B|C)τ− − I(A : B|C)τ+ +2h2 (p). ε where p = 1+ε . These inequalities imply (20). Inequality (21) follows from (20) by nonnegativity of I(A : B|C). The second assertion of the proposition follows from the first one and upper bound (17), since the states [τ± ]X are supported by the minimal subspace of HX containing the supports of ρX and σX . 3 [ω]+ and [ω]− are respectively the positive and negative parts of an operator ω. Note that the function g(ε) is involved in the expression for the entropy of Gaussian states [14, Ch.12]. 4 9 Assume that ρAC = σAC . It follows from (22) that [τ+ ]AC = [τ− ]AC . Let be a sequence of finite rank projectors in HA strongly converging to the unit operator IA . Consider the states {PAn } ω n = [TrPAn ωA ]−1 PAn ⊗ IBC ωPAn ⊗ IBC , ω = ρ, σ, τ− , τ+ , ω∗ . Then (22) implies sn εtn sn εtn ρn + τ−n = ω∗n = σn + τ+n , sn + εtn sn + εtn sn + εtn sn + εtn (23) where sn = TrPAn ρA = TrPAn σA and tn = TrPAn [τ+ ]A = TrPAn [τ− ]A . Since H(A|C)ρn = H(A|C)σn < +∞ and H(A|C)τ+n = H(A|C)τ−n < +∞ (where H(A|C) is the extended conditional entropy defined by formula (6)), representation (19) shows that I(A : B|C)ω1 − I(A : B|C)ω2 = H(A|BC)ω2 − H(A|BC)ω1 , (24) where (ω1 , ω2 ) = (ρn , σ n ), (τ+n , τ−n ). By applying concavity of the conditional entropy and inequality (5) to the convex decompositions (23) of ω∗n and taking (24) into account we obtain h i (1−pn ) [I(A : B|C)ρn − I(A : B|C)σn ] ≤ pn I(A : B|C)τ+n − I(A : B|C)τ−n +h2 (pn ) and h i n n (1−pn ) [I(A : B|C)σn − I(A : B|C)ρn ] ≤ pn I(A : B|C)τ− − I(A : B|C)τ+ +h2 (pn ), n where pn = snεt+εt . The lower semicontinuity of the function ω → I(A : B|C)ω n and its monotonicity under local operations (Th.2 in [28]) make it possible to show that lim I(A : B|C)ωn = I(A : B|C)ω , n→∞ ω = ρ, σ, τ− , τ+ . So, passing to the limit in the above inequalities implies (20) with g(ε) instead of 2g(ε).  Proposition 1 implies the following refinement of Corollary 8 in [28]. . Corollary 1. If d = min{dim HA , dim HB } < +∞ then |I(A : B|C)ρ − I(A : B|C)σ | ≤ 2ε log d + 2g(ε) 10 (25) for any states ρ and σ in S(HABC ), where ε = 21 kρ − σk1 . Continuity bound (25) is tight even for trivial C, i.e. in the case I(A : B|C) = I(A : B). If either ρAC = σAC or ρBC = σBC then the term 2g(ε) in the right hand side of (25) can be replaced by g(ε). Proof. Continuity bound (25) and its specification directly follow from Proposition 1. The tightness of this bound with trivial C can be shown by using the example from [33, Remark 3]. Let HA = HB = Cd , ρAB be a maximally entangled pure state and σAB = (1 − ε)ρAB + d2ε−1 (IAB − ρAB ). Then it is easy to see that 12 kρAB − σAB k1 = ε and that I(A : B)ρ − I(A : B)σ = H(σAB ) − H(ρAB ) = 2ε log d + h2 (ε) + O(ε/d2).  Remark 1. By using Audenaert’s continuity bound (3) and Winter’s continuity bound (7) one can obtain via representation (19) with trivial C the following continuity bound |I(A : B)ρ − I(A : B)σ | ≤ ε log(d − 1) + 2ε log d + h2 (ε) + g(ε), for the quantum mutual information (for ε ≤ 1 − 1/d). Since h2 (ε) < g(ε) for ε > 0, this continuity bound is slightly better than (25) for d = 2. Consider the states ρABC = m X pi ρiAC ⊗ |iihi| and σABC = i=1 m X i qi σAC ⊗ |iihi|, (26) i=1 i m where {pi , ρiAC }m i=1 and {qi , σAC }i=1 are ensemble of m ≤ +∞ quantum states in S(HAC ) and {|ii}m i=1 is an orthonormal basis in HB . Such states are called qqc-states in [32]. It follows from upper bound (10) that I(A : B|C)ρ ≤ I(AC : B)ρ ≤ max {H(ρAC ), H(ρB )} (27) for any qqc-state ρABC . Corollary 2. If ρABC and σABC are qqc-states (26) then |I(A : B|C)ρ − I(A : B|C)σ | ≤ ε log d + 2g(ε), . where d = min{dim HAC , m} and ε = 21 kρ − σk1 . 11 (28)  The first term in (28) can be replaced by ε max S({γi− }), S({γi+}) , where i γi± = (2ε)−1 (kpi ρiAC − qi σAC k1 ± (pi − qi )) and S is the Shannon entropy. P P i i i i If either i pi ρAC = i qi σAC or {pi , ρC } = {qi , σC } then the factor 2 in the right hand side of (28) can be removed. Proof. The assertions follow from Proposition 1 and upper bound (27), since m τ± = m X 1X i [pi ρiAC − qi σAC ]± ⊗ |iihi| and hence [τ± ]B = γi± |iihi|.  ε i=1 i=1 If ρABC is a qqc-state (26) then it is easy to show that I(A : B|C)ρ = χ({pi , ρiAC }) − χ({pi , ρiC }), where χ({pi , ρiX }) is the Holevo quantity of ensemble {pi , ρiX }. So, Corollary 2 with trivial C gives continuity bound for the Holevo quantity as a function of ensemble (see Section 4). Corollary 2 with nontrivial C can be used in analysis of the loss of the Holevo quantity under action of a quantum channel (called the entropic disturbance in [9]). 3.2 Winter’s type continuity bound for QCMI. If both systems A and B are infinite-dimensional (and C is arbitrary) then the function I(A : B|C)ρ (defined in (12),(13)) is not continuous on S(HABC ) (only lower semicontinuous) and takes infinite values. Several conditions of local continuity of this function are presented in Corollary 7 in [28], which implies, in particular, that the function I(A : B|C)ρ is continuous on subsets of tripartite states ρABC with bounded energy of ρA , i.e. subsets of the form . CHA ,E = {ρABC | TrHA ρA ≤ E }, (29) where HA is the Hamiltonian of system A, provided that5 Tre−λHA < +∞ for all λ > 0. (30) Condition (30) implies of finite multiplicP+∞ that HA has discrete spectrum +∞ ity, i.e. HA = n=0 En |τn ihτn |, where {|τn i}n=0 is an orthonormal basis 5 Since condition (30) guarantees continuity of the entropy H(ρA ) on the set CHA ,E [31]. 12 of eigenvectors of HA corresponding to the nondecreasing {En }+∞ n=0 P+∞ −λEsequence of eigenvalues (energy levels of HA ) such that n=0 e n is finite for all λ > 0. By condition (30) for any E the von Neumann entropy H(ρ) attains its unique maximum under the constraint TrHA ρ ≤ E at the Gibbs state γA (E) = [Tre−λ(E)HA ]−1 e−λ(E)HA , where λ(E) is the solution of the equation TrHA e−λHA = ETre−λHA [31]. By Proposition 1 in [27] condition (30) implies that . FHA (E) = H(ρ) = H(γA (E)) = o(E) as E → +∞. sup (31) TrHA ρ≤E Recently Winter obtained tight continuity bounds for the entropy and for the conditional entropy in infinite-dimensional systems under the energy constraints [33]. By using Winter’s technique a tight continuity bound for the quantum conditional mutual information I(A : B|C) under the energy constraint on the subsystem A is obtained in [29, the Appendix]. In the proofs of these continuity bounds it is assumed that the Hamiltonian HA satisfies the condition (30) and that . E0 = inf hϕ|HA |ϕi = 0. kϕk=1 (32) The latter condition is used implicitly, it makes the above-defined nonnegative function FHA (E) concave and strictly increasing on [0, +∞). To remove condition (32) it suffices to note that Winter’s arguments remain valid if we replace the function FHA (E) = H(γA (E)) by any its upper bound FbHA (E) defined on [0, +∞) possessing the properties and FbHA (E) > 0, FbH′ A (E) > 0, FbH′′A (E) < 0 for all E > 0 FbHA (E) = o(E) as E → +∞. (33) (34) Note that at least one such function FbHA (E) always exists. By Proposition 1 in [27] one can use FHA (E + E0 ) in the role of FbHA (E). But for applications such choice may be not optimal (see below). By using this observation and Corollary 1 one can obtain the following ”optimized” continuity bound for QCMI. 13 Proposition 2. Let HA be the Hamiltonian of system A satisfying conditions (30) and FbHA (E) any upper bound for the function FHA (E) (defined in (31)) with properties (33) and (34), in particular, FbHA (E) = FHA (E + E0 ). Let ρ and σ be states in S(HABC ) such that TrHA ρA , TrHA σA ≤ E and 1 kρ − σk1 ≤ ε. Then 2 |I(A : B|C)ρ − I(A : B|C)σ | ≤ 2ε(2t + rε (t))FbHA E εt  (35) + 2g(εrε(t)) + 4h2 (εt), 1 for any t ∈ (0, 2ε ], where rε (t) = (1 + t/2)/(1 −εt) ≤ r1 (t) = (1 + t/2)/(1 −t). Remark 2. Continuity bound (35) can be rewritten in the equivalent Winter form (cf.[33]): |I(A : B|C)ρ − I(A : B|C)σ | ≤ 2(2δε′ + ε′ )FbHA(E/δε′ ) + 2g(ε′) + 4h2 (δε′ ), for any ε′ ∈ (ε, 1] such that δε′ = (ε′ − ε)/(ε′ + 1/2) ≤ 1/2, by the change of variables ε′ = εrε (t). The form (35) seems preferable because of its explicit dependence on ε. Remark 3. It is easy to see that the right hand side of (35) attains minimum at some optimal t = t(E, ε). It is this minimum that gives proper upper bound for |I(A : B|C)ρ − I(A : B|C)σ |. Remark 4. Condition (34) implies lim xFbH (E/x) = 0 . Hence, Propox→+0 A sition 2 shows that the function ρABC 7→ I(A : B|C)ρ is uniformly continuous on the set CHA ,E defined in (29) for any E > E0 . Proof. Following the proofs of Lemmas 16,17 in [33] take any δ ∈ (0, 12 ] and denote by Pδ the spectral projector of the operator HA corresponding to the interval [0, δ −1 E]. Consider the states ρδ = Pδ ⊗ IBC ρPδ ⊗ IBC TrPδ ρA and σ δ = Pδ ⊗ IBC σPδ ⊗ IBC . TrPδ σA By using the arguments from the proof of Lemma 16 in [33] it is easy to show that H(ωA ) − [TrPδ ωA ]H(ωAδ ) ≤ δ FbHA (E/δ) + h2 (TrPδ ωA ), (36) TrPδ ωA ≥ 1 − δ, 14 (37) where ω = ρ, σ, and that log TrPδ ≤ FbHA (E/δ). (38) It follows from (37) and basic properties of the trace norm that kρ − σk1 ≥ krρδ − sσ δ k1 ≥ rkρδ − σ δ k1 − |r − s| ≥ (1 − δ)kρδ − σ δ k1 − δ where r = TrPδ ρA and s = TrPδ σA . Hence . where ε′ = (ε + δ/2)/(1 − δ). kρδ − σ δ k1 ≤ 2ε′ , (39) By using (36) and (37) it is easy to derive from Lemma 9 in [29] that |I(A : B|C)ω − I(A : B|C)ωδ | ≤ 2δ FbHA (E/δ) + 2h2 (δ), ω = ρ, σ. (40) By using (38) and (39) we obtain from Corollary 1 that I(A : B|C)ρδ − I(A : B|C)σδ ≤ 2ε′ log TrPδ + 2g(ε′) (41) ≤ 2ε FbHA (E/δ) + 2g(ε′). ′ It follows from (40) and (41) that |I(A : B|C)ρ − I(A : B|C)σ | ≤ I(A : B|C)ρδ − I(A : B|C)σδ + I(A : B|C)ρ − I(A : B|C)ρδ + |I(A : B|C)σ − I(A : B|C)σδ | ≤ (2ε′ + 4δ)FbHA (E/δ) + 2g(ε′) + 4h2 (δ). 1 By taking δ = εt, where t ∈ (0, 2ε ], we obtain the required inequality.  Assume now that A is the ℓ-mode quantum oscillator (while B and C are arbitrary systems). Then HA = ℓ X i=1  1 ~ωi a+ i ai + 2 IA , (42) where ai and a+ i are the annihilation and creation operators and ωi is the frequency of the i-th oscillator [14, Ch.12]. It follows that 15 FHA (E) = max {Ei } ℓ X ℓ g(Ei /~ωi − 1/2), i=1 . 1X E ≥ E0 = ~ωi , 2 i=1 where g(x) = (x+1) log x and the maximum is over all ℓ-tuples Plog(x+1)−x ℓ E1 ,...,Eℓ such that i=1 Ei = E and Ei ≥ 21 ~ωi . The exact value of FHA (E) can be calculated by applying the Lagrange multiplier method which leads to a transcendental equation. But following [33] one can obtain tight upper bound for FHA (E) by using the inequality g(x) ≤ log(x + 1) + 1 valid for all x > 0. It implies ℓ X FHA (E) ≤ P max log(Ei /~ωi + 1/2) + ℓ. ℓ i=1 Ei =E i=1 By calculating this maximum via the Lagrange multiplier method we obtain " ℓ #1/ℓ Y E + E . 0 + ℓ, E∗ = FHA (E) ≤ Fbℓ,ω (E) = ℓ log ~ωi . (43) ℓE∗ i=1 Since log(x + 1) + 1 − g(x) = o(1) as x → +∞, upper bound (43) is tight for large E. By using this upper bound one can obtain from Proposition 2 the following Corollary 3. Let A be the ℓ-mode quantum oscillator, ρ and σ any states in S(HABC ) such that TrHA ρA , TrHA σA ≤ E and 12 kρ − σk1 ≤ ε . Then h i b |I(A : B|C)ρ − I(A : B|C)σ | ≤ 2ε(2t + rε (t)) Fℓ,ω (E) − ℓ log(εt) (44) + 2g(εrε(t)) + 4h2 (εt), 1 for any t ∈ (0, 2ε ], where rε (t) = (1 + t/2)/(1 − εt) and Fbℓ,ω (E) is defined in (43). The function rε (t) in (44) can be replaced by r1 (t) = (1 + t/2)/(1 − t). Continuity bound (44) with optimal t is tight for large E even for trivial C, i.e. in the case I(A : B|C) = I(A : B). Proof. Since Fbℓ,ω (E/x) ≤ Fbℓ,ω (E) − ℓ log x for any positive E and x ≤ 1, the main assertion of the corollary directly follows from Proposition 2. Let ρAB be a purification of the Gibbs state γA (E) and σAB = (1−ε)ρAB + εςA ⊗ ςB , where ςA is a state in S(HA ) such that TrHA ςA ≤ E and ςB is any state in S(HB ). Then inequality (18) implies I(A : B)ρ − I(A : B)σ ≥ 2εH(γA(E)) − h2 (ε) = 2εFHA (E) − h2 (ε). 16 Since Fbℓ,ω (E) − FHA (E) = o(1) as E → +∞, the tightness of the continuity bound (44) for trivial C follows from Remark 5 below.  Remark 5. The parameter t can be used to optimize continuity bound (44) for given value of energy E. The below Lemma 1 (proved by elementary methods) implies that for large energy E the main term in this continuity bound can be made not greater than ε(2Fbℓ,ω (E)+o(Fbℓ,ω (E))) by appropriate choice of t. Lemma 1. Let f (t) = 2t + (1 + t/2)/(1 − t), b > 0 and c be arbitrary. Then min1 f (t)(x − b log t + c) ≤ x + o(x) as x → +∞. t∈(0, 2 ) 3.3 QCMI at the output of n copies of a channel The following proposition is a QCMI-analog of Theorem 11 in [18] proved by the same telescopic trick. It gives Fannes’ type and Winter’s type tight continuity bounds for the function Φ 7→ I(B n : D|C)Φ⊗n ⊗IdCD (ρ) for any given ⊗n n and a state ρ in S(HA ⊗ HCD ). Proposition 3. Let Φ and Ψ be channels from A to B, C and D be any ⊗n systems. Let ρ be any state in S(HA ⊗ HCD ), n ∈ N, 1 2 sup {k(Φ − Ψ) ⊗ IdR (ω)k1 | ωA ∈ {ρA1 , ..., ρAn }} ≤ 21 kΦ − Ψk⋄ . and ∆n (Φ, Ψ, ρ) = I(B n : D|C)Φ⊗n ⊗IdCD (ρ) − I(B n : D|C)Ψ⊗n⊗IdCD (ρ) .67 . A) If dB = dim HB < +∞ and d(Φ, Ψ, ρ) ≤ ε then d(Φ, Ψ, ρ) = ∆n (Φ, Ψ, ρ) ≤ 2nε log dB + ng(ε). (45) Continuity bounds (45) is tight (for any given n and arbitrary system C). B) If the Hamiltonian HB of the system B satisfies condition (30), TrHB Φ(ρAk ), TrHB Ψ(ρAk ) ≤ Ek for k = 1, n and d(Φ, Ψ, ρ) ≤ ε then ∆n (Φ, Ψ, ρ) ≤ 2ε(2t + rε (t)) n P k=1 6 FbHB ≤ 2nε(2t + rε (t))FbHB Ek εt  E εt  + 2ng(εrε (t)) + 4nh2 (εt) (46) + 2ng(εrε (t)) + 4nh2 (εt) k · k⋄ is the diamond norm described at the end of Section 2. The use of d(Φ, Ψ, ρ) (instead of 21 kΦ − Ψk⋄ ) as a measure of divergence between Φ and Ψ makes the assertions of Proposition 3 substantially stronger (see [30]). 7 17 P 1 for any t ∈ (0, 2ε ], where E = n−1 nk=1 Ek , FbHB (E) is any upper bound for the function FHB (E) (defined in (31)) with properties (33) and (34), in particular FbHB (E) = FHB (E + E0 ), and rε (t) = (1 + t/2)/(1 − εt). If B is the ℓ-mode quantum oscillator then (46) can be rewritten as follows h i ∆n (Φ, Ψ, ρ) ≤ 2nε(2t + rε (t)) Fbℓ,ω (E) − ℓ log(εt) (47) + 2ng(εrε(t)) + 4nh2 (εt), where Fbℓ,ω (E) is defined in (43). Continuity bound (47) with optimal t is tight for large E (for any given n and arbitrary system C). Proof. Following the proof of Theorem 11 in [18] introduce the states σk = Φ⊗k ⊗ Ψ⊗(n−k) ⊗ IdCD (ρ), k = 0, 1, ..., n. Note that H([σk ]Bj ) < +∞ for all k, j in both cases A and B. We have n n |I(B : D|C)σn − I(B : D|C)σ0 | = ≤ n X n X I(B n : D|C)σk − I(B n : D|C)σk−1 k=1 n (48) n I(B : D|C)σk − I(B : D|C)σk−1 . k=1 By using the chain rule (14) we obtain for each k I(B n : D|C)σk − I(B n : D|C)σk−1 = I(B1 ...Bk−1 Bk+1 ...Bn : D|C)σk + I(Bk : D|B1 ...Bk−1 Bk+1 ...Bn C)σk − I(B1 ...Bk−1 Bk+1 ...Bn : D|C)σk−1 (49) − I(Bk : D|B1 ...Bk−1 Bk+1 ...Bn C)σk−1 = I(Bk : D|B1 ...Bk−1 Bk+1 ...Bn C)σk − I(Bk : D|B1 ...Bk−1 Bk+1 ...Bn C)σk−1 , where it was used that TrBk σk = TrBk σk−1 . By upper bound (17) the finiteness of the entropy of the states [σk ]B1 , ..., [σk ]Bn guarantees finiteness of all the terms in (48) and (49). 18 Since kσk − σk−1 k1 = Id⊗(k−1) ⊗ (Φ − Ψ) ⊗ Id⊗(n−k) Φ⊗(k−1) ⊗ Id ⊗ Ψ⊗(n−k) (ρ) ≤ sup {k(Φ − Ψ) ⊗ IdR (ω)k1 | ωA = ρAk } ≤ 2d(Φ, Ψ, ρ) ≤ 2ε  and TrBk σk = TrBk σk−1 , by applying Corollary 1 to the right hand side of (49) in case A we obtain that the value of I(B n : D|C)σk − I(B n : D|C)σk−1 (50) is upper bounded by 2ε log dB +g(ε) for any k. Similarly, by using Proposition 2 in case B we obtain  that for any k the value of (50) is upper bounded by Ek b 2ε(2t+rε (t))FHB εt +2g(εrε (t))+4h2 (εt). Hence (45) and the first inequality in (46) follow from (48) (since Φ⊗n ⊗ IdCD (ρ) = σn and Ψ⊗n ⊗ IdCD (ρ) = σ0 ). The second inequality in (46) follows from the concavity of the function FbHB . The tightness of continuity bound (45) for trivial C and any given n follows from the tightness of continuity bound (87) for the quantum capacity. It can be directly shown by using the erasure channels Φ0 and Φp (see the proof of Proposition 11 in Section 5.2) and any maximally entangled pure state ρ in S(HAD ), where D ∼ = A. Continuity bound (47) is derived from (46) by taking FbHB = Fbℓ,ω and by noting that Fbℓ,ω (E/x) ≤ Fbℓ,ω (E) − ℓ log x for any positive E and x ≤ 1. To show the tightness of continuity bound (47) for trivial C and any given n assume that Φ is the identity channel from the ℓ-mode quantum oscillator A to B = A and Ψ is the completely depolarizing channel with the vacuum output state. If ρAD is any purification of the Gibbs state γA (E) then I(B n : D n )Φ⊗n ⊗IdDn (ρ⊗n ) −I(B n : D n )Ψ⊗n ⊗IdDn (ρ⊗n ) = 2nH(γA (E)) = 2nFHA (E). This shows the tightness of the continuity bound (47) for large E, since Fbℓ,ω (E) − FHA (E) = o(1) as E → +∞ and the main term of (47) can be made not greater than εn[2Fbℓ,ω (E) + o(Fbℓ,ω (E))] for large E by appropriate choice of t (see Remark 5 in Section 3.2).  Proposition 3A is used in Sections 5.2 to obtain tight and close-to-tight continuity bounds for quantum and classical capacities of finite-dimensional channels (significantly refining the Leung-Smith continuity bounds), Proposition 3B is used in [30] to prove uniform continuity of the classical capacity 19 1 of energy-constrained infinite-dimensional quantum channels with respect to the strong (pointwise) convergence topology on the set of all channels with bounded energy amplification factor. 4 On continuity of the Holevo quantity 4.1 Discrete ensembles The Holevo quantity of a discrete ensemble {pi , ρi }m i=1 of m ≤ +∞ quantum states is defined as χ ({pi , ρi }m i=1 ) m m i=1 i=1 X . X pi H(ρi ), pi H(ρi kρ̄) = H(ρ̄) − = ρ̄ = m X pi ρi , i=1 where the second formula is valid if H(ρ̄) < +∞. This quantity gives the upper bound for classical information obtained by recognizing states of the ensemble by quantum measurements [13]. It plays important role in analysis of information properties of quantum systems and channels [14, 23, 32]. Let HA = H and {|ii}m i=1 be an orthonormal basis in a m-dimensional Hilbert space HB . Then χ({pi , ρi }m i=1 ) = I(A : B)ρ̂ , where ρ̂AB = m X pi ρi ⊗ |iihi|. (51) i=1 If H(ρ̄) and S({pi }m i=1 ) are finite (here S is the Shannon entropy) then (51) is directly verified by noting that H(ρ̂A ) = H(ρ̄), H(ρ̂B ) = S({pi }m i=1 ) and Pm m H(ρ̂AB ) = i=1 pi H(ρi ) + S({pi }i=1 ). The validity of (51) in general case can be easily shown by two step approximation using Theorem 1A in [28]. To analyse continuity of the Holevo quantity as a function of ensemble we have to choose a metric on the set of all ensembles. 4.1.1 Three metrics on the set of discrete ensembles If we consider an ensemble as an ordered collection of states with the corresponding probability distribution then it is natural to use the quantity . 1X D0 (µ, ν) = kpi ρi − qi σi k1 2 i 20 as a distance between ensembles µ = {pi , ρi } and ν = {qi , σi }. Since D0 (µ, ν) coincides (up to the factor 1/2) P with the trace norm P of the difference between the corresponding qc-states i pi ρi ⊗ |iihi| and i qi σi ⊗ |iihi|, D0 is a true metric on the set of all ”ordered” ensembles of quantum states. Since convergence of a sequence of states to a state in the weak operator topology implies convergence of this sequence in the trace norm [10], a sequence {{pni , ρni }}n of ensembles converges to an ensemble {p0i , ρ0i } with respect to the metric D0 if and only if lim pni = p0i for all i and n→∞ lim ρni = ρ0i for all i s.t. p0i 6= 0. n→∞ (52) But from the quantum information point of view (in particular, in analysis of the Holevo quantity) it is reasonable to consider P an ensemble of quantum states {pi , ρi } as a discrete probability measure i pi δ(ρi ) on the set S(H) (where δ(ρ) is the Dirac measure concentrating at a state ρ) rather then ordered (or disordered) collection of states. It suffices to say that a singleton ensemble consisting of a state σ and the ensemble {pi , ρi }, where ρi = σ for all i, are identical from the information point of view and correspond to the same measure δ(σ). For any ensemble {pi , ρi } denote by P E({pi , ρi }) the set of all countable ensembles corresponding to the measure i pi δ(ρi ). The set E({pi , ρi }) consists of ensembles obtained from the ensemble {pi , ρi } by composition of the following operations: • permutation of any states; • splitting: (p1 , ρ1 ), (p2 , ρ2 ), ... → (p, ρ1 ), (p1 −p, ρ1 ), (p2 , ρ2 ), ..., p ∈ [0, p1 ]; • joining of equal states: (p1 , ρ1 ), (p2, ρ1 ), (p3 , ρ3 ), ... → (p1 +p2 , ρ1 ), (p3 , ρ3 ), ... If we want to identify ensembles corresponding to the same probability measure then it is natural to use the factorization of D0 , i.e. the quantity . D∗ (µ, ν) = inf µ′ ∈E(µ),ν ′ ∈E(ν) D0 (µ′ , ν ′ ) (53) as a measure of divergence between ensembles µ and ν. Taking into account the above-described structure of a set E({pi , ρi }) it is easy to show that the quantity D∗ (µ, ν) coincides with the EHS-distance Dehs (µ, ν) defined by Oreshkov and Calsamiglia as the infimum of the 21 trace norm distances between Extended-Hilbert-Space representations of the ensembles µ and ν (see details in [24]). It is shown in [24] that Dehs is a true metric on the sets of discrete ensembles (considered as probability measures) having operational interpretations and possessing several natural properties (convexity, monotonicity under action of quantum channels and generalized measurements, etc.). Moreover, the EHS-distance between ensembles µ = {pi , ρi } and ν = {qi , σi } can be expressed without reference to an extended Hilbert space as follows X . 1 Dehs (µ, ν) = inf kPij ρi − Qij σj k1 , 2 {Pij },{Qij } i,j (54) where the infimum is over all joint probability distributions {Pij } with the left P marginal {pi } and {Q Pij } with the right marginal {qj }, i.e. such that j Pij = pi for all i and i Qij = qj for all j [24]. Remark 6. The coincidence of (53) and (54) shows, in particular, that for ensembles µ and ν consisting of m and n states correspondingly the infimum in (53) is attained at some ensembles µ′ and ν ′ consisting of ≤ mn states and that it can be calculated by standard linear programming procedure [24]. Definition (53) of the metric D∗ = Dehs seems more natural and intuitively clear from the mathematical point of view. This metric is adequate for continuity analysis of the Holevo quantity, but difficult to compute in general. It is clear that D∗ (µ, ν) ≤ D0 (µ, ν) (55) for any ensembles µ and ν. But in some cases the metrics D0 and D∗ is close to each other or even coincide. This holds, for example, if we consider small perturbations of states or probabilities of a given ensemble. The third useful metric is the Kantorovich distance X 1 Pij kρi − σj k1 (56) DK (µ, ν) = inf 2 {Pij } between ensembles µ = {pi , ρi } and ν = {qi , σi }, where the infimum is over all joint probability distributions {PP ij } with the marginals {pi } and {qi }, i.e. P such that j Pij = pi for all i and i Pij = qj for all j [8, 24]. By using the coincidence of (53) and (54) it is easy to show that D∗ (µ, ν) ≤ DK (µ, ν) 22 (57) for any discrete ensembles µ and ν [24]. It is essential that the different metrics D∗ and DK generates the same topology on the set of discrete ensembles. Proposition 4. The metrics D∗ = Dehs and DK generates the weak convergence topology on the set of all ensembles (considered as probability measures), i.e. the convergence of a sequence {{pni , ρni }}n to an ensemble {p0i , ρ0i } with respect to any of these metrics means that X X pni f (ρni ) = p0i f (ρ0i ) (58) lim n→∞ i i for any continuous bounded function f on S(H). Proof. The fact that the Kantorovich distance DK generates the weak convergence topology is well known [8]. It is shown in [24] that convergence of a sequence {{pni , ρni }}n to an ensemble {p0i , ρ0i } with respect to the metric D∗ = Dehs implies (58) for any uniformly continuous bounded function f on S(H). By Theorem 6.1 in [25] this means that the D∗ -convergence is not weaker than the weak convergence. But inequality (57) shows that the D∗ -convergence is not stronger than the DK -convergence equivalent to the weak convergence.  The weak convergence topology is widely used in the measure theory and its applications [7, 8, 25]. It has different characterizations. In particular, Theorem 6.1 in [25] shows that the weak convergence of a sequence {{pni , ρni }}n to an ensemble {p0i , ρ0i } means that X X pni = p0i (59) lim n→∞ i:ρn i ∈S i:ρ0i ∈S for any subset S of S(H) such that {ρ0i }∩∂S = ∅, where ∂S is the boundary of S. It is easy to see that this convergence is substantially weaker than convergence (52). One of the main advantages of the Kantorovich distance is the existence of its natural extension to the set of all generalized (continuous) ensembles which generates the weak convergence topology on this set (see Section 4.2). We will explore continuity of the function {pi , ρi } 7→ χ({pi , ρi }) with respect to the metrics D0 and D∗ = Dehs , i.e. with respect to the convergence (52) and to the weak convergence (58). Taking (57) into account and noting that the metrics D∗ and DK generates the same (weak convergence) 23 topology on the set of discrete ensembles, all the below results (in particular, Fannes’ type and Winter’s type continuity bounds) can be reformulated by using the metric DK instead of D∗ . 4.1.2 The case of global continuity The following proposition contains continuity bounds for the Holevo quantity with respect to the metrics D0 and D∗ = Dehs (denoted D∗ in what follows). Proposition 5. Let {pi , ρi } and {qi , σi } be ensembles of states in S(H), x ε0 = D0 ({pi , ρi }, {qi , σi }), ε∗ = D∗ ({pi , ρi }, {qi , σi }) and g(x) = (1+x)h2 1+x . A) If d = dim H is finite then |χ({pi , ρi }) − χ({qi , σi })| ≤ ε∗ log d + 2g(ε∗) ≤ ε0 log d + 2g(ε0). (60) B) If {pi , ρi } and {qi , σi } are ensembles consisting of m and n ≤ m states respectively then |χ({pi , ρi }) − χ({qi , σi })| ≤ min{ε∗ log(mn) + 2g(ε∗), ε0 log m + 2g(ε0)} (61)  The term log m in (61) can be replaced by max S({γi− }), S({γi+}) , where γi± = (2ε0)−1 (kpi ρi − qi σi k1 ± (pi − qi )), i = 1, m, S is the Shannon entropy and it is assumed that qi = 0 for i > n (if n < m). P P If i pi ρi = i qi σi then the terms 2g(ε∗ ) and 2g(ε0 ) in (60) and in (61) can be replaced, respectively, by g(ε∗ ) and g(ε0). If {pi } = {qi } then the term 2g(ε0) in (60) and in (61) can be replaced by g(ε0 ). Both continuity bounds in (60) and both continuity bounds in (61) are tight. Proof. Take any joint probability distributions {Pij } with the left marginal {pi } and {Qij } with the right marginal {qj } and consider the qc-states X X ρ̂ABC = Pij ρi ⊗ |iihi| ⊗ |jihj|, σ̂ABC = Qij σj ⊗ |iihi| ⊗ |jihj|, (62) i,j i,j n where {|ii}m i=1 and {|ji}j=1 are orthonormal base of Hilbert spaces HB and HC correspondingly. Representation (51) and the invariance of the Holevo quantity under splitting of states of an ensemble imply χ({pi , ρi }) = I(A : BC)ρ̂ and χ({qj , σj }) = I(A : BC)σ̂ . 24 (63) So, the first inequality in A and the inequality |χ({pi , ρi }) − χ({qi , σi })| ≤ ε∗ log(mn) + 2g(ε∗) in B follow from Corollary 2 with trivial C (since the coincidence of (53) and (54) shows that 2ε∗ = inf kρ̂ − σ̂k1 , where the infimum is over all states of the form (62)). The second inequality in A follows from (55). The inequality |χ({pi , ρi }) − χ({qi , σi })| ≤ ε0 log m + 2g(ε0 ) in B and its specification follow from representation (51) and Corollary 2 with trivial C. P P The assertions concerning the cases i pi ρi = i qi σi and {pi } = {qi } follow from the last assertion of Corollary 2. . Let {|ii}di=1 be an orthonormal basis in H = Cd and ρc = IH /d the chaotic state in S(H). For given ε ∈ (0, 1) consider the ensembles µ = {pi , ρi }di=1 and ν = {qi , σi }di=1 , where ρi = |iihi|, σi = (1 − ε)|iihi| + ερc , pi = qi = 1/d for all i. Then it is easy to see that D∗ (µ, ν) ≤ D0 (µ, ν) = ε(1 − 1/d), while concavity of the entropy implies χ(µ) − χ(ν) = log d − log d + H(σi ) ≥ ε log d. Since dim H = m = n = d, this shows tightness of both continuity bounds in (60) and of the second continuity bound in (61). This example with d = 3 also shows that the second terms in (60) can not be less than ε log 3/3 ≈ 0.37ε. Modifying the above example consider the ensemble µ = {pi , ρi }di=1 , where ρi = ε|iihi| + (1 − ε)ρc and pi = 1/d for all i, and the singleton ensemble ν = {ρc }. Then it is easy to see that D∗ (µ, ν) ≤ ε, while inequality (2) implies χ(µ) − χ(ν) = χ(µ) ≥ ε log d − h2 (ε). Since dim H = mn = d, this shows the tightness of the first continuity bounds in (60) and in (61). Since D0 (µ, ν) ≥ (d − 1)/d for any ε, this example also shows the difference between the continuity bounds depending on ε∗ = D∗ (µ, ν) and on ε0 = D0 (µ, ν).  Proposition 5 and inequality (57) imply Corollary 4. The function {pi , ρi } 7→ χ({pi , ρi }) is uniformly continuous on the sets of all ensembles consisting of m ≤ +∞ states in S(H) with respect to any of the metrics D0 , D∗ and DK if either dim H or m is finite. It is easy to see that the function {pi , ρi } 7→ χ({pi , ρi }) is not continuous on the set of countable ensembles of states in S(H) with respect to any of the metrics D0 , D∗ and DK if dim H = +∞. 25 Proposition 5 contains estimates of two types: the continuity bounds with the main term ε log d depending only on the dimension d of the underlying Hilbert space H and the continuity bounds with the main term ε log m depending only on the size m of ensembles. Continuity bounds of the last type are sometimes called dimension-independent. Recently Audenaert obtained the following dimension-independent continuity bound for the Holevo quantity in the case pi ≡ qi [5, Th.15]: |χ({pi , ρi }) − χ({pi , σi })| ≤ t log(1 + (m − 1)/t) + log(1 + (m − 1)t), where t = 21 maxi kρi − σi k1 is the maximal distance between corresponding states of ensembles. Proposition 5B in this case gives |χ({pi , ρi }) − χ({pi , σi })| ≤ ε log m + g(ε), (64) P where ε = 12 i pi kρi − σi k1 is the average distance between corresponding states of ensembles. Since ε ≤ t and g(x) is an increasing function, we may replace ε by t in (64). The following continuity bound for the Holevo quantity not depending on the size m of ensembles is obtained by Oreshkov and Calsamiglia in [24]: |χ({pi , ρi }) − χ({qi , σi })| ≤ 2εK log(d − 1) + 2h2 (εK ), εK ≤ (d − 1)/d, where d = dim H and εK = DK ({pi , ρi }, {qi , σi }) is the Kantorovich distance (defined in (56)). It follows from (57) that Proposition 5A gives more sharp continuity bound for the Holevo quantity for d > 2. 4.1.3 General case If dim H = +∞ then the function {pi , ρi } 7→ χ({pi , ρi }) is not continuous on the set of all discrete ensembles of states in S(H) with respect to any of the metrics D0 , D∗ and DK . Conditions for local continuity of this function are presented in the following proposition. Proposition 6. A) If {{pni , ρni }}n is a sequence of countable ensembles D∗ -converging to an ensemble {p0i , ρ0i } (i.e. weakly converging P n nin the sense (58)) such that lim H(ρ̄n ) = H(ρ̄0 ) < +∞, where ρ̄n = i pi ρi , then n→∞ lim χ({pni , ρni }) = χ({p0i , ρ0i }) < +∞. n→∞ 26 (65) B) If {{pni , ρni }}n is a sequence D0 -converging to an ensemble {p0i , ρ0i } (i.e. converging in the sense (52)) and  lim S ({pni }) = S {p0i } < +∞, (66) n→∞ where S is the Shannon entropy, then (65) holds. Remark 7. Condition (66) does not imply (65) for a sequence {{pni , ρni }}n D∗ -converging to an ensemble {p0i , ρ0i }. The simplest example showing this can be constructed as follows. Let {{pni }i }n be a sequence of countable probability distributions converging (in the ℓ1 -metric) to the degenerate probability distribution (1, 0, 0, ...) such that there exists limn→∞ S({pni }i ) = C > 0. Let {ρi } be a countable collection of mutually orthogonal pure states in a separable Hilbert space H and {p0i } a probability distribution such that S({p0i }i ) = C. Then the sequence of ensembles {{pni , ρi }i }n converges to the ensemble {p0i , σi }i , where σi = ρ1 for all i, with respect to the metric D∗ and condition (66) holds. But χ({pni , ρi }) = S({pni }i ) does not converge to χ({p0i , σi }) = 0. Proof of Proposition 6. Assertion A is a partial case of Proposition 8 in Section 4.2. Since the convergence (52) implies the trace convergence of the P norm n 0 n n n sequence {ρ̂AB } to the state ρ̂AB , where ρ̂AB = i pi ρi ⊗ |iihi|, assertion B is derived from Theorem 1A in [28] by using representation (51).  Proposition 6B implies the following observation which can be interpreted as stability of the Holevo quantity with respect to perturbation of states of a given ensemble. Corollary 5. Let {pi } be a probability distribution with finite Shannon entropy S({pi }). Then lim χ({pi , ρni }) = χ({pi , ρ0i }) ≤ S({pi }) n→∞ (67) for any sequences {ρn1 }, {ρn2 }, . . . converging respectively to states ρ01 , ρ02 , . . . By Corollary 5 the finiteness of S({pi }) guarantees the validity of (67) even in the case when the entropy is not continuous for all the sequences {ρn1 }, {ρn2 }, . . ., i.e. when H(ρnk ) 9 H(ρ0k ) for all k = 1, 2, ... Proposition 6A shows that for any E > 0 the Holevo quantity is continuous on the set of ensembles {pi , ρi } with the average energy TrHA ρ̄ = 27 P pi TrHA ρi not exceeding E provided the Hamiltonian HA satisfies condition (30). The following proposition gives Winter’s type continuity bound for the Holevo quantity with respect to the metric D∗ under the average energy constraint. Proposition 7. Let HA be the Hamiltonian of system A satisfying conditions (30) and FbHA (E) any upper bound for the function FHA (E) (defined in (31)) with properties (33) and (34), in particular, FbHA (E) = FHA (E + E0 ). Let {pi , ρi } and {qi , σi } be ensembles of states in S(HA ) with the average states ρ̄ and σ̄ such that TrHA ρ̄, TrHA σ̄ ≤ E and D∗ ({pi , ρi }, {qi , σi }) ≤ ε. Then   E b |χ({pi , ρi }) − χ({qi , σi })| ≤ ε(2t+ rε (t))FHA + 2g(εrε (t)) + 2h2 (εt) (68) εt i 1 ], where rε (t) = (1 + t/2)/(1 −εt) ≤ r1 (t) = (1 + t/2)/(1 −t). for any t ∈ (0, 2ε If A is the ℓ-mode quantum oscillator then h i |χ({pi , ρi }) − χ({qi , σi })| ≤ ε(2t + rε (t)) Fbℓ,ω (E) − ℓ log(εt) (69) + 2g(εrε(t)) + 2h2 (εt) 1 for any t ∈ (0, 2ε ], where Fbℓ,ω (E) is defined in (43). Continuity bound (69) with optimal t is tight for large E. Remark 8. Condition (34) implies lim xFbH (E/x) = 0. Hence, Propox→+0 A sition 7 shows that the Holevo quantity is uniformly continuous with respect to the metric D∗ on the set of all ensembles {pi , ρi } with bounded average energy. Remark 9. It follows from (55) and (57) that the metric D∗ in Proposition 7 can be replaced by the easy-computable metric D0 and by the Kantorovich metric DK . Proof. By using representation (63) it is easy to see that continuity bound (68) can be proved by showing that   E b |I(A : B)ρ − I(A : B)σ | ≤ ε(2t + rε (t))FHA + 2g(εrε(t)) + 2h2 (εt) εt for any qc-states ρ and σ such that TrHA ρA , TrHA σA ≤ E, kρ − σk1 ≤ 2ε 1 ]. This inequality is proved by repeating the arguments from and t ∈ (0, 2ε 28 the proof of Proposition 2 with trivial C by using the below Lemma 2 instead of Lemma 9 in [29] and Corollary 2 with trivial C instead of Corollary 1. If A is the ℓ-mode quantum oscillator then (69) follows from (68) with b FHA = Fbℓ,ω , since Fbℓ,ω (E/x) ≤ Fbℓ,ω (E) − ℓ log x for any positive E and x ≤ 1. Let {pi , ρi } be any pure state ensemble with the average state γA (E) and qi = pi , σi = (1 − ε)ρi + εγA (E) for all i. Then X X 2D∗ ({pi , ρi }, {qi , σi }) ≤ kpi ρi − qi σi k1 = εpi kρi − γA (E)k1 ≤ 2ε i i while concavity of the entropy implies |χ({pi , ρi }) − χ({qi , σi })| ≥ εH(γA (E)) = εFHA (E). (70) Since Fbℓ,ω (E) − FHA (E) = o(1) as E → +∞, the tightness of the continuity bound (69) follows from Remark 10 below.  Remark 10. Lemma 1 in Section 3.2 implies that for large energy E the main term of the continuity bound (69) can be made not greater than ε(Fbℓ,ω (E) + o(Fbℓ,ω (E))) by appropriate choice of t. Lemma 2. Let PA be a projector in B(HA ) and ρAB a qc-state (1) with finite H(ρA ). Then − (1 − τ )H(ρ̃A ) ≤ I(A : B)ρ − I(A : B)ρ̃ ≤ H(ρA ) − τ H(ρ̃A ), (71) where τ = TrPA ρA and ρ̃AB = τ −1 PA ⊗ IB ρAB PA ⊗ IB .8 Proof. Both inequalities in (71) are easily derived from the inequalities 0 ≤ I(A : B)ρ − τ I(A : B)ρ̃ ≤ H(ρA ) − τ H(ρ̃A ) (72) by using nonnegativity of I(A : B) and upper bound (10). Note that representation (51) remains valid for an ensemble {pi , ρi } of any positive trace class operators if we assume that H and I(A : B) are homogenuous extensions of the von Neumann entropy and of the quantum mutual information toP the cones of all positive trace class operators and that χ ({pi , ρi }) = H(ρ̄) − i pi H(ρi ) in the case H(ρ̄) < +∞. This shows that the double inequality (72) can be rewritten as follows 0 ≤ χ({pi , ρi }) − χ({pi , PA ρi PA }) ≤ H(ρ̄) − H(PA ρ̄PA ). 8 For arbitrary state ρAB double inequality (71) holds with additional factors 2 in the left and in the right sides (see Lemma 9 in [29]). 29 The first of these inequalities is easily derived from monotonicity of the quantum relative entropy and concavity of the function η(x) = −x log x. The second one follows from the definition of the Holevo quantity, since H(ρi ) ≥ H(PA ρi PA ) for all i [22].  4.2 Generalized (continuous) ensembles In analysis of infinite-dimensional quantum systems and channels the notion of generalized (continuous) ensemble defined as a Borel probability measure on the set of quantum states naturally appears [14, 15]. We denote by P(H) the set of all Borel probability measures on S(H) equipped with the topology of weak convergence [8, 25].9 The set P(H) is a complete separable metric space containing the dense subset P0 (H) of discrete measures (corresponding to discrete ensembles) [25]. The average state of a generalized ensemble µ ∈ P(H) is the barycenter of the measure µ defined by the Bochner integral Z ρ̄(µ) = ρµ(dρ). The average energy of µ is determined by the formula Z . E(µ) = TrH ρ̄(µ) = TrHρ µ(dρ) where H is the Hamiltonian of the system. The Holevo quantity of a generalized ensemble µ ∈ P(H) is defined as Z Z χ(µ) = H(ρk ρ̄(µ))µ(dρ) = H(ρ̄(µ)) − H(ρ)µ(dρ), where the second formula is valid under the condition H(ρ̄(µ)) < +∞ [15]. The Kantorovich distance (56) between discrete ensembles is extended to generalized ensembles µ and ν as follows Z 1 DK (µ, ν) = inf kρ − σk1 Λ(dρ, dσ), (73) 2 Λ∈Π(µ,ν) S(H)×S(H) 9 The R weak convergence of a sequence {µn } to a measure µ0 means that R limn→∞ f (ρ)µn (dρ) = f (ρ)µ0 (dρ) for any continuous bounded function f on S(H). 30 where Π(µ, ν) is the set of all probability measures on S(H) × S(H) with the marginals µ and ν. Since 12 kρ − σk1 ≤ 1 for all ρ and σ, the Kantorovich distance (73) generates the weak convergence topology on P(H) [8]. Note first that the continuity condition for the Holevo quantity of discrete ensembles in Proposition 6A holds for generalized ensembles. Proposition 8. If {µn }n is a sequence of generalized ensembles weakly converging to an ensemble µ0 such that lim H(ρ̄(µn )) = H(ρ̄(µ0 )) < +∞ n→∞ then lim χ(µn ) = χ(µ0 ) < +∞. (74) n→∞ Proof. We may assume that H(ρ̄(µn )) < +∞ for all n. So, we have Z χ(µn ) = H(ρ̄(µn )) − H(ρ)µn (dρ). Hence, R to prove (74) it suffices to note that the functions µ 7→ χ(µ) and µ 7→ H(ρ)µ(dρ) are lower semicontinuous on P(H) (see Proposition 1 and the proof of the Theorem in [15]).  The following proposition presents Fannes’ type and Winter’s type continuity bounds for the Holevo quantity of generalized ensembles with respect to the Kantorovich distance DK defined in (73). Proposition 9. Let µ and ν be ensembles in P(HA ) and ε = DK (µ, ν). . A) If d = dim HA is finite then |χ(µ) − χ(ν)| ≤ ε log d + 2g(ε). (75) The factor 2 in (75) can be removed provided that ρ̄(µ) = ρ̄(ν). B) Let HA be the Hamiltonian of system A satisfying conditions (30) and FbHA (E) any upper bound for the function FHA (E) (defined in (31)) with properties (33) and (34), in particular, FbHA (E) = FHA (E + E0 ). If TrHA ρ̄(µ), TrHA ρ̄(ν) ≤ E then   E |χ(µ) − χ(ν)| ≤ ε(2t + rε (t))FbHA + 2g(εrε (t)) + 2h2 (εt) (76) εt 1 for any t ∈ (0, 2ε ], where rε (t) = (1 + t/2)/(1 − εt). If A is the ℓ-mode quantum oscillator then the right hand side of (76) can be rewritten as the right hand side of (69). 31 Remark 11. Since condition (34) implies lim xFbHA (E/x) = 0, Propox→+0 sition 9B shows uniform continuity of the Holevo quantity on any subset of P(HA ) consisting of ensembles with bounded average energy. Proof. For arbitrary generalized ensembles µ and ν there exist sequences {µn } and {νn } of discrete ensembles weakly converging respectively to µ and ν such that lim χ(µn ) = χ(µ), lim χ(νn ) = χ(ν) n→∞ n→∞ and ρ̄(µn ) = ρ̄(µ), ρ̄(νn ) = ρ̄(ν) for all n. Such sequences can be obtained by using the construction from the proof of Lemma 1 in [15] and taking into account the lower semicontinuity of the function µ 7→ χ(µ) [15, Pr.1]. Hence assertions A and B are derived, respectively, from Propositions 5A and 7 by noting that the metric D∗ in all the continuity bounds can be replaced by DK (this follows from (57)).  5 5.1 Applications Tight continuity bounds for the Holevo capacity and for the entanglement-assisted classical capacity of a quantum channel The Holevo capacity of a quantum channel Φ : A → B is defined as follows Cχ (Φ) = sup χ({pi , Φ(ρi )}), (77) {pi ,ρi } where the supremum is over all ensembles of input states. This quantity determines the ultimate rate of transmission of classical information trough the channel Φ with non-entangled input encoding, it is closely related to the classical capacity of a quantum channel (see Section 5.2 below) [14, 23, 32]. The classical entanglement-assisted capacity of a quantum channel determines the ultimate rate of transmission of classical information when an entangled state between the input and the output of a channel is used as an additional resource (see details in [14, 23, 32]). By the Bennett-ShorSmolin-Thaplyal theorem the classical entanglement-assisted capacity of a finite-dimensional quantum channel Φ : A → B is given by the expression Cea (Φ) = sup I(Φ, ρ), ρ∈S(HA ) 32 (78) in which I(Φ, ρ) is the quantum mutual information of the channel Φ at a state ρ defined as follows I(Φ, ρ) = I(B : R)Φ⊗IdR (ρ̂) , (79) where HR ∼ = HA and ρ̂ is a pure state in S(HAR ) such that ρ̂A = ρ [6, 14, 32]. In analysis of variations of the capacities Cχ (Φ) and Cea (Φ) as functions of a channel we will use the operator norm k · k and the diamond norm k · k⋄ described at the end of Section 2. Proposition 5A and Corollary 1 imply the following Proposition 10. Let Φ and Ψ be quantum channels from A to B and ε g(ε) = (1 + ε)h2 1+ε . Then |Cχ (Φ) − Cχ (Ψ)| ≤ ε log dB + g(ε), (80) where ε = 12 kΦ − Ψk and dB = dim HB , and |Cea (Φ) − Cea (Ψ)| ≤ 2ε log d + g(ε), (81) where ε = 21 kΦ − Ψk⋄ and d = min{dim HA , dim HB }. Both continuity bounds (80) and (81) are tight. Proof. For given ensemble {pi , ρi } Proposition 5A shows that |χ({pi , Φ(ρi )}) − χ({pi , Ψ(ρi )})| ≤ ε0 log dB + g(ε0 ), P where ε0 = 21 i pi kΦ(ρi ) − Ψ(ρi )k1 ≤ 21 kΦ − Ψk. This and (77) imply (80). Continuity bound (81) is derived similarly from Corollary 1 and expression (78), since for any pure state ρ̂AR in (79) we have kΦ ⊗ IdR (ρ̂) − Ψ ⊗ IdR (ρ̂)k1 ≤ kΦ − Ψk⋄ . To show the tightness of both continuity bounds assume that HA = HB = Cd , Φ is the identity channel (i.e. Φ = IdCd ) and Ψp (ρ) = (1 − p)ρ + pd−1 ICd is a depolarizing channel (p ∈ [0, 1]). Since Cea (Φ) = 2Cχ (Φ) = 2 log d , Cχ (Ψp ) = log d + (1 − pc) log(1 − pc) + pc log(p/d) and Cea (Ψp ) = 2 log d + (1 − pc̃) log(1 − pc̃) + pc̃ log(p/d2 ), 33 where c = 1 − 1/d and c̃ = 1 − 1/d2 [14, 16, 32], we have Cχ (Φ) − Cχ (Ψp ) = pc log d + h2 (pc) + pc log c and Cea (Φ) − Cea (Ψp ) = 2pc̃ log d + h2 (pc̃) + pc̃ log c̃. These relations show tightness of continuity bound (80) and (81), since it is easy to see that kΦ − Ψp k ≤ kΦ − Ψp k⋄ ≤ 2p.  5.2 Refinement of the Leung-Smith continuity bounds for classical and quantum capacities of a channel By the Holevo-Schumacher-Westmoreland theorem the classical capacity of a finite-dimensional channel Φ : A → B is given by the expression C(Φ) = lim n−1 Cχ (Φ⊗n ), n→+∞ (82) where Cχ is the Holevo capacity defined in the previous subsection [14, 32]. By the Lloyd-Devetak-Shor theorem the quantum capacity of a finitedimensional channel Φ : A → B is given by the expression Q(Φ) = lim n−1 Q̄(Φ⊗n ), n→+∞ (83) . where Q̄(Φ) is the maximum of the coherent information Ic (Φ, ρ) = H(Φ(ρ))− b b is a complementary channel to Φ). H(Φ(ρ)) over all states ρ ∈ S(HA ) (Φ Leung and Smith obtained in [18] the following continuity bounds for classical and quantum capacities of a channel with finite-dimensional output |C(Φ) − C(Ψ)| ≤ 16ε log dB + 4h2 (2ε) , (84) |Q(Φ) − Q(Ψ)| ≤ 16ε log dB + 4h2 (2ε) , (85) where ε = 21 kΦ−Ψk⋄ and dB = dim HB .10 By using Winter’s tight continuity bound (7) for the conditional entropy (instead of the original Alicki-Fannes continuity bound) in the Leung-Smith proof one can replace the main terms in (84) and (85) by 4ε log dB . By using Proposition 3A one can replace the main terms in (84) and (85) by 2ε log dB (which gives tight continuity bound 10 It is assumed that expressions (82) and (83) remain valid in the case dim HA = +∞. 34 for the quantum capacity and close-to-tight continuity bound for the classical capacity). Proposition 11. Let Φ and Ψ be channels from A to B. Then |C(Φ) − C(Ψ)| ≤ 2ε log dB + g(ε), (86) |Q(Φ) − Q(Ψ)| ≤ 2ε log dB + g(ε), where ε = 21 kΦ − Ψk⋄ , dB = dim HB and g(ε) = (1 + ε)h2 ε 1+ε  (87) . Continuity bound (87) is tight, continuity bound (86) is close-to-tight (up to the factor 2 in the main term). Proof. Since Cχ (Φ⊗n ) = sup χ({pi , Φ⊗n (ρi )}), ⊗n where the supremum is over all ensembles {pi , ρi } of states in S(HA ), continuity bound (86) is obtained by using Lemma 12 in [18], representation (51) and Proposition 3A in Section 3.3. To prove continuity bound (87) note that the coherent information can be represented as follows Ic (Φ, ρ) = I(B : R)Φ⊗IdR (ρ̂) − H(ρ), where ρ̂ ∈ S(HAR ) is a purification of a state ρ. Hence for arbitrary quantum ⊗n channels Φ and Ψ, arbitrary n and any state ρ in S(HA ) we have Ic (Φ⊗n , ρ) − Ic (Ψ⊗n , ρ) = I(B n : Rn )Φ⊗n ⊗IdRn (ρ̂) − I(B n : Rn )Ψ⊗n ⊗IdRn (ρ̂) ⊗n where ρ̂ ∈ S(HAR ) is a purification of the state ρ. This representation, Proposition 3A in Section 3.3 and Lemma 12 in [18] imply (87). The tightness of continuity bound (87) for the quantum capacity can be shown by using the erasure channels   (1 − p)ρ 0 , p ∈ [0, 1]. Φp (ρ) = 0 pTrρ from d-dimensional system A to (d + 1)-dimensional system B. It is known that Q(Φp ) = (1 − 2p) log d for p ≤ 1/2 and Q(Φp ) = 0 for p ≥ 1/2 [14, 32]. Hence Q(Φ0 )−Q(Φp ) = 2p log d for p ≤ 1/2. By noting that kΦ0 −Φp k⋄ ≤ 2p we see that continuity bound (87) is tight (for large d). The proof of tightness of continuity bound (80) for the Holevo capacity shows that the main term in (86) is close to the optimal one up to the factor 2, since C(Ψp ) coincides with Cχ (Ψp ) for the depolarizing channel Ψp [16].  35 5.3 Other applications The results of this paper concerning infinite-dimensional quantum systems and channels can be applied for quantitative continuity analysis of capacities of energy-constrained infinite-dimensional quantum channels with respect to the strong (pointwise) convergence topology (which is substantially weaker than the diamond-norm topology). In particular, Propositions 3B and 7 are used in [30] to obtain uniform continuity bounds for the entanglementassisted and unassisted classical capacities of energy-constrained infinitedimensional quantum channels with respect to the energy-constrained diamond seminorms generating the strong convergence topology on the set of quantum channels. I am grateful to A.Winter for valuable communication and for several technical tricks essentially used in this work. I am also grateful to A.S.Holevo and G.G.Amosov for useful discussion. The research is funded by the grant of Russian Science Foundation (project No 14-21-00162). References [1] R.Alicki, M.Fannes, ”Continuity of quantum conditional information”, Journal of Physics A: Mathematical and General, V.37, N.5, L55-L57 (2004); arXiv: quant-ph/0312081. [2] K.M.R.Audenaert, ”A sharp continuity estimate for the von Neumann entropy”, J. Math. Phys. A: Math. Theor. 40(28), 8127-8136 (2007). [3] K.M.R. Audenaert, J. Eisert, ”Continuity bounds on the quantum relative entropy”, J. Math. Phys. 46, 102104 (2005); quant-ph/0503218. [4] K.M.R. Audenaert, J. Eisert, ”Continuity bounds on the quantum relative entropy-II”, J. Math. Phys. 52, 112201 (2011); arXiv:1105.2656. [5] K.M.R. Audenaert ”Quantum Skew Divergence”, J. Math. Phys. 55, 112202 (2014); arXiv:1304.5935. [6] C.H.Bennett, P.W.Shor, J.A.Smolin, A.V.Thapliyal ”Entanglementassisted classical capacity of noisy quantum channel”, Phys. Rev. Lett. V.83. 3081-3084 (1999). 36 [7] P.Billingsley, ”Convergence of probability measures”, John Willey and Sons. Inc., New York-London-Sydney-Toronto, 1968. [8] V.I.Bogachev, ”Measure theory”, Springer-Verlag Berlin Heidelberg, 2007. [9] F.Buscemi, S.Das, M.M.Wilde, ”Approximate reversibility in the context of entropy gain, information gain, and complite positivity”, Physical Review A, 93:6, 062314, (2016). [10] G.F.Dell’Antonio ”On the limits of sequences of normal states”, Commun. Pure Appl. Math. V.20, 413-430, (1967). [11] I.Devetak, J.Yard, ”The operational meaning of quantum conditional information”, Phys. Rev. Lett. 100, 230501 (2008); arXiv:quant-ph/0612050. [12] M. Fannes, ”A continuity property of the entropy density for spin lattice systems”, Commun. Math. Phys. V.31, 291-294 (1973). [13] A.S.Holevo, ”Bounds for the quantity of information transmitted by a quantum communication channel”, Probl. Inf. Transm. (USSR) V.9, 177-183 (1973). [14] A.S.Holevo ”Quantum systems, channels, information. A mathematical introduction”, Berlin, DeGruyter, 2012. [15] A.S.Holevo, M.E.Shirokov ”Continuous ensembles and the χ-capacity of infinite dimensional channels”, Theory of Probability and its Applications, V.50, N.1, P.8698 (2005); arXiv:quant-ph/0408176. [16] C.King, ”The capacity of the quantum depolarizing channel”, IEEE Trans. Inf. Theory, V.49, N.1, 221-229 (2003). [17] A.A.Kuznetsova, ”Quantum conditional entropy for infinite-dimensional systems”, Theory of Probability and its Applications, V.55, N.4, 709-717 (2011). [18] D.Leung, G.Smith, ”Continuity of quantum channel capacities”, Commun. Math. Phys., V.292, 201-215 (2009). 37 [19] N.Li, S.Luo, ”Classical and quantum correlative capacities of quantum systems”, Phys. Rev. A 84, 042124 (2011). [20] E.H.Lieb, M.B.Ruskai, ”Proof of the strong suadditivity of quantum mechanical entropy”, J.Math.Phys. V.14. 1938 (1973). [21] G.Lindblad ”Entropy, information and quantum measurements”, Comm. Math. Phys. V.33. 305-322 (1973). [22] G.Lindblad ”Expectation and Entropy Inequalities for Finite Quantum Systems”, Comm. Math. Phys. V.39. N.2. 111-119 (1974). [23] M.A.Nielsen, I.L.Chuang ”Quantum Computation and Quantum Information”, Cambridge University Press, 2000. [24] O.Oreshkov, J.Calsamiglia, ”Distinguishability measures between ensembles of quantum states”, Phys. Rev. A 79, 032336 (2009); arXiv:0812.3238. [25] K.Parthasarathy ”Probability measures on metric spaces”, Academic Press, New York and London, 1967; [26] D.Reeb, M.M.Wolf, ”Tight bound on relative entropy by entropy difference”, IEEE Trans. Inf. Theory 61, 1458-1473 (2015); arXiv:1304.0036. [27] M.E.Shirokov, ”Entropic characteristics of subsets of states I”, Izvestiya: Mathematics, V.70, N.6, 1265-1292 (2006); arXiv:quant-ph/0510073. [28] M.E.Shirokov, ”Measures of correlations in infinite-dimensional quantum systems”, Sbornik: Mathematics, V.207, N.5, 724-768 (2016); arXiv:1506.06377. [29] M.E.Shirokov, ”Squashed entanglement in infinite dimensions”, J. Math. Phys. V.57, N.3, 032203, 22 pp. (2016); arXiv:1507.08964. [30] M.E.Shirokov, ”Energy-constrained diamond seminorms and their use in quantum information theory”, arXiv:1706.xxxxx. [31] A.Wehrl, ”General properties of entropy”, Rev. Mod. Phys. 50, 221-250, (1978). 38 [32] M.M.Wilde, ”From Classical arXiv:1106.1445 (v.6). to Quantum Shannon Theory”, [33] A.Winter, ”Tight uniform continuity bounds for quantum entropies: conditional entropy, relative entropy distance and energy constraints”, Comm. Math. Phys., V.347, N.1, 291-313 (2016); arXiv:1507.07775. 39
7cs.IT
1 Differential Message Importance Measure: A New Approach to the Required Sampling Number in Big Data Structure Characterization arXiv:1801.07083v1 [cs.IT] 22 Jan 2018 Shanyun Liu, Rui She, Pingyi Fan, Senior Member, IEEE Abstract—Data collection is a fundamental problem in the scenario of big data, where the size of sampling sets plays a very important role, especially in the characterization of data structure. This paper considers the information collection process by taking message importance into account, and gives a distribution-free criterion to determine how many samples are required in big data structure characterization. Similar to differential entropy, we define differential message importance measure (DMIM) as a measure of message importance for continuous random variable. The DMIM for many common densities is discussed, and high-precision approximate values for normal distribution are given. Moreover, it is proved that the change of DMIM can describe the gap between the distribution of a set of sample values and a theoretical distribution. In fact, the deviation of DMIM is equivalent to Kolmogorov-Smirnov statistic, but it offers a new way to characterize the distribution goodness-of-fit. Numerical results show some basic properties of DMIM and the accuracy of the proposed approximate values. Furthermore, it is also obtained that the empirical distribution approaches the real distribution with decreasing of the DMIM deviation, which contributes to the selection of suitable sampling points in actual system. Index Terms—Differential Message importance measure, Big Data, Kolmogorov-Smirnov test, Goodness of fit, distributionfree. I. I NTRODUCTION The actual system of big data needs to process lots of data within a limited time generally, so many researches are on sample data to improve their efficiency [1], [2]. In fact, sampling technology is intensely effective for solving the challenges in big data, such as intrusion detection [3] and privacy-preserving approximate search [4]. One basic problem that can occur with sampling is that how many samples is required to have a good characterization of the big data structure, e.g. fitting the real distribution. Too many samples means wasting of resources, while too little samples is along with great bias. Distribution goodness-of-fit is generally used to describe this problem, which focuses on the error magnitude between the distribution of a set of sample values and the real distribution, and it plays a fundamental role in signal Shanyun Liu, Rui She and Pingyi Fan are with Tsinghua National Laboratory for Information Science and Technology(TNList) and the Department of Electronic Engineering, Tsinghua University, Beijing, P.R. China, 100084. e-mail: {liushany16, [email protected], [email protected].} This work was supported in part by the National Natural Science Foundation of China (NSFC) under Grant 61771283 and 61621091, and in part by the China Major State Basic Research Development Program (973 Program) under Grant 2012CB316100(2). processing and information theory. This paper desires to solve this problem based on information theory. Shannon entropy [5] is possibly the most important quantity in information theory, which describes the fundamental laws of data compression and communication [6]. Due to its success, numerous entropies have been provided in order to extend information theory. Among them, the most successful expansion is Rényi entropy [7]. There are many applications based on Rényi entropy, such as hypothesis testing [8], [9]. Actually, entropy is a quantity with respect to probability distribution, which satisfies the intuitive notion of what a measure of information should be [10]. Generally, the events are naturally endowed with importance label and the process of fitting is equivalent to the process of information collection. Therefore, in this paper, we propose differential message importance measure (DMIM) as a measure of information for continuous random variable to characterize the process of information collection. DMIM is expanded from discrete message importance measure (MIM) [11] which is such an information quantity coming from the intuitive notion of information importance for small probability event. Much of research in the last two decades has examined the application of small probability event in big data [12]–[14]. Recent studies also show that MIM has many applications in big data, such as information divergence measures [15] and compressed data storage [16]. Much of the research in the goodness of fit in the past several decades focused on the Kolmogorov-Smirnov test [17], [18]. Based on it, [19] gave an error estimation of empirical distribution. [21] presented a general method for distributionfree goodness-of-fit tests based on Kullback-Leibler discrimination information. The problem of testing goodness-of-fit in a discrete setting was discussed in [20]. All these result can describe the goodness of fit very well and guide us to choose the sampling numbers. However, they all consider this problem based on the divergence of two distributions, so the previous results can not describe the message carried by each sample and the information change with the increase of the sampling size, which means that they can not visually display the process of information collection. In fact, DMIM is the proper measure to help us consider the problem of goodnessof-fit in the view of the information collection of continuous random variables. Moreover, Compared with KolmogorovSmirnov statistic, DMIM also shows the relationship between the variance of a random variable and the error estimation of empirical distribution. 2 The rest of this paper is organized as follows. Section II introduces the definition and the relationship between MIM and DMIM. In Section III, the properties of DMIM are introduced. Then, the DMIM of some basic continuous distributions are discussed in Section IV, in which we give the asymptotic analysis of normal distribution. In Section V, the goodness of fit with DMIM is presented in order to analyze the process of information collection. The validity of proposed theoretical results is verified by the simulation results in Section VI. Finally, we finish the paper with conclusions in Section VII. The MIM of X ∆ is given by [11] L(X ∆ ) = log = log S where S is the support set of the random variable. For most continuous random variables, the DMIM has no simple expression and the integral form is inconvenient for numerical calculation, so we will give another form of it. Theorem 1. The DMIM of a continuous random variable X with density f (x) can be written as Z ∞ X (−1)n +∞ n+1 (f (x)) dx. (2) l(X) = 1 + n! −∞ n=1 Proof. In fact, we obtain Z +∞ f (x)e−f (x) dx l(X) = −∞ = = Z ∞ +∞ X = loge̟ −∞ n=0 Z +∞ n (f (x)) f (x)dx + −∞ dx n X ∆f (xi )e−̟∆f (xi ) , (5c) P since ni=1 f (xi )∆ = 1. Substituting ̟ = 1/∆ in (5c), we obtain n X 1 f (xi )e−f (xi ) ∆. (6) + log L= ∆ i=1 It is observed that the first term in (6) approaches infinity when ∆ → 0. Therefore, the MIM of continuous random variable approaches infinity, which makes no sense. However, the second term in (6) can help us characterize the relative importance of continuous random variables. The logarithm operator does not change the monotonicity of a function, which is only to reduce the magnitude of the numerical results, n P f (xi )e−f (xi ) ∆ is adopted to measure the relative imporso i=1 tance. If f (x)e−f (x) is Riemann integrable, n P f (xi )e−f (xi ) ∆ i=1 approaches the integral of f (x)e−f (x) as ∆ → 0 by definition of Riemann integrability. OF DMIM In this section, the properties of DMIM are discussed in details. A. Upper and Lower Bound n (f (x)) (−1) −∞ n! n+1 dx (3c) (3d) For any continuous random variable X with density f (x), it is noted that Z Z f (x)dx = 1. (7) f (x)e−f (x) dx ≤ S S (7) is obtained for the fact that 0 ≤ f (x) ≤ 1, which leads to e−f (x) ≤ 1. As a result, f (x)e−f (x) ≤ f (x). Obviously, we also find l(x) ≥ 0 because f (x) ≥ 0. Hence, we obtain B. Relation of DMIM to MIM For a random variable X with density f (x), we divide the range of X into bins of length ∆. We also suppose that f (x) is continuous within the bins. According to the mean value theorem, there exists a value xi within each bin such R (i+1)∆ that f (xi ) ∆ = i∆ f (x)dx. Then, we define a quantized random variable X ∆ , which is given by Therefore, pi f (xi )∆. (5b) i=1 (3b) ∞ n Z +∞ X (−1) n+1 dx. (f (x)) =1 + n! −∞ n=1 X ∆ = xi , ∆f (xi )e−̟∆f (xi ) III. T HE P ROPERTIES (3a) n+1 n! Z ∞ X +∞ n=1 n X (3) ∞ X (−f (x))n dx n! n=0 (−1) (5a) i=1 Definition 1. The DMIM l(X) of a continuous random variable X with density f (x) is defined as Z f (x)e−f (x) dx, (1) l(X) = f (x) (5) ∆f (xi )e̟(1−∆f (xi )) = ̟ + log A. Differential Message Important Measure = i=1 n X pi e̟(1−pi ) i=1 II. T HE D EFINITION OF DMIM −∞ Z +∞ n X if i∆ ≤ X < (i + 1)∆. (4) R (i+1)∆ = P r{X ∆ = xi } = i∆ f (x)dx = 0 ≤ l(X) ≤ 1. (8) B. Translation with Constant Let Y = X + c, where c is a real constant. Then fY (y) = fX (y − c), and Z +∞ l(X + c) = fX (x − c)e−fX (x−c) dx = l(X). (9) −∞ As a result, the translation with a constant does not change the DMIM. 3 C. Stretching Let Y = aX, where a is a non-zero real number. Then  1 fY (y) = |a| fX ay , and Z fY (y) e−fY (y) dy Z y y 1 1 e− |a| fX ( a ) dy fX = |a| a Z 1 = fX (x) e− |a| fX (x) dx. l (aX) = Consider the extreme case, we get Z 1 lim l (aX) = lim f (x) e− |a| fX (X) dx = 1, a→∞ a→∞ (10) (10a) (10b) (11) and lim l (aX) = lim a→0 a→0 Z 1 f (x) e− |a| fX (X) dx = 0. (12) Asymptotically, too small stretch factor will lead to lessen the relative importance of random variables. Nevertheless, when the stretch factor approaches infinity, DMIM reaches the maximum. D. Relation of DMIM to Rényi Entropy where α > 0 and α 6= 1. As α tends to 1, the Rényi entropy tends to the Shannon entropy. Therefore, we obtain Z α (f (x)) dx = e(1−α)hα (X) . (14) Hence, we find ∞ X (−1)n −nhn+1 (X) =1+ e . n! n=1 (15) (15d) E. Truncation Error In this part, the remainder term of (2) will be discussed. In fact, the remainder term is limited in many cases, which is summarized as the following theorem. R n+1 Theorem 2. If (f (x)) dx ≤ ε for every n ≥ m, then l(X) − (1 + n=1 n (−1) n! Z +∞ −∞ (17f) (17c) follows from R (f (x)) n+1 dx ≤ ε, when n ≥ m. That is to say, if the integral of the density to the (n + 1)-th power is limited, the remainder term will be restricted. R n+1 Corollary 1. If (f (x)) dx ≤ ε for every n ≥ m, then m−1 P (−1)n −nhn+1 (X) ) ≤ eε. l(X) − (1 + n! e Proof. Clearly we have m−1 X ! (−1)n −nhn+1 (X) e l (X) − 1 + n! n=1 m−1 X (−1)n Z +∞ = l(X) − (1 + (f (x))n+1 dx) n! −∞ n=1 ≤eε, (f (x))n+1 dx) ≤ eε. (16) (18) (18a) (18a) follows from Theorem 2. Remark 1. Letting m = 2 in (17c), after manipulations, we obtain l(X) − (1 − e−h2 (X) ) ≤ (e − 2)ε, Obviously, the DMIM is an infinite series of Rényi Entropy. m−1 X =eε, n=1 The differential Rényi entropy of a continuous random variable X with density f (x) is given by [9] Z 1 α hα (X) = ln (f (x)) dx, (13) 1−α ∞ n Z +∞ X (−1) n+1 (f (x)) dx l(X) = 1 + n! −∞ n=1 Proof. Substituting (2) in the left of (16), we obtian ! m−1 X (−1)n Z +∞ n+1 (f (x)) dx l (X) − 1 + n! −∞ n=1 ∞ n Z +∞ X (−1) n+1 (f (x)) dx (17) = n! −∞ n=m ∞ n Z +∞ X (−1) n+1 ≤ (f (x)) dx (17a) n! −∞ n=m Z ∞ X 1 +∞ n+1 = (f (x)) dx (17b) n! −∞ n=m ! ∞ X 1 ε (17c) ≤ n! n=m ! ∞ m−1 X X 1 1 ε (17d) + ≤ 1+ n! i=m n! n=1 l(X) + e −h2 (X) ≤ 1 + (e − 2)ε. (19) (19a) Especially, if ε is too small, we have l(x) + e−h2 (X) ≈ 1. That means l(X) is approximately the dual part of Rényi entropy with order 2. IV. T HE DMIM OF S OME D ISTRIBUTIONS A. Uniform Distribution 1 For a random variable whose density is b−a for a ≤ x ≤ b and 0 elsewhere, we have Z b 1 1 1 − b−a e dx = e− b−a . (20) l(X) = b − a a Note that 1 lim e− b−a = 0, lim e− b−a = 1. (b−a)→0 (b−a)→∞ 1 (21) (21a) 4 B. Normal Distribution √ 1 e− 2πσ2 Let X ∼ φ(x) = Z +∞ n+1 (φ(x)) dx = −∞ (x−µ)2 2σ2 Z +∞  −∞  n+1 Z with σ 6= 0, then n+1 (x−µ)2 1 − 2σ2 √ dx e 2πσ 2 (22) +∞ 1 √ e 2πσ 2 −∞ n+1 r  1 2πσ 2 = √ n+1 2πσ 2 n 1 1 √ . = √ n+1 2πσ 2 Substituting (22c) in (2), we obtian = ∞ X − n+1 (x−µ)2 2σ2 dx (22a) (22b) (22c) n  l(X) − (1 − e −h2 (X) (e − 2) . ) ≤ √ 2 3πσ 2 l(X) − l̂(X) < n (24) 3σ . e It is easy to see that the upper bound of error approaches 0 if σ approaches 0. C. Exponential Distribution Letting ( λe−λx , 0, x≥0 , x<0 where λ > 0, we obtain Z +∞ Z +∞ n+1 n+1 λe−λx dx (f (x)) dx = −∞ 0 Z +∞ λn+1 e−λ(n+1)x dx = 0 Z +∞ = λn+1 e−λ(n+1)x dx λn . n+1 Substituting (31c) in (2), we obtain l(X) = 1 + ∞ X n (−1) n=1 It is noted that 1 λn = (1 − e−λ ). (n + 1)! λ  1 1 − e−λ = 1, λ  1 lim 1 − e−λ = 0. λ→∞ λ λ→0 l̃2 (X) = e − 2√1πσ . (26) (26a) According to (24), l˜1 (x) and l̃2 (x) is very good approximate values for DMIM of normal distribution when σ is not too small, which will be shown by the numerical results in section VI. 2) When σ is small: However, the DMIM of normal distribution will be hard to calculate when σ is small. By Stirling formula, l(X) can also be written as n  ∞ X 1 e p √ . (27) l (X) ≈ 1 + − 2πσn 2πn (n + 1) n=1 e √ e ≈ 1.0844 If n > √2πσ σ , we will obtain − 2πσn < 1. Let  e  n0 = 2πσ where ⌊x⌋ is the largest integer smaller than or equal to x. In this case, we define  n n0 X (−1)n 1 1 ˆl(X) = 1 + √ √ , (28) n! n+1 2πσ 2 n=1 as the approximate value when σ is small. The following theorem shows the validity of l̂(X). (31) (31a) (31b) (31c) lim We define 1 l̃1 (X) = 1 − √ , 2 πσ (30) 0 = √ ≈ 0. Moreover, the intensity of If σ is big enough, 2(e−2) 3πσ2 approximation error decreases as the inverse square of σ. In this case, substituting h2 (X) = ln 2 + 0.5 ln π + ln σ in 1 − e−h2 (X) , we find 1 − √1 1 − e−h2 (X) = 1 − √ ≈ e 2 πσ . (25) 2 πσ (29) Proof. Refer to the Appendix A. X ∼ f (x) = 1 (−1) 1 √ √ . (23) n! n + 1 2πσ 2 n=1 √ R +∞ n+1 dx 1) When σ is large: If σ > 1/ 2π, −∞ (φ(x)) √ 2 3πσ ) for every n ≥ 2 will be less than or equal to 1/(2  n 1 1 because √n+1 √2πσ2 monotonically decreases in this case. According to Remark 1, we obtain l(X) = 1 + Theorem 3. X is a normal random variable with mean µ and variance σ 2 .l̂(X)is the first n0 terms of l(X), given by (28), e . If σ is relatively small, Then we have where n0 = 2πσ (32) (33) (33a) D. Gamma Distribution In many cases, the Γ distribution can be used to describe the distribution of the amount of time one has to wait until a total of n events has occurred in practice [22]. For a random variable obeying Γ distribution, its density is  α−1 −λx  (λx)  λe , x≥0 , (34) X ∼ f (x) = Γ (α)   0, x<0 where λ, α > 0, we obtain Z +∞ n+1 (f (x)) dx −∞ = Z λe−λx (λx)α−1 Γ (α) +∞ 0 = = !n+1 λn 1)αn−n+α Γn+1 (n + (α) n λ Γ (αn − n + α) αn−n+α n+1 Γ (n + 1) (α) Z dx +∞ e−t t(α−1)(n+1) dt (35) (35a) 0 . (35b) 5 Substituting (35b) in (2), we obtian l(X) = 1 + ∞ X n V. G OODNESS n λ Γ (αn − n + α) (−1) . n! (n + 1)αn−n+α Γn+1 (α) n=1 (36) E. Beta Distribution The β distribution often arises to depict a random variable whose set of possible values is some finite interval, such as [0, 1] [22]. For a random variable follows β distribution whose density is  1  xa−1 (1 − x)b−1 , 0 < x < 1 B(a, b) , X ∼ f (x) =  0, else (37) R 1 a−1 b−1 where B(a, b) = 0 x (1 − x) dx and a, b > 0. According to [22], we have B(a, b) = Γ (a) Γ (b) . Γ (a + b) −∞ = = = = 1  Hence, we obtain l(X) = 1 + ∞ n X (−1) B(an − n + a, bn − n + b) . n! B n+1 (a, b) n=1 (40) F. Laplace Distribution A random variable, whose density function is λ λ|x−θ| e , (41) 2 has a Laplace distribution where θ is a location parameter and λ > 0. In fact, we find  n n+1 Z +∞  λ −λ|x−θ| λ 1 . (42) dx = e 2 n+1 2 −∞ f (x) = Substituting (42) in (2), we obtian  n ∞  X λ λ 2 1 − 1 − e− 2 . = l(X) = 1 + (n + 1)! 2 λ n=1 F IT (44) and the real distribution is F (x) . One practical problem that can occur with this strategy is that how many samples is required for fitting the real distribution with an acceptable bias in some degree. Many literatures studied this problem by Kolmogorov-Smirnov statistic [17]– [19]. When n is big enough, the confidence limits for a cumulative distribution are given by [19], ∞ X (−1)k−1 e−2nk 2 2 d , (45) k=1 where Dn is error bound between empirical distribution and real distribution, called Kolmogorov-Smirnov statistic, which is defined as Dn = sup F̂n (x) − F (x) , (46) x Though this result can describe the goodness of fit very well and guide us to choose the sampling numbers, we need to give two artificial criterions, the deviation value d and the probability P {Dn > d}, in order to determine n. In addition, this method do not take the message importance of samples into account, which makes the process of information collection not intuitionistic. In this paper, we consider this problem from the perspective of DMIM. Firstly, we define ! n X (47) Xi /l(X). γ (n) = l i=1 as relative importance of these n sample points. According Pn to central-limit theorem [22], when n is big enough, i=1 Xi approximately obeys normal distribution N (nµ, nσ 2 ). In fact, √ when nσ is not too small (such a condition is satisfied Pn − √1 because n is big enough), l ( i=1 Xi ) ≈ e 2 πnσ according to (25). Hence − √1 e 2 πnσ . (48) γ(n) = l (X) We find γ(n) increases rapidly firstly, and then increases slowly by analyzing its monotonicity. Moreover, we obtain n→∞ For simplicity to follow, the DMIM for these common densities are summarized in Table I. DMIM n 1X I(Xk ≤x) , n γ(∞) = lim γ (n) = lim (43) WITH k=1 P {Dn > d} ≈ 2 n+1 1 b−1 a−1 x (1 − x) dx (39) B(a, b) 0 Z 1 1 (b−1)(n+1) x(a−1)(n+1) (1 − x) dx (39a) B n+1 (a, b) 0 B(an − n + a, bn − n + b) B n+1 (a, b) Z 1 (a−1)(n+1) (b−1)(n+1) x (1 − x) dx (39b) · B(an − n + a, bn − n + b) 0 B(an − n + a, bn − n + b) , (39c) B n+1 (a, b) Z F̂n (x) = (38) In fact, we find Z +∞ (f (x))n+1 dx OF In this section, we will consider the problem of distribution goodness-of-fit in a continuous setting. Let X1 , X2 , ...Xn be a sequence of independent and identically distributed random variables, each having mean µ and variance σ 2 . In practice, the real distribution is generally unknown and we usually use empirical distribution to substitute real distribution. Generally, the empirical distribution function is given by n→∞ e 1 − 2√πnσ l (X) = 1 , l (X) (49) which means γ(n) reaches limit as n → ∞. In fact, these two points are consistent with the characteristic of data fitting. Both γ(n) and data fitting have the law of diminishing of marginal utility. Furthermore, the goodness of fit can not increase 6 TABLE I TABLE OF DMIM FOR COMMON DENSITIES . Distribution Parameter Uniform a,b f (x) = Normal µ,σ f (x) = Exponential λ f (x) = Gamma α,λ Beta a,b Laplace λ,θ Density DMIM 1 , b−a e a≤x≤b √ 1 2πσ 2 λe−λx , (x−µ)2 − 2σ2 e x, λ > 0 λe−λx (λx)α−1 Γ(α) f (x) = x ≥ 0, λ, α > 0 1 f (x) = B(a,b) xa−1 (1 − x)b−1 0 < x < 1, a, b > 0 f (x) = λ eλ|x−θ| 2 −∞ < x, θ < ∞, λ > 0 unboundedly and it reaches the upper bound when the number of sampling points approaches infinity. DMIM is bounded, while Shannon entropy and Rényi entropy do not possess these characteristic. In conclusion, we adopt |γ(∞) − γ(n)| to describe the goodness of fit. Theorem 4. X1 , X2 , X3 , . . . , Xn are the n sampling of a continuous random variable X, whose density is f (x). If |γ(∞) − γ(n)| ≤ ε, we will obtain r   19 1 P Dn > 2πσ 2 ln ≤ β. (50) ln 9β 1 − ε Proof. Refer to the Appendix B. Remark 2. According to (65) in Appendix B, we obtain −1/2 ε = 1 − e−d(2πσ ln 9β ) , (51) 2 d 19 − 2πσ2 ln2 (1−ε) β= . (51a) e 9 Therefore, there is a ternary relation among d, β and ε. If two of them are known, the third one can be obtained, easily. 2 19 Remark 3. For arbitrary positive number d and β ≤ 1, one can always find a ε0 , which can be obtained by (51), when ε ≤ ε0 , P {Dn > d} < β holds. Remark 4. When ε tends zero, which means n → ∞, at this time, P {Dn > 0} = 0. Therefore, the real distribution is equal to empirical distribution with probability 1 as ε → 0. That is, F̂n (x) → F (x) as ε → 0. (52) Actually, the DMIM deviation characterizes the process of collection information in terms of data structure. With the growth of sampling number, the information gathers, and the empirical distribution approaches real distribution at the same time. In particular, when n → ∞, all the information about the real distribution will be obtained. In this case, the empirical distribution is equal to real distribution, naturely. Remark 5. For arbitrary continuous random variable with variance σ 2 , if the maximal allowed DMIM deviation is ε, the sampling number should be bigger than 1/(4πσ 2 ln2 (1 − ε) according to (64). The sampling number only depends on one artificial criterion, the DMIM deviation, while the variance are the own ∞ P 1 − b−a n (−1)n √1 √ 1 n! n+1 2πσ 2 n=1 1 (1 − e−λ ) λ ∞ n P (−1) λn Γ(αn−n+α) 1+ n! (n+1)αn−n+α Γn+1 (α) n=1 ∞ P (−1)n B(an−n+a,bn−n+b) 1+ n! B n+1 (a,b) n=1 1+  2 λ    λ 1 − e− 2 attributes of the observed variable X. Furthermore, the sampling number in the new developed method has nothing to do with the distribution form, which means the new method is distribution-free. VI. N UMERICAL R ESULTS In this section, we present some numerical results to validate the above results in this paper. A. The DMIM of Normal Distribution First of all, we analyze the DMIM in normal distribution by simulation. Its standard deviation σ is varing from 0.01 to 10. Fig. 1 depicts the DMIM versus standard deviation σ in Normal distribution. We observe that there are some constraints on DMIM in this case. That is, the DMIM grows with the increasing of σ. Furthermore, it increases rapidly when σ is small (σ < 1), while it increases slowly when σ is big (σ > 4). Besides, DMIM is non-negative and it is very close to zero when σ approaches zero. In order to avoid complex calculations, we give two approximate value of √ DMIM in Gauss distribution, which are l̃ (X) = 1 − 1/(2 πσ) and 1 √ l̃2 (X) = e−1/(2 πσ) . Obviously, the gap between true value l(X) and the approximate value l̃1 (X) will be very small if σ is big enough. However, ˜l1 (X) is smaller than l(X) when σ is small. For l̃2 (x), the gap between it and l(X) will be very small if σ is not too small. In fact, there is only a slight deviation between them when σ is small. Moreover, Fig. 2 shows the absolute and relative error when we adopt approximations. Some observations are obtained. Both absolute and relative error are relatively small when σ is big ( l(X) − ˜l1 (X) /l(X) < 1% when σ > 2.5, and l(X) − ˜l2 (X) /l(X) < 1% when σ > 1.25), and they both decreases with increasing of σ for two approximate values in most of time. In fact, when σ is not too small (σ > 0.3), the relative error of l̃2 (X is smaller than 10%. When σ < 6.25, the relative error of ˜l2 (X) is smaller than that of l̃2 (X) and the opposite is true when σ > 6.25. In summary, ˜l2 (X) is a good approximation for all the σ and l̃1 (X) is an excellent approximation when σ is big enough. Fig. 3 shows the truncation error |l(X) − l̂(X)| versus the number of series N when σ is small. Without loss of 7 10 10 1 σ = 0.02 σ = 0.03 σ = 0.05 0.9 10 5 0.7 |l(X) − ˆl(X)| True Value ˜l1 (X) ˜l2 (X) 0.8 l(X) 0.6 1 0.5 0.4 0.5 0.3 0.2 0 0.25 1 2 3 10 -10 n0 =21 n0 =36 0.5 0 0 10 -5 10 -15 0 0.1 |l(X − ˆl(X))| = 0.01 0 4 5 6 7 8 9 10 10 0 10 20 30 40 |(l(X ) − ˜l1 (X )|/l(X ) |(l(X ) − ˜l2 (X )|/l(X ) 90 100 0.8 0.7 100% l(X) Relative error Absolute error 80 0.9 1000% 0 10 70 1 10000% |(l(X ) − ˜l1 (X )| |(l(X ) − ˜l2 (X )| 10 -2 60 Fig. 3. |l(x) − l̂(x)| vs. N . Fig. 1. l(X) vs. σ in normal distribution. 10 -1 50 N σ 10 n0 =54 -20 (0.3,10%) 10% 0.6 Uniform Gauss Exponential Γ(α = 1.5) Γ(α = 0.5) Laplace 0.5 0.4 1% 0.3 -3 0.2 10 -1 0.1% 10 -0.5 1 10 0.5 10 1 10 1.5 10 2 Variance 10 -4 0.01% 0 5 10 σ 0 5 10 Fig. 4. l(X) vs. Variance. σ Fig. 2. Error vs. σ in normal distribution. generality, we take σ as 0.02, 0.03 and 0.05. N is varing from 0 to 100. Some interesting observations are made. The truncation error will remain unchanged and approach zero only if N > N0 , such as n > 70 when σ = 0.02. When N < N0 , it increases at first and then decreases. It also can be seen that N0 decreases with the increasing of σ. Furthermore, for the same N , the DMIM decreases with the increasing of σ. Furthermore, l̂(x), which is given by (28), is a good approximation because |l(X) − l̂(X)| < 0.01 < 3σ/e when N = n0 . B. The DMIM for Common Densities Fig. 4 shows the DMIM of uniform distribution, normal distribution, exponential distribution, Gamma distribution and Laplace distribution when the variance increases from 0.1 to 100. The simulation parameter in Γ distribution is set as α = 0.5, 1.5. It is observed that the DMIM increases with the increasing of variance for all these distributions. Among them, the DMIM of normal distribution is the largest and that of Gamma distribution (α = 0.5) is the smallest. Fig. 4 also shows that the DMIM of Gamma distribution increases with increasing of α for the same variance. It also can be seen from the figure, that the gap between the DMIM of uniform distribution and that of normal distribution is negligibly small when variance is big enough. This is because that, for √ the same 2 −1/(2 3σ) and variance σ , these two DMIM respectively are e √ e−1/(2 πσ) (approximate value when σ is large according to (25)), which are very close. C. Goodness-of-fit with DMIM Next we focus on conducting Monte Carlo simulation by computer to validate our results about goodness of fit. The samples are drawn by independent identically distributed Gaussian, each having mean zero. Their standard deviation is 1 or 2. The DMIM deviation ε is varying from 0.001 to 0.1. The confidence limit β is 0.001. For each value of ε, the simulation is repeated 10000 times. Fig. 5 shows the relationship between the probability of error bound P {D > d} and DMIM deviation ε. Some observations can be obtained. The probability of error bound decreases with the decreasing of DMIM deviation. In fact, this process can be divided into three phases. In phase one, in which ε is very small (ε < 10−2.8 when d = 0.01 and σ = 1), P {D > d} is close to zero. In phase two, ε is neither too 1 0.9 β when d = 0.01, σ=1 0.8 0.7 0.6 0.5 0.4 0.3 d=0.01,σ = 1,Normal d=0.05,σ = 1,Normal d=0.01,σ = 2,Normal d=0.05,σ = 2,Normal d=0.01,σ = 1,Uniform d=0.01,σ = 1,Exponential 0.2 0.1 0 10 -3 10 -2.8 10 -2.6 10 -2.4 10 -2.2 10 -2 10 -1.8 10 -1.6 10 -1.4 10 -1.2 10 -1 DMIM Deviation ε Fig. 5. Probability of error bound P {D > d} vs. DMIM deviation ε. small nor too large (10−2.8 < ε < 10−2 when d = 0.01 and σ = 1). In this case, P {D > d} increases rapidly from zero to one. In the phase three, in which ε is large (ε > 10−2 when d = 0.01 and σ = 1), P {D > d} approaches one. For the same standard deviation, P {D > d} decreases with increasing of d when P {D > d} < 1. Furthermore, for the same d, the probability of error bound increases with increasing of the standard deviation. The simulation results of P {D > 0.01} are listed in Table. II, where the sampling number n is given by (64) and the upper bound for the error probability β is given by (51a). In this table, we take d = 0.01 as the criterion to evaluate the error between the empirical distribution and real distribution. To better validate our results, normal distribution, exponential distribution, uniform distribution and Laplace distribution are listed here. The standard deviation of these four distribution is σ. As a result, λ = 1/σ in exponential distribution, √ and the √ density of uniform distribution is 1/(2 3σ). The λ = 2/σ in Laplace distribution. The remaining parameter values are same with that in Fig. 5. We obtain that β is indeed the upper bound of P {D > 0.01} because every P {D > 0.01} is smaller than β. For each distribution, it is noted that the sampling number increases with the decreasing of DMIM deviation. In addition, P {D > 0.01} decreases with decreasing of the DMIM deviation. P {D > 0.01} can even be zero when ε = 0.001 and σ = 1. For the same DMIM deviation, β and P {D > 0.01} increase with increasing of σ. Therefore, if one wants to have the same precision in different variance, it needs to select smaller ε when σ is larger, such as ε = 0.002 when σ = 1 and ε = 0.001 when σ = 2. Furthermore, when n is not too small, for the same ε and σ, P {D > 0.01} of these four distribution is very close to each other, which means this method is distribution-free. To demonstrate the effectiveness of our theoretical results, we illustrate our proposed sampling number to fit a common and complex distribution, the Nakagami distribution. Nakagami-m distribution provides good fitting to empirical multipath fading channel [23]. The parameter m in this part is 2 and Ω = 10. Fig. 6 shows the cumulative distribution function (CDF) of empirical distribution and real distribution. Cumulative distribution function Probability of Error Bound P {D > d} 8 1 T rueV alue ε = 0.001 ε = 0.01 ε = 0.05 ε = 0.1 0.9 0.8 0.7 0.6 0.9 0.5 0.4 0.8 0.3 0.2 0.7 3.5 0.1 4 4.5 0 0 1 2 3 4 5 6 7 8 9 x Fig. 6. The fitting of the cumulative distribution function of Nakagami distribution when m = 2 and Ω = 10. The simulated DMIM deviation ε is 0.1, 0.05, 0.01 and 0.001. It is noted that the gap between the CDF of empirical distribution and that of real distribution is constrained by the DMIM deviation. Obviously, the gap decreases with the decreasing of the DMIM deviation. Particularly, the gap almost disappears when ε = 0.001. In general, there is a tradeoff between the sampling number and the accuracy for empirical distribution, but DMIM can provide a new viewpoint on this by taking message importance into account. VII. C ONCLUSION This paper focused on the problem, that how many samples is required in big data collection, with taking DMIM into account. Firstly, we defined DMIM as an measure of message importance for continuous random variable to help us describe the information flows during sampling. It is an extension of MIM and similar to differential entropy. Then, the DMIM for some common distributions, such as normal and uniform distribution, were discussed. Moreover, we made the asymptotic analysis of Gaussian distribution. As a result, high-precision approximate values for DMIM of normal distribution were respectively given when variance is extremely big or relatively small. Then we proved that the divergence between the empirical distribution and the real distribution is controlled by the DMIM deviation, which shows the deviation of DMIM is equivalent to Kolmogorov-Smirnov statistic. In fact, compared with Kolmogorov-Smirnov test, the new method based on DMIM gives us another viewpoint of information collection because it visually shows the information flow with the increasing of sampling points, which helps us to design sampling strategy for the actual system of big data. Moreover, similar to Kolmogorov-Smirnov test, the sampling number in our method is distribution-free, which only depends on the DMIM deviation when the random variable is given. Proposing the joint differential message importance measure and using it to design high-efficiency big data analytic system are of our future interests. 9 TABLE II TABLE OF PROBABILITY OF ERROR BOUND P {D > 0.01}. T HE SAMPLING NUMBER n IS GIVEN BY (64) PROBABILITY β IS GIVEN BY (51 A ). Distribution DMIM deviation ε n 787 8815 19854 79497 787 8815 19854 79497 787 8815 19854 79497 787 8815 19854 79497 0.01 0.003 0.002 0.001 0.01 0.003 0.002 0.001 0.01 0.003 0.002 0.001 0.01 0.003 0.002 0.001 Normal Exponent Uniform Laplace σ=1 β P {D > 0.01} 1.8034 0.9994 0.3621 0.2286 0.0398 0.0207 2.63e-7 0 1.8034 0.9964 0.3621 0.2011 0.0398 0.0164 2.63e-7 0 1.8034 0.9996 0.3621 0.2791 0.0398 0.03 2.63e-7 0 1.8034 0.9952 0.3621 0.1835 0.0398 0.0125 2.63e-7 0 A PPENDIX A P ROOF OF T HEOREM 3 Proof. For convenience, we might as well take n  e 1 √ , T (N ) = p 2πσn 2πn (n + 1) l √e 2πσ (53) m = c/σ + c′ = n0 + 1 where ⌈x⌉ is √ the smallest integer larger than or equal to x and c = e/ 2π. Obviously, 0 ≤ c′ ≤ 1. Hence and let n′0 = l(X) − l̂(X) = = ≤ ∞ X n=n0 ′ ∞ X n=n0 ∞ X n=n0 ′ n  n e (−1) p √ 2πσn 2πn (n + 1) (−1)n T (n) (54) (54a) ′ |T (n)|. (54b) This means, we only need to check ∞ P n=n0 ′ Then we find  1 e √ T (n′0 ) = p ′ ′ 2πσn′0 2πn0 (n0 + 1) n′0 |T (n)| < 3σ e holds. n 196 2203 4963 19874 196 2203 4963 19874 196 2203 4963 19874 196 2203 4963 19874 AND THE UPPER BOUND FOR THE ERROR σ=2 β P {D > 0.01} 2.0296 1 01.3586 0.9056 0.7823 0.5390 0.0396 0.0221 2.0296 1 1.3586 0.8609 0.7823 0.4821 0.0396 0.0161 2.0296 1 1.3586 0.9447 0.7823 0.6043 0.0396 0.0275 2.0296 1 1.3586 0.8466 0.7823 0.4509 0.0396 0.0152 When N > n′0 , we obtain N  1 e √ T (N ) = p (56) 2πσN 2πN (N + 1) N  e 1 √ (56a) < p 2πσN 2πn′ 0 (n′0 + 1) n′0  N −n′0  e e 1 √ √ = p 2πσN 2πσN 2πn′0 (n′0 + 1) N −n′0 n′0   ′ 1 e n0 e √ √ = p 2πσn′0 N 2πσN 2πn′ 0 (n′0 + 1) n′ 0  1 e √ = p ′ ′ 2πσn′0 2πn0 (n0 + 1) N −n′0   −n′0  N − n′ 0 e √ (56b) · 1+ n′0 2πσN  N −n′0 e < T (n′0 ) √ (56c) 2πσN  e 1 ′  N − n′0 = 1   T (n0 ) √2πσ N , 2  ≤ ,  1 e  ′  T (n0 ) √ , N − n′0 ≥ 2 2πσ (N − 1) N (56d) 1 2πN (N +1) where (56a) follows from √ (55) c/σ+c′  c 1 =p 2π (c/σ + c′ ) (c/σ + c′ + 1) σ (c/σ + c′ ) 1 =p ′ 2π (c/σ + c ) (c/σ + c′ + 1)  c !−c′  −c′  c′ σ c ′ σ c′ σ 1+ . (55a) · 1+ c c < 1 q 2πn′0 (n′0 +1) because N > n′0 . (56c) is obtained by removing   −n′0 −n′0 ′ N −n′ 0 0 1 + N −n . It requires that 0 < 1 + < 1. ′ ′ n0 n0 ′ Such a condition is satisfied because N > n0 > 0. It is 1 obtained that N N 1−n0 ′ ≤ (N −1)N when N −n′0 ≥ 2. Therefore (56d) holds. Substituting (56d) in (54b), we have (57)-(58) (See the nest page). Based on the discussions above, when σ is relatively small, we have ∞ X n=n0 ′ |T (n)| < 3σ −c′ e . e (59) 10 ∞ X   1 1 e 1 e e √ √ |T (n)| < T (n0 ′ ) 1 + √ + + + ... 2πσ n0 ′ + 1 2πσ (n0 ′ + 1) (n0 ′ + 2) 2πσ (n0 ′ + 2) (n0 ′ + 3) n=n0 ′   1 1 1 1 e e e e √ √ √ + − + + ... = T (n0 ′ ) 1 + √ 1 2πσ n0 ′ + 2πσ n0 ′ + 1 2πσ n0 ′ + 2 2πσ n0 ′ + 2   1 2c = T (n0 ′ ) 1 + ′ σ n0 + 1  c !−c′  −c′    1 2c c ′ σ c′ σ c′ σ =p 1+ . 1+ 1+ c c c + c′ σ + σ 2π (c/σ + c′ ) (c/σ + c′ + 1) (57c) is obtained by substituting (55a) in (57b). In fact, we find   c −c′  1 c ′ σ c′ σ √ 1+ 1 + c 2π(c/σ+c′ )(c/σ+c′ +1) lim σ→0 3σe−c′ −1 c′ σ c −c′  1+ 2c c+c′ σ+σ  = 1. (57) (57a) (57b) (57c) (58) ′ Therefore, when σ is relatively small, 3σe−c −1 is a good approximate value for (57c). In fact 0 ≤ c′ ≤ 1, so we obtain ∞ X n=n0 Substituting (48) and (49) in |γ(∞) − γ(n)| ≤ ε, we get 3σ |T (n)| < . e ′ (60) 3σ . e (61) Hence, |l(x) − l(x̂)| < The proof is completed. =2 =2 ≤2 ≤2 =2 = ∞  X m=1 ∞  X m=1 ∞ X m=1 ∞ X m=1 ∞ X (−1)k−1 e−2nk 2 2 d e−2n(2m−1) 2 2   2 1 − e−2n(4m−1)d e−2n(2m−1) d 2 2  − e−2n(2m−1+1) d d 2 2 d e−4nd 2 (2m−1)+2nd2 e−8nd 2 m+6nd2 2 (62c) is obtained for the fact that 1 − e2n(4m−1)d ≤ 1. (62d) requires −2n(2m − 1)2 d2 ≤ −4nd2 (2m − 1) + 2nd2 . Such a condition is satisfied because −2nd2 (2m − 1 − 1)2 ≤ 0. 2 This means, we only need to check e−2nd 1−e−8nd2 4πσ 2 ln2 (1 − ε) 2 ⇒ e−2nd ≤ 9β . 19 (66) R EFERENCES (62b) (62d) 2e . 1 − e−8nd2 19 2 2πσ 2 ln 9β ln (1 − ε) (65) (62f) (62a) (62c) m=1 −2nd2 r 19 1 ln , d = 2πσ 2 ln 9β 1 − ε (64) (62e) k=1 2 2 2nd2 ≥ 2 1 1 ≥ . 2 2 (1 − εl (X)) 4πσ ln (1 − ε) It is easy to check   2 2 4 + 2e−2nd − β ≤ 0, (67) β e−2nd q 1 4 when β ≤ 19 9 19 ≈ 1.0112. In fact, β is a threshold value of the probability, so we usually take β ≤ 1. Therefore, (67) holds all the time. Hence, 2 2e−2nd ≤ β. (68) 1 − e−8nd2 Based on the discussions above, we get r   1 19 < β. (69) ln P Dn > 2πσ 2 ln 9β 1 − ε (62) e−2n(2m−1) √1 4πσ 2 ln2 we have Proof. In fact, a upper bound of P {Dn > d} is given by ∞ X n≥ Letting A PPENDIX B P ROOF OF T HEOREM 4 P {Dn > d} ≈ 2 − e 2 πnσ 1 1 . − ≤ε⇒n≥ l (X) l (X) 4πσ 2 ln2 (1 − εl (X)) (63) Because 0 ≤ l(X) ≤ 1, we obtain ≤ β holds. [1] M. Chen, S. Mao, Y. Zhang, and V. C. Leung, Big data: related technologies, challenges and future prospects. Springer, 2014. [2] M. Tahmassebpour, “A new method for time-series big data effective storage,” in IEEE Access. DOI 10.1109/ACCESS.2017.2708080, 2017. [3] W. Meng, W. Li, C. Su, J. Zhou and R. lu, “Enhancing trust management for wireless intrusion detection via traffic sampling in the era of big data,” in IEEE Access. DOI 10.1109/ACCESS.2017.2772294, 2017. 11 [4] Z. Zhou, H. Zhang, S. Li and X. Du, “Hermes: a privacy-preserving approximate search framework for big data,” in IEEE Access. DOI 10.1109/ACCESS.2017.2788013, 2017. [5] C. E. Shannon, “A mathematical theory of communication,” Bell Syst. Tech. J., 27:379–423, 623–656, 1948. [6] S. Verdu, “Fifty years of shannon theory,” IEEE Trans. Inf. Theory, vol. 44, no. 6, pp. 2057–2078, 1998. [7] A. Rényi, “On measures of entropy and information,” in Proc. 4th Berkeley Symp. Math. Statist. and Probability, vol. 1. 1961, pp. 547–561. [8] D. Morales, L. Pardo and I. Vajda, “Rényi statistics in directed families of exponential experiments,” Statistics, vol. 34, no. 2, pp. 151–174, 2000. [9] T. Van Erven and P. Harremoës, “Rényi divergence and kullback-leibler divergence,” IEEE Trans. Inf. Theory, vol. 60, no. 7, pp. 3797–3820, 2014. [10] T. M. Cover and J. A. Thomas, Elements of information theory. New Jersey, the USA: Wiley, 2006. [11] P. Fan, Y. Dong, J. Lu, and S. Liu, “Message importance measure and its application to minority subset detection in big data,” in Proc. IEEE Globecom Workshops (GC Wkshps). 2016, pp. 1–5. [12] S. Ramaswamy, R. Rastogi, and K. Shim, “Efficient algorithms for mining outliers from large data sets,” in ACM Sigmod Record, vol. 29, no. 2. ACM, 2000, pp. 427–438. [13] K. Julisch and M. Dacier, “Mining intrusion detection alarms for actionable knowledge,” in Proc. the eighth ACM SIGKDD international conference on Knowledge discovery and data mining. ACM, 2002, pp. 366–375. [14] A. Zieba, “Counterterrorism systems of spain and poland: Comparative studies,” Przeglad Politologiczny, vol. 3, pp. 65–78, 2015. [15] R. She, S. Liu, and P. Fan, “Amplifying Inter-message Distance: On Information Divergence Measures in Big Data,” in IEEE Access. vol. 5, pp. 24105–24119, 2017. [16] S. Liu, R. She, P. Fan, and K. B. Letaief, “Non-parametric message important measure: Storage code design and transmission planning for big data,” arXiv preprint arXiv:1709.10280, 2017. [17] F. Massey. “The Kolmogorov-Smirnov test for goodness of fit,” Journal of the American statistical Association, vol. 46, no. 253, pp. 68–78, 1951. [18] H. Lilliefors. “On the Kolmogorov-Smirnov test for normality with mean and variance unknown,” Journal of the American statistical Association, vol. 62, no. 318, pp. 399–402, 1967. [19] S. Resnick, Advantures in Stochastic Process. New York:Birkhauser Verlag Boston, 1992. [20] P. Harremoës and G. Tusnády, “Information divergence is more χ2 distributed than the χ2 -statistics,” in Proc. IEEE International Symposium on Information Theory (ISIT). 2012, pp. 533–537. [21] K. Song, “Goodness-of-fit tests based on Kullback-Leibler discrimination information,” IEEE Trans. Inf. Theory, vol. 48, no. 5, pp. 1103– 1117, 2002. [22] S. M. Ross, A first course in probability. Pearson, 2014. [23] M. Nakagami, “The m-distribution-a general formula of intensity distribution of rapid fading,” Statistical Method of Radio Propagation, W. G. Hoffman, editor. London, England:Pergamon, 1960.
10math.ST
1 Output Impedance Diffusion into Lossy Power Lines arXiv:1702.01488v3 [cs.SY] 26 Jul 2017 Pooya Monshizadeh, Nima Monshizadeh, Claudio De Persis, and Arjan van der Schaft Abstract—Output impedances are inherent elements of power sources in the electrical grids. In this paper, we give an answer to the following question: What is the effect of output impedances on the inductivity of the power network? To address this question, we propose a measure to evaluate the inductivity of the power grid. By exploiting this measure together with the algebraic connectivity of the network topology, one can tune the output impedances in order to impose a desired level of inductivity on the power system. Results show that the more “connected” the network is, the more the output impedances diffuse into the network. Index Terms—Microgrid, Power network, Output impedance, Graph theory, Laplacian matrix, Kron reduction I. I NTRODUCTION UTPUT impedance is an important and inevitable element of any power producing device, such as synchronous generators and inverters. Synchronous generators typically possess a highly inductive output impedance according to their large stator coils, and are prevalently modeled by a voltage source behind an inductance. Similarly, inverters have an inductive output impedance due to the low pass filter in the output, which is necessary to eliminate the high frequencies of the modulation signal. There are motives to add an impedance to the inherent output impedance of the inverters, one of the most important of which is to enhance the performance of droop controllers in a lossy network. Droop controllers show a better performance in a dominantly inductive network (or analogously in dominantly resistive networks for the case of inverse-droop controllers) [1]–[6] (see Figure 1). The additional output impedance is also employed to correct the reactive power sharing error due to line mismatch [2], [7], [8], supply harmonics to nonlinear loads [9], [1], [10], share current among sources resilient to parameters mismatch and synchronization error [11], decrease sensitivity to line impedance unbalances [3], [12], reduce the circulating currents [13], limit output current during voltage sags [14], minimize circulating power [15], and damp the LC O Pooya Monshizadeh and Arjan van der Schaft are with the Johann Bernoulli Institute for Mathematics and Computer Science, University of Groningen, 9700 AK, the Netherlands, [email protected], [email protected] Nima Monshizadeh sion, University of is with the electrical Cambridge, CB3 0FA, engineering diviUnited Kingdom, [email protected] Claudio De Persis is with the Engineering and Technology institute Groningen (ENTEG), University of Groningen, 9747 AG, the Netherlands, [email protected] This work is supported by the STW Perspectief program ”Robust Design of Cyber-physical Systems” under the auspices of the project ”Energy Autonomous Smart Microgrids”. Fig. 1. Inductive outputs are typically added to the sources in order to assume inductive lines for the resulting network. resonance in the output filter [6]. In most of these methods, to avoid the costs and large size of an additional physical element, a virtual output impedance is employed, where the electrical behavior of a desired output impedance is simulated by the inverter controller block. Although an inductive output impedance, either resulting from the inherent output filter or the added output impedance, is considered as a means to regulate the inductive behavior of the resulting network, there is a lack of theoretical analysis to verify the feasibility of this method and to quantify the effect of the output impedances on the network inductivity/resistivity. Note that the output impedance cannot be chosen arbitrarily large, since a large impedance substantially boosts the voltage sensitivity to current fluctuations, and results in high frequency noise amplification [6]. Furthermore, there is the fundamental challenge of quantifying inductivity/resistivity of a network, which is nontrivial unless the overall network has uniform line characteristics (homogeneous). This is not the case here as the augmented network will be nonuniform (heterogeneous) even if the initial network is. In this paper, we examine the effect of the output impedances on a homogeneous power distribution grid by proposing a quantitative measure for the inductivity of the resulting heterogeneous network. Similarly, a dual measure is defined for its resistivity. Based on these measures, we show that the network topology plays a major role in the diffusion of the output impedance into the network. Furthermore, we exploit the proposed measures to maximize the effect of the added output impedances on the network inductivity/resistivity. We demonstrate the validity and practicality of the proposed method on various examples and special cases. The structure of the paper is as follows: In Section II, the notions of Network Inductivity Ratio (ΨNIR ) and Network Resistivity Ratio (ΨNRR ) are proposed. In Section III, the proposed measures are analytically computed for various cases of output inductors and resistors. In Section IV the proposed measure is evaluated with the Kron reduction in the phasor domain. Finally, Section V is devoted to conclusions. 2 with bik being the (i, k)th element of B. We start our analysis with the voltages across the edges of the graph G. Let Re ∈ Rm×m and Le ∈ Rm×m be the diagonal matrices with the line resistances and inductances on their diagonal, respectively. We have Re Ie + Le I˙e = B T V , (1) m where Ie ∈ R denotes the current flowing through the edges. The orientation of the currents is taken in agreement with that of the incidence matrix. The vector V ∈ Rn indicates the voltages at the nodes. Let τk denote the physical distance between nodes i and j, for each edge k ∼ {i, j}. We assume that the network is homogeneous, i.e. the distribution lines are made of the same material and possess the same resistance and inductance per length: Le Rek , l = k, k = {1, · · · , m} . r= τ ek τek I(t) I(t) I0 I0 RESISTIVITY ΨNIR ΨNRR INDUCTIVITY II. M EASURE D EFINITION Consider an electrical network with an arbitrary topology, where we assume that all the sources and loads are connected to the grid via power converter devices (inverters) [16]. The network of this grid is represented by a connected and weighted undirected graph G(V, E, Γ). The nodes V = {1, ..., n} represent the inverters, and the edge set E accounts for the distribution lines. The total number of edges is denoted by m, i.e., |E| = m. The edge weights are collected in the diagonal matrix Γ, and will be specified later. For an undirected graph G, the incidence matrix B is obtained by assigning an arbitrary orientation to the edges of G and defining   +1 if i is the tail of edge k bik = −1 if i is the head of edge k   0 otherwise t t Fig. 2. Worst cases are selected for inductivity and resistivity measures. where Vo ∈ Rn is the vector of voltages of the augmented nodes (the dark green nodes in Figure 1), and R ∈ Rn×n and L ∈ Rn×n are matrices associated closely with the resistances and inductances of the lines, respectively. We will show that the overall network after the addition of the output impedances, can be described by (4). Note that this description cannot necessarily be realized with passive RL elements. Therefore, while the inductivity behavior of the homogeneous network (3) is simply determined by the ratio r` , the one of (4) cannot be trivially quantified. The idea here is to promote the rate of convergence as a suitable metric quantifying the inductivity/resistivity of the network. For the network dynamics in (3), the rate of convergence of the solutions is determined by the ratio r` . The more inductive the lines are, the slower the rate of convergence is. Now, we seek for a similar property in (4). Notice that the solutions of (3) are damped with corresponding eigenvalues of L−1 R. Throughout the paper, we assume the following property: Assumption 1 The eigenvalues of the matrix L−1 R are all positive and real. Now, let the weight matrix Γ be specified as −1 Γ = diag(γ) := diag(τ1−1 , τ2−1 , · · · , τm ). (2) We can rewrite (1) as [17] rIe + `I˙e = ΓB T V. Hence, rBIe + `B I˙e = BΓB T V, and rI + `I˙ = LV , (3) where I := BIe is the vector of nodal current injections. The matrix L = BΓB T is the Laplacian matrix of the graph G(V, E, Γ) with the weight matrix Γ. Note that, as the network (3) is homogeneous, its inductivity behavior is simply determined by the ratio r` . However, clearly, network homogeneity will be lost once the output impedances are augmented to the network. This makes the problem of determining network inductivity nontrivial and challenging. To cope with the heterogeneity resulting from the addition of the output impedances, we need to depart from the homogeneous form (3), and develop new means to assess the network inductivity. To this end, we consider the more general representation RI + LI˙ = LVo , (4) It will be shown that Assumption 1 is satisfied for all the cases considered in this paper. Figure 2 sketches the behavior of homogeneous solutions of (4). Among all the solutions, we choose the fastest one as our measure for inductivity, and the slowest one for resistivity of the network. Opting for these worst case scenarios allows us to guarantee a prescribed inductivity or resistivity ratio by proper design of output impedances. These choices are formalized in the following definitions. Definition 1 Let I(t, I0 ) denote the homogeneous solution of (4) for an initial condition I0 ∈ im B. Let the set ML ⊆ R+ be given by ML := {σ ∈ R+ | ∃µ s.t. kI(t, I0 )k ≥ µe−σt kI0 k, ∀t ∈ R+ , ∀I0 ∈ im B}. Then we define the Network Inductivity Ratio (NIR) as ΨNIR := 1 . inf(ML )  3 Definition 2 Let I(t, I0 ) denote the homogeneous solution of (4) for an initial condition I0 ∈ im B. Let the set MR ⊆ R+ be given by MR := {σ ∈ R+ | ∃µ s.t. kI(t, I0 )k ≤ µe−σt kI0 k, ∀t ∈ R+ , ∀I0 ∈ im B}. We define the Network Resistivity Ratio (NRR) as Fig. 3. The injected currents at the nodes of the original graph pass through the added output impedance. ΨNRR := sup(MR ).  Note that the set ML is bounded from below and MR is bounded from above by definition and Assumption 1. Interestingly, in case of the homogeneous network (3), i.e. without output impedances, we have ΨNIR = r` and ΨNRR = r` , which are natural measures to reflect the inductivity and resistivity of an RL homogeneous network. III. C ALCULATING THE N ETWORK I NDUCTIVITY /R ESISTIVITY M EASURE (ΨNIR /ΨNRR ) In this section, based on Definitions 1 and 2, we compute the network inductivity/resistivity ratio for both cases of uniform and nonuniform output impedances. where λ2 is the algebraic connectivity1 of the graph G(V, E, Γ). Proof: The homogeneous solution is −1 I(t) = e−(ro L+rI)(`o L+`I) V = Vo − ro I − `o I˙ . −1 = Ue−(ro Λ+rI)(`o Λ+`I) h √1 1 n i − Ũ e Theorem 1 Consider a homogeneous network (3) with the resistance per length unit r and inductance per length unit `. Suppose that an output resistance ro and an output inductance `o are attached in series to each node. Assume that r`oo < r` . Then the network inductivity ratio is given by ΨNIR `o λ2 + ` = , ro λ2 + r (7)  0 " # t √1 1T Λ̃ n I0 , Ũ T ro λn +r where Λ̃ = diag{ r`oo λλ22 +r +` , · · · , `o λn +` }. Noting that U is unitary and by the Kirchhoff Law, 1T I0 = 0, we have n−1 X I(t) = Ũe−Λ̃t Ũ T I0 = ( e−λ̃i t Ũi ŨiT )( i=1 = n−1 X n−1 X αi Ũi ) i=1 αi e−λ̃i t Ũi , i=1 where Ũi denotes the ith column of Ũ, and we used again 1T I0 = 0 to write I0 as the linear combination I0 = (6) where I ∈ Rn×n denotes the identity matrix, and L is the Laplacian matrix of G as before. In view of equation (4), the matrices R and L are given by R = ro L + rI and L = `o L + `I, respectively. As both matrices are positive definite, the eigenvalues of the product L−1 R are all positive and real, see [18, Ch. 7]. Hence, Assumption 1 is satisfied. To calculate the measure ΨNIR for the inductivity of the resulting network, we investigate the convergence rates of the homogeneous solution of (6). This brings us to the following theorem: U T I0 0(n−1)×1 Having (3) and (5), the overall network can be described as (ro L + rI)I + (`o L + `I)I˙ = LVo , t r `  = (5) I0 . The Laplacian matrix can be decomposed as L = U T ΛU. Here, U is the matrix of eigenvectors and Λ = diag{λ1 , λ2 , · · · , λn } where λ1 < λ2 < · · · < λn are the eigenvalues of the matrix L. Note that λ1 = 0. We have −1 −U (ro Λ+rI)U T U (`o Λ+`I)U T t I0 I(t) = e A. Uniform Output Impedances In most cases of practical interest, the output impedance consists of both inductive and resistive elements. We investigate the effect of the addition of such output impedances on the network inductivity ratio. The change in network resistivity ratio can be studied similarly, and thus is omitted here. Consider the uniform output impedances with the inductive part `o and the resistive component ro (in series), added to the network (3). Note that the injected currents I now pass through the output impedances, as shown in Figure 3. Clearly, we have t n−1 X αi Ũi . i=1 Hence kI(t)k2 = n−1 X αi2 e−2λ̃i t . (8) i=1 Having ro `o < r` , it is straightforward to see that ro λi + r ro λ2 + r ≥ , ∀i . `o λ2 + ` `o λi + ` Pn−1 and bearing in mind that kI0 k2 = i=1 αi2 , we conclude that ro λ2 +r kI(t)k≥ e− `o λ2 +` t kI0 k , (9) `o λ2 +` ro λ2 +r . which yields ΨNIR = Note that (9) holds with equality in case I0 belongs to the span of the corresponding 1 The algebraic connectivity of either a directed or an undirected graph G is defined as the second smallest eigenvalue of the Laplacian matrix throughout the paper. Note that the smallest eigenvalue is 0. 4 eigenvector of the second smallest eigenvalue of the Laplacian matrix L. This completes the proof. Theorem 1 provides a compact and easily computable expression which quantifies the network inductivity behavior. Moreover, the expression (7) is an easy-to-use measure that can be exploited to choose the output impedances in order to impose a desired degree of inductivity on the network. The only information required is the line parameters r, and `, and the algebraic connectivity of the network; see [19] and [20] for more details on algebraic connectivity and its lower and upper bounds in various graphs. Remark 1 Algebraic connectivity is a measure of connectivity of the weighted graph G, which depends on both the density of the edges and the weights (inverse of the lines lengths). Hence, Theorem 1 reveals the fact that: “The more connected the network is, the more the output impedance diffuses into the network.”.  Remark 2 In case be given by ro `o > r` , the network inductivity ratio will ΨNIR = `o λmax + ` , ro λmax + r where λmax is the largest eigenvalue of the Laplacian matrix of G. Furthermore, if r`oo = r` , then Λ̃ = r` I and ΨNIR = r` . However, the condition r`oo < r` assumed in Theorem 1 is more relevant since the resistance ro of the inductive output impedance is typically small.  Remark 3 In case, the resistance part of the output impedance is negligible, i.e ro = 0, the network inductivity ratio reduces to `o λ2 + ` ΨNIR = , r  1) Case Study: Identical Line Lengths Recall that the notion of network inductivity ratio allows us to quantify the inductivity behavior of the network, while the model (6), in general, cannot be synthesized with RL elements only. A notable special case where the model (6) can be realized with RL elements is a complete graph with identical line lengths. Although such case is improbable in practice, it provides an example to assess the validity and credibility of the introduced measures. Interestingly, ΨNIR matches precisely the inductance to resistance ratio of the lines of the synthesized network in this case: Theorem 2 Consider a network with a uniform complete graph where all the edges have the length τ . Suppose that the lines have inductance `e ∈ R and resistance re ∈ R. Attach an output inductance `o in series with a resistance ro to each node. Then the model of the augmented graph can be equivalently synthesized by a new RL network with identical lines, each with inductance `c := n`o + `e and resistance rc := nro + re , where n denotes the number of nodes. Furthermore, the resulting network inductivity ratio ΨNIR is equal to r`cc . Proof: The nodal injected currents satisfy rI + `I˙ = LV. In this network, r = rτe , ` = `τe , and L = nτ Π where Π := I − n1 11T . Hence, re I + `e I˙ = nΠV . (10) By appending the output impedance we have V = Vo − ro I − ˙ Hence (10) modifies to `o I. (nro Π + re I)I + (n`o Π + `e I)I˙ = nΠVo , which results in As mentioned in Section I, in low-voltage microgrids where the lines are dominantly resistive, the inverse-droop method is employed. In this case, a purely resistive output impedance is of advantage [21]. Corollary 1 Consider a homogeneous distribution network with the resistance per length unit r, inductance per length unit `, and output inductors `o . Then the network resistivity ratio is given by ro λ2 + r , ` where λ2 is the algebraic connectivity of the graph G(V, E, Γ). ΨNRR = Proof: The proof can be constructed in an analogous way to the proof of Theorem 1 and is therefore omitted. Remark 4 The algebraic connectivity of the network can be estimated through distributed methods [22], [23]. Furthermore, line parameters (resistance and inductance) can be identified through PMUs (Phase Measurement Units) [24] [25] [26]. Therefore, our proposed measure can be calculated in a distributed manner.  (n`o Π + `e I)−1 (nro Π + re I)I + I˙ = n(n`o Π + `e I)−1 ΠVo . `o 1 T `e +n`o I + `e (`e +n`o ) 11 , we obtain (nro Π + re I)I + (n`o + `e )I˙ = nΠVo , (11) Since (n`o Π+`e I)−1 = where we used 1T I = 0 and 1T Π = 0. Similarly we have I + `c (nro Π + re I)−1 I˙ = n(nro Π + re I)−1 ΠVo , and hence rc I + `c I˙ = nΠVo . This equation is analogous to (10) and corresponds to a uniform complete graph with identical line resistance rc = nro + re and inductance `c = n`o + `e . Note that the algebraic connectivity of the weighted Laplacian L is nτ . By Theorem 1, the inductivity ratio is then computed as n `o + ` `c ΨNIR = nτ = . rc τ ro + r 5 2) Case Study: Constant Current Loads ℓ1 So far, we have considered loads which are connected via power converters. The same definitions and results can be extended to the case of loads modeled with constant current sinks. Consider the graph G(V, E, Γ) divided into source (S) and load nodes (L), and decompose the Laplacian matrix accordingly as   LSS LSL L= . LLS LLL γ1 ℓ1 γ5 ℓ5 γ5 ℓ1 γ1 γ 5 ℓ2 γ6 ℓ5 γ2 γ4 γ7 γ2 ℓ3 γ4 ℓ5 ℓ3 γ3 ℓ4 γ3 ℓ3 ℓ4 We have rIS + `I˙S = LSS VS + LSL VL rIL + `I˙L = LLS VS + LLL VL . (12) −rIL∗ = LLS VS + LLL VL , and therefore (14) Substituting (14) into (12) yields ∗ rIS + `I˙S = Lred VS − rLSL L−1 LL IL . Here the Scur complement Lred = LSS − LSL L−1 LL LLS is again a Laplacian matrix known as the Kron-reduced Laplacian [27], [28]. Bearing in mind that VG = Vo − `o I˙S − ro IS , the system becomes (rI + ro Lred )IS + (`I+`o Lred )I˙S ∗ = Lred Vo − rLSL L−1 LL IL , Fig. 4. Output inductances appear as weights in the corresponding directed graph, with the Laplacian DL. (13) Suppose that the load nodes are attached to constant current loads IL = −IL∗ . Then from (13) we obtain −1 ∗ −rL−1 LL IL − LLL LLS VS = VL . (15) and one can repeat the same analysis as above working with Lred instead of L. Note that (15) matches the model (4) with the difference of a constant. As this constant term does not affect the homogeneous solution, the network inductivity and resistivity ratios are obtained analogously as before, where the algebraic connectivity is computed based on the Kron reduced Laplacian.  1 Theorem 3 Consider a homogeneous network with the resistance per length unit r, inductance per length unit `, edge lengths τ1 , · · · , τn , and output inductors `o1 , `o2 , · · · , `on . Then the network inductivity ratio is given by ΨNIR = In this section we investigate the case where output inductances with different magnitudes are connected to the network, and we quantify the network inductivity ratio ΨNIR under this non-uniform addition. The case with non-uniform resistances can be treated in an analogous manner. For the sake of simplicity, throughout this subsection, we consider the case where the resistive parts of the output impedances are negligible (see Remark 5 for relaxing this assumption). Let D = diag(`o1 , `o2 , · · · , `on ), where `oi is the (nonzero) output inductance connected to the node i. We have ˙ V = Vo − DI, and hence rI + (`I + LD)I˙ = LVo . 1 Note that LD is similar to D 2 LD 2 and therefore has nonnegative real eigenvalues. In view of equation (4), here R = rI and L = `I +LD. Hence, the matrix L−1 R possesses positive real eigenvalues, and Assumption 1 holds. The matrix LD is also similar to DL, which can be interpreted as the (asymmetric) Laplacian matrix of a directed connected graph noted by Ĝ(V, Ê, Γ̂) with the same nodes as the original graph V = {1, ..., n}, but with directed edges Ê ⊂ V × V. As shown in Figure 4, in this representation, for any (i, j) ∈ Ê, there exists a directed edge from node i to −1 −1 node j with the weight `oi τij (recall that τij is the weight of the edge {i, j} ∈ E of the original graph G). Hence, the weight matrix Γ̂ ∈ R2m×2m is the diagonal matrix with the −1 weights `oi τij on its diagonal. Note that the edge set Ê is symmetric in the sense that (i, j) ∈ Ê ⇔ (j, i) ∈ Ê, and its cardinality is equal to 2m. We take advantage of this graph to obtain the network inductivity ratio ΨNIR , as formalized in the following theorem. B. Non-uniform Output Impedances rI + `I˙ = LV, γ2 ℓ2 γ7 ℓ5 γ4 ℓ4 γ3 γ1 ℓ2 γ6 ℓ3 γ6 ℓ1 γ7 ℓ3 (16) λ2 + ` , r where λ2 is the algebraic connectivity of the graph Ĝ(V, Ê, Γ̂) defined above. 1 1 Proof: Let L0 = D 2 LD 2 . The homogeneous solution to (16) is −1 I(t) = e−r(`I+LD) =D − 21 1 e 1 −rD 2 t I0 1 (`I+LD)−1 D − 2 t 0 −1 = D− 2 e−r(`I+L ) t 1 D 2 I0 1 D 2 I0 . Note that L0 is positive semi-definite and thus `I + L0 is invertible. Bearing in mind that 0 is an eigenvalue of the matrix L0 with the corresponding normalized eigenvector 6 1 1 U1 = (1T D−1 1)− 2 D− 2 1, and by the spectral decomposition L0 = UΛU T , we find that −1 T 1 t 12 I(t) = D− 2 e−r U (`I+Λ)U D I0 −1 1 = D− 2 Ue−r(`I+Λ)   1  = D− 2 U1 Ũ e −r  t 1 U T D 2 I0 1 ` � 12 � • ....-t .2:: 10 � u  0    t 1 U1T 0(n−1)×1 Λ̃ D 2 I0 , Ũ T � 8 0 � u 6 • ....-t u 4 ,..Q 2 coH <l.) where Λ̃ = diag{ λ21+` , λ31+` , · · · , λn1+` } and 0 < λ2 < λ3 < · · · < λn are nonzero eigenvalues of the matrix L0 . Let ˜ = D 12 I(t). Noting that by the Kirchhoff Law, 1T I0 = 0, I(t) we have � 0 6 4 £02 2 0 ˜ = Ũe−rΛ̃t Ũ T I˜0 . I(t) Since U1T I˜0 = 0 we can write I˜0 as the linear combination I˜0 = ŨX, X ∈ R(n−1)×1 . Now we have ˜ = Ũe−rΛ̃t X, I(t) b.O � 2 ˜ kI(t)k = X T e−2rΛ̃t X . Hence 2r 2 ˜ kI(t)k ≥ e− λ2 +` t kI˜0 k2 , 1 0 3 2 4 5 £01 Fig. 5. Algebraic connectivity of the directed graph associated with the Laplacian DL, where L isP the Laplacian of the star graph shown in dark blue. The budget constraint is i `oi = c = 5mH. On the right, the algebraic connectivity is plotted as a function of `o1 and `o2 for different values of `o4 . Note that `o3 = c − `o1 − `o2 − `o4 . On the left, all the four subplots are merged. Clearly, the optimal algebraic connectivity is achieved where no output impedance is used for node 4 (the middle node), and `o1 = 2.20mH, `o2 = 1.23mH, `o3 = 1.57mH are used for nodes 1, 2, and 3 respectively. 2r I T (t)DI(t) ≥ e− λ2 +` t I0T DI0 , r kI(t)k ≥ µe− λ2 +` t kI0 k, where s µ := mini (`oi ) . maxi (`oi ) This yields ΨNIR = λ2r+` . Note that the eigenvalues of L0 and DL are the same. This completes the proof. Remark 5 The results of Theorem 3 can be generalized to the case of non-uniform output impedances, each containing a nonzero resistor ro and a nonzero inductor `o in series. In this case, the network can be modeled by (rI + LDr )I + (`I + LD` )I˙ = LVo , where Dr := diag(ro1 , ro2 , · · · , ron ) and D` := diag(`o1 , `o2 , · · · , `on ). Analogously to the proof of Theorem 3, it can be shown that the network inductivity ratio is calculated as λ`i + ` , ΨNIR = min i∈{2,3,··· ,n} λri + r where λ`i denotes the ith eigenvalue of the matrix LD` , and λ`1 = 0. Similarly, λri denotes the ith eigenvalue of the matrix LDr , and λr1 = 0.  Remark 6 Exploiting the results of [29], bearing in mind that L and D are both positive semi-definite matrices, we have λ2 (L) min `oi ≤ λ2 (DL) ≤ λ2 (L) max `oi . i i (17) These bounds can be used to ensure that the network inductivity ratio lies within certain values, without explicitly calculating the algebraic connectivity of the directed graph associated with the Laplacian DL.  Optimizing the network inductivity ratio: The results proposed can be also exploited to maximize the diffusion of output impedances into the network. This can be achieved by an optimal distribution of the inductors among the sources such that the network inductivity ratio is maximized. Below is an example illustrating this point on a network with a star topology. Another example using Kron reduction and phasors will be provided in Section IV. Example 1 Consider the graph G with the Laplacian L, consisting of four nodes in a star topology. The line lengths are 5pu, 7pu, and 9pu, as depicted in Figure 5. Note that here again, the weights of the edges are the inverse of the distances. Attach the output impedances D = diag{`o1 , `o2 , `o3 , `o4 } to each inverter, and assume that we have limited resources of inductors, namely 2 X `oi = c, c ∈ R+ . (18) i Figure 5 shows different values of the second smallest eigenvalue of the matrix DL. We obtain that the maximal algebraic connectivity is achieved when no output impedance is used (wasted) for the node in the middle. Interestingly, the optimal value of output inductor for each node is proportional to its distance to the middle node. IV. K RON R EDUCTION IN P HASOR D OMAIN AND THE N ETWORK I NDUCTIVITY R ATIO By leveraging Kron reduction and using the phasor domain, it is sometimes possible to synthesize an RL circuit for the augmented network model (4) (see [30] for more details). 2 Note that the budget constraint (18) can also be used to reflect any disadvantage resulting from a large output impedance, e.g. the voltage drop. 7 /2 5 /12 /3 /4 35 40 45 50 0 5 10 15 20 25 30 35 40 45 50 1 500 ft 5 Im(1/Yredij ) θij := arctan Re(1/Yredij ) for the line {i, j}, to the phase angles suggested by ΨNIR , namely (20) Note that the term ω in the above is included to obtain reactance to resistance ratio from inductance to resistance ratio. Example 2 Line angles of a Kron-reduced Graph with uniform output impedances. (a) Consider a 4-node complete graph with different distribution line lengths. As shown in Figure 7a, the proposed measure matches with the overall behavior of the line angles as the added output inductance increases. (b) Consider a 4node uniform path graph. Figure 7b shows that the least inductivity behavior is observed for the virtual lines. Hence the less virtual lines the reduced graph contains, the more output impedance diffuses in the network, which is consistent with Remark 1. Also note that the inductance and resistance possess negative values at some edges for certain values of the output impedance. Therefore, it is difficult to extract a reasonable inductivity ratio for those edges from the Kron reduced phasor model. On the contrary, the proposed inductivity measure remains within the physically valid interval arctan(ωΨNIR ) ∈ [0 π/2]. 3 4 2000 ft 6 300 ft 2 300 ft (19) Since every path between the outer nodes of the graph passes only through internal nodes (see Figure 6), the resulting Kronreduced network is a complete graph [31]. In the following example, we compare the line phase angles θNIR := arctan(ωΨNIR ) . 30 Fig. 7. (a) Complete graph. The initial phase angle of the lines is π4 and the line lengths are the following 4 cases (from top to bottom): [τ12 , τ13 , τ14 , τ23 , τ24 , τ34 ]= [5, 6, 9, 7, 4, 6]; [20, 19, 20, 21, 20, 22]; [40, 37, 35, 49, 46, 38]; [100, 105, 93, 87, 110, 89]; (b) Path graph. Virtual lines are shown by dots. The initial phase angle of the lines is π4 and the line lengths are equal to 5. 1 . r + jω` The Kron-reduced model is then obtained as y` Yred = yo [I − (I + L)−1 ] . yo 25 500 ft y` = 20 500 ft 1 , jω`o 15 300 ft yo = 10 GRID where 5 /2 /3 /6 0 - /6 Fig. 6. Kron reduction of an arbitrary graph with added output impedances. As depicted in Figure 6, in the Kron reduced graph some of the edges coincide with the lines of the original network into which the output impedances were diffused, while others (dotted green) are created as a result of the Kron reduction. We refer to the former as physical and to the latter as virtual lines. To derive the Kron-reduced model, we first write the nodal currents as      I yo I −yo I Vo = , 0 −yo I yo I + y` L V 0 7 9 1000 ft 800 ft 10 8 Fig. 8. Schematic of the islanded IEEE 13 node test feeder graph. Power sources are connected to the (green) nodes 1, 3, and 7. Example 2 shows that θNIR can be used as a measure that estimates the phase of the lines of the overall network. A desired amount of change in this measure can be optimized by appropriate choices of output impedances. The following example illustrates this case. Example 3 Output impedance optimization on the IEEE 13 node test feeder. Figure 8 depicts the graph of the islanded IEEE 13 node test feeder. Here, all the distribution lines are assumed to Ω have the same reactance per length equal to ω` = 1.2 mile Ω and resistance per length equal to r = 0.7 mile , derived from the configuration 602 [32]. We consider the case where three inverters are connected to the nodes 1, 3, and 7, and the rest of the nodes are connected to constant current loads. After carrying out Kron reduction, the algebraic connectivity of the resulting Laplacian matrix is equal to 3.1. Before adding the 2π output inductances, θNIR is equal to arctan ω` r = 3 . Based on the results of Theorem 1, for a 10% increase in θNIR , a uniform inductor of 3.21mH should be attached to the outputs of all the sources. However, in case non-uniform output inductors are to be used, by using the result of Theorem 3, the same increase in the network inductivity ratio can be achieved (optimally) with 0.95mH, 0.95mH, and 4.35mH inductors, for the nodes 1, 3, and 7 respectively. Both cases are feasible in practice 8 since the typical values for inverter output filter inductance and implemented output virtual inductance range from 0.5mH to 50mH [3], [6], [9], [10], [15], [33]–[35]. However, note that the total inductance used in the (optimal) non-uniform case is considerably smaller than the one used in the uniform scheme. V. C ONCLUSION In this paper, the influence of the output impedance on the inductivity and resistivity of the distribution lines has been investigated. Two measures, network inductivity ratio and network resistivity ratio, were proposed and analyzed without relying on the ideal sinusoidal signals assumption (phasors). The analysis revealed the fact that the more connected the graph is, the more output impedance diffuses into the network and the larger its effect will be. We have provided examples on how the impact of inductive output impedances on the network can be maximized in specific network topologies. We compared the proposed measure to the phase angles of the lines in a phasor-based Kron reduced network. Results confirm the validity and the effectiveness of the proposed metrics. Future works include investigating analytical solutions on maximizing the network inductivity/resistivity ratios, and incorporating different load models in the proposed scheme. R EFERENCES [1] J. M. Guerrero, L. G. De Vicuna, J. Matas, M. Castilla, and J. Miret, “Output impedance design of parallel-connected ups inverters with wireless load-sharing control,” IEEE Transactions on industrial electronics, vol. 52, no. 4, pp. 1126–1135, 2005. [2] J. M. Guerrero, J. Matas, L. G. D. V. De Vicuna, M. Castilla, and J. Miret, “Wireless-control strategy for parallel operation of distributedgeneration inverters,” IEEE Transactions on Industrial Electronics, vol. 53, no. 5, pp. 1461–1470, 2006. [3] J. M. Guerrero, J. Matas, L. G. de Vicuna, M. Castilla, and J. Miret, “Decentralized control for parallel operation of distributed generation inverters using resistive output impedance,” IEEE Transactions on industrial electronics, vol. 54, no. 2, pp. 994–1004, 2007. [4] J. M. Guerrero, J. C. Vasquez, J. Matas, M. Castilla, and L. G. de Vicuña, “Control strategy for flexible microgrid based on parallel line-interactive ups systems,” IEEE Transactions on Industrial Electronics, vol. 56, no. 3, pp. 726–736, 2009. [5] J. Guerrero, P. Loh, M. Chandorkar, and T. Lee, “Advanced control architectures for intelligent microgrids - Part I: Decentralized and hierarchical control,” IEEE Transactions Industrial Electronics, no. 99, pp. 1–1, 2013. [6] Y. W. Li and C. N. Kao, “An accurate power control strategy for powerelectronics-interfaced distributed generation units operating in a lowvoltage multibus microgrid,” IEEE Transactions on Power Electronics, vol. 24, no. 12, pp. 2977–2988, Dec 2009. [7] H. Mahmood, D. Michaelson, and J. Jiang, “Accurate reactive power sharing in an islanded microgrid using adaptive virtual impedances,” IEEE Transactions on Power Electronics, vol. 30, no. 3, pp. 1605–1617, March 2015. [8] R. Moslemi, J. Mohammadpour, and A. Mesbahi, “A modified droop control for reactive power sharing in large microgrids with meshed topology,” in 2016 American Control Conference (ACC), July 2016, pp. 6779–6784. [9] K. D. Brabandere, B. Bolsens, J. V. den Keybus, A. Woyte, J. Driesen, and R. Belmans, “A voltage and frequency droop control method for parallel inverters,” IEEE Transactions on Power Electronics, vol. 22, no. 4, pp. 1107–1115, July 2007. [10] J. Matas, M. Castilla, L. G. d. Vicua, J. Miret, and J. C. Vasquez, “Virtual impedance loop for droop-controlled single-phase parallel inverters using a second-order general-integrator scheme,” IEEE Transactions on Power Electronics, vol. 25, no. 12, pp. 2993–3002, Dec 2010. [11] S. J. Chiang, C. Y. Yen, and K. T. Chang, “A multimodule parallelable series-connected PWM voltage regulator,” IEEE Transactions on Industrial Electronics, vol. 48, no. 3, pp. 506–516, Jun 2001. [12] J. Guerrero, L. Hang, and J. Uceda, “Control of distributed uninterruptible power supply systems,” Industrial Electronics, IEEE Transactions on, vol. 55, no. 8, pp. 2845–2859, Aug 2008. [13] W. Yao, M. Chen, J. Matas, J. M. Guerrero, and Z. M. Qian, “Design and analysis of the droop control method for parallel inverters considering the impact of the complex impedance on the power sharing,” IEEE Transactions on Industrial Electronics, vol. 58, no. 2, pp. 576–588, Feb 2011. [14] D. M. Vilathgamuwa, P. C. Loh, and Y. Li, “Protection of microgrids during utility voltage sags,” IEEE Transactions on Industrial Electronics, vol. 53, no. 5, pp. 1427–1436, Oct 2006. [15] J. Kim, J. M. Guerrero, P. Rodriguez, R. Teodorescu, and K. Nam, “Mode adaptive droop control with virtual output impedances for an inverter-based flexible AC microgrid,” IEEE Transactions on Power Electronics, vol. 26, no. 3, pp. 689–701, March 2011. [16] A. Teixeira, K. Paridari, H. Sandberg, and K. H. Johansson, “Voltage control for interconnected microgrids under adversarial actions,” in 2015 IEEE 20th Conference on Emerging Technologies & Factory Automation (ETFA). IEEE, 2015, pp. 1–8. [17] S. Y. Caliskan and P. Tabuada, “Towards kron reduction of generalized electrical networks,” Automatica, vol. 50, no. 10, pp. 2586 – 2590, 2014. [18] R. A. Horn and C. R. Johnson, Matrix Analysis. Cambridge university press, 2012. [19] B. Mohar, “Laplace eigenvalues of graphs - a survey,” Discrete Mathematics, vol. 109, no. 13, pp. 171 – 183, 1992. [20] N. M. M. De Abreu, “Old and new results on algebraic connectivity of graphs,” Linear algebra and its applications, vol. 423, no. 1, pp. 53–73, 2007. [21] J. M. Guerrero, J. Matas, L. G. de Vicuna, M. Castilla, and J. Miret, “Decentralized control for parallel operation of distributed generation inverters using resistive output impedance,” IEEE Transactions on Industrial Electronics, vol. 54, no. 2, pp. 994–1004, April 2007. [22] M. Franceschelli, A. Gasparri, A. Giua, and C. Seatzu, “Decentralized Laplacian eigenvalues estimation for networked multi-agent systems,” in Decision and Control, 2009 held jointly with the 2009 28th Chinese Control Conference. CDC/CCC 2009. Proceedings of the 48th IEEE Conference on, Dec 2009, pp. 2717–2722. [23] P. D. Lorenzo and S. Barbarossa, “Distributed estimation and control of algebraic connectivity over random graphs,” IEEE Transactions on Signal Processing, vol. 62, no. 21, pp. 5615–5628, Nov 2014. [24] X. Zhao, H. Zhou, D. Shi, H. Zhao, C. Jing, and C. Jones, “On-line PMU-based transmission line parameter identification,” CSEE Journal of Power and Energy Systems, vol. 1, no. 2, pp. 68–74, June 2015. [25] Y. Du and Y. Liao, “On-line estimation of transmission line parameters, temperature and sag using PMU measurements,” Electric Power Systems Research, vol. 93, pp. 39 – 45, 2012. [26] D. Shi, D. J. Tylavsky, K. M. Koellner, N. Logic, and D. E. Wheeler, “Transmission line parameter identification using PMU measurements,” European Transactions on Electrical Power, vol. 21, no. 4, pp. 1574– 1588, 2011. [27] G. Kron, Tensor Analysis of Networks, 1939. [28] A. van der Schaft, “Characterization and partial synthesis of the behavior of resistive circuits at their terminals,” Systems & Control Letters, vol. 59, no. 7, pp. 423 – 428, 2010. [29] J. K. Merikoski and R. Kumar, “Inequalities for spreads of matrix sums and products,” in Applied Mathematics E-Notes, 4:150 159, 2004. [30] E. I. Verriest and J. C. Willems, “The behavior of linear time invariant RLC circuits,” in 49th IEEE Conference on Decision and Control (CDC), Dec 2010, pp. 7754–7758. [31] F. Dörfler and F. Bullo, “Kron reduction of graphs with applications to electrical networks,” IEEE Transactions on Circuits and Systems I: Regular Papers, vol. 60, no. 1, pp. 150–163, Jan 2013. [32] Distribution System Analysis Subcommittee, “IEEE 13 Node Test Feeder,” IEEE Power Engineering Society, Power System Analysis, Computing and Economics Committee. [33] J. He and Y. W. Li, “Generalized closed-loop control schemes with embedded virtual impedances for voltage source converters with LC or LCL filters,” IEEE Transactions on Power Electronics, vol. 27, no. 4, pp. 1850–1861, April 2012. [34] J. M. Guerrero, J. C. Vasquez, J. Matas, L. G. de Vicuna, and M. Castilla, “Hierarchical control of droop-controlled AC and DC microgrids; a general approach toward standardization,” IEEE Transactions on Industrial Electronics, vol. 58, no. 1, pp. 158–172, Jan 2011. [35] Y. A. R. I. Mohamed and E. F. El-Saadany, “Adaptive decentralized droop controller to preserve power sharing stability of paralleled inverters in distributed generation microgrids,” IEEE Transactions on Power Electronics, vol. 23, no. 6, pp. 2806–2816, Nov 2008.
3cs.SY
arXiv:1511.07147v2 [cs.LG] 2 Sep 2016 A PAC Approach to Application-Specific Algorithm Selection∗ Rishi Gupta Tim Roughgarden Stanford University [email protected] Stanford University [email protected] Abstract The best algorithm for a computational problem generally depends on the “relevant inputs,” a concept that depends on the application domain and often defies formal articulation. While there is a large literature on empirical approaches to selecting the best algorithm for a given application domain, there has been surprisingly little theoretical analysis of the problem. This paper adapts concepts from statistical and online learning theory to reason about application-specific algorithm selection. Our models capture several state-of-the-art empirical and theoretical approaches to the problem, ranging from self-improving algorithms to empirical performance models, and our results identify conditions under which these approaches are guaranteed to perform well. We present one framework that models algorithm selection as a statistical learning problem, and our work here shows that dimension notions from statistical learning theory, historically used to measure the complexity of classes of binary- and real-valued functions, are relevant in a much broader algorithmic context. We also study the online version of the algorithm selection problem, and give possibility and impossibility results for the existence of no-regret learning algorithms. 1 Introduction Rigorously comparing algorithms is hard. The most basic reason for this is that two different algorithms for a computational problem generally have incomparable performance: one algorithm is better on some inputs, but worse on the others. How can a theory advocate one of the algorithms over the other? The simplest and most common solution in the theoretical analysis of algorithms is to summarize the performance of an algorithm using a single number, such as its worst-case performance or its average-case performance with respect to an input distribution. This approach effectively advocates using the algorithm with the best summarizing value (e.g., the smallest worstcase running time). Solving a problem “in practice” generally means identifying an algorithm that works well for most or all instances of interest. When the “instances of interest” are easy to specify formally in advance — say, planar graphs — the traditional analysis approaches often give accurate performance predictions and identify useful algorithms. However, instances of interest commonly possess domain-specific features that defy formal articulation. Solving a problem in practice can require ∗ A preliminary version of this paper appeared in the Proceedings of the 7th Innovations in Theoretical Computer Science Conference, January 2016. This research was supported in part by NSF Awards CCF-1215965 and CCF1524062. 1 selecting an algorithm that is optimized for the specific application domain, even though the special structure of its instances is not well understood. While there is a large literature, spanning numerous communities, on empirical approaches to algorithm selection (e.g. [13, 18, 16, 17, 22, 24]), there has been surprisingly little theoretical analysis of the problem. One possible explanation is that worst-case analysis, which is the dominant algorithm analysis paradigm in theoretical computer science, is deliberately application-agnostic. This paper demonstrates that application-specific algorithm selection can be usefully modeled as a learning problem. Our models are straightforward to understand, but also expressive enough to capture several existing approaches in the theoretical computer science and AI communities, ranging from the design and analysis of self-improving algorithms [1] to the application of empirical performance models [18]. We present one framework that models algorithm selection as a statistical learning problem in the spirit of Haussler [15]. We prove that many useful families of algorithms, including broad classes of greedy and local search heuristics, have small pseudo-dimension and hence low generalization error. Previously, the pseudo-dimension (and the VC dimension, fat shattering dimension, etc.) has been used almost exclusively to quantify the complexity of classes of prediction functions (e.g. [15, 2]).1 Our results demonstrate that this concept is useful and relevant in a much broader algorithmic context. It also offers a novel approach to formalizing the oft-mentioned but rarelydefined “simplicity” of a family of algorithms. We also study regret-minimization in the online version of the algorithm selection problem. We show that the “non-Lipschitz” behavior of natural algorithm classes precludes learning algorithms that have no regret in the worst case, and prove positive results under smoothed analysis-type assumptions. Paper Organization Section 2 outlines a number of concrete problems that motivate the present work, ranging from greedy heuristics to SAT solvers, and from self-improving algorithms to parameter tuning. The reader interested solely in the technical development can skip this section with little loss. Section 3 models the task of determining the best application-specific algorithm as a PAC learning problem, and brings the machinery of statistical learning theory to bear on a wide class of problems, including greedy heuristic selection, sorting, and gradient descent step size selection. A time-limited reader can glean the gist of our contributions from Sections 3.1–3.3.3. Section 4 considers the problem of learning an application-specific algorithm online, with the goal of minimizing regret. Sections 4.2 and 4.3 present negative and positive results for worst-case and smoothed instances, respectively. Section 5 concludes with a number of open research directions. 2 Motivating Scenarios Our learning framework sheds light on several well-known approaches, spanning disparate application domains, to the problem of learning a good algorithm from data. To motivate and provide interpretations of our results, we describe several of these in detail. 1 A few exceptions: Srebro and Ben-David [32] use the pseudo-dimension to study the problem of learning a good kernel for use in a support vector machine, Long [26] parameterizes the performance of the randomized rounding of packing and covering linear programs by the pseudo-dimension of a set derived from the constraint matrix, and Mohri and Medina [28] and Morgenstern and Roughgarden [29] use dimension notions from learning theory to bound the sample complexity of learning approximately revenue-maximizing truthful auctions. 2 2.1 Example #1: Greedy Heuristic Selection One of the most common and also most challenging motivations for algorithm selection is presented by computationally difficult optimization problems. When the available computing resources are inadequate to solve such a problem exactly, heuristic algorithms must be used. For most hard problems, our understanding of when different heuristics work well remains primitive. For concreteness, we describe one current and high-stakes example of this issue, which also aligns well with our model and results in Section 3.3. The computing and operations research literature has many similar examples. The FCC is currently (in 2016) running a novel double auction to buy back licenses for spectrum from certain television broadcasters and resell them to telecommunication companies for wireless broadband use. The auction is expected to generate over $20 billion dollars for the US government [7]. The “reverse” (i.e., buyback) phase of the auction must determine which stations to buy out (and what to pay them). The auction is tasked with buying out sufficiently many stations so that the remaining stations (who keep their licenses) can be “repacked” into a small number of channels, leaving a target number of channels free to be repurposed for wireless broadband. To first order, the feasible repackings are determined by interference constraints between stations. Computing a repacking therefore resembles familiar hard combinatorial problems like the independent set and graph coloring problems. The reverse auction uses a greedy heuristic to compute the order in which stations are removed from the reverse auction (removal means the station keeps its license) [27]. The chosen heuristic favors stations with high value, and discriminates against stations that interfere with a large number of other stations.2 There are many ways of combining these two criteria, and no obvious reason to favor one specific implementation over another. The specific implementation in the FCC auction has been justified through trial-and-error experiments using synthetic instances that are thought to be representative [27]. One interpretation of our results in Section 3.3 is as a post hoc justification of this exhaustive approach for sufficiently simple classes of algorithms, including the greedy heuristics considered for this FCC auction. 2.2 Example #2: Self-Improving Algorithms The area of self-improving algorithms was initiated by Ailon et al.[1], who considered sorting and clustering problems. Subsequent work [11, 9, 10] studied several problems in low-dimensional geometry, including the maxima and convex hull problems. For a given problem, the goal is to design an algorithm that, given a sequence of i.i.d. samples from an unknown distribution over instances, converges to the optimal algorithm for that distribution. In addition, the algorithm should use only a small amount of auxiliary space. For example, for sorting independently distributed array entries, the algorithm in Ailon et al.[1] solves each instance (on n numbers) in O(n log n) time, uses space O(n1+c ) (where c > 0 is an arbitrarily small constant), and after a polynomial number of samples has expected running time within a constant factor of that of an information-theoretically optimal algorithm for the unknown input distribution. Section 3.4 reinterprets self-improving algorithms via our general framework. 2 Analogously, greedy heuristics for the maximum-weight independent set problem favor vertices with higher weights and with lower degrees [30]. Greedy heuristics for welfare maximization in combinatorial auctions prefer bidders with higher values and smaller demanded bundles [23]. 3 2.3 Example #3: Parameter Tuning in Optimization and Machine Learning Many “algorithms” used in practice are really meta-algorithms, with a large number of free parameters that need to be instantiated by the user. For instance, implementing even in the most basic version of gradient descent requires choosing a step size and error tolerance. For a more extreme version, CPLEX, a widely-used commercial linear and integer programming solver, comes with a 221-page parameter reference manual describing 135 parameters [34]. An analogous problem in machine learning is “hyperparameter optimization,” where the goal is to tune the parameters of a learning algorithm so that it learns (from training data) a model with high accuracy on test data, and in particular a model that does not overfit the training data. A simple example is regularized regression, such as ridge regression, where a single parameter governs the trade-off between the accuracy of the learned model on training data and its “complexity.” More sophisticated learning algorithms can have many more parameters. Figuring out the “right” parameter values is notoriously challenging in practice. The CPLEX manual simply advises that “you may need to experiment with them.” In machine learning, parameters are often set by discretizing and then applying brute-force search (a.k.a. “grid search”), perhaps with random subsampling (“random search”) [4]. When this is computationally infeasible, variants of gradient descent are often used to explore the parameter space, with no guarantee of converging to a global optimum. The results in Section 3.6 can be interpreted as a sample complexity analysis of grid search for the problem of choosing the step size in gradient descent to minimize the expected number of iterations needed for convergence. We view this as a first step toward reasoning more generally about the problem of learning good parameters for machine learning algorithms. 2.4 Example #4: Empirical Performance Models for SAT Algorithms The examples above already motivate selecting an algorithm for a problem based on characteristics of the application domain. A more ambitious and refined approach is to select an algorithm on a per-instance (instead of a per-domain) basis. While it’s impossible to memorize the best algorithm for every possible instance, one might hope to use coarse features of a problem instance as a guide to which algorithm is likely to work well. For example, Xu et al. [33] applied this idea to the satisfiability (SAT) problem. Their algorithm portfolio consisted of seven state-of-the-art SAT solvers with incomparable and widely varying running times across different instances. The authors identified a number of instance features, ranging from simple features like input size and clause/variable ratio, to complex features like Knuth’s estimate of the search tree size [21] and the rate of progress of local search probes.3 The next step involved building an “empirical performance model” (EPM) for each of the seven algorithms in the portfolio — a mapping from instance feature vectors to running time predictions. They then computed their EPMs using labeled training data and a suitable regression model. With the EPMs in hand, it is clear how to perform per-instance algorithm selection: given an instance, compute its features, use the EPMs to predict the running time of each algorithm in the portfolio, and run the algorithm with the smallest predicted running time. Using these ideas (and several optimizations), their “SATzilla” algorithm won numerous medals at the 2007 SAT Competition.4 3 4 It is important, of course, that computing the features of an instance is an easier problem than solving it. See Xu et al. [35] for details on the latest generation of their solver. 4 Section 3.5 outlines how to extend our PAC learning framework to reason about EPMs and featurebased algorithm selection. 3 PAC Learning an Application-Specific Algorithm This section casts the problem of selecting the best algorithm for a poorly understood application domain as one of learning the optimal algorithm with respect to an unknown instance distribution. Section 3.1 formally defines the basic model, Section 3.2 reviews relevant preliminaries from statistical learning theory, Section 3.3 bounds the pseudo-dimension of many classes of greedy and local search heuristics, Section 3.4 re-interprets the theory of self-improving algorithms via our framework, Section 3.5 extends the basic model to capture empirical performance models and feature-based algorithm selection, and Section 3.6 studies step size selection in gradient descent. 3.1 The Basic Model Our basic model consists of the following ingredients. 1. A fixed computational or optimization problem Π. For example, Π could be computing a maximum-weight independent set of a graph (Section 2.1), or sorting n elements (Section 2.2). 2. An unknown distribution D over instances x ∈ Π. 3. A set A of algorithms for Π; see Sections 3.3 and 3.4 for concrete examples. 4. A performance measure cost : A×Π → [0, H] indicating the performance of a given algorithm on a given instance. Two common choices for cost are the running time of an algorithm, and, for optimization problems, the objective function value of the solution produced by an algorithm. The “application-specific information” is encoded by the unknown input distribution D, and the corresponding “application-specific optimal algorithm” AD is the algorithm that minimizes or maximizes (as appropriate) Ex∈D [cost(A, x)] over A ∈ A. The error of an algorithm A ∈ A for a distribution D is Ex∼D [cost(A, x)] − Ex∼D [cost(AD , x)] . In our basic model, the goal is: Learn the application-specific optimal algorithm from data (i.e., samples from D). More precisely, the learning algorithm is given m i.i.d. samples x1 , . . . , xm ∈ Π from D, and (perhaps implicitly) the corresponding performance cost(A, xi ) of each algorithm A ∈ A on each input xi . The learning algorithm uses this information to suggest an algorithm  ∈ A to use on future inputs drawn from D. We seek learning algorithms that almost always output an algorithm of A that performs almost as well as the optimal algorithm in A for D. Definition 3.1 A learning algorithm L (, δ)-learns the optimal algorithm in A from m samples if, for every distribution D over Π, with probability at least 1 − δ over m samples x1 , . . . , xm ∼ D, L outputs an algorithm  ∈ A with error at most . 5 3.2 Pseudo-Dimension and Uniform Convergence PAC learning an optimal algorithm, in the sense of Definition 3.1, reduces to bounding the “complexity” of the class A of algorithms. We next review the relevant definitions from statistical learning theory. Let H denote a set of real-valued functions defined on the set X. A finite subset S = {x1 , . . . , xm } of X is (pseudo-)shattered by H if there exist real-valued witnesses r1 , . . . , rm such that, for each of the 2m subsets T of S, there exists a function h ∈ H such that h(xi ) > ri if and only if i ∈ T (for i = 1, 2, . . . , m). The pseudo-dimension of H is the cardinality of the largest subset shattered by H (or +∞, if arbitrarily large finite subsets are shattered by H). The pseudo-dimension is a natural extension of the VC dimension from binary-valued to real-valued functions.5 To bound the sample complexity of accurately estimating the expectation of all functions in H, with respect to an arbitrary probability distribution D on X, it is enough to bound the pseudodimension of H. Theorem 3.2 (Uniform Convergence (e.g. [2])) Let H be a class of functions with domain X and range in [0, H], and suppose H has pseudo-dimension dH . For every distribution D over X, every  > 0, and every δ ∈ (0, 1], if  m≥c H    2  1 dH + ln δ (1) for a suitable constant c (independent of all other parameters), then with probability at least 1 − δ over m samples x1 , . . . , xm ∼ D, ! m 1 X h(xi ) − Ex∼D [h(x)] <  m i=1 for every h ∈ H. We can identify each algorithm A ∈ A with the real-valued function x 7→ cost(A, x). Regarding the class A of algorithms as a set of real-valued functions defined on Π, we can discuss its pseudodimension, as defined above. We need one more definition before we can apply our machinery to learn algorithms from A. Definition 3.3 (Empirical Risk Minimization (ERM)) Fix an optimization problem Π, a performance measure cost, and a set of algorithms A. An algorithm L is an ERM algorithm if, given any finite subset S of Π, L returns an (arbitrary) algorithm from A with the best average performance on S. For example, for any Π, cost, and finite A, there is the trivial ERM algorithm that simply computes the average performance of each algorithm on S by brute force, and returns the best one. The next corollary follows easily from Definition 3.1, Theorem 3.2, and Definition 3.3. 5 The fat shattering dimension is another common extension of the VC dimension to real-valued functions. It is a weaker condition, in that the fat shattering dimension of H is always at most the pseudo-dimension of H, that is still sufficient for sample complexity bounds. Most of our arguments give the same upper bounds on pseudo-dimension and fat shattering dimension, so we present the stronger statements. 6 Corollary 3.4 Fix parameters  > 0, δ ∈ (0, 1], a set of problem instances Π, and a performance measure cost. Let A be a set of algorithms that has pseudo-dimension d with respect to Π and cost. Then any ERM algorithm (2, δ)-learns the optimal algorithm in A from m samples, where m is defined as in (1). Corollary 3.4 is only interesting if interesting classes of algorithms A have small pseudodimension. In the simple case where A is finite, as in our example of an algorithm portfolio for SAT (Section 2.4), the pseudo-dimension of A is trivially at most log2 |A|. The following sections demonstrate the much less obvious fact that natural infinite classes of algorithms also have small pseudo-dimension. Remark 3.5 (Computational Efficiency) The present work focuses on the sample complexity rather than the computational aspects of learning, so outside of a few remarks we won’t say much about the existence or efficiency of ERM in our examples. A priori, an infinite class of algorithms may not admit any ERM algorithm at all, though all of the examples in this paper do have ERM algorithms under mild assumptions. 3.3 Application: Greedy Heuristics and Extensions The goal of this section is to bound the pseudo-dimension of many classes of greedy heuristics including, as a special case, the family of heuristics relevant for the FCC double auction described in Section 2.1. It will be evident that analogous computations are possible for many other classes of heuristics, and we provide several extensions in Section 3.3.4 to illustrate this point. Throughout this section, the performance measure cost is the objective function value of the solution produced by a heuristic on an instance, where we assume without loss of generality a maximization objective. 3.3.1 Definitions and Examples Our general definitions are motivated by greedy heuristics for (N P -hard) problems like the following; the reader will have no difficulty coming up with additional natural examples. 1. Knapsack. The input is n items with values v1 , . . . , vn , sizes s1 , . . . , sn , and a knapsack capacity C. The goal is to compute P a subset S ⊆ {1, 2, . . . , n} with maximum total value P i∈S si at most C. Two natural greedy heuristics are i∈S vi , subject to having total size to greedily pack items (subject to feasibility) in order of nonincreasing value vi , or in order of nonincreasing density vi /si (or to take the better of the two, see Section 3.3.4). 2. Maximum-Weight Independent Set (MWIS). The input is an undirected graph G = (V, E) and a non-negative weight wv for each vertex v ∈ V . The goal is to compute the independent set — a subset of mutually non-adjacent vertices — with maximum total weight. Two natural greedy heuristics are to greedily choose vertices (subject to feasibility) in order of nonincreasing weight wv , or nonincreasing density wv /(1 + deg(v)). (The intuition for the denominator is that choosing v “uses up” 1+deg(v) vertices — v and all of its neighbors.) The latter heuristic also has a (superior) adaptive variant, where the degree deg(v) is computed in the subgraph induced by the vertices not yet blocked from consideration, rather than in the original graph.6 6 An equivalent description is: whenever a vertex v is added to the independent set, delete v and its neighbors from the graph, and recurse on the remaining graph. 7 3. Machine Scheduling. This is a family of optimization problems, where n jobs with various attributes (processing time, weight, deadline, etc.) need to be assigned to m machines, perhaps subject to some constraints (precedence constraints, deadlines, etc.), to optimize some objective (makespan, weighted sum of completion times, number of late jobs, etc.). A typical greedy heuristic for such a problem considers jobs in some order according to a score derived from the job parameters (e.g., weight divided by processing time), subject to feasibility, and always assigns the current job to the machine that currently has the lightest load (again, subject to feasibility). In general, we consider object assignment problems, where the input is a set of n objects with various attributes, and the feasible solutions consist of assignments of the objects to a finite set R, subject to feasibility constraints. The attributes of an object are represented as an element ξ of an abstract set. For example, in the Knapsack problem ξ encodes the value and size of an object; in the MWIS problem, ξ encodes the weight and (original or residual) degree of a vertex. In the Knapsack and MWIS problems, R = {0, 1}, indicating whether or not a given object is selected. In machine scheduling problems, R could be {1, 2, . . . , m}, indicating the machine to which a job is assigned, or a richer set that also keeps track of the job ordering on each machine. By a greedy heuristic, we mean algorithms of the following form (cf., the “priority algorithms” of Borodin et al. [5]): 1. While there remain unassigned objects: (a) Use a scoring rule σ (see below) to compute a score σ(ξi ) for each unassigned object i, as a function of its current attributes ξi . (b) For the unassigned object i with the highest score, use an assignment rule to assign i a value from R and, if necessary, update the attributes of the other unassigned objects.7 For concreteness, assume that ties are always resolved lexicographically. A scoring rule assigns a real number to an object as a function of its attributes. Assignment rules that do not modify objects’ attributes yield non-adaptive greedy heuristics, which use only the original attributes of each object (like vi or vi /si in the Knapsack problem, for instance). In this case, objects’ scores can be computed in advance of the main loop of the greedy heuristic. Assignment rules that modify object attributes yield adaptive greedy heuristics, such as the adaptive MWIS heuristic described above. In a single-parameter family of scoring rules, there is a scoring rule of the form σ(ρ, ξ) for each parameter value ρ in some interval I ⊆ R. Moreover, σ is assumed to be continuous in ρ for each fixed value of ξ. Natural examples include Knapsack scoring rules of the form vi /sρi and MWIS scoring rules of the form wv /(1 + deg(v))ρ for ρ ∈ [0, 1] or ρ ∈ [0, ∞). A single-parameter family of scoring rules is κ-crossing if, for each distinct pair of attributes ξ, ξ 0 , there are at most κ values of ρ for which σ(ρ, ξ) = σ(ρ, ξ 0 ). For example, all of the scoring rules mentioned above are 1-crossing rules. For an example assignment rule, in the Knapsack and MWIS problems, the rule simply assigns i to “1” if it is feasible to do so, and to “0” otherwise. A typical machine scheduling assignment rule assigns the current job to the machine with the lightest load. In the adaptive greedy heuristic 7 We assume that there is always as least one choice of assignment that respects the feasibility constraints; this holds for all of our motivating examples. 8 for the MWIS problem, whenever the assignment rule assigns “1” to a vertex v, it updates the residual degrees of other unassigned vertices (two hops away) accordingly. We call an assignment rule β-bounded if every object i is guaranteed to take on at most β distinct attribute values. For example, an assignment rule that never modifies an object’s attributes is 1bounded. The assignment rule in the adaptive MWIS algorithm is n-bounded, since it only modifies the degree of a vertex (which lies in {0, 1, 2 . . . , n − 1}). Coupling a single-parameter family of κ-crossing scoring rules with a fixed β-bounded assignment rule yields a (κ, β)-single-parameter family of greedy heuristics. All of our running examples of greedy heuristics are (1, 1)-single-parameter families, except for the adaptive MWIS heuristic, which is a (1, n)-single-parameter family. 3.3.2 Upper Bound on Pseudo-Dimension We next show that every (κ, β)-single-parameter family of greedy heuristics has small pseudodimension. This result applies to all of the concrete examples mentioned above, and it is easy to come up with other examples (for the problems already discussed, and for additional problems). Theorem 3.6 (Pseudo-Dimension of Greedy Algorithms) If A denotes a (κ, β)-single-parameter family of greedy heuristics for an object assignment problem with n objects, then the pseudodimension of A is O(log(κβn)). In particular, all of our running examples are classes of heuristics with pseudo-dimension O(log n). Proof: Recall from the definitions (Section 3.2) that we need to upper bound the size of every set that is shatterable using the greedy heuristics in A. For us, a set is a fixed set of s inputs (each with n objects) S = x1 , . . . , xs . For a potential witness r1 , . . . , rs ∈ R, every algorithm A ∈ A induces a binary labeling of each sample xi , according to whether cost(A, xi ) is strictly more than or at most ri . We proceed to bound from above the number of distinct binary labellings of S induced by the algorithms of A, for any potential witness. Consider ranging over algorithms A ∈ A — equivalently, over parameter values ρ ∈ I. The trajectory of a greedy heuristic A ∈ A is uniquely determined by the outcome of the comparisons between the current scores of the unassigned objects in each iteration of the algorithm. Since the family uses a κ-crossing scoring rule, for every pair i, j of distinct objects and possible attributes ξi , ξj , there are at most κ values of ρ for which there is a tie between the score of i (with attributes ξi ) and that of j (with attributes ξj ). Since σ is continuous in ρ, the relative order of the score of i (with ξi ) and j (with ξj ) remains the same in the open interval between two successive values of ρ at which their scores are tied. The upshot is that we can partition I into at most κ + 1 intervals such that the outcome of the comparison between i (with attributes ξi ) and j (with attributes ξj ) is constant on each interval.8 Next, the s instances of S contain a total of sn objects. Each of these objects has some initial attributes. Because the assignment rule is β-bounded, there are at most snβ object-attribute pairs (i, ξi ) that could possibly arise in the execution of any algorithm from A on any instance of S. This implies that, ranging across all algorithms of A on all inputs in S, comparisons are only ever 8 This argument assumes that ξi 6= ξj . If ξi = ξj , then because we break ties between equal scores lexicographically, the outcome of the comparison between σ(ξi ) and σ(ξj ) is in fact constant on the entire interval I of parameter values. 9 made between at most (snβ)2 pairs of object-attribute pairs (i.e., between an object i with current attributes ξi and an object j with current attributes ξj ). We call these the relevant comparisons. For each relevant comparison, we can partition I into at most κ + 1 subintervals such that the comparison outcome is constant (in ρ) in each subinterval. Intersecting the partitions of all of the at most (snβ)2 relevant comparisons splits I into at most (snβ)2 κ + 1 subintervals such that every relevant comparison is constant in each subinterval. That is, all of the algorithms of A that correspond to the parameter values ρ in such a subinterval execute identically on every input in S. The number of binary labellings of S induced by algorithms of A is trivially at most the number of such subintervals. Our upper bound (snβ)2 κ + 1 on the number of subintervals exceeds 2s , the requisite number of labellings to shatter S, only if s = O(log(κβn)).  Theorem 3.6 and Corollary 3.4 imply that, if κ and β are bounded above by a polynomial in n, 2 then an ERM algorithm (, δ)-learns the optimal algorithm in A from only m = Õ( H2 ) samples,9 where H is the largest objective function value of a feasible solution output by an algorithm of A on an instance of Π.10 We note that Theorem 3.6 gives a quantifiable sense in which natural greedy algorithms are indeed “simple algorithms.” Not all classes of algorithms have such a small pseudo-dimension; see also the next section for further discussion.11 Remark 3.7 (Non-Lipschitzness) We noted in Section 3.2 that the pseudo-dimension of a finite set A is always at most log2 |A|. This suggests a simple discretization approach to learning the best algorithm from A: take a finite “-net” of A and learn the best algorithm in the finite net. (Indeed, Section 3.6 uses precisely this approach.) The issue is that without some kind of Lipschitz condition — stating that “nearby” algorithms in A have approximately the same performance on all instances — there’s no reason to believe that the best algorithm in the net is almost as good as the best algorithm from all of A. Two different greedy heuristics — two MWIS greedy algorithms with arbitrarily close ρ-values, say — can have completely different executions on an instance. This lack of a Lipschitz property explains why we take care in Theorem 3.6 to bound the pseudo-dimension of the full infinite set of greedy heuristics.12 3.3.3 Computational Considerations The proof of Theorem 3.6 also demonstrates the presence of an efficient ERM algorithm: the O((snβ)2 ) relevant comparisons are easy to identify, the corresponding subintervals induced by each are easy to compute (under mild assumptions on the scoring rule), and brute-force search can be used to pick the best of the resulting O((snβ)2 κ) algorithms (an arbitrary one from each subinterval). This algorithm runs in polynomial time as long as β and κ are polynomial in n, and every algorithm of A runs in polynomial time. 9 The notation Õ(·) suppresses logarithmic factors. Alternatively, the dependence of m on H can be removed if learning error H (rather than ) can be tolerated — for example, if the optimal objective function value is expected to be proportional to H anyways. 11 When the performance measure cost is solution quality, as in this section, one cannot identify “simplicity” with “low pseudo-dimension” without caveats: strictly speaking, the set A containing only the optimal algorithm for the problem has pseudo-dimension 1. When the problem Π is N P -hard and A consists only of polynomial-time algorithms (and assuming P 6= N P ), the pseudo-dimension is a potentially relevant complexity measure for the heuristics in A. 12 The -net approach has the potential to work for greedy algorithms that choose the next object using a softmaxtype rule, rather than deterministically as the unassigned object with the highest score. 10 10 For example, for the family of Knapsack scoring rules described above, implementing this ERM algorithm reduces to comparing the outputs of O(n2 m) different greedy heuristics (on each of the m sampled inputs), with m = O(log n). For the adaptive MWIS heuristics, where β = n, it is enough to compare the sample performance of O(n4 m) different greedy algorithms, with m = O(log n). 3.3.4 Extensions: Multiple Algorithms, Multiple Parameters, and Local Search Theorem 3.6 is robust and its proof is easily modified to accommodate various extensions. For a first example, consider algorithms than run q different members of a single-parameter greedy heuristic family and return the best of the q feasible solutions obtained.13 Extending the proof of Theorem 3.6 yields a pseudo-dimension bound of O(q log(κβn)) for the class of all such algorithms. For a second example, consider families of greedy heuristics parameterized by d real-valued parameters ρ1 , . . . , ρd . Here, an analog of Theorem 3.6 holds with the crossing number κ replaced by a more complicated parameter — essentially, the number of connected components of the co-zero set of the difference of two scoring functions (with ξ, ξ 0 fixed and variables ρ1 , . . . , ρd ). This number can often be bounded (by a function exponential in d) in natural cases, for example using Bézout’s theorem (see e.g. [14]). For a final extension, we sketch how to adapt the definitions and results of this section from greedy to local search heuristics. The input is again an object assignment problem (see Section 3.3.1), along with an initial feasible solution (i.e., an assignment of objects to R, subject to feasibility constraints). By a k-swap local search heuristic, we mean algorithms of the following form: 1. Start with arbitrary feasible solution. 2. While the current solution is not locally optimal: (a) Use a scoring rule σ to compute a score σ({ξi : i ∈ K}) for each set of objects K of size k, where ξi is the current attribute of object i. (b) For the set K with the highest score, use an assignment rule to re-assign each i ∈ K to a value from R. If necessary, update the attributes of the appropriate objects. (Again, assume that ties are resolved lexicographically.) We assume that the assignment rule maintains feasibility, so that we have a feasible assignment at the end of each execution of the loop. We also assume that the scoring and assignment rules ensure that the algorithm terminates, e.g. via the existence of a global objective function that decreases at every iteration (or by incorporating timeouts). A canonical example of a k-swap local search heuristic is the k-OPT heuristic for the traveling salesman problem (TSP)14 (see e.g. [20]). We can view TSP as an object assignment problem, where the objects are edges and R = {0, 1}; the feasibility constraint is that the edges assigned to 1 should form a tour. Recall that a local move in k-OPT consists of swapping out k edges from the current tour and swapping in k edges to obtain a new tour. (So in our terminology, k-OPT is a 2k-swap local search heuristic.) Another well-known example is the local search algorithms for the 13 For example, the classical 12 -approximation for Knapsack has this form (with q = 2). Given a complete undirected graph with a cost cuv for each edge (u, v), compute a tour (visiting each vertex exactly once) that minimizes the sum of the edge costs. 14 11 p-median problem studied in Arya et al. [3], which are parameterized by the number of medians that can be removed and added in each local move. Analogous local search algorithms make sense for the MWIS problem as well. Scoring and assignment rules are now defined on subsets of k objects, rather than individual objects. A single-parameter family of scoring rules is now called κ-crossing if, for every subset K of 0 , there are at most κ values of ρ at most k objects and each distinct pair of attribute sets ξK and ξK 0 ). An assignment rule is now β-bounded if for every subset K of at most for which σ(ρ, ξK ) = σ(ρ, ξK k objects, ranging over all possible trajectories of the local search heuristic, the attribute set of K takes on at most β distinct values. For example, in MWIS, suppose we allow two vertices u, v to be removed and two vertices y, z to be added in a single local move, and we use the single-parameter scoring rule family wy wu wv wz σρ (u, v, y, z) = + − − . ρ ρ ρ (1 + deg(u)) (1 + deg(v)) (1 + deg(y)) (1 + deg(z))ρ Here deg(v) could refer to the degree of vertex v in original graph, to the number of neighbors of v that do not have any neighbors other than v in the current independent set, etc. In any case, since a generalized Dirichlet polynomial with t terms has at most t − 1 zeroes (see e.g. [19, Corollary 3.2]), this is a 3-crossing family. The natural assignment rule is n4 -bounded.15 By replacing the number n of objects by the number O(nk ) of subsets of at most k objects in the proof of Theorem 3.6, we obtain the following. Theorem 3.8 (Pseudo-Dimension of Local Search Algorithms) If A denotes a (κ, β)-singleparameter family of k-swap local search heuristics for an object assignment problem with n objects, then the pseudo-dimension of A is O(k log(κβn)). 3.4 Application: Self-Improving Algorithms Revisited We next give a new interpretation of the self-improving sorting algorithm of Ailon et al.[1]. Namely, we show that the main result in [1] effectively identifies a set of sorting algorithms that simultaneously has low representation error (for independently distributed array elements) and small pseudo-dimension (and hence low generalization error). Other constructions of self-improving algorithms [1, 11, 9, 10] can be likewise reinterpreted. In contrast to Section 3.3, here our performance measure cost is related to the running time of an algorithm A on an input x, which we want to minimize, rather than the objective function value of the output, which we wanted to maximize. Consider the problem of sorting n real numbers in the comparison model. By a bucket-based sorting algorithm, we mean an algorithm A for which there are “bucket boundaries” b1 < b2 < · · · < b` such that A first distributes the n input elements into their rightful buckets, and then sorts each bucket separately, concatenating the results. The degrees of freedom when defining such an algorithm are: (i) the choice of the bucket boundaries; (ii) the method used to distribute input elements to the buckets; and (iii) the method used to sort each bucket. The performance measure cost is the number of comparisons used by the algorithm.16 The key steps in the analysis in [1] can be reinterpreted as proving that this set of bucket-based sorting algorithms has low representation error, in the following sense. 15 In general, arbitrary local search algorithms can be made β-bounded through time-outs: if such an algorithm always halts within T iterations, then the corresponding assignment rule is T -bounded. 16 Devroye [12] studies similar families of sorting algorithms, with the goal of characterizing the expected running time as a function of the input distribution. 12 Theorem 3.9 ([1, Theorem 2.1]) Suppose that each array element ai is drawn independently from a distribution Di . Then there exists a bucket-based sorting algorithm with expected running time at most a constant factor times that of the optimal sorting algorithm for D1 × · · · × Dn . The proof in [1] establishes Theorem 3.9 even when the number ` of buckets is only n, each bucket is sorted using InsertionSort, and each element ai is distributed independently to its rightful bucket using a search tree stored in O(nc ) bits, where c > 0 is an arbitrary constant (and the running time depends on 1c ).17 Let Ac denote the set of all such bucket-based sorting algorithms. Theorem 3.9 reduces the task of learning a near-optimal sorting algorithm to the problem of (, δ)-learning the optimal algorithm from Ac . Corollary 3.4 reduces this learning problem to bounding the pseudo-dimension of Ac . We next prove such a bound, which effectively says that bucket-based sorting algorithms are “relatively simple” algorithms.18 Theorem 3.10 (Pseudo-Dimension of Bucket-Based Sorting Algorithms) The pseudo-dimension of Ac is O(n1+c ). Proof: Recall from the definitions (Section 3.2) that we need to upper bound the size of every set that is shatterable using the bucket-based sorting algorithms in Ac . For us, a set is a fixed set of s inputs (i.e., arrays of length n), S = x1 , . . . , xs . For a potential witness r1 , . . . , rs ∈ R, every algorithm A ∈ Ac induces a binary labeling of each sample xi , according to whether cost(A, xi ) is strictly more than or at most ri . We proceed to bound from above the number of distinct binary labellings of S induced by the algorithms of Ac , for any potential witness. By definition, an algorithm from Ac is fully specified by: (i) a choice of n bucket boundaries b1 < · · · < bn ; and (ii) for each i = 1, 2, . . . , n, a choice of a search tree Ti of size at most O(nc ) for placing xi in the correct bucket. Call two algorithms A, A0 ∈ Ac equivalent if their sets of bucket boundaries b1 , . . . , bn and b01 , . . . , b0n induce the same partition of the sn array elements of the inputs 0 i, j, k). The number of equivalence classes of in S — that is, if xij < bk if and only if xij  < bk (for all sn+n n this equivalence relation is at most n ≤ (sn+n) . Within an equivalence class, two algorithms that use structurally identical search trees will have identical performance on all s of the samples. Since the search trees of every algorithm of Ac are described by at most O(n1+c ) bits, ranging over 1+c the algorithms of a single equivalence class generates at most 2O(n ) distinct binary labellings of 1+c the s sample inputs. Ranging over all algorithms thus generates at most (sn+n)n 2O(n ) labellings. This exceeds 2s , the requisite number of labellings to shatter S, only if s = O(n1+c ).  2 Theorem 3.10 and Corollary 3.4 imply that m = Õ( H2 n1+c ) samples are enough to (, δ)-learn the optimal algorithm in Ac , where H can be taken as the ratio between the maximum and minimum running time of any algorithm in Ac on any instance.19 Since the minimum running time is Ω(n) and we can assume that the maximum running time is O(n log n) — if an algorithm exceeds this 17 For small c, each search tree Ti is so small that some searches will go unresolved; such unsuccessful searches are handled by a standard binary search over the buckets. 18 Not all sorting algorithms are simple in the sense of having polynomial pseudo-dimension. For example, the space lower bound in [1, Lemma 2.1] can be adapted to show that no class of sorting algorithms with polynomial pseudo-dimension (or fat shattering dimension) has low representation error in the sense of Theorem 3.9 for general distributions over sorting instances, where the array entries need not be independent. 19 We again use Õ(·) to suppress logarithmic factors. 13 bound, we can abort it and safely run MergeSort instead — we obtain a sample complexity bound of Õ(n1+c ).20 Remark 3.11 (Comparison to [1]) The sample complexity bound implicit in [1] for learning a near-optimal sorting algorithm is Õ(nc ), a linear factor better than the Õ(n1+c ) bound implied by Theorem 3.10. There is good reason for this: the pseudo-dimension bound of Theorem 3.10 implies that an even harder problem has sample complexity Õ(n1+c ), namely that of learning a near-optimal bucket-based sorting algorithm with respect to an arbitrary distribution over inputs, even with correlated array elements.21 The bound of Õ(nc ) in [1] applies only to the problem of learning a near-optimal bucket-based sorting algorithm for an unknown input distribution with independent array entries — the savings comes from the fact that all n near-optimal search trees T1 , . . . , Tn can be learned in parallel. 3.5 Application: Feature-Based Algorithm Selection Previous sections studied the problem of selecting a single algorithm for use in an application domain — of using training data to make an informed commitment to a single algorithm from a class A, which is then used on all future instances. A more refined and ambitious approach is to select an algorithm based both on previous experience and on the current instance to be solved. This approach assumes, as in the scenario in Section 2.4, that it is feasible to quickly compute some features of an instance and then to select an algorithm as a function of these features. Throughout this section, we augment the basic model of Section 3.1 with: 5. A set F of possible instance feature values, and a map f : X → F that computes the features of a given instance.22 For instance, if X is the set of SAT instances, then f (x) might encode the clause/variable ratio of the instance x, Knuth’s estimate of the search tree size [21], and so on. When the set F of possible instance feature values is finite, the guarantees for the basic model extend easily with a linear (in |F|) degradation in the pseudo-dimension.23 To explain, we add an additional ingredient to the model. 6. A set G of algorithm selection maps, with each g ∈ G a function from F to A. An algorithm selection map recommends an algorithm as a function of the features of an instance. We can view an algorithm selection map g as a real-valued function defined on the instance space X, with g(x) defined as cost(g(f (x)), x). That is, g(x) is the running time on x of the algorithm g(f (x)) advocated by g, given that x has features f (x). The basic model studied earlier 20 In the notation of Theorem 3.2, we are taking H = Θ(n log n),  = Θ(n), and using the fact that all quantities are Ω(n) to conclude that all running times are correctly estimated up to a constant factor. The results implicit in [1] are likewise for relative error. 21 When array elements are not independent, however, Theorem 3.9 fails and the best bucket-based sorting algorithm might be more than a constant-factor worse than the optimal sorting algorithm. 22 Defining a good feature set is a notoriously challenging and important problem, but it is beyond the scope of our model — we take the set F and map f as given. 23 For example, [33] first predicts whether or not a given SAT instance is satisfiable or not, and then uses a “conditional” empirical performance model to choose a SAT solver. This can be viewed as an example with |F | = 2, corresponding to the feature values “looks satisfiable” and “looks unsatisfiable.” 14 is the special case where G is the set of constant functions, which are in correspondence with the algorithms of A. Corollary 3.4 reduces bounding the sample complexity of (, δ)-learning the best algorithm selection map of G to bounding the pseudo-dimension of the set of real-valued functions induced by G. When G is finite, there is a trivial upper bound of log2 |G|. The pseudo-dimension is also small whenever F is small and the set A of algorithms has small pseudo-dimension.24 Proposition 3.12 (Pseudo-Dimension of Algorithm Selection Maps) If G is a set of algorithm selection maps from a finite set F to a set A of algorithms with pseudo-dimension d, then G has pseudo-dimension at most |F|d. Proof: A set of inputs of size |F|d + 1 is shattered only if there is a shattered set of inputs with identical features of size d + 1.  Now suppose F is very large (or infinite). We focus on the case where A is small enough that it is feasible to learn a separate performance prediction model for each algorithm A ∈ A (though see Remark 3.15). This is exactly the approach taken in the motivating example of empirical performance models (EPMs) for SAT described in Section 2.4. In this case, we augment the basic model to include a family of performance predictors. 6. A set P of performance predictors, with each p ∈ P a function from F to R. Performance predictors play the same role as the EPMs used in [33]. The goal is to learn, for each algorithm A ∈ A, among all permitted predictors p ∈ P, the one that minimizes some loss function. Like the performance measure cost, we take this loss function as given. The most commonly used loss function is squared error; in this case, for each A ∈ A we aim to compute the function that minimizes   Ex∼D (cost(A, x) − p(f (x)))2 over p ∈ P.25 For a fixed algorithm A, this is a standard regression problem, with domain F, realvalued labels, and a distribution on F × R induced by D via x 7→ (f (x), cost(A, x)). Bounding the sample complexity of this learning problem reduces to bounding the pseudo-dimension of P. For standard choices of P, such bounds are well known. For example, suppose the set P is the class of linear predictors, with each p ∈ P having the form p(f (x)) = aT f (x) for some coefficient vector a ∈ Rd .26 Proposition 3.13 (Pseudo-Dimension of Linear Predictors) If F contains real-valued d-dimensional features and P is the set of linear predictors, then the pseudo-dimension of P is at most d. 24 When G is the set of all maps from F to A and every feature value of F appears with approximately the same probability, one can alternatively just separately learn the best algorithm for each feature value. 25 Note that the expected loss incurred by the best predictor depends on the choices of the predictor set P, the feature set F, and map f . Again, these choices are outside our model. 26 A linear model might sound unreasonably simple for the task of predicting the running time of an algorithm, but significant complexity can be included in the feature map f (x). For example, each coordinate of f (x) could be a nonlinear combination of several “basic features” of x. Indeed, linear models often exhibit surprisingly good empirical performance, given a judicious choice of a feature set [24]. 15 If all functions in P map all possible ϕ to [0, H], then Proposition 3.13 and Corollary 3.4 imply a 4 sample complexity bound of Õ( H2 d) for (, δ)-learning the predictor with minimum expected square error. Similar results hold, with worse dependence on d, if P is a set of low-degree polynomials [2]. For another example, suppose P` is the set of regression trees with at most ` nodes, where each internal node performs an inequality test on a coordinate of the feature vector ϕ (and leaves are labeled with performance estimates).27 This class also has low pseudo-dimension, and hence the problem of learning a near-optimal predictor has correspondingly small sample complexity. Proposition 3.14 (Pseudo-Dimension of Regression Trees) Suppose F contains real-valued d-dimensional features and let P` be the set of regression trees with at most ` nodes, where each node performs an inequality test on one of the features. Then, the pseudo-dimension of P` is O(` log(`d)). Remark 3.15 (Extension to Large A) We can also extend our approach to scenarios with a large or infinite set A of possible algorithms. This extension is relevant to state-of-the-art empirical approaches to the auto-tuning of algorithms with many parameters, such as mathematical programming solvers [18]; see also the discussion in Section 2.3. (Instantiating all of the parameters yields a fixed algorithm; ranging over all possible parameter values yields the set A.) Analogous to our formalism for accommodating a large number of possible features, we now assume that there is a set F 0 of possible “algorithm feature values” and a mapping f 0 that computes the features of a given algorithm. A performance predictor is now a map from F × F 0 to R, taking as input the features of an algorithm A and of an instance x, and returning as output an estimate of A’s performance on x. If P is the set of linear predictors, for example, then by Proposition 3.13 its pseudo-dimension is d + d0 , where d and d0 denote the dimensions of F and F 0 , respectively. 3.6 Application: Choosing the Step Size in Gradient Descent For our last PAC example, we give sample complexity results for the problem of choosing the best step size in gradient descent. When gradient descent is used in practice, the step size is generally taken much larger than the upper limits suggested by theoretical guarantees, and often converges in many fewer iterations than with the step size suggested by theory. This motivates the problem of learning the step size from examples. We view this as a baby step towards reasoning more generally about the problem of learning good parameters for machine learning algorithms. Unlike the applications we’ve seen so far, the parameter space here satisfies a Lipschitz-like condition, and we can follow the discretization approach suggested in Remark 3.7. 3.6.1 Gradient Descent Preliminaries Recall the basic gradient descent algorithm for minimizing a function f given an initial point z0 over Rn : 1. Initialize z := z0 . 2. While k∇f (z)k2 > ν: 27 Regression trees, and random forests thereof, have emerged as a popular class of predictors in empirical work on application-specific algorithm selection [18]. 16 (a) z := z − ρ · ∇f (z). We take the error tolerance ν as given and focus on the more interesting parameter, the step size ρ. Bigger values of ρ have the potential to make more progress in each step, but run the risk of overshooting a minimum of f . We instantiate the basic model (Section 3.1) to study the problem of learning the best step size. There is an unknown distribution D over instances, where an instance x ∈ Π consists of a function f and an initial point z0 . Each algorithm Aρ of A is the basic gradient descent algorithm above, with some choice ρ of a step size drawn from some fixed interval [ρ` , ρu ] ⊂ (0, ∞). The performance measure cost(A, x) is the number of iterations (i.e., steps) taken by the algorithm for the instance x. To obtain positive results, we need to restrict the allowable functions f (see Appendix A). First, we assume that every function f is convex and L-smooth for a known L. A function f is L-smooth if it is everywhere differentiable, and k∇f (z1 ) − ∇f (z2 )k ≤ Lkz1 − z2 k for all z1 and z2 (all norms in this section are the `2 norm). Since gradient descent is translation invariant, and f is convex, we can assume for convenience that the (uniquely attained) minimum value of f is 0, with f (0) = 0. Second, we assume that the magnitudes of the initial points are bounded, with kz0 k ≤ Z for some known constant Z > ν. Third, we assume that there is a known constant c ∈ (0, 1) such that kz − ρ ∇f (z)k ≤ (1 − c)kzk for all ρ ∈ [ρ` , ρu ]. In other words, the norm of any point z — equivalently, the distance to the global minimum — decreases by some minimum factor after each gradient descent step. We refer to this as the guaranteed progress condition. This is satisfied (for instance) by L-smooth, m-strongly convex functions28 , which is a well studied regime (see e.g. [6]). The standard analysis of gradient descent implies that c ≥ ρm for ρ ≤ 2/(m + L) over this class of functions. Under these restrictions, we will be able to compute a nearly optimal ρ given a reasonable number of samples from D. Other Notation All norms in this section are `2 -norms. Unless otherwise stated, ρ means ρ restricted to [ρ` , ρu ], and z means z such that kzk ≤ Z. We let g(z, ρ) := z − ρ∇f (z) be the result of taking a single gradient descent step, and g j (z, ρ) be the result of taking j gradient descent steps. Typical textbook treatments of gradient descent assume ρ < 2/L or ρ ≤ 2/(m + L), which give various convergence and running time guarantees. The learning results of this section apply for any ρ, but this natural threshold will still appear in our analysis and results. Let D(ρ) := max{1, Lρ−1} denote how far ρ is from 2/L. Lastly, let H = log(ν/Z)/ log(1 − c). It is easy to check that cost(Aρ , x) ≤ H for all ρ and x. 3.6.2 A Lipschitz-like Bound on cost(Aρ , x) as a Function of ρ. This will be the bulk of the argument. Our first lemma shows that for fixed ρ, the gradient descent step g is a Lipschitz function of z, even when ρ is larger than 2/L. One might hope that the guaranteed progress condition would be enough to show that (say) g is a contraction, but the Lipschitzness of g actually comes from the L-smoothness. (It is not too hard to come up with non-smooth functions that make guaranteed progress, and where g is arbitrarily non-Lipschitz.) 28 A (continuously differentiable) function f is m-strongly convex if f (y) ≥ f (w) + ∇f (w)T (y − w) + m ky − wk2 for 2 all w, y ∈ Rn . The usual notion of convexity is the same as 0-strong convexity. Note that the definition of L-smooth implies m ≤ L. 17 Lemma 3.16 kg(w, ρ) − g(y, ρ)k ≤ D(ρ)kw − yk. Proof: For notational simplicity, let α = kw − yk and β = k∇f (w) − ∇f (y)k. Now, kg(w, ρ) − g(y, ρ)k2 = k(w − y) − ρ(∇f (w) − ∇f (y))k2 = α2 + ρ2 β 2 − 2ρhα, βi ≤ α2 + ρ2 β 2 − 2ρβ 2 /L = α2 + β 2 ρ(ρ − 2/L). The only inequality above is a restatement of a property of L-smooth functions called the cocoercivity of the gradient, namely that hα, βi ≥ β 2 /L. Now, if ρ ≤ 2/L, then ρ(ρ − 2/L) ≤ 0, and we’re done. Otherwise, L-smoothness implies β ≤ Lα, so the above is at most α2 (1 + Lρ(Lρ − 2)), which is the desired result.  The next lemma bounds how far two gradient descent paths can drift from each other, if they start at the same point. The main thing to note is that the right hand side goes to 0 as η becomes close to ρ. Lemma 3.17 For any z, j, and ρ ≤ η, kg j (z, ρ) − g j (z, η)k ≤ (η − ρ) D(ρ)j LZ . c Proof: We first bound kg(w, ρ) − g(y, η)k, for any w and y. We have g(w, ρ) − g(y, η) = [w − ρ∇f (w)] − [y − η∇f (y)] = g(w, ρ) − [g(y, ρ) − (η − ρ)∇f (y)] by definition of g. The triangle inequality and Lemma 3.16 then give kg(w, ρ) − g(y, η)k = kg(w, ρ) − g(y, ρ) + (η − ρ)∇f (y)k ≤ D(ρ) kw − yk + (η − ρ)k∇f (y)k. Plugging in w = g j (z, ρ) and y = g j (z, η), we have kg j+1 (z, ρ) − g j+1 (z, η)k ≤ D(ρ) kg j (z, ρ) − g j (z, η)k + (η − ρ)k∇f (g j (z, η))k for all j. Now, k∇f (g j (z, η))k ≤ Lkg j (z, η)k ≤ Lkzk(1 − c)j ≤ LZ(1 − c)j , where the first inequality is from L-smoothness, and the second is from the guaranteed progress condition. Letting rj = kg j (z, ρ) − g j (z, η)k, we now have the simple recurrence r0 = 0, and rj+1 ≤ D(ρ) rj + (η − ρ)LZ(1 − c)j . One can check via induction that rj+1 ≤ D(ρ)j (η − ρ)LZ j X (1 − c)i D(ρ)−i i=0 for all j. Recall that D(ρ) ≥ 1. Rounding D(ρ)−i up to 1 and doing the summation gives the desired result.  Finally, we show that cost(Aρ , x) is essentially Lipschitz in ρ. The “essentially” is necessary, since cost is integer-valued. 18 Lemma 3.18 |cost(Aρ , x) − cost(Aη , x)| ≤ 1 for all x, ρ, and η with 0 ≤ η − ρ ≤ νc2 −H . LZ D(ρ) Proof: Assume that cost(Aη , x) ≤ cost(Aρ , x); the argument in the other case is similar. Let j = cost(Aη , x), and recall that j ≤ H. By Lemma 3.17, kg j (x, ρ) − g j (x, η)k ≤ νc. Hence, by the triangle inequality, kg j (x, ρ)k ≤ νc + kg j (x, η)k ≤ νc + ν. Now, by the guaranteed progress condition, kwk − kg(w, p)k ≥ ckwk for all w. Since we only run a gradient descent step on w if kwk > ν, each step of gradient descent run by any algorithm in A drops the magnitude of w by at least νc. Setting w = g j (x, ρ), we see that either kg j (x, ρ)k ≤ ν, and cost(Aρ , x) = j, or that kg j+1 (x, ρ)k ≤ (νc + ν) − νc = ν, and cost(Aρ , x) = j + 1, as desired.  3.6.3 Learning the Best Step Size 2 −H . We can now apply the discretization approach suggested by Remark 3.7. Let K = νc LZ D(ρu ) 2 −H of Lemma 3.18 Note that since D is an increasing function, K is less than or equal to the νc LZ D(ρ) for every ρ. Let N be a minimal K-net, such as all integer multiples of K that lie in [ρ` , ρu ]. Note that |N | ≤ ρu /K + 1. We tie everything together in the theorem below.29 Theorem 3.19 (Learnability of Step Size in Gradient Descent) There is a learning algorithm that (1 + , δ)-learns the optimal algorithm in A using m = Õ(H 3 /2 ) samples from D.30 Proof: The pseudo-dimension of AN = {Aρ : ρ ∈ N } is at most log |N |, since AN is a finite set. Since AN is finite, it also trivially admits an ERM algorithm LN , and Corollary 3.4 implies that LN (, δ)-learns the optimal algorithm in AN using m = Õ(H 2 log |N |/2 ) samples. Now, Lemma 3.18 implies that for every ρ, there is a η ∈ N such that, for every distribution D, the difference in expected costs of Aη and Aρ is at most 1. Thus LN (1 + , δ)-learns the optimal algorithm in A using m = Õ(H 2 −2 log |N |) samples. Since log |N | = Õ(H), we get the desired result.  4 Online Learning of Application-Specific Algorithms This section studies the problem of learning the best application-specific algorithm online, with instances arriving one-by-one.31 The goal is choose an algorithm at each time step, before seeing the next instance, so that the average performance is close to that of the best fixed algorithm in hindsight. This contrasts with the statistical (or “batch”) learning setup used in Section 3, where the goal was to identify a single algorithm from a batch of training instances that generalizes well to future instances from the same distribution. For many of the motivating examples in Section 2, both the statistical and online learning approaches are relevant. The distribution-free online learning formalism of this section may be particularly appropriate when instances cannot be modeled as i.i.d. draws from an unknown distribution. 29 Alternatively, this guarantee can be phrased in terms of the fat-shattering dimension (see e.g. [2]). In particular, A has 1.001-fat shattering dimension at most log |N | = Õ(H). 30 We use Õ(·) to suppress logarithmic factors in Z/ν, c, L and ρu . 31 The online model is obviously relevant when training data arrives over time. Also, even with offline data sets that are very large, it can be computationally necessary to process training data in a one-pass, online fashion. 19 4.1 The Online Learning Model Our online learning model shares with the basic model of Section 3.1 a computational or optimization problem Π (e.g., MWIS), a set A of algorithms for Π (e.g., a single-parameter family of greedy heuristics), and a performance measure cost : A × Π → [0, 1] (e.g., the total weight of the returned solution).32 Rather than modeling the specifics of an application domain via an unknown distribution D over instances, however, we use an unknown instance sequence x1 , . . . , xT .33 A learning algorithm now outputs a sequence A1 , . . . , AT of algorithms, rather than a single algorithm. Each algorithm Ai is chosen (perhaps probabilistically) with knowledge only of the previous instances x1 , . . . , xi−1 . The standard goal in online learning is to choose A1 , . . . , AT to minimize the worst-case (over x1 , . . . , xT ) regret, defined as the average performance loss relative to the best algorithm A ∈ A in hindsight:34 ! T T X X 1 cost(A, xi ) − cost(Ai , xi ) . (2) sup T A∈A t=1 t=1 A no-regret learning algorithm has expected (over its coin tosses) regret o(1), as T → ∞, for every instance sequence. The design and analysis of no-regret online learning algorithms is a mature field (see e.g. [8]). For example, many no-regret online learning algorithms are known for the case of a finite set |A| (such as the “multiplicative weights” algorithm). 4.2 An Impossibility Result for Worst-Case Instances This section proves an impossibility result for no-regret online learning algorithms for the problem of application-specific algorithm selection. We show this for the running example in Section 3.3: maximum-weight independent set (MWIS) heuristics35 that, for some parameter ρ ∈ [0, 1], process the vertices in order of nonincreasing value of wv /(1 + deg(v))ρ . Let A denote the set of all such MWIS algorithms. Since A is an infinite set, standard no-regret results (for a finite number of actions) do not immediately apply. In online learning, infinite sets of options are normally controlled through a Lipschitz condition, stating that “nearby” actions always yield approximately the same performance; our set A does not possess such a Lipschitz property (recall Remark 3.7). The next section shows that these issues are not mere technicalities — there is enough complexity in the set A of MWIS heuristics to preclude a no-regret learning algorithm. 4.2.1 A Hard Example for MWIS We show a distribution over sequences of MWIS instances for which every (possibly randomized) algorithm has expected regret 1 − on (1). Here and for this rest of this section, by on (1) we mean a function that is independent of T and tends to 0 as the number of vertices n tends to infinity. Recall that cost(Aρ , x) is the total weight of the returned independent set, and we are trying to maximize this quantity. The key construction is the following: 32 One could also have cost take values in [0, H] rather than [0, 1], to parallel the PAC setting; we set H = 1 here since the dependence on H will not be interesting. 33 For simplicity, we assume that the time horizon T is known. This assumption can be removed by standard doubling techniques (e.g. [8]). 34 Without loss of generality, we assume cost corresponds to a maximization objective. 35 Section 3.3 defined adaptive and non-adaptive versions of the MWIS heuristic. All of the results in Section 4 apply to both, so we usually won’t distinguish between them. 20 Figure 1: A rough depiction of the MWIS example from Lemma 4.1. A B C size m2 − 2 m3 − 1 m2 + m + 1 weight tmr t tm−s deg m3 − 1 m2 − 1 m−1 weight/(deg+1)ρ tmr−3ρ tm−2ρ tm−s−ρ size × weight on (1) 1 on (1) Figure 2: Details and simple calculations for the vertex sets comprising the MWIS example from Lemma 4.1. Lemma 4.1 For any constants 0 < r < s < 1, there exists a MWIS instance x on at most n vertices such that cost(Aρ , x) = 1 when ρ ∈ (r, s), and cost(Aρ , x) = on (1) when ρ < r or ρ > s. Proof: Let A, B, and C be 3 sets of vertices of sizes m2 − 2, m3 − 1, and m2 + m + 1 respectively, such that their sum m3 + 2m2 + m is between n/2 and n. Let (A, B) be a complete bipartite graph. Let (B, C) also be a bipartite graph, with each vertex of B connected to exactly one vertex of C, and each vertex of C connected to exactly m − 1 vertices of B. See Figure 1. Now, set the weight of every vertex in A, B, and C to tmr , t, and tm−s ), respectively, for t = (m3 − 1)−1 . Figure 2 summarizes some straightforward calculations. We now calculate the cost of Aρ on this instance. If ρ < r, the algorithm Aρ first chooses a vertex in A, which immediately removes all of B, leaving at most A and C in the independent set. The total weight of A and C is on (1), so cost(Aρ ) is on (1). If ρ > s, the algorithm first chooses a vertex in C, which removes a small chunk of B. In the non-adaptive setting, Aρ simply continues choosing vertices of C until B is gone. In the adaptive setting, the degrees of the remaining elements of B never change, but the degrees of A decrease as we pick more and more elements of C. We eventually pick a vertex of A, which immediately removes the rest of B. In either case, the returned independent set has no elements from B, and hence has cost on (1). If ρ ∈ (r, s), the algorithm first picks a vertex of B, immediately removing all of A, and one element of C. The remaining graph comprises m − 2 isolated vertices of B (which get added to the independent set), and m2 + m stars with centers in C and leaves in B. It is easy to see that both the adaptive and the non-adaptive versions of the heuristic return exactly B.  We are now ready to state the main result of this section. 21 Theorem 4.2 (Impossibility of Worst-Case Online Learning) There is a distribution on MWIS input sequences over which every algorithm has expected regret 1 − on (1). Proof: Let tj = (rj , sj ) be a distribution over sequences of nested intervals with sj − rj = n−j , t0 = (0, 1), and with tj chosen uniformly at random from within tj−1 . Let xj be an MWIS instance on up to n vertices such that cost(Aρ , x) = 1 for ρ ∈ (rj , sj ), and cost(Aρ , x) = on (1) for ρ < rj and ρ > sj (Lemma 4.1). The adversary presents the instances x1 , x2 , . . . , xT , in that order. For every ρ ∈ tT , cost(Aρ , xj ) = 1 for all j. However, at every step t, no algorithm can have a better than 1/n chance of picking a ρt for which cost(Aρt , xt ) = Ω(1), even given x1 , x2 , . . . , xt−1 and full knowledge of how the sequence is generated.  4.3 A Smoothed Analysis Despite the negative result above, we can show a “low-regret” learning algorithm for MWIS under a slight restriction on how the instances xt are chosen. By low-regret we mean that the regret can be made polynomially small as a function of the number of vertices n. This is not the same as the no-regret condition, which requires regret tending to 0 as T → ∞. Nevertheless, inverse polynomially small regret poly(n−1 ) is a huge improvement over the constant regret incurred in the worst-case lower bound (Theorem 4.2). We take the approach suggested by smoothed analysis [31]. Fix a parameter σ ∈ (0, 1). We allow each MWIS instance xt to have an arbitrary graph on n vertices, but we replace each vertex weight wv with a probability distribution ∆t,v with density at most σ −1 (pointwise) and support in [0, 1]. A simple example of such a distribution with σ = 0.1 is the uniform distribution on [0.6, 0.65] ∪ [0.82, 0.87]. To instantiate the instance xt , we draw each vertex weight from its distribution ∆t,v . We call such an instance a σ-smooth MWIS instance. For small σ, this is quite a weak restriction. As σ → 0 we return to the worst-case setting, and Theorem 4.2 can be extended to the case of σ exponentially small in n. Here, we think of σ as bounded below by an (arbitrarily small) inverse polynomial function of n. One example of such a smoothing is to start with an arbitrary MWIS instance, keep the first O(log n) bits of every weight, and set the remaining lower-order bits at random. The main result of this section is a polynomial-time low-regret learning algorithm for sequences of σ-smooth MWIS instances. Our strategy is to take a finite net N ⊂ [0, 1] such that, for every algorithm Aρ and smoothed instance xt , with high probability over xt the performance of Aρ is identical to that of some algorithm in {Aη : η ∈ N }. We can then use any off-the-shelf no-regret algorithm to output a sequence of algorithms from the finite set {Aη : η ∈ N }, and show the desired regret bound. 4.3.1 A Low-Regret Algorithm for σ-Smooth MWIS We start with some definitions. For a fixed x, let τ 0 (x) be the set of transition points, namely,36 τ 0 (x) := {ρ : Aρ−ω (x) 6= Aρ+ω (x) for arbitrarily small ω}. 36 The corner cases ρ = 0 and ρ = 1 require straightforward but wordy special handling in this statement and in several others in this section. We omit these details to keep the argument free of clutter. 22 It is easy to see τ 0 (x) ⊂ τ (x), where τ (x) := {ρ : wv1 /k1ρ = wv2 /k2ρ for some v1 , v2 , k1 , k2 ∈ [n]; k1 , k2 ≥ 2}. With probability 1, the vertex weights wv are all distinct and non-zero, so we can rewrite τ as τ (x) := {ρ(v1 , v2 , k1 , k2 ) : v1 , v2 , k1 , k2 ∈ [n]; k1 , k2 ≥ 2; k1 6= k2 } , where ρ(v1 , v2 , k1 , k2 ) = ln(wv1 ) − ln(wv2 ) ln(k1 ) − ln(k2 ) (3) and ln is the natural logarithm function. The main technical task is to show that no two elements of τ (x1 ) ∪ · · · ∪ τ (xm ) are within q of each other, for a sufficiently large q and sufficiently large m, and with high enough probability over the randomness in the weights of the xt ’s. We first make a few straightforward computations. The following brings the noise into log space. Lemma 4.3 If X is a random variable over (0, 1] with density at most δ, then ln(X) also has density at most δ. Proof: Let Y = ln(X), let f (x) be the density of X at x, and let g(y) be the density of Y at y. Note that X = eY , and let v(y) = ey . Then g(y) = f (v(y)) · v 0 (y) ≤ f (v(y)) ≤ δ for all y.  Since | ln(k1 ) − ln(k2 )| ≤ ln n, Lemma 4.3 and our definition of σ-smoothness implies the following. Corollary 4.4 For every σ-smooth MWIS instance x, and every v1 , v2 , k1 , k2 ∈ [n], k1 , k2 ≥ 2, k1 6= k2 , the density of ρ(v1 , v2 , k1 , k2 ) is bounded by σ −1 ln n. We now show that it is unlikely that two distinct elements of τ (x1 ) ∪ · · · ∪ τ (xm ) are very close to each other. Lemma 4.5 Let x1 , . . . , xm be σ-smooth MWIS instances. The probability that no two distinct elements of τ (x1 ) ∪ · · · ∪ τ (xm ) are within q of each other is at least 1 − 4qσ −1 m2 n8 ln n. Proof: Fix instances x and x0 , and choices of (v1 , v2 , k1 , k2 ) and (v10 , v20 , k10 , k20 ). Denote by ρ and ρ0 the corresponding random variables, defined as in (3). We compute the probability that |ρ − ρ0 | ≤ q under various scenarios, over the randomness in the vertex weights. We can ignore the case where x = x0 , v1 = v10 , v2 = v20 , and k1 /k2 = k10 /k20 , since then ρ = ρ0 with probability 1. We consider three other cases. Case 1: Suppose x 6= x0 , and/or {v1 , v2 } and {v10 , v20 } don’t intersect. In this case, ρ and ρ0 are independent random variables. Hence the maximum density of ρ − ρ0 is at most the maximum density of ρ, which is σ −1 ln n by Corollary 4.4. The probability that |ρ − ρ0 | ≤ q is hence at most 2q · σ −1 ln n. Case 2: Suppose x = x0 , and {v1 , v2 } and {v10 , v20 } share exactly one element, say v2 = v20 . Then ln(wv1 ) ρ − ρ0 has the form X − Y , where X = ln(k1 )−ln(k and X and Y are independent. Since the 2) 23 maximum density of X is at most σ −1 ln n (by Lemma 4.3), the probability that |ρ − ρ0 | ≤ q is again at most 2q · σ −1 ln n. Case 3: Suppose x = x0 and {v1 , v2 } = {v10 , v20 }. In this case, k1 /k2 6= k10 /k20 . Then    1 1 0 |ρ − ρ | = ln(wv1 ) − ln(wv2 ) − ln(k1 ) − ln(k2 ) ln(k10 ) − ln(k20 ) | ln(wv1 ) − ln(wv2 )| ≥ . n2 Since wv1 and wv2 are independent, the maximum density of the right hand side is at most σ −1 n2 , and hence the probability that |ρ − ρ0 | ≤ q is at most 2q · σ −1 n2 . We now upper bound the number of tuple pairs that can appear in each case above. Each set τ (xi ) has at most n4 elements, so there are at most m2 n8 pairs in Cases 1 and 2. There are at most n4 choices of (k1 , k2 , k10 , k20 ) for each (x, v1 , v2 ) in Case 3, for a total of at most mn6 pairs. The theorem now follows from the union bound.  Lastly, we formally state the existence of no-regret algorithms for the case of finite |A|. Fact 4.6 (E.g. [25]) For a finite set of algorithms A, there exists p a randomized online learning ∗ algorithm L that, for every m > 0, has expected regret at most O( (log |A|)/m) after seeing m instances. If the time cost of evaluating cost(A, x) is bounded by B, then this algorithm runs in O(B|A|) time per instance. We can now state our main theorem. Theorem 4.7 (Online Learning of Smooth MWIS) There is an online learning algorithm for σ-smooth MWIS that runs in time poly(n, σ −1 ) and has expected regret at most poly(n−1 ) (as T → ∞). Proof: Fix a sufficiently large constant d > 0 and consider the first m instances of our sequence, x1 , . . . , xm , with m = nd ln(σ −1 ). Let q = 1/(nd · 4σ −1 m2 n8 ln n). Let Eq be the event that every two distinct elements of τ (x1 ) ∪ · · · ∪ τ (xm ) are at least q away from each other. By Lemma 4.5, Eq holds with probability at least 1 − 1/nd over the randomness in the vertex weights. Now, let AN = {Ai : i ∈ {0, q, 2q, . . . , b1/qcq, 1}} be a “q-net.” Our desired algorithm L is simply the algorithm L∗ from Fact 4.6, applied to AN . We now analyze its expected regret. If Eq does hold, then for every algorithm A ∈ A, there is an algorithm A0 ∈ AN such that cost(A, xt ) = cost(A0 , xt ) for x1 , . . . , xm . In other words, the best algorithm of AN is no worse than the best algorithm from all of A, and in this case the expected regret of L is simply that of L∗ . By Fact 4.6 and our choice of m, the expected regret (over the coin flips made by L∗ ) is at most inverse polynomial in n. If Eq does not hold, our regret is at most 1, since cost is between 0 and 1. Averaging over the cases where Eq does and does not hold (with probabilities 1 − 1/nd and 1/nd ), the expected regret of the learning algorithm L (over the randomness in L∗ and in the instances) is at most inverse polynomial in n.  24 5 Conclusions and Future Directions Empirical work on application-specific algorithm selection has far outpaced theoretical analysis of the problem, and this paper takes an initial step towards redressing this imbalance. We formulated the problem as one of learning the best algorithm or algorithm sequence from a class with respect to an unknown input distribution or input sequence. Many state-of-the-art empirical approaches to algorithm selection map naturally to instances of our learning frameworks. This paper demonstrates that many well-studied classes of algorithms have small pseudo-dimension, and thus it is possible to learn a near-optimal algorithm from a relatively modest amount of data. While worst-case guarantees for no-regret online learning algorithms are impossible, good online learning algorithms exist in a natural smoothed model. Our work suggests numerous wide-open research directions worthy of further study. For example: 1. Which computational problems admit a class of algorithms that simultaneously has low representation error and small pseudo-dimension (like in Section 3.4)? 2. Which algorithm classes can be learned online, in either a worst-case or a smoothed model? 3. When is it possible to learn a near-optimal algorithm using only a polynomial amount of computation, ideally with a learning algorithm that is better than brute-force search? Alternatively, are there (conditional) lower bounds stating that brute-force search is necessary for learning?37 4. Are there any non-trivial relationships between statistical learning measures of the complexity of an algorithm class and more traditional computational complexity measures? 5. How should instance features be chosen to minimize the representation error of the induced family of algorithm selection maps (cf., Section 3.5)? Acknowledgements We are grateful for the many helpful comments provided by the anonymous SICOMP and ITCS reviewers. References [1] N. Ailon, B. Chazelle, S. Comandur, and D. Liu. Self-improving algorithms. In Proceedings of the Symposium on Discrete Algorithms (SODA), pages 261–270, 2006. 2, 3, 12, 13, 14 [2] M. Anthony and P. L. Bartlett. Neural Network Learning: Theoretical Foundations. Cambridge University Press, 1999. 2, 6, 16, 19 [3] V. Arya, N. Garg, R. Khandekar, A. Meyerson, K. Munagala, and V. Pandit. Local search heuristics for k-median and facility location problems. SIAM Journal on Computing, 33(3):544– 562, 2004. 12 37 Recall the discussion in Section 2.3: even in practice, the state-of-the-art for application-specific algorithm selection often boils down to brute-force search. 25 [4] J. Bergstra and Y. Bengio. Random search for hyper-parameter optimization. Journal of Machine Learning Research, 13(1):281–305, 2012. 4 [5] A. Borodin, M. N. Nielsen, and C. Rackoff. (Incremental) priority algorithms. Algorithmica, 37(4):295–326, 2003. 8 [6] S. Boyd and L. Vandenberghe. Convex optimization. Cambridge University Press, 2004. 17 [7] U. S. Congressional Budget Office: The budget and economic outlook: 2015 to 2025. 2014. 3 [8] N. Cesa-Bianchi and G. Lugosi. Prediction, learning, and games. Cambridge University Press, 2006. 20 [9] K. L. Clarkson, W. Mulzer, and C. Seshadhri. Self-improving algorithms for convex hulls. In Proceedings of the Symposium on Discrete Algorithms (SODA), pages 1546–1565, 2010. 3, 12 [10] K. L. Clarkson, W. Mulzer, and C. Seshadhri. Self-improving algorithms for coordinate-wise maxima. In Proceedings of the Symposium on Computational Geometry (SoCG), pages 277– 286, 2012. 3, 12 [11] K. L. Clarkson and C. Seshadhri. Self-improving algorithms for Delaunay triangulations. In Proceedings of the Symposium on Computational Geometry (SoCG), pages 148–155, 2008. 3, 12 [12] L. Devroye. Lectures Notes on Bucket Algorithms. Birkhäuser, 1986. 12 [13] E. Fink. How to solve it automatically: Selection among problem solving methods. In Proceedings of the International Conference on Artificial Intelligence Planning Systems, pages 128–136, 1998. 2 [14] A. Gathmann. Lectures notes on algebraic geometry. 2014. 11 [15] D. Haussler. Decision theoretic generalizations of the PAC model for neural net and other learning applications. Information and Computation, 100(1):78–150, 1992. 2 [16] E. Horvitz, Y. Ruan, C. P. Gomes, H. A. Kautz, B. Selman, and D. M. Chickering. A Bayesian approach to tackling hard computational problems. In Proceedings of the Conference in Uncertainty in Artificial Intelligence (UAI), pages 235–244, 2001. 2 [17] L. Huang, J. Jia, B. Yu, B. Chun, P. Maniatis, and M. Naik. Predicting execution time of computer programs using sparse polynomial regression. In Proceedings of Advances in Neural Information Processing Systems (NIPS), pages 883–891, 2010. 2 [18] F. Hutter, L. Xu, H. H. Hoos, and K. Leyton-Brown. Algorithm runtime prediction: Methods & evaluation. Artificial Intelligence, 206:79–111, 2014. 2, 16 [19] G. J. O. Jameson. Counting zeros of generalized polynomials: Descartes rule of signs and Laguerres extensions. Mathematical Gazette, 90(518):223–234, 2006. 12 [20] D. S. Johnson and L. A. McGeoch. The traveling salesman problem: A case study in local optimization. In E. Aarts and J. K. Lenstra, editors, Local Search in Combinatorial Optimization, pages 215–310. Wiley, 1997. Reprinted by Princeton University Press, 2003. 11 26 [21] D. E. Knuth. Estimating the efficiency of backtrack programs. Mathematics of Computation, 29:121–136, 1975. 4, 14 [22] L. Kotthoff, I. P. Gent, and I. Miguel. An evaluation of machine learning in algorithm selection for search problems. AI Communications, 25(3):257–270, 2012. 2 [23] D. Lehmann, L. I. O’Callaghan, and Y. Shoham. Truth revelation in approximately efficient combinatorial auctions. Journal of the ACM, 49(5):577–602, 2002. 3 [24] K. Leyton-Brown, E. Nudelman, and Y. Shoham. Empirical hardness models: Methodology and a case study on combinatorial auctions. Journal of the ACM, 56(4), 2009. 2, 15 [25] N. Littlestone and M. K. Warmuth. The weighted majority algorithm. Information and computation, 108(2):212–261, 1994. 24 [26] P. M. Long. Using the pseudo-dimension to analyze approximation algorithms for integer programming. In Proceedings of the International Workshop on Algorithms and Data Structures (WADS), pages 26–37, 2001. 2 [27] P. Milgrom and I. Segal. Deferred-acceptance auctions and radio spectrum reallocation. Working paper, 2014. 3 [28] M. Mohri and A. M. Medina. Learning theory and algorithms for revenue optimization in second price auctions with reserve. In Proceedings of the International Conference on Machine Learning (ICML), pages 262–270, 2014. 2 [29] J. Morgenstern and T. Roughgarden. The pseudo-dimension of near-optimal auctions. In Proceedings of Advances in Neural Information Processing Systems, 2015. 2 [30] S. Sakai, M. Togasaki, and K. Yamazaki. A note on greedy algorithms for the maximum weighted independent set problem. Discrete Applied Mathematics, 126(2):313–322, 2003. 3 [31] D. A. Spielman and S. Teng. Smoothed analysis: an attempt to explain the behavior of algorithms in practice. Communications of the ACM, 52(10):76–84, 2009. 22 [32] N. Srebro and S. Ben-David. Learning bounds for support vector machines with learned kernels. In Proceedings of the 19th Annual Conference on Learning Theory, pages 169–183, 2006. 2 [33] L. Xu, F. Hutter, H. H. Hoos, and K. Leyton-Brown. SATzilla: Portfolio-based algorithm selection for SAT. J. Artificial Intelligence Research (JAIR), 32:565–606, 2008. 4, 14, 15 [34] L. Xu, F. Hutter, H. H. Hoos, and K. Leyton-Brown. Hydra-MIP: Automated algorithm configuration and selection for mixed integer programming. In Proceedings of the RCRA workshop on combinatorial explosion at the International Joint Conference on Artificial Intelligence (IJCAI), pages 16–30, 2011. 4 [35] L. Xu, F. Hutter, H. H. Hoos, and K. Leyton-Brown. SATzilla2012: Improved algorithm selection based on cost-sensitive classification models. In Proceedings of the International Conference on Theory and Applications of Satisfiability Testing (SAT), 2012. 4 27 A A Bad Example for Gradient Descent We depict a family F of real-valued functions (defined on the plane R2 ) for which the class A of gradient descent algorithms from Section 3.6 has infinite pseudo-dimension. We parameterize each function fI ∈ F in the class by a finite subset I ⊂ [0, 1]. The “aerial view” of fI is as follows. The “squiggle” s(I) intersects the relevant axis at exactly I (to be concrete, let s(I) be the monic polynomial with roots at I). We fix the initial point z0 to be at the tail of the arrow for all instances, and fix ρ` and ρu so that the first step of gradient descent takes z0 from the red incline into the middle of the black and blue area. Let xI be the instance corresponding to fI with starting point z0 . If for a certain ρ and I, g(z0 , ρ) lands in the flat, black area, gradient descent stops immediately and cost(Aρ , xI ) = 1. If g(z0 , ρ) instead lands in the sloped, blue area, cost(Aρ , xI )  1. It should be clear that F can shatter any finite subset of (ρ` , ρu ), and hence has infinite pseudodimension. One can also make slight modifications to ensure that all the functions in F are continuously differentiable and L-smooth. 28
8cs.DS
Understanding the Impact of Precision Quantization on the Accuracy and Energy of Neural Networks Soheil Hashemi, Nicholas Anthony, Hokchhay Tann, R. Iris Bahar, Sherief Reda arXiv:1612.03940v1 [cs.NE] 12 Dec 2016 School of Engineering Brown University Providence, Rhode Island 02912 Email: {soheil hashemi, nicholas anthony, hokchhay tann, iris bahar, sherief reda}@brown.edu Abstract—Deep neural networks are gaining in popularity as they are used to generate state-of-the-art results for a variety of computer vision and machine learning applications. At the same time, these networks have grown in depth and complexity in order to solve harder problems. Given the limitations in power budgets dedicated to these networks, the importance of low-power, low-memory solutions has been stressed in recent years. While a large number of dedicated hardware using different precisions has recently been proposed, there exists no comprehensive study of different bit precisions and arithmetic in both inputs and network parameters. In this work, we address this issue and perform a study of different bit-precisions in neural networks (from floating-point to fixed-point, powers of two, and binary). In our evaluation, we consider and analyze the effect of precision scaling on both network accuracy and hardware metrics including memory footprint, power and energy consumption, and design area. We also investigate training-time methodologies to compensate for the reduction in accuracy due to limited bit precision and demonstrate that in most cases, precision scaling can deliver significant benefits in design metrics at the cost of very modest decreases in network accuracy. In addition, we propose that a small portion of the benefits achieved when using lower precisions can be forfeited to increase the network size and therefore the accuracy. We evaluate our experiments, using three well-recognized networks and datasets to show its generality. We investigate the trade-offs and highlight the benefits of using lower precisions in terms of energy and memory footprint. I. I NTRODUCTION In the recent years, deep neural networks (DNN) have provided state-of-the-art results in many different applications specifically related to computer vision and machine learning. One dominant feature of neural networks is their high demand in terms of memory and computational power thereby limiting solutions based on these networks to high power GPUs and data centers. In addition, such high demands have led to the investigation of low power ASIC accelerators where designers are free to assign dedicated resources to increase the throughput. However, memory accesses and data transfer overheads play an important part in the total computation time and energy. When using accelerators, as a solution to data transfer overheads, specialized buffers have been introduced, thereby isolating the data transfer from the computation and enabling the memory subsystem to load the new data while the computation core is processing the previously loaded data. Neural networks show inherent resilience to small and insignificant errors within their calculations. This error toler- ance originates from the inherent tolerance of the applications themselves, and the training nature of the networks, where some of the errors are compensated by relearning and fine tuning the parameters. In this light, techniques proposed by approximate computing, such as approximate arithmetic, are an attractive option to lower the power consumption and design complexity in neural networks accelerators. However, as demonstrated by Chen et al. [2] and Tann et al. [21], the dominant portion of power and energy of hardware neural network accelerators is consumed in the memory subsystem, limiting the scope of arithmetic approximation. In this light, one particularly effective solution is reducing the bit-width required to represent the data. While many accelerators have been proposed using different bit-precisions, most of these studies have been ad-hoc and give little to no explanation for choosing the specific precision. In particular, an evaluation of different precisions on the performance of the networks, considering both hardware metrics and inference accuracy, is not available. Such a study would provide researchers with better guidance as to the trade-offs available by such networks. In this paper we aim to address this issue by providing a quantitative analysis of different precisions and available trade-offs. More specifically, our paper makes the following contributions: • • • • We perform a detailed evaluation of a broad range of networks precisions, from binary weights to single precision floating-points, as well as several points in between. We utilize learning techniques to improve the lost accuracy by taking advantage of the training process to increase the accuracy. We evaluate our designs for both accuracy and hardware specific metrics, such as design area, power consumption, and delay, and demonstrate the results on a Pareto Frontier, enabling better evaluation of the available trade-offs. Exploiting the benefits of lower precisions, we propose increasing the network size to compensate for accuracy degradation. Our results showcase low precision networks capable of achieving equivalent accuracy compared to smaller floating-point networks while offering significant improvements in energy consumption and design area. The rest of the paper is organized as follows. In Section II, we briefly summarize the basics of neural networks, and in discussed later, the main complexity of using lower precision in these networks arises due to the learning process. Forward Pass Backward Pass … Input Layer Convolutional Layer Pooling Layer Fully Connected Layer Output Layer Fig. 1. The structure of a typical deep neural networks. Section III we review related work. Then, in Section IV we describe various precisions and network training techniques used in our evaluations and argue for increasing network size to recoup accuracy loss in lower precision networks. The results from our evaluations are provided in Section V and in Section VI we summarize our finding and provide suggestions for future work. II. BACKGROUND Deep neural networks are organized in layers where each layer is only connected to the layers immediately before and after it. Each layer gets its input from the previous layer and feeds it to the next layer after some layer-specific processing. Figure 1 shows the general structure and connectivity of the layers. As show in the figure, each layer consists of several channels. Deep Neural networks, in general, consist of a combination of three main layer types: convolutional layers, pooling layers, and fully connected layers. In typical neural networks the dominant portion of the computation is performed in the convolution layers and fully connected layers, while pooling layers simply down-sample the data. More specifically, channels in convolutional and fully connected layers are comprised of neuron units where each neuron performs a weighted sum of its inputs before feeding the result to a nonlinearity function. The intermediate values between layers are called feature maps, as they each abstract some structure in the input image. From a data perspective, neural networks operate on two main set of parameters: input data and intermediate feature maps, and network parameters (or weights). Since inputs and feature maps are treated similarly by the network, similar precisions are used for their representation. However, numerical precision of the network parameters can be changed independently of the input precision. While the input data is assumed to be given for each network, the flexibility of neural networks arises from their ability to adapt their response to a specific input by training the network parameters. More specifically, use of neural networks comprises two phases, a training process during which the network parameters are learned, and a test phase which performs the inference and classification of the test data. In the training phase, neural networks usually utilize a backpropagation algorithm during which the classification error is propagated backwards using partial gradients. Network parameters are then updated using stochastic gradient descent. After training and in the test phase, the learned network is utilized in the forward phase to classify the test data. As III. P REVIOUS W ORK The high demand of DNNs, in terms of complexity and energy consumption, has shifted attention to low-power accelerators. Many works have proposed implementing neural networks on FPGAs [7], [6], or as an ASIC accelerator [11], [22]. In all these works, different precisions have been utilized with little or no justification for the chosen bit-width. Chen et al. proposed Eyeriss, a spatial architecture along with a dataflow aimed at minimizing the movement energy overhead using data reuse [3]. For their implementation, a 16-bit fixed-point precision is utilized. Sankaradas et al. empirically determine an acceptable precision for their application [18] and reduce the precision to 16-bit fixedpoint for inputs and intermediate values while maintaining 20-bit precision for weights. A FPGA-based accelerator is proposed by Zhang et al., where single precision floating-point arithmetic has been utilized [24]. While this work offers a brief comparison between resources required for floating-point and fixed-point arithmetic logic in FPGAs, no discussion of accuracy is provided. Chakradhar et al. propose a configurable co-processor where input and output values are represented using 16 bits while intermediate values use 48 bits [1]. Many works have successfully integrated techniques commonly used in approximate computing to lower the computation and energy demands of neural networks. A feedforward neural network is proposed by Kung et al., where approximations are introduced to lower-impact synapses [13]. Venkataramani et al. propose an approximate design where error-resilient neurons are replaced with lower-precision neurons and an incremental training process is used to compensate for some of the added error [23]. However, no specifications for the bit precision range used in the experiments are provided. Tann et al. propose an incremental training process during which most of the network can be turned off to save power [21]. The neurons are then turned on during run-time if deemed necessary for correct classification. In this work, 32-bit floating-point representation was used. While use of limited precision in neural networks has been proposed before [16], [4], [17], there exists no comprehensive exploration of their effect on energy consumption and computation time in reference to network accuracy. A recent publication by Gysel et al. provides an analysis of precision on network accuracy; however, the design parameters are not evaluated [9]. Our objective is to precisely quantify the effect of each numerical precision or quantization on all aspects of the networks focusing specially on hardware metrics. IV. M ETHODOLOGY Here, first in Section IV-A, we discuss the range of precisions and quantizations considered in our evaluation. We also briefly discuss the network training techniques used to minimize the accuracy degradation due to the limited precision. Finally, in Section IV-B we propose two expanded network architectures to compensate for the accuracy drop. A. Evaluated Precisions and Train-Time Techniques We consider a broad range of numerical precisions and quantizations, from 32-bit floating-point arithmetic to binary nets, as well as several precision points in between. We summarize them below: 1) Floating-Point Arithmetic: This is the most commonly used precision as it generates the state-of-the-art results in accuracy. However, floating-point arithmetic requires complicated circuitry for the computational logic such as adders and multipliers as well as large bit-width, necessitating ample memory usage. As a result, this precision is not suitable for low-power and embedded devices. 2) Fixed-Point Arithmetic: Fix-point arithmetic is less computationally demanding as it simplifies the logic by fixing the location of the radix point. This arithmetic also provides the flexibility of a wide range of accuracy-power trade-offs by changing the number of bits used in the representation. In this work, we evaluate 4-, 8-, 16- and 32-bit precisions. To improve accuracy, we allow a different radix point location between data and parameters [9]. However, we refrain from evaluating bit precisions that are not powers of 2 since they result in inefficient memory usage that might nullify the benefits. 3) Power-of-Two Quantization: Multipliers are the most demanding computational unit for neural networks. As proposed by Lin [16], limiting the weights to be in the form of 2i , enables the network to replace expensive, frequent, and power-hungry multiplications with much smaller and less complex shifts. In our evaluations, we consider power of two quantization of the weights while representing the inputs with 16-bit fixed-point arithmetic. 4) Binary Representation: Recent work suggests that neural networks can generate acceptable results using just 1bit weight representation [5]. While work by Courbariaux suggests binarizing activation between network layers, it does not binarize the input layer [4]. For this reason, our accelerator would still need to support multi-bit inputs. Thus, we evaluate the binary net using one bit for weights, while using 16-bit fixed-point representation for the inputs and feature maps. Hardware Accelerator: For our experiments, we adopt a tile-based hardware accelerator similar to DianNao [2]. We implement 16 neuron processing units each with 16 synapses. Figure 2 shows our hardware implementation. As illustrated in the figure, three separate memory subsystems are used to store the intermediate values and outputs and buffer the inputs and weights. These subsystems are comprised of an SRAM buffer array, a DMA, and control logic responsible for ensuring that the data is loaded into the buffers and made available to the neural functional unit (NFU) at the appropriate clock cycle without additional latency. The NFU pipelines the computation into three stages, weight blocks (WB), adder tree, and nonlinearity function. As shown in Figure 2, the weight blocks will be modified to accommodate for different precisions and quantizations as needed. In the case of binary precision, we merge the first two pipeline stages, effectively leading to a two stage NFU, in order to reduce the runtime. Furthermore, the Controller Logic Neuron #1 Input Buffer Subsystem (Bin) x WB + WB x + + Output Buffer Subsystem (Bout) NFU Weight Buffer Subsystem (Sb) Neuron #16 WB x + WB + + Memory Interface Multiplier Block (a) Barrel Shifter (b) 𝑤 𝑖𝑛 *-1 (c) Fig. 2. The hardware model used for our experiments. The first stage (WB) has different variants for (a) floating-point and fixed-point arithmetic, (b) powers of two quantization, and (c) binary network. size of all buffers and the control logic are modified according to the precision. Training Time Techniques: We include a training phase in our experiments to enable the network to determine appropriate weights and adapt to the lower precision. Training processes, in nature, require high precision in order to converge to a good minima as the increments made to the parameters can be extremely small. On the other hand, if the network is made aware of its inference restrictions (in our case, the limited precision), the training process can potentially compensate for some of the errors by fine-tuning the parameters and therefore improve the accuracy at no extra cost. While the effects of reduced precision are analytically complicated to formulate as part of the training process [8], intuitive techniques can be utilized to improve the test phase accuracy. One approach proposed in [21] is to utilize a set of full precision weights, trained independently, as the starting point of a re-training process, in which the weights and inputs are restricted to the specified precision. This approach assumes that by using lower precisions, close to optimal performance can be obtained if a local search is performed around the optimal set of parameters as learned with full precision. A second approach for improving the accuracy is to utilize weights with different precisions in different parts of the training process, as proposed by Courbariaux et al. [5]. They solve the zero-gradient issue by keeping two sets of weights: one in full precision and one in the selected lower precision. The network is then trained using the full precision values during backward propagation and parameter updates, while approximating and using low precision values for forward passes. This approach allows for the accumulation of small gradient updates to eventually cause incremental updates in the lower precision. In our approach, we train all of the low precision networks using a combination of the first and second approaches. We TABLE I B ENCHMARK N ETWORKS A RCHITECTURE D ESCRIPTIONS . MNIST LeNet [14] 28×28×1 conv 5×5×20 maxpool 2×2 conv 5×5×50 maxpool 2×2 innerproduct 500 innerproduct 10 SVHN ConvNet [19] 32×32×3 conv 5×5×16 maxpool 2×2 conv 7×7×512 maxpool 2×2 innerproduct 20 innerproduct 10 TABLE II ALEX L ARGER N ETWORK A RCHITECTURE D ESCRIPTIONS . CIFAR-10 ALEX [12] 32×32×3 conv 5×5×32 maxpool 3×3 conv 5×5×32 avgpool 3×3 conv 5×5×64 avgpool 3×3 innerproduct 10 initialize the parameters for lower precision training from the floating point counterpart. Once initialized, we train by keeping two sets of weights. B. Expanded Network Architectures While significant savings in power, area, and computation time can be achieved using lower precisions, even a small degradation in accuracy can prohibit their use in many applications. However, we observe that, due to the nature of neural networks, the benefits obtainable by using lower precisions are disproportionately larger than the resulting accuracy degradation. This opens a new and intriguing dimension, where the accuracy can be boosted by increasing the number of computations while still consuming less energy. We therefore propose increasing the number of operations by increasing network size, as needed to maintain accuracy while spending significantly less for each operation. In this light, in Section V, we showcase two significantly larger networks and demonstrate that even by significantly increasing the size of the network, low precision can still result in improvements in energy consumption while eliminating the accuracy degradation. We discuss the specifications of the two larger networks in Section V. V. E XPERIMENTAL R ESULTS A. Experimental Setup We evaluate our designs both in terms of accuracy and design metrics (i.e., power, energy, memory requirements, design area). To measure accuracy, we adopt Ristretto [9], a Caffe-based framework [10] extended to simulate fixedpoint operation. We modify Ristretto to accommodate our techniques, as needed. In different experiments, we ensure that all design parameters except for the bit precision are the same. This is critical to ensure the isolation of the effects of bit precision from any other factor. We compile our designs using Synopsys Design Compiler using a 65 nm industry strength technology node library. We use a 250 MHz clock frequency and synthesize in nominal processing corner. We design our accelerator to have a zero timing slack for the full-precision accurate design. We confirm the functionality of our hardware implementation with extensive simulations. As before, we ensure that all other network parameters, including the frequency, are kept constant across different precision experiments. CIFAR-10 ALEX+ ALEX++ 32×32×3 32×32×3 conv 3×3×64 conv 5×5×64 maxpool 3×3 maxpool 2×2 conv 5×5×64 conv 3×3×128 avgpool 3×3 maxpool 2×2 conv 5×5×128 conv 3×3×256 avgpool 3×3 maxpool 2×2 innerproduct 10 innerproduct 512 innerproduct 10 Benchmarks: We consider three well-recognized neural network architectures utilized with three different datasets, MNIST [15] using the LeNet [14] architecture, SVHN using CONVnet [19], and CIFAR-10 [12] using the network described by Alex Krizhevsky [12] (Here we refer to this network as ALEX). For all cases, we randomly select 10% of each classification category from the original test set as our validation set. To showcase the benefits from increasing the network size while using lower precision, we evaluate two networks as summarized in Table II. Here, we focus on CIFAR-10 since MNIST and SVHN do not provide a large range in accuracy differences between various precisions and quantizations. As summarized in Table II, we evaluate two larger variations of the ALEX network: (1) ALEX+, where the number of channels in each convolutional layer is doubled, and (2) ALEX++, where the number of channels is doubled when the feature size is halved [20]. As shown in Section V-B, this methodology results in significant improvements in accuracy while still delivering significant savings in energy. B. Results Figure 3 shows the breakdown of power and area for the accelerator in the cases investigated. Values shown as (w, in) represent the number of bits required for representing weight and input values, respectively. Note, that these graphs do not reflect the power consumption of the main memory. As shown in the figure, the majority of the resources, both in power and design area, are utilized in the memory buffers necessary for seamless operation of the computational logic. To be more specific, in our experiments, the buffers consume between 75%-93% of the total accelerator power, while using 76%-96% of the total design area. These values highlight the necessity of approximation approaches targeting the memory footprint. Table III summarizes the design metrics of the accelerator for each of the numerical precisions considered. In order to maintain a fair comparison, we keep all the other parameters, such as the frequency, number of hardware neurons, etc., constant among different precisions. Changing the frequency or the accelerator parameters (other than precision) adds another dimension to the design space exploration which is out of the scope of our work. We evaluate the accuracy of the networks, as well as energy requirements for processing each image for each of our benchmarks. Table IV summarizes the results for MNIST Memory Registers Combinational Buf/Inv Design Area (mm2) 20 15 10 MNIST Class. Energy Energy Class. Precision (w, in) Acc. (%) (uJ) Sav. (%) Acc. (%) Floating-Point (32,32) 99.20 60.74 0 86.77 Fixed-Point (32,32) 99.22 52.93 12.86 86.78 Fixed-Point (16,16) 99.21 24.60 59.50 86.77 Fixed-Point (8,8) 99.22 8.86 85.41 84.03 Fixed-Point (4,4) 95.76 4.31 92.90 NA Powers of Two (6,16) 99.14 8.42 86.13 84.85 99.40 3.56 94.13 19.57 Binary Net (1,16) 5 0 Power Consumption (mW) TABLE IV T HE ACCURACY, PER IMAGE INFERENCE ENERGY, AND THE ENERGY SAVINGS ACHIEVABLE USING EACH OF THE EVALUATED PRECISIONS . F OR EACH DATASET, ENERGY SAVINGS ARE IN REFERENCE TO THE FULL - PRECISION IMPLEMENTATION . 1400 1200 1000 SVHN Energy Energy (uJ) Sav. (%) 754.18 0 663.01 12.09 314.05 58.36 120.14 84.07 NA NA 114.70 84.79 52.11 93.09 800 600 400 200 0 Fig. 3. The breakdown of design area and power consumption using different precisions. TABLE III D ESIGN METRICS OF THE EVALUATED NUMERICAL PRECISIONS AND QUANTIZATIONS . Precision (w, in) Floating-Point (32,32) Fixed-Point (32,32) Fixed-Point (16,16) Fixed-Point (8,8) Fixed-Point (4,4) Powers of Two (6,16) Binary Net (1,16) Design Area (mm2 ) 16.74 14.13 6.88 3.36 1.66 3.05 1.21 Power Cons. (mW ) 1379.60 1213.40 574.75 219.87 111.17 209.91 95.36 Area Saving (%) 0 15.56 58.92 79.94 90.07 81.78 92.73 Power Saving (%) 0 12.05 58.34 84.06 91.94 84.78 93.08 and SVHN datasets. We were able to achieve little to no accuracy drop for all but one of the network precisions in the MNIST classification. In the case of SVHN, however, while keeping the network architecture constant, the 4-bit fixed-point and binary representations failed to converge. For SVHN dataset, for instance in the case of powers of two network, we are able to achieve more than 84% energy saving with an accuracy drop of approximately 2%. Note that as we keep the frequency constant the processing time per image changes very marginally among different precisions. Additional runtime savings can be achieved by increasing the frequency or changing the accelerator specification which is not explored in this work. The reduction in precision also reduced the required memory capacity for network parameters, as well as the input data. We quantify our memory requirements for all the network architectures using different bit precisions. In our experiments, for the full-precision design, network parameters require approximately 1650KB, and 2150KB, and 350KB of memory for LeNet, CONVnet, and ALEX, respectively. Since there is a direct correlation between bit precision and network memory requirements, the memory footprint of each network reduces from 2× to 32× for different bit precisions. Note, we do not utilize any of recent parameter encoding and compression techniques, and such techniques are orthogonal to our work. As discussed in Section IV-B, we propose that a portion of the benefits from using low precision arithmetic can be exploited to boost the accuracy to match that of the floating point network while spending some portion of the energy savings by increasing the network size. Here, we showcase the benefits from our proposed methodology on CIFAR-10 dataset. The summary of the performances for the ALEX as well as the two larger networks (ALEX+ and ALEX++) is provided in Table V. Here, we do not report the results for fixed-point (32,32) for ALEX+ and ALEX++ as its energy saving is not competitive compared to other precisions. Also, the fixed-point (4,4) fails to converge for all three networks on CIFAR-10 and the respective rows have been removed from the table. Furthermore, we find that the accuracy for fixedpoint++ (8,8) is lower in comparison to the other networks with the same precision. We observe that for this network, there is a significant difference in the range of parameter and feature map values and as a result, 8 bits fails to capture the necessary range of the numbers. As shown in the table, lower precision networks can outperform the baseline design in accuracy while still delivering savings in terms of energy. The parameter memory requirements for the full-precision networks are roughly 350KB, 1250KB, and 9400KB for ALEX, ALEX+, and ALEX++ respectively. As discussed previously, the memory footprint reduces linearly with parameter precision when reducing the precision. The available trade-offs in terms of accuracy and energy using different precisions and expanded networks are plotted in Figure 4 for the CIFAR-10 testbench. The figure highlights the previous argument that a wide range of power and energy savings are possible using different precisions while maintaining acceptable accuracy. Further, when operating in low precision/quantization, a portion of the obtained energy benefits can be re-appropriated to recoup the lost accuracy by increasing the network size. As shown in the Figure 4, this methodology can eliminate the accuracy drop (for example in the case of Power of Two++ (6,16)) while still delivering energy savings of 35.93%. The figure highlights that larger networks with lower precision can dominate the full-precision baseline design in both accuracy and energy requirements. TABLE V N ETWORK PERFORMANCE FOR DIFFERENT PRECISION ON CIFAR-10 DATASET AND USING ALEX, ALEX+, AND ALEX++. E NERGY SAVINGS ARE IN REFERENCE TO THE ALEX FULL - PRECISION IMPLEMENTATION . Precision (w, in) Floating-Point (32,32) Fixed-Point (32,32) Fixed-Point (16,16) Fixed-Point+ (16,16) Fixed-Point++ (16,16) Fixed-Point (8,8) Fixed-Point+ (8,8) Fixed-Point++ (8,8) Powers of Two (6,16) Powers of Two+ (6,16) Powers of Two++ (6,16) Binary Net (1,16) Binary Net+ (1,16) Binary Net++ (1,16) Class. Acc. (%) 81.22 79.71 79.77 81.86 82.26 77.99 78.71 75.03 77.03 77.34 81.26 74.84 77.91 80.52 CIFAR-10 Energy (uJ) 335.68 293.90 136.61 491.32 628.17 49.22 177.02 226.32 46.77 168.21 215.05 19.79 71.18 91.00 Energy Sav. (%) Classification Accuracy % Floating-Point++ (32,32) Fixed-Point++ (16,16) 82 Floating-Point+ (32,32) Fixed-Point+ (16,16) Floating-Point (32,32) Powers of Two++ (6,16) 81 BinaryNET++ (1,16) 80 Fixed-Point (16,16) 79 Fixed-Point (32,32) Fixed-Point+ (8,8) Fixed-Point (8,8) BinaryNET+ (1,16) Powers of Two+ (6,16) 78 77 Powers of Two (6,16) 76 75 BinaryNET (1,16) Fixed-Point++ (8,8) 74 10 100 1000 This work is supported by NSF grant 1420864 and by NVIDIA Corporation for their generous GPU donation. We also thank Professor Pedro Felzenszwalb for his helpful inputs. R EFERENCES 0 12.45 59.30 1.5× More 1.9× More 85.34 47.27 32.59 86.07 49.89 35.93 94.10 78.80 72.89 84 83 ACKNOWLEDGMENT 10000 Energy Consumption (uJ) Fig. 4. The Pareto Frontier plot of the evaluated design point for CIFAR-10 testcase. The x axis is plotted in logarithmic scale to cover the energy range of all the designs. Here, the black point indicates the initial full-precision design, the blue points indicate the lower precision points, while the red and green points show the results from the larger networks. VI. C ONCLUSION In this work, we perform an analysis of numerical precisions and quantizations in neural networks. We evaluate a broad range of numerical approximations in terms of accuracy, as well as design metrics such as area, power consumption, and energy requirements. We study floating-point arithmetic, different precisions of fixed-point arithmetic, quantizations of weights to be of powers of two, and finally binary nets where the weights are limited to one bit values. We also show that lower-precision, larger networks can be utilized which outperform the smaller full-precision counterparts in both energy and accuracy. For future work, we plan on analytically investigating the correlations between network and datasets and their behavior in lower precision thereby effectively predicting the lower precision accuracy and hardware metrics. Further, we plan to develop architectures which support multiple radix point locations between layers. As discussed in V-B, this feature may reduce the accuracy degradation significantly for lower precision networks. [1] S. Chakradhar, M. Sankaradas, V. Jakkula, and S. Cadambi. A dynamically configurable coprocessor for convolutional neural networks. In ISCA, pages 247–257, 2010. [2] T. Chen, Z. Du, N. Sun, J. Wang, C. Wu, Y. Chen, and O. Temam. Diannao: A small-footprint high-throughput accelerator for ubiquitous machine-learning. In ASPLOS, pages 269–284, 2014. [3] Y. H. Chen, J. Emer, and V. Sze. Eyeriss: A spatial architecture for energy-efficient dataflow for convolutional neural networks. In ISCA, pages 367–379, 2016. [4] M. Courbariaux and Y. Bengio. Binarynet: Training deep neural networks with weights and activations constrained to +1 or -1. 2016. [5] M. Courbariaux, Y. Bengio, and J. David. Binaryconnect: Training deep neural networks with binary weights during propagations. CoRR, abs/1511.00363, 2015. [6] C. Farabet, C. Poulet, and Y. LeCun. An fpga-based stream processor for embedded real-time vision with convolutional networks. In ICCV Workshops, pages 878–885, 2009. [7] V. Gokhale, J. Jin, A. Dundar, B. Martini, and E. Culurciello. A 240 g-ops/s mobile coprocessor for deep neural networks. In CVPRW, pages 696–701, 2014. [8] S. Gupta, A. Agrawal, K. Gopalakrishnan, and P. Narayanan. Deep learning with limited numerical precision. CoRR, abs/1502.02551, 2015. [9] P. Gysel. Ristretto: Hardware-oriented approximation of convolutional neural networks. CoRR, abs/1605.06402, 2016. [10] 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. [11] J. Y. Kim, M. Kim, S. Lee, J. Oh, K. Kim, and H. J. Yoo. A 201.4 gops 496 mw real-time multi-object recognition processor with bioinspired neural perception engine. IEEE Journal of Solid-State Circuits, 45(1):32–45, 2010. [12] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images, 2009. [13] J. Kung, D. Kim, and S. Mukhopadhyay. A power-aware digital feedforward neural network platform with backpropagation driven approximate synapses. In ISLPED, pages 85–90, 2015. [14] Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proc. of the IEEE, 86(11):2278–2324, 1998. [15] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proc. of the IEEE, 86(11):2278–2324, 1998. [16] Z. Lin, M. Courbariaux, R. Memisevic, and Y. Bengio. Neural networks with few multiplications. CoRR, abs/1510.03009, 2015. [17] M. Rastegari, V. Ordonez, J. Redmon, and A. Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. CoRR, abs/1603.05279, 2016. [18] M. Sankaradas, V. Jakkula, S. Cadambi, S. Chakradhar, I. Durdanovic, E. Cosatto, and H. P. Graf. A massively parallel coprocessor for convolutional neural networks. In ASAP, pages 53–60, 2009. [19] P. Sermanet, S. Chintala, and Y. LeCun. Convolutional neural networks applied to house numbers digit classification. In ICPR, pages 3288– 3291, 2012. [20] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recog- nition. ICLR, abs/1607.05418, 2015. [21] H. Tann, S. Hashemi, R. I. Bahar, and S. Reda. Runtime configurable deep neural networks for energy-accuracy trade-off. In CODES+ISSS, pages 1–10, 2016. [22] O. Temam. A defect-tolerant accelerator for emerging high-performance applications. In ISCA, pages 356–367, 2012. [23] S. Venkataramani, A. Ranjan, K. Roy, and A. Raghunathan. Axnn: Energy-efficient neuromorphic systems using approximate computing. In ISLPED, pages 27–32, 2014. [24] C. Zhang, P. Li, G. Sun, Y. Guan, B. Xiao, and J. Cong. Optimizing fpga-based accelerator design for deep convolutional neural networks. In FPGA, pages 161–170, 2015.
9cs.NE
ANTI-DE SITTER STRICTLY GHC-REGULAR GROUPS WHICH ARE NOT LATTICES arXiv:1708.02101v3 [math.GT] 28 Feb 2018 GYE-SEON LEE AND LUDOVIC MARQUIS A BSTRACT. For d = 4, 5, 6, 7, 8, we exhibit examples of AdSd,1 strictly GHC-regular groups which are not quasi-isometric to the hyperbolic space Hd , nor to any symmetric space. This provides a negative answer to Question 5.2 in [9A12] and disproves Conjecture 8.11 of Barbot– Mérigot [BM12]. We construct those examples using the Tits representation of well-chosen Coxeter groups. On the way, we give an alternative proof of Moussong’s hyperbolicity criterion [Mou88] for Coxeter groups built on Danciger–Guéritaud–Kassel [DGK17] and find examples of Coxeter groups W such that the space of strictly GHC-regular representations of W into POd,2 (R) up to conjugation is disconnected. C ONTENTS 1. Introduction 2. Coxeter groups and Davis complexes 3. Proof of Theorem B 4. Tits representations and Convex cocompactness 5. Topological actions of reflection groups 6. Proof of Theorems C and D 7. An alternative proof of Moussong’s criterion 8. Proof of Theorems E and F Appendix A. The tables of the Coxeter groups Appendix B. The spherical, affine and Lannér diagrams References 1 6 8 11 16 18 20 21 25 29 30 1. I NTRODUCTION Let Rd,e be the vector space Rd + e endowed with a non-degenerate symmetric bilinear form ⟨⋅, ⋅⟩d,e of signature (d, e), and let q be the associated quadratic form. A coordinate representation of q with respect to some basis of Rd,e is: q( x) = x12 + ⋯ + x2d − x2d +1 − ⋯ − x2d + e The ( d + e − 1)-dimensional pseudohyperbolic space Hd,e−1 is the quotient of the hyperquadric Q = { x ∈ Rd,e ∣ q( x) = −1} 2010 Mathematics Subject Classification. 20F55, 20F65, 20H10, 22E40, 51F15, 53C50, 57M50, 57S30. Key words and phrases. Anti-de Sitter spaces, Anosov representations, Quasi-Fuchsian groups, Coxeter groups, Discrete subgroups of Lie groups. 1 2 GYE-SEON LEE AND LUDOVIC MARQUIS by the involution x ↦ − x and is endowed with the semi-Riemannian metric induced by the quadratic form q. It is a complete semi-Riemannian manifold of constant sectional curvature −1. The isometry group of Hd,e−1 is POd,e (R), and so Hd,e−1 may be identified with POd,e (R)/Od,e−1 (R). It will be more convenient for us to work with the projective model of Hd,e−1 , namely: Hd,e−1 = {[ x] ∈ P(Rd,e ) ∣ q( x) < 0} In particular, for e = 2, the pseudohyperbolic space Hd,e−1 is called the ( d + 1)-dimensional anti-de Sitter space AdSd,1 . Let Γ be a finitely presented group. A representation ρ ∶ Γ → POd,2 (R) is strictly GHCregular if it is discrete, faithful and preserves an acausal (i.e. negative) subset1 Λρ in the boundary Eind of AdSd,1 such that Λρ is homeomorphic to a ( d − 1)-dimensional sphere and the action of Γ on the convex hull2 of Λρ in AdSd,1 is cocompact. An AdSd,1 strictly GHCregular group (simply strictly GHC-regular group) is a subgroup of POd,2 (R) which is the image of a strictly GHC-regular representation. The first examples of strictly GHC-regular representations are Fuchsian representations. Namely, consider any uniform lattice Γ of POd,1 (R), which is isomorphic to O+d,1 (R), and let ρ 0 ∶ Γ → POd,2 (R) be the restriction to Γ of the natural inclusion POd,1 (R) ≃ O+d,1 (R) ↪ POd,2 (R) (hence Od,1 (R) corresponds to the stabilizer of a point p 0 ∈ AdSd,1 in POd,2 (R)). The representation ρ 0 is strictly GHC-regular and the convex hull of Λρ 0 is a copy of the hyperbolic d -space Hd inside AdSd,1 . Moreover, any small deformation ρ t ∶ Γ → POd,2 (R) of the representation ρ 0 is strictly GHC-regular (see Barbot–Mérigot [BM12]). Even more, Barbot [Bar15] proved that every representation ρ ∶ Γ → POd,2 (R) in the connected component of Hom(Γ, POd,2 (R)) containing ρ 0 is strictly GHC-regular. We will not use the following point of view, but we remark that strictly GHC-regular representations of torsion-free groups are exactly the holonomies of GHMC AdS manifolds (see Mess [Mes07] and Barbot [Bar08]). We quickly recall this terminology: an AdS manifold M is globally hyperbolic spatially compact (GHC) if it contains a compact Cauchy hypersurface, i.e. a space-like hypersurface S such that all inextendible time-like lines intersect S exactly once. It is globally hyperbolic maximal compact (GHMC) if in addition every isometric embedding of M into another GHC AdS manifold of the same dimension is an isometry. Recently, Barbot–Mérigot [BM12] found an alternative description of AdSd,1 strictly GHCregular groups. In the case when Γ is isomorphic to the fundamental group of a closed, negatively curved Riemannian d -manifold, a representation ρ ∶ Γ → POd,2 (R) is strictly GHCd,2 d,2 regular if and only if it is P1 -Anosov, where P1 is the stabilizer of an isotropic line l 0 ∈ 1We denote by ∂Hd,e−1 the boundary of Hd,e−1 in P(Rd,e ). In the case e = 2, the boundary ∂Hd,e−1 = ∂AdSd,1 is called the Einstein universe, denoted Eind . A subset Λ of ∂Hd,e−1 is negative if it lifts to a cone of Rd,e ∖{0} on which all inner products ⟨⋅, ⋅⟩d,e of noncollinear points are negative. By a cone we mean a subset of Rd,e which is invariant under multiplication by positive scalars. 2An element of PGL(Rd,e ) is proximal if it admits a unique attracting fixed point in P(Rd,e ). The (proximal) limit set of a discrete subgroup Γ0 of PGL(Rd,e ) is the closure of the set of attracting fixed points of elements of Γ0 which are proximal. In fact, the ρ (Γ)-invariant subset Λρ must be the limit set of ρ (Γ), and the convex hull of Λρ is well-defined because Λρ is acausal. ADS STRICTLY GHC-REGULAR GROUPS WHICH ARE NOT LATTICES 3 Rd,2 in POd,2 (R) (see Labourie [Lab06] or Guichard–Wienhard [GW12] for more background on Anosov representations) and the limit set of ρ (Γ) is a topological ( d − 1)-sphere in the boundary Eind of AdSd,1 . Very recently, Danciger–Guéritaud–Kassel [DGK17] introduced a notion of convex cocompactness in Hd,e−1 . A discrete subgroup Γ of POd,e (R) is Hd,e−1 -convex cocompact if it acts properly discontinuously and cocompactly on some properly convex3 closed subset C of Hd,e−1 with non-empty interior4 so that C ∖C does not contain any non-trivial projective segment. A main result of [DGK17] is as follows: an irreducible discrete subgroup Γ of POd,e (R) is Hd,e−1 convex cocompact if and only if Γ is Gromov-hyperbolic, the natural inclusion Γ ↪ POd,e (R) d,e is P1 -Anosov, and the limit set ΛΓ is negative. In particular, for any discrete faithful representation ρ ∶ Γ → POd,2 (R), we have that ρ is strictly GHC-regular if and only if ρ (Γ) is AdSd,1 -convex cocompact (which implies that Γ is Gromov-hyperbolic) and the Gromov boundary of Γ is homeomorphic to a ( d − 1)-dimensional sphere. In [9A12], the authors asked the following: Question A (Question 5.2 of [9A12]). Assume that ρ ∶ Γ → POd,2 (R) is a strictly GHC-regular representation. Is Γ isomorphic to a uniform lattice of POd,1 (R)? The positive answer to this question was conjectured by Barbot and Mérigot (see Conjecture 8.11 of [BM12]). In this paper, we give a negative answer to Question A. Theorem A. For d = 4, 5, 6, 7, 8, there exists an AdSd,1 strictly GHC-regular group which is not isomorphic (even not quasi-isometric) to a uniform lattice in a semi-simple Lie group. The counterexamples are the Tits representations of well-chosen Coxeter groups. Remark 1. For d = 2, there exist no examples as in Theorem A by work of Tukia [Tuk88], Gabai [Gab92] and Casson–Jungreis [CJ94]: if Γ is a Gromov-hyperbolic group whose boundary is homeomorphic to S1 , then Γ admits a geometric action on H2 , i.e. there exists a properly discontinuous, cocompact and isometric action of Γ on H2 (for a proof see Chapter 23 of Druţu–Kapovich [DK17]). In the case d = 3, recall that Cannon’s conjecture claims that if Γ is a Gromov-hyperbolic group whose boundary is homeomorphic to S2 , then Γ admits a geometric action on H3 . If Cannon’s conjecture is true, then any AdS3,1 strictly GHC-regular group is isomorphic to a uniform lattice of PO3,1 (R). For Coxeter groups, Cannon’s conjecture is in fact known to be true (see Bourdon–Kleiner [BK13]). An important invariant of a Coxeter group W is the signature sW of W . It means the signature of the Cosine matrix of W (see Section 2 for the basic terminology of Coxeter groups). Recall that the signature of a symmetric matrix A is the triple ( p, q, r ) of the positive, negative and zero indices of inertia of A . The outline of the proof of Theorem A is as follows. First, observe that if the signature of a Coxeter group W is ( d, 2, 0), then the Tits representation ρ of W is a discrete faithful 3A subset C of P(Rd,e ) is properly convex if its closure C is contained and convex in some affine chart. 4In the case Γ is irreducible, any non-empty Γ-invariant convex subset of P(Rd,e ) has non-empty interior, and so “C with non-empty interior” may be replaced by “C non-empty”. 4 GYE-SEON LEE AND LUDOVIC MARQUIS representation of W into POd,2 (R). Second, we prove Theorem 4.6 implying that if in addition W is Gromov-hyperbolic and the Coxeter diagram of W has no edge of label ∞, then the representation ρ ∶ W → POd,2 (R) is AdSd,1 -convex cocompact. Remark that Theorem 4.6 is a generalization of Theorem 8.2 of [DGK17]. Third, in order to prove that ρ is strictly GHC-regular, we only need to check that the Gromov boundary of W is a ( d − 1)-dimensional sphere. Coxeter groups satisfying all these properties exist: Theorem B. Every Coxeter group W in Tables 5, 6, 7, 8, 9 satisfies the following: ● the group W is Gromov-hyperbolic; ● the Gromov boundary ∂W of W is homeomorphic to a (d − 1)-sphere; ● the signature sW of W is (d, 2, 0). Here, d denotes the rank of W minus 2. Theorem A is then a consequence of the following: Theorem C. Let W be a Coxeter group in Tables 5, 6, 7, 8, 9. Then the Tits representation ρ ∶ W → POd,2 (R) is strictly GHC-regular and the group W is not quasi-isometric to a uniform lattice of a semi-simple Lie group. Remark 2. With Selberg’s lemma, Theorem C also allows us to obtain a finite index torsionfree subgroup Γ of W so that AdSd,1 /ρ (Γ) is a GHMC AdS manifold and Γ is not quasiisometric to a uniform lattice of a semi-simple Lie group. Applying the same method as for Theorem B and Theorem C, we can prove: Theorem D. Let W be a Coxeter group in Table 4. Then the following hold: ● ● ● ● ● the group W is Gromov-hyperbolic; the Gromov boundary of W is homeomorphic to a 3-dimensional sphere; the signature of W is (5, 1, 0); the Tits representation ρ ∶ W → PO5,1 (R) is quasi-Fuchsian; the group W is not quasi-isometric to a uniform lattice of a semi-simple Lie group. Here, a representation ρ ∶ Γ → POd +1,1 (R) is called Hd +1 -quasi-Fuchsian (simply quasiFuchsian) if it is discrete and faithful, ρ (Γ) is Hd +1 -convex cocompact and the Gromov boundary of Γ is homeomorphic to a ( d − 1)-dimensional sphere. Remark 3. In [Ess96], Esselmann proved that each Coxeter group W in Table 3 admits a geometric action on the hyperbolic space H4 such that a fundamental domain for the W action on H4 is a convex polytope whose combinatorial type is the product of two triangles. Esselmann’s examples in Table 3 are adapted to obtain the Coxeter groups in Tables 4, 5, 6, 7, 8, 9. In particular, the nerve of each Coxeter group in Tables 3, 4, 5 is isomorphic to the boundary complex of the dual polytope of the product of two triangles. We are currently classifying Coxeter groups with nerve isomorphic to the boundary complex of the dual polytope of the product of two simplices of dimension ⩾ 2, and in the meanwhile, we found the Coxeter groups in Tables 4, 5, 6, 7, 8, 9. We denote by χ(Γ, POd,2 (R)) the POd,2 (R)-character variety of Γ and by χs (Γ, POd,2 (R)) the space of strictly GHC-regular characters in χ(Γ, POd,2 (R)). In [Bar15], Barbot asked the following: ADS STRICTLY GHC-REGULAR GROUPS WHICH ARE NOT LATTICES 5 Question B (Discussion after Theorem 1.5 of [Bar15]). Assume that Γ is a lattice of POd,1 (R). Is the space χs (Γ, POd,2 (R)) connected? In other words, does every strictly GHC-regular character deform to a Fuchsian character? We can extend Question B to the case when Γ is Gromov-hyperbolic: Question C. Let Γ be a Gromov-hyperbolic group. Assume that χs (Γ, POd,2 (R)) is non-empty. Is the space χs (Γ, POd,2 (R)) connected? The following theorem provides a negative answer to Question C. Theorem E. Let W be a Coxeter group in Tables 12 or 13, and let d be the rank of W minus 3. Then there exist two characters [ρ 1 ], [ρ 2 ] ∈ χs (W, POd,2 (R)) such that there is no continuous path from [ρ 1 ] to [ρ 2 ] in χ(W, POd,2 (R)), let alone in the subspace χs (W, POd,2 (R)). Similarly, we denote by χ(Γ, POd +1,1 (R)) the POd +1,1 (R)-character variety of Γ and by χq (Γ, POd +1,1 (R)) the space of quasi-Fuchsian characters in χ(Γ, POd +1,1 (R)). It follows from work of Barbot–Mérigot [BM12] and Barbot [Bar15] that χs (Γ, POd,2 (R)) is a union of connected components of χ(Γ, POd,2 (R)). However, χq (Γ, POd +1,1 (R)) is open but not closed in χ(Γ, POd +1,1 (R)) in general. Nevertheless, we are able to prove: Theorem F. Let W be a Coxeter group in Tables 14 or 15, and let d be the rank of W minus 3. Then there exist two characters [ρ 1 ], [ρ 2 ] ∈ χq (W, POd +1,1 (R)) such that there is no continuous path from [ρ 1 ] to [ρ 2 ] in χ(W, POd +1,1 (R)). However, Question B is still an open problem. Remark 4. Each Coxeter group W in Tables 12, 13, 14, 15 is not quasi-isometric to Hd even though it is a Gromov-hyperbolic group whose boundary is homeomorphic to Sd −1 . Remark 5. In [Tum07], Tumarkin proved that each Coxeter group W in Table 10 (resp. Table 11) admits a geometric action on the hyperbolic space H4 (resp. H6 ). Tumarkin’s examples in Tables 10, 11 are adapted to obtain the Coxeter groups in Tables 12, 13, 14, 15. In particular, the nerves of Coxeter groups in Table 10 (resp. Table 11) are isomorphic to the nerves of Coxeter groups in Tables 12, 14 (resp. Tables 13, 15). In Section 7, we also recover Moussong’s hyperbolicity criterion for Coxeter groups (see Theorem 3.4) built on [DGK17]. Acknowledgments. We are thankful for helpful conversations with Ryan Greene, Olivier Guichard, Fanny Kassel and Anna Wienhard. We thank Daniel Monclair for introducing Question 5.2 in [9A12] to the second author a long time ago. Finally, we would like to thank the referee for carefully reading this paper and suggesting several improvements. G.-S. Lee was supported by the European Research Council under ERC-Consolidator Grant 614733 and by DFG grant LE 3901/1-1 within the Priority Programme SPP 2026 “Geometry at Infinity”, and he acknowledges support from U.S. National Science Foundation grants DMS 1107452, 1107263, 1107367 “RNMS: Geometric structures And Representation varieties” (the GEAR Network). 6 GYE-SEON LEE AND LUDOVIC MARQUIS 2. C OXETER GROUPS AND D AVIS COMPLEXES A pre-Coxeter system is a pair (W, S ) of a group W and a set S of elements of W of order 2 which generates W . A Coxeter matrix M = ( M st )s,t∈S on a set S is a symmetric matrix with the entries M st ∈ {1, 2, . . . , m, . . . , ∞} such that the diagonal entries M ss = 1 and others M st ≠ 1. For any pre-Coxeter system (W, S ), we have a Coxeter matrix MW on S such that each entry ( MW )st of MW is the order of st. To any Coxeter matrix M = ( M st )s,t∈S is associated a presentation for a group ŴM : the set of generators for ŴM is S and the set of relations is {( st) M st = 1 ∣ M st ≠ ∞}. A pre-Coxeter system (W, S ) is called a Coxeter system if the surjective homomorphism ŴMW → W , defined by s ↦ s, is an isomorphism. If this is the case, then W is a Coxeter group and S is a fundamental set of generators. We denote the Coxeter group W also by WS or WS,M to indicate the fundamental set of generators or the Coxeter matrix of (W, S ). The rank of WS is the cardinality ♯ S of S . The Coxeter diagram of WS,M is a labeled graph GW such that (i) the set of nodes (i.e. vertices) of GW is the set S ; (ii) two nodes s, t ∈ S are connected by an edge st of GW if and only if M st ∈ {3, . . . , m, . . . , ∞}; (iii) the label of the edge st is M st . It is customary to omit the label of the edge st if M st = 3. A Coxeter group W is irreducible if the Coxeter diagram GW is connected. The Cosine matrix of WS,M is an S × S symmetric matrix CW whose entries are: (CW )st = −2 cos ( π M st ) for every s, t ∈ S An irreducible Coxeter group WS is spherical (resp. affine, resp. Lannér) if for every s ∈ S , the ( s, s)-minor of CW is positive definite and the determinant det(CW ) of CW is positive (resp. zero, resp. negative). Remark that every irreducible Coxeter group W is spherical, affine or large, i.e. there is a surjective homomorphism of a finite index subgroup of W onto a free group of rank ⩾ 2 (see Margulis–Vinberg [MV00]). For a Coxeter group W (not necessarily irreducible), each connected component of the Coxeter diagram GW corresponds to a Coxeter group, called a component of the Coxeter group W . A Coxeter group W is spherical (resp. affine) if each component of W is spherical (resp. affine). We will often refer to Appendix B for the list of all the irreducible spherical, irreducible affine and Lannér Coxeter diagrams. Let (W, S ) be a Coxeter system. For each T ⊂ S , the subgroup WT of W generated by T is called a special subgroup of W . It is well-known that (WT , T ) is a Coxeter system. A subset T ⊂ S is said to be “something” if the Coxeter group WT is “something”. For example, the word “something” can be replaced by “spherical”, “affine”, “Lannér” and so on. Two subsets T,U ⊂ S are orthogonal if M tu = 2 for every t ∈ T and every u ∈ U . This relationship is denoted T ⊥ U. A poset is a partially ordered set. The nerve NW of W is the poset of all non-empty spherical subsets of S partially ordered by inclusion. We remark that the nerve NW is an abstract simplicial complex. Recall that an abstract simplicial complex S is a pair (V , E) of a set V , which we call the vertex set of S , and a collection E of (non-empty) finite subsets of V such that (i) for each v ∈ V , {v} ∈ E ; (ii) if T ∈ E and if ∅ ≠ U ⊂ T , then U ∈ E . An element of E is a simplex of S , and the dimension of a simplex T is ♯ T − 1. The vertex set of the nerve NW of ADS STRICTLY GHC-REGULAR GROUPS WHICH ARE NOT LATTICES 7 a Coxeter group WS is the set of generators S and a non-empty subset T ⊂ S is a simplex of NW if and only if T is spherical. The opposite poset to a poset P is the poset P op with the same underlying set and with the reversed order relation. Given a convex polytope P , let F(∂P ) denote the set of all non-empty faces of the boundary ∂P of P partially ordered by inclusion. A polytope P is simplicial (resp. simple) if F(∂P ) (resp. F(∂P ) op ) is a simplicial complex. Remark 2.1 (The nerve of a geometric reflection group, following Example 7.1.4 of [Dav08]). Let P be a simple convex polytope in X = Rd or Hd with dihedral angles integral submultiples of π. To the polytope P is associated a Coxeter matrix M = ( M st )s,t∈S on a set S : (i) the set S consists of all facets5 of P ; (ii) for each pair of distinct facets s, t of P , if s, t are adjacent6 and if the dihedral angle between s and t is mπst , then we set M st = m st , and otherwise M st = ∞. Let WP be the reflection group generated by the set of reflections σs across the facets s of P . The homomorphism σ ∶ WS,M → WP defined by σ( s) = σs is an isomorphism by Poincaré’s polyhedron theorem, and so the Coxeter group WS,M obtained in this way is called a geometric reflection group. Moreover, the nerve NW of the Coxeter group WS,M identifies with the simplicial complex F(∂P ∗ ) = F(∂P ) op , where P ∗ is the dual polytope of P , hence NW is PL homeomorphic to a ( d − 1)-dimensional sphere. Inspired by the previous remark, we make the following: Definition 2.2. A Coxeter group W is an abstract geometric reflection group of dimension d if the geometric realization of the nerve NW of W is PL homeomorphic to a ( d − 1)-dimensional sphere. A spherical coset of a Coxeter group W is a coset of a spherical special subgroup of W . We denote by W S the set of all spherical cosets of W , i.e. WS = ⊔ T ∈ NW ∪{∅} W /WT It is partially ordered by inclusion. To any poset P is associated an abstract simplicial complex Flag(P) consisting of all non-empty, finite, totally ordered subsets of P . The geometric realization of Flag(W S) is called the Davis complex ΣW of W . Example 2.3. If W is generated by the reflections in the sides of a square tile, then NW is a cyclic graph of length 4, and ΣW is the complex obtained by subdividing each tile of the infinite square grid into 8 isosceles right triangles, meeting at the center. Theorem 2.4 (Moussong [Mou88], Stone [Sto76], Davis–Januszkiewicz [DJ91]). If a Coxeter group W is an abstract geometric reflection group of dimension d , then the following hold: ● the Davis complex ΣW of W admits a natural CAT(0)-metric; ● the cell complex ΣW is homeomorphic to Rd ; ● the CAT(0) boundary of ΣW is homeomorphic to Sd−1 . 5A facet of a convex polytope P is a face of codimension 1. 6Two facets s, t of P are adjacent if the intersection of s and t is a face of codimension 2. 8 GYE-SEON LEE AND LUDOVIC MARQUIS Sketch of the proof. For the reader’s convenience, we outline the important steps of the proof as in the book [Dav08] and refer to the relevant theorems in [Dav08]. Moussong showed that the Davis complex ΣW equipped with its natural piecewise Euclidean structure is CAT(0) (see Theorem 12.3.3), and so ΣW is contractible (see also Theorem 8.2.13). Since (the geometric realization of) the nerve of W is PL homeomorphic to a ( d − 1)dimensional sphere, ΣW is a PL d -manifold (see Theorem 10.6.1). Therefore, the cell complex ΣW is a simply connected, nonpositively curved, piecewise Euclidean, PL manifold. By Stone’s theorem [Sto76], ΣW is homeomorphic to Rd and moreover by Davis–Januszkiewicz’s theorem, the boundary of ΣW is a ( d − 1)-sphere (see Theorem I.8.4).  3. P ROOF OF T HEOREM B Proposition 3.1. Let (W, S ) be a Coxeter system with Coxeter diagram GW in Tables 4, 5, 6, 7, 8, 9 and let d be the rank of WS minus 2. Then WS is an abstract geometric reflection group of dimension d . Proof. Let S 1 be the set of white nodes of GW and S 2 the set of black nodes of GW so that S = S 1 ∪ S 2 . Note that the colors are just for reference and have no influence on the definition of the group. Using the tables in Appendix B, check that: ● the special subgroups WS1 and WS2 are Lannér; ● the special subgroup WT with T ⊂ S is spherical if and only if S1 ⊄ T and S2 ⊄ T . It therefore follows that the nerve NW of W is isomorphic to the nerve of the Coxeter group WS1 × WS2 (as a poset). In other words, the nerve NW is isomorphic to the join of N1 and N2 , where N i denotes the nerve of WS i for each i ∈ {1, 2}. Moreover, since WS i is Lannér, its nerve N i is isomorphic to F(∂∆ i ) where ∆ i is the simplex of dimension n i = ♯ S i − 1, and in particular it is a simplicial complex whose geometric realization is a ( n i − 1)-dimensional sphere. Finally, since the join of the n-sphere and the m-sphere is the ( n + m + 1)−sphere, the geometric realization of the nerve NW is a ( d − 1)dimensional sphere (recall that d = n 1 + n 2 ).  Remark 3.2. The proof of Proposition 3.1 is essentially the same as in Example 12.6.8 of [Dav08] (see also Section 18 of Moussong [Mou88]). Corollary 3.3. In the setting of Proposition 3.1, the Coxeter group W is Gromov-hyperbolic and the Gromov boundary of W is a ( d − 1)-dimensional sphere. Proof. First, we know from Theorem 2.4 that the Davis complex ΣW of W is a CAT(0) space homeomorphic to Rd and that the CAT(0) boundary of W is homeomorphic to Sd −1 . Second, it is easy to verify that the Coxeter group W is Gromov-hyperbolic using Moussong’s hyperbolicity criterion (see Theorem 3.4). Finally, since the action of W on ΣW is proper and cocompact, we have that W is quasi-isometric to ΣW and the Gromov boundary of W identifies to the CAT(0) boundary of ΣW .  Theorem 3.4 (Moussong’s hyperbolicity criterion [Mou88]). Assume that WS is a Coxeter group. Then the group WS is Gromov-hyperbolic if and only if S does not contain any affine subset of rank ⩾ 3 nor two orthogonal non-spherical subsets. In order to complete Theorem B, it remains to show the following: ADS STRICTLY GHC-REGULAR GROUPS WHICH ARE NOT LATTICES 9 Proposition 3.5. In the setting of Proposition 3.1, the signature of W is ( d, 2, 0). Proof. As seen in the proof of Proposition 3.1, if S 1 (resp. S 2 ) denotes the set of all white (resp. black) nodes of GW , then the special subgroups WS1 and WS2 are Lannér, and for each (s, t) ∈ S1 × S2 , the special subgroup WS∖{s,t} is spherical. Thus the Coxeter group W contains a spherical special subgroup of rank d and a Lannér special subgroup. For example, if the Coxeter diagram GW of W is the diagram (A) in Figure 1, then the diagram (B) corresponds to a spherical Coxeter group B3 × I 2 ( p) (see Table 16) and the diagram (C) corresponds to a Lannér Coxeter group in Table 18. 1 WS 4 2 5 4 p⩾7 6 1 WT 7 4 6 2 3 p⩾7 1 WS1 7 4 2 3 (A) 4 3 (B) (C) F IGURE 1. A Coxeter group WS in Table 6 and two special subgroups WT and WS1 of WS with S = {1, 2, 3, 4} ∪ {5, 6, 7}, T = S ∖ {4, 5} and S 1 = {1, 2, 3, 4} Since the signature of any spherical (resp. Lannér) Coxeter group of rank r is ( r, 0, 0) (resp. ( r − 1, 1, 0)), the signature sW of W can only be ( d, 2, 0), ( d, 1, 1) or ( d + 1, 1, 0), and so sW is determined by the sign of the determinant det(CW ) of CW . More precisely, the signature sW is ( d, 2, 0), ( d, 1, 1) and ( d + 1, 1, 0) if det(CW ) > 0, = 0 and < 0, respectively. Now we check carefully the sign of det(CW ) in the decreasing order of dimension d . In the case when d = 8 or 7 (see Tables 9 or 8), a simple computation shows that det(CW ) is positive. For example, if the Coxeter diagram GW of W is: 1 5 3 2 4 5 6 7 8 9 5 10 then the Cosine matrix CW is: ⎛ 2 ⎜− c 5 ⎜ ⎜ 0 ⎜ ⎜ 0 ⎜ ⎜ ⎜ 0 ⎜ ⎜ 0 ⎜ ⎜ ⎜ 0 ⎜ ⎜ 0 ⎜ ⎜ 0 ⎜ ⎝ 0 − c5 2 −1 0 0 0 0 0 0 0 0 −1 2 −1 0 0 0 0 0 0 0 0 −1 2 −1 0 0 0 0 0 0 0 0 −1 2 −1 0 0 0 0 0 0 0 0 −1 2 −1 0 0 0 0 0 0 0 0 −1 2 −1 0 0 0 0 0 0 0 0 −1 2 −1 0 0 0 0 0 0 0 0 −1 2 − c5 √ 0 ⎞ 0 ⎟ ⎟ 0 ⎟ ⎟ ⎟ 0 ⎟ ⎟ 0 ⎟ ⎟ 0 ⎟ ⎟ ⎟ 0 ⎟ ⎟ 0 ⎟ ⎟ − c5 ⎟ ⎟ 2 ⎠ where c 5 = 2 cos( π5 ), and the determinant of CW is 12 (25 − 11 5) ≈ 0.201626. In the case when d = 6, 5, 4 (see Tables 7, 6, 5), there is a one-parameter family (Wp ) p or a two-parameter family (Wp,q ) p,q of Coxeter groups for each item of the Tables. The following Lemma 3.6 shows that the determinant of the Cosine matrix increases when the parameter increases. Here, the (partial) order on the set of two parameters ( p, q) is given by: ( p′ , q′ ) ⩾ ( p′′ , q′′ ) ⇔ p′ ⩾ p′′ and q′ ⩾ q′′ 10 GYE-SEON LEE AND LUDOVIC MARQUIS By an easy but long computation, we have that det(CWp ) (resp. det(CWp,q )) is positive for every minimal element p (resp. ( p, q)) in the set of parameters. For example, if the Coxeter diagram GWp of Wp is: 5 p ⩾ 11 5 √ √ then the determinant of CWp is equal to −4(3 + 5) + 8(1 + 5) cos ( 2pπ ) ≈ 0.834557 for p = 11. Remark that if p = 10, then det(CWp ) = 0 and so Wp is the geometric reflection group of a compact hyperbolic 4-polytope with 6 facets (see Esselmann [Ess96]).  Lemma 3.6. If (Wp ) p is a one-parameter family of Coxeter groups in Tables 5, 6, 7, then (det(CWp )) p is an increasing sequence and its limit is a positive number. Similarly, if (Wp,q ) p,q is a two-parameter family of Coxeter groups in Table 5, then (det(CWp,q )) p,q is also an increasing sequence and its limit is a positive number as p and q go to infinity. Proof. We denote Wp or Wp,q by WS,M (simply WS ). Let S 1 (resp. S 2 ) be the set of all white (resp. black) nodes of the Coxeter diagram GWS . Assume first that there is a unique edge st between S 1 and S 2 in GWS such that s ∈ S 1 and t ∈ S 2 .7 By Proposition 13 of Vinberg [Vin84], we have: det(CWS ) det (CWS∖{s,t} ) = det(CWS ) 1 det (CWS 1 ⋅ det(CWS ) 2 ) det (CWS ∖{ s} 2 ) ∖{ t} − 4 cos2 ( π M st ) which is equivalent to: det(CWS ) = det(CWS ) det(CWS ) − 4 det (CWS 1 2 1 ∖{ s} ) det (CWS 2 ∖{ t} ) cos2 ( π M st ) by the following observation: for any two orthogonal subsets T ⊥ U of S (such as S 1 ∖{ s} and S 2 ∖ { t} here), det (CWT ∪U ) = det (CWT ) det (CWU ) . Moreover, it is easy to see the following: ● the sequence p ↦ − det(CWS2 ) is positive and increasing to a positive number; ● the sequence p ↦ det (CWS ∖{t} ) is positive and decreasing to zero; 2 ● in the case WS = Wp , the numbers − det(CWS1 ) and det (CWS ∖{s} ) are positive; and 1 in the case WS = Wp,q , the sequence q ↦ − det(CWS ) is positive and increasing to a 1 positive number, and the sequence q ↦ det (CWS ∖{s} ) is positive and decreasing to zero. 1 Hence, the sequence p ↦ det(CWS ) (or ( p, q) ↦ det(CWS )) is increasing and converges to a positive number. 7In practice, it means that G WS does not belong to the last row of Table 5. ADS STRICTLY GHC-REGULAR GROUPS WHICH ARE NOT LATTICES 11 Now assume that there are two edges rt and st between S 1 and S 2 in GWS such that r, s ∈ S 1 and t ∈ S 2 .8 By Proposition 12 of Vinberg [Vin84], we have: ⎞ ⎛ det (CWS ∪{t} ) ⎞ ⎛ det(CWS ) 1 2 −2 = ⎜ − 2⎟ + ⎜ − 2⎟ det (CWS∖{t} ) ⎝ det (CWS1 ) ⎠ ⎝ det (CWS2 ∖{t} ) ⎠ det(CWS ) which is equivalent to det (CWS ) = det(CWS ) det(CWS ) + det (CWS ) det (CWS 1 2 1 ⎛ det (CWS ∪{t} ) ⎞ 1 ⎜ ) − 2⎟ 2 ∖{ t} ⎠ ⎝ det (CWS1 ) by the above observation. Moreover, it is easy to see (cf. Table 2 of Esselmann [Ess96]) that (1) √ √ √ ⎧ 5+2 5+3 2+ 10 ) ⎪ ⎪ 1 ∪{ t} =⎨ √ 2 ⎪ det (CWS ) ⎪ ⎩3 + 5 1 det (CWS if GWS 1 ∪{ t} if GWS 1 ∪{ t} is the left diagram in Figure 2; is the right diagram in Figure 2. 5 4 t 5 t 5 F IGURE 2. Two possible Coxeter diagrams of WS1 ∪{ t} Hence, the sequence p ↦ det(CWS ) is increasing and converges to a positive number, because the both values in Equation (1) are greater than 2.  Similarly, by an easy computation, we can prove: Proposition 3.7. Let (W, S ) be a Coxeter system with Coxeter diagram GW in Table 4. Then the signature of WS is (5, 1, 0). 4. T ITS REPRESENTATIONS AND C ONVEX COCOMPACTNESS 4.1. Cartan matrices and Coxeter groups. An n × n matrix A = ( A i j ) i, j=1,...,n is called a Cartan matrix if the following hold: ● for all i = 1, . . . , n, A ii = 2, and for all i ≠ j , A i j ⩽ 0, and A i j = 0 ⇔ A ji = 0; ● for all i ≠ j , A i j A ji ⩾ 4 or A i j A ji = 4 cos2 ( mπi j ) with some m i j ∈ N ∖ {0, 1}. A Cartan matrix A is reducible if (after a simultaneous permutation of rows and columns) A is the direct sum of smaller matrices. Otherwise, A is irreducible. It is obvious that every Cartan matrix A is the direct sum of irreducible matrices A 1 ⊕ ⋯ ⊕ A k . Each irreducible matrix A i , i = 1, . . . , k, is called a component of A . If x = ( x1 , . . . , xn ) and y = ( y1 , . . . , yn ) ∈ Rn , we write x > y if x i > yi for every i , and x ⩾ y if x i ⩾ yi for every i . Proposition 4.1 (Theorem 3 of Vinberg [Vin71]). If A is an irreducible Cartan matrix of size n × n, then exactly one of the following holds: (P) The matrix A is nonsingular; for every vector x ∈ Rn , if Ax ⩾ 0, then x > 0 or x = 0. 8In other words, G WS belongs to the last row of Table 5. 12 GYE-SEON LEE AND LUDOVIC MARQUIS (Z) The rank of A is n − 1; there exists a vector y ∈ Rn such that y > 0 and A y = 0; for every vector x ∈ Rn , if Ax ⩾ 0, then Ax = 0. (N) There exists a vector y ∈ Rn such that y > 0 and A y < 0; for every vector x ∈ Rn , if Ax ⩾ 0 and x ⩾ 0, then x = 0. We say that A is of positive, zero or negative type if (P), (Z) or (N) holds, respectively. A Cartan matrix A is of positive (resp. zero) type if every component of A is of positive (resp. zero) type. Corollary 4.2. Let A be a Cartan matrix (not necessarily irreducible). If there exists a vector x > 0 such that Ax = 0, then A is of zero type. A Cartan matrix A = ( A st )s,t∈S is compatible with a Coxeter group WS,M if for every s ≠ t ∈ S , A st A ts = 4 cos2 ( Mπst ) if M st < ∞, and A st A ts ⩾ 4 otherwise. For any Coxeter group W , the Cosine matrix CW of W is in fact compatible with W . Proposition 4.3 (Propositions 22 and 23 of Vinberg [Vin71]). Assume that a Cartan matrix A is compatible with a Coxeter group W . Then the following hold: (1) the matrix A is of positive type if and only if W is spherical; (2) if A is of zero type, then W is affine; (3) conversely, if A = CW and W is affine, then A is of zero type. 4.2. Coxeter polytopes. Let V be a vector space over R, and let S(V ) be the projective sphere, i.e. the space of half-lines in V . We denote by SL± (V ) the group of automorphisms of S(V ), i.e. SL± (V ) = { X ∈ GL(V ) ∣ det( X ) = ±1}. The projective sphere S(V ) and the group SL± (V ) are double covers of the projective space P(V ) and the group of projective transformations PGL(V ), respectively. We denote by S the natural projection of V ∖ {0} onto S(V ). For any subset U of V , S(U ) denotes S(U ∖ {0}) for the simplicity of the notation. A subset C of S(V ) is convex if there exists a convex cone U of V such that C = S(U ), and C is properly convex if in addition its closure C does not contain a pair of antipodal points. In other words, C is properly convex if and only if C is contained and convex in some affine chart. Note that if C is a properly convex subset of S(V ), then the subgroup SL± (C) of SL± (V ) preserving C is naturally isomorphic to a subgroup of PGL(V ). A projective polytope is a properly convex subset P of S(V ) such that P has a non-empty interior and P = ⋂ni=1 S({ x ∈ V ∣ α i ( x) ⩽ 0}), where α i , i = 1, . . . , n, are linear forms on V . We always assume that the set of linear forms is minimal, i.e. none of the half spaces S({ x ∈ V ∣ α i ( x) ⩽ 0}) contain the intersection of all the others. A projective reflection is an element of SL± (V ) of order 2 which is the identity on a hyperplane. Every projective reflection σ can be written as: σ = Id − α ⊗ b where α is a linear form on V and b is a vector of V such that α( b) = 2. A pre-Coxeter polytope is a pair of a projective polytope P of S(V ): P = ⋂ S({ x ∈ V ∣ αs ( x) ⩽ 0}) s∈ S ADS STRICTLY GHC-REGULAR GROUPS WHICH ARE NOT LATTICES 13 and a set of projective reflections (σs = Id − αs ⊗ b s )s∈S with αs ( b s ) = 2. A pre-Coxeter polytope is called a Coxeter polytope if ○ ○ γP ∩ P = ∅ for every γ ∈ ΓP /{Id} where P is the interior of P and ΓP is the subgroup of SL± (V ) generated by the reflections (σs )s∈S . If this is the case, then ΓP is a projective Coxeter group generated by reflections (σs )s∈S . In [Vin71], Vinberg showed that a pre-Coxeter polytope ( P, (σs = Id − αs ⊗ b s )s∈S ) is a Coxeter polytope if and only if the matrix A = (αs ( b t ))s,t∈S is a Cartan matrix. We often denote the Coxeter polytope simply by P , and we call A the Cartan matrix of the Coxeter polytope P . ○ For any Coxeter polytope P , there is a unique Coxeter group, denoted WP , compatible with the Cartan matrix of P . If q is a subset of P , then we set S q = { s ∈ S ∣ q ⊂ S(Kerαs )}, where Kerαs is the kernel of αs . Theorem 4.4 (Tits, Chapter V of [Bou68], and Theorem 2 of Vinberg [Vin71]). Let P be a Coxeter polytope of S(V ) with Coxeter group WP , and let ΓP be the group generated by the projective reflections (σs )s∈S . Then the following hold: (1) the homomorphism σ ∶ WP → SL± (V ) defined by σ( s) = σs is well-defined and is an isomorphism onto ΓP , which is a discrete subgroup of SL± (V ); (2) the ΓP -orbit of P is a convex subset CP of S(V ); (3) if ΩP is the interior of CP , then ΓP acts properly discontinuously on ΩP ; (4) for each point x ∈ P , the subgroup σ(WS x ) is the stabilizer of x in ΓP ; (5) an open face f of P lies in ΩP if and only if the Coxeter group WS f is finite. 4.3. Tits representations. To a Cartan matrix A = ( A st )s,t∈S is associated a Coxeter simplex ∆ A of S(RS ) as follows: ● for each t ∈ S , we set α̃t = e∗t , where ( e∗t )t∈S is the canonical dual basis of RS ; ● for each t ∈ S , we take the unique vector b̃ t ∈ RS such that α̃s (b̃ t ) = A st for all s ∈ S ; ● the Coxeter simplex ∆ A is the pair of the projective simplex ∩s∈S S({ x ∈ RS ∣ α̃s ( x) ⩽ 0}) and the set of reflections (σ̃s = Id − α̃s ⊗ b̃ s )s∈S . We let WA denote the unique Coxeter group compatible with A . Then Theorem 4.4 provides the discrete faithful representation σ̃ A ∶ WA → SL± (RS ) whose image Γ̃ A = σ̃ A (WA ) is the group generated by the reflections (σ̃s )s∈S . Assume now that none of the components of A is of zero type. We let VA denote the linear span of ( b̃ s )s∈S . For each s ∈ S , we set αs = α̃s ∣VA , the restriction of α̃s to VA , and b s = b̃ s . By Proposition 13 of Vinberg [Vin71], the convex subset P A = ⋂ S({ x ∈ VA ∣ αs ( x) ⩽ 0}) s∈ S of S(VA ) has a non-empty interior. Moreover, since dim(VA ) = rank( A ), the subset P A is properly convex by Proposition 18 of [Vin71]. In other words, P A is a projective polytope of S(VA ) (cf. Corollary 1 of [Vin71]). The projective polytope P A of S(VA ) together with the reflections (σs = Id − αs ⊗ b s )s∈S is a Coxeter polytope, denoted again P A , and Theorem 4.4 provides the discrete faithful representation σ A ∶ WA → SL± (VA ) whose image Γ A = σ A (WA ) 14 GYE-SEON LEE AND LUDOVIC MARQUIS is the group generated by the reflections (σs )s∈S . We denote by P ∗A the convex hull of ( b s )s∈S in S(VA ), i.e. P ∗A = S({ x ∈ VA ∣ x = ∑ c s b s for some c = ( c s )s∈S ⩾ 0}). s∈ S Assume in addition that A is symmetric. By Theorem 6 of Vinberg [Vin71], there exists a Γ A -invariant scalar product B A on VA such that B A ( b s , b t ) = A st for every s, t ∈ S , i.e. αs = B A ( b s , ⋅) for all s ∈ S . Thus, the group Γ A is a subgroup of the orthogonal group O(B A ) of the non-degenerate scalar product B A on VA , and preserves the negative open set of A : O −A = S({ x ∈ VA ∣ B A ( x, x) < 0}) Note that if the signature of A is ( p, q, r ), then B A is of signature ( p, q) and O(B A ) is naturally isomorphic to O p,q (R). For any Coxeter group WS , the Cosine matrix CW of WS is a symmetric Cartan matrix compatible with WS , and so if CW has no component of zero type, then there exists the representation σCW ∶ WS → O(BCW ), which we call the Tits–Vinberg representation (simply Tits representation) of WS . Remark 4.5. The representation σ̃CW ∶ W → SL± (RS ) exists without any condition on CW , and it is in fact conjugate to a representation of W introduced by Tits (see Chapter V of [Bou68]). However, if CW is nonsingular, then CW has no component of zero type, VCW = RS and the representation σCW ∶ W → SL± (VCW ) is conjugate to σ̃CW ∶ W → SL± (RS ), i.e. the representations of W , σCW and σ̃CW , are essentially the same. 4.4. Two Lemmas. In this section, we use the same notation as in Section 4.3 and prove Theorem 4.6, which is a generalization of Theorem 8.2 of Danciger–Guéritaud–Kassel [DGK17]. For any subset U ⊂ S , if X is an S × S matrix or a vector of RS , then X U denotes the restriction of X to U × U or U , respectively. Theorem 4.6. Let A = ( A st )s,t∈S be an irreducible symmetric Cartan matrix of signature ( p, q, r ) for some p, q ⩾ 1, and let WA be the Coxeter group compatible with A . Assume that the following conditions are satisfied: (H0 ) for every subset T of S , the matrix A T is not of zero type; (H− ) there is no pair of orthogonal subsets T,U of S such that A T and AU are of negative type. Then the subgroup Γ A = σ A (WA ) of O(B A ) ≃ O p,q (R) is H p,q−1 -convex cocompact. In the paper [DGK17], the authors prove the Theorem in the case of right-angled Coxeter groups. The key lemmas, Lemmas 8.8 and 8.9 of [DGK17], of the proof are generalized to arbitrary Coxeter groups in Lemmas 4.7 and 4.8, and the rest of the proof is the same as in the proof of Theorem 8.2 of [DGK17]. Lemma 4.7. Let A be a symmetric Cartan matrix and O −A the negative open set of A . Assume that A has no component of zero type. Then the matrix A satisfies (H0 ) if and only if P A ∩ P ∗A ⊂ O −A . ADS STRICTLY GHC-REGULAR GROUPS WHICH ARE NOT LATTICES 15 Proof. In the proof, the subscript A is omitted from the notation for simplicity. Assume A satisfies (H0 ) and take x ∈ P ∩ P ∗ . By definition, we have: B( b s , x) ⩽ 0 for every s ∈ S and x = ∑ cs bs s∈ S for some c = ( c s )s∈S ⩾ 0 which imply that: B( x, x) = ∑ c s B( b s , x) ⩽ 0 s∈ S and the equality holds if and only if c s B( b s , x) = 0 for all s ∈ S . Thus, x ∈ O − . Suppose by contradiction that x ∈ ∂O − , i.e. B( x, x) = 0. If S > denotes { s ∈ S ∣ c s > 0}, then: B ( b s , x) = 0 ∀ s ∈ S > ∑ c t B( b s , b t ) = 0 ∀ s ∈ S > t∈ S > A S> ⋅ c S> = 0 Therefore, we conclude by Corollary 4.2 that A S > is of zero type, which contradicts the condition (H0 ). To prove the converse we suppose by contradiction that there is a subset U ⊂ S such that AU is of zero type. Then there exists a vector c = ( c s )s∈U > 0 such that AU ⋅ c = 0 by Proposition 4.1. Let x = ∑s∈U c s b s . Now it is easy to see that x ∈ P ∩ P ∗ and B( x, x) = 0: contradiction.  Lemma 4.8. In the setting of Theorem 4.4, if the Cartan matrix A P of P (not necessarily symmetric) satisfies (H0 ) and (H− ) then P ∩ P ∗ ⊂ ΩP . Proof. In the proof, the subscript P is omitted from the notation for simplicity. Suppose that x ∈ P ∩ P ∗ . In other words, α s ( x) ⩽ 0 for every s ∈ S and x = ∑ cs bs s∈ S for some c = ( c s )s∈S ⩾ 0. Let S x = { s ∈ S ∣ αs ( x) = 0}. We aim to show that the Coxeter group WS x is finite. Equivalently (Theorem 4.4), the stabilizer subgroup of x in ΓP is finite. For this, we define the following subsets of S : S > = { s ∈ S ∣ c s > 0} S >x = S x ∩ S > S 0x = S x ∖ S >x First, we claim that S 0x ⊥ S > . Indeed, by definition, we have S 0x ∩ S > = ∅, which implies that A st ⩽ 0 for every s ∈ S 0x and every t ∈ S > . Moreover, for each s ∈ S x (2) 0 = αs ( x) = ∑ c t αs ( b t ) = ∑ c t A st . t∈ S > t∈ S > If s ∈ S 0x , then each term of the right-hand sum in (2) is nonpositive, hence must be zero. Thus A st = 0 for every s ∈ S 0x and every t ∈ S > , which exactly means that S 0x ⊥ S > as claimed. Second, we claim that A S >x is of positive type. Indeed, if s ∈ S >x , then: 0 = αs ( x) = ∑ c t A st = ∑ c t A st + ∑ c t A st t∈ S t∈S >x t∉S >x which implies that ∑ t∈S >x c t A st ⩾ 0. Since c S >x > 0 and A S >x ⋅ c S >x ⩾ 0, we deduce from Proposition 4.1 that each component of A S >x is either of positive type or of zero type. Therefore, the condition (H0 ) implies that the matrix A S >x is of positive type as claimed. 16 GYE-SEON LEE AND LUDOVIC MARQUIS Third, we claim that the matrix A S > has a component of negative type. Indeed, suppose by contradiction that every component of A S > is not of negative type. Then the condition (H0 ) implies that A S> is of positive type, and so by Lemma 13 of Vinberg [Vin71], we may assume without loss of generality that A S > is a positive definite symmetric matrix, i.e. for every non-zero vector v = (vs )s∈S > , the scalar vT ⋅ A S > ⋅ v is positive, where vT denotes the transpose of v. However, this is impossible because: cT S > ⋅ A S > ⋅ c S > = ∑ c s c t A st = ∑ c s α s ( x) ⩽ 0 s,t∈S > s∈ S > Fourth, we claim that A S 0x is of positive type. Indeed, assume by contradiction that A S 0x is not of positive type. Once again, the condition (H0 ) implies that A S 0x has a component of negative type. This contradicts the condition (H− ) because S 0x ⊥ S > and A S > has a component of negative type. Finally, we claim that the Coxeter group WS x is finite. Indeed, since A S x = A S >x ⊕ A S 0x is of positive type, by Proposition 4.3 we have that the Coxeter group WS x is spherical, i.e. it is finite as claimed. In conclusion, we deduce from the item (5) of Theorem 4.4 that x ∈ Ω.  We now give a brief summary of the proof of Theorem 4.6 from [DGK17] for the reader’s convenience: Proof of Theorem 4.6. As in Theorem 4.4, we denote by ΩP A the interior of the Γ A -orbit of P A . Since A is of negative type, the convex set ΩP A is properly convex by Lemma 15 of Vinberg [Vin71]. Let C ′ ⊂ S(R p,q ) be the Γ A -orbit of P A ∩ P ∗A . By Lemmas 4.7 and 4.8, we have that C ′ ⊂ O −A ∩ ΩP A . In particular, the action of Γ A on C ′ is properly discontinuous, and cocompact since P A ∩ P ∗A is a compact fundamental domain. Let C be the intersection of all Γ A -translates of P ∗A ∩ ΩP A . By Lemma 8.7 of [DGK17], the convex set C is non-empty. Since C ⊂ C ′ and C is closed in ΩP A , the action of Γ A on C is also properly discontinuous and cocompact. By Lemma 8.11 of [DGK17], the set C is closed in O −A . Using Lemmas 6.3 and 8.10 of [DGK17], the authors complete the proof by showing that C ∖ C does not contain any non-trivial projective segment.  5. T OPOLOGICAL ACTIONS OF REFLECTION GROUPS In this section, we recall some facts about actions of reflection groups on manifolds (see Chapters 5 and 10 of [Dav08]). A mirrored space over S consists of a space X , an index set S and a family of closed subspaces ( X s )s∈S . We denote the mirrored space simply by X . For each x ∈ X , put S x = { s ∈ S ∣ x ∈ X s }. Suppose X is a mirrored space over S and (W, S ) is a Coxeter system. Define an equivalence relation ∼ on W × X by ( g, x) ∼ ( h, y) if and only if x = y and g−1 h ∈ WS x . Give W × X the product topology and let U(W, X ) denote the quotient space: U(W, X ) ∶= W × X / ∼ ADS STRICTLY GHC-REGULAR GROUPS WHICH ARE NOT LATTICES 17 We let [ g, x] denote the image of ( g, x) in U(W, X ). The natural W -action on W × X is compatible with the equivalence relation, and so it descends to an action on U(W, X ), i.e. γ ⋅ [ g, x] = [γ g, x]. The map i ∶ X → U(W, X ) defined by x ↦ [1, x] is an embedding and we identify X with its image under i . Note that X is a strict fundamental domain for the W action on U(W, X ), i.e. it intersects each W -orbit in exactly one point. An involution on a connected manifold M is a topological reflection if its fixed set separates M . Suppose that a group W acts properly on a connected manifold M and that it is generated by topological reflections. Let R be the set of all topological reflections in W . For each r ∈ R , the fixed set of r , denoted H r , is the wall associated to r . The closure of a connected component of M ∖ ⋃r∈R H r is a chamber of W . A wall H r is a wall of a chamber D if there is a point x ∈ D ∩ H r such that x belongs to no other wall. Fix a chamber D and let S = { r ∈ R ∣ H r is a wall of D }. Theorem 5.1 (Proposition 10.1.5 of [Dav08]). Suppose that W acts properly on a connected manifold M as a group generated by topological reflections. With the notation above, the following hold: ● the pair (W, S ) is a Coxeter system; ● the natural W -equivariant map U(W, D ) → M , induced by the inclusion D ↪ M , is a homeomorphism. Theorem 5.2 (Proposition 10.9.7 of [Dav08]). Suppose a Coxeter group W acts faithfully, properly and cocompactly on a contractible manifold M . Then W acts on M as a group generated by topological reflections. Theorem 5.3 (Main Theorem of Charney–Davis [CD00]). Suppose a Coxeter group W admits a faithful, proper and cocompact action on a contractible manifold. If S and S ′ are two fundamental sets of generators for W , then there is a unique element w ∈ W such that S ′ = wSw−1 . Lemma 5.4. Let (W, S ) be a Coxeter system, and let τ ∶ W → SL± (V ) be a faithful representation. Suppose that τ(W ) acts properly discontinuously and cocompactly on some properly convex open subset Ω of S(V ). Then the following hold: (1) for each s ∈ S , the image τ( s) of s is a projective reflection of S(V ); (2) the group τ(W ) is a projective Coxeter group generated by reflections (τ( s))s∈S . Proof. By Theorem 5.2, there exists a set of generators S ′ ⊂ W such that for each s ∈ S ′ the image τ( s) of s is a topological reflection, i.e. the fixed set of τ( s) separates Ω. We claim that τ( s) is a projective reflection. Indeed, since τ( s) is an automorphism of S(V ), if τ( s) is not a projective reflection, then the fixed set of τ( s) is of codimension ⩾ 2, hence does not separate Ω: impossible. Let R be the set of all reflections in τ(W ). For each r ∈ R , we denote by H r the wall associated to τ( r ), which is a hyperplane in Ω. Fix a chamber D of τ(W ), which is a closed connected subset of Ω, and let S ′′ = { r ∈ R ∣ H r is a wall of D }. 18 GYE-SEON LEE AND LUDOVIC MARQUIS By Theorem 5.1, we have that (W, S ′′ ) is a Coxeter system and that the natural W equivariant map U(W, D ) → Ω is a homeomorphism. Since the group W acts faithfully, properly and cocompactly on Ω, by Theorem 5.3, there is a unique element w ∈ W such that S = wS ′′ w−1 . Thus, for each s ∈ S , the image τ( s) of s is a projective reflection of S(V ), and the strict fundamental domain P ∶= τ(w) ⋅ D is bounded by the fixed hyperplanes of the reflections τ( s) for s ∈ S . In other words, each automorphism τ( s) of S(V ) can be written as τ( s) = Id − αs ⊗ b s for some linear form αs ∈ V ∗ and some vector b s ∈ V so that αs ( b s ) = 2 and P = ⋂ S({ x ∈ V ∣ αs ( x) ⩽ 0}). s∈ S Therefore, the pair of the polytope P and the set of reflections (τ( s))s∈S is a Coxeter polytope since P is the (strict) fundamental domain for the τ(W )-action on Ω.  6. P ROOF OF T HEOREMS C AND D In the following theorem, we use the same notation as in Section 4.3. Theorem 6.1. If W is a Coxeter group with Coxeter diagram in Tables 5, 6, 7, 8, 9, then the following hold: ● ● ● ● the group W is Gromov-hyperbolic and its Gromov boundary is homeomorphic to Sd −1 ; the Cosine matrix CW of W satisfies the conditions (H0 ) and (H− ); the symmetric matrix CW is of signature ( d, 2, 0); the Tits representation σCW ∶ W → O(BCW ) ≃ Od,2 (R) is strictly GHC-regular. Proof. By Corollary 3.3, the Coxeter group W is Gromov-hyperbolic and the Gromov boundary of W is a ( d − 1)-dimensional sphere. By Proposition 4.3, the Cosine matrix CW of W satisfies the hypotheses (H0 ) and (H− ) because the Coxeter diagram GW of W has no edge of label ∞ and the Coxeter group W satisfies Moussong’s hyperbolicity criterion (Theorem 3.4), namely S does not contain any affine subset of rank at least 3 nor two orthogonal nonspherical subsets. By Proposition 3.5, the signature of W is ( d, 2, 0), and so the negative open d,1 − of C and the orthogonal group O(B set OC and Od,2 (R), W CW ) may be identified with AdS W respectively. By Theorem 4.6, the subgroup σCW (W ) of Od,2 (R) is AdSd,1 -convex cocompact, hence the representation σCW is strictly GHC-regular because the Gromov boundary of W is homeomorphic to Sd −1 .  Applying the same method as for Theorem 6.1, we can prove: Theorem 6.2. If W is a Coxeter group with Coxeter diagram in Table 4, then the following hold: ● the group W is Gromov-hyperbolic and its Gromov boundary is homeomorphic to S3 ; ● the symmetric matrix CW is of signature (5, 1, 0); ● the Tits representation σCW ∶ W → O(BCW ) ≃ O5,1 (R) is quasi-Fuchsian. Now, it only remains to show that every Coxeter group W in Tables 4, 5, 6, 7, 8, 9 is not quasi-isometric to a uniform lattice of a semi-simple Lie group. First, the properties of W being isomorphic to and quasi-isometric to a uniform lattice of a semi-simple Lie group respectively are almost the same due to the following beautiful theorem: ADS STRICTLY GHC-REGULAR GROUPS WHICH ARE NOT LATTICES 19 Theorem 6.3 (Tukia [Tuk86], Pansu [Pan89], Chow [Cho96], Kleiner–Leeb [KL97], Eskin– Farb [EF97], for an overview see Farb [Far97] or Druţu–Kapovich [DK17]). Let Γ be a finitely generated group and X a symmetric space of noncompact type without Euclidean factor.9 If the group Γ is quasi-isometric to X , then there exists a homomorphism τ ∶ Γ → Isom( X ) with finite kernel and whose image is a uniform lattice of the isometry group Isom( X ) of X . Moreover, if in addition Γ is an irreducible large Coxeter group W , i.e. W is not spherical nor affine, then the homomorphism τ ∶ Γ → Isom( X ) must be injective: Proposition 6.4 (Assertion 2 of the proof of Proposition 4.3 of Paris [Par07]). Let W be an irreducible large Coxeter group. If N is a normal subgroup of W then N is infinite. Thus, an irreducible large Coxeter group W is quasi-isometric to a uniform lattice of a semi-simple Lie group G if and only if it is isomorphic to a uniform lattice of G . Even more, since W is a Coxeter group, this problem reduces to being isomorphic or not to a uniform lattice of the isometry group of real hyperbolic space: Theorem 6.5 (Folklore). Let W be an irreducible large Coxeter group and X a symmetric space of noncompact type without Euclidean factor. If W is isomorphic to a uniform lattice of Isom( X ), then X is a real hyperbolic space. Proof. By Corollary 5.7 of Davis [Dav98], the symmetric space X is a product of real hyperbolic spaces. We aim to show that X has only one factor. Let G be the connected component of Isom( X ) containing the identity, ΓW the uniform lattice of Isom( X ) isomorphic to W , and Γ = ΓW ∩ G . There exists a finite family {G i } i∈ I of normal subgroups of G such that (i) G = ∏ i∈ I G i , (ii) for each i ∈ I , Γ i = G i ∩ Γ is an irreducible lattice in G i , and (iii) ∏ i∈ I Γ i is a subgroup of finite index in Γ (see e.g. Theorem 5.22 of Raghunathan [Rag72]). Since W is irreducible and large, by Theorem 4.1 of Paris [Par07], Proposition 8 of de Cornulier–de la Harpe [dCdlH07] or Theorem 1.2 of Qi [Qi07], the group W is strongly indecomposable, i.e. for any finite-index subgroup W ′ of W , there exists no non-trivial direct product decomposition of W ′ . Thus ♯ I = 1 and Γ is an irreducible lattice in G . Finally, by Corollary 1.2 of Cooper–Long–Reid [CLR98] or Gonciulea [Gon97], any finite-index subgroup of an infinite Coxeter group is not isomorphic to an irreducible lattice in a semi-simple Lie group of R-rank ⩾ 2. Thus X = Hd for some d ⩾ 2 (see also the discussion after Corollary 1.3 of [CLR98]).  Remark 6.6. In order to prove Corollary 1.2 of [CLR98], the authors used the Margulis normal subgroup theorem [Mar78] that any normal subgroup of an irreducible lattice in a semisimple Lie group of R-rank ⩾ 2 is either finite or finite index. Remark 6.7. Theorem 1.4 of Kleiner–Leeb [KL01] shows that a finitely generated group quasi-isometric to Rn × X with X a symmetric space of noncompact type without Euclidean factor must have a finite-index subgroup containing Zn inside its center. Any finite-index subgroup of an irreducible large Coxeter group has trivial center by Theorem 1.1 of Qi [Qi07]. Hence we may remove the hypothesis “without Euclidean factor” in Theorem 6.5 and change “semi-simple” to “reductive” in Theorems C and D. 9A symmetric space of noncompact type without Euclidean factor means a manifold of the form G /K , where G is a semi-simple Lie group without compact factors and K is a maximal compact subgroup. 20 GYE-SEON LEE AND LUDOVIC MARQUIS Proposition 6.8. If (W, S ) is a Coxeter system with Coxeter diagram in Tables 4, 5, 6, 7, 8, 9, then the group W is not isomorphic to a uniform lattice of Isom(H e ) for any integer e ⩾ 1. Proof. Let d be the rank of W minus 2. Suppose by contradiction that there is a faithful representation τ ∶ W → Isom(H e ) whose image is a uniform lattice. By Corollary 3.3, we have ∂W ≃ Sd −1 . Fix x0 ∈ H e . Since the orbit map ϕ ∶ W → H e defined by γ ↦ τ(γ) ⋅ x0 is a quasi-isometry, it extends to a homeomorphism ∂ϕ ∶ ∂W → ∂H e ≃ S e−1 , and so d = e. Since τ(W ) is a uniform lattice of Isom(Hd ), by Lemma 5.4, the group τ(W ) is a projective Coxeter group generated by reflections (τ( s) = Id − Q (vs , ⋅) ⊗ vs )s∈S for some d + 2 vectors vs of Rd,1 with Q (vs , vs ) = 2, where Q is the quadratic form on Rd,1 defining POd,1 (R) ≃ Isom(Hd ). Therefore, the determinant of the symmetric Cartan matrix CW = (Q (vs , v t ))s,t∈S must be zero. However, it is impossible since we have by Propositions 3.5 and 3.7 that the determinant of the Cosine matrix CW of W is non-zero.  Remark 6.9. Proposition 6.8 (hence Lemma 5.4) is highly inspired by Proposition 3.1 of Benoist [Ben06], Example 12.6.8 of [Dav08] and Examples 2.3.1 and 2.3.2 of Januszkiewicz– Światkowski ˛ [JŚ03]. 7. A N ALTERNATIVE PROOF OF M OUSSONG ’ S CRITERION In the paper [DGK17], the authors give an alternative proof of Moussong’s hyperbolicity criterion [Mou88] (see Theorem 3.4) in the case of right-angled Coxeter groups. In this section, we prove the criterion for arbitrary Coxeter groups built on [DGK17]. Let WS,M be a Coxeter group. For any non-negative real number λ, the λ-Cosine matrix of W is a symmetric matrix whose entries are: λ CW λ (CW )st = −2 cos ( π M st λ ) if M st < ∞ and (CW )st = −2(1 + λ) otherwise λ In the case λ = 0, CW = CW . When λ > 0, then by Proposition 4.3, we have: λ ● the matrix CW satisfies (H0 ) if and only if S does not contain any affine subset of rank at least 3; λ λ ● Assume that CW satisfies (H0 ). Then CW satisfies (H− ) if and only if S does not contain two orthogonal non-spherical subsets. Proof of Moussong’s criterion. If W is Gromov-hyperbolic, then it does not contain any subgroup isomorphic to Z2 , and so it satisfies Moussong’s criterion. In other words, S does not contain any affine subset of rank ⩾ 3 nor two orthogonal non-spherical subsets. Conversely, suppose that W satisfies Moussong’s criterion. We may assume without loss of generality λ that W is infinite and irreducible. Then for any positive number λ, the λ-Cosine matrix CW of W is an irreducible symmetric Cartan matrix of signature ( p, q, r ) for some p, q ⩾ 1 satisfying the conditions (H0 ) and (H− ). By Theorem 4.6, the subgroup σCλ (W ) of O(BCλ ) is H p,q−1 -convex cocompact, hence W is Gromov-hyperbolic by Theorem 1.7 of [DGK17]. W W  ADS STRICTLY GHC-REGULAR GROUPS WHICH ARE NOT LATTICES 21 8. P ROOF OF T HEOREMS E AND F In order to prove Theorems E and F, it is enough to exhibit two isolated points in the character variety of interest. To do this, we will consider a Coxeter diagram on d + 3 nodes with one infinite edge label, such that the finite labels, when set to particular values, give rise to a uniform lattice W0 of POd,1 (R). In particular, the corresponding symmetric Cartan matrix A 0 has a two-dimensional kernel. We perturb the finite labels of W0 to get a new Coxeter group W so that the Gromov boundary of W stays a ( d − 1)-sphere. Generically a symmetric Cartan matrix A compatible with W becomes invertible, but two choices for the entry of A at the infinite label yield the result that A has one-dimensional kernel, i.e. an action on Hd +1 or Hd,1 , depending on signature. These actions are rigid since there is only one infinite label to play with. Proof of Theorems E and F. Each item of Tables 1 or 2 corresponds to a one-parameter family (Wp ) p or a two-parameter family (Wp,q ) p,q of Coxeter groups. We often denote Wp or Wp,q simply by W or WS . p⩾7 p⩾7 q⩾7 5 ∞ ( p 0 , q0 ) ∶= (10, 10) q⩾7 4 ∞ ∞ ( p 0 , q0 ) ∶= (8, 8) p 0 ∶= 10 p⩾7 p⩾7 q⩾7 4 p⩾7 4 4 4 p⩾7 4 4 4 4 4 4 ∞ ∞ ∞ ( p 0 , q0 ) ∶= (8, 8) p 0 ∶= 8 p 0 ∶= 8 T ABLE 1. Abstract geometric reflection groups of dimension d = 4 5 p⩾7 ∞ p 0 ∶= 10 T ABLE 2. Abstract geometric reflection groups of dimension d = 6 Let d be the rank of W minus 3. It is easy to verify that the Coxeter group W is Gromovhyperbolic using Moussong’s hyperbolicity criterion (see Theorem 3.4). In [Tum07], Tumarkin showed that if ( p, q) = ( p 0 , q 0 ) (resp. p = p 0 ), then Wp,q (resp. Wp ) is the geometric reflection group of a compact hyperbolic d -polytope. Note that if W0 and W1 are two Coxeter groups such that ( i ) the underlying graphs of GW0 and GW1 are equal; ( ii ) the Coxeter diagram GW1 is obtained from GW0 by changing from a label m 0 ⩾ 7 on a fixed edge to another label m 1 ⩾ 7, then the nerves of W0 and W1 are isomorphic. Thus, the nerve of any 22 GYE-SEON LEE AND LUDOVIC MARQUIS Coxeter group Wp,q (resp. Wp ) is isomorphic to the nerve of Wp0 ,q0 (resp. Wp0 ), and so the Coxeter group W is an abstract geometric reflection group of dimension d . By Theorem 2.4, the Davis complex of W and the Gromov boundary of W are homeomorphic to Rd and Sd −1 , respectively. We denote by S 1 (resp. S 2 ) the complement of the light-shaded (resp. dark-shaded) node in S . For example, if WS corresponds to the top left diagram in Table 1, then WS1 (resp. WS2 ) corresponds to the diagram (A) (resp. (B)) in Figure 3. p⩾7 q⩾7 p⩾7 q⩾7 (A) (B) F IGURE 3. Two special subgroups of the Coxeter group WS By the same reasoning as in the proof of Proposition 3.5, the signature sWS of WS i , i = 1, 2, i is determined by the sign of the determinant of CWS . More precisely, the signature sWS is i i (d, 2, 0), (d, 1, 1) and (d + 1, 1, 0) when det(CWS ) > 0, = 0 and < 0, respectively. i We set λ f (λ) = det(CW ), which is a quadratic polynomial of λ: f (λ) = a 2 λ2 + a 1 λ + a 0 It is not difficult (but important) to see that the discriminant δ of f (λ) is: δ = 16 det(CWS ) det(CWS ) 1 2 Thus, the polynomial f (λ) has two distinct positive real roots if and only if (3) det(CWS ) det(CWS ) > 0, 2 1 a 1 a 2 < 0 and a 0 a 2 > 0. Lemma 8.1. Let W be a Coxeter group with Coxeter diagram in Tables 1 or 2. Then W satisfies the condition (3) if and only if the Coxeter diagram of W lies in Tables 12, 13, 14, 15. Proof. We only prove it for the Coxeter group Wp,q in the top left item of Table 1; the argument is similar for other Coxeter groups. We set c m ∶= cos( 2mπ ), and let x = c p and y = c q . Note that x, y > simple computation, we have that the polynomial f (λ) is: 1 2 because p, q ⩾ 7. By a f (λ) = a 2 ( x, y)λ2 + a 1 ( x, y)λ + a 0 ( x, y) a 0 ( x, y) = 8(2 x + 2 y − 3) a 1 ( x, y) = −16(2 x − 1)(2 y − 1) <0 a 2 ( x, y) = 8 (1 − (2 x − 1)(2 y − 1)) > 0 and the discriminant δ( x, y) of f (λ) is: δ( x, y) = 16 det(CWS ) det(CWS ) 1 det(CWS ) = 4(4 x y − 2 x − 1) 1 and 2 det(CWS ) = 4(4 x y − 2 y − 1) 2 ADS STRICTLY GHC-REGULAR GROUPS WHICH ARE NOT LATTICES 23 In Figure 4, the curves det(CWS ) = 0, det(CWS ) = 0 and a 0 ( x, y) = 0 are drawn in red, blue 1 2 and green, respectively. y det(CWS ) = 0 1 c 18 / RD c 13 c 11 c 10 RL c9 / a 0 ( x, y) = 0 c8 det(CWS ) = 0 2 / c7 c7 c8 c 9 c 10 c 11 c 13 c 18 x F IGURE 4. Two open regions RD and RL Observe that the Coxeter group Wp,q satisfies the condition (3) if and only if ( x, y) = ( c p , c q ) lies in the dark-shaded region RD or the light-shaded region RL . Finally, it follows from Figure 4 that: ( c p , c q ) ∈ RD ⇔ p, q ⩾ 9 and { p, q} ≠ {9, 9}, {9, 10}, . . . , {9, 18}, {10, 10}; ( c p , c q ) ∈ RL ⇔ { p, q} = {7, 13}, {8, 10}, {8, 11}, {9, 9}, {9, 10} For example, the point ( c p , c q ) lies in RL if and only if it corresponds to one of the black dots in Figure 4.  Assume now that the Coxeter diagram of WS lies in Tables 12, 13, 14, 15. Then the polyλ nomial f (λ) = det(CW ) has two distinct positive roots, namely λ1 and λ2 . Note that the matrices CWS and CWS have the same signature because their determinants have the same 1 2 sign. If the Cosine matrix CWS (hence CWS ) has the signature ( m, n, 0) with ( m, n) = ( d, 2) 1 2 λi C i ∶= CW , or ( d + 1, 1), then the signature of i = 1, 2, is ( m, n, 1). Thus, Theorem 4.6 provides Hm,n−1 -convex cocompact representations σC i ∶ W → PO(BC i ) ≃ POm,n (R) for i = 1, 2. For example, in the case where W = Wp,q in the top left item of Table 1 and the point ( c p , c q ) lies in RD (resp. RL ), the Coxeter group W admits two convex cocompact actions on H4,1 (resp. H5 ). We let [ρ ] denote the equivalence class of the representation ρ , i.e. an element of the POm,n (R)-character variety of W . Since C1 ≠ C2 , the characters [σC1 ] and [σC2 ] are different. Finally, we claim that for each i = 1, 2, the connected component χ i of the POm,n (R)-character variety of W containing [σC i ] is a singleton. Indeed, suppose that τ1 ∈ χ i . Then there exists a continuous path τ t ∶ [0, 1] → χ i from τ0 = σC i to τ1 . This implies that for each torsion 24 GYE-SEON LEE AND LUDOVIC MARQUIS element γ ∈ W , the eigenvalues of τ t (γ) do not change, i.e. the image τ t (γ) is conjugate to τ0 (γ) = σC i (γ). In particular, for every s ∈ S , τ t ( s) is a projective reflection in POm,n (R), and there exists a continuous family of symmetric Cartan matrices ( A t ) t∈[0,1] with σ A t = τ t . µ Hence we conclude that there is a continuous function µ t ∶ [0, 1] → R with CWt = A t because the diagram GW has only one edge of label ∞. The matrix A t must be of rank ⩽ m + n = d + 2. µ In other words, det(CWt ) = 0, and so µ t = λ i , as claimed. This completes the proof of Theorems E and F.  Remark 8.2. As mentioned above, the Coxeter group W with ( p, q) = ( p 0 , q 0 ) or p = p 0 is the geometric reflection group of a compact hyperbolic d -polytope. Thus, by the same reasoning as in Example 2.3.1 of Januszkiewicz–Światkowski ˛ [JŚ03] (cf. Proposition 6.8), if ( p, q) ≠ ( p 0 , q0 ) (resp. p ≠ p 0 ), then Wp,q (resp. Wp ) is not quasi-isometric to the hyperbolic space Hd . Remark 8.3. Recently, Davis asked the following question (see Question 2.15 of [Dav15]): Is any abstract geometric reflection group of dimension d isomorphic to a projective Coxeter group in SL±d +1 (R)? He also conjectured that almost certainly the answer is no. The counterexamples can be constructed as follows. Let W be a Coxeter group with Coxeter diagram in Tables 4, 5, 6, 7, 8, 9. By Proposition 3.1, W is an abstract geometric reflection group of dimension d . We now claim that if the underlying graph of the diagram GW is a tree, then W is not isomorphic to a projective Coxeter group in SL±d +1 (R). Indeed, suppose by contradiction that W is isomorphic to a projective Coxeter group ΓP generated by reflections (σs = Id − αs ⊗ b s )s∈S of SL±d+1 (R). Then the Cartan matrix A = (αs (b t ))s,t∈S of P is of rank ⩽ d + 1. Since GW has no edge of label ∞ and its underlying graph is a tree, by Proposition 20 of Vinberg [Vin71], we may assume that the Cartan matrix A is symmetric, i.e. A = CW . However, it is impossible since by Propositions 3.5 and 3.7, the matrix CW is of rank d + 2. We finally note that Tables 4, 5, 7, 9 do contain Coxeter diagrams whose underlying graphs are trees. ADS STRICTLY GHC-REGULAR GROUPS WHICH ARE NOT LATTICES 25 A PPENDIX A. T HE TABLES OF THE C OXETER GROUPS The labels E i , Q j , Tk provide the information of relationships between Coxeter diagrams in Tables 3, 4, 5, in Tables 10, 12, 14 and in Tables 11, 13, 15, i.e. the diagrams in the item with same label are the same except for different ranges of p and q. A.1. Esselmann’s examples. Each Coxeter group in Table 3 admits a Fuchsian representation. E1 E2 4 E3 4 10 5 5 4 4 4 4 5 E5 E6 8 E4 8 4 E7 5 8 4 10 5 5 5 5 T ABLE 3. Geometric reflection groups of dimension d = 4 and of rank d + 2 A.2. Examples to Theorem D. Each Coxeter group in Table 4 admits a quasi-Fuchsian representation into PO5,1 (R). E1 Q1 4 E2 5 p Q2 4 p 5 4 5 5 p = 7, 8, 9 4 5 5 p = 7, 8 Q3 Q4 Q5 4 7 4 E3 5 7 7 4 4 7 4 q Q6 5 4 4 Q7 Q9 Q8 p q 5 7 4 { p, q} = {7, 7}, {7, 8} Q10 4 p E5 q 5 ( p, q) = (4, 7), (4, 8) E6 p 5 Q11 5 p 5 p = 7, 8, 9, 10, 11, 12 { p, q} = {7, 7}, {7, 8}, {7, 9} E7 4 5 p 5 p = 7, 8, 9 p 4 5 p = 4, 5, 6 T ABLE 4. Abstract geometric reflection groups of dimension d = 4 and of rank d + 2 26 GYE-SEON LEE AND LUDOVIC MARQUIS A.3. Examples to Theorems B and C. Each Coxeter group in Tables 5, 6, 7, 8 and 9 admits a strictly GHC-regular representation. E1 Q1 4 E2 5 p ⩾ 11 5 Q4 p⩾7 q⩾4 5 p⩾6 5 Q3 Q2 4 p⩾9 p⩾5 5 4 p⩾7 q⩾3 5 Q5 4 p⩾7 q⩾3 5 p⩾7 q⩾3 4 ( p, q) ≠ (7, 4) ( p, q) ≠ (7, 3) 5 p⩾7 q⩾3 E3 5 p⩾7 q⩾3 4 ( p, q) ≠ (7, 3) 4 q⩾4 p⩾7 4 q⩾4 p⩾5 5 ( p, q) ≠ (7, 4), (8, 4) Q6 E4 p⩾4 5 q⩾4 4 4 q⩾4 ( p, q) ≠ (4, 4) p⩾4 q⩾4 5 q⩾3 p⩾4 q⩾3 p⩾4 Q7 4 Q8 p⩾7 q⩾7 q⩾7 4 E5 p⩾4 ( p, q) ≠ (5, 7) E6 5 5 5 q⩾7 ( p, q) ≠ (4, 7), (4, 8) Q11 p ⩾ 11 p⩾4 5 Q9 p⩾5 { p, q} ≠ {7, 7}, {7, 8} p ⩾ 13 5 q⩾3 4 5 p⩾4 5 4 p⩾4 4 q⩾3 ( p, q) ≠ (4, 4) q⩾3 Q10 p⩾4 p⩾7 4 { p, q} ≠ {7, 7}, {7, 8}, {7, 9}, {8, 8} E7 4 5 p⩾7 5 q⩾7 p⩾6 5 T ABLE 5. Abstract geometric reflection groups of dimension d = 4 and of rank d + 2 ADS STRICTLY GHC-REGULAR GROUPS WHICH ARE NOT LATTICES 4 27 4 p⩾7 p⩾4 T ABLE 6. Abstract geometric reflection groups of dimension d = 5 and of rank d + 2 5 p⩾4 4 p⩾7 5 p⩾4 5 4 p⩾5 T ABLE 7. Abstract geometric reflection groups of dimension d = 6 and of rank d + 2 4 5 T ABLE 8. An abstract geometric reflection group of dimension d = 7 and of rank d + 2 5 4 5 5 T ABLE 9. Abstract geometric reflection groups of dimension d = 8 and of rank d + 2 A.4. Tumarkin’s Examples. Each Coxeter group in Tables 10 and 11 admits a Fuchsian representation. T1 10 10 ∞ 8 4 ∞ ∞ 8 T6 T5 T4 8 4 10 5 8 4 8 4 4 8 T3 T2 4 4 ∞ 4 4 4 4 ∞ ∞ T ABLE 10. Geometric reflection groups of dimension d = 4 and of rank d + 3 T7 5 10 ∞ T ABLE 11. Geometric reflection groups of dimension d = 6 and of rank d + 3 28 GYE-SEON LEE AND LUDOVIC MARQUIS A.5. Examples to Theorem E. The space of strictly GHC-regular characters of each Coxeter group in Tables 12 and 13 is disconnected. T1 p⩾9 T2 q⩾9 p⩾7 T3 p ⩾ 11 5 ∞ ∞ p⩾8 ∞ ( p, q) ≠ (7, 8), (7, 9), (8, 8) T5 q⩾8 4 4 ∞ 4 4 4 4 p⩾9 T6 p⩾9 4 4 q⩾8 4 { p, q} ≠ {9, 9}, {9, 10}, . . . , {9, 18}, {10, 10} T4 4 4 ∞ ∞ ( p, q) ≠ (8, 8) T ABLE 12. Abstract geometric reflection groups of dimension d = 4 and of rank d + 3 T7 p ⩾ 11 5 ∞ T ABLE 13. Abstract geometric reflection groups of dimension d = 6 and of rank d + 3 A.6. Examples to Theorem F. The space of quasi-Fuchsian characters of each Coxeter group in Tables 14 and 15 is disconnected. T1 p T2 q p 5 ∞ p ( p, q) = (7, 8), (9, 7) T5 7 4 4 q ∞ p = 8, 9 q 4 4 ∞ 4 4 ∞ { p, q} = {7, 13}, {8, 10}, {8, 11}, {9, 9}, {9, 10} T4 p T3 4 7 T6 4 4 4 ∞ 4 ∞ { p, q} = {7, 7}, {7, 8} T ABLE 14. Abstract geometric reflection groups of dimension d = 4 and of rank d + 3 T7 p 5 ∞ p = 8, 9 T ABLE 15. Abstract geometric reflection groups of dimension d = 6 and of rank d + 3 ADS STRICTLY GHC-REGULAR GROUPS WHICH ARE NOT LATTICES 29 A PPENDIX B. T HE SPHERICAL , AFFINE AND L ANNÉR DIAGRAMS For the reader’s convenience, we reproduce below the list of the irreducible spherical, irreducible affine and Lannér diagrams. Ã n ( n ⩾ 2) A n ( n ⩾ 1) B n ( n ⩾ 2) B̃ n ( n ⩾ 3) 4 C̃ n ( n ⩾ 3) 4 4 4 D n ( n ⩾ 4) I 2 ( p) H3 H4 F4 D̃ n ( n ⩾ 4) p 5 Ã 1 5 B̃2 = C̃ 2 4 E6 G̃ 2 F̃4 ∞ 4 4 6 4 Ẽ 6 E7 E8 T ABLE 16. The irreducible spherical Coxeter diagrams Ẽ 7 Ẽ 8 T ABLE 17. The irreducible affine Coxeter diagrams 30 GYE-SEON LEE AND LUDOVIC MARQUIS 5 p 5 q p r + 1q + 1r < 1 1 p 5 4 5 4 4 4 q 5 1 p 4 5 + 1q < 12 5 5 5 4 5 5 5 5 5 4 T ABLE 18. The Lannér Coxeter diagrams R EFERENCES Thierry Barbot. Causal properties of AdS-isometry groups. I. Causal actions and limit sets. Adv. Theor. Math. Phys., 12(1):1–66, 2008. 2 [Bar15] Thierry Barbot. Deformations of Fuchsian AdS representations are quasi-Fuchsian. J. Differential Geom., 101(1):1–46, 2015. 2, 4, 5 [9A12] T. Barbot, F. Bonsante, J. Danciger, W. M. Goldman, F. Guéritaud, F. Kassel, K. Krasnov, J.-M. Schlenker, and A. Zeghib. Some open questions on anti-de Sitter geometry. ArXiv:1205.6103, May 2012. 1, 3, 5 [Ben06] Yves Benoist. Convexes hyperboliques et quasiisométries. Geom. Dedicata, 122:109–134, 2006. 20 [BK13] Marc Bourdon and Bruce Kleiner. Combinatorial modulus, the combinatorial Loewner property, and Coxeter groups. Groups Geom. Dyn., 7(1):39–107, 2013. 3 [BM12] Thierry Barbot and Quentin Mérigot. Anosov AdS representations are quasi-Fuchsian. Groups Geom. Dyn., 6(3):441–483, 2012. 1, 2, 3, 5 [Bou68] Nicolas Bourbaki. Groupes et algèbres de Lie, Chapitre IV, V, VI. Hermann, 1968. 13, 14 [CD00] Ruth Charney and Michael Davis. When is a Coxeter system determined by its Coxeter group? J. London Math. Soc. (2), 61(2):441–461, 2000. 17 [Cho96] Richard Chow. Groups quasi-isometric to complex hyperbolic space. Trans. Amer. Math. Soc., 348(5):1757–1769, 1996. 19 [CJ94] Andrew Casson and Douglas Jungreis. Convergence groups and Seifert fibered 3-manifolds. Invent. Math., 118(3):441–456, 1994. 3 [CLR98] Daryl Cooper, Darren D. Long, and Alan W. Reid. Infinite Coxeter groups are virtually indicable. Proc. Edinburgh Math. Soc. (2), 41(2):303–313, 1998. 19 [Dav98] Michael W. Davis. The cohomology of a Coxeter group with group ring coefficients. Duke Math. J., 91(2):297–314, 1998. 19 [Dav08] Michael W. Davis. The geometry and topology of Coxeter groups, volume 32 of London Mathematical Society Monographs Series. Princeton University Press, Princeton, NJ, 2008. 7, 8, 16, 17, 20 [Dav15] Michael W. Davis. The geometry and topology of Coxeter groups. In Introduction to modern mathematics, volume 33 of Adv. Lect. Math., pages 129–142. Int. Press, Somerville, MA, 2015. 24 [dCdlH07] Yves de Cornulier and Pierre de la Harpe. Décompositions de groupes par produit direct et groupes de Coxeter. In Geometric group theory, Trends Math., pages 75–102. Birkhäuser, 2007. 19 [Bar08] ADS STRICTLY GHC-REGULAR GROUPS WHICH ARE NOT LATTICES 31 [DGK17] Jeffrey Danciger, François Guéritaud, and Fanny Kassel. Convex cocompactness in pseudoriemannian hyperbolic spaces. Geometriae Dedicata, Dec 2017. 1, 3, 4, 5, 14, 16, 20 [DJ91] Michael W. Davis and Tadeusz Januszkiewicz. Hyperbolization of polyhedra. J. Differential Geom., 34(2):347–388, 1991. 7 [DK17] Cornelia Druţu and Misha Kapovich. Geometric group theory. A book to appear in the AMS series "Colloquium Publications", 2017. 3, 19 [EF97] Alex Eskin and Benson Farb. Quasi-flats and rigidity in higher rank symmetric spaces. J. Amer. Math. Soc., 10(3):653–692, 1997. 19 [Ess96] Frank Esselmann. The classification of compact hyperbolic Coxeter d -polytopes with d + 2 facets. Comment. Math. Helv., 71(2):229–242, 1996. 4, 10, 11 [Far97] Benson Farb. The quasi-isometry classification of lattices in semisimple Lie groups. Math. Res. Lett., 4(5):705–717, 1997. 19 [Gab92] David Gabai. Convergence groups are Fuchsian groups. Ann. of Math. (2), 136(3):447–510, 1992. 3 [Gon97] Constantin Gonciulea. Infinite Coxeter groups virtually surject onto Z. Comment. Math. Helv., 72(2):257–265, 1997. 19 [GW12] Olivier Guichard and Anna Wienhard. Anosov representations: domains of discontinuity and applications. Invent. Math., 190(2):357–438, 2012. 3 [JŚ03] Tadeusz Januszkiewicz and Jacek Światkowski. ˛ Hyperbolic Coxeter groups of large dimension. Comment. Math. Helv., 78(3):555–583, 2003. 20, 24 [KL97] Bruce Kleiner and Bernhard Leeb. Rigidity of quasi-isometries for symmetric spaces and Euclidean buildings. Inst. Hautes Études Sci. Publ. Math., 86:115–197 (1998), 1997. 19 [KL01] Bruce Kleiner and Bernhard Leeb. Groups quasi-isometric to symmetric spaces. Comm. Anal. Geom., 9(2):239–260, 2001. 19 [Lab06] François Labourie. Anosov flows, surface groups and curves in projective space. Invent. Math., 165(1):51–114, 2006. 3 [Mar78] Gregory A. Margulis. Quotient groups of discrete subgroups and measure theory. Funktsional. Anal. i Prilozhen., 12:295–305, 1978. 19 [Mes07] Geoffrey Mess. Lorentz spacetimes of constant curvature. Geom. Dedicata, 126:3–45, 2007. 2 [Mou88] Gabor Moussong. Hyperbolic Coxeter groups. ProQuest LLC, Ann Arbor, MI, 1988. Thesis (Ph.D.)– The Ohio State University. 1, 7, 8, 20 [MV00] Gregory A. Margulis and Érnest Vinberg. Some linear groups virtually having a free quotient. J. Lie Theory, 10(1):171–180, 2000. 6 [Pan89] Pierre Pansu. Métriques de Carnot-Carathéodory et quasiisométries des espaces symétriques de rang un. Ann. of Math. (2), 129(1):1–60, 1989. 19 [Par07] Luis Paris. Irreducible Coxeter groups. Internat. J. Algebra Comput., 17(3), 2007. 19 [Qi07] Dongwen Qi. On irreducible, infinite, nonaffine Coxeter groups. Fund. Math., 193(1):79–93, 2007. 19 [Rag72] Madabusi S. Raghunathan. Discrete subgroups of Lie groups. Springer-Verlag, New YorkHeidelberg, 1972. Ergebnisse der Mathematik und ihrer Grenzgebiete, Band 68. 19 [Sto76] David A. Stone. Geodesics in piecewise linear manifolds. Trans. Amer. Math. Soc., 215:1–44, 1976. 7, 8 [Tuk86] Pekka Tukia. On quasiconformal groups. J. Analyse Math., 46:318–346, 1986. 19 [Tuk88] Pekka Tukia. Homeomorphic conjugates of Fuchsian groups. J. Reine Angew. Math., 391:1–54, 1988. 3 [Tum07] Pavel Tumarkin. Compact hyperbolic Coxeter n-polytopes with n + 3 facets. Electron. J. Combin., 14(1):Research Paper 69, 36, 2007. 5, 21 [Vin71] Érnest Vinberg. Discrete linear groups that are generated by reflections. Izv. Akad. Nauk SSSR Ser. Mat., 35:1072–1112, 1971. 11, 12, 13, 14, 16, 24 [Vin84] Érnest Vinberg. Absence of crystallographic groups of reflections in Lobachevskiı̆ spaces of large dimension. Trudy Moskov. Mat. Obshch., 47:68–102, 246, 1984. 10, 11 32 GYE-SEON LEE AND LUDOVIC MARQUIS M ATHEMATISCHES I NSTITUT, R UPRECHT-K ARLS -U NIVERSITÄT H EIDELBERG, G ERMANY E-mail address: [email protected] U NIV R ENNES, CNRS, IRMAR - UMR 6625, F-35000 R ENNES, F RANCE E-mail address: [email protected]
4math.GR
arXiv:1711.08866v1 [math.CO] 24 Nov 2017 RECOVERING TREE-CHILD NETWORKS FROM SHORTEST INTER-TAXA DISTANCE INFORMATION MAGNUS BORDEWICH, KATHARINA T. HUBER, VINCENT MOULTON, AND CHARLES SEMPLE Abstract. Phylogenetic networks are a type of leaf-labelled, acyclic, directed graph used by biologists to represent the evolutionary history of species whose past includes reticulation events. A phylogenetic network is tree-child if each non-leaf vertex is the parent of a tree vertex or a leaf. Up to a certain equivalence, it has been recently shown that, under two different types of weightings, edge-weighted tree-child networks are determined by their collection of distances between each pair of taxa. However, the size of these collections can be exponential in the size of the taxa set. In this paper, we show that, if we ignore redundant edges, the same results are obtained with only a quadratic number of inter-taxa distances by using the shortest distance between each pair of taxa. The proofs are constructive and give cubic-time algorithms in the size of the taxa sets for building such weighted networks. 1. Introduction Distance-based methods collectively provide fundamental tools for the reconstruction and analysis of phylogenetic (evolutionary) trees. Two of the most popular and longstanding distance-based methods are UPGMA [14] and Neighbor Joining [11]. Loosely speaking, these methods take as input a distance matrix D on a set X of taxa, whose entries are the distances between pairs of taxa in X, and return an edge-weighted phylogenetic tree on X that best represents D. Distances between taxa could, for example, measure the time since the two taxa separated from a common ancestor. Typically, the property underlying any distance-based method is the following: if T is a phylogenetic tree whose edges are assigned a positive real-valued weight, then the pairwise distances between taxa is sufficient to determine T and its edge weighting [6, 13, 20]. This property is frequently referred to as the Tree-Metric Theorem (see [12, Theorem 7.2.6]). Date: November 27, 2017. 1991 Mathematics Subject Classification. 05C85, 68R10. Key words and phrases. Distance matrix, tree-child network, normal network. The second and third authors were supported by the London Mathematical Society. The fourth author was supported by the New Zealand Marsden Fund. 1 2 BORDEWICH, HUBER, MOULTON, AND SEMPLE While there exist numerous distance-based methods for reconstructing and analysing phylogenetic trees that aim to explicitly represent the treelike evolution of species, there are only a small number of such methods for phylogenetic networks. Yet, phylogenetic networks are necessary to accurately represent the ancestral history of sets of taxa whose evolution includes nontreelike (reticulate) evolutionary processes such as hybridisation and lateral gene transfer. As a step towards developing practical distance-based methods for reconstructing and analysing phylogenetic networks, in this paper we are interested in establishing analogues of the Tree-Metric Theorem for edge-weighted phylogenetic networks. In particular, we establish two such analogues for the increasingly prominent class of tree-child networks. Briefly, we show that, under two types of weightings, edge-weighted tree-child networks on X with no redundant edges can be reconstructed from the pairwise shortest distances between taxa in time polynomial in the size of X. The first type of weighting induces an ultrametric, while the second type of weighting has the property that the pair of edges directed into a reticulation (i.e. a vertex of in-degree two) have equal weight. We envisage that these results could lead to practical algorithms to construct phylogenetic networks from distance data. In related work, Chan et al. [8] take a matrix of inter-taxa distances and reconstruct an ultrametric galled network having the property that there is a path between each pair of taxa having the same length as that given in the matrix, if such a network exists. Willson [18] studied the problem of determining a phylogenetic network given the average distance between each pair of taxa, where each reticulation assigns a probability to the two edges directed into it. It is shown in [18] that such distances are enough to determine a phylogenetic network with a single reticulation cycle in polynomial time. Bordewich and Semple [3], the original starting point for this paper, showed that (unweighted) tree-child networks can be reconstructed from the multi-set of distances between taxa in polynomial time. Other methods have been developed for building phylogenetic networks from distance data (see, for example, [16, 19]) but these use different approaches to associate a distance to a network than the ones presented here. In addition, Huber and Scholz [9] considered the problem of reconstructing phylogenetic networks from so-called symbolic distances, and it would be interesting to see if our new results could extend to such distances. Two other papers (specificially [4, 5]) that are particularly relevant to the work of our paper, are discussed in more detail in the next section. Although distance based methods may be considered not as accurate as other methods such as Maximum Likelihood, they still have an important role in studying large datasets and gaining quick results when exploring data. This role may even be more significant for phylogenetic networks, where the complexity of inferring optimal solutions is even higher than for RECOVERING TREE-CHILD NETWORKS 3 phylogenetic trees. The next section details some background and gives the statements of the two main results. 2. Main Results Throughout the paper, X denotes a non-empty finite set. A phylogenetic network N on X is a rooted acyclic directed graph with no parallel edges satisfying the following: (i) the unique root has out-degree two; (ii) the set X is the set of vertices of out-degree zero, each of which has in-degree one; and (iii) all other vertices either have in-degree one and out-degree two, or indegree two and out-degree one. If |X| = 1, then we additionally allow the directed graph consisting of the single vertex in X to be a phylogenetic network. The vertices in X are called leaves, while the vertices of in-degree one and out-degree two are tree vertices, and the vertices of in-degree two and out-degree one are reticulations. An edge directed into a reticulation is a reticulation edge; all other edges are tree edges. An element in X is an outgroup if its parent is the root of N . Furthermore, an edge e = (u, v) is a shortcut if there is a directed path in N from u to v avoiding e. Note that, necessarily, a shortcut is a reticulation edge. In the literature, shortcuts are also known as redundant edges. Ignoring the weighting of the edges, Fig. 1(i) shows a phylogenetic network with root ρ, outgroup r, and X = {r, x1 , x2 , x3 , x4 , x5 , x6 }. It has exactly two reticulations, but no shortcuts. Let N be a phylogenetic network. We say N is tree-child if each non-leaf vertex in N is the parent of either a tree vertex or a leaf. Moreover, N is normal if it is tree-child and has no shortcuts. For example, the phylogenetic network in Fig. 1(i) is normal. As with all figures in this paper, edges are directed down the page. Tree-child networks and normal networks were introduced by Cardona et al. [7] and Willson [15, 17], respectively. Let N be a phylogenetic network on X, and let E denote the edge set of N . A weighting of N is a function w : E → R that assigns edges a non-negative real-valued weight such that tree edges are assigned a strictly positive weight. Thus reticulation edges are allowed weight zero. Let (N , w) be a weighted phylogenetic network, and let v and v 0 be vertices in N . An up-down path P from v to v 0 is an underlying path v = u0 , u1 , u2 , . . . , uk = v 0 , 4 BORDEWICH, HUBER, MOULTON, AND SEMPLE ρ 1 4 2 3 5 2 x1 2 x2 1 r 2 1 1 2 1 7 3 x3 2 4 3 x4 x5 x6 (i) (N , w) ρ 1 4 0 5 5 2 x1 x2 0 x3 1 r 2 0 0 2 1 7 3 4 x4 2 4 x5 x6 (ii) (N , w0 ) Figure 1. Two (weighted) phylogenetic networks on {r, x1 , x2 , x3 , x4 , x5 , x6 }. where, for some i, (ui , ui−1 ), (ui−1 , ui−2 ), . . . , (u1 , v) and (ui , ui+1 ), (ui+1 , ui+2 ), . . . , (uk−1 , v 0 ) are edges in N . The length of P is the sum of the weights of the edges in P and, provide v and v 0 are distinct, ui is the peak of P . In Fig. 1(i), there are exactly two up-down paths joining x3 and x5 . One path has weight 21, while the other path has weight 14. As in this example, in this paper we are interested in the inter-taxa distances in (N , w), that is, the lengths of the updown paths connecting leaves in X. We next state two recent results [5, 4]. Both results prompted the two main results in this paper. Let (N , w) be a weighted phylogenetic network on X and, for all x, y ∈ X, let Px,y be the set of up-down paths from x to y in (N , w). The multi-set of distances from x to y, denoted Dx,y , is the multi-set of the lengths of the RECOVERING TREE-CHILD NETWORKS 5 paths in Px,y . Similarly, the set of distances from x to y, denoted Dx,y , is the set of the lengths of the paths in Px,y . Note that Dx,y = Dy,x , Dx,x = {0}, Dx,y = Dy,x , and Dx,x = {0} for all x, y ∈ X. The multi-set distance matrix D of (N , w) is the |X|×|X| matrix whose (x, y)-th entry is Dx,y (respectively, the set distance matrix D of (N , w) is the |X| × |X| matrix whose (x, y)-th entry is Dx,y ) for all x, y ∈ X, in which case we say D (resp. D) is realised by (N , w). Let (N , w) be a weighted phylogenetic network on X and let D be the multi-set distance matrix of (N , w). The underlying problem we are investigating is determining how much D says about (N , w). The following highlights that, even with tree edges having positive weights, the weighting of (N , w) cannot be determined exactly. Let u be a reticulation in N with parents pu and qu , and let v be the unique child of u. We can change the weighting of the edges incident with u without changing D. In particular, provided the sum of the weights of (pu , u) and (u, v) equal w(pu , u) + w(u, v) and the sum of the weights of (qu , u) and (u, v) equal w(qu , u) + w(u, v), we can change the weights of (pu , u), (qu , u), and (u, v) (keeping the weights of all other edges the same) to construct a different weighting, w0 say, so that D is realised by (N , w0 ). We refer to this change as re-weighting the edges at a reticulation of N . For example, in Fig. 1, (N , w0 ) has been obtained from (N , w) by reweighting the edges at both reticulations. If N has an outgroup r, a similar occurrence happens with the two edges incident with the root ρ of N . In particular, now let u be the child of ρ that is not r. Note that u is a tree vertex. Then, provided the weights of (ρ, r) and (ρ, u) sum to w(ρ, r) + w(ρ, u), we can change the weights of (ρ, r) and (ρ, u) (keeping the weights of all other edges the same) to construct a different weighting, w00 say, so that D is realised by (N , w00 ). We refer to this change as re-weighting the edges at the root of N . Let (N , w) and (N1 , w1 ) be two weighted phylogenetic networks on X. We say (N , w) and (N1 , w1 ) are equivalent if N is isomorphic to N1 , and w1 can be obtained from w by re-weighting the edges at each reticulation and re-weighting the edges at the root. For example, the weighted phylogenetic networks in Fig. 1 are equivalent. We now state the two recent results. A weighting w of a phylogenetic network N is equidistant if the length of all paths starting at the root and ending at a leaf are the same length. While a weighting w of a phylogenetic network is a reticulation-pair weighting if, for each reticulation v in (N , w), 6 BORDEWICH, HUBER, MOULTON, AND SEMPLE 3 1 2 x1 4 1 x2 x3 5 1 1 6 1 4 1 1 2 2 x4 2 x5 4 2 x6 x7 Figure 2. A phylogenetic network with an equidistant weighting. the two edges directed into v have the same weight. The weightings of the phylogenetic networks shown in Fig. 1 are reticulation-pair weightings. The weighting of the phylogenetic network shown in Fig. 2 is an equidistant weighting. The following theorems are established in [5] and [4], respectively. Theorem 2.1. Let D be the set distance matrix of an equidistant-weighted tree-child network (N , w) on X. Then, up to equivalence, (N , w) is the unique such network realising D, in which case a member of its equivalence class can be found from D in O(|X|4 ) time. Theorem 2.2. Let D be the multi-set distance matrix with distinguished element r of a reticulation-pair weighted tree-child network (N , w) on X with outgroup r. Then, up to equivalence, (N , w) is the unique such network realising D, in which case a member of its equivalence class can be found from D in time O(|D|2 ). Theorems 2.1 and 2.2 are somewhat surprising given that, in the size of the leaf set, it is possible to have exponentially-many up-down paths connecting leaves in a tree-child network. For example, Fig. 3 shows a normal network with 2n + 1 leaves x1 , x2 , . . . , x2n+1 in which there are 2n distinct up-down paths connecting x1 and x2n+1 . Nevertheless, the fact that all such paths are considered is not satisfactory. The next two theorems are the two main results of this paper. They show that, up to shortcuts, we can retain the outcomes of Theorems 2.1 and 2.2 by knowing only a quadratic number of inter-taxa distances. Let (N , w) be a weighted phylogenetic network on X. The minimum distance matrix Dmin of (N , w) is the |X| × |X| matrix whose (x, y)-th entry is the minimum length of an up-down path joining x and y for all x, y ∈ X. We denote the (x, y)-th entry in Dmin by dmin (x, y). Theorem 2.3. Let Dmin be the minimum distance matrix of an equidistantweighted normal network (N , w) on X. Then, up to equivalence, (N , w) is the unique such network realising Dmin , in which case a member of its equivalence class can be found from Dmin in O(|X|3 ) time. RECOVERING TREE-CHILD NETWORKS x1 x2 x3 x4 x5 7 x2n x2n+1 Figure 3. A normal network on {x1 , x2 , . . . , x2n+1 }. There are 2n distinct up-down paths connecting x1 and x2n+1 . Now let (N , w) be a weighted phylogenetic network on X ∪ {r}, where r is an outgroup. For the purposes of the next theorem, the minimum distance matrix Dmin of (N , w) is the |X| × |X| matrix whose (x, y)-th entry is dmin (x, y) for all x, y ∈ X. Furthermore, the maximum distance outgroup vector, denoted dmax , is the vector of length |X| whose x-th coordinate is the maximum length of an up-down path joining r and x for all x ∈ X. We denote the x-th coordinate in dmax by dmax (r, x). Theorem 2.4. Let Dmin and dmax be the minimum distance matrix and maximum distance outgroup vector of a reticulation-pair weighted normal network (N , w) on X ∪{r}, where r is an outgroup. Then, up to equivalence, (N , w) is the unique such network realising Dmin and dmax , in which case a member of its equivalence class can be found from Dmin and dmax in O(|X|3 ) time. It is easily seen that it is not possible to extend Theorems 2.3 and 2.4 to treechild networks as the distance information given in the hypothesis of these theorems is insufficient to determine shortcuts. However, these results do hold for temporal tree-child networks as such networks have no shortcuts and are therefore normal. For the definition of temporal phylogenetic network, see [1]. The rest of the paper is organised as follows. The next section contains some necessary preliminaries. In particular, it contains the constructions of the three operations that underlie the inductive proofs of Theorems 2.3 and 2.4. These proofs, including explicit descriptions of the associated algorithms, are given in Sections 4 and 5, respectively. 8 BORDEWICH, HUBER, MOULTON, AND SEMPLE 3. Preliminaries Let N be a phylogenetic network on X and let {s, t} be a 2-element subset of X. Denote the unique parents of s and t by ps and pt , respectively. We call {s, t} a cherry if ps = pt , that is, the parents of s and t are the same. Furthermore, we call {s, t} a reticulated cherry if either ps or pt , say pt , is a reticulation and ps is a parent of pt , in which case t is the reticulation leaf of the reticulated cherry. Observe that ps is necessarily a tree vertex. To illustrate, in Fig. 1(i), {x1 , x2 } is a cherry, while {x3 , x4 } is a reticulated cherry in which x4 is the reticulation leaf. In the same figure, {x4 , x5 } is also a reticulated cherry. The next lemma is well known for tree-child networks (for example, see [3]). The restriction to normal networks is immediate. We will used it freely throughout the paper. Lemma 3.1. Let N be a normal network on X. Then (i) If |X| = 1, then N consists of the single vertex in X, while if |X| = 2, say X = {s, t}, then N consists of the cherry {s, t}. (ii) If |X| ≥ 2, then N has either a cherry or a reticulated cherry. In addition to using the last lemma freely, we will also use freely the following observation. If N is a normal network and u is a vertex of N , then there is a directed path from u to a leaf avoiding reticulations except perhaps u. Let (N , w) be a weighted phylogenetic network on X. We now describe three operations on (N , w). The first and second operations underlie the inductive approach we take to prove Theorem 2.3, while the first and third operations underlie the inductive approach we take to prove Theorem 2.4. Let {s, t} be 2-element subset of X, and denote the parents of s and t by ps and pt , respectively. First suppose that {s, t} is a cherry. Let gs denote the parent of ps . Then reducing t is the operation of deleting t and its incident edge, suppressing ps , and setting the weight of the resulting edge (gs , s) to be w(gs , ps ) + w(ps , s). Now suppose that {s, t} is a reticulated cherry, in which t is the reticulation leaf. Let gs denote the parent of ps , and let gt denote the parent of pt that is not ps . Then cutting {s, t} is the operation of deleting (ps , pt ), suppressing ps and pt , and setting the weight of the resulting edge (gs , s) to be w(gs , ps ) + w(ps , s) and the edge (gt , t) to be w(gt , pt ) + w(pt , t). Lastly, if gt is a tree vertex, then isolating {s, t} is the operation of deleting (gt , pt ), suppressing gt and pt , and setting the weight of the resulting edge RECOVERING TREE-CHILD NETWORKS 3 9 1 2 4 5 1 6 5 1 3 1 x1 1 4 2 x2 x3 x4 2 x5 x6 x7 (N1 , w1 ) 3 1 4 2 1 6 1 x1 2 4 1 x2 5 x3 4 4 2 x4 2 x5 x6 x7 (N2 , w2 ) Figure 4. The weighted phylogenetic networks (N1 , w1 ) and (N2 , w2 ) obtained from the weighted phylogenetic network in Fig. 2 by cutting {x3 , x4 } and isolating {x3 , x4 }, respectively. (ps , t) to be w(ps , pt ) + w(pt , t) and the edge (gt0 , h) to be w(gt0 , gt ) + w(gt , h), where gt0 is the parent of gt and h is the child of gt that is not pt . To illustrate the last two operations, consider Fig. 4. The weighted phylogenetic network (N1 , w1 ) has been obtained from the weighted phylogenetic network in Fig. 2 by cutting {x3 , x4 }, while (N2 , w2 ) has been obtained from the same network by isolating {x3 , x4 }. The proof of the next lemma is straightforward and omitted. Lemma 3.2. Let (N , w) be a weighted normal network. Let {s, t} be a cherry or a reticulated cherry of N . If (N 0 , w0 ) is obtained from (N , w) by reducing t if {s, t} is a cherry, or by cutting or isolating {s, t} if {s, t} is a reticulated cherry, then N is a normal network. Furthermore, if w is an equidistant (resp. reticulation-pair) weighting, then w0 is an equidistant (resp. reticulation-pair) weighting. 10 BORDEWICH, HUBER, MOULTON, AND SEMPLE We next describe three operations on distance matrices that parallel the operations of reducing, cutting, and isolating. Let D be a distance matrix on X with each entry consisting of a single value, that is, D is an |X| × |X| matrix whose (x, y)-th entry is denoted d(x, y). Let {s, t} be a 2-element subset of X. Although the choice of {s, t} appears arbitrary, in the sections that follow, {s, t} will always be a cherry in the case of the first operation or a reticulated cherry in which t is the reticulation leaf in the case of the second and third operations. Furthermore, in the sections that follow, the operations will always be well defined. First, let D0 be the distance matrix on X 0 = X − {t} obtained from D by setting d0 (x, y) = d0 (y, x) = d(x, y) for all x, y ∈ X 0 . We say that D0 has been obtained from D by reducing t in D. For the second operation, let Xt = {x ∈ X − {s, t} : d(t, x) 6= d(s, x)} and let δ = min{d(t, x) : x ∈ Xt }. Furthermore, let Xδ = {x ∈ Xt : d(t, x) = δ}. Intuitively, Xt are those leaves whose shortest path to t does not go through the parent of s, and Xδ are those members of Xt at minimum distance from t. Now let D0 be the distance matrix on X obtained from D by setting d0 (x, y) = d0 (y, x) = d(x, y) for all x, y ∈ X − {t}, setting d0 (t, t) = 0, and setting d0 (t, y) = d0 (y, t) = max{d(x, y) : x ∈ Xδ − {y}} if max{d(x, y) : x ∈ Xδ − {y}} ≥ δ, and d0 (t, y) = d0 (y, t) = δ otherwise for all y ∈ X − {t}. We say that D0 has been obtained from D by cutting {s, t} in D. Intuitively, elements of Xδ are being used as a proxy for t in determining the minimum distances from t to members of Xt − Xδ in D0 ; the distance from t to any member of Xδ remains δ. For the last operation, let r be a distinguished element in X, and let γ = d(r, t) − d(r, s). Intuitively, γ is the difference in length of the edge from the parent of s to s and the path from the parent of s to t. Let D0 be the distance matrix on X obtained from D by setting d0 (x, y) = d0 (y, x) = d(x, y) for all x, y ∈ X − {t}, d0 (t, x) = d0 (x, t) = d(s, x) + γ RECOVERING TREE-CHILD NETWORKS 11 for all x ∈ X − {s, t}, and d0 (t, s) = d0 (s, t) = d(t, s). We say that D0 has been obtained from D by isolating {s, t} in D. 4. Proof of Theorem 2.3 In this section, we establish Theorem 2.3. We begin with two lemmas. Lemma 4.1. Let (N , w) be a equidistant-weighted normal network on X, where |X| ≥ 2. Let Dmin be the minimum distance matrix of (N , w), and let {s, t} be a 2-element subset of X such that dmin (s, t) = min{dmin (x, y) : x, y ∈ X}. Then {s, t} is either a cherry or a reticulated cherry of (N , w). Moreover, (i) The set {s, t} is a cherry of (N , w) if dmin (s, x) = dmin (t, x) for all x ∈ X − {s, t}. (ii) Otherwise, {s, t} is a reticulated cherry of (N , w) in which t is the reticulation leaf precisely if dmin (s, x) > dmin (t, x) for some x ∈ X − {s, t}. Proof. Let ps and pt denote the parents of s and t, respectively. If ps and pt are both reticulations, then, as N is normal and w equidistant, it is easily seen that there is an element x ∈ X − {s, t} such that either dmin (s, t) > dmin (s, x) or dmin (s, t) > dmin (t, x); a contradiction (x is a descendant of a tree vertex on the shortest up-down path from s to t that is not the peak of that up-down path). Thus, either ps or pt is a tree vertex. Without loss of generality, we may assume that ps is a tree vertex. Let u denote the child of ps that is not s. If u is a tree vertex, then, as w is equidistant, dmin (s, t) > dmin (a, b) ≥ min{dmin (x, y) : x, y ∈ X}, where {a, b} is a cherry or reticulated cherry and a, b are descendants of u; a contradiction. Therefore either u is a leaf or a reticulation. If u is a leaf, then, as w is equidistant, u = t, in which case, {s, t} is a cherry. If u is a reticulation, then, as N is normal and dmin (s, t) = min{dmin (x, y) : x, y ∈ X}, it follows that the unique child of u is t, and so {s, t} is a reticulated cherry. Since N has no shortcuts and w is equidistant, it is easily checked that {s, t} is a reticulated cherry in which t is the reticulation leaf if and only if d(s, t) > d(t, x) for some x ∈ X −{s, t}. The lemma immediately follows.  12 BORDEWICH, HUBER, MOULTON, AND SEMPLE Lemma 4.2. Let (N , w) be an equidistant-weighted normal network on X, where |X| ≥ 2. Let Dmin be the minimum distance matrix of (N , w), and let {s, t} be a 2-element subset of X such that dmin (s, t) = min{dmin (x, y) : x, y ∈ X}. Then the distance matrix obtained from Dmin by reducing t, if {s, t} is a cherry, and by cutting {s, t}, if {s, t} is a reticulated cherry in which t is 0 the reticulation leaf, is the minimum distance matrix Dmin realised by the 0 0 weighted network (N , w ) obtained from (N , w) by reducing t, if {s, t} is a cherry, and cutting {s, t}, if {s, t} is a reticulated cherry in which t is the reticulation leaf. Proof. By Lemma 4.1, {s, t} is either a cherry or a reticulated cherry. Furthermore, by the same lemma, if {s, t} is a reticulated cherry, we may assume, without loss of generality, that t is the reticulation leaf. Also, by Lemma 3.2, (N 0 , w0 ) is an equidistant-weighted normal network regardless of which of the two stated ways it is obtained from (N , w). If {s, t} is a cherry, then it is clear that the distance matrix obtained from Dmin by reducing t is the minimum distance matrix of (N 0 , w0 ). Therefore, suppose that {s, t} is a reticulated cherry, in which case (N 0 , w0 ) is obtained from (N , w) by cutting {s, t}. Let D0 be the distance matrix obtained from Dmin by cutting {s, t}. We will show that D0 is the minimum distance matrix 0 Dmin of (N 0 , w0 ). Let ps and pt denote the parents of s and t, respectively, in (N , w). Since the only up-down paths in (N , w) joining elements in X that traverse the edge (ps , pt ) involve t, it follows that d0 (x, y) = d0min (x, y) for all x, y ∈ X − {t}. Thus, to complete the proof, it suffices to show that d0 (t, x) = d0min (t, x) for all x ∈ X − {t}. Let gt denote the parent of pt that is not ps . Since N has no shortcuts, gt is not an ancestor of s. Therefore, as N is normal, there is a (directed) path from gt to a leaf, ` say, containing no reticulations, where ` 6∈ {s, t}. Note that, in what follows, we never determine ` but its existence underlies the rest of the proof. Let Xt = {x ∈ X − {s, t} : dmin (t, x) 6= dmin (s, x)}. Thus, if x ∈ Xt , then every minimum length up-down path in (N , w) joining t and x must traverse the edge (gt , pt ). Observe that ` ∈ Xt as the edge directed into gt , which is a tree edge, has positive weight and every up-down path from s to ` traverses this edge and therefore gt , so dmin (t, `) < dmin (s, `). Now let δ = min{dmin (t, x) : x ∈ Xt } RECOVERING TREE-CHILD NETWORKS 13 and let Xδ denote the subset of Xt consisting of those elements x such that dmin (t, x) = δ, that is, Xδ = {x ∈ Xt : dmin (t, x) = δ}. Again, observe that ` ∈ Xδ , and so the elements in Xδ are descendants of gt . Let y ∈ X − {t}. We next determine whether or not y is a descendant of gt . First note that |Xδ | = 1 if and only if gt is the parent of a leaf, in which case ` is the only leaf apart from t that is a descendant of gt . So assume |Xδ | ≥ 2. We establish two claims: (i) If max{dmin (x, y) : x ∈ Xδ − {y}} ≥ δ, then y is not a descendant of gt . (ii) If max{dmin (x, y) : x ∈ Xδ − {y}} < δ, then y is a descendant of gt . To see (i) and (ii), if y is a descendant of gt , then dmin (x, y) < δ for all x ∈ Xδ − {y}, so max{dmin (x, y) : x ∈ Xδ − {y}} < δ. On the other hand, if y is not a descendant of gt , then max{dmin (x, y) : x ∈ Xδ − {y}} ≥ dmin (`, y) ≥ dmin (t, `) = δ. It follows from (i) and (ii) that, for all y ∈ X −{t}, if y is not a descendant of gt , then d0min (t, y) = max{dmin (x, y) : x ∈ Xδ − {y}}, otherwise d0min (t, y) = δ. Hence d0 (t, x) = d0min (t, x) for all x ∈ X − {t}, thereby completing the proof of the lemma.  We next prove the uniqueness part of Theorem 2.3. Proof of the uniqueness part of Theorem 2.3. The proof is by induction on the sum of the number n of leaves and the number k of reticulations in (N , w). If n + k = 1, then n = 1 and k = 0, and (N , w) consists of the single vertex in X, and so uniqueness holds. If n + k = 2, then, as N is normal, n = 2 and k = 0, and (N , w) consists of two leaves attached to the root. Again, uniqueness holds as w is equidistant and so the weights of the edges incident with the leaves is fixed. Now suppose that n + k ≥ 3, so n ≥ 2, and that the uniqueness holds for all equidistant-weighted normal networks for 14 BORDEWICH, HUBER, MOULTON, AND SEMPLE which the sum of the number of leaves and the number of reticulations is at most n + k − 1. Let {s, t} be a 2-element subset of X such that dmin (s, t) = min{dmin (x, y) : x, y ∈ X}. By Lemma 4.1, {s, t} is either a cherry or a reticulated cherry of (N , w). If {s, t} is a reticulated cherry, then, by the same lemma, we can determine from Dmin which of s and t is the reticulation leaf. Thus, without loss of generality, we may assume that t is the reticulation leaf. Depending on whether {s, t} is a cherry or a reticulated cherry, let (N 0 , w0 ) and D0 be the weighted network and distance matrix obtained from (N , w) and Dmin by reducing t or cutting {s, t}, respectively. By Lemma 4.2, D0 is the minimum distance matrix of (N 0 , w0 ). Since (N 0 , w0 ) either has n − 1 leaves and k reticulations if {s, t} is a cherry, or n leaves and k − 1 reticulations if {s, t} is a reticulated cherry, it follows by the induction assumption that, up to equivalence, (N 0 , w0 ) is the unique equidistant-weighted normal network with minimum distance matrix D0 . Let (N1 , w1 ) be an equidistant-weighted normal network on X with minimum distance matrix Dmin . By Lemma 4.1, {s, t} is either a cherry or a reticulated cherry in (N1 , w1 ). Indeed, by the same lemma, {s, t} is a cherry in (N1 , w1 ) precisely if it is a cherry in (N , w). First assume that {s, t} is a cherry in (N , w). Then {s, t} is a cherry in (N1 , w1 ). Let (N10 , w10 ) be the equidistant-weighted normal network obtained from (N1 , w1 ) by reducing t. By Lemma 4.2, D0 is the minimum distance matrix of (N10 , w10 ) and so, by the induction assumption, (N10 , w10 ) and (N 0 , w0 ) are equivalent. Using this equivalence and considering dmin (s, t), it is easily seen that (N1 , w1 ) and (N , w) are equivalent. Now assume that {s, t} is a reticulated cherry in (N , w). Then {s, t} is a reticulated cherry in (N1 , w1 ) where, by Lemma 4.1, t is a reticulation leaf. Let (N10 , w10 ) be the equidistant-weighted normal network obtained from (N1 , w1 ) by cutting {s, t}. Since Dmin is the minimum distance matrix of (N1 , w1 ), it follows by Lemma 4.2 that D0 is the minimum distance matrix of (N10 , w10 ). Therefore, by the induction assumption, (N10 , w10 ) and (N 0 , w0 ) are equivalent. By again considering dmin (s, t), it is now easily deduced that (N1 , w1 ) and (N , w) are equivalent. This completes the proof of the uniqueness part of the theorem.  4.1. The Algorithm. Let (N , w) be an equidistant-weighted normal network on X and let Dmin denote the minimum distance matrix of (N , w). We next give an algorithm which takes as input X and Dmin , and returns a weighted network (N0 , w0 ) equivalent to (N , w). Its correctness is essentially established in proving the uniqueness part of Theorem 2.3 and so a RECOVERING TREE-CHILD NETWORKS 15 formal proof of this is omitted. However, its running time is given at the end of this section. Called Equidistant Normal, the algorithm works as follows. 1. If |X| = 1, then return the weighted phylogenetic network consisting of the single vertex in X. 2. If |X| = 2, say X = {s, t}, then return the weighted phylogenetic network with exactly two leaves s and t adjoined to the root by edges each with weight 12 dmin (s, t). 3. Else, find a 2-element subset {s, t} of X such that dmin (s, t) = min{dmin (x, y) : x, y ∈ X}. (a) If dmin (s, x) = dmin (t, x) for all x, y ∈ X (so {s, t} is a cherry), then (i) Reduce t in Dmin to give the distance matrix D0 on X 0 = X − {t}. (ii) Apply Equidistant Normal to input X 0 and D0 . Construct (N0 , w0 ) from the returned weighted phylogenetic network (N00 , w00 ) on X 0 as follows. If p0s is the parent of s in (N00 , w00 ), then subdivide (p0s , s) with a new vertex ps , adjoin a new leaf t to ps via the new edge (ps , t), and set w0 (ps , s) = w0 (ps , t) = 12 dmin (s, t) and w0 (p0s , ps ) = w00 (p0s , s) − 21 dmin (s, t). Keeping all other edge weights the same as their counterparts in (N00 , w00 ), return (N0 , w0 ). (b) Else ({s, t} is a reticulated cherry, in which case, t is the reticulation leaf if there exists an x ∈ X −{s, t} such that dmin (t, x) < dmin (s, x)), (i) Cut {s, t} in Dmin to give the distance matrix D0 on X. (ii) Apply Equidistant Normal to input X and D0 . Construct (N0 , w0 ) from the returned weighted phylogenetic network (N00 , w00 ) on X as follows. If p0s and p0t denote the parents of s and t in (N00 , w00 ), respectively, then subdivide (p0s , s) and (p0t , t) with new vertices ps and pt , respectively, adjoin ps and pt via the new edge (ps , pt ), set w0 (ps , s) = 21 dmin (s, t) and w0 (p0s , ps ) = w00 (p0s , s) − 12 dmin (s, t), and, for some positive real value ω such that ω ≤ 12 dmin (s, t) and ω ≤ w00 (p0t , t), set w0 (pt , t) = ω, w0 (ps , pt ) = 21 dmin (s, t) − ω, and w0 (p0t , pt ) = w00 (p0t , t) − ω. Keeping all other edge weights the same as their counterparts in (N00 , w00 ), return (N0 , w0 ). We now consider the running time of Equidistant Normal. The algorithm takes as input a set X and an |X| × |X| distance matrix Dmin whose entries are the minimum length of an up-down path joining elements in X of an equidistant-weighted normal network (N , w) on X. Unless |X| ∈ {1, 2}, 16 BORDEWICH, HUBER, MOULTON, AND SEMPLE in which case Equidistant Normal runs in constant time, each iteration starts by finding a 2-element subset {s, t} of X such that dmin (s, t) = min{dmin (x, y) : x, y ∈ X}. This takes O(|X|2 ) time. Once such a 2-element subset is found, we compute D0 . This computation is done in one of two ways depending on whether or not dmin (s, x) = dmin (t, x) for all x ∈ X − {s, t}. If, for some x, dmin (s, x) 6= dmin (t, x), we need to additionally check which of dmin (s, x) < dmin (t, x) and dmin (s, x) > dmin (t, x) hold. Thus the determination of which way to compute D0 can be done in O(|X|) time. Regardless of the way, D0 can be computed in O(|X|) time. Once (N00 , w00 ) is returned, it can be augmented to (N0 , w0 ) in constant time. Hence the total time of each iteration is O(|X|2 ) time. When we recurse, the distance matrix D0 inputted to the recursive call is the minimum distance matrix of a normal network with either one less leaf or one less reticulation than a normal network for which Dmin is the minimum distance matrix. Since a normal network has at most |X| − 2 reticulations, it has O(|X|) vertices in total [2] (also see [10]), and so the total number of iterations is at most O(|X|). Thus Equidistant Normal completes in O(|X|3 ) time. This completes the proof of Theorem 2.3. 5. Proof of Theorem 2.4 In this section, we prove Theorem 2.4. We begin with two lemmas. Let N be a phylogenetic network, and suppose that {s, t} is either a cherry or a reticulated cherry in which t is the reticulation leaf in N . We refer to the parent of s as the tree vertex of {s, t}. For the next lemma, the proof of (i) and (iii) are given in [4], while the proof of (ii) is similar to that of Lemma 4.1 and is omitted. Lemma 5.1. Let |X| ≥ 2, and let (N , w) be a weighted tree-child network on X ∪ {r}, where r is an outgroup. Let Dmin be the minimum distance matrix and let dmax be the maximum distance outgroup vector of (N , w). Let {s, t} be a 2-element subset of X such that Qr (s, t) = max{Qr (x, y) : x, y ∈ X}, where Qr (x, y) = 21 {dmax (r, x) + dmax (r, y) − dmin (x, y)}. Then (i) {s, t} is either a cherry or a reticulated cherry of (N , w). RECOVERING TREE-CHILD NETWORKS 17 (ii) {s, t} is a cherry of (N , w) if and only if dmin (s, x) + dmax (r, t) − dmax (r, s) = dmin (t, x) for all x ∈ X − {s, t}. Otherwise, {s, t} is a reticulated cherry in which t is the reticulation leaf if dmin (s, x) + dmax (r, t) − dmax (r, s) > dmin (t, x) for some x ∈ X − {s, t}. (iii) The length of the longest up-down path in (N , w) starting at r and ending at the tree vertex of {s, t} is Qr (s, t), and dmax (r, s) and dmax (r, t) are each realised by up-down paths that include this tree vertex. Lemma 5.2. Let |X| ≥ 2, and let (N , w) be a reticulation-pair weighted normal network on X ∪ {r}, where r is an outgroup. Let Dmin and dmax be the minimum distance matrix and maximum distance outgroup vector of (N , w), respectively. Let {s, t} be a 2-element subset of X such that Qr (s, t) = max{Qr (x, y) : x, y ∈ X}. Then the distance matrix and distance vector obtained from Dmin and dmax by reducing t if {s, t} is a cherry and by isolating {s, t} if {s, t} is a reticulated cherry in which t is the reticulation leaf are the minimum distance 0 matrix Dmin and maximum distance outgroup vector d0max of the weighted network obtained from (N , w) by reducing t if {s, t} is a cherry and isolating {s, t} if {s, t} is a reticulated cherry in which t is the reticulation leaf. Proof. By Lemma 5.1, {s, t} is either a cherry or a reticulated cherry of (N , w). By the same lemma, if {s, t} is a reticulated cherry, then we may assume, without loss of generality, that t is the reticulation leaf. Furthermore, it follows by Lemma 3.2 that (N 0 , w0 ) is a reticulation-pair normal network with outgroup r. If {s, t} is a cherry, then it is clear that the lemma holds. Therefore, suppose that {s, t} is a reticulated cherry, in which case (N 0 , w0 ) is obtained from (N , w) by isolating {s, t}. Let D0 and d0 be the distance matrix and distance vector obtained from Dmin and dmax by isolating {s, t}. We will show that D0 and d0 are the minimum distance 0 matrix Dmin and maximum distance outgroup vector d0max of (N 0 , w0 ). Let ps and pt denote the parents of s and t, respectively, and let gt denote the parent of pt that is not ps in (N , w). Note that, as N is normal, gt is a tree vertex and not an ancestor of ps . Since the only up-down paths in (N , w) joining elements in X which traverse (gt , pt ) involve t, it follows that to complete the proof, it suffices to show that d0 (t, x) = d0min (t, x) for all x ∈ X − {t} and d0 (r, t) = d0max (r, t). By Lemma 5.1(iii), d0 (r, t) = d0max (r, t). 18 BORDEWICH, HUBER, MOULTON, AND SEMPLE Furthermore, let γ = dmax (r, t) − dmax (r, s). Then, by Lemma 5.1, d0min (t, x) = d0min (s, x) + γ for all x ∈ X−{s, t}, so d0 (t, x) = d0min (t, x) for all x ∈ X−{s, t}. Lastly, as w is a reticulation-pair weighting, w(gt , pt ) = w(ps , pt ), so d0 (t, s) = d0min (t, s). This completes the proof of the lemma.  We next establish the uniqueness part of Theorem 2.4. Proof of the uniqueness part of Theorem 2.4. The proof is by induction on the sum of the number n of leaves and the number k of reticulations in (N , w). If n + k = 1, then n = 1 and k = 0, and so (N , w) consists of the single vertex in X, in which case the uniqueness holds. If n + k = 2, then n = 2, k = 0, and (N , w) consists of two leaves attached to the root, one of which is the outgroup r. Again, the uniqueness holds. Now suppose that n + k ≥ 3, so n ≥ 3, and the uniqueness holds for all reticulation-pair weighted normal networks for which the sum of the number of leaves and the number of reticulations is at most n + k − 1. Let {s, t} be a 2-element subset of X such that Qr (s, t) = max{Qr (x, y) : x, y ∈ X}. By Lemma 5.1, {s, t} is either a cherry or a reticulated cherry. If {s, t} is a reticulated cherry, then, by the same lemma, Dmin and dmax determine whether s or t is the reticulation leaf. Thus, without loss of generality, we may assume that t is the reticulation leaf. Let (N 0 , w0 ), D0 , and d0 be the weighted phylogenetic network, distance matrix, and distance vector obtained from (N , w), Dmin , and dmax , respectively, by reducing t if {s, t} is a cherry or isolating {s, t} if {s, t} is a reticulated cherry. Now (N 0 , w0 ) either has n−1 leaves and k reticulations, or n leaves and k−1 reticulations, and so, by Lemma 5.2 and the induction assumption, up to equivalence, (N 0 , w0 ) is the unique reticulation-pair weighted normal network with outgroup r whose minimum distance matrix is D0 and maximum distance outgroup vector is d0 . Let (N1 , w1 ) be a reticulation-pair weighted normal network on X with outgroup r whose minimum distance matrix is Dmin and maximum distance outgroup vector is dmax . By Lemma 5.1, {s, t} is either a cherry or a reticulated cherry in (N1 , w1 ). Moreover, by the same lemma, {s, t} is a cherry in (N1 , w1 ) if and only if it is a cherry in (N , w). First assume that {s, t} is a cherry in (N , w). Let (N10 , w10 ) be the reticulation-pair weighted normal network with outgroup r obtained from (N1 , w1 ) by reducing t. By Lemma 5.2, D0 and d0 are the minimum distance matrix and maximum distance outgroup vector of (N10 , w10 ). Thus, by the induction assumption, (N10 , w10 ) and RECOVERING TREE-CHILD NETWORKS 19 (N 0 , w0 ) are equivalent. Using this equivalence and considering dmin (s, t), it is easily checked that (N1 , w1 ) and (N , w) are equivalent. Now assume that {s, t} is a reticulated cherry in (N , w). Then {s, t} is a reticulated cherry in (N1 , w1 ) where, by Lemma 5.1, t is the reticulation leaf. Let (N10 , w10 ) be the reticulation-pair weighted normal network with outgroup r obtained from (N1 , w1 ) by isolating {s, t}. Since Dmin and dmax are the minimum distance matrix and maximum distance outgroup vector of (N1 , w1 ), it follows by Lemma 5.2 that D0 and d0 are the minimum distance matrix and maximum distance outgroup vector of (N10 , w10 ). So, by the induction assumption, (N10 , w10 ) and (N 0 , w0 ) are equivalent. In (N , w), let ps and pt denote the parents of s and t, respectively, and let gt denote the parent of pt that is not ps . Since N is normal, gt is a tree vertex and not an ancestor of ps . We next show that there is precisely one choice for the attachment of the edge in (N 0 , w0 ), and thus also in (N10 , w10 ), corresponding to (gt , pt ) in (N , w). Since N is normal, there is a (directed) path P from gt to a leaf, say `, containing no reticulations. Since w is reticulation-pair, dmin (t, `) is the length of the up-down path whose union of edges consists of the edges in {(gt , pt ), (pt , t)} and P . Thus, if we knew `, then, to locate the place in (N 0 , w0 ) at which to insert gt , we simply start at ` and follow the unique path against the direction of the edges towards the root until we reach a distance dmin (t, `) − (dmax (r, t) − Qr (s, t)) from `, since the bracketed term gives the combined length of (gt , pt ) and (pt , t). However, a priori, we do not know `. So there are potentially O(n) places in (N 0 , w0 ) at which we could insert gt . We claim there is exactly one such place to insert gt so that the resulting weighted network (after subdividing the edge incident with t, inserting a new vertex pt and adding the new edge (gt , pt )) has minimum distance matrix Dmin and maximum distance outgroup vector dmax and no zero-length tree-edges. We call a leaf `0 a candidate leaf if • the path starting at `0 and going against the direction of the edges (and, thus, towards the root) a distance dmin (t, `0 ) − (dmax (r, t) − Qr (s, t)) does not traverse a reticulation; • the unique position along this path at a distance dmin (t, `0 ) − (dmax (r, t) − Qr (s, t)) from `0 , denoted g`0 , is not a vertex, that is, g`0 is partway along an edge of (N 0 , w0 ); and • g`0 is not an ancestor of ps . 20 BORDEWICH, HUBER, MOULTON, AND SEMPLE Note that the unknown leaf ` is a candidate leaf. Moreover, if the second or third conditions were not satisfied and we tried to reconstruct a network by inserting gt at position g`0 we would either need to introduce zero-weight tree edges or we would introduce a shortcut, contradicting the assumptions about (N , w). We now show that if g`0 is not at the same position as gt , then g`0 is an ancestor of gt . Suppose not, then a minimum length up-down path in (N , w) from t to `0 via gt must traverse the edge containing position g`0 . But then the length of this up-down path is not dmin (t, `0 ), by definition of g`0 . Likewise, a minimum length up-down path in (N , w) from t to `0 via ps must traverse the edge containing position g`0 (since ps is not a descendant of g`0 ). Again the length of this up-down path is not dmin (t, `0 ). This contradicts the fact that (N , w) has minimum distance matrix Dmin . Finally, observe that if g`0 is an ancestor of gt , then the minimum path length between t and ` in the network obtained from (N 0 , w0 ) by adding an edge (g`0 , pt ) will be strictly larger than dmin (t, `). This establishes the claim. Moreover, the correct position gt can be found as the unique common descendant of all candidate positions g`0 . It now follows that, as (N10 , w10 ) and (N 0 , w0 ) are equivalent, (N1 , w1 ) and (N , w) are equivalent. This completes the proof of the uniqueness part of Theorem 2.4.  5.1. The Algorithm. Let (N , w) be a reticulation-pair weighted normal network on X ∪ {r}, where r is an outgroup, and let Dmin and dmax denote the minimum distance matrix and maximum distance outgroup vector of (N , w). The following algorithm, called Reticulation-Pair Normal, takes as input X, Dmin , and dmax and returns a weighted network (N0 , w0 ) equivalent to (N , w) in which all reticulation edges have weight zero. As before, the proof of its correctness is essentially established in proving the uniqueness part of the theorem and so is omitted. But its running time is given at the end. 1. If |X| = 1, then return the weighted phylogenetic network consisting of the single vertex in X. 2. If |X| = 2, say X = {r, s}, then return the phylogenetic network (N0 , w0 ) consisting of leaves r and s adjoined to the root ρ with (ρ, r) and (ρ, s) positively weighted so that dmax (r, s) = w(ρ, r) + w(ρ, s). 3. Else, find a 2-element subset {s, t} of X such that Qr (s, t) = max{Qr (x, y) : x, y ∈ X}. (a) If dmin (s, x) + dmax (r, t) − dmax (r, s) = dmin (t, x) for all x ∈ X (so {s, t} is a cherry), then RECOVERING TREE-CHILD NETWORKS 21 (i) Reduce t in Dmin and dmax to give the distance matrix D0 and distance vector d0 on X 0 = X − {t}. (ii) Apply Reticulation-Pair Normal to input X 0 ∪{r}, D0 , and d0 . Construct (N0 , w0 ) from the returned weighted phylogenetic network (N00 , w00 ) on X 0 as follows. If p0s is the parent of s in (N00 , w00 ), then subdivide (p0s , s) with a new vertex ps , adjoin a new leaf t to ps via a new edge (ps , t), and set w0 (ps , s) = dmax (r, s) − Qr (s, t), w0 (p0s , ps ) = w00 (p0s , s) − w0 (ps , s), and w0 (ps , t) = dmin (s, t) − w0 (ps , s). Keeping all other edges weight the same as their counterparts in (N00 , w00 ), return (N0 , w0 ). (b) Else ({s, t} is a reticulated cherry, in which t is the reticulation leaf if there exists an x ∈ X − {s, t} such that dmin (t, x) < dmin (s, x) + dmax (r, t) − dmax (r, s)), (i) Isolate {s, t} in Dmin and dmax to give the distance matrix D0 and distance vector d0 on X. (ii) Apply Reticulation-Pair Normal to input X ∪ {r}, D0 , and d0 . Construct (N0 , w0 ) from the returned weighted phylogenetic network (N00 , w00 ) on X ∪ {r} as follows. For each leaf ` in X − {s, t}, follow the unique path starting at ` and going against the direction of the edges towards the root until either a reticulation or a distance dmin (t, `) − (dmax (r, t) − Qr (s, t)) from ` is reached. Amongst the points reached, insert a new vertex gt in the unique point that is a descendant of all the other points reached and weight the edges incident with gt appropriately. Now, subdivide the edge incident with t with a new vertex pt , add the new edge (gt , pt ), and set w0 (ps , pt ) = 0, w0 (gt , pt ) = 0, and w0 (pt , t) = dmax (r, t) − Qr (s, t), where ps is the parent of s. Keeping all other edges the same weight as their counterparts in (N00 , w00 ), return (N0 , w0 ). For the running time, Reticulation-Pair Normal takes as input a set X ∪ {r}, a |X| × |X| distance matrix Dmin whose entries are the minimumlength of an up-down path joining elements in X, and a distance vector dmax of length |X| whose entries are the maximum length of an up-down path from r to each element in X of a reticulation-pair normal network (N , w) on X ∪ {r}, where r is an outgroup. If |X| ∈ {1, 2}, then the algorithm runs 22 BORDEWICH, HUBER, MOULTON, AND SEMPLE in constant time. If |X| ≥ 3, each iteration begins by finding a 2-element subset {s, t} of X such that Qr (s, t) = max{Qr (x, y) : x, y ∈ X}. This takes O(|X|2 ) time, and once such a 2-element subset is found, we construct D0 and d0 . This construction is done in one of two ways depending on whether or not dmin (s, x) + dmax (r, t) − dmax (r, s) = dmin (t, x) for all x ∈ X − {s, t}. If, for some x, dmin (s, x) + dmax (r, t) − dmax (r, s) 6= dmin (t, x), we need to additionally check which of dmin (s, x) + dmax (r, t) − dmax (r, s) < dmin (t, x) and dmin (s, x) + dmax (r, t) − dmax (r, s) > dmin (t, x) holds. Thus the determination of which way to construct D0 and d0 can be done in O(|X|) time. Whether D0 and d0 is constructed by reducing an element of X or isolating a 2-element subset of X, the construction can be done in O(|X|) time. Once (N00 , w00 ) is returned, it takes constant time to augment to (N0 , w0 ) if D0 and d0 have been obtained from Dmin and dmax by reducing. Otherwise, we need to find the unique place in (N00 , w00 ) to insert gt . Since (N , w) has O(|X|) vertices in total [2], it takes at most O(|X|2 ) time to find the possible locations in which to insert gt . Finding the correct location, the one that is a descendant of all the others, can be done in O(|X|) time by repeatedly deleting vertices of out-degree zero until the first possible location appears as a vertex of out-degree zero. Thus (N0 , w0 ) can be returned in O(|X|2 ) time, and so the total time of each iteration is O(|X|2 ). When we recurse, the distance matrix D0 and distance vector d0 inputted to the recursive call is the minimum distance matrix and maximum distance outgroup vector of a normal network with either one less leaf or one less reticulation than (N , w). As normal networks have at most |X| − 2 reticulations, and therefore O(|X|) vertices in total [2], the total number of iterations is at most O(|X|). Hence Reticulation-Pair Normal completes in O(|X|3 ) time, thereby completing the proof of Theorem 2.4. Acknowledgements Katharina Huber and Vincent Moulton thank the Biomathematics Research Centre at the University of Canterbury for its hospitality. RECOVERING TREE-CHILD NETWORKS 23 References [1] Baroni M, Semple C, Steel, M (2006) Hybrids in real time. Syst Biol 55: 46–56 [2] Bickner DR (2012) On normal networks. PhD thesis, Iowa State University, Ames, Iowa [3] Bordewich M, Semple, C (2016) Determining phylogenetic networks from inter-taxa distances. J Math Biol 73: 283–303 [4] Bordewich M, Semple C, Tokac N Constructing tree-child networks from distance matrices. Algorithmica, in press [5] Bordewich M, Tokac N (2016) An algorithm for reconstructing ultrametric tree-child networks from inter-taxa distances. Discrete Appl Math 213: 47–59 [6] Buneman, P (1974) A note on the metric property. J Combin Theory Ser B 17: 48–50 [7] Cardona G, Rossello F, Valiente, G (2009) Comparison of tree-child networks. IEEE/ACM Trans Comput Biol Bioinformatics 6: 552–569 [8] Chan H-W, Jansson J, Lam T-W, Yiu S-M (2006) Reconstructing an ultrametic galled phylogenetic network from distance matrix. J Bioinform Comput Biol 4: 807–832 [9] Huber KT, Scholz GE Beyond representing orthology relationships by trees. Algorithmica, in press [10] McDiarmid C, Semple C, Welsh D (2015) Counting phylogenetic networks. Ann Comb 19: 205–224 [11] Saitou N, Nei M (1987) The neighbor-joining method: a new method for reconstructing phylogenetic trees. Mol Biol Evol 4: 406–425 [12] Semple C, Steel M (2003) Phylogenetics. Oxford University Press [13] Simões-Pereira JMS (1969) A note on the tree realization of a distance matrix. J Combin Theory 6: 303–310 [14] Sokal RR (1958) A statistical method for evaluating systematic relationships. Univ Kans Sci Bull 38: 1409–1438 [15] Willson SJ (2007) Unique determination of some homoplasies at hybridization events. Bull Math Biol 69: 1709–1725 [16] Willson SJ (2007) Reconstruction of some hybrid phylogenetic networks with homoplasies from distances. Bull Math Biol 69: 2561–2590 [17] Willson SJ (2010) Properties of normal phylogenetic networks. Bull Math Biol 72: 340–358 [18] Willson SJ (2012) Tree-average distances on certain phylogenetic networks have their weights uniquely determined. Algorithm Mol Biol 7: 13 [19] Yu Y, Nakleh L (2015) A distance-based method for inferring phylogenetic networks in the presence of incomplete lineage sorting. In: Harrison R et al (eds) International Symposium on Bioinformatics Research and Applications (ISBRA), LNBI 9096, pp 378–389 [20] Zaretskii KA (1965) Constructing trees from the set of distances between vertices. Uspehi Matematiceskih Nauk 20: 90–92 Department of Computer Science, Durham University, Durham, DH1 3LE, United Kingdom E-mail address: [email protected] School of Computing Sciences, University of East Anglia, Norwich NR4 7TJ, United Kingdom E-mail address: [email protected] 24 BORDEWICH, HUBER, MOULTON, AND SEMPLE School of Computing Sciences, University of East Anglia, Norwich NR4 7TJ, United Kingdom E-mail address: [email protected] School of Mathematics and Christchurch, New Zealand Statistics, University of E-mail address: [email protected] Canterbury,
8cs.DS
arXiv:1611.08261v1 [stat.ME] 24 Nov 2016 Automated, Efficient, and Practical Extreme Value Analysis with Environmental Applications Brian M. Bader, Ph.D. University of Connecticut, 2016 ABSTRACT Although the fundamental probabilistic theory of extremes has been well developed, there are many practical considerations that must be addressed in application. The contribution of this thesis is four-fold. The first concerns the choice of r in the r largest order statistics modeling of extremes. Practical concern lies in choosing the value of r; a larger value necessarily reduces variance of the estimates, however there is a trade-off in that it may also introduce bias. Current model diagnostics are somewhat restrictive, either involving prior knowledge about the domain of the distribution or using visual tools. We propose a pair of formal goodness-of-fit tests, which can be carried out in a sequential manner to select r. A recently developed adjustment for multiplicity in the ordered, sequential setting is applied to provide error control. It is shown via simulation that both tests hold their size and have adequate power to detect deviations from the null model. The second contribution pertains to threshold selection in the peaks-over-threshold i approach. Existing methods for threshold selection in practice are informal as in visual diagnostics or rules of thumb, computationally expensive, or do not account for the multiple testing issue. We take a methodological approach, modifying existing goodnessof-fit tests combined with appropriate error control for multiplicity to provide an efficient, automated procedure for threshold selection in large scale problems. The third combines a theoretical and methodological approach to improve estimation within non-stationary regional frequency models of extremal data. Two alternative methods of estimation to maximum likelihood (ML), maximum product spacing (MPS) and a hybrid L-moment / likelihood approach are incorporated in this framework. In addition to having desirable theoretical properties compared to ML, it is shown through simulation that these alternative estimators are more efficient in short record lengths. The methodology developed is demonstrated with climate based applications. Last, an overview of computational issues for extremes is provided, along with a brief tutorial of the R package eva, which improves the functionality of existing extreme value software, as well as contributing new implementations. Automated, Efficient, and Practical Extreme Value Analysis with Environmental Applications Brian M. Bader B.A., Mathematics, Stony Brook University, NY, USA, 2009 M.A., Statistics, Columbia University, NY, USA, 2011 A Dissertation Submitted in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy at the University of Connecticut 2016 i Copyright by Brian M. Bader 2016 ii APPROVAL PAGE Doctor of Philosophy Dissertation Automated, Efficient, and Practical Extreme Value Analysis with Environmental Applications Presented by Brian M. Bader, B.A. Mathematics, M.A. Statistics Major Advisor Jun Yan Associate Advisor Kun Chen Associate Advisor Dipak K. Dey Associate Advisor Xuebin Zhang University of Connecticut 2016 iii Acknowledgements “On this life that we call home, the years go fast and the days go so slow.” — Modest Mouse This is sound advice for anyone considering to pursue a PhD. It’s hard to believe this chapter of my life is coming to an end — the past four years have gone so fast, yet at times I thought it would never come soon enough. It has been full of ups and downs, but at the lowest of times, the only thing to do was continue on. I’ve made many new friends (who will hopefully turn into old), mentors, and gained precious knowledge that I think will benefit me throughout the rest of my life. I’d like to thank Dr. Ming-Hui Chen for guiding me through the qualifying exam process and allowing me to thrive in the Statistical Consulting Service. I’ve gained valuable experience from participating in this group. I appreciate Dr. Dipak Dey for taking time out of his busy schedule as a dean to give me advice, recommendations, and to be on this committee. The same appreciation goes to Dr. Kun Chen for agreeing to be on my committee. Suggestions by Dr. Vartan Choulakian and Dr. Zhiyi Chi helped improve some of the methodology and data analysis in this research. Dr. Jun Yan, my major advisor, has guided me throughout the research process and pushed me along to make sure I completed all the necessary milestones in a timely manner. I must admit that I was slightly intimidated of him at first, but I now believe iv that he is most likely the best choice of advisor (for me) and I am glad things fell into place as such. He is truly a kind person and has always been understanding of any problems I have had over the past two years. Although I am not pursuing the academic route at the moment, I appreciate his enthusiastic nudge for me to go in that direction. Additionally, Dr. Xuebin Zhang has graciously spent his time and energy into conversations with myself and Dr. Yan to improve our manuscripts and our knowledge of environmental extremes. Of course I am thankful of the support he and Environment and Climate Change Canada gave by funding some of this research. The journey would not have been the same with a different cohort — I am grateful to all their support and friendship during such trying times. I have to acknowledge my family for encouraging me to follow my academic pursuits even if it meant not seeing me as often as they’d like during these four years. The same goes for all my friends back home. Last, but not least, I wouldn’t have made it through without the full support of my wife Deirdre and two cats Eva and Cuddlemonkey (who joined our family as a result of all this). I cannot express my total love and gratitude for them in words. This research was partially supported by an NSF grant (DMS 1521730), a University of Connecticut Research Excellence Program grant, and Environment and Climate Change Canada. v Contents Acknowledgements 1 Introduction 1.1 1.2 1.3 iii 1 Overview of Extreme Value Analysis . . . . . . . . . . . . . . . . . . . . 1 1.1.1 Block Maxima / GEVr Distribution . . . . . . . . . . . . . . . . . 3 1.1.2 Peaks Over Threshold (POT) Approach . . . . . . . . . . . . . . 6 1.1.3 Non-stationary Regional Frequency Analysis (RFA) . . . . . . . . 8 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.2.1 Choice of r in the r Largest Order Statistics Model . . . . . . . . 10 1.2.2 Selection of Threshold in the POT Approach . . . . . . . . . . . . 12 1.2.3 Estimation in Non-stationary RFA . . . . . . . . . . . . . . . . . 15 Outline of Thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2 Automated Selection of r in the r Largest Order Statistics Model 19 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.2 Model and Data Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.3 Score Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.3.1 Parametric Bootstrap . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.3.2 Multiplier Bootstrap . . . . . . . . . . . . . . . . . . . . . . . . . 27 vi 2.4 Entropy Difference Test . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.5 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.5.1 Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.5.2 Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 2.6 Automated Sequential Testing Procedure . . . . . . . . . . . . . . . . . . 38 2.7 Illustrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 2.7.1 Lowestoft Sea Levels . . . . . . . . . . . . . . . . . . . . . . . . . 46 2.7.2 Annual Maximum Precipitation: Atlantic City, NJ . . . . . . . . 50 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 2.8 3 Automated Threshold Selection in the POT Approach 55 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 3.2 Automated Sequential Testing Procedure . . . . . . . . . . . . . . . . . . 60 3.3 The Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 3.3.1 Anderson–Darling and Cramér–von Mises Tests . . . . . . . . . . 64 3.3.2 Moran’s Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 3.3.3 Rao’s Score Test . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 3.3.4 A Power Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 3.4 Simulation Study of the Automated Procedures . . . . . . . . . . . . . . 71 3.5 Application to Return Level Mapping of Extreme Precipitation . . . . . . 78 3.6 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 vii 4 Robust and Efficient Estimation in Non-Stationary RFA 87 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 4.2 Non-Stationary Homogeneous Region Model . . . . . . . . . . . . . . . . 91 4.2.1 Existing Estimation Methods . . . . . . . . . . . . . . . . . . . . 94 New Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 4.3.1 Hybrid Likelihood / L-moment Approach . . . . . . . . . . . . . . 96 4.3.2 Maximum Product Spacing . . . . . . . . . . . . . . . . . . . . . 98 4.3 4.4 Simulation Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 4.5 California Annual Daily Maximum Winter Precipitation . . . . . . . . . 107 4.6 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 5 An R Package for Extreme Value Analysis: eva 117 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 5.2 Efficient handling of near-zero shape parameter . . . . . . . . . . . . . . 119 5.3 The GEVr distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 5.4 5.3.1 Goodness-of-fit testing . . . . . . . . . . . . . . . . . . . . . . . . 121 5.3.2 Profile likelihood . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 5.3.3 Fitting the GEVr distribution . . . . . . . . . . . . . . . . . . . . 124 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 6 Conclusion 6.1 132 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 viii A Appendix 139 A.1 Data Generation from the GEVr Distribution . . . . . . . . . . . . . . . 139 (r) A.2 Asymptotic Distribution of Tn (θ) . . . . . . . . . . . . . . . . . . . . . 141 A.3 Semi-Parametric Bootstrap Resampling in RFA . . . . . . . . . . . . . . 143 Bibliography 144 ix List of Tables 2.1 Empirical size (in %) for the parametric bootstrap score test under the null distribution GEVr , with µ = 0 and σ = 1 based on 1000 samples, each with bootstrap sample size L = 1000. . . . . . . . . . . . . . . . . . 2.2 33 Empirical size (in %) for multiplier bootstrap score test under the null distribution GEVr , with µ = 0 and σ = 1. 1000 samples, each with bootstrap sample size L = 1000 were used. Although not shown, the empirical size for r = 1 and ξ = −0.25 becomes acceptable when sample size is 1000. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Empirical size (in %) for the entropy difference (ED) test under the null distribution GEVr , with µ = 0 and σ = 1 based on 10,000 samples. . . . 2.4 34 35 Empirical rejection rate (in %) of the multiplier score test and the ED test in the first data generating scheme in Section 2.5.2 from 1000 replicates. 37 2.5 Empirical rejection rate (in %) of the multiplier score test and the ED test in the second data generating scheme in Section 2.5.2 from 1000 replicates. 38 x 2.6 Percentage of choice of r using the ForwardStop and StrongStop rules at various significance levels or FDRs, under ED, parametric bootstrap (PB) score, and multiplier bootstrap (MB) score tests, with n = 100 and ξ = 0.25 for the simulation setting described in Section 2.6. Correct choice is r = 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 45 Empirical rejection rates of four goodness-of-fit tests for GPD under various data generation schemes described in Section 3.3.4 with nominal size 0.05. GPDMix(a, b) refers to a 50/50 mixture of GPD(1, a) and GPD(1, b). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 70 Failure rate (%) in optimization for the three estimation methods in the combined 12 settings of number of sites, observations, and dependence levels within each spatial dependence structure (SC, SM, and GC) out of 10,000 replicates. The setup is described in detail in Section 4.4. . . . . . 103 xi List of Figures 1.1 The density function of the Generalized Extreme Value distribution for shape parameter values of −0.5, 0, and 0.5 with location and scale parameters fixed at zero and one, respectively. . . . . . . . . . . . . . . . . 1.2 A comparison of extremes selected via the peaks over threshold (left) versus block maxima approach for example time series data. . . . . . . . 1.3 14 Hill plot of the Fort Collins daily precipitation data found in R package extRemes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 13 Threshold stability plot for the shape parameter of the Fort Collins daily precipitation data found in R package extRemes. . . . . . . . . . . . . . . 1.5 6 Mean Residual Life plot of Fort Collins daily precipitation data found in R package extRemes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 5 14 Comparisons of the empirical vs. χ2 (3) distribution (solid curve) based on 5000 replicates of the score test statistic under the null GEVr distribution. The number of blocks used is n = 5000 with parameters µ = 0, σ = 1, and ξ ∈ (−0.25, 0.25). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 xii 2.2 Observed FWER for the ED, parametric bootstrap (PB) score, and multiplier bootstrap (MB) score tests (using No Adjustment and StrongStop) versus expected FWER at various nominal levels. The 45 degree line indicates agreement between the observed and expected rates under H0 . . 2.3 42 Observed FDR (from ForwardStop) and observed FWER (from StrongStop) versus expected FDR and FWER, respectively, at various nominal levels. This is for the simulation setting described in Section 2.6, using the ED, parametric bootstrap (PB) score, and multiplier bootstrap (MB) score tests. The 45 degree line indicates agreement between the observed and expected rates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 43 Adjusted p-values using ForwardStop, StrongStop, and raw (unadjusted) p-values for the ED and PB Score tests applied to the Lowestoft sea level data. The horizontal dashed line represents the 0.05 possible cutoff value. 2.5 48 Location, scale, and shape parameter estimates, with 95% delta confidence intervals for r = 1, . . . , 40 for the Lowestoft sea level data. Also included are the estimates and 95% profile likelihood confidence intervals for the 50, 100, and 200 year return levels. The vertical dashed line represents the recommended cutoff value of r from the analysis in Section 2.7.1. 49 xiii 2.6 Adjusted p-values using ForwardStop, StrongStop, and raw (unadjusted) p-values for the ED and PB Score tests applied to the Atlantic City precipitation data. The horizontal dashed line represents the 0.05 possible cutoff value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.7 51 Location, scale, and shape parameter estimates, with 95% delta confidence intervals for r = 1 through r = 10 for the Atlantic City precipitation data. Also included are the estimates and 95% profile likelihood confidence intervals for the 50, 100, and 200 year return levels. The vertical dashed line represents the recommended cutoff value of r from the analysis in Section 2.7.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 52 Observed FWER for the Anderson–Darling test (using StrongStop and no adjustment) versus expected FWER at various nominal levels under the null GPD at ten thresholds for 10,000 replicates in each setting as described in Section 3.4. The 45 degree line indicates agreement between the observed and expected rates under H0. . . . . . . . . . . . . . . . . . 3.2 72 Plot of the (scaled) density of the mixture distribution used to generate misspecification of H0 for the simulation in Section 3.4. The vertical line indicates the continuity point of the two underlying distributions. . . . . 73 xiv 3.3 Frequency distribution (out of 1000 simulations) of the number of rejections for the Anderson–Darling test and various stopping rules (ForwardStop, StrongStop, and no adjustment), at the 5% nominal level, for the misspecified distribution sequential simulation setting described in Section 3.4. 50 thresholds are tested, with the 34th being the true threshold. 3.4 75 Observed FDR (using ForwardStop) and observed FWER (using StrongStop) versus expected FDR and FWER respectively using the Anderson–Darling test, at various nominal levels. This is for the sequential simulation setting under misspecification described in Section 3.4. The 45 degree line indicates agreement between the observed and expected rates. . . . . . . 3.5 76 Average performance comparison of the three stopping rules in the simulation study under misspecification in Section 3.4, using the Anderson– Darling test for various parameters. Shown are the relative frequencies of the average value of each metric (bias, squared error, and coverage) for each stopping rule and parameter of interest. For each parameter of interest and metric, the sum of average values for the three stopping rules equates to 100%. RL refers to return level. 3.6 . . . . . . . . . . . . . . . . 77 Distribution of chosen percentiles (thresholds) for the 720 western US coastal sites, as selected by each stopping rule. Note that this does not include sites where all thresholds were rejected by the stopping rule. . . . 81 xv 3.7 Map of US west coast sites for which all thresholds were rejected (black / circle) and for which a threshold was selected (grey / triangle), by stopping rule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8 82 Comparison of return level estimates (50, 100, 250, 500 year) based on the chosen threshold for ForwardStop vs. StrongStop for the US west coast sites. The 45 degree line indicates agreement between the two estimates. This is only for the sites in which both stopping rules did not reject all thresholds. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.9 83 Map of US west coast sites with 50, 100, and 250 year return level estimates for the threshold chosen using ForwardStop and the Anderson– Darling test. This is only for the sites in which a threshold was selected. 4.1 84 Schlather model root mean squared error of the parameters for each estimation method, from 1000 replicates of each setting discussed in Section 4.4. W, M, S refers to weak, medium, and strong dependence, with m being the number of sites and n, the number of observations within each site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 4.2 Smith model root mean squared error of the parameters for each estimation method, from 1000 replicates of each setting discussed in Section 4.4. W, M, S refers to weak, medium, and strong dependence, with m being the number of sites and n, the number of observations within each site. . 105 xvi 4.3 Gaussian copula model root mean squared error of the parameters for each estimation method, from 1000 replicates of each setting discussed in Section 4.4. W, M, S refers to weak, medium, and strong dependence, with m being the number of sites and n, the number of observations within each site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 4.4 Locations of the 27 California sites used in the non-stationary regional frequency analysis of annual daily maximum winter precipitation events. 4.5 108 Scatterplot of Spearman correlations by euclidean distance between each pair of the 27 California sites used in the non-stationary regional frequency analysis of annual daily maximum winter precipitation events. . . . . . . 109 4.6 Estimates and 95% semi-parametric bootstrap confidence intervals of the location parameter covariates (postive and negative SOI piecewise terms), proportionality, and shape parameters for the three methods of estimation in the non-stationary RFA of the 27 California site annual winter maximum precipitation events. . . . . . . . . . . . . . . . . . . . . . . . . 110 4.7 Estimates and 95% semi-parametric bootstrap confidence intervals of the marginal site-specific location means for the three estimation methods in the non-stationary RFA of the 27 California site annual winter maximum precipitation events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 xvii 4.8 Estimates and 95% semi-parametric bootstrap confidence intervals of the shape parameter by the three estimation methods, for the full 53 year and 18 year subset sample of California annual winter precipitation extremes. The horizontal dashed line corresponds to the shape parameter estimate of each method for the subset sample. . . . . . . . . . . . . . . . . . . . . 112 4.9 Left: 50 year return level estimates (using MPS) at the 27 sites, conditioned on the mean sample SOI value (−0.40). Right: Estimated percent increase in magnitude of the 50 year event at the sample minimum SOI (−28.30) versus the mean SOI value. . . . . . . . . . . . . . . . . . . . . 113 5.1 Plot of GEV cumulative distribution function with x = 1, µ = 0 and σ = 1, with ξ ranging from −0.0001 to 0.0001 on the cubic scale. The naive implementation is represented by the solid red line, with the implementation in R package eva as the dashed blue line. . . . . . . . . . . . . 121 5.2 Estimates and 95% profile likelihood confidence intervals for the 250 year return level of the LoweStoft sea level dataset, for r = 1 through r = 10. 5.3 123 Estimates and 95% delta method confidence intervals for the 250 year return level of the LoweStoft sea level dataset, for r = 1 through r = 10. 124 xviii 5.4 Plot of the largest order statistic (block maxima) from a GEV10 distribution with shape parameter parameter ξ = 0. The location and scale have an intercept of 100 and 1, with positive trends of 0.02 and 0.01, respectively. The indices (1 to 100) are used as the corresponding trend coefficients. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 1 Chapter 1 Introduction 1.1 Overview of Extreme Value Analysis Both statistical modeling and theoretical results of extremes remain a subject of active research. Extreme value theory provides a solid statistical framework to handle atypical, or heavy-tailed phenomena. There are many important applications that require modeling of extreme events. In hydrology, a government or developer may want an estimate of the maximum flood event that is expected to occur every 100 years, say, in order to determine the needs of a structure. In climatology, extreme value theory is used to determine if the magnitude of extremal events are time-dependent or not. Similarly, in finance, market risk assessment can be approached from an extremes standpoint. See Coles (2001); Tsay (2005); Dey and Yan (2016) for more specific examples. Further, the study of extremes in a spatial context has been an area of interest for many researchers. In an environmental setting, one may want to know if certain geographic and/or climate features have an effect on extremes of precipitation, temperature, wave height, etc. Recently, many explicit models for spatial extremes have been developed. For an overview, see Davison, Padoan, Ribatet, et al. (2012). Another approach in 2 the same context, regional frequency anaysis (RFA), allows one to ‘trade space for time’ in order to improve the efficiency of certain parameter estimates. Roughly speaking, after estimating site-specific parameters, data are transformed onto the same scale and pooled in order to estimate the shared parameters. This approach offers two particular advantages over fully-specified multivariate models. First, only the marginal distributions at each site need to be explicitly chosen – the dependence between sites can be handled by appropriate semi-parametric procedures and second, it can handle very short record lengths. See Hosking and Wallis (2005) or Wang, Yan, and Zhang (2014) for a thorough review. A major quantity of interest in extremes is the t-period return level. This can be thought of as the maximum event that will occur on average every t periods and can be used in various applications such as value at risk in finance and flood zone predictions. Thus, it is quite important to obtain accurate estimates of this quantity and in some cases, determine if it is non-stationary. Given some specified extremal distribution, the stationary t-period return level zt can be expressed in terms of its upper quantile zt = Q(1 − 1/t) where Q(p) is the quantile function of this distribution. Within the extreme value framework, there are several different approaches to modeling extremes. In the following, the various approaches will be discussed and a data 3 example of extreme daily precipitation events in California is used to motivate the content of this thesis. 1.1.1 Block Maxima / GEVr Distribution The block maxima approach to extremes involves splitting the data into mutually exclusive blocks and selecting the top order statistic from within each block. Typically blocks can be chosen naturally; for example, for daily precipitation data over n years, a possible block size B could be B = 365, with the block maxima referring to the largest annual daily precipitation event. To clarify ideas, here the underlying data is of size 365 × n and the sample of extremes is size n, the number of available blocks. There is a requirement that the block size be ‘large enough’ to ensure adequate convergence in the limiting distribution of the block maxima; further discussion of this topic will be delegated to later sections. It has been shown (e.g. Leadbetter, Lindgren, and Rootzén, 2012; De Haan and Ferreira, 2007; Coles, 2001) that the only non-degenerate limiting distribution of the block maxima of a sample of size B i.i.d. random variables, when appropriately normalized and as B → ∞, must be the Generalized Extreme Value (GEV) distribution. The GEV distribution has cumulative distribution function given by F (y|µ, σ, ξ) =  h  − 1ξ i    exp − 1 + ξ y−µ , ξ 6= 0, σ  h    exp − exp − y−µ σ i , ξ = 0, (1.1) 4 with location parameter µ, scale parameter σ > 0, shape parameter ξ, and 1 + ξ(y − µ)/σ > 0. By taking the first derivative with respect to y the probability density function is obtained as f (y|µ, σ, ξ) =   −( 1ξ +1) h  − 1ξ i   y−µ y−µ 1  σ 1 + ξ σ exp − 1 + ξ σ , ξ 6= 0,      1 exp − σ y−µ σ  h  exp − exp − y−µ σ i , (1.2) ξ = 0. Denote this distribution as GEV(µ, σ, ξ). The shape parameter ξ controls the tail of the distribution. When ξ > 0, the GEV distribution has a heavy, unbounded upper tail. When ξ = 0, this is commonly referred to as the Gumbel distribution and has a lighter tail. Figure 1.1 shows the GEV density for various shape parameter values. Weissman (1978) generalized this result further, showing that the limiting joint distribution of the r largest order statistics of a random sample of size B as B → ∞ (denoted here as the GEVr distribution) has probability density function fr (y1 , y2 , ..., yr |µ, σ, ξ) = σ −r exp n − (1 + ξzr ) − 1ξ  − X r o 1 +1 log(1 + ξzj ) ξ j=1 (1.3) for location parameter µ, scale parameter σ > 0 and shape parameter ξ, where y1 > · · · > yr , zj = (yj − µ)/σ, and 1 + ξzj > 0 for j = 1, . . . , r. The joint distribution for ξ = 0 can be found by taking the limit ξ → 0 in conjunction with the Dominated Convergence Theorem and the shape parameter controls the tails of this distribution as discussed in the univariate GEV case. When r = 1, this distribution is exactly the GEV 5 Figure 1.1: The density function of the Generalized Extreme Value distribution for shape parameter values of −0.5, 0, and 0.5 with location and scale parameters fixed at zero and one, respectively. distribution. The parameters θ = (µ, σ, ξ)> remain the same for j = 1, . . . , r, r  B, but the convergence rate to the limit distribution reduces sharply as r increases. The conditional distribution of the rth component given the top r − 1 variables in (1.3) is the GEV distribution right truncated by yr−1 , which facilitates simulation from the GEVr distribution; see Appendix A.1. 6 Figure 1.2: A comparison of extremes selected via the peaks over threshold (left) versus block maxima approach for example time series data. 1.1.2 Peaks Over Threshold (POT) Approach Another approach to modeling extremes is the peaks over threshold method (POT). Instead of breaking up the underlying data into blocks and extracting the top observations from each block, POT sets some high threshold and uses only the observations above the threshold. Thus, POT is only concerned with the relevant observations, regardless of temporal ordering. Figure 1.2 displays the differences between the POT and block maxima approaches. Extreme value theory (McNeil and Saladin, 1997) says that given a suitably high threshold, data above the threshold will follow the Generalized Pareto (GPD) distribution. Under general regularity conditions, the only possible non-degenerate limiting distribution of properly rescaled exceedances of a threshold u is the GPD as u → ∞ (e.g., 7 Pickands, 1975). The GPD has cumulative distribution function F (y|θ) =  h    1 − 1 + ξy σu  h   1 − exp − i−1/ξ y σu i ξ 6= 0, y > 0, ξ = 0, 1+ ξy σu > 0, (1.4) y > 0, where θ = (σu , ξ), ξ is a shape parameter, and σu > 0 is a threshold-dependent scale parameter. The GPD also has the property that for some threshold v > u, the excesses follow a GPD with the same shape parameter, but a modified scale σv = σu + ξ(v − u). Let X1 , . . . , Xn be a random sample of size n. If u is sufficiently high, the exceedances Yi = Xi − u for all i such that Xi > u are approximately a random sample from a GPD. The GPD has the probability density function given by f (y|σu , ξ) =  h   1   σu 1 +     1 σu ξy σu h i−( 1ξ +1) exp − , ξ 6= 0, (1.5) y σu i , ξ = 0. defined on y ≥ 0 when ξ ≥ 0 and 0 ≤ y ≤ −σu /ξ when ξ < 0. Both the block or threshold approach are justified in theory, but choice in application depends on the context or availability of data. For instance, it may be the case that only the block maxima or top order statistics from each period are available. The block maxima / r largest approach provides a natural framework in which to retain temporal structure, while the POT requires additional care. This may be important if interest is in modeling non-stationary extremes. Ferreira, de Haan, et al. (2015) provide an 8 overview of practical considerations when choosing between the two methods. 1.1.3 Non-stationary Regional Frequency Analysis (RFA) Regional frequency analysis (RFA) is commonly used when historical records are short, but observations are available at multiple sites within a homogeneous region. A common difficulty with extremes is that, by definition, data is uncommon and thus short record length may make the estimation of parameters questionable. Regional frequency analysis resolves this problem by ‘trading space for time’; data from several sites are used in estimating event frequencies at any one site (Hosking and Wallis, 2005). Essentially, certain parameters are assumed to be shared across sites, which increases the efficiency in estimation of those parameters. In RFA, only the marginal distribution at each location needs to be specified. To set ideas, assume a region consists of m sites over n periods. Thus, observation t at site s can be denoted as Yst . A common assumption is that data within each site are independent between periods; however, within each period t, it is typically the case that there is correlation between sites. For example, sites within close geographic distance cannot have events assumed to be independent. Fully specified multivariate models generally require this dependence structure to be explicitly defined and it is clear that the dependence cannot be ignored. As noted by authors Stedinger (1983) and Hosking and Wallis (1988), intersite dependence can have a dramatic effect on the variance of these estimators. 9 There are a number of techniques available to adjust the estimator variances accordingly without directly specifying the dependence structure. Some examples are combined score equations (Wang, 2015), pairwise likelihood (Wang et al., 2014; Shang, Yan, Zhang, et al., 2015), semi-parametric bootstrap (Heffernan and Tawn, 2004), and composite likelihood (Chandler and Bate, 2007). 1.2 Motivation This thesis focuses on developing sound statistical methodology and theory to address practical concerns in extreme value applications. A common theme across the various methods developed here is automation, efficiency, and utility. There is a wide literature available of theoretical results and although recently the statistical modeling of extremes in application has gained in popularity, there are still methodological improvements that can be made. One of the major complications when modeling extremes in practice is deciding “what is extreme?”. The block maxima approach simplifies this idea somewhat, but for the POT approach, the threshold must be chosen. Similarly, if one wants to use the r largest order statistics from each block (to improve efficiency of the estimates), how is r chosen? Again, most of the current approaches do not address all three aspects mentioned earlier - automation, efficiency, and utility. For example, visual diagnostics cannot be easily automated, while certain resampling approaches are not scalable (efficiency), and many of the existing theoretical results may require some prior knowledge 10 about the domain of attraction of the limiting distribution and/or require computational methods in finite samples. As data continues to grow, there is a need for automation and efficiency / scalability. Climate summaries are currently available for tens of thousands of surface sites around the world via the Global Historical Climatology Network (GHCN) (Menne, Durre, Vose, Gleason, and Houston, 2012), ranging in length from 175 years to just hours. Other sources of large scale climate information are the National Oceanic and Atmospheric Administration (NOAA), United States Geological Survey (USGS), National Centers for Environmental Information (NCEI), Environment and Climate Change Canada, etc. One particular motivating example is creating a return level map of extreme precipitation for sites across the western United States. Climate researchers may want to know how return levels of extreme precipitation vary across a geographical region and if these levels are affected by some external force such as the El Niño–Southern Oscillation (ENSO). In California alone, there are over 2,500 stations with some daily precipitation records available. Either using a jointly estimated model such as regional frequency analysis or analyzing data site-wise, appropriate methods are needed to accommodate modeling a large number of sites. 1.2.1 Choice of r in the r Largest Order Statistics Model While the theoretical framework of extreme value theory is sound, there are many practical problems that arise in applications. One such issue is the choice of r in the GEVr 11 distribution. Since r is not explicitly a parameter in the distribution (1.3), the usual model selection techniques (i.e. likelihood-ratio testing, AIC, BIC) are not available. A bias-variance trade-off exists when selecting r. As r increases, the variance decreases because more data is used, but if r is chosen too high such that the approximation of the data to the GEVr distribution no longer holds, bias may occur. It has been shown that the POT method is more efficient than block maxima in small samples (Caires, 2009) and thus it is often recommended to use that method over block maxima. It appears that in application, the GEVr distribution is often not considered because of the issues surrounding the selection of r and that simply using the block maxima or POT approach are more straightforward. To the author’s knowledge, no comparison between efficiency of the GEVr distribution and POT method has been carried out in finite samples. In practice (An and Pandey, 2007; Smith, 1986) the recommendation for the choice of r is sometimes based on the amount of reduction in standard errors of the estimates. Smith (1986) and Tawn (1988) used probability plots for the marginal distributions of the rth order statistic to assess goodness of fit. Note that this can only diagnose poor model fit at the marginal level – it does not consider the full joint distribution. Tawn (1988) suggested an alternative test of fit using a spacings result in Weissman (1978), however this requires prior knowledge about the domain of attraction of the limiting distribution. These issues become even more apparent when it is desired to fit the GEVr distribution to more than just one sample. This is carried out for 30 stations 12 in the Province of Ontario on extreme wind speeds (An and Pandey, 2007) but the value of r = 5 is fixed across all sites. 1.2.2 Selection of Threshold in the POT Approach A similar, but distinct problem is threshold selection when modeling with the Generalized Pareto distribution. In practice, the threshold must be chosen, yet it cannot be chosen using traditional model selection tests since it is not a parameter in the distribution. This has been studied thoroughly in the literature. Various graphical procedures exist. The mean residual life (MRL) plot, introduced by Davison and Smith (1990) uses the expectation of GPD excesses; for v > u, E[X − v|X > v] is linear in v when the GPD fits the data above u. The idea is to choose the smallest value of u such that the plot is linear above this point. The Hill estimator (Hill, 1975) for the tail index ξ is based on a sum of the log spacings of the top k + 1 order statistics. Drees, De Haan, and Resnick (2000) discuss the Hill plot, which plots the Hill estimator against the top k order statistics. The value of k is chosen as the largest (i.e. lowest threshold) such that the Hill estimator has become stable. A similar figure, referred to as the threshold stability plot, compares the estimates of the GPD parameters at various thresholds and the idea is to choose a threshold such that the parameters at this threshold and higher are stable. It is clear that visual diagnostics cannot be scaled effectively. Even in the one sample case can be quite difficult to interpret, with the Hill plot being referred to as the ‘Hill 13 Figure 1.3: Mean Residual Life plot of Fort Collins daily precipitation data found in R package extRemes. Horror Plot’. Figures 1.3, 1.4, and 1.5 are examples of the mentioned plots applied to the Fort Collins daily precipitation data in R package extRemes (Gilleland and Katz, 2011a). Some practitioners suggest various ‘rules of thumb’, which involve selecting the threshold based on some predetermined fraction of the data or it can involve complicated resampling techniques. There is also the idea of using a mixture distribution, which involves specifying a ‘bulk’ distribution for the data below the threshold and using the GPD to model data above the threshold. In this way, the threshold can be explicitly modeled as a parameter. There are some drawbacks to this approach however – the ‘bulk’ distribution must be specified, and care is needed to ensure that the two densities 14 Figure 1.4: Threshold stability plot for the shape parameter of the Fort Collins daily precipitation data found in R package extRemes. Figure 1.5: Hill plot of the Fort Collins daily precipitation data found in R package extRemes. 15 are continuous at the threshold pount u0 . Goodness-of-fit testing can be used for threshold selection. A set of candidate thresholds u1 < . . . < ul can be tested sequentially for goodness-of-fit to the GPD. The goal is to select a smaller threshold in order to reduce variance of the estimates, but not too low as to introduce bias. Various authors have developed methodology to perform such testing, but they do not consider the multiple testing issue, or it can be computational intensive to perform. For a more thorough and detailed review of the approaches discussed in this section, see Scarrott and MacDonald (2012) and section 3.1. 1.2.3 Estimation in Non-stationary RFA Unless otherwise noted, going forward the assumption is that the marginal distribution used in fitting a regional frequency model is the GEV or block maxima method. It is well known that due to the non-regular shape of the likelihood function, the MLE may not exist when the shape parameter of the GEV distribution, ξ < −0.5 (Smith, 1985). This can cause estimation and/or optimization issues, especially in situations where the record length is short. Even so, maximum likelihood is widely popular and relatively straightforward to implement. As an alternative, in the stationary RFA case, one can use L-moments (Hosking, 1990) to estimate the parameters in RFA. L-moments has the advantage over MLE in that it only requires the existence of the mean, and has been shown to be more efficient in small samples (Hosking, Wallis, and Wood, 1985). However, for non-stationary RFA, it is not straightforward to incorporate covariates 16 using L-moments, and generally MLE is used – see (Katz, Parlange, and Naveau, 2002; López and Francés, 2013; Hanel, Buishand, and Ferro, 2009; Leclerc and Ouarda, 2007; Nadarajah, 2005) as examples. One approach to estimate time trends is by applying the stationary L-moment approach over sliding time windows (Kharin and Zwiers, 2005; Kharin, Zwiers, Zhang, and Wehner, 2013); that is, estimate the stationary parameters in (mutually exclusive) periods and study the change in parameters. This is not a precise method, as it is hard to quantify whether change is significant or due to random variation. In the one sample case, there has been some progress to combine non-stationarity and L-moment estimation. Ribereau, Guillou, and Naveau (2008) provide a method to incorporate covariates in the location parameter, by estimating the covariates first via least squares, and then transforming the data to be stationary in order to estimate the remaining parameters via L-moments. Coles and Dixon (1999) briefly discuss an iterative procedure to estimate covariates through maximum likelihood and stationary parameters through L-moments. However, these approaches only consider non-stationary in the location parameter and it may be of interest to perform linear modeling of the scale and shape parameters. 1.3 Outline of Thesis The rest of this thesis is as follows. Chapter 2 builds on the discussion in Section 1.2.1, developing two goodness-of-fit tests for selection of r in the r largest order statistics 17 model. The first is a score test, which requires approximating the null distribution via a parametric or multiplier bootstrap approach. Second, named the entropy difference test, uses the expected difference between log-likelihood of the distributions of the r and r − 1 top order statistics to produce an asymptotic test based on normality. The tests are studied for their power and size, and newly developed error control methods for order, sequential testing is applied. The utility of the tests are shown via applications to extreme sea level and precipitation datasets. Chapter 3 tackles the problem of threshold selection in the peaks over threshold model, discussed in Section 1.2.2. A goodness-of-fit testing approach is used, with an emphasis on automation and efficiency. Existing tests are studied and it is found that the Anderson–Darling has the most power in various scenarios testing a single, fixed threshold. The same error control method discussed in Section 2.6 can be adapted here to control for multiplicity in testing ordered, sequential thresholds for goodness-of-fit. Although the asymptotic null distribution of the Anderson–Darling testing statistic for the GPD has been derived (Choulakian and Stephens, 2001), it requires solving an integral equation. We develop a method to obtain approximate p-values in a computationally efficient manner. The test, combined with error control for the false discovery rate, is shown via a large scale simulation study to outperform familywise and no error controls. The methodology is applied to obtain a return level map of extreme precipitation of at hundreds of sites in the western United States. 18 When analyzing climate extremes at many sites, it may be desired to combine information across sites to increase efficiency of the estimates, for example, using a regional frequency model. In addition, one may want to incorporate non-stationary. Currently, the only estimation methods available in this framework may have drawbacks in certain cases, as discussed in Section 1.2.3. In Chapter 4, we introduce two alternative methods of estimation in non-stationary RFA, that have advantageous theoretical properties when compared to current estimation methods such as MLE. It is shown via simulation of spatial extremes with extremal and non-extremal dependence that the two new estimation methods empirically outperform MLE. A non-stationary regional frequency flood-index model is fit to annual maximum daily winter precipitation events at 27 locations in California, with an interest in modeling the effect of the El Niño–Southern Oscillation Index on these events. Chapter 5 provides a brief tutorial to the companion software package eva, which implements the majority of the methodology developed here. It provides new implementations of certain techniques, such as maximum product spacing estimation, and data generation and density estimation for the GEVr distribution. Additionally, it improves on existing implementations of extreme value analysis, particularly numerical handling of the near-zero shape parameter, profile likelihood, and user-friendly model fitting for univariate extremes. Lastly, a discussion of this body of work, and possible future direction follows in Chapter 6. 19 Chapter 2 Automated Selection of r in the r Largest Order Statistics Model 2.1 Introduction The largest order statistics approach is an extension of the block maxima approach that is often used in extreme value modeling. The focus of this chapter is (Smith, 1986, p.28– 29): “Suppose we are given, not just the maximum value for each year, but the largest ten (say) values. How might we use this data to obtain better estimates than could be made just with annual maxima?” The r largest order statistics approach may use more information than just the block maxima in extreme value analysis, and is widely used in practice when such data are available for each block. The approach is based on the limiting distribution of the r largest order statistics which extends the generalized extreme value (GEV) distribution (e.g., Weissman, 1978). This distribution, given in (1.3) and denoted as GEVr , has the same parameters as the GEV distribution, which makes it useful to estimate the GEV parameters when the r largest values are available for each 20 block. The approach was investigated by Smith (1986) for the limiting joint Gumbel distribution and extended to the more general limiting joint GEVr distribution by Tawn (1988). Because of the potential gain in efficiency relative to the block maxima only, the method has found many applications such as corrosion engineering (e.g., Scarf and Laycock, 1996), hydrology (e.g., Dupuis, 1997), coastal engineering (e.g., Guedes Soares and Scotto, 2004), and wind engineering (e.g., An and Pandey, 2007). In practice, the choice of r is a critical issue in extreme value analysis with the r largest order statistics approach. In general r needs to be small relative to the block size B (not the number of blocks n) because as r increases, the rate of convergence to the limiting joint distribution decreases sharply (Smith, 1986). There is a trade-off between the validity of the limiting result and the amount of information required for good estimation. If r is too large, bias can occur; if too small, the variance of the estimator can be high. Finding the optimal r should lead to more efficient estimates of the GEV parameters without introducing bias. Our focus here is the selection of r for situations where a number of largest values are available each of n blocks. In contrast, the methods for threshold or fraction selection reviewed in Scarrott and MacDonald (2012) deal with a single block (n = 1) of a large size B. The selection of r has not been as actively researched as the threshold selection problem in the one sample case. Smith (1986) and Tawn (1988) used probability (also known as PP) plots for the marginal distribution of the rth order statistic to assess its goodness of fit. The probability plot provides a visual diagnosis, but different viewers 21 may reach different conclusions in the absence of a p-value. Further, the probability plot is only checking the marginal distribution for a specific r as opposed to the joint distribution. Tawn (1988) suggested an alternative test of fit using a spacings results in Weissman (1978). Let Di be the spacing between the ith and (i + 1)th largest value in a sample of size B from a distribution in the domain of attraction of the Gumbel distribution. Then {iDi : i = 1, . . . , r − 1} is approximately a set of independent and identically distributed exponential random variables as B → ∞. The connections among the three limiting forms of the GEV distribution (e.g., Embrechts, Klüppelberg, and Mikosch, 1997, p.123) can be used to transform from the Fréchet and the Weibull distribution to the Gumbel distribution. Testing the exponentiality of the spacings on the Gumbel scale provides an approximate diagnosis of the joint distribution of the r largest order statistics when B is large. A limitation of this method, however, is that prior knowledge of the domain of attraction of the distribution is needed. Lastly, Dupuis (1997) proposed a robust estimation method, where the weights can be used to detect inconsistencies with the GEVr distribution and assess the fit of the data to the joint Gumbel model. The method can be extended to general GEVr distributions but the construction of the estimating equations is computing intensive with Monte Carlo integrations. In this chapter, two specification tests are proposed to select r through a sequence of hypothesis testing. The first is the score test (e.g., Rao, 2005), but because of the nonstandard setting of the GEVr distribution, the usual χ2 asymptotic distribution 22 is invalid. A parametric bootstrap can be used to assess the significance of the observed statistic, but is computationally demanding. A fast, large sample alternative to parametric bootstrap based on the multiplier approach (Kojadinovic and Yan, 2012) is developed. The second test uses the difference in estimated entropy between the GEVr and GEVr−1 models, applied to the r largest order statistics and the r − 1 largest order statistics, respectively. The asymptotic distribution is derived with the central limit theorem. Both tests are intuitive to understand, easy to implement, and have substantial power as shown in the simulation studies. Each of the two tests is carried out to test the adequacy of the GEVr model for a sequence of r values. The very recently developed stopping rules for ordered hypotheses in G’Sell, Wager, Chouldechova, and Tibshirani (2016) are adapted to control the false discovery rate (FDR), the expected proportion of incorrectly rejected null hypotheses among all rejections, or familywise error rate (FWER), the probability of at least one type I error in the whole family of tests. All the methods are available in the R package eva (Bader and Yan, 2016) and some demonstration is seen in Chapter 5. The rest of the chapter is organized as follows. The problem is set up in Section 2.2 with the GEVr distribution, observed data, and the hypothesis to be tested. The score test is proposed in Section 2.3 with two implementations: parametric bootstrap and multiplier bootstrap. The entropy difference (ED) test is proposed and the asymptotic distribution of the testing statistic is derived in Section 2.4. A large scale simulation study on the empirical size and power of the tests are reported in Section 2.5. In 23 Section 2.6, the multiple, sequential testing problem is addressed by adapting recent developments on this application. The tests are applied to sea level and precipitation datasets in Section 2.7. A discussion concludes in Section 2.8. The Appendices A.1 and A.2 contain the details of random number generation from the GEVr distribution and a sketch of the proof of the asymptotic distribution of the ED test statistic, respectively. 2.2 Model and Data Setup The limit joint distribution (Weissman, 1978) of the r largest order statistics of a random sample of size B as B → ∞ is the GEVr distribution with probability density function given in (1.3). The r largest order statistics approach is an extension of the block maxima approach in extreme value analysis when a number of largest order statistics are available for each one of a collection of independent blocks (Smith, 1986; Tawn, 1988). Specifically, let (yi1 , . . . , yir ) be the observed r largest order statistics from block i for i = 1, . . . , n. Assuming independence across blocks, the GEVr distribution is used in place of the GEV distribution (1.2) in the block maxima approach to make likelihood-based inference (r) about θ. Let li (θ) = l(r) (yi1 , . . . , yir |θ), where (r) l (y1 , . . . , yr |θ) = −r log σ − (1 + ξzr ) − 1ξ  − X r 1 +1 log(1 + ξzj ) ξ j=1 (2.1) is the contribution to the log-likelihood from a single block (y1 , . . . , yr ) with location 24 parameter µ, scale parameter σ > 0 and shape parameter ξ, where y1 > · · · > yr , zj = (yj − µ)/σ, and 1 + ξzj > 0 for j = 1, . . . , r. The maximum likelihood estimator (r) (MLE) of θ using the r largest order statistics is θ̂n = arg max (r) i=1 li (θ). Pn Model checking is a necessary part of statistical analysis. The rationale of choosing a larger value of r is to use as much information as possible, but not set r too high so that the GEVr approximation becomes poor due to the decrease in convergence rate. Therefore, it is critical to test the goodness-of-fit of the GEVr distribution with a sequence of null hypotheses (r) H0 : the GEVr distribution fits the sample of the r largest order statistics well for r = 1, . . . , R, where R is the maximum, predetermined number of top order statistics (r) to test. Two test procedures for H0 are developed for a fixed r first to help choose r ≥ 1 such that the GEVr model still adequately describes the data. The sequential testing process and the multiple testing issue are investigated in Section 2.6. 2.3 Score Test (r) A score statistic for testing goodness-of-fit hypothesis H0 is constructed in the usual way with the score function and the Fisher information matrix (e.g., Rao, 2005). For ease of notation, the superscript (r) is dropped. Define the score function S(θ) = n X i=1 Si (θ) = n X i=1 ∂li (θ)/∂θ 25 and Fisher information matrix I(θ), which have been derived in Tawn (1988). The behaviour of the maximum likelihood estimator is the same as that derived for the block maxima approach (Smith, 1985; Tawn, 1988), which requires ξ > −0.5. The score statistic is Vn = 1 > S (θ̂n )I −1 (θ̂n )S(θ̂n ). n Under standard regularity conditions, Vn would asymptotically follow a χ2 distribution with 3 degrees of freedom. The GEVr distribution, however, violates the regularity conditions for the score test (e.g., Casella and Berger, 2002, pp. 516-517), as its support depends on the parameter values unless ξ = 0. For illustration, Figure 2.1 presents a visual comparison of the empirical distribution of Vn with n = 5000 from 5000 replicates, overlaid with the χ2 (3) distribution, for ξ ∈ {−0.25, 0.25} and r ∈ {1, 2, 5}. The sampling distribution of Vn appears to be much heavier tailed than χ2 (3), and the mismatch increases as r increases as a result of the reduced convergence rate. Although the regularity conditions do not hold, the score statistic still provides a measure of goodness-of-fit since it is a quadratic form of the score, which has expectation zero under the null hypothesis. Extremely large values of Vn relative to its sampling (r) distribution would suggest lack of fit, and, hence, possible misspecification of H0 . So the key to applying the score test is to get an approximation of the sampling distribution of Vn . Two approaches for the approximation are proposed. 26 Shape: −0.25 Shape: 0.25 0.2 r: 1 0.1 0.0 r: 2 Density 0.2 0.1 0.0 0.2 r: 5 0.1 0.0 0 5 10 15 0 5 10 15 Score Statistic Figure 2.1: Comparisons of the empirical vs. χ2 (3) distribution (solid curve) based on 5000 replicates of the score test statistic under the null GEVr distribution. The number of blocks used is n = 5000 with parameters µ = 0, σ = 1, and ξ ∈ (−0.25, 0.25). 2.3.1 Parametric Bootstrap (r) The first solution is parametric bootstrap. For hypothesis H0 , the test procedure goes as follows: 1. Compute θ̂n under H0 with the observed data. 2. Compute the testing statistic Vn . 3. For every k ∈ {1, ..., L} with a large number L, repeat: 27 (a) Generate a bootstrap sample of size n for the r largest statistics from GEVr with parameter vector θ̂n . (k) (b) Compute the θ̂n under H0 with the bootstrap sample. (k) (c) Compute the score test statistic Vn . 4. Return an approximate p-value of Vn as L−1 PL k=1 (k) 1(Vn > Vn ). Straightforward as it is, the parametric bootstrap approach involves sampling from the null distribution and computing the MLE for each bootstrap sample, which can be very computationally expensive. This is especially true as the sample size n and/or the number of order statistics r included in the model increases. 2.3.2 Multiplier Bootstrap Multiplier bootstrap is a fast, large sample alternative to parametric bootstrap in goodnessof-fit testing (e.g., Kojadinovic and Yan, 2012). The idea is to approximate the asymptotic distribution of n−1/2 I −1/2 (θ)S(θ) using its asymptotic representation n n −1/2 −1/2 I 1 X φi (θ), (θ)S(θ) = √ n i=1 where φi (θ) = I −1/2 (θ)Si (θ). Its asymptotic distribution is the same as the asymptotic distribution of n 1 X Wn (Z, θ) = √ (Zi − Z̄)φi (θ), n i=1 28 conditioning on the observed data, where Z = (Z1 , ..., Zn ) is a set of independent and identically distributed multipliers (independent of the data), with expectation 0 and variance 1, and Z̄ = 1 n Pn i=1 Zi . The multipliers must satisfy R∞ 0 1 {Pr(|Z1 | > x)} 2 dx < ∞. An example of a possible multiplier distribution is N (0, 1). The multiplier bootstrap test procedure is summarized as follows: 1. Compute θ̂n under H0 with the observed data. 2. Compute the testing statistic Vn . 3. For every k ∈ {1, ..., L} with a large number L, repeat: (k) (k) (a) Generate Z (k) = (Z1 , . . . , Zn ) from N (0, 1). (b) Compute a realization from the approximate distribution of Wn (Z, θ) with Wn (Z (k) , θ̂n ). (k) (c) Compute Vn (θ̂n ) = Wn> (Z (k) , θ̂n )Wn (Z (k) , θ̂n ). 4. Return an approximate p-value of Vn as L−1 PL k=1 (k) 1(Vn > Vn ). This multiplier bootstrap procedure is much faster than parametric bootstrap procedure because, for each sample, it only needs to generate Z and compute Wn (Z, θ̂n ). The MLE only needs to be obtained once from the observed data. 29 2.4 Entropy Difference Test Another specification test for the GEVr model is derived based on the difference in entropy for the GEVr and GEVr−1 models. The entropy for a continuous random variable with density f is (e.g., Singh, 2013) Z ∞ E[− ln f (y)] = − f (y) log f (y)dy. −∞ It is essentially the expectation of negative log-likelihood. The expectation can be approximated with the sample average of the contribution to the log-likelihood from the observed data, or simply the log-likelihood scaled by the sample size n. Assuming that the r − 1 top order statistics fit the GEVr−1 distribution, the difference in the log(r) likelihood between GEVr−1 and GEVr provides a measure of deviation from H0 . Its asymptotic distribution can be derived. Large deviation from the expected difference (r) (r) under H0 suggests a possible misspecification of H0 . From the log-likelihood contribution in (2.1), the difference in log-likelihood for the (r) (r−1) ith block, Dir (θ) = li − li , is 1 1 Dir (θ) = − log σ − (1 + ξzir )− ξ + (1 + ξzir−1 )− ξ − Let D̄r = 1 n Pn i=1 2 Dir and SD = r Pn i=1 (Dir  1 + 1 log(1 + ξzir ). ξ (2.2) − D̄r )2 /(n − 1) be the sample mean and 30 sample variance, respectively. Consider a standardized version of D̄r as Tn(r) (θ) = √ n(D̄r − ηr )/SDr , (2.3) where ηr = − log σ − 1 + (1 + ξ)ψ(r), and ψ(x) = d log Γ(x)/dx is the digamma function. (r) The asymptotic distribution of Tn is summarized by Theorem 1 whose proof is relegated to Appendix A.2. This is essentially looking at the difference between the Kullback– (r) Leibler divergence and its sample estimate. It is also worth pointing out that Tn is only a function of the r and r − 1 top order statistics (i.e., only the conditional distribution f (yr |yr−1 ) is required for its computation). Alternative estimators of ηr can be used in place of D̄r as long as the regularity conditions hold; see Hall and Morton (1993) for further details. (r) Theorem 1. Let Tn (θ) be the quantity computed based on a random sample of size (r−1) n from the GEVr distribution with parameters θ and assume that H0 is true. Then (r) Tn converges in distribution to N (0, 1) as n → ∞. (r) Note that in Theorem 1, Tn is computed from a random sample of size n from a GEVr distribution. If the random sample were from a distribution in the domain of attraction of a GEVr distribution, the quality of the approximation of the GEVr distribution to the r largest order statistics depends on the size of each block B → ∞ with r  B. The block size B is not to be confused with the sample size n. Assuming (r) (r) ξ > −0.5, the proposed ED statistic for H0 is Tn (θ̂n ), where θ̂n is the MLE of θ with 31 the r largest order statistics for the GEVr distribution. Since θ̂n is consistent for θ with (r) (r) (r) ξ > −0.5, Tn (θ̂n ) has the same limiting distribution as Tn (θ) under H0 . (r) To assess the convergence of Tn (θ̂n ) to N (0, 1), 1000 GEVr replicates were simulated under configurations of r ∈ {2, 5, 10}, ξ ∈ {−0.25, 0, 0.25}, and n ∈ {50, 100}. Their quantiles are compared with those of N (0, 1) via quantile-quantile plots (not presented). It appears that a larger sample size is needed for the normal approximation to be good for larger r and negative ξ. This is expected because larger r means higher dimension of the data, and because the MLE only exists for ξ > −0.5 (Smith, 1985). For r less than 5 and ξ ≥ 0, the normal approximation is quite good; it appears satisfactory for sample size as small as 50. For r up to 10, sample size 100 seems to be sufficient. 2.5 2.5.1 Simulation Results Size The empirical sizes of the tests are investigated first. For the score test, the parametric bootstrap version and the multiplier bootstrap version are equivalent asymptotically, but may behave differently for finite samples. It is of interest to know how large a sample size is needed for the two versions of the score test to hold their levels. Random samples of size n were generated from the GEVr distribution with r ∈ {1, 2, 3, 4, 5, 10}, µ = 0, σ = 1, and ξ ∈ {−0.25, 0, 0.25}. All three parameters (µ, σ, ξ) were estimated. When the sample size is small, there can be numerical difficulty in obtaining the 32 MLE. For the multiplier bootstrap score and ED test, the MLE only needs to obtained once, for the dataset being tested. However, in addition, the parametric bootstrap score test must obtain a new sample and obtain the MLE for each bootstrap replicate. To assess the severity of this issue, 10,000 datasets were simulated for ξ ∈ {−0.25, 0, 0.25}, r ∈ {1, 2, 3, 4, 5, 10}, n ∈ {25, 50}, and the MLE was attempted for each dataset. Failure never occurred for ξ ≥ 0. With ξ = −0.25 and sample size 25, the highest failure rate of 0.69% occurred for r = 10. When the sample size is 50, failures only occurred when r = 10, at a rate of 0.04%. For the parametric bootstrap score test with sample size n ∈ {25, 50, 100}, Table 2.1 summarizes the empirical size of the test at nominal levels 1%, 5%, and 10% obtained from 1000 replicates, each carried out with bootstrap sample size L = 1000. Included only are the cases that converged successfully. Otherwise, the results show that the agreement between the empirical levels and the nominal level is quite good for samples as small as 25, which may appear in practice when long record data is not available. For the multiplier bootstrap score test, the results for n ∈ {25, 50, 100, 200} are summarized in Table 2.2. When the sample size is less than 100, it appears that there is a large discrepancy between the empirical and nominal level. For ξ ∈ {0, 0.25}, there is reasonable agreement between the empirical level and the nominal levels for sample size at least 100. For ξ = −0.25 and sample size at least 100, the agreement is good except for r = 1, in which case, the empirical level is noticeably larger than the nominal level. This may be due to different rates of convergence for various ξ values as ξ moves away 33 Table 2.1: Empirical size (in %) for the parametric bootstrap score test under the null distribution GEVr , with µ = 0 and σ = 1 based on 1000 samples, each with bootstrap sample size L = 1000. Sample Size r Nominal Size 25 50 1.0 5.0 10.0 1.0 5.0 6.0 6.0 5.0 5.4 6.7 8.7 1.1 0.8 0.8 0.6 0.4 0.5 4.8 3.4 4.3 3.1 3.3 3.9 100 10.0 1.0 5.0 10.0 9.3 0.6 4.1 6.5 0.6 3.6 7.7 1.1 4.8 6.9 1.1 5.1 8.3 0.6 3.1 8.4 0.7 4.2 8.0 8.1 8.1 8.8 6.5 7.6 ξ = −0.25 1 2 3 4 5 10 0.4 0.1 0.3 0.3 0.4 2.7 2.8 2.6 2.5 1.8 2.4 5.3 ξ=0 1 2 3 4 5 10 1.3 1.4 1.7 1.5 1.6 1.5 5.2 8.9 1.6 5.3 9.0 0.8 5.1 9.4 2.0 4.9 10.0 1.0 6.2 10.9 2.1 6.0 10.2 0.8 4.5 8.5 1.3 6.0 10.2 1.0 5.8 10.4 2.4 6.2 9.9 1.2 4.0 7.3 1.5 4.3 8.9 0.7 ξ = 0.25 1 1.7 4.5 2 1.8 5.1 3 1.5 4.4 4 1.2 3.3 5 1.7 4.4 10 1.1 4.6 9.7 8.7 9.4 8.1 9.4 8.3 2.6 1.8 1.5 1.1 1.1 1.5 4.7 4.3 4.9 4.4 5.0 4.6 9.3 9.9 9.8 9.8 9.7 8.2 7.1 11.5 1.1 4.6 4.4 8.5 0.5 2.9 3.7 8.1 1.0 4.2 4.6 9.7 1.1 4.3 4.2 8.6 0.6 4.8 6.1 10.7 1.0 3.9 9.1 7.5 9.4 9.6 9.6 8.5 from −0.5. It is also interesting to note that, everything else being held, the agreement becomes better as r increases. This may be explained by the more information provided by larger r for the same sample size n, as can be seen directly in the Fisher information matrix (Tawn, 1988, pp. 247–249). For the most difficult case with ξ = −0.25 and r = 1, the agreement gets better as sample size increases and becomes acceptable when sample size was 1000 (not reported). 34 Table 2.2: Empirical size (in %) for multiplier bootstrap score test under the null distribution GEVr , with µ = 0 and σ = 1. 1000 samples, each with bootstrap sample size L = 1000 were used. Although not shown, the empirical size for r = 1 and ξ = −0.25 becomes acceptable when sample size is 1000. Sample Size r Nominal Size ξ = −0.25 ξ=0 ξ = 0.25 1 2 3 4 5 10 1 2 3 4 5 10 1 2 3 4 5 10 25 50 100 200 1.0 5.0 10.0 1.0 5.0 10.0 1.0 5.0 10.0 1.0 5.0 10.0 7.0 2.0 2.1 3.3 3.6 2.0 3.3 2.8 6.1 5.1 4.2 3.1 1.8 5.7 7.1 5.4 4.4 3.3 13.4 6.9 5.8 7.2 9.0 7.0 8.4 8.7 12.1 10.4 9.0 9.2 6.7 12.7 12.2 9.8 10.1 8.9 18.9 13.4 11.7 12.3 14.0 10.3 15.3 14.4 16.5 14.5 14.5 14.4 13.7 17.1 16.5 16.8 15.8 15.3 6.3 1.3 1.1 1.1 2.3 2.6 2.2 1.8 3.0 3.6 2.2 2.4 1.3 4.7 5.3 3.7 3.5 2.4 13.8 6.4 5.9 4.9 6.8 7.4 7.0 7.5 7.2 10.1 8.2 6.4 4.7 9.9 9.4 9.0 8.2 6.6 19.6 12.4 11.1 10.8 11.2 12.8 12.5 13.0 12.2 14.9 12.5 9.8 10.4 14.9 14.8 13.4 13.6 12.3 5.4 1.6 1.1 1.0 1.1 2.1 1.1 0.9 1.5 1.0 1.7 0.6 0.8 3.5 4.2 2.6 2.4 1.6 11.4 6.9 5.0 5.2 6.2 6.4 4.6 5.7 6.0 5.6 6.5 4.6 4.4 7.4 8.4 6.0 7.4 5.8 16.3 13.6 10.8 11.9 10.6 10.1 9.2 10.3 10.4 10.3 12.0 9.0 11.5 11.6 12.5 11.4 11.4 10.9 5.4 1.4 1.5 1.1 1.1 1.4 1.3 0.5 1.4 1.1 1.8 1.1 0.9 3.2 1.8 1.2 1.6 1.7 10.5 6.7 5.9 5.6 4.5 6.4 6.1 5.0 4.5 5.4 6.2 3.8 4.9 7.9 6.1 4.9 5.9 6.6 15.2 12.8 11.8 10.6 9.3 11.6 11.2 10.6 9.8 10.6 12.5 9.3 11.4 11.7 10.7 11.2 10.0 12.4 (r) To assess the convergence of Tn (θ̂n ) to N (0, 1), 10,000 replicates of the GEVr distribution were simulated with µ = 0 and σ = 1 for each configuration of r ∈ {2, 5, 10}, ξ ∈ {−0.25, 0, 0.25}, and n ∈ {50, 100}. A rejection for nominal level α, is denoted (r) if |Tn (θ̂n )| > |Z α2 |, where Z α2 is the α/2 percentile of the N(0,1) distribution. Using this result, the empirical size of the ED test can be summarized, and the results are presented in Table 2.3. For sample size 50, the empirical size is above the nominal level for all configurations of r and ξ. As the sample size increases from 50 to 100, the empirical size stays the same or decreases in every setting. For sample size 100, the agreement between nominal and 35 Table 2.3: Empirical size (in %) for the entropy difference (ED) test under the null distribution GEVr , with µ = 0 and σ = 1 based on 10,000 samples. Sample Size r Nominal Size 50 1.0 5.0 100 10.0 1.0 5.0 10.0 ξ = −0.25 2 5 10 1.5 5.7 10.8 1.3 5.5 10.1 2.4 6.8 11.9 1.6 5.9 10.6 2.3 6.8 11.7 1.9 6.0 11.1 ξ=0 2 5 10 1.3 5.6 11.0 1.2 5.3 10.4 1.6 5.9 11.2 1.5 5.7 10.6 2.3 6.5 11.8 1.6 5.9 10.7 ξ = 0.25 2 1.3 5.7 10.7 1.3 5.4 10.5 5 1.6 5.8 11.5 1.3 5.6 10.2 10 2.0 6.6 11.9 1.4 5.5 10.4 observed size appears to be satisfactory for all configurations of r and ξ. For sample size 50, the empirical size is slightly higher than the nominal size, but may be acceptable to some practitioners. For example, the empirical size for nominal size 10% is never above 12%, and for nominal size 5%, empirical size is never above 7%. In summary, the multiplier bootstrap procedure of the score test can be used as a fast, reliable alternative to the parametric bootstrap procedure for sample size 100 or more when ξ ≥ 0. When only small samples are available (less than 50 observations), the parametric bootstrap procedure is most appropriate since the multiplier version does not hold its size and the ED test relies upon samples of size 50 or more for the central limit theorem to take effect. 36 2.5.2 Power The powers of the score tests and the ED test are studied with two data generating schemes under the alternative hypothesis. In the first scheme, 4 largest order statistics were generated from the GEV4 distribution with µ = 0, σ = 1, and ξ ∈ {−0.25, 0, 0.25}, and the 5th one was generated from a KumGEV distribution right truncated by the 4th largest order statistic. The KumGEV distribution is a generalization of the GEV distribution (Eljabri, 2013) with two additional parameters a and b which alter skewness and kurtosis. Defining Gr (y) to be the distribution function of the GEVr (µ, σ, ξ) distribution, the distribution function of the KumGEVr (µ, σ, ξ, a, b) is given by Fr (y) = 1 − {1 − [Gr (y)]a }b for a > 0, b > 0. The score test and the ED test were applied to the top 5 order statistics with sample size n ∈ {100, 200}. When a = b = 1, the null hypothesis of GEV5 is true. Larger difference from 1 of parameters a and b means larger deviation from the null hypothesis of GEV5 . Table 2.4 summarizes the empirical rejection percentages obtained with nominal size 5%, for a sequence value of a = b from 0.4 to 2.0, with increment 0.2. Both tests hold their sizes when a = b = 1 and have substantial power in rejecting the null hypothesis for other values of a = b. Between the two tests, the ED test demonstrated much higher power than the score test in the more difficult cases where the deviation from the null hypothesis is small; for example, the ED test’s power almost doubled the score test’s power for a = b ∈ {0.8, 1.2}. As expected, the powers of both tests increase as a = b moves away from 1 or as the sample sizes increases. 37 Table 2.4: Empirical rejection rate (in %) of the multiplier score test and the ED test in the first data generating scheme in Section 2.5.2 from 1000 replicates. Sample Size 100 ξ −0.25 0 0.25 200 −0.25 0 0.25 Test Value of a=b 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 Score ED Score ED Score ED 99.9 100.0 100.0 100.0 100.0 100.0 84.8 99.0 87.0 98.8 87.7 97.5 20.4 46.5 21.6 40.0 20.3 37.7 5.4 4.6 7.4 5.2 6.2 4.8 21.0 48.7 24.2 40.6 25.8 34.8 41.2 89.5 48.9 87.2 54.2 78.1 62.3 99.2 67.8 98.5 74.2 96.1 79.0 100.0 79.6 100.0 82.9 99.5 83.0 99.8 89.4 99.7 89.5 99.7 Score ED Score ED Score ED 100.0 100.0 100.0 100.0 100.0 100.0 98.6 100.0 99.4 99.9 99.3 100.0 40.7 78.4 44.6 75.0 44.5 71.0 5.2 6.2 6.1 5.5 6.3 5.2 29.8 70.0 34.9 64.6 37.0 57.2 64.7 99.2 75.0 98.1 73.4 95.9 86.4 100.0 92.4 99.8 91.8 100.0 95.9 100.0 97.3 100.0 97.0 100.0 97.5 100.0 98.6 100.0 98.9 100.0 In the second scheme, top 6 order statistics were generated from the GEV6 distribution with µ = 0, σ = 1, and ξ ∈ {−0.25, 0, 0.25}, and then the 5th order statistic was replaced from a mixture of the 5th and 6th order statistics. The tests were applied to the sample of first 5 order statistics with sample sizes n ∈ {100, 200}. The mixing rate p of the 5th order statistic took values in {0.00, 0.10, 0.25, 0.50, 0.75, 0.90, 1.00}. When p = 1 the null hypothesis of GEV5 is true. Smaller values of p indicate larger deviations from the null. Again, both tests hold their sizes when p = 1 and have substantial power for other values of p, which increases as p decreases or as the sample sizes increases. The ED test again outperforms the score test with almost doubled power in the most difficult cases with p ∈ {0.75, 0.90}. For sample size 100 with p = 0.50, for instance, the ED test has power above 93% while the score test only has power above 69%. The full results are seen in Table 2.5. 38 Table 2.5: Empirical rejection rate (in %) of the multiplier score test and the ED test in the second data generating scheme in Section 2.5.2 from 1000 replicates. Sample Size ξ Test Mixing Rate p 0.00 2.6 0.10 0.25 0.50 0.75 0.90 1.00 69.4 97.7 72.4 96.0 70.8 93.6 24.1 7.8 51.8 10.9 22.7 6.2 47.6 10.3 24.7 5.8 43.4 9.8 5.8 6.2 6.8 5.6 5.3 5.2 99.7 95.6 43.4 11.4 100.0 100.0 83.6 20.0 100.0 96.5 44.4 11.2 100.0 100.0 79.5 20.0 100.0 97.2 46.9 9.2 100.0 99.7 72.5 17.9 5.1 5.8 5.4 5.5 5.5 4.2 100 −0.25 99.7 99.5 95.5 100.0 100.0 100.0 100.0 99.7 97.8 100.0 100.0 100.0 99.9 99.7 96.6 100.0 100.0 99.9 200 −0.25 99.9 100.0 100.0 100.0 100.0 100.0 Score ED 0 Score ED 0.25 Score ED Score ED 0 Score ED 0.25 Score ED 100.0 100.0 100.0 100.0 100.0 100.0 Automated Sequential Testing Procedure (r) As there are R hypotheses H0 , r = 1, . . . , R, to be tested in a sequence in the methods proposed, the sequential, multiple testing issue needs to be addressed. Most methods for error control assume that all the tests can be run first and then a subset of tests are chosen to be rejected (e.g., Benjamini, 2010a,b). The errors to be controlled are either the FWER (Shaffer, 1995), or the FDR (Benjamini and Hochberg, 1995; Benjamini and Yekutieli, 2001). In contrast to the usual multiple testing procedures, however, a unique feature in this setting is that the hypotheses must be rejected in an ordered fashion: if (r) (k) H0 is rejected, r < R, then H0 will be rejected for all r < k ≤ R. Despite the extensive literature on multiple testing and the more recent developments on FDR control and 39 its variants, no definitive procedure has been available for error control in ordered tests until the recent work of G’Sell et al. (2016). Consider a sequence of null hypotheses H1 , . . . , Hm . An ordered test procedure must reject H1 , . . . , Hk for some k ∈ {0, 1, . . . , m}, which rules out the classical methods for FDR control (Benjamini and Hochberg, 1995). Let p1 , . . . , pm ∈ [0, 1] be the corresponding p-values of the m hypotheses such that pj is uniformly distributed over [0, 1] when Hj is true. The methods of G’Sell et al. (2016) transform the sequence of p-values to a monotone sequence and then apply the original Benjamini–Hochberg procedure on the monotone sequence. They proposed two rejections rules, each returning a cutoff k̂ such that H1 , . . . , Hk̂ are rejected. The first is called ForwardStop, ) k 1X log(1 − pi ) ≤ α , k̂F = max k ∈ {1, . . . , m} : − k i=1 ( (2.4) and the second is called StrongStop, ( k̂S = max k ∈ {1, . . . , m} : exp m X log p  j j=k j αk ≤ m ) , (2.5) where α is a pre-specified level. Both rules were shown to control the FDR at level α under the assumption of independent p-values. ForwardStop sets the rejection threshold at the largest k at which the average of first k transformed p-values is small enough. As it does not depend on those p-values with later indices, this rule is robust to potential 40 misspecification at later indices. StrongStop offers a stronger guarantee than ForwardStop. If the non-null p-values indeed precede the null p-values, it controls the FWER at level α in addition to the FDR. Thus, for ForwardStop, this α refers to the FDR and for StrongStop, α refers to the FWER. As the decision to stop at k depends on all the p-values after k, its power may be harmed if, for example, the very last p-values are slightly higher than expected under the null hypotheses. To apply the two rules to our setting, note that our objective is to give a threshold r̂ such that the first r̂ of m = R hypotheses are accepted instead of rejected. Therefore, we put the p-values in reverse order: let the ordered set of p-values {p1 , . . . , pR } correspond (R) (1) (R) (R−k̂+1) to hypotheses {H0 , . . . , H0 }. The two rules give a cutoff k̂ ∈ {1, . . . , R} such that the hypotheses H0 , . . . , H0 are rejected. If no k̂ ∈ {1, . . . , R} exists, then no rejection is made. A caveat is that, unlike the setting of G’Sell et al. (2016), the p-values of the sequential tests are dependent. Nonetheless, the ForwardStop and StrongStop procedures may still provide some error control. For example, in the non-sequential multiple testing scenario Benjamini and Yekutieli (2001) show that their procedure controls the FDR under certain positive dependency conditions, while Blanchard and Roquain (2009) implement adaptive versions of step-up procedures that provably control the FDR under unspecified dependence among p-values. The empirical properties of the two rules for the tests in this paper are investigated in simulation studies. To check the empirical FWER of the StrongStop rule, 41 only data under the null hypotheses are needed. With R = 10, ξ ∈ {−0.25, 0.25}, n ∈ {30, 50, 100, 200}, µ = 0, and σ = 1, 1000 GEV10 samples were generated. For the ED, multiplier bootstrap score, and parametric bootstrap score test, the observed FWER is compared to the expected rates at various nominal α control levels. The StrongStop procedure is used, as well as no error control (i.e. a rejection occurs any time the raw p-value is below the nominal level). The results of this simulation are presented in Figure 2.2. It is clear that the StrongStop reasonably controls the FWER for the ED test and the agreement between the observed and expected rate increases as the sample size increases. For both the parametric and multiplier bootstrap versions of the score test however, the observed FWER is above the expected rate, at times 10% higher. Regardless, it is apparent that using no error control results in an inflated FWER, and this inflation can only increase as the number of tests increase. To check the empirical FDR of the ForwardStop rule, data need to be generated from a non-null model. To achieve this, consider the sequence of specification tests of GEVr distribution with r ∈ {1, . . . , 6}, where the 5th and 6th order statistics are misspecified. Specifically, data from the GEV7 distribution with µ = 0 and σ = 1 were generated for n blocks; then the 5th order statistic is replaced with a 50/50 mixture of the 5th and 6th order statistics, and the 6th order statistic is replaced with a 50/50 mixture of the 6th and 7th order statistics. This is replicated 1000 times for each value of ξ ∈ {−0.25, 0.25} and n ∈ {30, 50, 100, 200}. For nominal level α, the observed FDR 42 1.00 0.25 0.00 1.00 0.75 0.50 0.25 0.00 n: 100 n: 200 ● ●●●●● ●●●●● ●●●●●● ●●●●● ●●●● ●●●●● ●●●● ●●● ●●●● ●●● ●● ● ●●● ●●● ●● ●●● ●●●●●●●●● ●●● ●●● ●●●●●● ●●● ●●● ●●● ●● ●● ●● ● ●● ● ●●● ●● ●● ●● ●●● ●● ●●● ●● ●● ●● ●● ●●●● ●●●● ●●●●●● ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ●●●●● ●● ● ● ● ● ●● ●●● ●●● ● ● ● ● ● ● ●● ● ●●● ● ● ●● ● ●● ● ● ● ●● ●● ● ● ●● ● ●● ●● ●● ●● ● ● ●● ● ● ●●●●●● ●● ●● ● ●● ●● ● ● ● ● ●●● ● ●●● ●●● ● ●● ●● ●●●●●●● ●●● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●●●●● ● ● ●● ● ●● ●● ● ● ● ● ●●●● ●●● ● ● ● ● ● ● ● ●●● ●●● ● ● ●● ●● ●● ● ● ● ●● ● ● ● ● ● ●●● ● ● ●● ●● ● ● ● ● Shape: 0.25 Observed FWER 0.50 n: 50 ●●●● ●●●● ●●●●● ●●●●●●● ●●●●● ●●●●● ●●●●● ●●●● ●●● ●●● ●●● ●●● ●●● ●● ● ●● ●● ● ●●● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ●● ●● ● ●● ● ●●● ●●●●●●● ●●● ●● ●●● ●● ●● ●● ●● ●● ●●●●● ● ●●● ●●●●●● ●●● ● ●● ● ●● ●● ●● ●● ●● ●● ●●●● ●● ● ●● ● ●● ● ●●●●● ●● ●●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●● ● ●● ●● ● ●● ●●●●● ● ●● ● ●● ● ●● ●●● ● ●● ●● ●● ●●●● ● ● ● ● ●● ●● ● ●● ●● ●● ●●●● ● ● ●● ● ●● ●● ● ●● ●● ●●●● ●● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ●● ● ● ●●●● ●● ● ● ●● ●●● ●● ● ●● ●●●●● ● ● ●● ● ●●●● ●● ●● ● ●● ●● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● Shape: −0.25 0.75 n: 30 0.05 0.15 0.25 0.05 0.15 0.25 0.05 Target FWER 0.15 0.25 0.05 0.15 0.25 Adjustment ● None StrongStop Test ● ED ● MB Score ● PB Score Figure 2.2: Observed FWER for the ED, parametric bootstrap (PB) score, and multiplier bootstrap (MB) score tests (using No Adjustment and StrongStop) versus expected FWER at various nominal levels. The 45 degree line indicates agreement between the observed and expected rates under H0 . is defined as the number of false rejections (i.e. any rejection of r ≤ 4) divided by the number of total rejections. The results are presented in Figure 2.3. The plots show that the ForwardStop procedure controls the FDR for the ED test, while for both versions of the score test, the observed FDR is slightly higher than the expected at most nominal rates. Here, sample size does not appear to effect the observed rates. Similarly, the observed FWER rate in this particular simulation setting can be found by taking the number of simulations with at least one false rejection (here, any rejection of r ≤ 4) and dividing that number by the total number of simulations. This calculation is performed for a variety of nominal levels α, using the StrongStop procedure. The results are presented in Figure 2.3. In this particular simulation setting, the StrongStop 43 n: 30 0.5 n: 50 n: 100 n: 200 Shape: −0.25 0.4 0.2 0.1 0.0 0.5 ● ●● ● ● ●●●● ●●● ●●● ●● ●●● ●●● ●● ●●● ●●● ● ●●● ●●● ●● ● ●●● ●●●●●● ● ● ●●●●●● ●●● ●●● ● ● ●●● ●●●●●●●●●●● ●● ●●● ●● ●●● ●●● ●● ●● ●●●● ●●●● ●●●●●● ● ● ●● ●● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ●● ● ●● ● ●● ●● ●● ● ●● ●●●●●● ● ●●● ●●● ●● ●●● ●●●● ●●●●● ●● ●●●●● ●● ●● ●● ● ●● ●●●●● ●● ●●● ●● ● ●● ● ●● ●● ● ● ●● ● ●● ● ●● ● ●● ●●● ● ●● ●● ●● ●● ●● ●● ● ●● ● ● ●● ●● ●● ● ●●● ●●●●●● ●●●● ●●●●●● ●●●● ●●● ●● ●● ●●●●●●●●● ●●●●●●● ●●●●●●●●● ●●● ●● ● ●● ●● ●●●● ●●●●●●●● ●●●●●●● ●●●●●●●●●● ●●● ●●●● Shape: 0.25 Observed Level 0.3 0.4 0.3 0.2 0.1 0.0 ●● ●● ●●● ●●● ●●● ●●●● ●●●●● ● ● ●●●●● ●●●●● ●●●●● ● ●● ●● ●●●● ●● ●●● ●●●●● ●●● ●● ● ● ●●●●● ●●●● ● ●● ●●●●●● ● ● ● ●●●●●●● ●●●●●● ●●● ●●●●●●●●●● ●●● ●●● ●●●●●●●●●●● ● ●●● ● ●●●●●●●●●●● ● ● ●●● ● ●● ● ● ● ● ●● ● ●● ●● ● ●● ●● ●● ● ●● ●●● ●● ●● ●● ●●●●●● ●●●●● ●●●●● ●●● ●●●● ●●●●●●● ●●● ●● ●●●● ●●●● ●●● ●●●● ●●●●●●●●●● ●●● ●●● ●●●●●● ●●●●●●●●● ●●●●●● ●●●●●●● ●●●● ●●●●●●●●● ●●●●●●●●●● ●● ● ●●●●● ●● ●●●●● ●●●●●●● ●●●●●●●● ●●●● ●●●●●●●●● ●●●● ●●●●●●●●●● ●●● 0.05 0.15 0.25 0.05 0.15 0.25 0.05 Target Level 0.15 0.25 0.05 0.15 0.25 Control ForwardStop ● StrongStop Test ● ED ● MB Score ● PB Score Figure 2.3: Observed FDR (from ForwardStop) and observed FWER (from StrongStop) versus expected FDR and FWER, respectively, at various nominal levels. This is for the simulation setting described in Section 2.6, using the ED, parametric bootstrap (PB) score, and multiplier bootstrap (MB) score tests. The 45 degree line indicates agreement between the observed and expected rates. procedure controls the FWER for the ED test and both versions of the score test at all sample sizes investigated. It is of interest to investigate the performance of the ForwardStop and StrongStop in selecting r for the r largest order statistics method. In the simulation setting described in the last paragraph, the correct choice of r should be 4, and a good testing procedure should provide a selection r̂ close to 4. The choice r̂ ∈ {0, . . . , 6} is recorded using the ED test and bootstrap score tests with both ForwardStop and StrongStop. Due to space constraints, we choose to present one setting, where ξ = 0.25 and n = 100. The non-adjusted sequential procedure is also included, testing in an ascending manner from r = 1 and r̂ is chosen by the first rejection found (if any). The results are summarized 44 in Table 2.6. In general, larger choices of α lead to a higher percentage of r̂ = 4 being correctly chosen with ForwardStop or StrongStop. Intuitively, this is not surprising since a smaller α makes it more difficult to reject the ‘bad’ hypotheses of r ∈ {5, 6}. A larger choice of α also leads to a higher probability of rejecting too many tests; i.e. choosing r too small. From the perspective of model specification, this is more desirable than accepting true negatives. A choice of 6, 5, or 0 is problematic, but choosing 1, 2, or 3 is acceptable, although some information is lost. When no adjustment is used and an ascending sequential procedure is used, both tests have reasonable classification rates. When α = 0.05, the ED test achieves the correct choice of r 79.9% of the time, with the parametric bootstrap and multiplier bootstrap score tests achieving 68.1% and 59.6% respectively. Of course, as the number of tests (i.e., R) increase, with no adjustment the correct classification rates will go down and the ForwardStop/StrongStop procedures will achieve better rates. This may not be too big an issue here as R is typically small. In the case where rich data are available and R is big, the ForwardStop and StrongStop becomes more useful as they are designed to handle a large number of ordered hypothesis. 6 5 4 3 2 1 0 6 5 4 3 2 1 0 6 5 4 3 2 1 0 PB Score MB Score Significance: r ED Test 49.9 2.5 38.3 1.6 2.7 4.2 0.8 35.8 2.5 58.4 0.5 0.6 0.8 1.4 19.0 1.9 76.2 0.8 1.1 1.0 - 0.01 16.9 2.3 59.6 2.8 4.4 8.3 5.7 16.1 1.8 68.1 2.3 3.0 3.7 5.0 3.4 2.1 79.9 4.1 5.3 5.2 - 0.05 6.9 0.7 59.1 4.0 7.1 10.6 11.6 8.5 0.8 63.9 4.5 4.9 6.9 10.5 1.5 1.1 70.2 7.6 9.5 10.1 - 0.1 1.3 0.3 44.0 6.6 11.0 14.0 22.8 1.8 0.5 46.1 6.8 10.3 13.9 20.6 0.5 0.7 50.5 11.8 16.2 20.3 - 0.2 Unadjusted 0.2 0.1 31.2 7.5 10.0 19.5 31.5 0.6 0.2 31.3 7.1 11.7 18.3 30.8 0.0 0.2 35.2 15.3 19.9 29.4 - 0.3 0.0 0.0 18.4 6.0 10.6 20.0 45.0 0.2 0.1 19.8 8.0 12.7 18.5 40.7 0.0 0.1 22.3 15.1 22.8 39.7 - 0.4 71.7 1.3 26.6 0.3 0.1 0.0 0.0 53.5 1.9 42.6 1.4 0.5 0.1 0.0 86.6 1.3 12.0 0.1 0.0 0.0 - 0.01 40.3 2.0 53.3 2.8 0.6 0.9 0.1 33.0 1.3 57.8 4.2 1.7 1.3 0.7 69.8 1.5 25.1 3.4 0.1 0.1 - 0.05 24.7 0.8 59.3 7.4 3.4 2.7 1.7 23.4 0.7 58.9 9.0 3.0 2.3 2.7 58.5 1.1 31.7 6.2 1.9 0.6 - 0.1 12.6 0.5 49.9 15.7 8.6 4.7 8.0 13.9 0.8 51.1 15.5 7.3 4.6 6.8 43.0 0.9 33.4 12.4 5.4 4.9 - 0.2 ForwardStop 7.8 0.3 40.1 16.0 9.7 7.9 18.2 8.6 0.4 42.0 16.0 10.2 8.3 14.5 30.0 0.2 31.6 17.0 9.4 11.8 - 0.3 5.5 0.4 28.0 17.9 9.5 7.8 30.9 5.9 0.4 31.1 17.1 12.3 9.6 23.6 22.4 0.0 26.3 18.5 11.5 21.3 - 0.4 51.6 39.4 6.2 0.6 0.7 1.5 0.0 40.6 29.8 29.3 0.0 0.1 0.2 0.0 52.4 25.0 22.6 0.0 0.0 0.0 - 0.01 27.3 50.7 18.5 1.2 0.8 1.5 0.0 25.1 37.7 36.5 0.4 0.1 0.2 0.0 22.2 18.9 58.9 0.0 0.0 0.0 - 0.05 16.9 42.9 35.0 2.5 1.2 1.5 0.0 18.8 29.2 50.5 1.1 0.2 0.2 0.0 13.1 13.6 72.9 0.3 0.1 0.0 - 0.1 10.4 25.5 55.4 3.6 2.8 2.3 0.0 12.1 17.5 65.7 3.3 1.0 0.4 0.0 5.4 6.7 84.9 2.2 0.7 0.1 - 0.2 StrongStop 6.2 15.8 62.3 7.0 5.3 3.4 0.0 7.6 10.5 73.5 4.8 2.4 1.2 0.0 1.7 2.9 89.0 4.5 1.8 0.1 - 0.3 4.3 9.4 64.8 7.8 7.0 6.4 0.3 5.6 6.6 74.6 5.6 4.5 2.7 0.4 1.0 1.4 85.7 6.9 4.4 0.6 - 0.4 Table 2.6: Percentage of choice of r using the ForwardStop and StrongStop rules at various significance levels or FDRs, under ED, parametric bootstrap (PB) score, and multiplier bootstrap (MB) score tests, with n = 100 and ξ = 0.25 for the simulation setting described in Section 2.6. Correct choice is r = 4. 45 46 2.7 2.7.1 Illustrations Lowestoft Sea Levels Sea level readings in 60 and 15 minute intervals from a gauge at Lowestoft off the east coast of Britain during the years 1964–2014 are available from the UK Tide Gauge Network website. The readings are hourly from 1964–1992 and in fifteen minute intervals from 1993 to present. Accurate estimates of extreme sea levels are of great interest. The current data are of better quality and with longer record than those used in Tawn (1988) — annual maxima during 1953–1983 and hourly data during 1970–78 and 1980–82. Justification of the statistical model was considered in detail by Tawn (1988). The three main assumptions needed to justify use of the GEVr model are: (1) The block size B is large compared to the choice of r; (2) Observations within each block and across blocks are approximately independent; and (3) The distribution of the block maxima follows GEV1 . The first assumption is satisfied, by letting R = 125, and noting that the block size for each year is B = 365×24 = 8760 from 1964–1992 and B = 365×96 = 35040 from 1993–2014. This ensures that r  B. The third assumption is implicitly addressed in the testing procedure; if the goodness-of-fit test for the block maxima rejects, all subsequent tests for r > 1 are rejected as well. The second assumption can be addressed in this setting by the concept of independent storms (Tawn, 1988). The idea is to consider each storm as a separate event, with each storm having some storm length, say τ . Thus, when selecting the r largest values from 47 each block, only a single contribution can be obtained from each storm, which can be considered the r largest independent annual events. By choosing τ large enough, this ensures both approximate independence of observations within each block and across blocks. The procedure to extract the independent r largest annual events is as follows: 1. Pick out the largest remaining value from the year (block) of interest. 2. Remove observations within a lag of τ /2 from both sides of the value chosen in step 1. 3. Repeat (within each year) until the r largest are extracted. A full analysis is performed on the Lowestoft sea level data using τ = 60 as the estimated storm length (Tawn, 1988). Using R = 125, both the parametric bootstrap score (with bootstrap sample size L = 10, 000) and ED test are applied sequentially on the data. The p-values of the sequential tests (adjusted and unadjusted) can be seen in Figure 2.4. Due to the large number of tests, the adjustment for multiplicity is desired and thus, ForwardStop is used to choose r. For this dataset, the score test is more powerful than the ED test. With ForwardStop and the score test, Figure 2.4 suggests that r = 33. The remainder of this analysis proceeds with the choice of r = 33. The estimated parameters and corresponding 95% profile confidence intervals for r = 1 through r = 40 are shown in Figure 2.5. When r = 33, the parameters are estimated as µ̂ = 3.462 (0.023), σ̂ = 0.210 (0.013), and ξˆ = −0.017 (0.023), with standard errors in parenthesis. An important risk measure 48 ● 0.8 ●●●●●●●●●●●●● ●●●● ●●●●●●●●●●●●●●●●●● ● ●● ●●●●● ●●● ForwardStop ● 0.6 ● ●●●● ●●●● 0.4 ●● ●●●●●●●●●●●● ● ●●● ●● ●● ●●●●●●●● 0.2 ●●● ●●●●●●●● ●●●●● ●● 0.0 ●●●●●●●●●●●●●●●●●●●●●●●● ● ●●●● ●●●●●●●●●●● ●●●●● ● ●●●●●●●● 0.9 ●●● ●●●●●● ● ●●●●●●●● ●● ● 0.6 ●●● ● ●●●● ●●●● ●●● 0.3 ● ● ● 0.0 1.00 ●● ● ● ● ● ● ● 0.75 ● ●● ● ● ● ● ● ● ● ● ● ● 0 10 20 ● ● ● ●● ● ● 0.00 ● ● ● ● ● ● ● ● ● ● ● 40 ● ● ● ● 50 60 ● ● 70 ● 80 ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● 30 ●● ● ● ● ● ● ● ● ● ●●●●●●●● ● ● ● 0.25 ●● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● 0.50 ● ●● ● ● ● ● ● UnAdjusted ● ●●●●● StrongStop P−Value ●●●●●●●●●●●●● ●●● ●●●●●●●●●●●●●● ● ● ● ●● 90 ● ● ● 100 ● ● ●●●● ● 110 ● ● ● ●● ● ● ●●● ● 120 r Test ED PB Score ● Figure 2.4: Adjusted p-values using ForwardStop, StrongStop, and raw (unadjusted) p-values for the ED and PB Score tests applied to the Lowestoft sea level data. The horizontal dashed line represents the 0.05 possible cutoff value. is the t-year return level zt (e.g., Hosking, 1990; Ribereau et al., 2008; Singo, Kundu, Odiyo, Mathivha, and Nkuna, 2012). It can be thought of here as the sea level that is exceeded once every t years on average. Specifically, the t-year return level is the 1 − 1/t quantile of the GEV distribution (which can be substituted with corresponding quantities from the GEVr distribution), given by zt =      µ − σξ 1 − [− log(1 − 1t )]−ξ , ξ 6= 0,    µ − σ log[− log(1 − 1 )], t ξ = 0. (2.6) 49 Location 3.52 50 Year Return Level 5.6 3.48 ● 3.44 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 5.2 4.8 ● ● 3.40 ● ● ● ● 4.4 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 3.36 Scale 0.300 6.0 0.275 Value 100 Year Return Level 6.5 0.250 ● ● 0.225 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.200 5.5 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 5.0 ● ● ● ● 4.5 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.175 Shape 200 Year Return Level 7 0.2 0.1 ● 6 ● ● ● ● ● ● ● ● 0.0 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 5 ● ● ● ● ● −0.1 0 5 10 15 20 25 30 35 40 0 5 ● ● ● ● ● ● ● ● ● ● ● ● 10 15 20 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 25 30 35 40 r Figure 2.5: Location, scale, and shape parameter estimates, with 95% delta confidence intervals for r = 1, . . . , 40 for the Lowestoft sea level data. Also included are the estimates and 95% profile likelihood confidence intervals for the 50, 100, and 200 year return levels. The vertical dashed line represents the recommended cutoff value of r from the analysis in Section 2.7.1. The return levels can be estimated with parameter values replaced with their estimates, and confidence intervals can be constructed using profile likelihood (e.g., Coles, 2001, p.57). The 95% profile likelihood confidence intervals for the 50, 100, and 200 year return levels (i.e. z50 , z100 , z200 ) are given by (4.102, 4.461), (4.210, 4.641) and (4.312, 4.824), respectively. The benefit of using r = 1 versus r = 33 can be seen in the return level confidence intervals in Figure 2.5. For example, the point estimate of the 100 year 50 return level decreases slightly as r increases and the width of the 95% confidence interval decreases drastically from 2.061 (r = 1) to 0.432 (r = 33), as more information is used. The lower bound of the interval however remains quite stable, shifting from 4.330 to 4.210 — less than a 3% change. Similarly, the standard error of the shape parameter estimate decreases by over two-thirds when using r = 33 versus r = 1. 2.7.2 Annual Maximum Precipitation: Atlantic City, NJ The top 10 annual precipitation events (in centimeters) were taken from the daily records of a rain gauge station in Atlantic City, NJ from 1874–2015. The year 1989 is missing, while the remaining records are greater than 98% complete. This provides a total record length of 141 years. The raw data is a part of the Global Historical Climatology Network (GHCN-Daily), with an overview given by Menne et al. (2012). The specific station identification in the dataset is USW00013724. Unlike for the Lowestoft sea level data, a rather small value is set for R at R = 10 because of the much lower frequency of the daily data. Borrowing ideas from Section 2.7.1, a storm length of τ = 2 is used to ensure approximate independence of observations. Both the parametric bootstrap score (with L = 10, 000) and ED test are applied sequentially on the data. The p-values of the sequential tests (ForwardStop, StrongStop, and unadjusted) are shown in Figure 2.6. The score test does not pick up anything. The ED test obtains p-values 0.002 and 0.016, respectively, for r = 9 and r = 10, which translates into a rejection using ForwardStop. Thus, Figure 2.6 suggests that r = 8 be 51 ForwardStop 2 ● ● ● 1 ● ● ● ● ● ● ● StrongStop P−Value 0 1.5 ● 1.0 ● ● ● ● ● 0.5 ● 0.0 1.00 ● ● ● ● UnAdjusted 0.75 0.50 ● ● ● 0.25 ● 0.00 1 2 3 4 5 6 7 8 ● ● 9 10 r Test ● ED PB Score Figure 2.6: Adjusted p-values using ForwardStop, StrongStop, and raw (unadjusted) p-values for the ED and PB Score tests applied to the Atlantic City precipitation data. The horizontal dashed line represents the 0.05 possible cutoff value. used for the analysis. With r = 8, the estimated parameters are given as µ̂ = 6.118 (0.139), σ̂ = 2.031 (0.118), and ξˆ = 0.219 (0.032). This suggests a heavy upper tail for the estimated distribution (i.e. ξˆ > 0). The progression of parameters and certain return level estimates can be seen in Figure 2.7. The 50, 100, and 200 year return level 95% confidence intervals for r = 8 are calculated using the profile likelihood method and are given by (16.019, 22.411), (18.606, 26.979), and (21.489, 31.136), respectively. The advantages of using r = 8 versus the block maxima for analysis are quite clear from Figure 2.7. The standard error of the 52 Location 50 Year Return Level 25.0 6.25 ● 6.00 ● ● ● ● ● ● ● 22.5 ● 20.0 ● ● ● ● ● ● 5.75 ● ● ● ● ● ● ● ● ● 9 10 17.5 5.50 Scale Value 100 Year Return Level 30 2.4 27 2.2 ● ● ● ● ● ● 2.0 ● ● ● ● 24 ● ● ● ● ● ● ● ● 21 1.8 18 Shape 200 Year Return Level 35 0.4 30 0.3 ● ● ● ● ● ● 0.2 1 ● ● 2 3 4 5 ● ● ● ● 6 ● 7 ● 8 ● ● 9 10 ● ● 25 1 2 3 4 5 6 7 8 r Figure 2.7: Location, scale, and shape parameter estimates, with 95% delta confidence intervals for r = 1 through r = 10 for the Atlantic City precipitation data. Also included are the estimates and 95% profile likelihood confidence intervals for the 50, 100, and 200 year return levels. The vertical dashed line represents the recommended cutoff value of r from the analysis in Section 2.7.2. shape parameter decreases from 0.071 to 0.032, a decrease of over 50%. Similarly, the 50 year return level 95% confidence intervals decreases in width by over 25%. 2.8 Discussion We propose two model specification tests for a fixed number of largest order statistics as the basis for selecting r for the r largest order statistics approach in extreme value 53 analysis. The score test has two versions of bootstrap procedure: the multiplier bootstrap method providing a fast, large sample alternative to the parametric bootstrap method, with a speedup of over 100 times. The ED test depends on an asymptotic normal approximation of the testing statistic, which becomes acceptable for sample size over 50. It assumes that the r − 1 top order statistics included already fits the GEVr−1 distribution. Therefore, the initial hypothesis at r = 1 needs to be tested with the score tests. Both tests hold their size better when the shape parameter is further away from the lower limit of −0.5 or sample size is larger. When only small samples are available (50 observations or less), the parametric bootstrap score test is recommended. Alternative versions of the ED test have been explored. One may define the testing statistics as the difference in entropy between GEV1 and GEVr , instead of between GEVr − 1 and GEVr . Nonetheless, it appeared to require a larger sample to hold its (r) size from our simulation studies (not reported). In the calculation of Tn , the block (1) maxima MLE θ̂n (r) can be used as an estimate for θ in place of θ̂n . Again, in our simulation studies, this version of the ED test was too conservative, thus reducing the power, when the sample size was not large enough. This may be explained in that the resulting ŜDr underestimates SDr . If the initial block maxima distribution (r = 1) is rejected or a small r is selected, it may be worth noting that the choice of B, the block size must be sufficiently large relative to R, the number of largest order statistics to test. The rate of convergence for the r largest order statistics has been previously studied (Dziubdziela, 1978; Deheuvels, 1986, 54 1989; Falk, 1989). In particular, Falk (1989) showed that the best rate of convergence to the distribution in (1.3) is O(r/B), uniformly in r and can be as slow as O(r/ log(B)) if the underlying distribution is normal. Hence, an initial rejection of r = 1 may indicate that a larger block size is needed. Naively, the tests may be performed sequentially for each r ∈ {1, . . . , R}, for a (r) prefixed, usually small R  B, at a certain significance level until H0 is rejected. The issue of multiple, sequential testing is addressed in detail by adapting two very recent stopping rules to control the FDR and the FWER that are developed specifically for situations when hypotheses must be rejected in an ordered fashion (G’Sell et al., 2016). Based on the higher power of the ED test, a broad recommendation would be to use the score test for r = 1, then proceed using the ED test for testing r = 2, . . . , R. The choice of stopping rule to use in conjunction depends on the desired error control. ForwardStop controls the FDR and thus generally provides more rejections (i.e., smaller selected r), while StrongStop provides stricter control (FWER), thus possessing less power (i.e., larger selected r). Typically, correct specification of the GEVr distribution is crucial in estimating large quantiles (e.g., return levels), so as a general guideline ForwardStop would be suggested. 55 Chapter 3 Automated Threshold Selection in the POT Approach 3.1 Introduction Return levels, the levels of a measure of interest that is expected to be exceeded on average once every certain period of time (return period), are commonly a major goal of inference in extreme value analysis. As opposed to block-based methods, threshold methods involve modeling data exceeding a suitably chosen high threshold with the generalized Pareto distribution (GPD) (Balkema and De Haan, 1974; Pickands, 1975). Choice of the threshold is critical in obtaining accurate estimates of model parameters and return levels. The threshold should be chosen high enough for the excesses to be well approximated by the GPD to minimize bias, but not so high to substantially increase the variance of the estimator due to reduction in the sample size (the number of exceedances). Although it is widely accepted in the statistics community that the threshold-based 56 approach, in particular peaks-over-threshold (POT), use data more efficiently than the block maxima method (e.g., Caires, 2009), it is much less used than the block maxima method in some fields such as climatology. The main issue is the need to conduct the analyses over many locations, sometimes over hundreds of thousands of locations (e.g., Kharin, Zwiers, Zhang, and Hegerl, 2007; Kharin et al., 2013), and there is a lack of efficient procedures that can automatically select the threshold in each analysis. For example, to make a return level map of annual maximum daily precipitation for three west coastal US states of California, Oregon, and Washington alone, one needs to repeat the estimation procedure including threshold selection, at each of the hundreds of stations. For the whole US, thousands of sites need to be processed. A graphical based diagnosis is clearly impractical. It is desirable to have an intuitive automated threshold selection procedure in order to use POT in analysis. Many threshold selection methods are available in the literature; see Scarrott and MacDonald (2012) and Caeiro and Gomes (2016) for recent reviews. Among them, graphical diagnosis methods are arguably the most popular. The mean residual life (MRL) plot (Davison and Smith, 1990) uses the fact that, if X follows a GPD, then for v > u, the MRL E[X − v|X > v], if existing, is linear in v. The threshold is chosen to be the smallest u such that the sample MRL is approximately linear above this point. Parameter stability plots check whether the estimates of GPD parameters, possibly transformed to be comparable across different thresholds, are stable above some level of threshold. Drees et al. (2000) suggested the Hill plot, which plots the Hill estimator of 57 the shape parameter based on the top k order statistics against k. Many variants of the Hill plot have been proposed (Scarrott and MacDonald, 2012, Section 4). The threshold is the kth smallest order statistic beyond which the parameter estimates are deemed to be stable. The usual fit diagnostics such as quantile plots, return level plots, and probability plots can be helpful too, as demonstrated in Coles (2001). Graphical diagnostics give close inspection of the data, but they are quite subjective and disagreement on a particular threshold can occur even among experts in the field; see, for example, a convincing demonstration of unclear choices using the Fort Collins precipitation data in Figures 1.3, 1.4, and 1.5 which are taken from Scarrott and MacDonald (2012). Other selection methods can be grouped into various categories. One is based on the asymptotic results about estimators of properties of the tail distribution. The threshold is selected by minimizing the asymptotic mean squared error (MSE) of the estimator of, for example, tail index (Beirlant, Vynckier, and Teugels, 1996), tail probabilities (Hall and Weissman, 1997), or extreme quantiles (Ferreira, de Haan, and Peng, 2003). Theoretically sound as these methods are, their finite sample properties are not well understood. Some require second order assumptions, and computational (bootstrap) based estimators can require tuning parameters (Danielsson, de Haan, Peng, and de Vries, 2001) or may not be satisfactory for small samples (Ferreira et al., 2003). Irregardless, such resampling methods may be quite time-consuming in an analysis involving many locations. A second category of methods are based on goodness-of-fit of the GPD, where the 58 threshold is selected as the lowest level above which the GPD provides adequate fit to the exceedances (e.g., Davison and Smith, 1990; Dupuis, 1999; Choulakian and Stephens, 2001; Northrop and Coleman, 2014). Goodness-of-fit tests are simple to understand and perform, but the multiple testing issue for a sequence of tests in an ordered fashion have not been addressed to the best of our knowledge. Methods in the third category are based on mixtures of a GPD for the tail and another distribution for the “bulk” joined at the threshold (e.g., MacDonald, Scarrott, Lee, Darlow, Reale, and Russell, 2011; Wadsworth and Tawn, 2012). Treating the threshold as a parameter to estimate, these methods can account for the uncertainty from threshold selection in inferences. However, there is little known about the asymptotic properties of this setup and how to ensure that the bulk and tail models are robust to one another in the case of misspecification. Some automated procedures have been proposed. The simple naive method is a priori or fixed threshold selection based on expertise on the subject matter at hand. Various rules of thumb have been suggested; for example, select the top 10% of the data (e.g., DuMouchel, 1983), or the top square root of the sample size (e.g., Ferreira et al., 2003). Such one rule for all is not ideal in climate applications where high heterogeneity in data properties is the norm. The proportion of the number of rain days can be very different from wet tropical climates to dry subtropical climates; therefore the number of exceedances over the same time period can be very different across different climates. Additionally, the probability distribution of daily precipitation can also be different in different climates, affecting the speed the tails converge to the GPD (Raoult and Worms, 59 2003). Goodness-of-fit test based procedures can be automated to select the lowest one in a sequence of thresholds, at which the goodness-of-fittest is not rejected (e.g., Choulakian and Stephens, 2001). The error control, however, is challenging because of the ordered nature of the hypotheses, and the usual methods from multiple testing such as false discovery rate (e.g., Benjamini, 2010a,b) cannot be directly applied. We propose an automated threshold selection procedure based on a sequence of goodness-of-fit tests with error control for ordered, multiple testing. The very recently developed stopping rules for ordered hypotheses in G’Sell et al. (2016) are adapted to control the familywise error rate (FWER), the probability of at least one type I error in the whole family of tests (Shaffer, 1995), or the false discovery rate (FDR), the expected proportion of incorrectly rejected null hypotheses among all rejections (Benjamini and Hochberg, 1995; Benjamini and Yekutieli, 2001). They are applied to four goodness-of-fit tests at each candidate threshold, including the Cramér–Von Mises test, Anderson–Darling test, Rao’s score test, and Moran’s test. For the first two tests, the asymptotic null distribution of the testing statistic is unwieldy (Choulakian and Stephens, 2001). Parametric bootstrap puts bounds on the approximate p-values which would reduce power of the stopping rules and lacks the ability to efficiently scale. We propose a fast approximation based on the results of Choulakian and Stephens (2001) to facilitate the application. The performance of the procedures are investigated in a large scale simulation study, and recommendations are made. The procedure is applied to annual maximum daily precipitation return level mapping for three west coastal states 60 of the US. Interesting findings are revealed from different stopping rules. The automated threshold selection procedure has applications in various fields, especially when batch processing of massive datasets is needed. The outline of this chapter is as follows. Section 3.2 presents the generalized Pareto model, its theoretical justification, and how to apply the automated sequential threshold testing procedure. Section 3.3 introduces the tests proposed to be used in the automated testing procedure. A simulation study demonstrates the power of the tests for a fixed threshold under various misspecification settings and it is found that the Anderson– Darling test is most powerful in the vast majority of cases. A large scale simulation study in Section 3.4 demonstrates the error control and performance of the stopping rules for multiple ordered hypotheses, both under the null GPD and a plausible alternative distribution. In Section 3.5, we return to our motivating application and derive return levels for extreme precipitation at hundreds of west coastal US stations to demonstrate the usage of our method. A final discussion is given in Section 3.6. 3.2 Automated Sequential Testing Procedure Threshold methods for extreme value analysis are based on that, under general regularity conditions, the only possible non-degenerate limiting distribution of properly rescaled exceedances of a threshold u is the GPD as u → ∞ (e.g., Pickands, 1975). The GPD has cumulative distribution function given in (1.4) and also has the property that for 61 some threshold v > u, the excesses follow a GPD with the same shape parameter, but a modified scale σv = σu + ξ(v − u). Let X1 , . . . , Xn be a random sample of size n. If u is sufficiently high, the exceedances Yi = Xi − u for all i such that Xi > u are approximately a random sample from a GPD. The question is to find the lowest threshold such that the GPD fits the sample of exceedances over this threshold adequately. Our solution is through a sequence of goodness-of-fit tests (e.g., Choulakian and Stephens, 2001) or model specification tests (e.g., Northrop and Coleman, 2014) for the GPD to the exceedances over each candidate threshold in an increasing order. The multiple testing issues in this special ordered setting are handled by the most recent stopping rules in G’Sell et al. (2016). Consider a fixed set of candidate thresholds u1 < . . . < ul . For each threshold, there will be ni excesses, i = 1, . . . , l. The sequence of null hypotheses can be stated as (i) H0 : The distribution of the ni exceedances above ui follows the GPD. (i) For a fixed ui , many tests are available for this H0 . An automated procedure can begin (i) with u1 and continue until some threshold ui provides an acceptance of H0 (Choulakian and Stephens, 2001; Thompson, Cai, Reeve, and Stander, 2009). The problem, however, is that unless the test has high power, an acceptance may happen at a low threshold by chance and, thus, the data above the chosen threshold is contaminated. One could also begin at the threshold ul and descend until a rejection occurs, but this would result in an increased type I error rate. The multiple testing problem obviously needs to be 62 addressed, but the issue here is especially challenging because these tests are ordered; (i) (k) if H0 is rejected, then H0 should be rejected for all 1 ≤ k < i. Despite the extensive literature on multiple testing and the more recent developments on FDR control and its variants (e.g., Benjamini and Hochberg, 1995; Benjamini and Yekutieli, 2001; Benjamini, 2010a,b), no definitive procedure has been available for error control in ordered tests until the recent work of G’Sell et al. (2016). We adapt the stopping rules of G’Sell et al. (2016) to the sequential testing of (ordered) null hypotheses H1 , . . . , Hl . Let p1 , . . . , pl ∈ [0, 1] be the corresponding p-values of the l hypotheses. G’Sell et al. (2016) transform the sequence of p-values to a monotone sequence and then apply the original method of Benjamini and Hochberg (1995) on the monotone sequence. Two rejection rules are constructed, each of which returns a cutoff k̂ such that H1 , . . . , Hk̂ are rejected. If no k̂ ∈ {1, . . . , l} exists, then no rejection is made. The first is called ForwardStop (2.4) and the second StrongStop (2.5). In the notation of (2.4) and (2.5), m refers to the total number of tests to be performed, which is equivalent to the number of hypotheses, l. Under the assumption of independence among the tests, both rules were shown to control the FDR at level α. In our setting, stopping at k implies that goodness-offit of the GPD to the exceedances at the first k thresholds {u1 , . . . , uk } is rejected. In other words, the first set of k null hypotheses {H1 , . . . , Hk } are rejected. At each (i) H0 , ForwardStop is a transformed average of the previous and current p-values, while StrongStop only accounts for the current and subsequent p-values. StrongStop provides 63 an even stronger guarantee of error control; that is that the FWER is controlled at level α. The tradeoff for stronger error control is reduced power to reject. Thus, the StrongStop rule tends to select a lower threshold than the ForwardStop rule. This is expected since higher thresholds are more likely to approximate the GPD well, and thus provide higher p-values. In this sense, ForwardStop could be thought of as more conservative (i.e., stopping at higher threshold by rejecting more thresholds). The stopping rules, combined with the sequential hypothesis testing, provide an automated selection procedure — all that is needed are the levels of desired control for the ForwardStop and StrongStop procedures, and a set of thresholds. A caveat is that the p-values of the sequential tests here are dependent, unlike the setup of G’Sell et al. (2016). Nonetheless, the stopping rules may still provide some reasonable error control as their counter parts in the non-sequential multiple testing scenario (Benjamini and Yekutieli, 2001; Blanchard and Roquain, 2009). A simulation study is carried out in Section 3.4 to assess the empirical properties of the two rules. 3.3 The Tests (i) The automated procedure can be applied with any valid test for each hypothesis H0 corresponding to threshold ui . Four existing goodness-of-fit tests that can be used are presented. Because the stopping rules are based on transformed p-values, it is desirable to have testing statistics whose p-values can be accurately measured; bootstrap based 64 tests that put a lower bound on the p-values (1 divided by the bootstrap sample size) may lead to premature stopping. For the remainder of this section, the superscript i is dropped. We consider the goodness-of-fit of GPD to a sample of size n of exceedances Y = X − u above a fixed threshold u. 3.3.1 Anderson–Darling and Cramér–von Mises Tests The Anderson–Darling and the Cramér–von Mises tests for the GPD have been studied in detail (Choulakian and Stephens, 2001). Let θ̂n be the maximum likelihood estimator (MLE) of θ under H0 from the the observed exceedances. Make the probability integral transformation based on θ̂n z(i) = F (y(i) |θ̂n ), as in (1.4), for the order statistics of the exceedances y(1) < . . . < y(n) . The Anderson–Darling statistic is A2n n h i 1X (2i − 1) log(z(i) ) + log(1 − z(n+1−i) ) . = −n − n i=1 (3.1) The Cramér–von Mises statistic is Wn2 = n X  2i − 1 2 1 + . z(i) − 2n 12n i=1 (3.2) The asymptotic distributions of A2n and Wn2 are unwieldy, both being sum of weighted chi-squared variables with one degree of freedom with weight found from the eigenvalues of an integral equation (Choulakian and Stephens, 2001, Section 6). The distributions 65 depend only on the estimate of ξ. The tests are often applied by referring to a table of a few upper tail percentiles of the asymptotic distributions (Choulakian and Stephens, 2001, Table 2), or through bootstrap. In either case, the p-values are truncated by a lower bound. Such truncation of a smaller p-value to a larger one can be proven to weaken the stopping rules given in (2.4) and (2.5). In order to apply these tests in the automated sequential setting, more accurate p-values for the tests are needed. We provide two remedies to the table in Choulakian and Stephens (2001). First, for ξ values in the range of (−0.5, 1), which is applicable for most applications, we enlarge the table to a much finer resolution through a pre-set Monte Carlo method. For each ξ value from −0.5 to 1 incremented by 0.1, 2,000,000 replicates of A2n and Wn2 are generated with sample size n = 1, 000 to approximate their asymptotic distributions. A grid of upper percentiles from 0.999 to 0.001 for each ξ value is produced and saved in a table for future fast reference. Therefore, if ξˆn and the test statistic falls in the range of the table, the p-value is computed via log-linear interpolation. The second remedy is for observed test statistics that are greater than that found in the table (implied p-value less than 0.001). As Choulakian pointed out (in a personal communication), the tails of the asymptotic distributions are exponential, which can ˆ regressing be confirmed using the available tail values in the table. For a given ξ, − log(p-value) on the upper tail percentiles in the table, for example, from 0.05 to 0.001, gives a linear model that can be extrapolated to approximate the p-value of statistics outside of the range of the table. This approximation of extremely small p-values help 66 reduce loss of power in the stopping rules. The two remedies make the two tests very fast and are applicable for most applications with ξ ∈ (−0.5, 1). For ξ values outside of (−0.5, 1), although slow, one can use parametric bootstrap to obtain the distribution of the test statistic, understanding that the p-value has a lower bound. The methods are implemented in R package eva (Bader and Yan, 2016). 3.3.2 Moran’s Test Moran’s goodness-of-fit test is a byproduct of the maximum product spacing (MPS) estimation for estimating the GPD parameters. MPS is a general method that allows efficient parameter estimation in non-regular cases where the MLE fails or the information matrix does not exist (Cheng and Amin, 1983). It is based on the fact that if the exceedances are indeed from the hypothesized distribution, their probability integral transformation would behave like a random sample from the standard uniform distribution. Consider the ordered exceedances y(1) < . . . < y(n) . Define the spacings as Di (θ) = F (y(i) |θ) − F (y(i−1) |θ) for i = 1, 2, . . . , n + 1 with F (y(0) |θ) ≡ 0 and F (y(n+1) |θ) ≡ 1. The MPS estimators are then found by minimizing M (θ) = − n+1 X i=1 log Di (θ). (3.3) 67 As demonstrated in Wong and Li (2006), the MPS method is especially useful for GPD estimation in the non-regular cases of Smith (1985). In cases where the MLE exists, the MPS estimator may have an advantage of being numerically more stable for small samples, and have the same properties as the MLE asymptotically. The objective function evaluated at the MPS estimator θ̌ is Moran’s statistic (Moran, 1953). Cheng and Stephens (1989) showed that under the null hypothesis, Moran’s statistic is normally distributed and when properly centered and scaled, has an asymptotic chi-square approximation. Define  1 1 , µM = (n + 1) log(n + 1) + γ − − 2 12(n + 1)   2 1 1 π 2 σM = (n + 1) −1 − − , 6 2 6(n + 1) where γ is Euler’s constant. Moran’s goodness-of-fit test statistic is T (θ̌) = 1 M (θ̌) + 1 − C1 , C2 (3.4) 1 where C1 = µM − (n/2) 2 σM and C2 = (2n)− 2 σM . Under the null hypothesis, T (θ̌) asymptotically follows a chi-square distribution with n degrees of freedom. Wong and Li (2006) show that for GPD data, the test empirically holds its size for samples as small as ten. 68 3.3.3 Rao’s Score Test Northrop and Coleman (2014) considered a piecewise constant specification of the shape parameter as the alternative hypothesis. For a fixed threshold u, a set of k higher thresholds are specified to generate intervals on the support space. That is, for the set of thresholds u0 = u < u1 < . . . < uk , the shape parameter is given a piecewise representation ξ(x) =     ξi ui < x ≤ ui+1    ξk x > uk . i = 0, . . . , k − 1, (3.5) The null hypothesis is tested as H0 : ξ0 = ξ1 = · · · = ξk . Rao’s score test has the advantage that only restricted MLE θ̃ under H0 is needed, in contrast to the asymptotically equivalent likelihood ratio test or Wald test. The testing statistic is S(θ̃) = U (θ̃)T I −1 (θ̃)U (θ̃), where U is the score function and I is the fisher information matrix, both evaluated at the restricted MLE θ̃. Given that ξ > −0.5 (Smith, 1985), the asymptotic null distribution of S is χ2k . Northrop and Coleman (2014) tested suitable thresholds in an ascending manner, increasing the initial threshold u and continuing the testing of H0 . They suggested two possibilities for automation. First, stop testing as soon as an acceptance occurs, but the p-values are not guaranteed to be non-decreasing for higher starting thresholds. Second, 69 stop as soon as all p-values for testing at subsequent higher thresholds are above a certain significance level. The error control under multiple, ordered testing were not addressed. 3.3.4 A Power Study The power of the four goodness-of-fit tests are examined in an individual, non-sequential testing framework. The data generating schemes in Choulakian and Stephens (2001) are used, some of which are very difficult to distinguish from the GPD: • Gamma with shape 2 and scale 1. • Standard lognormal distribution (mean 0 and scale 1 on log scale). • Weibull with scale 1 and shape 0.75. • Weibull with scale 1 and shape 1.25. • 50/50 mixture of GPD(1, −0.4) and GPD(1, 0.4). • 50/50 mixture of GPD(1, 0) and GPD(1, 0.4). • 50/50 mixture of GPD(1, −0.25) and GPD(1, 0.25). Finally, the GPD(1, 0.25) was also used to check the empirical size of each test. Four sample sizes were considered: 50, 100, 200, 400. For each scenario, 10,000 samples are generated. The four tests were applied to each sample, with a rejection recorded if the p-value is below 0.05. For the score test, a set of thresholds were set according to the deciles of the generated data. 70 Table 3.1: Empirical rejection rates of four goodness-of-fit tests for GPD under various data generation schemes described in Section 3.3.4 with nominal size 0.05. GPDMix(a, b) refers to a 50/50 mixture of GPD(1, a) and GPD(1, b). Sample Size Test Gamma(2, 1) LogNormal Weibull(0.75) Weibull(1.25) GPDMix(−0.4, 0.4) GPDMix(0, 0.4) GPDMix(−0.25, 0.25) GPD(1, 0.25) 50 Score Moran AD CVM Score Moran AD CVM 7.6 6.0 11.5 6.6 11.4 7.8 8.1 6.9 9.7 5.9 7.8 11.3 7.5 6.0 6.5 5.5 47.4 13.3 55.1 29.1 19.2 6.5 6.0 6.7 43.5 8.6 23.5 27.3 9.9 5.9 7.4 6.1 8.0 5.4 12.1 5.6 16.0 7.4 8.9 5.0 14.3 8.2 9.5 12.5 8.6 5.9 6.5 5.2 64.7 28.3 65.1 20.8 24.3 9.6 11.1 5.2 59.7 23.4 39.4 19.2 20.4 5.6 8.4 5.2 AD CVM 42.2 100.0 19.1 97.8 14.6 98.2 19.2 79.8 11.9 79.9 6.2 10.8 7.9 33.0 5.3 5.8 100.0 95.0 93.0 74.6 80.2 10.3 32.4 4.7 Sample Size Test Gamma(2, 1) LogNormal Weibull(0.75) Weibull(1.25) GPDMix(−0.4, 0.4) GPDMix(0, 0.4) GPDMix(−0.25, 0.25) GPD(1, 0.25) 100 200 400 Score Moran AD CVM Score 15.4 5.7 16.5 8.0 31.5 8.9 13.9 5.3 23.3 11.9 10.7 14.7 9.7 6.5 6.7 5.8 95.3 69.3 84.8 40.9 45.1 8.8 16.6 7.2 93.1 59.7 66.4 36.7 44.0 7.3 14.8 5.2 36.5 7.9 32.1 15.5 63.8 12.3 26.2 4.7 Moran The rejection rates are summarized in Table 3.1. Samples in which the MLE failed were removed, which accounts for roughly 10.8% of the Weibull samples with shape 1.25 and sample size 400, and around 10.7% for the Gamma distribution with sample size 400. Decreasing the sample size in these cases actually decreases the percentage of failed MLE samples. This may be due to the shape of these two distributions, which progressively become more distinct from the GPD as their shape parameters increase. In the other distribution cases, no setting resulted in more than a 0.3% failure rate. As expected, 71 all tests appear to hold their sizes, and their powers all increase with sample size. The mixture of two GPDs is the hardest to detect. For the GPD mixture of shape parameters 0 and 0.4, quantile matching between a single large sample of generated data and the fitted GP distribution shows a high degree of similarity. In the vast majority of cases, the Anderson–Darling test appears to have the highest power, followed by the Cramér– von Mises test. Between the two, the Anderson–Darling statistic is a modification of the Cramér–von Mises statistic giving more weight to observations in the tail of the distribution, which explains the edge of the former. 3.4 Simulation Study of the Automated Procedures The empirical properties of the two stopping rules for the Anderson–Darling test are investigated in simulation studies. To check the empirical FWER of the StrongStop rule, data only need to be generated under the null hypothesis. For n ∈ {50, 100, 200, 400}, ξ ∈ {−0.25, 0.25}, µ = 0, and σ = 1, 10,000 GPD samples were generated in each setting of these parameters. Ten thresholds are tested by locating ten percentiles, 5 to 50 by 5. Since the data is generated from the GPD, data above each threshold is also distributed as GP, with an adjusted scale parameter. Using the StrongStop procedure and with no adjustment, the observed FWER is compared to the expected rates for each setting at various nominal levels. At a given nominal level and setting of the parameters, the observed FWER is calculated as the number of samples with a rejection of H0 at any 72 of the thresholds, divided by the total number of samples. The results of this study can been seen in Figure 3.1. n: 100 n: 200 n: 400 ●●●●●● ●●●●●● ●●●●●● ●●●●● ●●●● ● ● ● ●●●●●● ●●●●●● ●●●●●● ●●●●● ●●●● ●●● ● ●●●●●● ●●●●●● ●●●●● ●●●●● ● ● ● ●● ●● ●●●●●●●● ●●●●●● ●●●●●● ●●●●● ● ● ● ●● ●●●●●● ●●●●●● ●●●●● ●●●●● ●●●● ● ● ●● ●●● ●●●●●● ●●●●● ●●●●● ●●●● ●●●● ● ● ● ● ●●●●●●●● ●●●●●● ●●●●● ●●●● ● ● ●● ●● ●●●●● ●●●●●● ●●●●●● ●●●●● ● ● ● ●●● ●● Observed FWER 0.75 0.50 0.25 0.00 Shape: −0.25 n: 50 1.00 1.00 0.50 0.25 0.00 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 Shape: 0.25 0.75 0.25 Target FWER Control StrongStop UnAdjusted ● Figure 3.1: Observed FWER for the Anderson–Darling test (using StrongStop and no adjustment) versus expected FWER at various nominal levels under the null GPD at ten thresholds for 10,000 replicates in each setting as described in Section 3.4. The 45 degree line indicates agreement between the observed and expected rates under H0. It can be seen that the observed FWER under H0 using the StrongStop procedure is nearly in agreement with the expected rate at most nominal levels for the Anderson– Darling test (observed rate is always within 5% of the expected error rate). However, using the naive, unadjusted stopping rule (simply rejecting for any p-value less than the nominal level), the observed FWER is generally 2–3 times the expected rate for all sample sizes. It is of interest to investigate the performance of the ForwardStop and StrongStop in selecting a threshold under misspecification. To check the ability of ForwardStop and StrongStop to control the false discover rate (FDR), data need to be generated under 73 0.3 Density 0.2 0.1 0.0 0 5 10 15 20 Input (x) Figure 3.2: Plot of the (scaled) density of the mixture distribution used to generate misspecification of H0 for the simulation in Section 3.4. The vertical line indicates the continuity point of the two underlying distributions. misspecification. Consider the situation where data is generated from a 50/50 mixture of distributions. Data between zero and five are generated from a Beta distribution with α = 2, β = 1 and scaled such that the support is on zero to five. Data above five is generated from the GPD(µ = 5, σ = 2, ξ = 0.25). Choosing misspecification in this way ensures that the mixture distribution is at least continuous at the meeting point. See Figure 3.2 for a visual assessment. A total of n = 1000 observations are generated, with n1 = 500 from the Beta distribution and n2 = 500 from the GP distribution. 1000 datasets are simulated and 50 thresholds are tested, starting by using all n = 1000 observations and removing the 15 lowest observations each time until the last threshold uses just 250 observations. In this way, the correct threshold is given when the lowest n1 observations are removed. 74 The results are presented here. The correct threshold is the 34th, since n1 = 500 and d500/15e = 34. Rejection of less than 33 tests is problematic since it allows contaminated data to be accepted. Thus, a conservative selection criteria is desirable. Rejection of more than 33 tests is okay, although some non-contaminated data is being thrown away. By its nature, the StrongStop procedure has less power-to-reject than ForwardStop, since it has a stricter error control (FWER versus FDR). Figure 3.3 displays the frequency distribution for threshold choice using the Anderson– Darling test at the 5% nominal level for the three stopping rules. There is a clear hierarchy in terms of power-to-reject between the ForwardStop, StrongStop, and no adjustment procedures. StrongStop, as expected, provides the least power-to-reject, with all 1000 simulations selecting a threshold below the correct one. ForwardStop is more powerful than the no adjustment procedure and on average selects a higher threshold. The median number of thresholds rejected is 33, 29, and 22 for ForwardStop, no adjustment, and StrongStop respectively. The observed versus expected FDR using ForwardStop and the observed versus expected FWER using StrongStop using the Anderson–Darling test for the data generated under misspecification can be seen in Figure 3.4. There appears to be reasonable agreement between the expected and observed FDR rates using ForwardStop, while StrongStop has observed FWER rates well below the expected rates. To further evaluate the performance of the combination of tests and stopping rules, it is of interest to know how well the data chosen above each threshold can estimate 20 15 10 5 0 ForwardStop 20 15 10 5 0 None 20 15 10 5 0 StrongStop Percentage of All Simulations 75 10 20 30 40 50 Number Rejected Figure 3.3: Frequency distribution (out of 1000 simulations) of the number of rejections for the Anderson–Darling test and various stopping rules (ForwardStop, StrongStop, and no adjustment), at the 5% nominal level, for the misspecified distribution sequential simulation setting described in Section 3.4. 50 thresholds are tested, with the 34th being the true threshold. parameters of interest. Two such parameters are the shape and return level. The N year return level for the GPD (e.g., Coles, 2001, Section 4.3.3) is given by zN =     u + σξ [(N ny ζu )ξ − 1], ξ 6= 0,    u + σ log(N ny ζu ), (3.6) ξ = 0, for a given threshold u, where ny is the number of observations per year, and ζu is the 76 Observed Level 0.3 0.2 0.1 0.0 ● ● ● ● ● ● ● 0.05 ● ● ● ● ● ● ● ● ● ●● ●● ●● ● ●● 0.15 ●● ●● ● 0.25 Target Level Control ● ForwardStop StrongStop Figure 3.4: Observed FDR (using ForwardStop) and observed FWER (using StrongStop) versus expected FDR and FWER respectively using the Anderson–Darling test, at various nominal levels. This is for the sequential simulation setting under misspecification described in Section 3.4. The 45 degree line indicates agreement between the observed and expected rates. rate, or proportion of the data exceeding u. The rate parameter has a natural estimator simply given by the number of exceeding observations divided by the total number of observations. A confidence interval for zN can easily be found using the delta method, or preferably and used here, profile likelihood. The ‘true’ return levels are found by letting u = 34, ny = 365, and treating the data as the tail of some larger dataset, which allows computation of the rate ζu for each threshold. For ease of presentation, focus will be on the performance of the Anderson–Darling test in conjunction with the three stopping rules. In each of the 1000 simulated datasets (seen in Figure 3.2), the threshold selected for each of the three stopping rules is used to determine the bias, squared error, and confidence interval coverage (binary true/false) for the shape parameter and 50, 100, 250, and 500 year return levels. An average of the 77 Bias Relative Frequency 60% 40% 20% 0% Coverage 60% 40% 20% 0% MSE 60% 40% 20% 0% Shape 50YearRL 100YearRL Parameter 250YearRL 500YearRL StoppingRule ForwardStop UnAdjusted StrongStop Figure 3.5: Average performance comparison of the three stopping rules in the simulation study under misspecification in Section 3.4, using the Anderson–Darling test for various parameters. Shown are the relative frequencies of the average value of each metric (bias, squared error, and coverage) for each stopping rule and parameter of interest. For each parameter of interest and metric, the sum of average values for the three stopping rules equates to 100%. RL refers to return level. bias, squared error, and coverage across the 1000 simulations is taken, for each stopping rule and parameter value. For each parameter and statistic of interest (mean bias, mean squared error (MSE), and mean coverage), a relative percentage is calculated for the three stopping rules. A visual assessment of this analysis is provided in Figure 3.5. It is clear from the result here that ForwardStop is the most preferable stopping rule in application. For all parameters, it has the smallest average bias (by a proportion of 2-1) and highest coverage rate. In addition, the MSE is comparable or smaller than the unadjusted procedure in all cases. Arguably, StrongStop has the worst performance, 78 obtaining the highest average bias and MSE, and the lowest coverage rates for all parameters. Replacing the Anderson–Darling test with the other tests provides similar results (not shown here). 3.5 Application to Return Level Mapping of Extreme Precipitation One particularly useful application of the automated threshold selection method is generating an accurate return level map of extreme precipitation in the three western US coastal states of California, Oregon, and Washington. The automated procedure described in Section 3.2 provides a method to quickly obtain an accurate map without the need for visual diagnostics at each site. Return level maps are of great interest to hydrologists (Katz et al., 2002) and can be used for risk management and land planning (Blanchet and Lehning, 2010; Lateltin and Bonnard, 1999). Daily precipitation data is available for tens of thousands of surface sites around the world via the Global Historical Climatology Network (GHCN). A description of the data network can be found in Menne et al. (2012). After an initial screening to remove sites with less than 50 years of available data, there are 720 remaining sites across the three chosen coastal states. As the annual maximum daily amount of precipitation mainly occurs in winter, only the winter season (November - March) observations are used in modeling. A set of 79 thresholds for each site are chosen based on the data percentiles; for each site the set of thresholds is generated by taking the 75th to 97th percentiles in increments of 2, then in increments of 0.1 from the 97th to 99.5th percentile. This results in 37 thresholds to test at each site. If consecutive percentiles result in the same threshold due to ties in data, only one is used to guarantee uniqueness of thresholds and thus reducing the total number of thresholds tested at that site. As discussed in the beginning of Section 3.2, modeling the exceedances above a threshold with the Generalized Pareto requires the exceedances to be independent. This is not always the case with daily precipitation data; a large and persistent synoptic system can bring large storms successively. The extremal index is a measure of the clustering of the underlying process at extreme levels. Roughly speaking, it is equal to (limiting mean cluster size)−1 . It can take values from 0 to 1, with independent series exhibiting a value of exactly 1. To get a sense for the properties of series in this dataset, the extremal index is calculated for each site using the 75th percentile as the threshold via the R package texmex (Southworth and Heffernan, 2013). In summary, the median estimated extremal index for all 720 sites is 0.9905 and 97% of the sites have an extremal index above 0.9. Thus, we do not do any declustering on the data. A more thorough description of this process can be found in Ferro and Segers (2003) and Heffernan and Southworth (2012). The Anderson–Darling test is used to test the set of thresholds at each of the 720 sites, following the procedure outlined in Section 3.3.1. This is arguably the most powerful test 80 out of the four examined in Section 3.3.4. Three stopping rules are used — ForwardStop, StrongStop, and with no adjustment, which proceeds in an ascending manner until an acceptance occurs. Figure 3.6 shows the distribution of chosen percentiles for the 720 sites using each of the three stopping rules. As expected, ForwardStop is the most conservative, rejecting all thresholds at 348 sites, with the unadjusted procedure rejecting 63, and StrongStop only rejecting all thresholds at 3 sites. Figure 3.7 shows the geographic representation of sites in which all thresholds are rejected. Note that there is a pattern of rejections by ForwardStop, particularly in the eastern portion of Washington and Oregon, and the Great Valley of California. This may be attributed to the climate differences in these regions – rejected sites had a smaller number of average rain days than non-rejected sites (30 vs. 34), as well as a smaller magnitude of precipitation (an average of 0.62cm vs. 1.29cm). The highly selective feature of the ForwardStop procedure is desired as it suggests not to fit GPD at even the highest threshold at these sites, a guard that is not available from those unconditionally applied, one-for-all rules. Further investigation is needed for the sites in which all thresholds were rejected; one possibility is to consider a generalization of the GPD in these cases. For the sites at which a threshold was selected for both the ForwardStop and StrongStop rules, the return level estimates based on the chosen threshold for each stopping rule can be compared. The result of this comparison can be seen in Figure 3.8. For a smaller return period (50 years), the agreement between estimates for the two stopping rules is 81 ForwardStop StrongStop UnAdjusted Percentile 99.5 99.4 99.3 99.2 99.1 99 98.9 98.8 98.7 98.6 98.5 98.4 98.3 98.2 98.1 98 97.9 97.8 97.7 97.6 97.5 97.4 97.3 97.2 97.1 97 95 93 91 89 87 85 83 81 0 20 40 60 80 0 20 40 60 80 0 20 40 60 80 Frequency Chosen Figure 3.6: Distribution of chosen percentiles (thresholds) for the 720 western US coastal sites, as selected by each stopping rule. Note that this does not include sites where all thresholds were rejected by the stopping rule. 82 ForwardStop None StrongStop Latitude 45 40 35 −125.0−122.5−120.0−117.5−115.0 −125.0−122.5−120.0−117.5−115.0 −125.0−122.5−120.0−117.5−115.0 Longitude Result All Thresholds Rejected Threshold Selected Figure 3.7: Map of US west coast sites for which all thresholds were rejected (black / circle) and for which a threshold was selected (grey / triangle), by stopping rule. quite high. This is a nice confirmation to have confidence in the analysis, however it is slightly misleading in that it does not contain the sites rejected by ForwardStop. The end result of this automated batch analysis provides a map of return level estimates. The 50, 100, and 250 year map of return level estimates from threshold selection using ForwardStop and the Anderson–Darling test can be seen in Figure 3.9. To provide an estimate at any particular location in this area, some form of interpolation 83 50 Year 100 Year 50 ● ● 40 ●● ● ● 30 ●● ● ● ● ●●● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●● ●●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● 20 10 StrongStop ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ● ● ●●● ● ●● ●●● ● ●●● ● ●● ●●●●● ● ● ● ●●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● 0 250 Year 50 ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●●●● ● ● ●●● ● ● ●● ● ●● ●● ● ● ● ● ● ● ●● ●●● ● ● ● ● ●● ● ● ●●● ● ●●● ● ●● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ●● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ●● ●● ●● ●● ● ●● ●●● ● ● ●● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● 20 10 ● ● ● ● ● 30 ● 500 Year ● 40 ● ● ● 0 0 10 20 30 40 50 0 10 ForwardStop 20 30 40 50 Figure 3.8: Comparison of return level estimates (50, 100, 250, 500 year) based on the chosen threshold for ForwardStop vs. StrongStop for the US west coast sites. The 45 degree line indicates agreement between the two estimates. This is only for the sites in which both stopping rules did not reject all thresholds. can be applied. 3.6 Discussion We propose an intuitive and comprehensive methodology for automated threshold selection in the peaks over threshold approach. In addition, it is not as computationally 84 50 Year 100 Year 250 Year Latitude 45 40 35 −125.0 −122.5 −120.0 −117.5 −115.0 −125.0 −122.5 −120.0 −117.5 −115.0 −125.0 −122.5 −120.0 −117.5 −115.0 Longitude Return Level 10 20 30 Longitude Return Level 10 20 30 Longitude Return Level 10 20 30 40 Return Level 10 30 Return Level 10 30 Return Level 10 30 Figure 3.9: Map of US west coast sites with 50, 100, and 250 year return level estimates for the threshold chosen using ForwardStop and the Anderson–Darling test. This is only for the sites in which a threshold was selected. intensive as some competing resampling or bootstrap procedures (Danielsson et al., 2001; Ferreira et al., 2003). Automation and efficiency is required when prediction using the peaks over threshold approach is desired at a large number of sites. This is achieved through sequentially testing a set of thresholds for goodness-of-fit to the generalized Pareto distribution (GPD). Previous instances of this sequential testing procedure did not account for the multiple testing issue. We apply two recently developed stopping 85 rules (G’Sell et al., 2016) ForwardStop and StrongStop, that control the false discovery rate and familywise error rate, respectively in the setting of (independent) ordered, sequential testing. It is a novel application of them to the threshold selection problem. There is a slight caveat in our setting, that the tests are not independent, but it is shown via simulation that these stopping rules still provide reasonable error control here. Four tests are compared in terms of power to detect departures from the GPD at a single, fixed threshold and it is found that the Anderson–Darling test has the most power in various non-null settings. Choulakian and Stephens (2001) derived the asymptotic null distribution of the Anderson–Darling test statistic. However this requires solving an integral equation. Our contribution, with some advice from the author, provides an approximate, but accurate and computationally efficient version of this test. To investigate the performance of the stopping rules in conjunction with the Anderson– Darling test, a large scale simulation study was conducted. Data is generated from a plausible distribution – misspecified below a certain threshold and generated from the null GPD above. In each replicate, the bias, coverage, and squared error is recorded for the stopping threshold of each stopping rule for various parameters. The results of this simulation suggest that the ForwardStop procedure has on average the best performance using the aforementioned metrics. Thus, a recommendation would be to use the Anderson–Darling test, in unison with the ForwardStop procedure for error control to test a fixed set of thresholds. The methodology is applied to daily precipitation data at hundreds of sites in three U.S. west coast states, with the goal of 86 creating a return level map. 87 Chapter 4 Robust and Efficient Estimation in Non-Stationary RFA 4.1 Introduction Regional frequency analysis (RFA) is commonly used when historical records are short, but are available at multiple sites within a homogeneous region. Sites within a homogenous region are assumed to possess similar characteristics (defined in Section 4.2). From this assumption, with some care, the data can essentially be pooled in order to estimate the shared parameters across sites. By doing so, efficiency in the shared parameter estimation is greatly improved when record length is short. Various models can be used within this context, depending on the application and outcome variable. One area of application is to model extremes, such as maximum precipitation or wind speeds. For this, the Generalized Extreme Value (GEV) distribution is a natural model choice and will be focused on in this paper. There have been many applications of RFA with non-stationarity modeled through 88 external covariates; see Khaliq, Ouarda, Ondo, Gachon, and Bobée (2006) for a review in the one sample case. The most common estimation method is maximum likelihood estimation (MLE), typically with climate indices and temporal trends as covariates; see (Katz et al., 2002; López and Francés, 2013; Hanel et al., 2009; Leclerc and Ouarda, 2007; Nadarajah, 2005) as examples. The MLE has some nice properties, in that the model parameters and covariates can easily be adjusted, and standard errors are provided implicitly when maximizing the likelihood function. There are some drawbacks however; the MLE can provide absurd estimates of the shape parameter or fail entirely, typically in small samples. Coles and Dixon (1999) develop a penalized maximum likelihood estimator that still has the flexibility of the traditional MLE, but has better performance in small samples. Martins and Stedinger (2000) propose a generalized maximum likelihood (GML) method which imposes a prior distribution on the shape parameter to restrict its estimates to plausible values within the GEV model. El Adlouni, Ouarda, Zhang, Roy, and Bobée (2007) applied the GML approach with non-stationarity, via temporal trends in the parameters. Note that both of these approaches are only explicitly developed here for the one sample case. At the time of writing, it appears that neither of these approaches have been applied to the RFA setting. In the stationary RFA model, L-moments can be used as an alternative to MLE. The L-moment approach (Hosking et al., 1985) estimates the parameters by matching the sample moments with their population counterparts and then solving the system 89 of equations. It has the advantage over MLE in that it only requires the existence of the mean, and has been shown to be more efficient in small samples (Hosking et al., 1985). Hosking and Wallis (1988) show that any bias in the parameter estimates is unaffected by intersite dependence. To apply the L-moment method in the stationary RFA model, the site-specific scaling parameter is estimated, then the data is scaled and pooled across sites. Afterwards, the shared, across site parameters can be estimated from the pooled data. This method is widespread; see Smithers and Schulze (2001); Kumar and Chatterjee (2005); Kjeldsen, Smithers, and Schulze (2002) for examples. It is not straightforward to extend this methodology to the non-stationary case; in particular when non-site specific covariates are used, moment matching may not be possible. One approach to estimate time trends is by applying the stationary L-moment approach over sliding time windows (Kharin and Zwiers, 2005; Kharin et al., 2013); that is, estimate the stationary parameters in t-year periods and look for changes between each. In the one sample case, there has been some progress to combine non-stationarity and L-moment estimation. Ribereau et al. (2008) provide a method to incorporate covariates in the location parameter, by estimating the covariates first via least squares, and then transforming the data to be stationary in order to estimate the remaining parameters via L-moments. Coles and Dixon (1999) briefly discuss an iterative procedure to estimate covariates through maximum likelihood and stationary parameters through L-moments. Two new approaches are implemented here for estimation in the RFA setting with 90 non-stationarity. The first uses maximum product spacing (MPS) estimation (Cheng and Amin, 1983), which maximizes the geometric mean of spacings in the data. It is as efficient as maximum likelihood estimation and since it only relies on the cumulative density function, it can provide estimators when MLE fails. It can easily incorporate covariates in the objective function as well. The second approach builds on the ideas of Coles and Dixon (1999) and Ribereau et al. (2008), providing extensions to a hybrid estimation procedure (L-moment / MLE) in the RFA framework. Both of these methods are shown to outperform MLE in terms of root mean squared error (RMSE), through a large scale simulation of spatially dependent data. To illustrate the differences in the three estimation methods, a non-stationary regional frequency model is applied to extreme precipitation events at rain gauge sites in California. To account for spatial dependence, a semi-parametric bootstrap procedure is applied to obtain standard errors for all the estimators. Section 4.2 discusses the model and existing methods of estimation within this framework. Section 4.3 introduces the two new estimation methods and implementation in the RFA setting. A large scale simulation study of homogeneous multi-site data generated under various extremal and non-extremal spatial dependence settings is carried out in Section 4.4 to establish the superiority of the new estimation methods over MLE. In Section 4.5 a real analysis of extreme precipitation at 27 sites in California is conducted to examine the effect of El Niño–Southern Oscillation on these events. Lastly, a discussion is provided in Section 4.6. 91 4.2 Non-Stationary Homogeneous Region Model In regional frequency analysis, data from a number of sites within a homogeneous region can be pooled together in a particular way to improve the reliability and efficiency of parameter estimates within a model. Suppose there exist m sites in a homogeneous region, over n periods. Define Yst to be the observation at site s ∈ {1, . . . , m} in period t ∈ {1, . . . , n}. Observations from period to period are assumed to be independent, but observations from sites within the same period exhibit some form of spatial dependence. The type of spatial dependence will be defined explicitly later. The assumption is that each site has the full record of observations. Methodology to accommodate missing records is not straightforward – imputation would require additional assumptions and in the case of data missing completely at random (MCAR), care is still needed due to the semi-parametric bootstrap procedure necessary to obtain parameter confidence intervals. A further discussion is provided in Section 6.1. The idea behind the flood index model is that the variables Yst , after being scaled by a site specific scaling factor, are identically distributed. In other words, the T -period return level or quantile function of Yst can be represented as Qt (T ) = g(µst , qt (T )) where qt (T ) is the non-site specific quantile function and the flood index is µst . Typically, this is chosen as the mean or median of Yst . In this paper, the Generalized Extreme 92 Value (GEV) distribution (1.1) is used to model the extreme events at each site. It is essentially the limiting distribution of the maximum of a sequence of independent and identically distributed random variables, normalized by appropriate constants. Because of this mathematical formulation, it is a natural distribution choice to model extremes. Formally, let Yst ∼ GEV(µst , γt µst , ξt ) where here the flood index is given by µst . It follows that Yst = µst Zt where Zt ∼ GEV(1, γt , ξt ). It is then clear that each site in the homogeneous region marginally follows a GEV distribution indexed only in terms of its location parameter, with a shared proportionality scale parameter and shape parameter. To incorporate the non-stationarity, link functions between the covariates and parameters can be used as follows. Let   µst = fµ β µ , xµst   γt = fγ β γ , xγt   ξt = fξ β ξ , xξt where f (·) is the parameter specific link function. The set of parameters β µ , β γ , β ξ and covariates xµst , xγt , xξt are vectors of length (m + pµ ), pγ , pξ , respectively, representing the number of covariates associated with each. The indexing in the vector of location parameters allows for each site to have its own marginal mean βsµ for s = 1, . . . , m. Covariates associated with γ and ξ must be shared across sites, while covariates associated with µ can be both shared and/or site-specific. Xµ(m·n)×(m+pµ ) , Xγn×pγ , Xξn×pξ are design matrices 93 for the appropriate parameters, where each row represents the corresponding vector x. To fix ideas, the following link functions and covariates will be used in the succeeding sections unless explicitly stated otherwise: µst = xµst T β µ   γt = exp xγt T β γ T ξt = xξt β ξ (4.1) which implies σst = γt µst . Also, note that the stationary (intercept) parameters are given by β0γ , β0ξ , which are shared across all sites and βsµ , a stationary marginal mean for each site s = 1, . . . , m. This is similar to the model used in Hanel et al. (2009) and the exponential link in the proportionality parameter γ assures the scale parameter at each site is positive valued since µst is generally positive in application. An explicit restriction on the positiveness of the scale parameter can be enforced in the estimation procedure. In the stationary case, the subscript t is dropped, but the same model applies. This stationary model has been used previously by Buishand (1991) and Wang et al. (2014). 94 4.2.1 Existing Estimation Methods Maximum Likelihood The independence likelihood (e.g. Hanel et al., 2009; Kharin and Zwiers, 2005) seeks to maximize the log-likelihood function m X n X log f (yst |µst , γt µst , ξt , xµst , xγt , xξt ) s=1 t=1 where f (·) is the probability density function (1.2) of site s at time t. Note that estimation in this approach assumes independence between sites and only specifies the marginal density at each site. Other likelihood approaches such as a pairwise likelihood can be used, but then the dependence between sites must be specified. See Ribatet (2009) for details. Pseudo Non-Stationary L-moments To the best of the author’s knowledge, currently there are no methods that directly incorporate L-moment estimation in the non-stationary RFA setting. Kharin et al. (2013) uses the stationary method in conjunction with moving time windows to get a sense of the trend in the parameters. That is, the data is subset into mutually exclusive time windows (say 20 years) and the stationary L-moment method is used to obtain GEV parameter estimates. This can provide some indication of non-stationarity, however it is difficult to interpret precisely. 95 Ribereau et al. (2008) provides methodology for mixture L-moment estimation in the one sample case with non-stationarity modeled through the location parameter. The idea is to fit a GEV regression model, where the error terms  are assumed to be IID stationary GEV(0, σ, ξ) random variables and the design matrix consists of covariates that describe the location parameter. From this regression setup, estimates for the location parameters can be found. Next, those estimates are used to transform the data to stationary “psuedo-residuals” from which estimates for σ and ξ can be obtained by a variant of L-moments. It should be possible to extend this setup to the RFA setting by fitting a GEV regression model to data from all the sites. To handle this, the error structure can be given, for example, as i ∈ {1, . . . , n} s ∈ {1, . . . , m} Cov(s1 i , s2 j ) = 0 i 6= j ∈ {1, . . . , n} s1 , s2 ∈ {1, . . . , m} Cov(s1 i , s2 i ) = ρs1 s2 i ∈ {1, . . . , n} s1 6= s2 ∈ {1, . . . , m} Cov(si , si ) = δs and then estimates for the non-stationary location parameters can be found using suitable methods (e.g. weighted least squares or generalized estimating equations). These ideas were not pursued here, but it may be of interest to look into in the future. 96 4.3 New Methods 4.3.1 Hybrid Likelihood / L-moment Approach Our approach to handle non-stationarity in a regional frequency model using the Lmoment method involves an iterative hybrid procedure. Coles and Dixon (1999) briefly discussed this approach in the one-sample case with non-stationarity in the location parameter. The procedure is as follows. Initialize with some starting estimates for all the parameters β µ , β γ , β ξ . 1. Transform the variables Yst (via a probability integral transformation) such that each site has a (site-specific) stationary mean and shared (across sites) stationary proportionality and shape parameters.1 Call this transformed variable Ỹst and note that Ỹst ∼ GEV(βsµ , βsµ exp(β0γ ), β0ξ ). 2. Estimate βsµ from the transformed data Ỹst , t = 1, . . . , n for each site s using the one sample stationary L-moment method. Let Ỹst0 = Ỹst /β̂sµ and note that Ỹst0 ∼ GEV(1, exp(β0γ ), β0ξ ). 3. Pool the Ỹ 0 data from all sites and estimate (β0γ , β0ξ ) by setting the first two sample L-moments (I1 , I2 ) of the pooled data to match its population counterparts. This 1 This can be done in R using functions gev2frech and frech2gev in package SpatialExtremes (Ribatet, 2015). 97 yields the set of estimating equations: I1 = 1 − exp(β0γ )[1 − Γ(1 − β0ξ )] β0ξ ξ I2 = − exp(β0γ )(1 − 2β0 )Γ(1 − β0ξ ) β0ξ where β0ξ < 1. The solution2 to the set of equations yields the L-moment estimates for (β0γ , β0ξ ). 4. Maximize the log-likelihood m X n X log f (yst |β µ , β γ , β ξ , xµst , xγt , xξt ) s=1 t=1 with respect to only the non-stationary parameters to obtain their estimates. 5. Go back to step 1 using the estimates obtained in steps 2–4, unless convergence is reached (i.e. the change in maximized log-likelihood value is within tolerance between iterations). While this procedure still requires a likelihood function, it generally provides better estimates of the non-stationary parameters than a regression approach (Coles and Dixon, 1999). Additionally, the regression approach is restricted to incorporating nonstationarity in the location parameter. The hybrid procedure only needs to maximize the likelihood with respect to the non-stationary parameters, thus reducing the complexity of the optimization routine. An additional, explicit restriction is imposed such that β0ξ > −1 to ensure the log-likelihood in step 4 does not become irregular. 2 98 4.3.2 Maximum Product Spacing One Sample Case Maximum product spacing (MPS) is an alternative estimation procedure to the MLE and L-moment methods. The MPS was established by Cheng and Amin (1983). It allows efficient estimation in non-regular cases where the MLE may not exist. This is especially relevant to the GEV distribution, in which the MLE does not exist when ξ < −1 (Smith, 1985). In the GEV distribution setting, the MPS also exhibits convergence at the same rate as MLE, and its estimators are asymptotically normal (Wong and Li, 2006). While the L-moment approach has been shown to be efficient in small samples, it inherently restricts ξ < 1 (Hosking et al., 1985), and asymptotic confidence intervals are not available for ξ > 0.5. The general setup for MPS estimation in the one sample case is given in Section 3.3.2. The advantage of MPS over MLE can be seen (3.3) directly in the form of the objective function M (θ). By using only the GEV cumulative density function, M (θ) does not collapse for ξ < −1 as y ↓ µ − σξ . Wong and Li (2006, Section 4) perform extensive simulations comparing the MPS, MLE, and L-moment estimators in the one sample case. They find that the MPS is generally more stable and comparable to the MLE, and does not suffer from bias as does the L-moment in certain cases. In addition, they find that MLE failure rates are generally higher than those of MPS. 99 RFA Setting Let Yst be the observation in year t ∈ {1, . . . , n} from site s ∈ {1, . . . , m}. It has been assumed that Yst ∼ GEV(µst , γt µst , ξt ). Via the transformation, discussed in detail in Coles (2001),  Y − µ i1/ξt st st Zst = 1 + ξt γt µst h it follows that Zst is distributed according to the standard unit Fréchet distribution. Let F (z) be the cdf of Z, and the MPS estimation proceeds as follows. Order the observations within each site s as zs(1) < . . . < zs(n) and define the spacings as before: Dsi (θ) = F (zs(i) ) − F (zs(i−1) ) for i = 1, 2, . . . , n + 1 where F (zs(0) ) ≡ 0 and F (zs(n+1) ) ≡ 1. The MPS estimators are then found by minimizing M (θ) = − m X n+1 X log Dsi (θ). (4.2) s=1 i=1 Denote the MPS estimates as {β̌ µ , β̌ γ , β̌ ξ }. MPS estimation assumes the set of observations are independent and identically distributed. Here, observations can be assumed to be identically distributed, although the transformed observations z may still exhibit spatial dependence. However, point estimation can still be carried out with semi-parametric bootstrap procedures ensuring adequate adjustment to the variance of the estimators. 100 4.4 Simulation Study A large-scale simulation study is conducted to assess the performance of the estimation procedures for data generated under various types of spatial dependence. Data from the GEV distribution were generated for m sites over n years in a study region [l1 , l2 ] = [0, 10]2 . Max-stable processes are used in order to obtain a spatial dependence structure via R package SpatialExtremes (Ribatet, 2015). Roughly speaking, a maxstable process is the limit process of the component-wise sample maxima of a stochastic process, normalized by appropriate constants (e.g., De Haan and Ferreira, 2007). Its marginal distributions are GEV and its copula has to be an extreme-value (or equivalently, max-stable) copula (Gudendorf and Segers, 2010). Two characterizations of max-stable processes are used - the Smith (SM) model (Smith, 1990) and the Schlather (SC) model (Schlather, 2002). In addition, a non-extremal dependence structure is examined. One such choice is the Gaussian copula (Renard and Lang, 2007), also known as the meta-Gaussian model and will be denoted here as GC. See Davison et al. (2012) for a thorough review of these processes. There are four factors that dictate each setting of the simulation: the number of sites m, the number of observations within each site n, the spatial dependence model (SM, SC, or GC), and the dependence level. Each setting generates 1,000 data sets, with m ∈ {10, 20}, n ∈ {10, 25}, and three levels of spatial dependence – weak, medium, strong abbreviated as W, M, S respectively. The dependence levels are chosen as in 101 Wang et al. (2014). For the Smith model, the correlation structure is given as Σ = τ I2 where I2 is the identity matrix of dimension 2 and τ is 4, 16, 64 corresponding to W, M, and S. For the Schlather model, the correlation function is chosen as a special case of the powered exponential ρ(h) = exp[−(||h||/φ)ν ] with shape parameter fixed at ν = 2 and range parameter φ equal to 2.942, 5.910 and 12.153 corresponding to W, M, and S dependence levels. These were chosen such that the extremal coefficient function from the SC model matches as close as possible to that from the SM model. For the GC model, the exponential correlation function ρ(h) = exp[−(||h||/φ)] is used, with range parameter φ as 6, 12, and 20 corresponding to weak, medium, and strong dependence respectively. This leads to 36 possible scenarios to consider. Fréchet scale data are generated using R package SpatialExtremes with the parameters across all replicates and settings assigned the following values, β0γ = −1.041 β0ξ = −0.0186 β0µ = 0.003 β1γ = β1ξ = 0 with the marginal location mean values generated once for the m sites from a normal distribution with mean 5.344 and standard deviation of 1.865. Data are then transformed from the original Fréchet scale to GEV following the link functions in (4.1). The parameter values chosen here are from the estimated parameters fitting the flood index model to a subset of northern California sites from the GHCN dataset described in the next section. The covariates corresponding to the non-stationary location parameter β0µ are 102 the latest available winter-averaged Southern Oscillation Index (SOI) values described in Section 4.5. The estimation methods proposed should produce asymptotically unbiased estimates under various forms of spatial dependence; as noted by Stedinger (1983), as well as Hosking and Wallis (1988), intersite dependence does not introduce significant bias, but can have a dramatic effect on the variance of these estimators. Another advantage of our proposed methods of estimation is the ability to obtain adjusted variance estimates, without needing to specify the form of the dependence. Since bias has been previously shown to be negligible in the RFA setting, root mean squared error (RMSE) is used to assess the performance of each of the three estimators (MLE, MPS, and L-moment / likelihood hybrid). RMSE is defined as, for some parameter ω, v u J u1 X t (ωj − ω̂j )2 J j=1 (4.3) where ωj is the true and ω̂j is the estimated parameter value in replicate j. Optimization failure rates for the three estimation methods can be seen in Table 4.1. For the L-moment hybrid method, starting parameters are initialized by setting each marginal mean βsµ to the stationary one-sample L-moment estimate for data from site s, non-stationary parameters equal to zero, and β0γ , β0ξ equal to the stationary L-moment estimators from pooling data across all sites. For the MLE and MPS methods, optimization is attempted first with these starting parameters and if the routine fails, then 103 Table 4.1: Failure rate (%) in optimization for the three estimation methods in the combined 12 settings of number of sites, observations, and dependence levels within each spatial dependence structure (SC, SM, and GC) out of 10,000 replicates. The setup is described in detail in Section 4.4. Setting Weak Medium Strong MPS MLE Hybrid MPS MLE Hybrid MPS MLE Hybrid SC m = 10, m = 10, m = 20, m = 20, n = 10 n = 25 n = 10 n = 25 0.01 0.01 0.02 0.05 0.10 0.25 0.61 0.79 0.01 0.00 0.01 0.01 0.00 0.00 0.02 0.08 0.30 0.29 0.52 0.68 0.01 0.01 0.04 0.01 0.01 0.01 0.07 0.03 1.05 0.35 0.77 0.56 0.12 0.02 0.17 0.04 SM m = 10, m = 10, m = 20, m = 20, n = 10 n = 25 n = 10 n = 25 0.02 0.00 0.03 0.08 0.12 0.26 0.50 0.75 0.00 0.00 0.01 0.02 0.00 0.00 0.07 0.05 0.34 0.26 0.54 0.62 0.07 0.00 0.02 0.02 0.00 0.01 0.04 0.05 0.95 0.23 0.66 0.61 0.20 0.00 0.15 0.02 GC m = 10, m = 10, m = 20, m = 20, n = 10 n = 25 n = 10 n = 25 0.01 0.01 0.01 0.03 0.21 0.37 0.48 0.66 0.00 0.00 0.01 0.01 0.00 0.00 0.04 0.06 0.22 0.30 0.38 0.71 0.02 0.00 0.00 0.00 0.00 0.02 0.02 0.08 0.27 0.26 0.65 0.59 0.03 0.00 0.04 0.00 uses the estimates from the L-moment hybrid method to initialize. In all settings, the MLE has the highest levels of optimization failures, and in some settings, the rate was 10-fold versus the MPS and L-moment hybrid. Between the MPS and L-moment hybrid methods, the rates are similar, with neither method dominating in all settings. However, even when the procedures did not strictly fail in optimization, there are cases where they provide absurd estimates. For example, in the setting of m = 10, n = 10, strong SC dependence, the maximum squared error seen for the shape parameter using MLE was over 24. Thus, a trimmed mean of squared errors are used in the RMSE calculations, discarding the top 2% of values. Figures 4.1, 4.2, and 4.3 show the RMSE for each of the simulation settings for the Schlather, Smith, and Gaussian Copula dependence structures, respectively. In every 104 m=10,n=10 m=10,n=25 m=20,n=10 m=20,n=25 1.0 ● ● ● ● ● Location 0.8 ● 0.6 ● ● ● ● ● ● ● ● 0.08 ● ● ● ● ● 0.06 0.05 ● ● ● 0.04 ● 0.4 0.3 ● ● ● ● 0.2 Scale Root Mean Squared Error ● Location SOI 0.07 ● ● ● ● ● ● ● ● 0.1 0.4 ● ● ● 0.2 ● ● ● ● ● ● Shape 0.3 ● ● ● 0.1 W M S W M S W M S W M S Dependence Estimation ● Hybrid MLE MPS Figure 4.1: Schlather model root mean squared error of the parameters for each estimation method, from 1000 replicates of each setting discussed in Section 4.4. W, M, S refers to weak, medium, and strong dependence, with m being the number of sites and n, the number of observations within each site. 105 m=10,n=10 m=10,n=25 m=20,n=10 m=20,n=25 1.0 ● ● ● ● ● Location 0.8 ● 0.6 ● ● ● ● ● ● ● ● 0.08 ● ● ● ● 0.06 0.05 ● ● ● 0.04 ● 0.4 0.3 ● ● ● ● 0.2 Scale Root Mean Squared Error ● ● Location SOI 0.07 ● ● ● ● ● ● 0.1 ● ● 0.4 ● ● ● 0.2 ● ● ● ● ● ● ● W M Shape 0.3 ● ● 0.1 W M S W M S W M S S Dependence Estimation ● Hybrid MLE MPS Figure 4.2: Smith model root mean squared error of the parameters for each estimation method, from 1000 replicates of each setting discussed in Section 4.4. W, M, S refers to weak, medium, and strong dependence, with m being the number of sites and n, the number of observations within each site. 106 m=10,n=10 m=10,n=25 m=20,n=10 m=20,n=25 1.0 ● ● ● ● ● Location 0.8 ● 0.6 ● ● ● ● ● ● ● ● ● ● ● ● ● W M S 0.08 ● ● ● ● ● 0.06 0.05 ● ● ● 0.04 ● 0.4 0.3 ● ● ● ● 0.2 Scale Root Mean Squared Error ● Location SOI 0.07 ● ● ● ● ● ● 0.3 ● ● ● ● ● ● ● W M Shape ● 0.2 ● 0.1 W M S S W M S Dependence Estimation ● Hybrid MLE MPS Figure 4.3: Gaussian copula model root mean squared error of the parameters for each estimation method, from 1000 replicates of each setting discussed in Section 4.4. W, M, S refers to weak, medium, and strong dependence, with m being the number of sites and n, the number of observations within each site. 107 case, the RMSE of the MPS estimation procedure is smaller than that of MLE. The hybrid MLE / L-moment outperforms the MLE in the smallest sample case (n = 10), but has a larger RMSE for the shape parameter when m = 20 and n = 25. As expected, an increase in sample size corresponds to a reduction in RMSE for all methods. However, the MLE and MLE / L-moment hybrid tend to see a more significant reduction than MPS, suggesting the stability of MPS estimates in small sample sizes. 4.5 California Annual Daily Maximum Winter Precipitation Daily precipitation data (in cm) is available for tens of thousands of surface sites around the world via the Global Historical Climatology Network (GHCN). An overview of the dataset can be found in Menne et al. (2012). Although some California sites have records dating before the year 1900, it is quite sparse. To ensure a large enough and non-biased collection of sites, only the most recent 53 years (1963 – 2015) are considered. In this period, there are 27 sites with complete records available in the state of California. Their locations can be seen in Figure 4.4. For each year, the block maxima is observed as the daily maximum winter precipitation event for the period of December 1 through March 31. If more than 10% of the observations in this period were missing, the block maxima from that year is considered as missing. A process suspected to be related to extreme precipitation events (e.g., 108 42 ● 24 ● Latitude 39 36 1 8 ● 3 21 ● 4 ●2 ● ●● 19 22 ●●16●● 20 12 ● 18 ● ● 7 ● 26 17 27 11 ● ● 13 ● 23 9 ●●25 ●● 14 10 ● 6 ● 5 ● 33 ● 15 −124 −120 −116 Longitude Figure 4.4: Locations of the 27 California sites used in the non-stationary regional frequency analysis of annual daily maximum winter precipitation events. Schubert, Chang, Suarez, and Pegion, 2008) is El Niño–Southern Oscillation (ENSO). ENSO can be represented using the Southern Oscillation Index (SOI), a measure of observed sea level pressure differences and typically has one measurement per calendar month. For purposes here, the mean SOI value over current winter months (December through March) is treated as a covariate in the non-stationary regional frequency analysis model. The raw SOI data is taken from the Australia Bureau of Meteorology’s website, http://www.bom.gov.au/climate/current/soihtm1.shtml. To get a sense of the dependence among sites, Figure 4.5 displays a scatterplot of the pairwise spearman correlations by euclidean distance for the 27 sites. There appears to be a decreasing trend as the distance between two sites increases. Over 25% of the 1.0 109 ● 0.5 ● ● ● ● ●●● ● ● ● ●● ● ●●● ● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ●● ●● ● ●●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●●● ●●●● ●● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ●● ● ● ●● ● ● ● ●●●●●●● ●● ● ● ●●● ●● ●●● ● ● ● ● ● ●● ●●● ●● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ● ● ●●●● ●●● ●● ● ●● ● ●● ●● ● ●●● ● ● ●●● ● ●● ● ● ● ● ●●● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ● ● ●●●● ●●● ● ●● ●● ● ● ●● ● ●●● ● ● ● ● ●●●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ●● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ● ● 0.0 Spearman Correlation ●● ● ● ●● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● −0.5 ● 0 2 4 6 8 10 Euclidean Distance (Degrees) Figure 4.5: Scatterplot of Spearman correlations by euclidean distance between each pair of the 27 California sites used in the non-stationary regional frequency analysis of annual daily maximum winter precipitation events. correlation coefficients are above 0.41, so there is a need to account for this spatial dependence in the variance of the estimators. The flood index model is fit with the links given in (4.1), treating the intercept shape and proportionality terms as shared across sites, denoted as ξ0 and γ0 respectively. Sitespecific marginal mean parameters are assigned. An exploratory visual analysis of SOI and the winter precipitation maximums show an increase in magnitude of events for negative SOI years, with a less clear trend for positive SOI values. Thus, piecewise linear terms for positive and negative SOI values are incorporated into the location parameter. The two distinct SOI piecewise linear terms can be defined as SOI · 1(SOI > 110 Gamma Location SOI Negative −0.02 0.475 Estimate 0.425 ● −0.04 0.450 ● ● ● ● ● −0.06 0.400 −0.08 Location SOI Postive Shape 0.050 0.15 0.10 0.025 ● ● ● 0.000 ● ● 0.05 ● 0.00 −0.05 −0.025 Hybrid MLE MPS Hybrid MLE MPS Method Figure 4.6: Estimates and 95% semi-parametric bootstrap confidence intervals of the location parameter covariates (postive and negative SOI piecewise terms), proportionality, and shape parameters for the three methods of estimation in the non-stationary RFA of the 27 California site annual winter maximum precipitation events. 0) and SOI · 1(SOI ≤ 0). The model parameters are estimated with the three methods discussed previously. Standard errors of the estimates need to be adjusted due to spatial dependence and can be obtained via semi-parametric bootstrap. The resampling method of Heffernan and Tawn (2004) is implemented as described in Appendix A.3. Though computationally expensive, this bootstrap procedure can be directly extended to run in parallel. The results of the analysis are seen in Figures 4.6 and 4.7. The semi-parametric 111 10.0 Precipitation (cm) ● ● ● 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 22 23 24 25 26 27 Site Method ● Hybrid ● MLE ● MPS Figure 4.7: Estimates and 95% semi-parametric bootstrap confidence intervals of the marginal site-specific location means for the three estimation methods in the nonstationary RFA of the 27 California site annual winter maximum precipitation events. bootstrap confidence intervals show that all three methods of estimation provide negative estimates of the negative linear SOI term at the 5% significance level. For the positive linear SOI term, all three methods do not detect a significant difference from zero. Interestingly, only maximum likelihood estimation fails to detect a significant difference from zero in the shape parameter; both MPS and the hybrid L-moment method indicate a heavy-tailed (ξ > 0) distribution. To further demonstrate the differences between the three methods, a subset of years from the original 53 year sample was taken, keeping just one out of every three years, 112 Hybrid MLE MPS 0.2 Estimate ● ● ● ● ● 0.0 ● −0.2 Full Subset Full Subset Full Subset Sample Figure 4.8: Estimates and 95% semi-parametric bootstrap confidence intervals of the shape parameter by the three estimation methods, for the full 53 year and 18 year subset sample of California annual winter precipitation extremes. The horizontal dashed line corresponds to the shape parameter estimate of each method for the subset sample. making this subset sample of record length 18. The same analysis was performed on this subset of data and estimates of the parameters are compared to the full sample. For all three methods, the two SOI parameters fail to detect departures from zero at the 5% level. Stark differences can be seen in Figure 4.8 for the shape parameter estimates between the three methods. The MPS and hybrid L-moment estimates for the shape parameter are quite stable between the two samples, both decreasing approximately the same, from 0.09 to 0.07. The MLE shape estimate for the subset sample is completely outside the 95% interval range based on the full sample, switching from a positive to negative estimate. For simplicity, the remainder of the analysis (on the full sample) will use the MPS estimators. A quantity of great interest to researchers are the t-year return levels, which can be thought of as the maximum event that will occur on average every t years. The marginal 113 Sample Mean SOI ● 42 42 ● 36 33 ● ● ● ● ●●● ●● ● ● ●● ● ●● ● ● ● ● ● ●●● ● −124 −120 39 Latitude Latitude 39 Sample Minimum SOI 36 33 −116 Longitude 50 Year Return 5 10 Level (cm) 15 ● ● ●●● ●● ● ● ●● ● ●● ● ● ● ● ● ●●● ● −124 20 −120 −116 Longitude Percent Increase 10 20 (vs. Mean SOI) 30 40 50 Figure 4.9: Left: 50 year return level estimates (using MPS) at the 27 sites, conditioned on the mean sample SOI value (−0.40). Right: Estimated percent increase in magnitude of the 50 year event at the sample minimum SOI (−28.30) versus the mean SOI value. return levels at each site are determined jointly from the regional frequency model, dependent on estimates of the shared parameters and site-specific marginal means. Calculation of the quantity can be found in (2.6), replacing the stationary parameters with the appropriate non-stationary values. The left half of Figure 4.9 shows the 50 year return level estimates of precipitation (in centimeters) using the MPS estimation, conditioned on the mean value of SOI in the sample, −0.40. In other words, these are the estimated maximum 50 year daily winter precipitation events for an average ENSO year. To determine the effect of ENSO on return levels, we compare the 50 year return levels conditioned on the sample minimum (−28.30) SOI values to the mean SOI. The right half of Figure 4.9 shows the percent change of the estimated 50 year return levels conditioned on the sample minimum SOI, versus the mean value of SOI. The findings 114 suggest that strong El Niño (negative SOI) years increase the estimated effects of a 50 year precipitation event significantly (in some cases over 50% larger estimates), while strong La Niña (positive SOI) events do not see a significant change from the average ENSO year. 4.6 Discussion We propose two alternative estimation methods to maximum likelihood (ML) for fitting non-stationary regional frequency models. The first, maximum product spacing (MPS) estimation seeks to maximize the geometric mean of spacing in the data and the second is a hybrid of ML and L-moment estimation. These are studied in the context of a flood index model with extreme value marginal distributions, but the methodology can be generalized to any regional frequency model. In the context of distributions in the extremal domain, ML estimation has some known drawbacks; in small samples the L-moment estimation method is more efficient and the ML estimate may not exist for certain values of the shape parameter. Additionally, it has been shown Wong and Li (2006) empirically that MLE can provide absurd estimates in small samples even if optimization does not fail entirely. In stationary RFA, an efficient alternative procedure can estimate the parameters using only L-moments (e.g., Wang et al., 2014). However, extending this method to the nonstationary case is not straightforward. Existing attempts have serious limitations and 115 are reviewed in Section 4.2.1. MPS estimation is well-studied in the one-sample case and this contribution is an extension to the RFA setting. As with MLE, it is intuitive to incorporate covariates in all parameters, is as efficient asymptotically, and exists for all values of the shape parameter. The hybrid MLE / L-moment procedure is an iterative estimation procedure that estimates stationary parameters using L-moments and non-stationary parameters via likelihood. While the procedure itself is not as straightforward as MPS or strictly MLE, it is more computationally efficient as it only has to perform optimization over the non-stationary parameters. The performance of the three estimation procedures are evaluated in the flood index non-stationary RFA model via a large scale study of data simulated under extremal and Gaussian dependence with parameters chosen from real data. It is shown that the root mean squared error (RMSE) of the MPS estimator is smaller than that of MLE in all cases. In most cases, the hybrid L-moment / MLE outperformed the pure MLE method as well. Additionally, the MPS method is stable for sample sizes as small as 10, which is desirable in environmental applications with extremal data as historical record is often short. The three estimation methods are applied to a flood-index model for maximum annual precipitation events in California with an emphasis on using the Southern Oscillation Index (SOI) as a predictor. To avoid explicitly specifying the spatial dependence structure, a semi-parametric bootstrap procedure based on the ideas of Heffernan and 116 Tawn (2004) is used to obtain adjusted standard errors of estimates. The three methods find a statistically significant negative association between negative values of SOI (El Niño) and maximum precipitation magnitudes, but not for positive SOI values (La Niña). The MPS and hybrid L-moment methods indicate a positive shape parameter value, while the MLE does not find this to be significant. Using MPS, the effect of SOI on return levels is studied and it is found that El Niño has an increasing effect on the magnitude of these events. Strong El Niño years are estimated to increase the magnitude of 50 year return level events on average 23.6% and up to 60% at some sites. The findings agree with previous studies (e.g., El Adlouni et al., 2007; Schubert et al., 2008; Shang, Yan, and Zhang, 2011; Zhang, Wang, Zwiers, and Groisman, 2010). Based on the simulation performance, stability in the subset versus full sample estimates for the California precipitation RFA, and ease to incorporate covariates, the recommendation to practitioners would be to use the MPS method. On a more general note, a current limitation of this analysis is the requirement of complete and balanced data. As missingness is common in historical climate records, there is a need to develop methodology to handle missing data in the semi-parametric resampling schemes in Appendix A.3. A further discussion on this subject is provided in Section 6.1. 117 Chapter 5 An R Package for Extreme Value Analysis: eva 5.1 Introduction It is quite apparent that statistics cannot be separated from computing and there are some particular challenges in extreme value analysis that need to be addressed. A thorough review of existing packages can be found in Gilleland (2016) and Gilleland, Ribatet, and Stephenson (2013). The eva package, short for ‘Extreme Value Analysis with Goodness-of-Fit Testing’, provides functionality that allows data analysis of extremes from beginning to end, with model fitting and a set of newly available tests for diagnostics. In particular, some highlights are: • Efficient handling of the near-zero shape parameter. • Implementation of the r largest order statistics (GEVr ) model - data generation, non-stationary fitting, and return levels. 118 • Maximum product spacing (MPS) estimation for parameters in the block maxima (GEV1 ) and Generalized Pareto distribution (GPD). • Sequential tests for the choice of r in the GEVr model, as well as tests for the selection of threshold in the peaks-over-threshold (POT) approach. For the bootstrap based tests, the option to run in parallel is provided. • P-value adjustments to control for the false discovery rate (FDR) and family-wise error rate (FWER) in the sequential testing setting. • Profile likelihood for return levels and shape parameters of the GEVr and GPD. While some of these issues / features may have been implemented in some existing packages, it is not predominant and there are some new features in the eva package that to the best of our knowledge have not been implemented elsewhere. In particular, completely new implementations are MPS estimation, p-value adjustments for error control in sequential ordered hypothesis testing, data generation and density calculations for the GEVr distribution. Additionally, the goodness-of-fit tests for the selection of r in the stationary GEVr distribution are the only non-visual diagnostics currently available – see Chapter 2 for more details. Similarly related, the only model fitting whatsoever for the GEVr distribution (stationary or non-stationary) can be found in R package ismev (Heffernan and Stephenson, 2016), which requires specification of the exact design matrix and does not explicitly handle the numerical issue for small values of the shape parameter. The eva package introduces model formulations similar to base function 119 lm and glm, provides improved optimization, and inherits usual class functionality for modeling data such as AIC, BIC, logLik, etc. A similar implementation is provided for fitting the non-stationary GPD. The last major improvement worth noting is profile likelihood estimation. Other R packages such as extRemes (Gilleland and Katz, 2011b) and ismev require specification of the boundaries of the interval, making automation less straightforward. The package fExtremes (Wuertz, 2013) does not require this; however it does not provide functionality for the GEVr distribution. The eva package includes semi-automated profile likelihood confidence interval estimation of the shape and return levels for the GPD and GEVr (implicitly block maxima) stationary models. 5.2 Efficient handling of near-zero shape parameter One of the interesting and theoretical aspects of the GEV / GEVr and GP distributions is the limiting form of each as the shape parameter ξ approaches zero. In practice, numerical instabilities can occur, particularly when working with the form (1 + xξ)(−1/ξ) as ξ → 0. Figure 5.1 shows both a naive and the efficient implementation in eva of the GEV cumulative distribution function (1.1) at x = 1, µ = 0 and σ = 1, with ξ varying from −0.0001 to 0.0001 on the cubic scale. Note that the true value of the CDF function at ξ = 0 is approximately 0.692. A similar demonstration can be carried out for the probability density function and for the GPD. 120 Handling of this issue is critical, particularly in optimization when the shape parameter may change its sign as the parameter space is navigated. The eva package handles these cases by rewriting certain functions to utilize high precision operations such as log1p, expm1 and some of the use cases in R discussed in Mächler (2012). # A naive implementation of the GEV cumulative distribution function pgev_naive <- function(q, loc = 0, scale = 1, shape = 0) { q <- (q - loc) / scale ifelse(shape == 0, exp(-exp(-q)), exp(-(1 + shape * q)^(-1/shape))) } 5.3 The GEVr distribution The GEVr distribution has the density function given in (1.3). When r = 1, this distribution is exactly the GEV distribution or block maxima. The eva package includes data generation (rgevr), density function (dgevr), non-stationary fitting (gevrFit), and return levels (gevrRl) for this distribution. To the best of the author’s knowledge, there is no current implementation whatsoever for the density function and data generation of the GEVr distribution. Appendix A.1 gives the psuedo code and a simplified version of the data generation algorithm. 0.7 0.6 0.4 0.5 GEV CDF 0.8 121 −1e−04 −5e−05 0e+00 5e−05 1e−04 Shape Figure 5.1: Plot of GEV cumulative distribution function with x = 1, µ = 0 and σ = 1, with ξ ranging from −0.0001 to 0.0001 on the cubic scale. The naive implementation is represented by the solid red line, with the implementation in R package eva as the dashed blue line. 5.3.1 Goodness-of-fit testing When modeling the r largest order statistics, if one wants to choose r > 1, goodness-offit must be tested. This can be done using function gevrSeqTests, which can be used for the selection of r, via the entropy difference test and score tests discussed in Sections 2.4 and 2.3 respectively. Take, for example, the Lowestoft dataset in Section 2.7.1 which includes the top hourly sea level readings for the period of 1964 – 2014. 122 data(lowestoft) gevrSeqTests(lowestoft, method = "ed") ## r p.values ForwardStop StrongStop statistic est.loc est.scale est.shape ## 2 0.9774687 1.455825 0.9974711 ## 3 0.7747741 1.163697 1.0869254 -0.28613586 3.434097 0.2397408 0.09172687 ## 4 0.5830318 1.116989 1.1500564 0.54896156 3.447928 0.2404563 0.06802070 ## 5 0.6445475 1.157363 1.2470248 0.46135009 3.452449 0.2376723 0.05451138 ## 6 0.4361569 1.181963 1.2676077 -0.77869930 3.455478 0.2396332 0.04709329 ## 7 0.6329943 1.334209 1.4133341 ## 8 0.4835074 1.444819 1.4790559 -0.70067260 3.455901 0.2376215 0.03838020 ## 9 0.8390270 1.836882 2.0321878 -0.20313820 3.458135 0.2356543 0.02536685 ## 10 0.8423291 1.847245 3.4235418 0.02824258 3.431792 0.2346591 0.10049739 0.47751655 3.454680 0.2372572 0.04555449 0.19891516 3.459470 0.2342272 0.01964612 The entropy difference test fails to reject for any value of r from 1 to 10. In the previous output, the adjusted ForwardStop (2.4) and StrongStop (2.5) p-values are also included. 5.3.2 Profile likelihood A common quantity of interest in extreme value analysis are the t-year return levels, which can be thought of as the average maximum value that will be exceeded over a period of t years. For the LoweStoft data, the 250 year sea level return levels, with 95% confidence intervals are plotted for r from 1 to 10. The advantage of using more top order statistics can be seen in the plots below. The width of the intervals decrease by 123 6.0 5.5 5.0 4.0 4.5 250 Year Return Level 6.5 7.0 Profile Likelihood 1 2 3 4 5 6 7 8 9 10 r Figure 5.2: Estimates and 95% profile likelihood confidence intervals for the 250 year return level of the LoweStoft sea level dataset, for r = 1 through r = 10. over two-thirds from r = 1 to r = 10. Similarly decreases can be seen in the parameter intervals. In addition, the profile likelihood confidence intervals (Figure 5.2) are compared with the delta method intervals (Figure 5.3). The advantage of using profile likelihood over the delta method is the allowance for asymmetric intervals. This is especially useful at high quantiles, or large return level periods. At the moment, no other software package provides a straightforward way to obtain profile likelihood confidence intervals for the GEVr distribution. In Figure 5.2, the asymmetry can be seen in the stable lower 124 6.0 5.5 5.0 4.0 4.5 250 Year Return Level 6.5 7.0 Delta Method 1 2 3 4 5 6 7 8 9 10 r Figure 5.3: Estimates and 95% delta method confidence intervals for the 250 year return level of the LoweStoft sea level dataset, for r = 1 through r = 10. bound across values of r, while the upper bound decreases. Profile likelihood is also implemented for estimating the shape parameter and in the same settings for the GPD. 5.3.3 Fitting the GEVr distribution The eva package allows generalized linear modeling in each parameter (location, scale, and shape), as well as specifying specific link functions. As opposed to some other packages, one can use formulas when specifying the models, so it is quite user friendly. 125 Additionally, to benefit optimization, there is efficient handling of the near-zero shape parameter in the likelihood and covariates are automatically centered and scaled when appropriate (they are transformed back to the original scale in the output). The gevrFit function includes certain class definitions such as logLik, AIC, and BIC to ease the steps in data analysis and model selection. As with profile likelihood, the equivalent functionality is implemented for fitting the non-stationary GPD. In the following chunk of code, we look at non-stationary fitting in the GEVr distribution. First, data of sample size 100 are generated from the GEV10 distribution with stationary shape parameter ξ = 0. The location and scale have an intercept of 100 and 1, with positive trends of 0.02 and 0.01, respectively. A plot of the largest order statistic (block maxima) can be seen in Figure 5.4. set.seed(7) n <- 100 r <- 10 x <- rgevr(n, r, loc = 100 + 1:n / 50, scale = 1 + 1:n / 100, shape = 0) ## Creating covariates (linear trend first) covs <- as.data.frame(seq(1, n, 1)) names(covs) <- c("Trend1") ## Create some unrelated covariates covs$Trend2 <- rnorm(n) covs$Trend3 <- 30 * runif(n) 100 102 x[, 1] 104 106 126 0 20 40 60 80 100 Index Figure 5.4: Plot of the largest order statistic (block maxima) from a GEV10 distribution with shape parameter parameter ξ = 0. The location and scale have an intercept of 100 and 1, with positive trends of 0.02 and 0.01, respectively. The indices (1 to 100) are used as the corresponding trend coefficients. ## Use full data fit_full <- gevrFit(data = x, method = "mle", locvars = covs, locform = ~ Trend1 + Trend2*Trend3, scalevars = covs, scaleform = ~ Trend1) ## Only use r = 1 fit_top_only <- gevrFit(data = x[, 1], method = "mle", 127 locvars = covs, locform = ~ Trend1 + Trend2*Trend3, scalevars = covs, scaleform = ~ Trend1) From a visual assessment of the largest order statistic in Figure 5.4, it is difficult to see trends in either the location or scale parameters. The previous chunk of code creates some covariates - the correct linear trend, labeled ‘Trend1’ and two erroneous covariates, labeled ‘Trend2’ and ‘Trend3’. Then, the non-stationary GEVr distribution is fit with the full data (r = 10) and only the block maxima (r = 1), modeling the correct linear trend in both location and scale parameters, a stationary shape parameter, and interaction / main effect terms for the erroneous ‘Trend2’ and ‘Trend3’ parameters in the location. ## Show summary of estimates fit_full ## Summary of fit: ## ## Location (Intercept) Estimate Std. Error 100.0856115 z value Pr(>|z|) 0.2276723 439.60378 0.0000e+00 *** ## Location Trend1 0.0193838 0.0042366 4.57535 4.7543e-06 *** ## Location Trend2 -0.0716415 0.0949454 -0.75455 4.5052e-01 ## Location Trend3 0.0031478 0.0049866 0.63124 5.2788e-01 ## Location Trend2:Trend3 0.0032205 0.0053048 0.60710 5.4378e-01 ## Scale (Intercept) 1.0831201 0.0922684 11.73879 8.0627e-32 *** ## Scale Trend1 0.0097441 0.0016675 5.84352 5.1108e-09 *** ## Shape (Intercept) 0.0393603 0.0293665 1.34031 1.8014e-01 128 ## --## Signif. codes: 0 ’***’ 0.001 ’*’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1 fit_top_only ## Summary of fit: ## Estimate Std. Error ## Location (Intercept) 99.5896128 z value Pr(>|z|) 0.4373915 227.68985 0.0000e+00 *** ## Location Trend1 0.0235401 0.0052891 4.45072 8.5582e-06 *** ## Location Trend2 -0.3567545 0.2858703 -1.24796 2.1205e-01 ## Location Trend3 0.0170264 0.0170313 0.99971 3.1745e-01 ## Location Trend2:Trend3 0.0021764 0.0194109 0.11212 9.1073e-01 ## Scale (Intercept) 1.1098238 0.2654124 4.18151 2.8958e-05 *** ## Scale Trend1 0.0036369 0.0042099 0.86390 3.8764e-01 ## Shape (Intercept) 0.1375594 0.1063641 1.29329 1.9591e-01 ## --## Signif. codes: 0 ’***’ 0.001 ’*’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1 From the output, one can see from the fit summary that using r = 10, both the correct trend in location and scale are deemed significant. However, using r = 1 a test for significance in the scale trend fails. Next, we fit another two models (using r = 10). The first, labeled ‘fit reduced1’ is a GEV10 fit incorporating only the true linear trends as covariates in the location and scale parameters. The second, ‘fit reduced2’ fits the Gumbel equivalent of this model (ξ = 0). Note that ‘fit reduced1’ is nested within ‘fit full’ and ‘fit reduced2’ is further 129 nested within ‘fit reduced1’. fit_reduced1 <- gevrFit(data = x, method = "mle", locvars = covs, locform = ~ Trend1, scalevars = covs, scaleform = ~ Trend1) fit_reduced2 <- gevrFit(data = x, method = "mle", locvars = covs, locform = ~ Trend1, scalevars = covs, scaleform = ~ Trend1, gumbel = TRUE) One way to compare these models is using the Akaike information criterion (AIC) and choose the model with the smallest value. This metric can be extracted by using AIC(·) on a gevrFit object. By this metric, the chosen model is ‘fit reduced2’, which agrees with the true model (Gumbel, with linear trends in the location and scale parameters). ## Compare AIC of three models AIC(fit_full) ## [1] 127.0764 AIC(fit_reduced1) ## [1] 120.4856 130 AIC(fit_reduced2) ## [1] 118.4895 5.4 Summary Many of the same options and procedures that are available for the GEVr distribution are also available for the Generalized Pareto distribution. In particular, functionality is for the most part the same for distribution functions (r, d, q, p prefixes), profile likelihood, and model fitting. Model fitting diagnostic plots are the same and include probability, quantile, return level, density, and residual vs. covariates (each provided when appropriate, depending on non-stationarity). The tests developed in Chapter 2 are implemented via the wrapper function gevrSeqTests and those discussed in Chapter 3 can be used through function gpdSeqTests, along with a few additional tests. All the tests that require a computational bootstrap approach have the option to be run in parallel, via R package parallel. The function pSeqStop provides an implementation of the recently developed ForwardStop and StrongStop pvalue adjustments derived in G’Sell et al. (2016). In closing, eva attempts to integrate and simplify all aspects of model selection, validation, and analysis of extremes for end users. It does so by introducing new methodology for goodness-of-fit testing in the GEVr and GP distributions, making model fitting 131 more straightforward (formula statements, diagnostic plots, and certain class inheritances), and efficient handling of numerical issues known to extremes. 132 Chapter 6 Conclusion The research presented here provides new methodology to approach goodness-of-fit testing in extreme value models and alternative estimation procedures in non-stationary regional frequency analysis of extremal data. Chapter 1 presents an overview of extreme value theory and some of the outstanding issues that will be addressed in the following chapters. In Chapter 2, two goodness-of-fit tests are developed for use in the selection of r in the r largest order statistics model, or GEVr distribution. The first is a score test. Due to the non-regularity of the GEVr distribution, a bootstrap approach must be used to obtain critical values for the test statistic. Parametric bootstrap is simple, yet computationally expensive so an alternative multiplier approximation (e.g., Kojadinovic and Yan, 2012) can be used for efficiency. The second, called the entropy difference (ED) test, utilizes the difference in log-likelihood between the GEVr and GEVr−1 and the distribution of the test statistic under the null hypothesis is shown to be asymptotically normal. The properties of the tests are studied and both are found to hold their size and have adequate power to detect deviations from the GEVr distribution. Recently developed 133 stopping rules (G’Sell et al., 2016) to control the familywise error rate (FWER) and false discovery rate (FDR) in the ordered, sequential testing setting are studied and applied in our framework. The utility of the tests are shown via applications to extreme sea levels and precipitation. A similar, but distinct problem is the choice of threshold in the peaks-over-threshold (POT) approach. In Chapter 3, a goodness-of-fit approach is considered for testing a set of predetermined thresholds. Multiple tests are studied for a single, fixed threshold under various misspecification settings and it is found that the Anderson–Darling test is most powerful in the majority of the settings. The same stopping rules used in Chapter 2 are applied in this setting to control the error rate in an ordered, multiple threshold testing situation. The Anderson–Darling test for the Generalized Pareto distribution is studied in detail by Choulakian and Stephens (2001) and they derive the asymptotic distribution of the test statistic, which requires obtaining the eigenvalues of an integral equation. An insightful and generous discussion with one of the authors, Prof. Choulakian, led to development of an approximate, but accurate method to compute p-values in a computationally efficient manner. This provides an automated multiple threshold testing procedure with the Anderson–Darling test that can be scaled in a straightforward manner. Its use is demonstrated by generating a map of precipitation return levels at hundreds of sites in the western United States. In Chapter 4, two alternative estimation procedures are thoroughly studied and 134 implemented for modeling extremal data with non-stationary regional frequency analysis (RFA). In stationary RFA, L-moment estimation can be used as an alternative to maximum likelihood (ML). In extremal distributions, L-moment estimation has some desirable properties compared to MLE such as efficiency in small samples and that it only requires existence of the mean (Hosking et al., 1985). However, there is no straightforward extensions to non-stationary RFA and currently MLE is the only available well-studied option. We propose two alternative estimation procedures for the non-stationary setting. The first, is an extension of maximum product spacings (MPS) estimation (Cheng and Amin, 1983) from the one sample case. The second is a hybrid, iterative L-moment / maximum likelihood method. Both have theoretical and/or computational advantages over MLE and they are shown to have better performance (in terms of squared error) via a large scale simulation study of multivariate extremal data fit with a non-stationary RFA model. This improvement is more apparent in simulations with short record length. The three estimation methods are compared in an analysis of daily precipitation extremes in California, fit with a non-stationary flood index RFA model. Interest is in the effect of the El Niño–Southern Oscillation on winter precipitation extremes in this region. Semi-parametric bootstrap procedures (e.g., Heffernan and Tawn, 2004) are used to obtain standard errors in the presence of unspecified spatial dependence. Most of the methodology developed here has been implemented in the R package eva, 135 which is publicly available on CRAN. In addition, it addresses deficiencies in other software for analyzing extremes. These include efficient handling of numerical instabilities when dealing with small shape parameter values, data generation and density functions for the GEVr distribution, profile likelihood for stationary return levels and the shape parameter, and more user-friendly functionality for model fitting and diagnostics. 6.1 Future Work The goodness-of-fit tests developed in Chapter 2 for selection of r in the GEVr distribution can be extended to allow covariates in the parameters. For example, extremal precipitation in a year may be affected by large scale climate indexes such as the Southern Oscillation Index (SOI), which may be incorporated as a covariate in the location parameter (e.g., Shang et al., 2011). Both tests can be carried out with additional non-stationary covariates in any of the model parameters. However, this introduces additional complexity in performing model selection (i.e., how to choose covariates and select r?). When the underlying data falls into a rich class of dependence structures (such as time series), this dependence may be incorporated directly instead of using a procedure to achieve approximate independence (e.g. the storm length τ in Section 2.7). For example, take the GEV-GARCH model (Zhao, Scarrott, Oxley, and Reale, 2011) when r = 1. It may be extended to the case where r > 1 and the tests presented here may be applied to select r under this model assumption. 136 Threshold selection in the non-stationary GPD, as discussed in Roth, Buishand, Jongbloed, Klein Tank, and van Zanten (2012) and Northrop and Jonathan (2011), is an obvious extension to the automated threshold testing methodology developed in Chapter 3. However, one particular complication that arises is performing model selection (i.e., what covariates to include) while concurrently testing for goodness-of-fit to various thresholds. It is clear that threshold selection will be dependent on the model choice. Another possible extension to this work involves testing for overall goodness-of-fit across sites (one test statistic). In this way, a fixed or quantile regression based threshold may be predetermined and then tested simultaneously across sites. In this setup both spatial and temporal dependence need to be taken into account. Handling this requires some care due to censoring (e.g., Dey and Yan, 2016, Section 2.5.2). In other words, it is not straightforward to capture the temporal dependence as exceedances across sites are not guaranteed to occur at the same points in time. Future work for estimation in non-stationary regional frequency analysis (RFA) as in Chapter 4, is to study the convergence rate of the estimators presented in terms of the number of sites, m and sample size n at each site. The relationship between m and n for estimator efficiency may be quite complicated and further investigation is needed. Additionally, the methodology can be applied to other heavy-tailed / non-regular distributions such as the Generalized Pareto, Kappa, and Lèvy. Another important, yet not trivial task is to develop a heterogeneity measure in the presence of nonstationarity to determine regional homogeneity. Hosking and Wallis (2005) discuss some metrics 137 for the stationary case; however this becomes less straightforward when the data are not assumed to be identically distributed. Instead of assuming linear relationships in the covariates, splines can be used to create a smooth curve. This can be quite useful to describe the effect of extremes over a geographic region. Additional care would be needed here to choose the level of smoothness and type of spline used. It would be desirable to have a mechanism to allow for missing data. Currently, only sites with full and balanced records are used in the analysis. This is a serious drawback, particularly with historical climate records that often exhibit missingness. Assuming data are missing completely at random (MCAR), the initial estimation procedure would not introduce bias and can be handled in a straightforward manner. To generate confidence intervals for the parameters, the semi-parametric bootstrap procedure in Appendix A.3 would need to be adjusted. In the presence of missing data, the cluster size of observations across sites within each year would not necessarily be equal. On a broader note, variable selection is an important part of any data analysis. As discussed earlier, in extremes often there exists a limited number of observations. This can lead to the number of parameters to be estimated exceeding the number of observations (small n, large p). Even in cases where n > p, there is still the very real possibility of over-fitting; such rules of thumb such as the ‘one in ten’ rule states that there must be at least ten observations for each predictor (Harrell, Lee, Califf, Pryor, and Rosati, 1984). For applications of extremes to nature, there are many apparent predictors that one may be interested in for example - linear, quadratic, seasonal, or 138 cyclic time trends, atmospheric/weather readings, coordinate locations, etc. Surprisingly, very little work has been done in this area. The only literature that considers regularization is Phatak, Chan, and Kiiveri (2010). They explore the use of RaVE, a sparse variable selection method, and apply it to annual rainfall data with a large number of atmospheric covariates. RaVE is formulated as a Bayesian hierarchical model and can be applied to any model with a well-defined likelihood. Menéndez, Méndez, Izaguirre, Luceño, and Losada (2009) use a modified stepwise selection method to select parameters. Mı́nguez, Méndez, Izaguirre, Menéndez, and Losada (2010) use modified forward selection, which penalizes based on AIC using a likelihood score perturbation method. The goal would be to develop a sparse regularization technique for extremes via penalized estimation similar to lasso (Tibshirani, 1996). Implementation of this is not trivial. The GEV distribution is not in the exponential family and thus, some of the nice results in GLM may not be available. Unlike the (usual) case of normal regression with homoscedasticity, when modeling non-stationarity in the GEV distribution often times both the location and scale parameters are assumed to vary with covariates, so shrinkage of both sets of covariates is desired. This would need to be explored; for example, different penalties could be used for each covariate set. Lastly, this regularization can be combined with existing maximum likelihood penalties that ensure the shape parameter ξ can be estimated (Coles and Dixon, 1999). 139 Appendix A Appendix A.1 Data Generation from the GEVr Distribution The GEVr distribution is closely connected to the GEV distribution. Let (Y1 , . . . , Yr ), Y1 > · · · > Yr follow the GEVr distribution (1.3). It can be shown that the GEV1 distribution is the GEV distribution with the same parameters, which is the marginal distribution of Y1 . More interestingly, note that, the conditional distribution of Y2 given Y1 = y1 is simply the GEV distribution right truncated by y1 . In general, given (Y1 , . . . , Yk ) = (y1 , . . . , yk ) for 1 ≤ k < r, the conditional distribution of Yk+1 is the GEV distribution righted truncated at yk . This property can be exploited to generate the r components in a realized GEVr observation. The pseudo algorithm to generate a single observation is the following: • Generate the first value y1 from the (unconditional) GEV distribution. • For i = 2, . . . , r: – Generate yi from the GEV distribution right truncated by yi−1 . 140 The resulting vector (y1 , . . . , yr ) is a single observation from the GEVr distribution. For ξ → 0, caveat is needed in numerical evaluation. Using function expm1 for exp(1+ x) for x → 0 provides much improved accuracy in comparison to a few implementations in existing R packages. For readability, here is a simplified version of the implementation in R package eva (Bader and Yan, 2016). ## Quantile function of a GEVr(loc, scale, shape) qgev <- function(p, loc = 0, scale = 1, shape = 0, log.p = FALSE) { if (log.p) p <- exp(p) if(shape == 0) { loc - scale * log(-log(p)) } else loc + scale * expm1(log(-log(p)) * -shape) / shape) } ## Random number generator of GEVr ## Returns a matrix of n rows and r columns, each row a draw from GEVr rgevr <- function(n, r, loc = 0, scale = 1, shape = 0) { umat <- matrix(runif(n * r), n, r) if (r > 1) { matrix(qgev(t(apply(umat, 1, cumprod)), loc, scale, shape), ncol = r) 141 } else { qgev(umat, loc, scale, shape) } } A.2 (r) Asymptotic Distribution of Tn (θ) Proof of Theorem 1. Consider a random vector (Y1 , ..., Yr ) which follows a GEVr (θ) distribution. The following result given by Tawn (1988, pg. 248) will be used: 1 h(j|θ, a, b, c) ≡ E[Zja (1 + ξZj )−( ξ +b) logc (1 + ξZj )]   a (−ξ)c−a X α a (−1) Γ(c) (j + bξ − αξ + 1) = Γ(j) α=0 α (A.1) where Zj = (Yj − µ)/σ and Γ(c) is the cth derivative of the gamma function, for a ∈ Z, b ∈ R, and c ∈ Z, such that (j + bξ − αξ + 1) 6∈ {0, −1, −2, . . .}, α = 0, 1, . . . , a. Assume that ξ 6= 0 and 1 + ξZj > 0 for j = 1, . . . , r. The difference in log-likelihoods for a single observation from the GEVr (θ) and GEVr−1 (θ) distribution, Dir , is given by (2.2) in Section 2.4. Thus, the first moment of Dir is E[D1r ] = − log σ − h(r|θ, 0, 0, 0) + h(r − 1|θ, 0, 0, 0)   1 − + 1 h(r|θ, 0, −ξ −1 , 1) ξ 142 = − log σ − 1 + (1 + ξ)ψ(r) where ψ(x) = Γ(1) (x) . Γ(x) To prove that the second moment of Dir is finite, note that ( 1 log σ , (1 + ξZ1r )− ξ , |D1r | ≤ 4 max − 1ξ (1 + ξZ1r−1 ) , 1 ξ )  + 1 log(1 + ξZ1r−1 ) , which implies ( 2 D1r ≤ 16 max 1 log σ , (1 + ξZ1r )− ξ , − 1ξ (1 + ξZ1r−1 ) , 1 ξ  )!2 + 1 log(1 + ξZ1r−1 ) . 2 ) can be established by applying (A.1) to the last three terms in The bound of E(D1r the max operator, 2 E[(1 + ξZ1r )− ξ ] = h(r|θ, 0, ξ −1 , 0) < ∞, 2 E[(1 + ξZ1r−1 )− ξ ] = h(r − 1|θ, 0, ξ −1 , 0) < ∞, E[log2 (1 + ξZ1r−1 )] = h(r − 1|θ, 0, −ξ −1 , 2) < ∞. The desired result then follows from the central limit theorem and Slutsky’s theorem. 143 The case where ξ = 0 in Theorem 1 can easily be derived by taking the limit as ξ → 0 in (2.2) and in (A.1) by the Dominated Convergence Theorem. A.3 Semi-Parametric Bootstrap Resampling in RFA Described below and borrowed from Heffernan and Tawn (2004) is the iterative procedure used to obtain bootstrapped standard errors for parameters of a regional frequency model in the presence of unspecified spatial dependence. 1. Fit the non-stationary RFA model to the data and obtain parameter estimates. 2. Transform the original GEV distributed data into standard uniform residuals using the estimated parameters from Step 1. 3. Calculate the ranks of the n residuals within each site. 4. Repeat B times, for some large number B: (a) Resample (with replacement) across years from the ranks in Step 3. (b) Generate a new n×m sample of standard uniform residuals and arrange them (within each site) according to the resampled rankings.1 (c) Transform the new sampled residuals back into GEV margins using the estimated parameters in Step 1. (d) Fit the model again and obtain the estimators. 1 For ties, can use a random assignment process. 144 Bibliography An, Y. and M. D. Pandey (2007). The r largest order statistics model for extreme wind speed estimation. Journal of Wind Engineering and Industrial Aerodynamics 95 (3), 165–182. Bader, B. and J. Yan (2016). eva: Extreme value analysis with goodness-of-fit testing. R package version 0.2.3. Balkema, A. A. and L. De Haan (1974). Residual life time at great age. The Annals of Probability 2 (5), 792–804. Beirlant, J., P. Vynckier, and J. L. Teugels (1996). Tail index estimation, pareto quantile plots, and regression diagnostics. Journal of the American Statistical Association 91 (436), 1659–1667. Benjamini, Y. (2010a). Discovering the false discovery rate. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 72 (4), 405–416. Benjamini, Y. (2010b). Simultaneous and selective inference: Current successes and future challenges. Biometrical Journal 52 (6), 708–721. Benjamini, Y. and Y. Hochberg (1995). Controlling the false discovery rate: A practical and powerful approach to multiple testing. Journal of the Royal Statistical Society. Series B 57 (1), 289–300. Benjamini, Y. and D. Yekutieli (2001). The control of the false discovery rate in multiple testing under dependency. The Annals of Statistics 29 (4), 1165–1188. Blanchard, G. and É. Roquain (2009). Adaptive false discovery rate control under independence and dependence. The Journal of Machine Learning Research 10, 2837– 2871. Blanchet, J. and M. Lehning (2010). Mapping snow depth return levels: smooth spatial modeling versus station interpolation. Hydrology and Earth System Sciences 14 (12), 2527–2544. Buishand, T. (1991). Extreme rainfall estimation by combining data from several sites. Hydrological Sciences Journal 36 (4), 345–365. Caeiro, F. and M. I. Gomes (2016). Threshold selection in extreme value analysis. In D. K. Dey and J. Yan (Eds.), Extreme Value Modeling and Risk Analysis: Methods and Applications, Chapter 4, pp. 69–82. CRC Press. 145 Caires, S. (2009). A comparative simulation study of the annual maxima and the peaks-over-threshold methods. Technical report, SBW-Belastingen: subproject ‘Statistics’. Deltares Report 1200264-002. Casella, G. and R. L. Berger (2002). Statistical Inference (2 ed.). Duxbury Pacific Grove, CA. Chandler, R. E. and S. Bate (2007). Inference for clustered data using the independence loglikelihood. Biometrika 94 (1), 167–183. Cheng, R. C. H. and N. A. K. Amin (1983). Estimating parameters in continuous univariate distributions with a shifted origin. Journal of the Royal Statistical Society. Series B (Methodological) 45 (3), 394–403. Cheng, R. C. H. and M. A. Stephens (1989). A goodness-of-fit test using Moran’s statistic with estimated parameters. Biometrika 76 (2), 385–392. Choulakian, V. and M. Stephens (2001). Goodness-of-fit tests for the generalized Pareto distribution. Technometrics 43 (4), 478–484. Coles, S. (2001). An Introduction to Statistical Modeling of Extreme Values (1 ed.). Springer. Coles, S. G. and M. J. Dixon (1999). Likelihood-based inference for extreme value models. Extremes 2 (1), 5–23. Danielsson, J., L. de Haan, L. Peng, and C. G. de Vries (2001). Using a bootstrap method to choose the sample fraction in tail index estimation. Journal of Multivariate Analysis 76 (2), 226–248. Davison, A. C., S. Padoan, M. Ribatet, et al. (2012). Statistical modeling of spatial extremes. Statistical Science 27 (2), 161–186. Davison, A. C. and R. L. Smith (1990). Models for exceedances over high thresholds. Journal of the Royal Statistical Society. Series B (Methodological) 52 (3), 393–442. De Haan, L. and A. Ferreira (2007). Extreme value theory: an introduction. Springer Science & Business Media. Deheuvels, P. (1986). Strong laws for the kth order statistic when k ≤ clog2 n. Probability Theory and Related Fields 72 (1), 133–154. Deheuvels, P. (1989). Strong laws for the kth order statistic when k ≤ clog2 n (II). In Extreme Value Theory, Volume 51, pp. 21–35. Springer. 146 Dey, D. K. and J. Yan (2016). Extreme Value Modeling and Risk Analysis: Methods and Applications. CRC Press. Drees, H., L. De Haan, and S. Resnick (2000). How to make a hill plot. The Annals of Statistics 28 (1), 254–274. DuMouchel, W. H. (1983). Estimating the stable index α in order to measure tail thickness: A critique. The Annals of Statistics 11 (4), 1019–1031. Dupuis, D. (1999). Exceedances over high thresholds: A guide to threshold selection. Extremes 1 (3), 251–261. Dupuis, D. J. (1997). Extreme value theory based on the r largest annual events: A robust approach. Journal of Hydrology 200 (1), 295–306. Dziubdziela, W. (1978). On convergence rates in the limit laws of extreme order statistics. In Trans. 7th Prague Conference and 1974 European Meeting of Statisticians B, pp. 119–127. El Adlouni, S., T. B. M. J. Ouarda, X. Zhang, R. Roy, and B. Bobée (2007). Generalized maximum likelihood estimators for the nonstationary generalized extreme value model. Water Resources Research 43 (3), n/a–n/a. W03410. Eljabri, S. S. M. (2013). New Statistical Models for Extreme Values. Ph. D. thesis, The University of Manchester, Manchester, UK. Embrechts, P., C. Klüppelberg, and T. Mikosch (1997). Modelling Extremal Events, Volume 33. Springer Science & Business Media. Falk, M. (1989). Best attainable rate of joint convergence of extremes. In Extreme Value Theory, pp. 1–9. Springer. Ferreira, A., L. de Haan, et al. (2015). On the block maxima method in extreme value theory: Pwm estimators. The Annals of Statistics 43 (1), 276–298. Ferreira, A., L. de Haan, and L. Peng (2003). On optimising the estimation of high quantiles of a probability distribution. Statistics 37 (5), 401–434. Ferro, C. A. and J. Segers (2003). Inference for clusters of extreme values. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 65 (2), 545–556. Gilleland, E. (2016). Computing software. In D. K. Dey and J. Yan (Eds.), Extreme Value Modeling and Risk Analysis: Methods and Applications, Chapter 25, pp. 505– 515. CRC Press. 147 Gilleland, E. and R. W. Katz (2011a). New software to analyze how extremes change over time. Eos 92 (2), 13–14. Gilleland, E. and R. W. Katz (2011b). New software to analyze how extremes change over time. Eos 92 (2), 13–14. Gilleland, E., M. Ribatet, and A. G. Stephenson (2013). A software review for extreme value analysis. Extremes 16 (1), 103–119. G’Sell, M. G., S. Wager, A. Chouldechova, and R. Tibshirani (2016). Sequential selection procedures and false discovery rate control. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 78 (2), 423–444. Gudendorf, G. and J. Segers (2010). Extreme-value copulas. In Copula theory and its applications, pp. 127–145. Springer. Guedes Soares, C. and M. G. Scotto (2004). Application of the r largest-order statistics for long-term predictions of significant wave height. Coastal Engineering 51 (5), 387– 394. Hall, P. and S. C. Morton (1993). On the estimation of entropy. Annals of the Institute of Statistical Mathematics 45 (1), 69–88. Hall, P. and I. Weissman (1997). On the estimation of extreme tail probabilities. The Annals of Statistics 25 (3), 1311–1326. Hanel, M., T. A. Buishand, and C. A. T. Ferro (2009). A nonstationary index flood model for precipitation extremes in transient regional climate model simulations. Journal of Geophysical Research: Atmospheres 114 (D15), n/a–n/a. D15107. Harrell, F. E., K. L. Lee, R. M. Califf, D. B. Pryor, and R. A. Rosati (1984). Regression modelling strategies for improved prognostic prediction. Statistics in medicine 3 (2), 143–152. Heffernan, J. E. and H. Southworth (2012). Extreme value modelling of dependent series using r. Heffernan, J. E. and A. G. Stephenson (2016). ismev: An introduction to statistical modeling of extreme values. R package version 1.41. Heffernan, J. E. and J. A. Tawn (2004). A conditional approach for multivariate extreme values (with discussion). Journal of the Royal Statistical Society: Series B (Statistical Methodology) 66 (3), 497–546. Hill, B. M. (1975). A simple general approach to inference about the tail of a distribution. The Annals of Statistics 3 (5), 1163–1174. 148 Hosking, J. and J. Wallis (1988). The effect of intersite dependence on regional flood frequency analysis. Water Resources Research 24 (4), 588–600. Hosking, J., J. R. Wallis, and E. F. Wood (1985). Estimation of the generalized extreme-value distribution by the method of probability-weighted moments. Technometrics 27 (3), 251–261. Hosking, J. R. M. (1990). L-moments: Analysis and estimation of distributions using linear combinations of order statistics. Journal of the Royal Statistical Society. Series B (Methodological) 52 (1), 105–124. Hosking, J. R. M. and J. R. Wallis (2005). Regional frequency analysis: an approach based on L-moments. Cambridge University Press. Katz, R. W., M. B. Parlange, and P. Naveau (2002). Statistics of extremes in hydrology. Advances in Water Resources 25 (8), 1287–1304. Khaliq, M., T. Ouarda, J.-C. Ondo, P. Gachon, and B. Bobée (2006). Frequency analysis of a sequence of dependent and/or non-stationary hydro-meteorological observations: A review. Journal of hydrology 329 (3), 534–552. Kharin, V. V., F. Zwiers, X. Zhang, and M. Wehner (2013). Changes in temperature and precipitation extremes in the cmip5 ensemble. Climatic Change 119 (2), 345–357. Kharin, V. V. and F. W. Zwiers (2005). Estimating extremes in transient climate change simulations. Journal of Climate 18 (8), 1156–1173. Kharin, V. V., F. W. Zwiers, X. Zhang, and G. C. Hegerl (2007). Changes in temperature and precipitation extremes in the ipcc ensemble of global coupled model simulations. Journal of Climate 20 (8), 1419–1444. Kjeldsen, T. R., J. Smithers, and R. Schulze (2002). Regional flood frequency analysis in the kwazulu-natal province, south africa, using the index-flood method. Journal of Hydrology 255 (1), 194–211. Kojadinovic, I. and J. Yan (2012). Goodness-of-fit testing based on a weighted bootstrap: A fast large-sample alternative to the parametric bootstrap. Canadian Journal of Statistics 40 (3), 480–500. Kumar, R. and C. Chatterjee (2005). Regional flood frequency analysis using lmoments for north brahmaputra region of india. Journal of Hydrologic Engineering 10 (1), 1–7. Lateltin, O. and C. Bonnard (1999). Hazard assessment and land-use planning in switzerland for snow avalanches, floods and landslides. Technical report, World Meteorological Organization. 149 Leadbetter, M. R., G. Lindgren, and H. Rootzén (2012). Extremes and related properties of random sequences and processes. Springer Science & Business Media. Leclerc, M. and T. B. Ouarda (2007). Non-stationary regional flood frequency analysis at ungauged sites. Journal of hydrology 343 (3), 254–265. López, J. and F. Francés (2013). Non-stationary flood frequency analysis in continental spanish rivers, using climate and reservoir indices as external covariates. Hydrology and Earth System Sciences Discussions 17 (8), 3103–3142. MacDonald, A., C. J. Scarrott, D. Lee, B. Darlow, M. Reale, and G. Russell (2011). A flexible extreme value mixture model. Computational Statistics & Data Analysis 55 (6), 2137–2157. Mächler, M. (2012). Accurately computing log (1- exp (-— a—)) assessed by the rmpfr package. Martins, E. S. and J. R. Stedinger (2000). Generalized maximum-likelihood generalized extreme-value quantile estimators for hydrologic data. Water Resources Research 36 (3), 737–744. McNeil, A. J. and T. Saladin (1997). The peaks over thresholds method for estimating high quantiles of loss distributions. In Proceedings of 28th International ASTIN Colloquium, pp. 23–43. Menéndez, M., F. J. Méndez, C. Izaguirre, A. Luceño, and I. J. Losada (2009). The influence of seasonality on estimating return values of significant wave height. Coastal Engineering 56 (3), 211–219. Menne, M. J., I. Durre, R. S. Vose, B. E. Gleason, and T. G. Houston (2012). An overview of the global historical climatology network-daily database. Journal of Atmospheric and Oceanic Technology 29 (7), 897–910. Mı́nguez, R., F. Méndez, C. Izaguirre, M. Menéndez, and I. J. Losada (2010). Pseudooptimal parameter selection of non-stationary generalized extreme value models for environmental variables. Environmental Modelling & Software 25 (12), 1592–1607. Moran, P. A. P. (1953). The random division of an interval-part ii. Journal of the Royal Statistical Society. Series B (Methodological) 15 (1), 77–80. Nadarajah, S. (2005). Extremes of daily rainfall in west central florida. Climatic change 69 (2-3), 325–342. Northrop, P. J. and C. L. Coleman (2014). Improved threshold diagnostic plots for extreme value analyses. Extremes 17 (2), 289–303. 150 Northrop, P. J. and P. Jonathan (2011). Threshold modelling of spatially dependent non-stationary extremes with application to hurricane-induced wave heights. Environmetrics 22 (7), 799–809. Phatak, A., C. Chan, and H. Kiiveri (2010). Fast variable selection for extreme values. In International Environmental Modelling and Software Society (iEMSs). Pickands, III, J. (1975). Statistical inference using extreme order statistics. The Annals of Statistics 3 (1), 119–131. Rao, C. R. (2005). Score test: Historical review and recent developments. In N. Balakrishnan, N. Kannan, and H. N. Nagaraja (Eds.), Advances in Ranking and Selection, Multiple Comparisons, and Reliability, pp. 3–20. Springer. Raoult, J.-P. and R. Worms (2003). Rate of convergence for the generalized pareto approximation of the excesses. Advances in Applied Probability 35 (4), 1007–1027. Renard, B. and M. Lang (2007). Use of a gaussian copula for multivariate extreme value analysis: some case studies in hydrology. Advances in Water Resources 30 (4), 897–912. Ribatet, M. (2009). A users guide to the spatialextremes package. Ribatet, M. (2015). Spatialextremes: Modelling spatial extremes. R package version 2.0-2. Ribereau, P., A. Guillou, and P. Naveau (2008). Estimating return levels from maxima of non-stationary random sequences using the generalized PWM method. Nonlinear Processes in Geophysics 15 (6), 1033–1039. Roth, M., T. A. Buishand, G. Jongbloed, A. M. G. Klein Tank, and J. H. van Zanten (2012). A regional peaks-over-threshold model in a nonstationary climate. Water Resources Research 48 (11), n/a–n/a. W11533. Scarf, P. A. and P. J. Laycock (1996). Estimation of extremes in corrosion engineering. Journal of Applied Statistics 23 (6), 621–644. Scarrott, C. and A. MacDonald (2012). A review of extreme value threshold estimation and uncertainty quantification. REVSTAT–Statistical Journal 10 (1), 33–60. Schlather, M. (2002). Models for stationary max-stable random fields. Extremes 5 (1), 33–44. Schubert, S. D., Y. Chang, M. J. Suarez, and P. J. Pegion (2008). Enso and wintertime extreme precipitation events over the contiguous united states. Journal of Climate 21 (1), 22–39. 151 Shaffer, J. P. (1995). Multiple hypothesis testing. Annual Review of Psychology 46 (1), 561–584. Shang, H., J. Yan, and X. Zhang (2011). El Nin̈o–Southern Oscillation influence on winter maximum daily precipitation in California in a spatial model. Water Resources Research 47, W11507–W11515. Shang, H., J. Yan, X. Zhang, et al. (2015). A two-step approach to model precipitation extremes in california based on max-stable and marginal point processes. The Annals of Applied Statistics 9 (1), 452–473. Singh, V. P. (2013). Entropy Theory and Its Application in Environmental and Water Engineering. John Wiley & Sons. Singo, L. R., P. M. Kundu, J. O. Odiyo, F. I. Mathivha, and T. R. Nkuna (2012). Flood frequency analysis of annual maximum stream flows for Luvuvhu river catchment, Limpopo Province, South Africa. Technical report, University of Venda, Department of Hydrology and Water Resources. Smith, R. L. (1985). Maximum likelihood estimation in a class of nonregular cases. Biometrika 72 (1), 67–90. Smith, R. L. (1986). Extreme value theory based on the r largest annual events. Journal of Hydrology 86 (1), 27–43. Smith, R. L. (1990). Max-stable processes and spatial extremes. manuscript, University of Surrey. Unpublished Smithers, J. and R. Schulze (2001). A methodology for the estimation of short duration design storms in south africa using a regional approach based on l-moments. Journal of Hydrology 241 (1), 42–52. Southworth, H. and J. E. Heffernan (2013). texmex: Statistical modelling of extreme values. R package version 2.1. Stedinger, J. R. (1983). Estimating a regional flood frequency distribution. Water Resources Research 19 (2), 503–510. Tawn, J. A. (1988). An extreme-value theory model for dependent observations. Journal of Hydrology 101 (1), 227–250. Thompson, P., Y. Cai, D. Reeve, and J. Stander (2009). Automated threshold selection methods for extreme wave analysis. Coastal Engineering 56 (10), 1013–1021. Tibshirani, R. (1996). Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological) 58 (1), 267–288. 152 Tsay, R. S. (2005). Analysis of Financial Time Series, Volume 543. John Wiley & Sons. Wadsworth, J. L. and J. A. Tawn (2012). Likelihood-based procedures for threshold diagnostics and uncertainty in extreme value modelling. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 74 (3), 543–567. Wang, Z. (2015). Estimating equations for spatial extremes with applications to detection and attribution analysis of changes in climate extremes. http://digitalcommons.uconn.edu/dissertations/859. Wang, Z., J. Yan, and X. Zhang (2014). Incorporating spatial dependence in regional frequency analysis. Water resources research 50 (12), 9570–9585. Weissman, I. (1978). Estimation of parameters and large quantiles based on the k largest observations. Journal of the American Statistical Association 73 (364), 812– 815. Wong, T. S. T. and W. K. Li (2006). A note on the estimation of extreme value distributions using maximum product of spacings. In Time Series and Related Topics, pp. 272–283. Institute of Mathematical Statistics. Wuertz, D. (2013). fextremes: Rmetrics - extreme financial market data. R package version 3010.81. Zhang, X., J. Wang, F. W. Zwiers, and P. Y. Groisman (2010). The influence of largescale climate variability on winter maximum daily precipitation over north america. Journal of Climate 23 (11), 2902–2915. Zhao, X., C. J. Scarrott, L. Oxley, and M. Reale (2011). GARCH dependence in extreme value models with Bayesian inference. Mathematics and Computers in Simulation 81 (7), 1430–1440.
10math.ST
arXiv:1603.05517v2 [math.AC] 5 Apr 2016 G-RADICAL SUPPLEMENTED MODULES Celil Nebiyev Department of Mathematics, Ondokuz Mayıs University, ˙ E − T URKEY 55270 Kurupelit − Atakum/Samsun/T Ü RK IY [email protected] Abstract In this work, g-radical supplemented modules which is a proper generalization of g-supplemented modules are defined and some properties of these modules are investigated. It is proved that the finite sum of g-radical supplemented modules is g-radical supplemented. It is also proved that every factor module and every homomorphic image of a g-radical supplemented module is g-radical supplemented. Let R be a ring. Then R R is g-radical supplemented if and only if every finitely generated R-module is g-radical supplemented. In the end of this work, it is given two examples for g-radical supplemented modules seperating with g-supplemented modules. Key words: Small Submodules, Radical, Supplemented Modules, Radical (Generalized) Supplemented Modules. 2010 Mathematics Subject Classification: 16D10, 16D70. 1 INTRODUCTION In this paper, all rings are associative with identity and all modules are unital left modules. Let M be an R -module and N ≤ M . If L = M for every submodule L of M such that M = N + L, then N is called a small submodule of M , denoted by N << M . Let M be an R -module and N ≤ M . If there exists a submodule K of M such that M = N + K and N ∩ K = 0, then N is called a direct summand of M and it is denoted by M = N ⊕ K. For any module M, we have M = M ⊕ 0. The intersection of all maximal submodules of an R-module M is called the radical of M and denoted by RadM . If M have no maximal submodules, then we call RadM = M . A submodule N of an R -module M is called an essential submodule and denoted by N E M in case K ∩ N 6= 0 for 1 every submodule K 6= 0. Let M be an R -module and K be a submodule of M . K is called a generalized small submodule of M denoted by K <<g M if for every essential submodule T of M with the property M = K + T implies that T = M . It is clear that every small submodule is a generalized small submodule but the converse is not true generally. Let M be an R−module. M is called an hollow module if every proper submodule of M is small in M . M is called local module if M has a largest submodule, i.e. a proper submodule which contains all other proper submodules. Let U and V be submodules of M . If M = U + V and V is minimal with respect to this property, or equivalently, M = U + V and U ∩ V << V , then V is called a supplement of U in M . M is called a supplemented module if every submodule of M has a supplement in M . Let M be an R-module and U, V ≤ M . If M = U + V and M = U + T with T E V implies that T = V , or equivalently, M = U + V and U ∩ V ≪g M , then V is called a g-supplement of U in M . M is called g-supplemented if every submodule of M has a g-supplement in M . The intersection of maximal essential submodules of an R-module M is called a generalized radical of M and denoted by Radg M . If M have no maximal essential submodules, then we denote Radg M = M. Lemma 1.1 Let M be an R -module and K, L, N, T ≤ M . Then the followings are hold. [3,5] (1) If K ≤ N and N is generalized small submodule of M , then K is a generalized small submodule of M . (2) If K is contained in N and a generalized small submodule of N , then K is a generalized small submodule in submodules of M which contains submodule N. (3) Let f : M → N be an R -module homomorphism. If K ≪g M , then f (K) ≪g M . (4) If K ≪g L and N ≪g T , then K + N ≪g L + T . Corollary 1.2 Let M1 , M2 , ..., Mn ≤ M , K1 ≪g M1 , K2 ≪g M2 , ..., Kn ≪g Mn . Then K1 + K2 + ... + Kn ≪g M1 + M2 + ... + Mn . Corollary 1.3 Let M be an R -module and K ≤ N ≤ M . If N ≪g M , then N/K ≪g M/K. Corollary 1.4 Let M be an R -module, K ≪g M and L ≤ M . Then (K + L) /L ≪g M/L. P Lemma 1.5 Let M be an R-module. Then Radg M = L≪g M L. Proof. See[3]. Lemma 1.6 The following assertions are hold. (1) If M is an R−module, then Rm ≪g M for every m ∈ Radg M . (2) If N ≤ M , then Radg N ≤ Radg M. (3) If K, L ≤ M , then Radg K + Radg L ≤ Radg (K + L) . 2 (4) If f : M −→ N is an R-module homomorphism, then f (Radg M ) ≤ Radg N. Radg K+L (5) If K, L ≤ M , then Radg K+L ≤ . L L Proof. Clear from Lemma 1.1 and Lemma 1.5. Lemma 1.7 Let M = ⊕i∈I Mi . Then Radg M = ⊕i∈I Radg Mi . Proof. Since Mi ≤ M , then by Lemma 1.6(2), Radg Mi ≤ Radg M and ⊕i∈I Radg Mi ≤ Radg M. Let x ∈ Radg M. Then by Lemma 1.6(1), Rx ≪g M. Since x ∈ M = ⊕i∈I Mi , there exist i1 , i2 , ..., ik ∈ I and xi1 ∈ Mi1 , xi2 ∈ Mi2 , ..., xik ∈ Mik such that x = xi1 + xi2 + ... + xik . Since Rx ≪g M , then by Lemma 1.1(4), under the canonical epimorphism π it (t = 1, 2, ..., k) Rxit = π it (Rx) ≪g Rxit . Then xit ∈ Radg Mit (t = 1, 2, ..., k) and x = xi1 + xi2 + ... + xik ∈ ⊕i∈I Radg Mi . Hence Radg M ≤ ⊕i∈I Radg Mi and since ⊕i∈I Radg Mi ≤ Radg M , Radg M = ⊕i∈I Radg Mi . 2 G-RADICAL SUPPLEMENTED MODULES Definition 2.1 Let M be an R-module and U, V ≤ M . If M = U + V and U ∩ V ≤ Radg V , then V is called a generalized radical supplement (briefly, g-radical supplement) of U in M . If every submodule of M has a generalized radical supplement in M , then M is called a generalized radical supplemented (briefly, g-radical supplemented) module. Clearly we see that every g-supplemented module is g-radical supplemented. But the converse is not true in general (See Example 2.20 and Example 2.21). Lemma 2.2 Let M be an R-module and U, V ≤ M . Then V is a g-radical supplement of U in M if and only if M = U + V and Rm ≪g V for every m∈U ∩V. Proof. (⇒) Since V is a g-radical supplement of U in M , M = U + V and U ∩ V ≤ Radg V . Let m ∈ U ∩ V . Since U ∩ V ≤ Radg V , m ∈ Radg V . Hence by Lemma 1.6(1), Rm ≪g V . (⇐) Since Rm ≪g V for every m ∈ U ∩ V , then by Lemma 1.6(1), U ∩ V ≤ Radg V and hence V is a g-radical supplement of U in M . Lemma 2.3 Let M be an R-module, M1 , U, X ≤ M and Y ≤ M1 . If X is a g-radical supplement of M1 + U in M and Y is a g-radical supplement of (U + X) ∩ M1 in M1 , then X + Y is a g-radical supplement of U in M . Proof. Since X is a g-radical supplement of M1 +U in M , M = M1 +U +X and (M1 + U ) ∩ X ≤ Radg X. Since Y is a g-radical supplement of (U + X) ∩ M1 in M1 , M1 = (U + X) ∩ M1 + Y and (U + X) ∩ Y = (U + X) ∩ M1 ∩ Y ≤ Radg Y . Then M = M1 + U + X = M1 = (U + X) ∩ M1 + Y + U + X = U + X + Y and, by Lemma 1.6(3), U ∩ (X + Y ) ≤ (U + X) ∩ Y + (U + Y ) ∩ X ≤ Radg Y + (M1 + U ) ∩ X ≤ Radg Y + Radg X ≤ Radg (X + Y ). Hence X + Y is a g-radical supplement of U in M . 3 Lemma 2.4 Let M = M1 + M2 . If M1 and M2 are g-radical supplemented, then M is also g-radical supplemented. Proof. Let U ≤ M . Then 0 is a g-radical supplement of M1 + M2 + U in M . Since M1 is g-radical supplemented, there exists a g-radical supplement X of (M2 + U ) ∩ M1 = (M2 + U + 0) ∩ M1 in M1 . Then by Lemma 2.3, X + 0 = X is a g-radical supplement of M2 + U in M . Since M2 is g-radical supplemented, there exists a g-radical supplement Y of (U + X) ∩ M2 in M2 . Then by Lemma 2.3, X + Y is a g-radical supplement of U in M . Corollary 2.5 Let M = M1 + M2 + ... + Mk . If Mi is g-radical supplemented for every i = 1, 2, ..., k, then M is also g-radical supplemented. Proof. Clear from Lemma 2.4. Lemma 2.6 Let M be an R−module, U, V ≤ M and K ≤ U . If V is a gradical supplement of U in M , then (V + K) /K is a g-radical supplement of U/K in M/K. Proof. Since V is a g-radical supplement of U in M , M = U + V and U ∩ V ≤ Radg V . Then M/K = U/K + (V + K) /K and by Lemma 1.6(5), (U/K) ∩ ((V + K) /K) = (U ∩ V + K) /K ≤ (Radg V + K) /K ≤ Radg (V + K) /K. Hence (V + K) /K is a g-radical supplement of U/K in M/K. Lemma 2.7 Every factor module of a g-radical supplemented module is g-radical supplemented. Proof. Clear from Lemma 2.6. Corollary 2.8 The homomorphic image of a g-radical supplemented module is g-radical supplemented. Proof. Clear from Lemma 2.7. Lemma 2.9 Let M be a g-radical supplemented module. Then every finitely M −generated module is g-radical supplemented. Proof. Clear from Corollary 2.5 and Corollary 2.8. Corollary 2.10 Let R be a ring. Then R R is g-radical supplemented if and only if every finitely generated R−module is g-radical supplemented. Proof. Clear from Lemma 2.9. Theorem 2.11 Let M be an R−module. If M is g-radical supplemented, then M/Radg M is semisimple. 4 Proof. Let U/Radg M ≤ M/Radg M . Since M is g-radical supplemented, there exists a g-radical supplement V of U in M . Then M = U + V and U ∩ V ≤ Radg V . Thus M/Radg M = U/Radg M + (V + Radg M ) /Radg M and (U/Radg M ) ∩ ((V + Radg M ) /Radg M ) = (U ∩ V + Radg M ) /Radg M ≤ (Radg V + Radg M ) /Radg M = Radg M/Radg M = 0. Hence M/Radg M = U/Radg M ⊕ (V + Radg M ) /Radg M and U/Radg M is a direct summand of M. Lemma 2.12 Let M be a g-radical supplemented module and L ≤ M with L ∩ Radg M = 0. Then L is semisimple. In particular, a g-radical supplemented module M with Radg M = 0 is semisimple. Proof. Let X ≤ L. Since M is g-radical supplemented, there exists a g-radical supplement T of X in M . Hence M = X + T and X ∩ T ≤ Radg T ≤ Radg M . Since M = X + T and X ≤ L, by Modular Law, L = L ∩ M = L ∩ (X + T ) = X + L ∩T . Since X ∩T ≤ Radg M and L ∩Radg M = 0, X ∩L ∩T = L ∩X ∩T ≤ L ∩ Radg M = 0. Hence L = X ⊕ L ∩ T and X is a direct summand of L. Proposition 2.13 Let M be a g-radical supplemented module. Then M = K ⊕ L for some semisimple module K and some module L with essential generalized radical. Proof. Let K be a complement of Radg M in M. Then by [8, 17.6], K ⊕ Radg M E M . Since K ∩ Radg M = 0, then by Lemma 2.12, K is semisimple. Since M is g-radical supplemented, there exists a g-radical supplement L of K in M . Hence M = K + L and K ∩ L ≤ Radg L ≤ Radg M . Then by K ∩ Radg M = 0, K ∩ L = 0. Hence M = K ⊕ L. Since M = K ⊕ L, then by Lemma 1.7, Radg M = Radg K ⊕ Radg L. Hence K ⊕ Radg M = K ⊕ Radg L. Since K ⊕ Radg L = K ⊕ Radg M E M = K ⊕ L, then by [1, Proposition 5.20], Radg L E L. Proposition 2.14 Let M be an R−module and U ≤ M . the following statements are equivalent. (1) There is a decomposition M = X ⊕ Y with X ≤ U and U ∩ Y ≤ Radg Y . (2) There exists an idempotent e ∈ End (M ) with e (M ) ≤ U and (1 − e) (U ) ≤ Radg (1 − e) (M ). (3) There exists a direct summand X of M with X ≤ U and U/X ≤ Radg (M/X). (4) U has a g-radical supplement Y such that U ∩ Y is a direct summand of U. Proof. (1) ⇒ (2) For a decomposition M = X ⊕ Y , there exists an idempotent e ∈ End (M ) with X = e (M ) and Y = (1 − e) (M ). Since e (M ) = X ≤ U , we easily see that (1 − e) (U ) = U ∩ (1 − e) (M ). Then by Y = (1 − e) (M ) and U ∩ Y ≤ Radg Y , (1 − e) (U ) = U ∩ (1 − e) (M ) = U ∩ Y ≤ Radg Y = Radg (1 − e) (M ). (2) ⇒ (3) Let X = e (M ) and Y = (1 − e) (M ). Since e ∈ End (M ) is idempotent, we easily see that M = X ⊕ Y . Then M = U + Y . Since e (M ) = 5 X ≤ U , we easily see that (1 − e) (U ) = U ∩ (1 − e) (M ). Since M = U + Y and U ∩ Y = U ∩ (1 − e) (M ) = (1 − e) (U ) ≤ Radg (1 − e) (M ) = Radg Y , Y is a g-radical supplement of U in M . Then by Lemma 2.6, M/X = (Y + X) /X is a g-radical supplement of U/X in M/X. Hence U/X = (U/X) ∩ (M/X) ≤ Radg (M/X). (3) ⇒ (4) Let M = X ⊕ Y . Since X ≤ U , M = U + Y . Let t ∈ U ∩ Y and Rt+T = Y for an essential submodule T of Y . Let ((T + X) /X)∩(L/X) = 0 for a submodule L/X of M/X. Then (L ∩ T + X) /X = ((T + X) /X)∩(L/X) = 0 and L∩T +X = X. Hence L∩T ≤ X and since X∩Y = 0, L∩T ∩Y ≤ X∩Y = 0. Since L ∩ Y ∩ T = L ∩ T ∩ Y = 0 and T E Y , L ∩ Y = 0. Since X ≤ L and M = X + Y , by Modular Law, L = L ∩ M = L ∩ (X + Y ) = X + L ∩ Y = X + 0 = X. Hence L/X = 0 and (T + X) /X E M/X. Since Rt + T = Y , R(t + X) + (T + X) /X = (Rt + X) /X + (T + X) /X = (Rt + T + X) /X = (Y + X) /X = M/X. Since t ∈ U , t + X ∈ U/X ≤ Radg (M/X) and hence R (t + X) ≪g M/X. Then by R(t+X)+(T + X) /X and (T + X) /X E M/X, (T + X) /X = M/X and then X + T = M . Since X + T = M and T ≤ Y , by Modular Law, Y = Y ∩ M = Y ∩ (X + T ) = X ∩ Y + T = 0 + T = T . Hence Rt ≪g Y and by Lemma 2.2, Y is a g-radical supplement of U in M . Since M = X ⊕ Y and X ≤ U , by Modular Law, U = U ∩ M = U ∩ (X ⊕ Y ) = X ⊕ U ∩ Y . Hence U ∩ Y is a direct summand of U . (4) ⇒ (1) Let U = X ⊕ U ∩ Y for a submodule X of U . Since Y is a g-radical supplement of U in M , M = U + Y and U ∩ Y ≪g Y . Hence M = U + Y = (X ⊕ U ∩ Y ) + Y = X ⊕ Y . Theorem 2.15 Let V be a g-radical supplement of U in M. If U is a generalized maximal submodule of M , then U ∩V is a unique generalized maximal submodule of V . Proof. Since U is a generalized maximal submodule of M and V / (U ∩ V ) ≃ (V + U ) /U = M/U , U ∩ V is a generalized maximal submodule of V . Hence Radg V ≤ U ∩ V and since U ∩ V ≤ Radg V , Radg V = U ∩ V . Thus U ∩ V is a unique generalized maximal submodule of V . Definition 2.16 Let M be an R−module. If every proper essential submodule of M is generalized small in M or M has no proper essential submodules, then M is called a generalized hollow module. Clearly we see that every hollow module is generalized hollow. Definition 2.17 Let M be an R−module. If M has a large proper essential submodule which contain all essential submodules of M or M has no proper essential submodules, then M is called a generalized local module. Clearly we see that every local module is generalized local. Proposition 2.18 Generalized hollow and generalized local modules are g-supplemented, so are g-radical supplemented. 6 Proof. Clear from definitions. Proposition 2.19 Let M be an R−module and Radg M 6= M . Then M is generalized hollow if and only if M is generalized local. Proof. (=⇒) Let M be generalized hollow and let L be a proper essential submodule of M . Then L ≪g M and by Lemma 1.5, L ≤ Radg M . Thus Radg M is a proper essential submodule of M which contain all proper essential submodules of M . (⇐=) Let M be a generalized local module, T be a large essential submodule of M and L be a proper essential submodule of M . Let L + S = M with S E M . If S 6= M , then L + S ≤ T 6= M. Thus S = M and L ≪g M. Example 2.20 Consider the Z−module Q. Since Radg Q = RadQ = Q, Z Q is g-radical supplemented. But, since Z Q is not supplemented and every nonzero submodule of Z Q is essential in Z Q, Z Q is not g-supplemented. Example 2.21 Consider the Z−module Q ⊕ Zp2 for a prime p. It is easy to check that Radg Zp2 6= Zp2 . By Lemma 1.7, Radg Q ⊕ Zp2 = Radg Q ⊕ Radg Zp2 6= Q ⊕ Zp2 . Since Q and Zp2 are g-radical supplemented, by Lemma 2.4, Q ⊕ Zp2 is g-radical supplemented. But Q ⊕ Zp2 is not g-supplemented. References [1] F. W. Anderson and K. R. Fuller, Rings and Categories of Modules, SpringerVerlag, New York, 1974. [2] F. Kasch, Modules and Rings, London New York, 1982. [3] B. Koşar, C. Nebiyev and N. Sökmez, G-Supplemented Modules, Ukrainian Mathematical Journal, 67 No.6, 861-864 (2015). [4] J. Clark, C. Lomp, N. Vanaja, R. Wisbauer, Lifting Modules. Supplements and Projectivity In Module Theory, Frontiers in Mathematics, Birkhauser, Basel, 2006. [5] N. Sökmez, B. Koşar, C. Nebiyev, Genelleştirilmiş Küçük Alt Modüller, XXIII. Ulusal Matematik Sempozyumu, Erciyes Üniversitesi, Kayseri, (2010). [6] W. Xue, Characterizations of Semiperfect and Perfect Rings, Publications Matematiques, 40, 115-125 (1996). [7] Y. Wang and N. Ding, Generalized Supplemented Modules, Taiwanese Journal of Mathematics, 10 No.6, 1589-1601 (2006). 7 [8] R. Wisbauer, Foundations of Module and Ring Theory, Gordon and Breach, Philadelphia, 1991. [9] H. Zöschinger, Komplementierte Moduln über Dedekindringen, Journal of Algebra, (29):42–56 (1974). 8
0math.AC
P OLYNOMIAL -T IME A LGORITHMS FOR S UBMODULAR L APLACIAN S YSTEMS Polynomial-Time Algorithms for Submodular Laplacian Systems Kaito Fujii KAITO FUJII @ MIST. I . U - TOKYO . AC . JP arXiv:1803.10923v1 [cs.DS] 29 Mar 2018 Tasuku Soma TASUKU SOMA @ MIST. I . U - TOKYO . AC . JP Graduate School of Information Science and Technology The University of Tokyo, 7-3-1 Hongo, Bunkyo-ku, Tokyo 113-8656, Japan Yuichi Yoshida YYOSHIDA @ NII . AC . JP National Institute of Informatics, 2-1-2 Hitotsubashi, Chiyoda-ku, Tokyo 101-8430, Japan Editor: Abstract Let G = (V, E) be an undirected graph, LG ∈ RV ×V be the associated Laplacian matrix, and b ∈ RV be a vector. Solving the Laplacian system LG x = b has numerous applications in theoretical computer science, machine learning, and network analysis. Recently, the notion of the Laplacian V operator LF : RV → 2R for a submodular transformation F : 2V → RE + was introduced, which can handle undirected graphs, directed graphs, hypergraphs, and joint distributions in a unified manner. In this study, we show that the submodular Laplacian system LF (x) ∋ b can be solved in polynomial time. Furthermore, we also prove that even when the submodular Laplacian system has no solution, we can solve its regression form in polynomial time. Finally, we discuss potential applications of submodular Laplacian systems in machine learning and network analysis. 1. Introduction In spectral graph theory, the Laplacian matrix (or simply Laplacian) LG = DG − AG associated with an undirected graph G = (V, E) is an important object, where DG ∈ RV ×V is a diagonal matrix with the (v, v)-th element equal to the degree of v ∈ V and AG ∈ RV ×V is the adjacency matrix of G. Using the Laplacian LG of an undirected graph G, one can extract various information regarding G, such as commuting time of random walks, maximum cut, and diameter of the graph. Further, a cornerstone result in spectral graph theory is Cheeger’s inequality (Alon, 1986; Alon and Milman, 1985), which associates the community structure of G with the second smallest eigenvalue of LG . See Chung (1997) for a survey on this area. An important problem considering Laplacians for undirected graphs is solving the Laplacian system LG x = b for a graph G = (V, E) and a vector b ∈ RV ; in terms of electrical circuits, this problem can be interpreted as follows: We regard each edge e ∈ E as a resistance of 1Ω and each vertex v ∈ V as a joint connecting these resistances. Then, the solution x provides the electric potential at the vertices when a current of b(v)A flows through each vP∈ V . Based on this interpretation, it is evident that the Laplacian system has a solution only when v∈V b(v) = 0, that is, the amount of inflow is equal to that of outflow. Solving Laplacian systems has numerous applications such as in simulating random walks (Cohen et al., 2016), generating spanning trees (Kelner and Madry, 2009), constructing sparsifiers (Spielman and Srivastava, 1 F UJII , S OMA , AND YOSHIDA 2011), faster interior point methods (Daitch and Spielman, 2008), semi-supervised learning (Joachims, 2003; Zhou et al., 2003; Zhu et al., 2003), and network analysis (Brandes and Fleischer, 2005; Hayashi et al., 2016; Mavroforakis et al., 2015; Newman, 2005). For more applications of solving Laplacian systems, refer to Vishnoi (2013). Although the concept of Laplacians for undirected graphs was first introduced in the 1980s, it is only recently that the notions of Laplacian operators for directed graphs (Yoshida, 2016) and hypergraphs (Louis, 2015) have been proposed and corresponding Cheeger’s inequalities have been obtained.1 It is important to note that these operators are no longer linear, and therefore, cannot be expressed using matrices. Furthermore, recently, Yoshida (2017) showed that these operators can be systematically constructed using the cut function F : 2V → RE + associated with an undirected graph, directed graph, or hypergraph, where Fe : S 7→ F (S)(e) is equal to one if the edge e ∈ E is cut, and zero otherwise. A key property used in the analysis of the constructed operators is the submodularity of the cut function, which is given by Fe (S) + Fe (T ) ≥ Fe (S ∪ T ) + Fe (S ∩ T ) for every S, T ⊆ V . Indeed, this construction can be applied to any submodular transformation F : 2V → RE + , that is, each function Fe : S 7→ F (S)(e) is non-negative submodular, and corresponding Cheeger’s inequality was obtained when F (∅) = F (V ) = 0 (Yoshida, 2017). In what follows, we always assume that a submodular transformation is normalized, that is, F (∅) = 0, and F (V ) = 0 to avoid technical triviality. Submodular Laplacian Systems. Because solving Laplacian systems based on undirected graphs have numerous applications, it is natural to consider solving Laplacian systems for general submodular transformations, which are referred to as submodular Laplacian systems. It should be noted that V the Laplacian operator LF : RV → 2R associated with a submodular transformation F : 2V → RE + is multi-valued, and therefore, the question here is computing x ∈ RV such that LF (x) ∋ b for a given vector b ∈ RV . As the first contribution of our study, we show the tractability of submodular Laplacian systems: V Theorem 1 Let F : 2V → RE + be a submodular transformation and b ∈ R be a vector. Then, we V can compute x ∈ R LF (x) ∋ b in polynomial time, if it exists. Because the algorithm used in Theorem 1 is based on the ellipsoid method, the time complexity is large albeit polynomial. Later, in Section 3.2, we will discuss more efficient algorithms when F is given by a directed graph or hypergraph. In some special cases of the abovementioned problem, a direct interpretation is possible, which is discussed in the following lines. Suppose F : 2V → RE + is constructed from a directed graph G = (V, E). Then, we regard each arc uv ∈ E as an ideal diode of 1Ω, that is, if the electric potential of u is higher than or equal to that of v, then each arc represents a resistance of 1Ω, and otherwise, no current flows through it. Then, the solution x for this directed graph provides the electric potential at the vertices when a current of b(v)A flows through each v ∈ V . For 1. Precisely speaking, several Laplacian matrices have been proposed for directed graphs (Chung, 2007; Li and Zhang, 2012; Zhou et al., 2005); however, these Laplacians are well-defined only for strongly connected directed graphs. 2 P OLYNOMIAL -T IME A LGORITHMS FOR S UBMODULAR L APLACIAN S YSTEMS hypergraphs, a hyperedge acts as a circuit element in which current flows from a vertex of the highest potential to that of the lowest. Solving Laplacian systems for undirected graphs has been intensively studied. The first nearlylinear-time algorithm was achieved by Spielman and Teng (2014), and the current fastest algorithm e e hides a polylogarithmic factor. In runs in O(|E| log 1/2 |V |) time (Cohen et al., 2014), where O(·) contrast, to the best of our knowledge, there is no prior study on solving Laplacian systems for directed graphs and hypergraphs. Submodular Laplacian Regression. When the given submodular Laplacian system LF (x) ∋ b does not admit a solution, we may want to find b′ ∈ RV close to b such that LF (x) ∋ b′ has a solution; this serves as motivation for the following submodular Laplacian regression problem: min kpk22 p∈RV subject to LF (x) ∋ b + p for some x ∈ RV . It should be noted that once we have solved this problem, we can obtain x ∈ RV with LF (x) ∋ b+p in polynomial time by applying Theorem 1. The second contribution of this study is the following: Theorem 2 We can solve the submodular Laplacian regression problem in polynomial time. 1.1 Applications In this section, we discuss potential applications of our results in machine learning and network analysis. Semi-supervised Learning Semi-supervised learning is a framework for predicting unknown labels of unlabeled data based on both labeled and unlabeled instances. In the case of supervised learning, we utilize only labeled instances to predict the labels of unlabeled instances. However, in many realistic scenarios, only a few of labeled instances are available compared with a large number of unlabeled instances; in such cases, the unlabeled instances also need to be effectively utilized to predict the unknown labels. This type of learning is referred to as semi-supervised learning. Formally, the problem of semi-supervised learning can be stated follows: The given dataset V is partitioned into a set T of labeled instances and set U of unlabeled instances. Each labeled instance v ∈ T has its label x̃(v) ∈ {−1, +1}. The aim of this problem is to predict the labels x(v) of unlabeled instances v ∈ U . A standard approach to semi-supervised learning is using Laplacians associated with undirected graphs. In this method, first, the training dataset is transformed into a similarity graph G = (V, E, w), where w : E → R is a weight function; then, the labels of unlabeled instances are predicted using the Laplacian matrix LG ∈ RV ×V for the constructed similarity graph. In particular, a similarity graph represents pairwise representations among labeled and unlabeled instances. Another well known approach proposed by Zhu et al. (2003) involves solving the Laplacian system LG x = b under the constraints that b(v) = 0 for all v ∈ U and x(v) = x̃(v) for all v ∈ T . Since its introduction, many variants of this approach have been proposed based on Laplacians for undirected graphs, which have applied to various applications. Using submodular Laplacian systems, we can extend previous semi-supervised learning algorithms to more general similarity expressions, such as directed graphs and hypergraphs. An arc represents that the tail vertex is closer to +1 than the head vertex. A hyperedge represents that all 3 F UJII , S OMA , AND YOSHIDA incident vertices have similar labels. Furthermore, we can express more complicated relationships with general submodular functions. To develop a general framework for semi-supervised learning, we extend Theorem 1 by imposing constraints x(v) = x̃(v) (v ∈ T ) and b(v) = b̃(v) (v ∈ U ), where x̃ ∈ RT and b̃ ∈ RU are provided as a part of the input. It should be noted that the semi-supervised setting is a special case of this problem for which b̃ is the zero vector. Then, we show the following: Theorem 3 Let F : 2V → RE + be a submodular transformation and suppose V is partitioned into disjoint subsets T ⊆ V and U ⊆ V . Let x̃ ∈ RT and b̃ ∈ RU be vectors. Then, we can compute x ∈ RV that satisfies LF (x) ∋ b, x(v) = x̃(v) for all v ∈ T and b(v) = b̃(v) for all v ∈ U in polynomial time if it exists. Network Analysis A typical task in network analysis is measuring the importance, or centrality, of vertices and edges. There are many centrality notions depending on applications, and for undirected graphs, some notions are defined using Laplacians matrices. Before describing these centrality notions, we require some definitions. Let G = (V, E) be an undirected graph, and for each v ∈ V , let ev ∈ RV be the vector with ev (v) = 1 and ev (w) = 0 for w ∈ V \ {v}. Then, for vertices u, v ∈ V , the quantity RG (u, v) := (eu − ev )⊤ L+ G (eu − ev ) ∈ R+ V ×V is the pseudo-inverse of the ∈ R is called the effective resistance from u to v, where L+ G Laplacian LG ∈ RV ×V . The effective resistance can be considered as the resistance of the circuit associated with G when a current is passed from u to v. In (Hayashi et al., 2016; Mavroforakis et al., 2015), the effective resistance RG (u, v) of an edge uv ∈ E is directly used as the centrality of an edge, and is referred to as the spanning tree centrality, because it is known to be equal to the probability that the edge is used when sampling a spanning tree uniformly at random. Brandes and Fleischer (2005) introduced the current flow closeness centrality of a vertex, which is defined as n . τC (v) = P u∈V :u6=v RG (u, v) This notion implicitly assumes that the effective resistance satisfies the triangle inequality, that is, RG (u, v) + RG (v, w) ≥ RG (u, w) for every u, v, w ∈ V and hence can be seen as a (quasi-)metric. Then, we regard a vertex as important when it is close to every other vertex; in other words, it is in the center of the network. Newman (2005) introduced the notion of the current flow betweenness centrality of a vertex, which is defined as X 1 τst (v), τB (v) = (|V | − 1)(|V | − 2) s,t∈V :v6=s6=t6=v P where τst (v) = w:vw∈E |x(v) − x(w)| for x = L+ G (es − et ). In words, τst (v) is the total current passing through the edges incident to v when a current of 1A flows from s to t. Intuitively, we regard a vertex as important when a large fraction of the current passes through it. It is natural to inquire whether these notions can be extended to directed graphs, hypergraphs, or general submodular transformations. Using Theorem 1, we can define the effective resistance V RF (u, v) for u, v ∈ V in terms of the Laplacian LF : RV → 2R associated with a submodular transformation F : 2V → RE + . That is, we define RF (u, v) := (eu − ev )⊤ L+ F (eu − ev ), 4 P OLYNOMIAL -T IME A LGORITHMS FOR S UBMODULAR L APLACIAN S YSTEMS V V where L+ F (eu − ev ) ∈ R is the vector x ∈ R obtained by applying Theorem 1 with b = eu − ev . When there is no solution, we define RF (u, v) = ∞. The formal definition is deferred to Section B. For directed graphs and hypergraphs, as in the case of undirected graphs, the effective resistance RF (u, v) can be seen as the resistance of the circuit associated with the graph when a current is passed from u to v. Note that RF (u, v) may not be equal to RF (v, u) for directed graphs. Further, we can generalize centrality notions mentioned above to general submodular transformations. As mentioned earlier, the implicit assumption when defining current flow closeness centrality is of the triangle inequality of effective resistance. Here, we show that it also holds for general submodular transformations: Theorem 4 Let F : 2V → RE + be a submodular transformation. Then, effective resistance RF (u, v) satisfies triangle inequality. 1.2 Organization The notions used in this paper are reviewed in Section 2. Then, we prove Theorems 1 and 2 in Sections 3 and 4, respectively. Due to space limitations, the proofs of Theorems 3 and 4 are deferred to Sections A and B, respectively. 2. Preliminaries V For a positive integer n ∈ N, the P set {1, . . . , n} is denoted by [n]. For a vector x ∈ R and a set S ⊆ V , x(S) denotes the sum v∈S x(v). 2.1 Distributive lattice and the Birkoff representation theorem A subset S in a poset (X, ) is called a lower ideal if S is down-closed with respect to the partial order . The Birkoff representation theorem (Birkhoff, 1937; Fujishige, 2005) states that for any distributive lattice D ⊆ 2V with ∅, V ∈ D, there uniquely exists a poset P on a partition Π(V ) of V and a partial order  such that S ∈ D if and only if S is a lower ideal in P . The poset P can be constructed as follows. Let us define an equivalence relation ∼ on V as i ∼ j if any S ∈ D contains either both, i and j, or none. Let Π(V ) be the set of equivalence classes induced by ∼. Then, a partial order  on Π(V ) is defined as [i]  [j], where [i] and [j] are equivalence classes containing i and j, respectively, if any set S ∈ D containing j also contains i. It can be confirmed that  is a well-defined partial order. Then, P = (Π(V ), ) is the desired poset. Using the Hasse diagram of P , one can maintain the poset P in a digraph with n vertices and m arcs. We refer to such a digraph as the Birkoff representation of D. Since n = O(|V |) and m = O(n2 ), the Birkoff representation is a compact representation of a distributive lattice, even if D contains exponentially many subsets. Furthermore, if D is the set of minimizers of a submodular function, one can construct the Birkoff representation in strongly polynomial time using submodular function minimization algorithms (see Fujishige (2005)). 2.2 Submodular functions Let D ⊆ 2V be a distributive lattice. A function F : D → R is called submodular if F (S) + F (T ) ≥ F (S ∪ T ) + F (S ∩ T ) 5 F UJII , S OMA , AND YOSHIDA for every S, T ∈ D. For a submodular function F : D → R, the submodular polyhedron PD (f ) and base polyhedron BD (F ) associated with F are defined as PD (F ) = {x ∈ RV : x(S) ≤ F (S) (S ∈ D)} BD (F ) = {x ∈ PD (F ) : x(E) = F (V )}, respectively. We omit the subscripts D when it is clear from the context. For a submodular function F : D → R, its Lovász extension f : RV → R is defined as f (x) = max hx, wi, w∈BD (F ) where h·, ·i is the inner product. We note that f is an extension considering f (1S ) = F (S) for every S ∈ D, where 1S ∈ RV is a vector with 1S (i) = 1 if i ∈ S and 1S (i) = 0 otherwise. Moreover, f is convex and positively homogeneous, that is, f (αx) = αf (x) for every α ≥ 0. It is known that the subdifferential of f at x is argmaxw∈BD (F ) hx, wi, and this is denoted by ∂f (x). 2.3 Submodular Laplacians A transformation F : 2V → RE + is called submodular if each function Fe : S 7→ F (S)(e) is submodular. We now formally introduce the Laplacian operator associated with a submodular transformation: Definition 5 (Submodular Laplacian operator (Yoshida, 2017)) Let F : 2V → RE + be a submodV V R ular transformation. Then, the Laplacian LF : R → 2 of F is defined as o o n nX Y ∂fe (x) , we hwe , xi : we ∈ ∂fe (x) (e ∈ E) = W W ⊤ x : W ∈ LF (x) = e∈E e∈E where fe : RV → R is the Lovász extension of Fe for each e ∈ E. P Here, we have hx, yi = e∈E fe (x)2 for any y ∈ LF (x), and hence we can write x⊤ LF (x) to denote this quantity. As a descriptive example, consider an undirected graph G = (V, E) and the associated submodular transformation F : 2V → RE + . Then, for every edge e = uv ∈ E we have   {eu − ev } ∂fe (x) = {ev − eu }   αeu − αev : α ∈ [−1, 1] if x(u) > x(v), if x(u) < x(v), if x(u) = x(v).  P We can confirm that LF (x)(v) = w:vw∈E x(v)−x(w) = LG (x)(v) for every v ∈ V , where LG is the standard Laplacian matrix associated with G. Refer to (Yoshida, 2017) for further examples. 2.4 Convex optimization We use the following basic results from convex optimization. 6 P OLYNOMIAL -T IME A LGORITHMS FOR S UBMODULAR L APLACIAN S YSTEMS Theorem 6 (Rockafellar (1996, Corollary 28.3.1)) Let f, g1 , . . . , gm : Rn → R be proper convex functions. Consider the optimization problem min f (x) subject to x∈Rn gi (x) ≤ 0. (i = 1, . . . , m) Assume that the optimal value is finite and the Slater condition is satisfied. Then, a feasible solution x is optimal if and only if there exists a Lagrange multiplier ϕ ∈ Rm + such that (x, ϕ) is a saddle point of the Lagrangian X P (x, ϕ) := f (x) + ϕ(i)gi (x). i∈[m] Equivalently, x is optimal if and only if there exists ϕ ∈ Rm + satisfying the Karush-Kuhn-Tucker (KKT) condition together with x. 3. Solving Submodular Laplacian Systems In this section, we prove Theorem 1. Throughout this section, we fix a submodular transformation V F : RV → RE + and a vector b ∈ R . We describe a general method based on the ellipsoid method in Section 3.1. Then, in Section 3.2, we discuss a more efficient algorithm when F : 2V → RE + is given by a directed graph or hypergraph. 3.1 General case Let fe : RV → R (e ∈ E) be the Lovász extension of Fe . We consider the following optimization problem: min x∈RV ,η∈RE 1 kηk22 − hb, xi 2 subject to fe (x) ≤ η(e) (e ∈ E). (1) P This problem is equivalent to minimizing 12 e∈E fe (x)2 − hb, xi = 12 x⊤ LF (x) − hb, xi, which is continuously differentiable and convex. Then, we can directly show that the minimizer x∗ of the latter problem satisfies LF (x) ∋ b from the first order condition. By considering (1), however, we can exploit the combinatorial structure of the problem to obtain a more efficient algorithm. Introducing the Lagrange multiplier ϕ ≥ 0, we can obtain the corresponding Lagrangian as X 1 ϕ(e)(fe (x) − η(e)) P (x, η, ϕ) = kηk22 − hb, xi + 2 e∈E " # X 1 ϕ(e)fe (x) . = kηk22 − hϕ, ηi − hb, xi − 2 (2) e∈E Thus, " # X 1 1 min P (x, η, ϕ) = − kϕk22 − max hb, xi − ϕ(e)fe (x) = − kϕk22 − x,η x 2 2 e∈E 7 X e∈E ϕ(e)fe !∗ (b), F UJII , S OMA , AND YOSHIDA where (·)∗ is the P Fenchel conjugate. Since Lovász extensions are positively homogeneous, we ∗ can confirm that ϕ(e)f (b) is equal to either infinity or zero. Thus, we obtain the dual e e∈E problem: !∗ X 1 2 (3) ϕ(e)fe (b) ≤ 0. min kϕk2 subject to ϕ≥0 2 e∈E The constraint can be checked with submodular function minimization. To see this, we observe the following: Lemma 7 We have X ϕ(e)fe e∈E !∗ (b) = sup x∈RV " hb, xi − X # ϕ(e)fe (x) ≤ 0 e∈E if and only if max x∈[0,1]V " hb, xi − X # " ϕ(e)fe (x) = max b(X) − e∈E X⊆V X e∈E # ϕ(e)Fe (X) ≤ 0. Proof (⇒) Trivial. P (⇐) Suppose there is x ∈ RV such that hb, xi − e∈E ϕ(e)fe (x) > 0. By the assumption that F (V ) = 0, we have f (x) = f (x + α1) for any α ∈ R, where 1 ∈ RV is the all-one vector. This holds because fe (x + α1) = maxw∈B(Fe ) hw, x + α1i = maxw∈B(Fe ) hw, xi = fe (x), where we used the fact that hw, 1i = 0 holds for any w ∈ B(Fe ) as Fe (V ) = 0. Now, by adding α1 to x for a large α ∈ R, we can assume x(v) ≥ 0 for every v ∈ V . Moreover, x 6= 0 because f (0) = 0. Since the Lovász extension f is positively homogeneous, for x′ = x/kxk∞ ∈ [0, 1]V , we have f (x′ ) = f (x/kxk∞ ) = f (x)/kxk∞ > 0. By Lemma 7, we obtain the following dual problem: 1 min kϕk22 ϕ≥0 2 subject to X ϕ(e)Fe (X) − b(X) ≥ 0 (X ⊆ V ). (4) e∈E A separation oracle for the constraint can be implemented by submodular function minimization. Therefore, we can use the ellipsoid method to solve (4). Theorem 8 The following hold: (1) (1) is feasible if and only if (4) is bounded. (2) A strong duality holds between (1) and (4), that is, the optimal values of (1) and (4) coincide. (3) We can solve (1) in polynomial time. (4) The optimal solution (x∗ , η ∗ ) for (1) satisfies LF (x∗ ) ∋ b. 8 P OLYNOMIAL -T IME A LGORITHMS FOR S UBMODULAR L APLACIAN S YSTEMS Proof (1) Standard. (2) It is clear that (1) satisfies Slater’s condition and hence the claim holds. (3) Since we can compute the subgradient of fe at a given point x, we have a separation oracle for (1). Thus the ellipsoid method solves (1). (4) Let (x∗ , η ∗ ) be an optimal solution of (1). Based on Theorem 6, there exists ϕ∗ ≥ 0 such ∗ ∗ that (x∗ , η ∗ , ϕ∗ ) is a saddle point of the Lagrangian P . Since ∂P ∂η = η − ϕ, we have ϕ = η using ∗ ∗ ∗ the saddle condition. By complementary slackness, if ϕ (e) > 0, we have fe (x ) = η (e) for any e ∈ E. If ϕ∗ (e) = 0, we have fe (x∗ ) ≤ 0, and since fe (x∗ ) ≥ 0, we obtain fe (x∗ ) = η ∗ (e) for e ∈ E. Thus, we conclude that ϕ∗ (e) = fe (x∗ ) for e ∈ E. Finally, by the saddle condition for x∗ , we must have X X ϕ∗ (e)∂fe (x∗ ) = fe (x∗ )∂fe (x∗ ) ∋ b, which implies b ∈ LF e∈E ∗ (x ). e∈E 3.2 Flow-like formulation for directed graphs and hypergraphs If each submodular function Fe : 2V → R+ is of constant arity, we can use a different formulation. First, we enumerate all extreme points of the base polytope B(Fe ) for each Fe . Let Ve be the set of extreme points of B(Fe ) (e ∈ E). The constraint fe (x) ≤ η(e) in (1) is equivalent to hw, xi ≤ η(e) for all extreme points w ∈ Ve . Therefore, (1) is equivalent to min x∈RV ,η∈RE 1 kηk22 − hb, xi 2 subject to hw, xi ≤ η(e) (w ∈ Ve , e ∈ E) (5) For each extreme point w ∈ Ve , we introduce a “flow” variable ϕ(e, w). By a calculation similar to that in Section 3.1, we can obtain the following dual problem: !2 X X 1X X ϕ(e, w)w = b. (6) subject to ϕ(e, w) min ϕ≥0 2 e∈E w∈Ve e∈E w∈Ve P P Then, the constraint e∈E w∈Ve ϕ(e, w)w = b can be interpreted as a “flow boundary constraint”, as illustrated in the following examples. Example 1 (Cut functions of directed graphs) Let G = (V, E) be a directed graph and Fe : 2V → R+ (e ∈ E) be the cut function associated with e. The extreme points of B(Fe ) for e = uv are 0 and eu − ev . Since the value of ϕ(e, 0) does not interact with the constraint, Pwe can assume that ϕ(e, 0) = 0. Then, the constraint is the ordinary flow boundary constraint: uv∈E ϕ(uv) − P ϕ(vu) = b(u) (u ∈ V ), where we denote ϕ(uv, e − e ) by ϕ(uv). Now (6) is equivalent v u vu∈E 4 to the quadratic cost flow problem, which can be solved in O(|E| log |E|) time (Végh, 2012). Example 2 (Cut functions of hypergraphs) Let G = (V, E) be a hypergraph and Fe : 2V → R+ (e ∈ E) be the cut function associated with e. The extreme points of B(Fe ) are in the form of eu − ev (u, v ∈ e, u 6= v). The value of ϕ(e, eu − ev ) can be interpreted as a “flow” from v to u through a hyperedge e. Indeed, we can construct the equivalent (ordinary) flow network G′ as follows. The vertex set of G′ is V , and for each distinct u, v ∈ e, an arc uv in G′ is drawn. Then, any flow ϕ′ in G′ with the boundary b, which can be computed via minimizing a quadratic function under a flow constraint, corresponds to the original variable ϕ in (6). 9 F UJII , S OMA , AND YOSHIDA 4. Submodular Laplacian Regression In this section, we prove Theorem 2. First, we explain when a submodular Laplacian system, or equivalently (4), is feasible. Let V F : 2V → RE + be a submodular transformation and b ∈ R be a vector. Then, we can observe that (4) is feasible if and only if there exists no S ⊆ V such that Fe (S) = 0 for every e ∈ E and b(S) > 0, or equivalently, Fe (S) = 0 for every e ∈ E implies b(S) ≤ 0. We define ker(F ) := {S ⊆ V : Fe (S) = 0 (e ∈ E)}, which is the set of S ⊆ V that minimizes all Fe (e ∈ E). Then, the regression problem reduces to the following optimization problem. min kpk22 p∈RV subject to (b + p)(S) ≤ 0 (S ∈ ker(F )) (7) Since the minimizers of each Fe form a distributive lattice, ker(F ) is also a distributive lattice. Hence, (7) can be considered as the minimum norm point problem in PD (−b), where D = ker F . To handle (7) efficiently, we use the Birkoff representation of ker(F )P because it has a polynomial size. To this end, note that ker(F ) is the lattice of minimizers of e∈E Fe , since each Fe is nonnegative. Then, P the Birkoff representation can be efficiently constructed from the minimum norm point of B( e Fe ). Refer to (Fujishige, 2005, Section 7.1 (a)) for further details. The minimum norm point problem (7) is slightly different from the one used for submodular function minimization considering that (i) the target polytope is a submodular polyhedron PD (−b) rather than a base polyhedron BD (−b), and (ii) the lattice D is not a Boolean lattice 2V but a distributive lattice on V . In the following subsection, we present two algorithms for solving this problem. The first one is the standard Frank-Wolfe iterative algorithm (Section 4.1), while the other is a combinatorial algorithm (Section 4.2). 4.1 Frank-Wolfe algorithm Given the Birkoff representation of D = ker F as a directed graph with n vertices and m arcs, we can optimize linear functions over the polyhedron PD (−b) in O(m + n log n) time using the greedy algorithm. This fact suggests to use the Frank-Wolfe algorithm (Jaggi, 2013) to solve (7). To this end, we restrict ourselves to a compact region C := PD (−b) ∩ {x ∈ RV : x ≥ −b}. Based on the analysis of the Frank-Wolfe algorithm in Jaggi (2013), we need to bound the squared Euclidean diameter of C. Trivially, |V | · k−bk22 is an upper bound. We obtain the following convergence rate: Theorem 9 Let pk ∈ C be a sequence generated by the Frank-Wolfe algorithm for (7) (k = 4|V |·kbk2 0, 1, . . . ) and p∗ be the optimal solution. Then, kpk k22 − kp∗ k22 ≤ k+1 2 . Each iteration of the Frank-Wolfe algorithm takes O(m + n log n) time. Theorem 9 is unsatisfactory because we cannot guarantee LF (x) ∋ b + pk has a solution for any k. The algorithm discussed in the next subsection resolves this issue. 4.2 Combinatorial algorithm In this section, we present a combinatorial algorithm for the minimum norm point problem (7). First, we show that this problem can be reduced to parametrized submodular minimization. Although we only need to consider a modular function H : 2V → R, that is, S 7→ −b(S), to solve (7), we aim to 10 P OLYNOMIAL -T IME A LGORITHMS FOR S UBMODULAR L APLACIAN S YSTEMS describe it in the most general case. Formally, we need to solve the following: 1 − kwk22 . 2 max w∈PD (H) (8) Since PD (H) is down-closed, the optimal solution must be a nonpositive vector. Therefore, we consider the following problem: min x∈RV + 1 h(x) + kxk22 , 2 (9) where h : RV → R is the Lovász extension of H. Lemma 10 The problems (8) and (9) are strong dual to each other. Furthermore, if w ∗ is the optimal solution of (8), then x∗ := −w ∗ is the optimal solution for (9), and vice versa. Proof Using the Fenchel strong duality, we have     1 1 ⊤ 2 2 w x + kxk2 min h(x) + kxk2 = min max 2 2 w∈BD (H) x∈RV x∈RV + +   1 ⊤ 2 w x + kxk2 = min max 2 w∈PD (H) x∈RV +   1 2 ⊤ = max min w x + kxk2 2 w∈PD (H) x∈RV + = (since x ∈ RV+ ) (by the Fenchel strong duality) 1 − kwk22 . w∈PD (H),w≤0 2 max The second assertion can be checked by direct calculation. Therefore we focus on (9). In what follows, we will show that an optimal solution to (9) can be constructed by solving parametrized submodular minimization: min S∈D H(S) + α|S|, (10) where α ∈ R is a parameter. Let Aα be an optimal solution to (10). Lemma 11 (Bach (2010, Proposition 8.2)) If α < β, then Aβ ⊆ Aα . For a vector x ∈ RV and a scalar α ∈ R, we write {x ≥ α} (resp., {x > α}) to denote the set {v ∈ V | x(v) ≥ α} (resp., {v ∈ V | x(v) > α}). Lemma 12 If h(x) < +∞, then {x ≥ α} ∈ D for any α ∈ R. Proof Here, we prove the contrapositive. Suppose that {x ≥ α} 6∈ D for some α ∈ R; this indicates that there exist u, v ∈ V such that u  v and x(u) < x(v). Let us take an arbitrary w ∗ ∈ B(H) and consider w ∗ + t(ev − eu ), where t > 0. Then, since u  v, any S ∈ D containing v must also contain u. Thus w ∗ + t(ev − eu ) ∈ B(H). Since x(u) < x(v), hx, w ∗ + t(ev − eu )i attains infinity as t → +∞, that is, h(x) = +∞. 11 F UJII , S OMA , AND YOSHIDA  Lemma 13 Define z ∈ RV+ as z(v) := max sup{α : v ∈ Aα }, 0 (v ∈ V ). Then z is a minimizer of (9). Proof We can check that {z > α} ⊆ Aα ⊆ {z ≥ α} for α ≥ 0 using the definition of z and Lemma 11. Therefore, Aα = {z ≥ α} almost everywhere. Let x ∈ RV+ be a feasible solution such that h(x) < +∞. Then for any α ∈ R, {x ≥ α} ∈ D holds through Lemma 12. Furthermore, we have Z ∞ X Z z(v) 1 2 αdα H({z ≥ α})dα + h(z) + kzk2 = 2 0 v∈V 0 # Z ∞" X H({z ≥ α})dα + α1α≥z(v) dα = 0 ≤ Z 0 ∞ " v∈V H({x ≥ α})dα + X v∈V 1 = h(x) + kxk22 , 2 # α1α≥x(v) dα where the inequality follows since the integrand is equal to H(Aα ) + α|Aα | almost everywhere. P Now, we consider the following modular case: H(S)P= − i∈S b(i). Considering the abovementioned arguments, we only need to solve minS∈D i∈S (α − b(i)) for all α ∈ R. Using the approach used in Picard and Queyranne (1982), we define the following directed graph. Let G′ = (U, A) be the digraph corresponding to the Birkoff representation of D. Then, define a directed graph G = (U ∪ {s, t}, A ∪ Ā), where Ā := {su : u ∈ U } ∪ {ut : u ∈ U }. In addition, define a capacity function c on ∈ A ∪ Ā as  if a ∈ A,  +∞ (11) c(a) := min{−α + b(u), 0} if a = su,   min{α − b(u), 0} if a = ut. Then, the minimum st-cuts in G provide the desired minimizers. Refer to Figure 1 for an illustrative example. Furthermore, the capacity function c satisfies the so-called GGT structure (Gallo et al., 1989)2 ; the capacities of arcs from source s are nonincreasing, whereas the capacities of arcs to sink t are nondecreasing, while the others are constant. For such a capacity function, all the values of α 2 at which the value of minimum st-cuts change can be computed in O(nm2 log nm ) time using a parametric flow algorithm (Gallo et al., 1989), where n and m are the number of vertices and arcs in G, respectively. Theorem 14 Assume that the Birkoff representation of D is given as a directed graph with n vertices and m arcs. Then, there exists a strongly polynomial time algorithm for (7) with time com2 plexity O(nm2 log nm ). 2. The original GGT structure assumes that the capacities of arcs from source s are nondecreasing, whereas the capacities of arcs to sink t are nonincreasing, while the others are constant. We can transform our capacity function to this setting by replacing α with −α. 12 P OLYNOMIAL -T IME A LGORITHMS FOR S UBMODULAR L APLACIAN S YSTEMS −α + b(3) S ∪ {s} s −α + b(12) 12 12 3 +∞ +∞ 3 4 α − b(4) t 4 (b) The directed graph G and its minimum st-cut S∪{s}. The arcs with zero capacity are ommited. (a) The Birkoff representation of D. Figure 1: This figure illustrates the method used to solve minS∈D st-cut for D = {∅, {4}, {3, 4}, {1, 2, 4}, {1, 2, 3, 4}}. P i∈S (α − b(i)) using minimum Theorem 2 is immediate from the above theorem and the fact that we can construct the Birkoff representation of ker(F ) in polynomial time as previously discussed. References Noga Alon. Eigenvalues and expanders. Combinatorica, 6(2):83–96, 1986. Noga Alon and V D Milman. λ1 , isoperimetric inequalities for graphs, and superconcentrators. Journal of Combinatorial Theory, Series B, 38(1):73–88, 1985. Francis Bach. Convex analysis and optimization with submodular functions: a tutorial. arXiv preprint arXiv:1010.4207, 2010. Garrett Birkhoff. Rings of sets. Duke Math. J., 3(3):443–454, 09 1937. Ulrik Brandes and Daniel Fleischer. Centrality measures based on current flow. In Proceedings of the 22nd Annual Symposium on Theoretical Aspects of Computer Science (STACS), pages 533– 544, 2005. Fan Chung. Spectral Graph Theory. CBMS Regional Conference Series. American Mathematical Society, 1997. Fan Chung. Random walks and local cuts in graphs. Linear Algebra and its Applications, 423(1): 22–32, 2007. Michael B Cohen, Rasmus Kyng, Gary L Miller, Jakub W Pachocki, Richard Peng, Anup B Rao, and Shen Chen Xu. Solving SDD linear systems in nearly m log1/2 n time. In Proceedings of the 46th Annual ACM Symposium on Theory of Computing (STOC), pages 343–352, 2014. Michael B Cohen, Jonathan Kelner, John Peebles, Richard Peng, Aaron Sidford, and Adrian Vladu. Faster algorithms for computing the stationary distribution, simulating random walks, 13 F UJII , S OMA , AND YOSHIDA and more. In Proceedings of the 57th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 583–592, 2016. Samuel I Daitch and Daniel A Spielman. Faster approximate lossy generalized flow via interior point algorithms. In Proceedings of the 40th annual ACM Symposium on Theory of Computing (STOC), pages 451–460, 2008. Satoru Fujishige. Submodular Functions and Optimization. Elsevier, 2nd edition, 2005. G. Gallo, M. D. Grigoriadis, and R. E. Tarjan. A fast parametric maximum flow algorithm and applications. SIAM J. Comput., 18(1):30–55, 1989. Takanori Hayashi, Takuya Akiba, and Yuichi Yoshida. Efficient algorithms for spanning tree centrality. In Proceedings of the 25th International Joint Conference on Artificial Intelligence (IJCAI), pages 3733–3739, 2016. Martin Jaggi. Revisiting Frank-Wolfe: Projection-free sparse convex optimization. In Sanjoy Dasgupta and David McAllester, editors, Proceedings of the 30th International Conference on Machine Learning, volume 28 of Proceedings of Machine Learning Research, pages 427–435. PMLR, 2013. Thorsten Joachims. Transductive learning via spectral graph partitioning. In Proceedings of the 20th Annual International Conference on Machine Learning (ICML), pages 290–297, 2003. Jonathan A Kelner and Aleksander Madry. Faster generation of random spanning trees. In Proceedings of the 50th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 13–21, 2009. Yanhua Li and Zhi-Li Zhang. Digraph Laplacian and the degree of asymmetry. Internet Mathematics, 8(4):381–401, 2012. Anand Louis. Hypergraph markov operators, eigenvalues and approximation algorithms. In Proceedings of the 47th Annual ACM on Symposium on Theory of Computing (STOC), pages 713– 722, 2015. Charalampos Mavroforakis, Richard Garcia-Lebron, Ioannis Koutis, and Evimaria Terzi. Spanning edge centrality: Large-scale computation and applications. In Proceedings of the 24th International Conference on World Wide Web (WWW), pages 732–742, 2015. Mark E J Newman. A measure of betweenness centrality based on random walks. Social Networks, 27(1):39–54, 2005. Jean-Claude Picard and Maurice Queyranne. Selected applications of minimum cuts in networks. INFOR: Information Systems and Operational Research, 20(4):394–422, 1982. R. Tyrrell Rockafellar. Convex Analysis. Princeton University Press, 1996. Daniel A Spielman and Nikhil Srivastava. Graph sparsification by effective resistances. SIAM Journal on Computing, 40(6):1913–1926, 2011. 14 P OLYNOMIAL -T IME A LGORITHMS FOR S UBMODULAR L APLACIAN S YSTEMS Daniel A Spielman and Shang-Hua Teng. Nearly linear time algorithms for preconditioning and solving symmetric, diagonally dominant linear systems. SIAM Journal on Matrix Analysis and Applications, 35(3):835–885, 2014. László A Végh. Strongly polynomial algorithm for a class of minimum-cost flow problems with separable convex objectives. In Proceedings of the 44th Annual ACM Symposium on Theory of Computing (STOC), pages 27–40, 2012. Nisheeth K Vishnoi. Lx = b. Foundations and Trends R in Theoretical Computer Science, 8(1–2): 1–141, 2013. Yuichi Yoshida. Nonlinear laplacian for digraphs and its applications to network analysis. In Proceedings of the 9th ACM International Conference on Web Search and Data Mining (WSDM), pages 483–492, 2016. Yuichi Yoshida. Cheeger inequalities for submodular transformations. CoRR, abs/1708.08781, 2017. URL http://arxiv.org/abs/1708.08781. Dengyong Zhou, Olivier Bousquet, Thomas Navin Lal, Jason Weston, and Bernhard Schölkopf. Learning with local and global consistency. In Proceedings of the 16th Annual Conference on Neural Information Processing Systems (NIPS), pages 321–328, 2003. Dengyong Zhou, Jiayuan Huang, and Bernhard Schölkopf. Learning from labeled and unlabeled data on a directed graph. In Proceedings of the 22th Annual International Conference on Machine Learning (ICML), pages 1036–1043, 2005. Xiaojin Zhu, Zoubin Ghahramani, and John D Lafferty. Semi-supervised learning using gaussian fields and harmonic functions. In Proceedings of the 20th Annual International Conference on Machine Learning (ICML), pages 912–919, 2003. Appendix A. Semi-supervised Learning In this section, we prove Theorem 3. We consider the problem of solving b ∈ LF (x) under constraints that x(v) = x̃(v) for all v ∈ T and b(v) = b̃(v) for all v ∈ U . To find such x and b, we consider the following optimization problem. min x∈RV ,η∈RE subject to X 1 b̃(v)x(v) kηk2 − 2 v∈U x(v) = x̃(v) fe (x) ≤ η(e) (v ∈ T ) (e ∈ E) (12) The following theorem shows that (12) can be solved in polynomial time, and an obtained optimal solution x satisfies b ∈ LF (x). Theorem 15 There is a polynomial time algorithm that solves (12). In addition, for an optimal solution (x∗ , η ∗ ) to (12), x∗ (v) = x̃(v) holds for each v ∈ T , and there exists some b ∈ L(x∗ ) such that b(v) = b̃(v) holds for each v ∈ U . 15 F UJII , S OMA , AND YOSHIDA Proof (12) is equivalent to the following problem: X 1X b̃(v)x(v) fe (x)2 − 2 min x∈RV e∈E (13) v∈U subject to x(v) = x̃(v) (v ∈ T ) This problem can be viewed as an unconstraint convex programming with variables (x(v))v∈U . As we can compute the subdifferential of this objective function, we can solve (12) with the ellipsoid method in polynomial time. Let (x∗ , η ∗ ) be an optimal solution. Since x∗ is a solution to (12), x∗ (v) = x̃(v) holds for each v ∈P T . From the first-order optimality condition, there exists we ∈ ∂fe (x∗ ) for each e ∈ E such that e∈E we (v)fe (x∗ ) − b̃(v) = 0 for all v ∈ U . It follows that b ∈ LG (x∗ ) for some b such that b(v) = b̃(v). To derive more efficient algorithms for special cases such as directed graphs and hypergraphs, we introduce a flow-like formulation, which is an extension of (5) and (6). Let Ve be the set of extreme points of B(Fe ) for each e ∈ E. Then, the original primal problem (12) is equivalent to: X 1 b̃(v)x(v) kηk2 − 2 v∈U X X w(v)x(v) + w(v)x̃(v) ≤ η(e) (w ∈ Ve , e ∈ E) min x∈RV ,η∈RE subject to v∈U (14) v∈T with regarding (x(v))v∈U as variables. The dual problem is min ϕ≥0 subject to 1X 2 e∈E X X w∈Ve !2 ϕ(e, w) − X e∈E,w∈Ve ϕ(e, w)w(v) = b̃(v) ϕ(e, w) X v∈T ! w(v)x̃(v) (15) (v ∈ U ). e∈E,w∈Ve The first constraint can be interpreted as a flow boundary constraint on v ∈ U . In the cases of constant arity submodular transformations, including directed graphs and hypergraphs, the number of variables (ϕ(e, w))e∈E,w∈Ve in the dual problem is bounded by a polynomial in |V |. As discussed in Section 3.2, if F is given by a directed graph or a hypergraph, this dual problem can be reduced to the quadratic cost flow problem, which can be solved in O(|E|4 log |E|) time (Végh, 2012). Appendix B. Triangle Inequality of Effective Resistance In this section, we prove Theorem 4. We start with rephrasing effective resistance. Lemma 16 Let F : 2V → RE + be a submodular transformation. Suppose (4) is feasible for b = eu − ev , and let ϕ∗ ∈ RE be an optimal solution. Then we have RF (u, v) = kϕ∗ k2 . 16 P OLYNOMIAL -T IME A LGORITHMS FOR S UBMODULAR L APLACIAN S YSTEMS Proof Let x∗ ∈ RV be an optimal solution to the primal problem (1) for b = eu − ev . From the strong duality, we have 1X 1 fe (x∗ )2 − heu − ev , x∗ i = − kϕ∗ k2 . 2 2 e∈E From the complementary slackness condition, we have ϕ∗ (e) = fe (x∗ ) for all e ∈ E. In addition, due to the first-order optimality condition, we have LF (x∗ ) ∋ eu − ev . Substituting them to the above equation, we obtain kϕ∗ k2 = (eu − ev )L+ F (eu − ev ), and the claim holds. Lemma 17 (Triangle inequality of effective resistance) Let F : 2E → RE + be a submodular transformation. Suppose that effective resistances RF (u, v) and RF (v, w) are bounded. Then, it holds that RF (u, v) + RF (v, w) ≥ RF (u, w). Proof Suppose (xuv , ϕuv ), (xvw , ϕvw ) and (xuw , ϕuw ) are saddle points of the above Lagrangian (2) for b = eu − ev , b = ev − ew and b = eu − ew , respectively. Let ϕuv ∨ ϕvw ∈ RE be ϕuv ∨ ϕvw (e) = max{ϕuv (e), ϕvw (e)}. We show ϕuv ∨ ϕvw is a feasible solution to (4) for b = eu − ew . It is enough to show for any S ⊆ V , the constraint X (ϕuv ∨ ϕvw )(e)Fe (S) − (eu − ew )(S) ≥ 0 e∈E holds. If u 6∈ S or w ∈ S, the constraint holds since (eu − ew )(S) ≤ 0 and Fe is non-negative for each e ∈ E. Hence we consider S such that u ∈ S and w 6∈ S. When v ∈ S, we have X X (ϕuv ∨ ϕvw )(e)Fe (S) − (eu − ew )(S) ≥ ϕvw (e)Fe (S) − 1 e∈E = X e∈E ϕvw (e)Fe (S) − (ev − ew )(S) ≥ 0. e∈E The last inequality holds because ϕvw is a feasible solution to (4) for b = ev − ew . Similarly, when v 6∈ S, we have X X (ϕuv ∨ ϕvw )(e)Fe (S) − (eu − ew )(S) ≥ ϕuv (e)Fe (S) − 1 e∈E = X e∈E ϕuv (e)Fe (S) − (eu − ev )(S) ≥ 0. e∈E Since ϕuv ∨ ϕvw is a feasible solution to (4) for b = eu − ew , by Lemma 16, we can show the triangle inequality as follows: RF (u, w) = kϕuw k2 ≤ kϕuv ∨ ϕvw k2 ≤ kϕuv k2 + kϕvw k2 = RF (u, v) + RF (v, w), and the claim holds. 17
8cs.DS
arXiv:1605.02941v1 [cs.PL] 10 May 2016 Types from data: Making structured data first-class citizens in F# Tomas Petricek Gustavo Guerra Don Syme University of Cambridge [email protected] Microsoft Corporation, London [email protected] Microsoft Research, Cambridge [email protected] Abstract Most modern applications interact with external services and access data in structured formats such as XML, JSON and CSV. Static type systems do not understand such formats, often making data access more cumbersome. Should we give up and leave the messy world of external data to dynamic typing and runtime checks? Of course, not! We present F# Data, a library that integrates external structured data into F#. As most real-world data does not come with an explicit schema, we develop a shape inference algorithm that infers a shape from representative sample documents. We then integrate the inferred shape into the F# type system using type providers. We formalize the process and prove a relative type soundness theorem. Our library significantly reduces the amount of data access code and it provides additional safety guarantees when contrasted with the widely used weakly typed techniques. Categories and Subject Descriptors D.3.3 [Programming Languages]: Language Constructs and Features Keywords F#, Type Providers, Inference, JSON, XML 1. The code assumes that the response has a particular shape described in the documentation. The root node must be a record with a main field, which has to be another record containing a numerical temp field representing the current temperature. When the shape is different, the code fails. While not immediately unsound, the code is prone to errors if strings are misspelled or incorrect shape assumed. Using the JSON type provider from F# Data, we can write code with exactly the same functionality in two lines: type W = JsonProvider "http://api.owm.org/?q=NYC" printfn "Lovely %f!" (W.GetSample().Main.Temp) JsonProvider "..." invokes a type provider [23] at compiletime with the URL as a sample. The type provider infers the structure of the response and provides a type with a GetSample method that returns a parsed JSON with nested properties Main.Temp, returning the temperature as a number. In short, the types come from the sample data. In our experience, this technique is both practical and surprisingly effective in achieving more sound information interchange in heterogeneous systems. Our contributions are as follows: Introduction • We present F# Data type providers for XML, CSV and Applications for social networks, finding tomorrow’s weather or searching train schedules all communicate with external services. Increasingly, these services provide end-points that return data as CSV, XML or JSON. Most such services do not come with an explicit schema. At best, the documentation provides sample responses for typical requests. For example, http://openweathermap.org/current contains one example to document an end-point to get the current weather. Using standard libraries, we might call it as1 : let doc = Http.Request("http://api.owm.org/?q=NYC") match JsonValue.Parse(doc) with | Record(root) → match Map.find "main" root with | Record(main) → match Map.find "temp" main with | Number(num) → printfn "Lovely %f!" num | _ → failwith "Incorrect format" | _ → failwith "Incorrect format" | _ → failwith "Incorrect format" JSON (§2) and practical aspects of their implementation that contributed to their industrial adoption (§6). • We describe a predictable shape inference algorithm for structured data formats, based on a preferred shape relation, that underlies the type providers (§3). • We give a formal model (§4) and use it to prove relative type safety for the type providers (§5). 2. Type providers for structured data We start with an informal overview that shows how F# Data type providers simplify working with JSON and XML. We introduce the necessary aspects of F# type providers along the way. The examples in this section also illustrate the key design principles of the shape inference algorithm: 1 We abbreviate the full URL and omit application key (available after registration). The returned JSON is shown in Appendix A and can be used to run the code against a local file. • The mechanism is predictable (§6.5). The user directly works with the provided types and should understand why a specific type was produced from a given sample. • The type providers prefer F# object types with properties. This allows extensible (open-world) data formats (§2.2) and it interacts well with developer tooling (§2.1). • The above makes our techniques applicable to any lan- guage with nominal object types (e.g. variations of Java or C# with a type provider mechanism added). Type providers. The notation JsonProvider "people.json" passes a static parameter to the type provider. Static parameters are resolved at compile-time and have to be constant. The provider analyzes the sample and provides a type People. F# editors also execute the type provider at development-time and use the provided types for autocompletion on “.” and for background type-checking. The JsonProvider uses a shape inference algorithm and provides the following F# types for the sample: type Entity = member Name : string member Age : option float • Finally, we handle practical concerns including support for different numerical types, null and missing data. The supplementary screencast provides further illustration of the practical developer experience using F# Data.2 2.1 type People = member GetSample : unit → Entity[] member Parse : string → Entity[] Working with JSON documents The JSON format is a popular data exchange format based on JavaScript data structures. The following is the definition of JsonValue used earlier (§1) to represent JSON data: type JsonValue = | Number of float | Boolean of bool | String of string | Record of Map string, JsonValue | Array of JsonValue[] | Null The earlier example used only a nested record containing a number. To demonstrate other aspects of the JSON type provider, we look at an example that also involves an array: [ { "name":"Jan", "age":25 }, { "name":"Tomas" }, { "name":"Alexander", "age":3.5 } ] The standard way to print the names and ages would be to pattern match on the parsed JsonValue, check that the toplevel node is a Array and iterate over the elements checking that each element is a Record with certain properties. We would throw an exception for values of an incorrect shape. As before, the code would specify field names as strings, which is error prone and can not be statically checked. Assuming people.json is the above example and data is a string containing JSON of the same shape, we can write: type People = JsonProvider "people.json" for item in People.Parse(data) do printf "%s " item.Name Option.iter (printf "(%f)") item.Age We now use a local file as a sample for the type inference, but then processes data from another source. The code achieves a similar simplicity as when using dynamically typed languages, but it is statically type-checked. The type Entity represents the person. The field Name is available for all sample values and is inferred as string. The field Age is marked as optional, because the value is missing in one sample. In F#, we use Option.iter to call the specified function (printing) only when an optional value is available. The two age values are an integer 25 and a float 3.5 and so the common inferred type is float. The names of the properties are normalized to follow standard F# naming conventions as discussed later (§6.3). The type People has two methods for reading data. GetSample parses the sample used for the inference and Parse parses a JSON string. This lets us read data at runtime, provided that it has the same shape as the static sample. Error handling. In addition to the structure of the types, the type provider also specifies the code of operations such as item.Name. The runtime behaviour is the same as in the earlier hand-written sample (§1) – a member access throws an exception if data does not have the expected shape. Informally, the safety property (§5) states that if the inputs are compatible with one of the static samples (i.e. the samples are representative), then no exceptions will occur. In other words, we cannot avoid all failures, but we can prevent some. Moreover, if http://openweathermap.org changes the shape of the response, the code in §1 will not re-compile and the developer knows that the code needs to be corrected. Objects with properties. The sample code is easy to write thanks to the fact that most F# editors provide auto-completion when “.” is typed (see the supplementary screencast). The developer does not need to examine the sample JSON file to see what fields are available. To support this scenario, our type providers map the inferred shapes to F# objects with (possibly optional) properties. This is demonstrated by the fact that Age becomes an optional member. An alternative is to provide two different record types (one with Name and one with Name and Age), 2 Available at http://tomasp.net/academic/papers/fsharp-data. but this would complicate the processing code. It is worth noting that languages with stronger tooling around pattern matching such as Idris [12] might have different preferences. 2.2 Processing XML documents XML documents are formed by nested elements with attributes. We can view elements as records with a field for each attribute and an additional special field for the nested contents (which is a collection of elements). Consider a simple extensible document format where a root element <doc> can contain a number of document elements, one of which is <heading> representing headings: <doc> <heading>Working with JSON</heading> <p>Type providers make this easy.</p> <heading>Working with XML</heading> <p>Processing XML is as easy as JSON.</p> <image source="xml.png" /> </doc> The F# Data library has been designed primarily to simplify reading of data. For example, say we want to print all headings in the document. The sample shows a part of the document structure (in particular the <heading> element), but it does not show all possible elements (say, <table>). Assuming the above document is sample.xml, we can write: type Document = XmlProvider "sample.xml" let root = Document.Load("pldi/another.xml") for elem in root.Doc do Option.iter (printf " - %s") elem.Heading user needs to explicitly handle the case when a value is not a statically known element. In object-oriented languages, the same could be done by providing a class hierarchy, but this loses the easy discoverability when “.” is typed. The provided type is also consistent with our design principles, which prefers optional properties. The gain is that the provided types support both open-world data and developer tooling. It is also worth noting that our shape inference uses labelled top shapes only as the last resort (Lemma 1, §6.4). 2.3 Throughout the introduction, we used data sets that demonstrate the typical problems frequent in the real-world (missing data, inconsistent encoding of primitive values and heterogeneous shapes). The government debt information returned by the World Bank4 includes all three: [ { "pages": 5 }, [ { "indicator": "GC.DOD.TOTL.GD.ZS", "date": "2012", "value": null }, { "indicator": "GC.DOD.TOTL.GD.ZS", "date": "2010", "value": "35.14229" } ] ] First, the field value is null for some records. Second, numbers in JSON can be represented as numeric literals (without quotes), but here, they are returned as string literals instead.5 Finally, the top-level element is a collection containing two values of different shape. The record contains meta-data with the total number of pages and the array contains the data. F# Data supports a concept of heterogeneous collection (outlined in in §6.4) and provides the following type: type Record = member Pages : int The example iterates over a collection of elements returned by root.Doc. The type of elem provides typed access to elements known statically from the sample and so we can write elem.Heading, which returns an optional string value. Open world. By its nature, XML is extensible and the sample cannot include all possible nodes.3 This is the fundamental open world assumption about external data. Actual input might be an element about which nothing is known. For this reason, we do not infer a closed choice between heading, paragraph and image. In the subsequent formalization, we introduce a top shape (§3.1) and extend it with labels capturing the statically known possibilities (§3.5). The labelled top shape is mapped to the following type: type Element = member Heading : option string member Paragraph : option string member Image : option Image Element is an abstract type with properties. It can represent the statically known elements, but it is not limited to them. For a table element, all three properties would return None. Using a type with optional properties provides access to the elements known statically from the sample. However the Real-world JSON services type Item = member Date : int member Indicator : string member Value : option float type WorldBank = member Record : Record member Array : Item[] The inference for heterogeneous collections infers the multiplicities and shapes of nested elements. As there is exactly one record and one array, the provided type WorldBank exposes them as properties Record and Array. In addition to type providers for JSON and XML, F# Data also implements a type provider for CSV (§6.2). We treat CSV files as lists of records (with field for each column) and so CSV is handled directly by our inference algorithm. 3 4 5 Even when the document structure is defined using XML Schema, documents may contain elements prefixed with other namespaces. Available at http://data.worldbank.org This is often used to avoid non-standard numerical types of JavaScript. 3. Shape inference for structured data The shape inference algorithm for structured data is based on a shape preference relation. When inferring the shape, it infers the most specific shapes of individual values (CSV rows, JSON or XML nodes) and recursively finds a common shape of all child nodes or all sample documents. We first define the shape of structured data σ. We use the term shape to distinguish shapes of data from programming language types τ (type providers generate the latter from the former). Next, we define the preference relation on shapes σ and describe the algorithm for finding a common shape. The shape algebra and inference presented here is influenced by the design principles we outlined earlier and by the type definitions available in the F# language. The same principles apply to other languages, but details may differ, for example with respect to numerical types and missing data. 3.1 any ν {ν1:σ1, We distinguish between non-nullable shapes that always have a valid value (written as σ̂) and nullable shapes that encompass missing and null values (written as σ). We write ν for record names and record field names. σ̂ = ν {ν1 : σ1 , . . . , νn : σn , ρi } | float | int | bool | string | [σ] | any | null | ⊥ Non-nullable shapes include records (consisting of a name and fields with their shapes) and primitives. The row variables ρi are discussed below. Names of records arising from XML are the names of the XML elements. For JSON records we always use a single name •. We assume that record fields can be freely reordered. We include two numerical primitives, int for integers and float for floating-point numbers. The two are related by the preference relation and we prefer int. Any non-nullable shape σ̂ can be wrapped as nullable σ̂ to explicitly permit the null value. Type providers map nullable shapes to the F# option type. A collection [σ] is also nullable and null values are treated as empty collections. This is motivated by the fact that a null collection is usually handled as an empty collection by client code. However there is a range of design alternatives (make collections nonnullable or treat null string as an empty string). The shape null is inhabited by the null value (using an overloaded notation) and ⊥ is the bottom shape. The any shape is the top shape, but we later add labels for statically known alternative shapes (§3.5) as discussed earlier (§2.2). During inference we use row-variables ρi [1] in record shapes to represent the flexibility arising from records in samples. For example, when a record Point {x 7→ 3} occurs in a sample, it may be combined with Point { x 7→ 3, y 7→ 4} that contains more fields. The overall shape inferred must account for the fact that any extra fields are optional, giving an inferred shape Point {x : int, y : nullable int }. , νn:σn}? [σ] float? string? bool? null int? Non-nullable shapes any ν {ν1:σ1, , νn:σn} float string bool int Figure 1. Important aspects of the preferred shape relation 3.2 Inferred shapes σ = σ̂ | nullable σ̂ Nullable shapes Preferred shape relation Figure 1 provides an intuition about the preference between shapes. The lower part shows non-nullable shapes (with records and primitives) and the upper part shows nullable shapes with null, collections and nullable shapes. In the diagram, we abbreviate nullable σ as σ? and we omit links between the two parts; a shape σ̂ is preferred over nullable σ̂ . Definition 1. For ground σ1 , σ2 (i.e. without ρi variables), we write σ1 v σ2 to denote that σ1 is preferred over σ2 . The shape preference relation is defined as a transitive reflexive closure of the following rules: int v float null v σ σ̂ v nullable σ̂ nullable σˆ1 v nullable σˆ2 [σ1 ] v [σ2 ] ⊥vσ σ v any ν {ν1 : σ1 , .., νn : σn } v ν {ν1 : σ10 , .., νn : σn0 } ν {ν1 : σ1 , .., νn : σn } v ν {ν1 : σ1 , .., .., νm : σm } (for σ 6= σ̂) (for all σ̂) (if σˆ1 v σˆ2 ) (if σ1 v σ2 ) (for all σ) (1) (2) (3) (4) (5) (6) (7) (if σi v σi0 ) (8) (when m ≤ n) (9) Here is a summary of the key aspects of the definition: • Numeric shape with smaller range is preferred (1) and we choose 32-bit int over float when possible. • The null shape is preferred over all nullable shapes (2), i.e. all shapes excluding non-nullable shapes σ̂. Any nonnullable shape is preferred over its nullable version (3) • Nullable shapes and collections are covariant (4, 5). • There is a bottom shape (6) and any behaves as the top shape, because any shape σ is preferred over any (7). • The record shapes are covariant (8) and preferred record can have additional fields (9). csh(σ, σ) csh([σ1 ], [σ2 ]) csh(⊥, σ) = csh(σ, ⊥) csh(null, σ) = csh(σ, null) csh(any, σ) = csh(σ, any) csh(float, int) = csh(int, float) csh(σ2 , nullable σˆ1 ) = csh(nullable σˆ1 , σ2 ) csh(ν {ν1 : σ1 , . . . , νn : σn }, ν {ν1 : σ10 , . . . , νn : σn0 }) csh(σ1 , σ2 ) dσ̂e = nullable σ̂ dσe = σ (non-nullable shapes) (otherwise) = = = = = = = = = σ [csh(σ1 , σ2 )] σ dσe any float dcsh(σˆ1 , σ2 )e ν {ν1 : csh(σ1 , σ10 ), . . . , νn : csh(σn , σn0 )} any (when σ1 6= ν {. . .} or σ2 6= ν {. . .}) bnullable σ̂ c = σ̂ bσc = σ (eq) (list) (bot) (null) (top) (num) (opt) (recd) (any) (nullable shape) (otherwise) Figure 2. The rules that define the common preferred shape function 3.3 Common preferred shape relation Given two ground shapes, the common preferred shape is the least upper bound of the shape with respect to the preferred shape relation. The least upper bound prefers records, which is important for usability as discussed earlier (§2.2). Definition 2. A common preferred shape of two ground shapes σ1 and σ2 is a shape csh(σ1 , σ2 ) obtained according to Figure 2. The rules are matched from top to bottom. The fact that the rules of csh are matched from top to bottom resolves the ambiguity between certain rules. Most importantly (any) is used only as the last resort. When finding a common shape of two records (recd) we find common preferred shapes of their respective fields. We can find a common shape of two different numbers (num); for two collections, we combine their elements (list). When one shape is nullable (opt), we find the common nonnullable shape and ensure the result is nullable using d−e, which is also applied when one of the shapes is null (null). When defined, csh finds the unique least upper bound of the partially ordered set of ground shapes (Lemma 1). Lemma 1 (Least upper bound). For ground σ1 and σ2 , if csh(σ1 , σ2 ) ` σ then σ is a least upper bound by w. Proof. By induction over the structure of the shapes σ1 , σ2 . Note that csh only infers the top shape any when on of the shapes is the top shape (top) or when there is no other option (any); a nullable shape is introduced in d−e only when no non-nullable shape can be used (null), (opt). The definition includes primitive values (i for integers, f for floats and s for strings) and null. A collection is written as a list of values in square brackets. A record starts with a name ν, followed by a sequence of field assignments νi 7→ di . Figure 3 defines a mapping S(d1 , . . . , dn ) which turns a collection of sample data d1 , . . . , dn into a shape σ. Before applying S, we assume each record in each di is marked with a fresh row inference variable ρi . We then choose a ground, minimal substitution θ for row variables. Because ρi variables represent potentially missing fields, the d−e operator from Figure 2 is applied to all types in the vector. This is sufficient to equate the record field labels and satisfy the pre-conditions in rule (recd) when multiple record shapes are combined. The csh function is not defined for two records with mis-matching fields, however, the fields can always be made to match, through a substitution for row variables. In practice, θ is found via row variable unification [17]. We omit the details here. No ρi variables remain after inference as the substitution chosen is ground. Primitive values are mapped to their corresponding shapes. When inferring a shape from multiple samples, we use the common preferred shape relation to find a common shape for all values (starting with ⊥). This operation is used when calling a type provider with multiple samples and also when inferring the shape of collection values. S(i) = int S(f ) = float S(null) = null S(s) = string S(true) = bool S(false) = bool S([d1 ; . . . ; dn ]) = [S(d1 , . . . , dn )] 3.4 Inferring shapes from samples We now specify how we obtain the shape from data. As clarified later (§6.2), we represent JSON, XML and CSV documents using the same first-order data value: d = i | f | s | true | false | null | [d1 ; . . . ; dn ] | ν {ν1 7→ d1 , . . . , νn 7→ dn } S(ν {ν1 7→ d1 , . . . , νn 7→ dn }ρi ) = ν {ν1 : S(d1 ), . . . , νn : S(dn ), dθ(ρi )e} S(d1 , . . . , dn ) = σn where σ0 = ⊥, ∀i ∈ {1..n}. σi−1 OS(di ) ` σi Choose minimal θ by ordering v lifted over substitutions Figure 3. Shape inference from sample data tag = collection | number | nullable | string | ν | any | bool tagof(string) tagof(bool) tagof(int) tagof(float) = = = = string bool number number tagof(any σ1 , . . . , σn ) = any tagof(ν {ν1 : σ1 , . . . , νn : σn }) = ν tagof(nullable σ̂ ) = nullable tagof([σ]) = collection 0 csh(any σ1 , . . . , σk , . . . , σn , any σ10 , . . . , σk0 , . . . , σm )= 0 0 0 0 any csh(σ1 , σ1 ), . . . , csh(σk , σk ), σk+1 , . . . , σn , σk+1 , . . . , σm For i, j such that (tagof(σi ) = tagof(σj0 )) (top-merge) ⇔ (i = j) ∧ (i ≤ k) csh(σ, any σ1 , . . . , σn ) = csh(any σ1 , . . . , σn , σ) = any σ1 , . . . , bcsh(σ, σi )c, . . . , σn (top-incl) For i such that tagof(σi ) = tagof(bσc) csh(σ, any σ1 , . . . , σn ) = any σ1 , . . . , σn , bσc (top-add) csh(σ1 , σ2 ) = anyhbσ1 c, bσ2 ci (top-any) Figure 4. Extending the common preferred shape relation for labelled top shapes 3.5 Adding labelled top shapes When analyzing the structure of shapes, it suffices to consider a single top shape any. The type providers need more information to provide typed access to the possible alternative shapes of data, such as XML nodes. We extend the core model (sufficient for the discussion of relative safety) with labelled top shapes defined as: σ = . . . | any σ1 , . . . , σn The shapes σ1 , . . . , σn represent statically known shapes that appear in the sample and that we expose in the provided type. As discussed earlier (§2.2) this is important when reading external open world data. The labels do not affect the preferred shape relation and any σ1 , . . . , σn should still be seen as the top shape, regardless of the labels6 . The common preferred shape function is extended to find a labelled top shape that best represents the sample. The new rules for any appear in Figure 4. We define shape tags to identify shapes that have a common preferred shape which is not the top shape. We use it to limit the number of labels and avoid nesting by grouping shapes by the shape tag. Rather than inferring any int, any bool, float , our algorithm joins int and float and produces any float, bool . When combining two top shapes (top-merge), we group the annotations by their tags. When combining a top with another shape, the labels may or may not already contain a case with the tag of the other shape. If they do, the two shapes are combined (top-incl), otherwise a new case is added (topadd). Finally, (top-all) replaces earlier (any) and combines two distinct non-top shapes. As top shapes implicitly permit null values, we make the labels non-nullable using b−c. The revised algorithm still finds a shape which is the least upper bound. This means that labelled top shape is only inferred when there is no other alternative. Stating properties of the labels requires refinements to the preferred shape relation. We leave the details to future work, but we note that the algorithm infers the best labels in the sense that there are labels that enable typed access to every possible value in the sample, but not more. The same is the case for nullable fields of records. 4. Formalizing type providers This section presents the formal model of F# Data integration. To represent the programming language that hosts the type provider, we introduce the Foo calculus, a subset of F# with objects and properties, extended with operations for working with weakly typed structured data along the lines of the F# Data runtime. Finally, we describe how type providers turn inferred shapes into Foo classes (§4.2). τ = int | float | bool | string | C | Data | τ1 → τ2 | list τ | option τ L = type C(x : τ ) = M M = member N : τ = e v = d | None | Some(v) | new C(v) | v1 :: v2 e = d | op | e1 e2 | λx.e | e.N | new C(e) | None | match e with Some(x) → e1 | None → e2 | Some(e) | e1 = e2 | if e1 then e2 else e3 | nil | e1 :: e2 | match e with x1 :: x2 → e1 | nil → e2 op = convFloat(σ, e) | convPrim(σ, e) | convField(ν1 , ν2 , e, e) | convNull(e1 , e2 ) | convElements(e1 , e2 ) | hasShape(σ, e) Figure 5. The syntax of the Foo calculus 6 An alternative would be to add unions of shapes, but doing so in a way that is compatible with the open-world assumption breaks the existence of unique lower bound of the preferred shape relation. Part I. Reduction rules for conversion functions 0 hasShape(ν {ν1 : σ1 , . . . , νn : σn }, ν 0 {ν10 7→ d1 , . . . , νm 7→ dm }) (ν = ν 0 ) ∧ 0 0 ( ((ν1 = ν1 ) ∧ hasShape(σ1 , d1 )) ∨ . . . ∨ ((ν1 = νm ) ∧ hasShape(σ1 , dm )) ∨ . . . ∨ 0 ((νn = ν10 ) ∧ hasShape(σn , d1 )) ∨ . . . ∨ ((νn = νm ) ∧ hasShape(σn , dm )) ) hasShape([σ], [d1 ; . . . ; dn ]) hasShape([σ], null) true hasShape(σ, d1 ) ∧ . . . ∧ hasShape(σ, dn ) hasShape(string, s) true hasShape(int, i) true hasShape(bool, d) true (when d ∈ true, false) hasShape(float, d) true (when d = i or d = f ) hasShape(_, _) false convFloat(float, i) convFloat(float, f ) f (f = i) f convNull(null, e) None convNull(d, e) Some(e d) convPrim(σ, d) d (σ, d ∈ {(int, i), (string, s), (bool, b)}) convField(ν, νi , ν {. . . , νi = di , . . .}, e) e di convField(ν, ν 0 , ν {. . . , νi = di , . . .}, e) e null (@i.νi = ν 0 ) convElements([d1 ; . . . ; dn ], e) e d1 :: . . . :: e dn :: nil convElements(null) nil Part II. Reduction rules for the rest of the Foo calculus (member) type C(x : τ ) = member Ni : τi = ei . . . ∈ L L, (new C(v)).Ni ei [x ← v] (cond1) if true then e1 else e2 e1 (cond2) if false then e1 else e2 e2 (eq1) v = v0 true (when v = v 0 ) (eq2) v = v0 false (when v 6= v 0 ) (fun) (λx.e) v (match1) match None with Some(x) → e1 | None → e2 e2 (match2) match Some(v) with Some(x) → e1 | None → e2 e1 [x ← v] (match3) match nil with x1 :: x2 → e1 | nil → e2 e2 (match4) match v1 :: v2 with x1 :: x2 → e1 | nil → e2 e1 [x ← v] e[x ← v] (ctx) E[e] E[e0 ] (when e e0 ) Figure 6. Foo – Reduction rules for the Foo calculus and dynamic data operations Type providers for structured data map the “dirty” world of weakly typed structured data into a “nice” world of strong types. To model this, the Foo calculus does not have null values and data values d are never directly exposed. Furthermore Foo is simply typed: despite using class types and object notation for notational convenience, it has no subtyping. 4.1 The Foo calculus The syntax of the calculus is shown in Figure 5. The type Data is the type of structural data d. A class definition L consists of a single constructor and zero or more parameterless members. The declaration implicitly closes over the constructor parameters. Values v include previously defined data d; expressions e include class construction, member access, usual functional constructs (functions, lists, options) and conditionals. The op constructs are discussed next. Dynamic data operations. The Foo programs can only work with Data values using certain primitive operations. Those are modelled by the op primitives. In F# Data, those are internal and users never access them directly. The behaviour of the dynamic data operations is defined by the reduction rules in Figure 6 (Part I). The typing is shown in Figure 7 and is discussed later. The hasShape function represents a runtime shape test. It checks whether a Data value d (Section 3.4) passed as the second argument has a shape specified by the first argument. For records, we have to check that for each field ν1 , . . . , νn in the record, the actual record value has a field of the same name with a matching shape. The last line defines a “catch all” pattern, which returns false for all remaining cases. We treat e1 ∨ e2 and e1 ∧ e2 as a syntactic sugar for if . . then . . else so the result of the reduction is just a Foo expression. The remaining operations convert data values into values of less preferred shape. The convPrim and convFloat operations take the required shape and a data value. When the data does not match the required type, they do not reduce. For example, convPrim(bool, 42) represents a stuck state, but convFloat(float, 42) turns an integer 42 into a floatingpoint numerical value 42.0. The convNull, convElements and convField operations take an additional parameter e which represents a function to be used in order to convert a contained value (non-null optional value, list elements or field value); convNull turns null data value into None and convElements turns a data collection [d1 , . . . , dn ] into a Foo list v1 :: . . . :: vn :: nil and a null value into an empty list. L; Γ ` d : Data L; Γ ` i : int L; Γ ` e : Data L; Γ ` hasShape(σ, e) : bool L; Γ ` e : Data prim ∈ {int, string, bool} L; Γ ` convPrim(prim, e) : prim L; Γ ` f : float L; Γ, x : τ1 ` e : τ2 L; Γ ` λx.e : τ2 L; Γ ` e : Data τ ∈ {int, float} L; Γ ` convFloat(σ, e) : float L; Γ ` e2 : τ1 L; Γ ` e1 : τ1 → τ2 L; Γ ` e1 e2 : τ2 L; Γ ` e1 : Data L; Γ ` e2 : Data → τ L; Γ ` convNull(e1 , e2 ) : optionhτ i L; Γ ` e1 : Data L; Γ ` e2 : Data → τ L; Γ ` convElements(e1 , e2 ) : listhτ i L; Γ ` e : C type C(x : τ ) = .. member Ni : τi = ei .. ∈ L L; Γ ` e.Ni : τi L; Γ ` ei : τi L; Γ ` e1 : Data L; Γ ` e2 : Data → τ L; Γ ` convField(ν, ν 0 , e1 , e2 ) : τ type C(x1 : τ1 , . . . , xn : τn ) = . . . ∈ L L; Γ ` new C(e1 , . . . , en ) : C Figure 7. Foo – Fragment of type checking Reduction. The reduction relation is of the form L, e e0 . We omit class declarations L where implied by the context and write e ∗ e0 for the reflexive, transitive closure of . Figure 6 (Part II) shows the reduction rules. The (member) rule reduces a member access using a class definition in the assumption. The (ctx) rule models the eager evaluation of F# and performs a reduction inside a sub-expression specified by an evaluation context E: E= | | | | v :: E | v E | E.N | new C(v, E, e) if E then e1 else e2 | E = e | v = E Some(E) | op(v, E, e) match E with Some(x) → e1 | None → e2 match E with x1 :: x2 → e1 | nil → e2 The evaluation proceeds from left to right as denoted by v, E, e in constructor and dynamic data operation arguments or v :: E in list initialization. We write e[x ← v] for the result of replacing variables x by values v in an expression. The remaining six rules give standard reductions. Type checking. Well-typed Foo programs reduce to a value in a finite number of steps or get stuck due to an error condition. The stuck states can only be due to the dynamic data operations (e.g. an attempt to convert null value to a number convFloat(float, null)). The relative safety (Theorem 3) characterizes the additional conditions on input data under which Foo programs do not get stuck. Typing rules in Figure 7 are written using a judgement L; Γ ` e : τ where the context also contains a set of class declarations L. The fragment demonstrates the differences and similarities with Featherweight Java [10] and typing rules for the dynamic data operations op: – All data values d have the type Data, but primitive data values (Booleans, strings, integers and floats) can be implicitly converted to Foo values and so they also have a primitive type as illustrated by the rule for i and f . – For non-primitive data values (including null, data collections and records), Data is the only type. – Operations op accept Data as one of the arguments and produce a non-Data Foo type. Some of them require a function specifying the conversion for nested values. – Rules for checking class construction and member access are similar to corresponding rules of Featherweight Java. An important part of Featherweight Java that is omitted here is the checking of type declarations (ensuring the members are well-typed). We consider only classes generated by our type providers and those are well-typed by construction. 4.2 Type providers So far, we defined the type inference algorithm which produces a shape σ from one or more sample documents (§3) and we defined a simplified model of evaluation of F# (§4.1) and F# Data runtime (§4.2). In this section, we define how the type providers work, linking the two parts. All F# Data type providers take (one or more) sample documents, infer a common preferred shape σ and then use it to generate F# types that are exposed to the programmer.7 Type provider mapping. A type provider produces an F# type τ together with a Foo expression and a collection of class definitions. We express it using the following mapping: JσK = (τ, e, L) (where L, ∅ ` e : Data → τ ) The mapping JσK takes an inferred shape σ. It returns an F# type τ and a function that turns the input data (value of type Data) into a Foo value of type τ . The type provider also generates class definitions that may be used by e. Figure 8 defines J−K. Primitive types are handled by a single rule that inserts an appropriate conversion function; convPrim just checks that the shape matches and convFloat converts numbers to a floating-point. 7 The actual implementation provides erased types as described in [23]. Here, we treat the code as actually generated. This is an acceptable simplification, because F# Data type providers do not rely on laziness or erasure of type provision. Jσp K = τp , λx.op(σp , x), ∅ J any σ1 , . . . , σn K = C, λx.new C(x), L1 ∪ . . . ∪ Ln ∪ {L} where where σp , τp , op ∈ { (bool, bool, convPrim) (int, int, convPrim), (float, float, convFloat), (string, string, convPrim) } J ν {ν1 : σ1 , . . . , νn : σn } K = C, λx.new C(x), L1 ∪ . . . ∪ Ln ∪ {L} C is a fresh class name L = type C(x : Data) = M1 . . . Mn Mi = member νi : option τi = if hasShape(σi , x) then Some(ei x) else None τi , ei , Li = Jσi Ke , νi = tagof(σi ) where Jnullable σ̂ K = option τ , λx.convNull(x, e), L where τ, e, L = Jσ̂K C is a fresh class name L = type C(x1 : Data) = M1 . . . Mn Mi = member νi : τi = convField(ν, νi , x1 , ei ), τi , ei , Li = Jσi K J⊥K = JnullK = C, λx.new C(x), {L} where J [σ] K = list τ , λx.convElements(x, e0 ), L where C is a fresh class name L = type C(v : Data) τ, e0 , L = Jσ̂K Figure 8. Type provider – generation of Foo types from inferred structural types For records, we generate a class C that takes a data value as a constructor parameter. For each field, we generate a member with the same name as the field. The body of the member calls convField with a function obtained from Jσi K. This function turns the field value (data of shape σi ) into a Foo value of type τi . The returned expression creates a new instance of C and the mapping returns the class C together with all recursively generated classes. Note that the class name C is not directly accessed by the user and so we can use an arbitrary name, although the actual implementation in F# Data attempts to infer a reasonable name.8 A collection shape becomes a Foo list τ . The returned expression calls convElements (which returns the empty list for data value null). The last parameter is the recursively obtained conversion function for the shape of elements σ. The handling of the nullable shape is similar, but uses convNull. As discussed earlier, labelled top shapes are also generated as Foo classes with properties. Given any σ1 , . . . , σn , we get corresponding F# types τi and generate n members of type option τi . When the member is accessed, we need to perform a runtime shape test using hasShape to ensure that the value has the right shape (similarly to runtime type conversions from the top type in languages like Java). If the shape matches, a Some value is returned. The shape inference algorithm also guarantees that there is only one case for each shape tag (§3.3) and so we can use the tag for the name of the generated member. Example 1. To illustrate how the mechanism works, we consider two examples. First, assume that the inferred shape is a record Person { Age : option int , Name : string }. The rules from Figure 8 produce the Person class shown below with two members. The body of the Age member uses convField as specified by the case for optional record fields. The field shape is nul- lable and so convNull is used in the continuation to convert the value to None if convField produces a null data value and hasShape is used to ensure that the field has the correct shape. The Name value should be always available and should have the right shape so convPrim appears directly in the continuation. This is where the evaluation can get stuck if the field value was missing: type Person(x1 : Data) = member Age : option int = convField(Person, Age, x1 , λx2 → convNull(x2 , λx3 → convPrim(int, x3 )) ) member Name : string = convField(Person, Name, x1 , λx2 → convPrim(string, x2 ))) The function to create the Foo value Person from a data value is λx.new Person(x). Example 2. The second example illustrates the handling of collections and labelled top types. Reusing Person from the previous example, consider [any Person {. . .}, string ]: type PersonOrString(x : Data) = member Person : option Person = if hasShape(Person {. . .}, x) then Some(new Person(x)) else None member String : option string = if hasShape(string, x) then Some(convPrim(string, x)) else None The type provider maps the collection of labelled top shapes to a type list PersonOrString and returns a function that parses a data value as follows: 8 For example, in {"person":{"name":"Tomas"}}, the nested record will be named Person based on the name of the parent record field. λx1 → convElements(x1 λx2 → new PersonOrString(x2 )) The PersonOrString class contains one member for each of the labels. In the body, they check that the input data value has the correct shape using hasShape. This also implicitly handles null by returning false. As discussed earlier, labelled top types provide easy access to the known cases (string or Person), but they require a runtime shape check. 5. Relative type safety Informally, the safety property for structural type providers states that, given representative sample documents, any code that can be written using the provided types is guaranteed to work. We call this relative safety, because we cannot avoid all errors. In particular, one can always provide an input that has a different structure than any of the samples. In this case, it is expected that the code will throw an exception in the implementation (or get stuck in our model). More formally, given a set of sample documents, code using the provided type is guaranteed to work if the inferred shape of the input is preferred with respect to the shape of any of the samples. Going back to §3.2, this means that: – Input can contain smaller numerical values (e.g., if a sample contains float, the input can contain an integer). – Records in the input can have additional fields. – Records in the input can have fewer fields than some of the records in the sample document, provided that the sample also contains records that do not have the field. – When a labelled top type is inferred from the sample, the actual input can also contain any other value, which implements the open world assumption. The following lemma states that the provided code (generated in Figure 8) works correctly on an input d0 that is a subshape of d. More formally, the provided expression (with input d0 ) can be reduced to a value and, if it is a class, all its members can also be reduced to values. Lemma 2 (Correctness of provided types). Given sample data d and an input data value d0 such that S(d0 ) v S(d) and provided type, expression and classes τ, e, L = JS(d)K, then L, e d0 ∗ v and if τ is a class (τ = C) then for all members Ni of the class C, it holds that L, (e d0 ).Ni ∗ v. Proof. By induction over the structure of J−K. For primitives, the conversion functions accept all subshapes. For other cases, analyze the provided code to see that it can work on all subshapes (for example convElements works on null values, convFloat accepts an integer). Finally, for labelled top types, the hasShape operation is used to guaranteed the correct shape at runtime. This shows that provided types are correct with respect to the preferred shape relation. Our key theorem states that, for any input which is a subshape the inferred shape and any expression e, a well-typed program that uses the provided types does not “go wrong”. Using standard syntactic type safety [26], we prove type preservation (reduction does not change type) and progress (an expression can be reduced). Theorem 3 (Relative safety). Assume d1 , . . . , dn are samples, σ = S(d1 , . . . , dn ) is an inferred shape and τ, e, L = JσK are a type, expression and class definitions generated by a type provider. For all inputs d0 such that S(d0 ) v σ and all expressions 0 e (representing the user code) such that e0 does not contain any of the dynamic data operations op and any Data values as sub-expressions and L; y : τ ` e0 : τ 0 , it is the case that L, e[y ← e0 d0 ] ∗ v for some value v and also ∅; ` v : τ 0 . Proof. We discuss the two parts of the proof separately as type preservation (Lemma 4) and progress (Lemma 5). Lemma 4 (Preservation). Given the τ, e, L generated by a type provider as specified in the assumptions of Theorem 3, then if L, Γ ` e : τ and L, e ∗ e0 then Γ ` e0 : τ . Proof. By induction over . The cases for the ML subset of Foo are standard. For (member), we check that code generated by type providers in Figure 8 is well-typed. The progress lemma states that evaluation of a well-typed program does not reach an undefined state. This is not a problem for the Standard ML [15] subset and object-oriented subset [10] of the calculus. The problematic part are the dynamic data operations (Figure 6, Part I). Given a data value (of type Data), the reduction can get stuck if the value does not have a structure required by a specific operation. The Lemma 2 guarantees that this does not happen inside the provided type. We carefully state that we only consider expressions e0 which “[do] not contain primitive operations op as sub-expressions”. This ensure that only the code generated by a type provider works directly with data values. Lemma 5 (Progress). Given the assumptions and definitions from Theorem 3, there exists e00 such that e0 [y ← e d0 ] e00 . Proof. Proceed by induction over the typing derivation of L; ∅ ` e[y ← e0 d0 ] : τ 0 . The cases for the ML subset are standard. For member access, we rely on Lemma 2. 6. Practical experience The F# Data library has been widely adopted by users and is one of the most downloaded F# libraries.9 A practical demonstration of development using the library can be seen in an attached screencast and additional documentation can be found at http://fsharp.github.io/FSharp.Data. In this section, we discuss our experience with the safety guarantees provided by the F# Data type providers and other notable aspects of the implementation. 9 At the time of writing, the library has over 125,000 downloads on NuGet (package repository), 1,844 commits and 44 contributors on GitHub. 6.1 Relative safety in practice The relative safety property does not guarantee safety in the same way as traditional closed-world type safety, but it reflects the reality of programming with external data that is becoming increasingly important [16]. Type providers increase the safety of this kind of programming. Representative samples. When choosing a representative sample document, the user does not need to provide a sample that represents all possible inputs. They merely need to provide a sample that is representative with respect to data they intend to access. This makes the task of choosing a representative sample easier. Schema change. Type providers are invoked at compiletime. If the schema changes (so that inputs are no longer related to the shape of the sample used at compile-time), the program can fail at runtime and developers have to handle the exception. The same problem happens when using weakly-typed code with explicit failure cases. F# Data can help discover such errors earlier. Our first example (§1) points the JSON type provider at a sample using a live URL. This has the advantage that a re-compilation fails when the sample changes, which is an indication that the program needs to be updated to reflect the change. Richer data sources. In general, XML, CSV and JSON data sources without an explicit schema will necessarily require techniques akin to those we have shown. However, some data sources provide an explicit schema with versioning support. For those, a type provider that adapts automatically could be written, but we leave this for future work. 6.2 Parsing structured data Reading XML documents. Mapping XML documents to structural values is more interesting. For each node, we create a record. Attributes become record fields and the body becomes a field with a special name. For example: <root id="1"> <item>Hello!</item> </root> This XML becomes a record root with fields id and • for the body. The nested element contains only the • field with the inner text. As with CSV, we infer shape of primitive values: root {id 7→ 1, • 7→ [item {• 7→ "Hello!"}]} The XML type provider also includes an option to use global inference. In that case, the inference from values (§3.4) unifies the shapes of all records with the same name. This is useful because, for example, in XHTML all <table> elements will be treated as values of the same type. 6.3 Providing idiomatic F# types In order to provide types that are easy to use and follow the F# coding guidelines, we perform a number of transformations on the provided types that simplify their structure and use more idiomatic naming of fields. For example, the type provided for the XML document in §6.2 is: type Root = member Id : int member Item : string To obtain the type signature, we used the type provider as defined in Figure 8 and applied three additional transformations and simplifications: In our formalization, we treat XML, JSON and CSV uniformly as data values. With the addition of names for records (for XML nodes), the definition of structural values is rich enough to capture all three formats.10 However, parsing realworld data poses a number of practical issues. • When a class C contains a member •, which is a class Reading CSV data. When reading CSV data, we read each row as an unnamed record and return a collection of rows. One difference between JSON and CSV is that in CSV, the literals have no data types and so we also need to infer the shape of primitive values. For example: • Remaining members named • in the provided classes Ozone, 41, 36.3, 12.1, 17.5, Temp, 67, 72, 74, #N/A, Date, 2012-05-01, 2012-05-02, 3 kveten, 2012-05-04, Autofilled 0 1 0 0 The value #N/A is commonly used to represent missing values in CSV and is treated as null. The Date column uses mixed formats and is inferred as string (we support many date formats and “May 3” would be parsed as date). More interestingly, we also infer Autofiled as Boolean, because the sample contains only 0 and 1. This is handled by adding a bit shape which is preferred of both int and bool. with further members, the nested members are lifted into the class C. For example, the above type Root directly contains Item rather than containing a member • returning a class with a member Item. (typically of primitive types) are renamed to Value. • Class members are renamed to follow PascalCase nam- ing convention, when a collision occurs, a number is appended to the end as in PascalCase2. The provided implementation preforms the lookup using the original name. Our current implementation also adds an additional member to each class that returns the underlying JSON node (called JsonValue) or XML element (called XElement). Those return the standard .NET or F# representation of the value and can be used to dynamically access data not exposed by the type providers, such as textual values inside mixed-content XML elements. 10 The same mechanism has later been used by the HTML type provider (http://fsharp.github.io/FSharp.Data/HtmlProvider.html), which provides similarly easy access to data in HTML tables and lists. 6.4 Heterogeneous collections When introducing type providers (§2.3), we mentioned how F# Data handles heterogeneous collections. This allows us to avoid inferring labelled top shapes in many common scenarios. In the earlier example, a sample collection contains a record (with pages field) and a nested collection with values. Rather than storing a single shape for the collection elements as in [σ], heterogeneous collections store multiple possible element shapes together with their inferred multiplicity (exactly one, zero or one, zero or more): ψ = 1? | 1 | ∗ σ = . . . | [σ1 , ψ1 | . . . |σn , ψn ] We omit the details, but finding a preferred common shape of two heterogeneous collections is analogous to the handling of labelled top types. We merge cases with the same tag (by finding their common shape) and calculate their new shared multiplicity (for example, by turning 1 and 1? into 1?). 6.5 Predictability and stability As discussed in §2, our inference algorithm is designed to be predictable and stable. When a user writes a program using the provided type and then adds another sample (e.g. with more missing values), they should not need to restructure their program. For this reason, we keep the algorithm simple. For example, we do not use probabilistic methods to assess the similarity of record types, because a small change in the sample could cause a large change in the provided types. We leave a general theory of stability and predictability of type providers to future work, but we formalize a brief observation in this section. Say we write a program using a provided type that is based on a collection of samples. When a new sample is added, the program can be modified to run as before with only small local changes. For the purpose of this section, assume that the Foo calculus also contains an exn value representing a runtime exception that propagates in the usual way, i.e. C[exn] exn, and also a conversion function int that turns floating-point number into an integer. Remark 1 (Stability of inference). Assume we have a set of samples d1 , . . . , dn , a provided type based on the samples τ1 , e1 , L1 = JS(d1 , . . . , dn )K and some user code e written using the provided type, such that L1 ; x : τ1 ` e : τ . Next, we add a new sample dn+1 and consider a new provided type τ2 , e2 , L2 = JS(d1 , . . . , dn , dn+1 )K. Now there exists e0 such that L2 ; x : τ2 ` e0 : τ and if for some d it is the case that e[x ← e1 d] v then also e0 [x ← e2 d] v. Such e0 is obtained by transforming sub-expressions of e using one of the following translation rules: 1. C[e] to C[match e with Some(v) → v | None → exn] 2. C[e] to C[e.M] where M = tagof(σ) for some σ 3. C[e] to C[int(e)] Proof. For each case in the type provision (Figure 8) an original shape σ may be replaced by a less preferred shape σ 0 . The user code can always be transformed to use the newly provided shape: – Primitive shapes can become nullable (1), int can become float (3) or become a part of a labelled top type (2). – Record shape fields can change shape (recursively) and record may become a part of a labelled top type (2). – For list and nullable shapes, the shape of the value may change (we apply the transformations recursively). – For the any shape, the original code will continue to work (none of the labels is ever removed). Intuitively, the first transformation is needed when the new sample makes a type optional. This happens when it contains a null value or a record that does not contain a field that all previous samples have. The second transformation is needed when a shape σ becomes anyhσ, . . .i and the third one is needed when int becomes float. This property also underlines a common way of handling errors when using F# Data type providers. When a program fails on some input, the input can be added as another sample. This makes some fields optional and the code can be updated accordingly, using a variation of (i) that uses an appropriate default value rather than throwing an exception. 7. Related and future work The F# Data library connects two lines of research that have been previously disconnected. The first is extending the type systems of programming languages to accommodate external data sources and the second is inferring types for real-world data sources. The type provider mechanism has been introduced in F# [23, 24], added to Idris [3] and used in areas such as semantic web [18]. The F# Data library has been developed as part of the early F# type provider research, but previous publications focused on the general mechanisms. This paper is novel in that it shows the programming language theory behind a concrete type providers. Extending the type systems. Several systems integrate external data into a programming language. Those include XML [9, 21] and databases [5]. In both of these, the system requires the user to explicitly define the schema (using the host language) or it has an ad-hoc extension that reads the schema (e.g. from a database). LINQ [14] is more general, but relies on code generation when importing the schema. The work that is the most similar to F# Data is the data integration in Cω [13]. It extends C# language with types similar to our structural types (including nullable types, choices with subtyping and heterogeneous collections with multiplicities). However, Cω does not infer the types from samples and extends the type system of the host language (rather than using a general purpose embedding mechanism). In contrast, F# Data type providers do not require any F# language extensions. The simplicity of the Foo calculus shows we have avoided placing strong requirements on the host language. We provide nominal types based on the shapes, rather than adding an advanced system of structural types into the host language. Advanced type systems and meta-programming. A number of other advanced type system features could be used to tackle the problem discussed in this paper. The Ur [2] language has a rich system for working with records; metaprogramming [6, 19] and multi-stage programming [25] could be used to generate code for the provided types; and gradual typing [20, 22] can add typing to existing dynamic languages. As far as we are aware, none of these systems have been used to provide the same level of integration with XML, CSV and JSON. Typing real-world data. Recent work [4] infers a succinct type of large JSON datasets using MapReduce. It fuses similar types based on similarity. This is more sophisticated than our technique, but it makes formal specification of safety (Theorem 3) difficult. Extending our relative safety to probabilistic safety is an interesting future direction. The PADS project [7, 11] tackles a more general problem of handling any data format. The schema definitions in PADS are similar to our shapes. The structure inference for LearnPADS [8] infers the data format from a flat input stream. A PADS type provider could follow many of the patterns we explore in this paper, but formally specifying the safety property would be more challenging. 8. Conclusions We explored the F# Data type providers for XML, CSV and JSON. As most real-world data does not come with an explicit schema, the library uses shape inference that deduces a shape from a set of samples. Our inference algorithm is based on a preferred shape relation. It prefers records to encompass the open world assumption and support developer tooling. The inference algorithm is predictable, which is important as developers need to understand how changing the samples affects the resulting types. We explored the theory behind type providers. F# Data is a prime example of type providers, but our work demonstrates a more general point. The types generated by type providers can depend on external input and so we can only guarantee relative safety, which says that a program is safe only if the actual inputs satisfy additional conditions. Type providers have been described before, but this paper is novel in that it explores the properties of type providers that represent the “types from data” approach. Our experience suggests that this significantly broadens the applicability of statically typed languages to real-world problems that are often solved by error-prone weakly-typed techniques. Acknowledgments We thank to the F# Data contributors on GitHub and other colleagues working on type providers, including Jomo Fisher, Keith Battocchi and Kenji Takeda. We are grateful to anonymous reviewers of the paper for their valuable feedback and to David Walker for shepherding of the paper. References [1] L. Cardelli and J. C. Mitchell. Operations on Records. In Mathematical Foundations of Programming Semantics, pages 22–52. Springer, 1990. [2] A. Chlipala. Ur: Statically-typed Metaprogramming with Type-level Record Computation. In ACM SIGPLAN Notices, volume 45, pages 122–133. ACM, 2010. [3] D. R. Christiansen. Dependent Type Providers. In Proceedings of Workshop on Generic Programming, WGP ’13, pages 25–34, 2013. ISBN 978-1-4503-2389-5. [4] D. Colazzo, G. Ghelli, and C. Sartiani. Typing Massive JSON Datasets. In International Workshop on Cross-model Language Design and Implementation, XLDI ’12, 2012. [5] E. Cooper, S. Lindley, P. Wadler, and J. Yallop. Links: Web Programming without Tiers. In Formal Methods for Components and Objects, pages 266–296. Springer, 2007. [6] J. Donham and N. Pouillard. Camlp4 and Template Haskell. In Commercial Users of Functional Programming, 2010. [7] K. Fisher and R. Gruber. PADS: A Domain-specific Language for Processing Ad Hoc Data. ACM SIGPLAN Notices, 40(6): 295–304, 2005. [8] K. Fisher, D. Walker, K. Q. Zhu, and P. White. From Dirt to Shovels: Fully Automatic Tool Generation from Ad Hoc Data. In Proceedings of ACM Symposium on Principles of Programming Languages, POPL ’08, pages 421–434, 2008. ISBN 978-1-59593-689-9. [9] H. Hosoya and B. C. Pierce. XDuce: A Statically Typed XML Processing Language. Transactions on Internet Technology, 3 (2):117–148, 2003. [10] A. Igarashi, B. Pierce, and P. Wadler. Featherweight Java: A Minimal Core Calculus for Java and GJ. In ACM SIGPLAN Notices, volume 34, pages 132–146. ACM, 1999. [11] Y. Mandelbaum, K. Fisher, D. Walker, M. Fernandez, and A. Gleyzer. PADS/ML: A Functional Data Description Language. In ACM SIGPLAN Notices, volume 42, pages 77–83. ACM, 2007. [12] H. Mehnert and D. Christiansen. Tool Demonstration: An IDE for Programming and Proving in Idris. In Proceedings of Vienna Summer of Logic, VSL’14, 2014. [13] E. Meijer, W. Schulte, and G. Bierman. Unifying Tables, Objects, and Documents. In Workshop on Declarative Programming in the Context of Object-Oriented Languages, pages 145–166, 2003. [14] E. Meijer, B. Beckman, and G. Bierman. LINQ: Reconciling Object, Relations and XML in the .NET Framework. In Proceedings of the International Conference on Management of Data, SIGMOD ’06, pages 706–706, 2006. [15] R. Milner. The Definition of Standard ML: Revised. MIT press, 1997. [16] T. Petricek and D. Syme. In the Age of Web: Typed Functional-first Programming Revisited. Post-Proceedings of ML Workshop, 2015. [17] D. Rémy. Type Inference for Records in a Natural Extension of ML. Theoretical Aspects Of Object-Oriented Programming. Types, Semantics and Language Design. MIT Press, 1993. [18] S. Scheglmann, R. Lämmel, M. Leinberger, S. Staab, M. Thimm, and E. Viegas. IDE Integrated RDF Exploration, Access and RDF–Based Code Typing with LITEQ. In The Semantic Web: ESWC 2014 Satellite Events, pages 505–510. Springer, 2014. A. The introduction uses the JsonProvider to access weather information using the OpenWeatherMap service. After registering, you can access the service using a URL http://api. openweathermap.org/data/2.5/weather with query string parameters q and APPID representing the city name and application key. A sample response looks as follows: { "coord": { "lon": 14.42, "lat": 50.09 }, "weather": [ { "id": 802, "main": "Clouds", "description": "scattered clouds", "icon": "03d" } ], "base": "cmc stations", "main": { "temp": 5, "pressure": 1010, "humidity": 100, "temp_min": 5, "temp_max": 5 }, "wind": { "speed": 1.5, "deg": 150 }, "clouds": { "all": 32 }, "dt": 1460700000, "sys": { "type": 1, "id": 5889, "message": 0.0033, "country": "CZ", "sunrise": 1460693287, "sunset": 1460743037 }, "id": 3067696, "name": "Prague", "cod": 200 [19] T. Sheard and S. P. Jones. Template Meta-programming for Haskell. In Proceedings of the ACM Workshop on Haskell, pages 1–16. ACM, 2002. [20] J. G. Siek and W. Taha. Gradual Typing for Functional Languages. In Scheme and Functional Programming Workshop, pages 81–92, 2006. [21] M. Sulzmann and K. Z. M. Lu. A Type-safe Embedding of XDuce into ML. Electr. Notes in Theoretical Comp. Sci., 148 (2):239–264, 2006. [22] N. Swamy, C. Fournet, A. Rastogi, K. Bhargavan, J. Chen, P.-Y. Strub, and G. Bierman. Gradual Typing Embedded Securely in JavaScript. In ACM SIGPLAN Notices, volume 49, pages 425–437. ACM, 2014. [23] D. Syme, K. Battocchi, K. Takeda, D. Malayeri, J. Fisher, J. Hu, T. Liu, B. McNamara, D. Quirk, M. Taveggia, W. Chae, U. Matsveyeu, and T. Petricek. Strongly-typed Language Support for Internet-scale Information Sources. Technical Report MSR-TR-2012-101, Microsoft Research, September 2012. [24] D. Syme, K. Battocchi, K. Takeda, D. Malayeri, and T. Petricek. Themes in Information-rich Functional Programming for Internet-scale Data Sources. In Proceedings of the Workshop on Data Driven Functional Programming, DDFP’13, pages 1–4, 2013. [25] W. Taha and T. Sheard. Multi-stage Programming with Explicit Annotations. ACM SIGPLAN Notices, 32(12):203–217, 1997. ISSN 0362-1340. [26] A. K. Wright and M. Felleisen. A Syntactic Approach to Type Soundness. Information and computation, 115(1):38– 94, 1994. OpenWeatherMap service response }
6cs.PL
Sectoring in Multi-cell Massive MIMO Systems arXiv:1707.09070v1 [cs.IT] 27 Jul 2017 Shahram Shahsavari, Parisa Hassanzadeh, Alexei Ashikhmin, and Elza Erkip Abstract—In this paper, the downlink of a typical massive MIMO system is studied when each base station is composed of three antenna arrays with directional antenna elements serving 120◦ of the two-dimensional space. A lower bound for the achievable rate is provided. Furthermore, a power optimization problem is formulated and as a result, centralized and decentralized power allocation schemes are proposed. The simulation results reveal that using directional antennas at base stations along with sectoring can lead to a notable increase in the achievable rates by increasing the received signal power and decreasing ‘pilot contamination’ interference in multicell massive MIMO systems. Moreover, it is shown that using optimized power allocation can increase 0.95-likely rate in the system significantly. I. I NTRODUCTION With the advent of new technologies such as smart phones, tablets, and new applications such as video conferencing and live streaming, there has been a dramatic increase in the demand for high data rates in cellular systems. On the other hand, it is challenging to achieve high enough data rates in the crowded sub-6 GHz spectrum. Multi-user Multi Input Multi Output systems with large number of antennas (known as massive MIMO), have shown a great potential to achieve very large spectral and energy efficiencies, which makes them a strong candidate for 5G mobile networks [1]. In massive MIMO systems, base stations are usually equipped with a large number of antennas serving much smaller number of users each of which has an omnidirectional antenna. It is shown in [2] that with a simple Time Division Duplex (TDD) protocol, it is beneficial to increase the number of base station antennas in a single cell massive MIMO network. More specifically, it is shown that received signal power is proportional to number of antennas while interference plus noise power is not. However, as shown in [3], another type of inter-cellular interference, called ‘pilot contamination’, appears in multi-cell massive MIMO networks. Typically training sequences should be short, since channels between base station and users change fast. This forces one to use nonorthogonal training sequences in neighboring cells, which causes pilot contamination whose power is proportional to the number of antennas at the base stations. Consequently, Signal to Interference plus Noise Ratio (SINR) converges to a a bounded value as the number of antennas tends to infinity. Most literature on massive MIMO considers omnidirectional base station antennas. It is well-known that using directional antennas along with sectorized antenna arrays at S. Shahsavari, P. Hassanzadeh and E. Erkip are with the ECE Department of New York University, Brooklyn, NY. Email: {shahram.shahsavari,ph990, elza}@nyu.edu A. Ashikhmin is with Bell Labs, Nokia, Murray Hill, NJ, USA. Email: [email protected] each base station is one of the methods to increase SINR in conventional cellular networks [4]. Reference [5] indicates the potential of using directional antennas in massive MIMO systems; however, it does not provide any performance analysis. In this paper, we consider the sectorized setting, analyze the performance of a massive MIMO system with directional antennas at each base station, and provide a lower bound on the achievable downlink rate of the users as a function of large-scale fading coefficients. We formulate a tractable downlink power optimization problem and suggest a centralized scheme to find the optimal power allocation. To reduce the communication and computation overheads, we also provide a sub-optimal decentralized scheme. A numerical comparison between a massive MIMO system with omnidirectional antennas at each base station and one with directional antennas shows that using directional antennas can improve the performance significantly. To the best of our knowledge, this is the first detailed study of massive MIMO systems with directional antennas. II. S YSTEM M ODEL We consider a two-dimensional sectorized hexagonal cellular network with TDD operation, composed of L cells, each with K mobile users. Cell sectoring is done such that three base stations are located at the non-adjacent corners of each cell, as shown in Fig. 1, and each base station is equipped with three directional (120◦ ) antenna arrays such that each array serves one of the three neighboring cells. As depicted in Fig. 1, the users in each cell are served by the three antenna arrays that belong to the base stations located on the corners of the cell. We assume that each directional array has M directional antenna elements, hence there are MB = 3M elements at each base station. We also assume that users have single omnidirectional antennas. 1 3 1 3 2 1 2 3 1 3 1 3 2 1 2 2 1 3 3 2 2 Fig. 1: Sectorized cellular system model In the following we denote cell j by Cj , and user k in cell j by Ukj , where j ∈ [L]1 and k ∈ [K]. Each antenna 1 We denote by [N ] the set of integers from 1 to N . array is uniquely identified by a cell-array index pair (j, i), and is denoted by Aji , where i ∈ [3] indicates the array located in corner i of cell j ∈ [L] (see Fig. 1). User Ukj communicates with all three arrays Aj1 , Aj2 , and Aj3 for uplink and downlink transmissions. A. Directional Antenna Model We adopt the simplified directional antenna model introduced in [6]. Fig. 2 depicts the directivity (power gain) pattern of each array element, where GQ and Gq are the main lobe and back lobe power gains, respectively, and θ, chosen as 2π/3, is the beamwidth of the main lobe. Let φ ∈ [0, π] denote the angular position of a user placed at an angle φ relative to the boresight direction of an antenna element, as in Fig. 2 (left), then the signal transmitted to p and received from the user is multiplied by a gain equal to G(φ). θ Fig. 2: Simplified directional antenna power gain pattern [kl] Let Gji denote the power gain between Ukl and Aji . Note that all users in cell Cj , j ∈ [L] are in the main lobe coverage of arrays {Aji : i ∈ [3]}, and therefore, observe the power gain GQ for any k ∈ [K] and any i ∈ [3]. We assume a lossless antenna model which implies that GQ + 2Gq = 3, and GQ ≤ 3 due to the conservation of power radiated in all directions [6]. B. Channel Model Due to TDD operation and channel reciprocity, downlink and uplink transmissions propagate similarly. We assume narrow-band flat fading channel model in which, the complex channel (propagation) coefficient between the m-th antenna element of Aji and Ukl is given by q [kl] [kl] [kl] (1) gmji = βji hmji , [kl] where βji ∈ R+ is the large-scale fading coefficient, which depends on the shadowing and distance between the [kl] corresponding user and antenna element, and hmji ∈ C is the small-scale fading coefficient. The received signal also includes additive white Gaussian noise. Since the distance between a user and an array is much larger than the distance between the elements of an array, we assume that the largescale fading coefficients are independent of the antenna [kl] element index m. The small-scale fading coefficients, hmji , are assumed to be complex Gaussian zero-mean and unitvariance, and for any (k, l, m, j, i) 6= (n, v, r, u, q) coeffi[kl] [nv] cients hmji and hruq are independent. [kl] We will use gji ∈ CM ×1 to denote channel vector between Aji and Ukl . We further assume that small-scale and large-scale fading coefficients are constant over smallscale and large-scale coherence blocks represented by T and Tβ symbols, respectively. While the small-scale fading coefficients significantly change as soon as a user moves by a quarter of the wavelength, large-scale fading coefficients are approximately constant in the radius of 10 wavelengths (see [7] and references there). Thus, Tβ ≈ 40 T . We also assume that small-scale channel coefficients are independent across different small-scale coherence blocks, and similarly large-scale channel coefficients. C. Time-Division Duplexing Protocol Uplink and downlink transmissions, require access to the channel vectors at the antenna arrays. Channel vectors are estimated by antenna arrays using uplink training transmissions in each small-scale coherence block T . Similar to [3] and [8], we assume that the same set of K orthonormal training sequences (pilots) is reused in each cell, such that sequence † r[k] ∈ Cτ is assigned to Ukl in Cl , and r[k] r[n] = δkn for any k, n ∈ [K] and any l ∈ [L]. Note that since the number of orthogonal τ -tuples can not exceed τ , we have K ≤ τ [8]. Due to the independence of channel coefficients across different small-scale coherence blocks, training is repeated in each block T , hence τ ≤ T . The system operates based on the TDD protocol proposed in [3], [8]. The first two steps of the protocol are carried out once for each large-scale coherence block, and the last five are repeated over small-scale coherence blocks. Time-Division Duplexing Protocol Step 1: In the beginning of each large-scale coherence block, each base station estimates the large-scale fading coefficients between itself and all the users in the network. Step 2: Each array transmits a measure of the large-scale fading coefficients estimated in Step 1, to the users in its cell, which are later used for decoding the downlink signals in Step 7. More specifically, Aji , i ∈ [3] transmits the decoding coefficient defined as q [kj] [kj] [kj] M ρr τ ρji Gji βji [kj] , (2) ji , PL [kl] [kl] 1/2 σr2 + ρr τ l=1 Gji βji to Ukj , k ∈ [K], where σr2 is the reverse link (uplink) noise power, ρr is the reverse link transmit power from each [kj] user in Cj to arrays {Aji : i ∈ [3]}, and ρji denotes the forward link (downlink) transmit power assigned by Aji to Ukj . Forward link power allocation strategies are discussed in Sec. III-B. Step 3: All users synchronously transmit their uplink signals. Step 4: All users synchronously transmit their training sequences (pilots). Step 5: Each array estimates the channel vector between itself and the users located within its cell using the training sequences, and processes the received uplink signals. Step 6: Arrays use conjugate beamforming (based on the estimated channel vectors and power allocation) in order to prepare the downlink signals {s[kj] : k ∈ [K]} for transmission, where s[kj] denotes the signal intended for Ukj . All arrays synchronously transmit the prepared signals. Step 7: User Ukj , k, j ∈ [K]×[L] decodes its received signal, denoted by y [kj] , using the decoding coefficients received in Step 2 as with, P [kj] = [kj] I1 y ŝ[kj] = P3 = [kj] [kj] . i=1 L X l=1 l6=j (3) i=1 ji 3 q X [kj] I2 = [kj] [kj] [kj] 2 ρji Gji λji 3 q X [kl] , [kj] [kj] ρli Gli λli (6) 2 , (7) i=1 L X 3 X [kj] [kj] ρli Gli βli , (8) l=1 i=1 For the TDD protocol given above, we assume that each array Aji can accurately estimate and track all the large-scale fading coefficients, discussed in [8], and it has the means [kj] to forward the decoding coefficients, ji to the users in Cj . As in [8], we will not consider the resources needed for implementing these assumptions. [kj] Remark 1. According to (2), ji only depends on the large-scale fading coefficients the number of which, does not increase with the number of antennas as discussed in Sec. II-B. Therefore, the amount of information exchange between each antenna array and its corresponding users does not depend on M , which makes the massive MIMO system scalable. In the following we only analyze the downlink transmissions; the analysis of the uplink scenario follows similarly. III. D OWNLINK S YSTEM A NALYSIS In this section, we analyze the downlink system performance by providing SINR expression. Theorem 1 provides a lower bound on user downlink transmission rates. We assume that linear MMSE estimation is used to estimate the channel vectors in Step 5 of the TDD protocol. Furthermore, as stated in step 2 of the TDD protocol, power assignments are represented explicitly. In our analysis, we assume that E[s[kj] ] = 0 and Var[s[kj] ] = 1 for any (k, j) ∈ [K] × [L]. Theorem 1. For the sectorized multi-cell massive MIMO system with directional antennas described in Sec. II, the downlink transmission rate to user k ∈ [K] in cell j ∈ [L], R[kj] , is lower bounded by R[kj] ≥ log2 (1 + SIN R[kj] ), (4) where, P [kj] [kj] I1  = [kl] [kl]2 M ρr τ Gji βji L P [kv] [kv] Gji βji σr2 + ρr τ 1/2 , (9) v=1 PK [kl] and ρli , k=1 ρli is the forward link transmission power at array i ∈ [3] in cell j ∈ [L] and σf2 denotes forward link noise power. The sketch of the proof is provided in Appendix A. In Theorem 1, P [kj] is the desirable signal power received [kj] [kj] by Ukj , and I1 , I2 correspond to two types of interfer[kj] ence experienced by the user. More specifically, I1 is the interference created by pilot reuse in multiple cells, referred to as pilot contamination, and similar to P [kj] , it grows linearly√with the number of base station antenna elements [kj] [kj] (λli ∝ M ). The second interference I2 , referred to as undirected interference, is created by nonorthogonality of channel vectors of different users, channel estimation error, and lack of user’s knowledge of effective channel [8]. This type of interference does not grow with M , and hence has negligible contribution when M is very large. Although increasing M leads to higher SINR for all users, we remark that SINR converges to a bounded limit when M goes to infinity. In the next section, we consider optimal and suboptimal strategies for forward link power allocation. In Sec IV we evaluate the system performance and show that using optimized power allocation can lead to a significant performance improvement. B. Forward Link Power Allocation A. Downlink System Performance SIN R[kj] = [kl] λji [kj] + I2 + σf2 , (5) In Step 2 and 6 of the TDD protocol given in Sec. II-C, arrays divide their forward link transmit power among the users they serve for downlink transmissions. In the following, PK [kl] we assume that ρli = k=1 ρli ≤ ρf /3 for any (l, i) ∈ [L] × [3], where ρf is the base station maximum forward link power, and discuss three different strategies with different communication and computation complexities, and compare their performance in Sec. IV. 1) Uniform Power Allocation (UPA): In this suboptimal strategy, which requires no cooperation across the network, each array transmits at full power and divides its forward link transmit power uniformly across the users in its cell such [kj] ρf that each gets a portion equal to ρji = 3K , ∀(j, i, k) ∈ [L] × [3] × [K]. 2) Optimal Centralized Power Allocation (CPA): The powers allocated to each user can be globally optimized in order to maximize the worst downlink SINR (equivalently rate) among all users in the network. A central entity formulates and solves a constrained max-min optimization problem based on the SINR expression given in Theorem 1 as follows, ensuring to satisfy each array’s maximum forward link transmit power. max min {ρnl li } k,j P [kj] I1 Algorithm 1 Centralized Power Allocation Choose a tolerance threshold δ > 0, and initialize γmin and γmax to define a range of relevant values of the objective function in (11). 2: while γmax − γmin > δ do max and solve the following convex 3: Set γ := γmin +γ 2 feasibility checking problem for Vkj , [Xkj , Ykj , 1]: 1: ||Vkj || ≤ [kj] [kj] + I2 + σf2 (10) 3 L P P l=1 i=1 l6=j subject to: K X [nl] ρli n=1 [nl] ρli [kj] 3 L X X l=1 l6=j [kl] ψli [kj] q [kj] [kj] 2 Gli λli 2 ≤ Xkj , ∀(j, k) ∈ [L] × [K], [kl] q ψli [kj] i=1 ψji q [kj] [kj] Gli λli [kj] [kj] Gji λji , ∀(j, k) ∈ [L] × [K], 2 2 ≤ Xkj , ∀(j, k) ∈ [L] × [K], [nl] [kj] [kj] 2 (ψli )2 Gli βli ≤ Ykj , ∀(j, k) n=1 i=1 l=1 K P [kl] ρ (ψli )2 ≤ 3f , ∀(l, i) ∈ [L] × [3], k=1 [kl] ψli ≥ 0, ∀(l, i, k) ∈ [L] × [3] × [K], ≥ 0, ∀(l, i, n) ∈ [L] × [3] × [K] subject to: P3 L P K P 3 P ρf , ∀(l, i) ∈ [L] × [3] ≤ 3 with P [kj] , I1 , and I2 given in (6)-(8). By introducing slack variables Xkj and Ykj , (10) is equivalent to: q 2 P3 [kj] [kj] [kj] Gji λji i=1 ψji max min (11) 2 + Y 2 + σ2 nl ,X ,Y } k,j Xkj {ψli nl nl kj f √1 γ 4: 5: 6: 7: 8: 9: ∈ [L] × [K], if above problem is feasible then γmin := γ else γmax := γ end if end while i=1 L X K X 3 X [nl] [kj] [kj] (ψli )2 Gli βli 2 ≤ Ykj , ∀(j, k) ∈ [L] × [K], l=1 n=1 i=1 K X ρf [kl] (ψli )2 ≤ , ∀(l, i) ∈ [L] × [3], 3 k=1 [kl] ψli ≥ 0, ∀(l, i, k) ∈ [L] × [3] × [K], q [kj] [kj] where, ψji = ρji . The equivalence between (10) and (11) follows from the fact that first two constraints in (11) hold with equality at the optimum. Proposition 1. Power optimization problem (11) is quasiconcave. The proof of proposition 1 is provided in Appendix B. Due to quasi-concavity of problem (11), the solution can be obtained using the bisection method and a series of feasibility checking convex problems provided in Algorithm 1. This power allocation strategy requires a central entity with access to the large-scale fading coefficients of the entire network, and has a much higher complexity compared to the UPA scenario. In this scheme, in each large-scale coherence block Tβ , the base stations send their estimated large-scale fading coefficients to a central entity. The central entity solves the optimization problem using Algorithm 1, and sends the results back to the base stations. 3) Decentralized Power Allocation (DPA): Computational and communication complexities of CPA can be significantly reduced using an optimization based on local information. Each antenna array, say Aji , considers itself and the antenna arrays in a ring of cells around Cj such that if this would be the entire network. Aji collects all large-scale fading channel coefficients between all antennas arrays and all users in this network and solves the optimization problem (10), formulated for this network. Next, Aji uses the found [kl] downlink powers ρli , ∀k ∈ [K], and discard the powers found for other antenna arrays in the ring. IV. S IMULATIONS AND D ISCUSSIONS In this section, we evaluate how effective sectoring is in mitigating the interference in massive MIMO systems. In our simulations we consider the following sectorized settings: Directional Arrays with UPA (Dir-UPA), Directional Arrays with CPA (Dir-CPA), Directional Arrays with DPA (DirDPA), and compare them with their omnidirectional counterparts: Omnidirectional Base Stations with UPA (Omni-UPA), Omnidirectional Base Stations with CPA (Omni-CPA), and Omnidirectional Base Stations with DPA (Omni-DPA). The system model in settings Dir-UPA, Dir-CPA and Dir-DPA is the one introduced in Sec II, while the other three settings are modeled based on [8], where one base station with MB omnidirectional antenna elements, is placed at the center of the cell, and has a forward link power budget of ρf . For each setting, the forward link powers are allocated according to their respective strategies defined in Sec. III-B. We consider a network composed of L = 19 cells (two rings of cells around a central cell), each with a radius of R = 1 km, and K = 9 users distributed uniformly across each cell except for a disk with radius r = 60 m around the base stations. In order to avoid the cell edge effect, cells are \ Dir-UPA Dir-CPA 1 0.8 0.8 0.8 0.6 0.4 0.2 0 -3 10 Empirical CDF 1 Empirical CDF Empirical CDF Omni-DPA Omni-CPA Omni-UPA 1 0.6 0.4 0.2 -2 -1 0 10 10 10 Normalized Received Signal Power 1 10 0 Dir-DPA 0.6 0.4 0.2 -4 -3 -2 -1 10 10 10 10 Normalized Pilot Contamination Power (a) (b) 0 -2 -1 0 1 10 10 10 10 Normalized Undirected Interference Power (c) Fig. 3: CDF of (a) normalized received signal power, (b) normalized pilot contamination power, and (c) normalized undirected interference power, for MB = 102 . wrapped into a torus as in [8], [9]. The large-scale fading coefficients are modeled based on the ‘COST-231’ model at [kj]  central frequency fc = 1900 M Hz as 10 log10 βli = − [kj] [kj] 140 − 35.2 log10 (dli ) + Ψ, where dli denotes the distance (in km) between Ukj and Ali , and Ψ denotes the  shadow fading coefficient. We assume that Ψ ∼ N 0, 8 , thermal noise power is −101 dBm, and the noise figure at each base station and each user is 9 dB, hence σf2 = σr2 = −92 dBm. The antenna main-lobe and back-lobe power gains are GQ = 2.98 and Gq = 0.01, respectively, the reverse link transmit power is ρr = 23 dBm, and the maximum forward link transmit power of each base station is set at ρf = 30 dBm. Figs. 3(a)-3(c) display the CDF of the normalized received signal power where normalization with respect to forward link noise power, i.e. P [kj] /σf2 , and normalized version of two types of interference powers affecting the users in a [kj] [kj] network, i.e. I1 /σf2 and I2 /σf2 . We only provide the 2 simulations for MB = 10 , since, as seen in Theorem 1 in Sec. III-A, received signal power and pilot contamination power are linearly proportional to M , while undirected interference power is independent of M . When comparing the Dir-UPA and Omni-UPA settings, we observe that sectoring affects each of these components as follows: 1) Received signal power P [kj] : With sectoring, received signal power is higher for most of the users. In Dir-UPA, each user communicates with three arrays, each of which has M = MB /3 elements and a forward link transmit power of ρf /3. Even though the per-element forward link transmit power is equal to that in Omni-UPA, i.e. ρf /MB , users benefit from the directionality of the antenna arrays. In this case, the signals transmitted from each array are emitted with the main-lobe directionality gain (GQ ≈ 3), compared to the unity directionality gain of an omnidirectional base station. Another reason for the increase in the received signal power is reduction of the pilot contamination effect (see the next subsection). The pilot contamination has two malicious effects. First, a base station creates directed interference to users located in other cells. Second, since the base station deviates part of its transmit power to other users, it effectively reduces the transmit power for users located in its cell. With Base station Mobile user Antenna pattern Desired pilot Interfering pilot Fig. 4: Pilot contamination in sectorized networks. sectoring the pilot contamination effect is getting smaller (see the next subsection), and therefore the signal power for legitimate users increases. The net gain translates into an increase in the received signal power of 60% of the users. [kj] 2) Pilot contamination I1 : Sectoring reduces the effect of pilot contamination. This is due to the fact that with the directionality in Dir-UPA, arrays are able to derive better channel estimates from the received pilots, and further mitigate the pilot contamination. In Omni-UPA, each array receives the pilots transmitted from all cells and in all directions. However, directional arrays receive these signals with different directionality gains from the users in different cells, i.e., one-third of the signals (those in the main lobe coverage of the arrays) are amplified with GQ ≈ 3, while the remaining two-thirds (in the back lobe coverage of the arrays) are attenuated with Gq ≈ 0 as illustrated in Fig. 4. In this case, the effective channel estimation SINR is approximately 3 times larger compared to the omnidirectional setting, which in turn, as depicted in Fig. 4, reduces the interference. [kj] 3) Undirected interference I2 : Sectoring does not affect undirected interference power. In both Dir-UPA and OmniUPA settings, the multi-user activity in the overall network contributes to the undirected interference power, which arises due to the nonorthogonality of the channel vectors and other parameters mentioned in Sec. III-A. More specifically, in the sectorized scenario, all of the MB L antennas create interference, among which, each user receives the signals emitted from one-third amplified by a factor of GQ ≈ 3, and signals from the remaining antennas are attenuated by Gq ≈ 0. Therefore, in sectorized scenario there are MB L/3 effective antenna elements in the network contributing to [kj] I2 by transmitting their downlink signals with power ρf /MB amplified by GQ ≈ 3, creating the same amount of interference compared to the omnidirectional setting, where [kj] there are MB L antenna elements contributing to I2 by transmitting their downlink signals with power ρf /MB . We observe that for both directional and omnidirectional antenna settings, with CPA and DPA, the received signal power is higher for low-SINR users, and interference power is less for all users compared with their UPA counterparts. We remark that the difference in the performance of DPA and CPA is small for both settings. We provide CDFs of the downlink achievable rates for sectoring, given in Theorem 1, and compare them for different settings in Figs. 5(a)-(c), for MB = 102 , MB = 104 , and MB = 106 , respectively. For comparison we use the 0.95likely rate per user criterion, defined as the rate achieved by 95% of the users, as in [3], [8], [10]. For small values of MB , the total interference imposed on Ukj is dominated by undirected interference, which is similar for settings with and without sectoring. Therefore, directional arrays increase user SINR due to the increase in their received signal powers. For example with MB = 102 , comparing the performance of Dir-UPA with Omni-UPA, given in Fig. 5(a), we observe that sectoring is able to increase the 0.95-likely rate by a factor of 5.20. We remark that as argued in Fig. 5(a) in Dir-UPA, the achievable rate of around 60% of the users with lower SINR has been improved with a sacrifice from the rate of user with higher SINR. For intermediate MB , the two types of interference are comparable, and therefore, in addition to the increase in received signal power, directional arrays are able to alleviate the effect of the total interference. As illustrated in Fig. 5(b), for MB = 104 the 0.95-likely rate has an improvement with a factor of 5.47 with the DirUPA compared to Omni-UPA, and the rate of 66% of the users is increased. In the regime of very large MB , pilot contamination is dominant, and therefore, as MB → ∞, SINR converges to a finite value. For MB = 106 , given in Fig. 5(c), the 0.95-likely rate in Dir-UPA is 7.65× higher compared to Omni-UPA, with an improvement in achievable rate for 72% of the users. A comparison among Dir-UPA, Dir-CPA, and Dir-DPA for different MB in Fig. 5 reveals that optimized power allocation schemes can improve 0.95-likely rate by a factor between 1.48 and 2.04. We also would like to note that empirical CDF of achievable rate with decentralized power allocation (Dir-DPA) is only marginally different from the CDF of the optimal centralized power allocation (Dir-CPA), while using DirDPA allows us to reduce the required computation and communication overheads significantly. V. C ONCLUSIONS In this paper, we have studied the benefits of using directional antennas at the base station in a massive MIMO system. We have derived a lower bound on user downlink achievable rates, and have discussed centralized and decentralized power allocation strategies by formulating power optimization problems which differ in terms of performance and complexity. We have compared the performance of different massive MIMO settings with and without sectoring, and for different power allocation methods in terms of received signal power, pilot contamination, undirected interference and their achievable rate. The numerical results have revealed that while sectoring does not affect the undirected interference, it can alleviate the effect of pilot contamination and increase received signal power. Finally, we have discussed how sectoring and the use of directional antennas leads to higher 0.95likely rate as a measure of reliability in the system. We have observed that by increasing the number of antennas at each base station, the improvement due to sectoring increases, due to the reduction of pilot contamination which is proportional to the number of antennas. Based on our simulation results, power optimization is an effective way to increase the 0.95likely rate further. A PPENDIX A P ROOF OF T HEOREM 1 Due to space limit, we only provide a sketch of the proof here. As described in the TDD protocol given in Sec. II-C, once the arrays have estimated the large-scale fading coefficients (step 1) and transmitted the decoding coefficients to their users (step 2), all users synchronously transmit their uplink signals and training sequences, respectively, in steps 3 and 4. Then, in step 5, each array estimates its channel vector using an MMSE estimate. More specifically, Aji estimates [kl] the channel vector gji as: [kl] ĝji = [kl] √ θji ρr τ L q X [kv] [kv] [kl] Gji gji + ŵji , (12) v=1 where, q [kl] θji = σr2 [kl] [kl] [kl] [kl] ρr τ Gji βji + ρr τ L P v=1 , (13) [kv] [kv] Gji βji 2 and, ŵji ∼ CN (0, θji IM ), where IM is M × M identity [kl] [kl] [kl] [kl] matrix. We assume that gji = ĝji + g̃ji where g̃ji denotes the MMSE estimation error. It can be shown that  1  [kl]2 [kl] ĝji ∼ CN 0, λji IM , (14) M 2 [kl]   λji   [kl] [kl] g̃ji ∼ CN 0, βji − IM , (15) M [kl] where, λji is given in (9). In step 6, array (j, i) ∈ [L] × [3] uses conjugate beamforming based on its channel estimates to transmit the downlink signals {s[kj] : k ∈ [K]} to its users, as q [kj] K X ρji [kj]† xji = ĝji s[kj] , (16) [kj] λ k=1 ji Dir-CPA 1 0.8 0.8 0.8 0.6 0.4 Empirical CDF 1 Empirical CDF Empirical CDF Dir-UPA Omni-DPA Omni-CPA Omni-UPA 1 0.6 0.4 0.6 0.4 0.2 0.2 0.2 0.05 0.05 -3 -2 10 -1 Dir-DPA 0.05 0 0 10 Achievable Rate(bps/Hz) 10 10 10 Achievable Rate(bps/Hz) (a) 1 0 10 1 10 10 Achievable Rate(bps/Hz) (c) (b) 2 4 6 Fig. 5: CDF of achievable downlink rates (a) MB = 10 , (b) MB = 10 and (c) MB = 10 . [kj] where ρji denotes the power allocated to Ukj by Aji . User Ukj receives the following downlink signal: case downlink SINR of the of Ukj , denoted by SIN R[kj] , is SIN R[kj] = y [kj] = L X 3 q X [kj] [kj] Gli xli gli + w[kj] l=1 i=1 = 3 X q [kj] [kj] ρji Gji [kj] i=1 λji Therefore, Ukj ’s downlink rate, R[kj] , is lower bounded by h i [kj]† [kj] E ĝji ĝji s[kj] [kj] {z } T0 q [kj] [kj] 3 h i X ρji Gji  [kj]† [kj] [kj]† [kj] + ĝ ĝ − E ĝ ĝ s[kj] ji ji ji ji [kj] λji i=1 | {z } T1 q [kl] [kj] 3 L X X ρli Gli [kl]† [kj] [kl] + ĝli ĝli s [kl] λli l=1 i=1 l6=j + {z 3 X K L X X q [nl] [nl] λli l=1 i=1 n=1 n6=k + [kj] ρli Gli | L X 3 q X } T2 [nl]† [kj] [nl] ĝli s A PPENDIX B P ROOF OF P ROPOSITION 1 The constraints of problem (11) are convex. To prove the quasi-concavity, it suffices to show that the objective function nl , Xnl , Ynl } for in (11) is quasi-concave. Define Ω , {ψli (l, i, n) ∈ [L] × [3] × [K], the set of optimization variables. The objective function of (11) is f (Ω) = min k,j [kj] + w[kj] , l=1 i=1 | It is straightforward to calculate variance of the terms T0 , . . . , T4 based on (9), (14), (15), and the channel statistics. Substituting these terms in (17) will conclude the proof. P3 } T3 [kj] {z T4 [kj] ĝli {z Gli xli g̃li [kj] R[kj] = I(y [kj] ; s[kj] | j1 , j2 , j3 ) ≥ log2 (1 + SIN R[kj] ). | | Var[T0 ] . Var[T1 ] + Var[T2 ] + Var[T3 ] + Var[T4 ] (17) [kj] i=1 ψji q [kj] [kj] Gji λji 2 + Y 2 + σ2 Xkj kj f 2 . For every γ ≥ 0, the upper-level set of f (Ω) is }  where, w[kj] ∼ CN 0, 1 denotes the noise. T0 corresponds to the part of the received signal that Ukj can decode, while T1 , . . . , T4 contribute to the interference and noise. More specifically, using (9) and (14), it can be shown that P [kj] [kj] T0 = s[kj] i ji , and given {ji : i ∈ [3]}, user Ukj can [kj] decode T0 using (3) to find ŝ in step 7 of TDD protocol. Furthermore, it can be shown that any two of the terms T0 , . . . , T4 are uncorrelated. According to Theorem 1 of [11], the worst case of uncorrelated additive noise is independent Gaussian noise with the same variance. Hence, the worst- U (f, γ) = {Ω : f (Ω) ≥ γ} q 2 P3 [kj] [kj] [kj] Gji λji ψ i=1 ji = {Ω : ≥ γ, ∀(k, j)} 2 + Y 2 + σ2 Xkj kj f q 3 1 X [kj] [kj] [kj] = {Ω : ||Vkj || ≤ √ ψji Gji λji , ∀(k, j)}, γ i=1 where Vkj , [Xkj , Ykj , 1]. Because U (f, γ) can be represented as a second order cone, it is a convex set. Therefore, f (Ω) is quasi-concave. R EFERENCES [1] E. G. Larsson, O. Edfors, F. Tufvesson, and T. L. Marzetta, “Massive MIMO for next generation wireless systems,” IEEE Communications Magazine, vol. 52, no. 2, pp. 186–195, 2014. [2] T. L. Marzetta, “How much training is required for multiuser MIMO?” in 2006 Fortieth Asilomar Conference on Signals, Systems and Computers. IEEE, 2006, pp. 359–363. [3] ——, “Noncooperative cellular wireless with unlimited numbers of base station antennas,” IEEE Transactions on Wireless Communications, vol. 9, no. 11, pp. 3590–3600, 2010. [4] J. G. Andrews, W. Choi, and R. W. Heath Jr, “Overcoming interference in spatial multiplexing MIMO cellular networks,” IEEE Wireless Communications, vol. 14, no. 6, pp. 95–104, 2007. [5] Y. Mehmood, W. Afzal, F. Ahmad, U. Younas, I. Rashid, and I. Mehmood, “Large scaled multi-user mimo system so called massive mimo systems for future wireless communication networks,” in Automation and Computing (ICAC), 2013 19th International Conference on. IEEE, 2013, pp. 1–4. [6] R. Ramanathan, “On the performance of ad hoc networks with beamforming antennas,” in Proceedings of the 2nd ACM international symposium on Mobile ad hoc networking & computing. ACM, 2001, pp. 95–105. [7] H. Huang, C. B. Papadias, and S. Venkatesan, MIMO Communication for Cellular Networks. Springer Science & Business Media, 2011. [8] A. Ashikhmin, T. L. Marzetta, and L. Li, “Interference reduction in multi-cell massive MIMO systems I: Large-scale fading precoding and decoding,” arXiv preprint arXiv:1411.4182, 2014. [9] M. Iridon and D. W. Matula, “Symmetric cellular network embeddings on a torus,” in Computer Communications and Networks, 1998. Proceedings. 7th International Conference on. IEEE, 1998, pp. 732–736. [10] L. Li, A. Ashikhmin, and T. Marzetta, “Interference reduction in multicell massive MIMO systems II: Downlink analysis for a finite number of antennas,” arXiv preprint arXiv:1411.4183, 2014. [11] B. Hassibi and B. M. Hochwald, “How much training is needed in multiple-antenna wireless links?” IEEE Transactions on Information Theory, vol. 49, no. 4, pp. 951–963, 2003.
7cs.IT
On the control of agents coupled through shared resources arXiv:1803.10386v1 [cs.SY] 28 Mar 2018 Syed Eqbal Alam∗ , Robert Shorten† , Fabian Wirth‡ , and Jia Yuan Yu∗ Abstract— We consider a control problem involving a number of agents coupled through multiple unit-demand resources. Such resources are indivisible and each agent’s consumption is modeled as a Bernoulli random variable. Controlling such agents in a probabilistic manner, subject to capacity constraints, is ubiquitous in smart cities. For instance, such agents can be humans are in a feedback loop—who respond to a price signal), or automated decision-support systems that strive toward system-level goals. In this paper, we consider both a single feedback loop corresponding to a single resource and multiple coupled feedback loops corresponding to multiple resources consumed by the same population of agents. For example, when a network of devices allocate resources to deliver a number of services, these services are coupled through capacity constraints on these resources. We present a new algorithm with basic guarantees of convergence and optimality, as well as an example illustrating its performance. Keywords— distributed optimization, optimal control, multi-resource allocation, unit-demand resources, smart city, electric vehicle charging I. I NTRODUCTION Classical control has much to offer in a smart city context. However, while this is without doubt true, many problems arising in the context of smart cities reveal subtle constraints that are relatively unexplored by the control community. At a high level both classical control, and smart city control, deal with regulation problems. However, in many (perhaps most) smart-city applications, control involves orchestrating the aggregate effect of a number of agents who respond probabilistically to a signal (sometimes called a price). A fundamental difference between classical control and smart-city control, is the need to study the effect of control signals on the statistical properties of the populations that we wish to influence (while at the same time ensuring that the control is in some sense optimal). This fundamental difference concerns the need of ergodic feedback systems, and even though this problem is rarely studied in control, it is the issue that is perhaps the most pressing in real-life applications, since the need for predictability, at the level of individual agents, underpins an operator’s ability to write economic contracts. Our starting point for this work is our previous published papers [1], [2] and the the observation that many problems ∗ Concordia Institute for Information Systems Engineering, Concordia University, Montreal, Quebec, Canada, email: sy [email protected], [email protected] † School of Electrical, Electronic and Communications Engineering, University College Dublin, Dublin, Ireland, email: [email protected] ‡ Faculty of Computer Science and Mathematics, University of Passau, Passau, Germany, email: [email protected] in smart-cities can be cast in a framework, where a large number of agents, such as people, cars, or machines, often with unknown objectives, compete for a limited resource. The challenge of allocating this resource in a manner that is not wasteful, utilized the resource optimally, and gives a guaranteed level of service to each of the agents competing for that resource. For example, allocating parking spaces [3], [4], [5], regulating cars competing for shared road space [6], or allocating shared bikes [7], [8], are all examples in which resource utilization should be maximized, while at the same time delivering a certain quality of service to individual agents is a paramount constraint. As we have noted in [2], at a high level these are primarily optimal control problems but with the added objective of controlling the microscopic properties of the agent population. Thus, the design of feedback systems for deployment in cities must combine notions of regulation, optimization, and the existence of this unique invariant measure [9]. Specifically, in this paper we consider the problem of controlling a number of agents coupled through multiple shared resources, where each agent demands the resources in a probabilistic manner. This work builds strongly on our previous work in [1] in which the optimal control and ergodic control of a single population of agents is considered. As we have mentioned, controlling networks of agents which demand resources in a probabilistic manner is ubiquitous in the study of problems in smart cities. In smart city applications, the probabilistic intent of agents can be natural (where humans are in a feedback loop and respond, for example, to a price signal), or designed (implemented in a decision support system) so that the network achieves system level goals. Often, such feedback loops are coupled together as agents contribute or participate in multiple services. For example, when a network of devices allocate resources to deliver a number of services, these services are coupled through the consumption of multiple shared resources, usually we call such resources as unit demand resources which are either allocated one unit of the resource or not allocated. A concrete manifestation of such a system is the IBM’s Research project parked cars as a service deliver platform [10]. Here, networks of parked cars collaborate to offer services to city managers. Examples of services include wifi coverage, finding missing objects, and gas leak detection and localization. Here vehicle owners allocate parts of their resource stochastically to contribute to different services, each of which are managed by a feedback loop. The allocation between services is usually coupled via some nonlinear function that represents the trade-off between resource allocation (energy, sensors), and the reward for participating in delivering a particular service. We shall give a concrete example of such a system later in the paper. It is our firm belief that such systems are ubiquitous in smart cities, and represent a new class of problems in feedback systems. Our principal contribution in this paper is to establish stochastic schemes for practically important class of problems for number of agents coupled through multiple shared resources in coupled feedback loops. Each agent demands the shared resources in a probabilistic manner based on its private cost, and the constraints are based on multiple shared resources. This scheme is generalization of the single resource allocation algorithm of [1]. Furthermore, the results of convergence as well as optimality are derived for single resources. The paper is organized as follows, in Section II we describe the notations used as well as formulate the problem and provide the optimality conditions for the optimization problem. A brief description of unit-demand single resource allocation through single feedback loop is presented in Section III. Some convergence properties are also provided there. We describe the distributed stochastic unit-demand multiresource allocation algorithms through coupled feedback loops in Section IV. In Section V we present an application of the proposed algorithm in which a number of electric cars are coupled through level 1 and level 2 charging points, we also illustrate the simulation results. Section VI lists open problems and possible applications. II. P RELIMINARIES Suppose that there are n coupled agents. They are coupled through m resources R1 , R2 , . . . , Rm and each agent has a cost function that depends on the allocation of these resources in the closed coupled feedback loop. Let the desired value or capacity of R1 , R2 , . . . , Rm is C 1 , C 2 , . . . , C m , respectively. We denote N := {1, 2, . . . , n}, M := {1, 2, . . . , m} and use i ∈ N as an index for agents and j ∈ M to index the resources. Let ξij (k) denotes independent Bernoulli random variable which represents the instantaneous allocation of resource Rj of agent i at time step k. Furthermore, let yij (k) ∈ [0, 1] denotes the average allocation of resource Rj of agent i at time step k. We calculate yij (k) as follows, k yij (k) 1 X j ξi (`), = k+1 (1) `=0 for i ∈ {1, . . . , n} and j ∈ {1, . . . , m}. We assume that agent i has a cost function gi : (0, 1]m → R which associates a cost to a certain allotment of resources and depends on the agent. We assume that gi is twice continuously differentiable, convex, and increasing in all variables, for all i. We also assume that the agents do not share their cost functions or allocation information with other agents or control unit. Then, instead of defining the resource allocation problem in terms of the instantaneous allocations ξij (k) ∈ {0, 1}, we define the objective and constraints in terms of averages as follows, n X min 1 m y1 ,...,yn subject to gi (yi1 , . . . , yim ), i=1 n X yij = C j , (2) j ∈ M, i=1 yij ≥ 0, i ∈ N , j ∈ M. Let y ∗ = (y1∗1 , . . . , yn∗m ) ∈ (0, 1]nm denotes the solution to (2). Let N denotes the set of natural numbers and k ∈ N denotes the time steps. Next, our objective is to propose a distributed iterative algorithm that determines instantaneous allocations {ξij (k)} and ensures that the long-term average allocations, as defined in (1) converge to optimal allocations, as in (3) to achieve minimum social cost, for every agent i and resource Rj (treated in Section IV). yij (k) → yi∗j , (3) as k → ∞, thereby achieving the minimum social cost in the sense of long-term averages. By compactness of the constraint set optimal solutions exist. Assumption Pn that gi is strictly convex leads to strict convexity of i=1 gi , which follows that the optimal solution is unique. A. Optimality conditions Let L : Rn × Rm × Rm → R, and µj and τ j are the Lagrange multipliers of resource Rj , for j ∈ {1, 2, . . . , m}. Then we define the Lagrangian of Problem (2) as follows, L(y 1 , . . . , y m , µ1 , . . . , µm , τ 1 , . . . , τ m ) n m n m X X X X = gi (yi1 , . . . , yim ) − µj ( yij − C j ) + τ j yij . i=1 j=1 i=1 j=1 (4) yi∗1 , . . . , yi∗m Recall that ∈ (0, 1] are the optimal allocations of agent i of Problem (2) (primal values) and suppose that µ∗j and τ ∗j are the optimal Lagrange multipliers for j ∈ {1, . . . , m}. Now, let ∇L denotes the Jacobian of L. Since yi∗1 , . . . , yi∗m minimize L(y 1 , . . . , y m , µ∗1 , . . . , µ∗m , τ ∗1 , . . . , τ ∗m ) which leads that its Jacobian ∇L(y 1 , . . . , y m , µ∗1 , . . . , µ∗m , τ ∗1 , . . . , τ ∗m ) must be zero. Thus, from (4) we obtain as follows, n X ∇gi (yi∗1 , . . . , yi∗m ) i=1 − m X j=1 n m X X µ∗j ∇( yi∗j − C j ) + ∇τ ∗j yi∗j = 0. i=1 (5) j=1 As for all i and j, yi∗j ∈ (0, 1] and τ ∗j ≥ 0 then from complementary slackness τ ∗j yi∗j = 0 =⇒ τ ∗j = 0, hence the last term of (4) and (5) vanishes. Thus, we rewrite (5) as follows, n X i=1 ∇gi (yi∗1 , . . . , yi∗m ) = m X j=1 n X µ ∇( yi∗j − C j ). ∗j i=1 (6) With careful analysis we find that the optimal values satisfy all KKT conditions which are necessary and sufficient conditions of optimality for differentiable convex functions (Chap. 5.5.3 [11]). Now, to find the derivative of cost function of each agent we proceed as follows. Let ∇j gi denotes (partial) derivative of gi with respect to resource Rj . Then, from (6), we obtain: ∇j gi (yi∗1 , . . . , yi∗m ) ∗j =µ . In other words, we have: ∇j gi (yi∗1 , . . . , yi∗m ) = ∇j gu (yu∗1 , . . . , yu∗m ), for all i, u ∈ N and j ∈ M. (7) Hence, the derivatives of cost functions of all agents competing for a particular resource must reach consensus at an optimal average allocation. Throughout the paper, we use this principle to show analytically and empirically that our proposed algorithm is optimal in the limit. III. A LLOCATING ONE RESOURCE THROUGH A FEEDBACK LOOP In this section, we consider the single-resource case of [1], and the proposed distributed, iterative, and stochastic allocation algorithm. We briefly describe this algorithm and provide the first proof of its convergence and optimality properties. With a single resource, we can simplify notation by dropping the index j. Each agent i has a strictly convex cost function gi : (0, 1] → R+ . The binary random variable ξi (k) ∈ {0, 1} denotes the allocation of the unit resource for agent i at time step k. Let yi (k) be the averagePallocation k 1 up to time step k of agent i, i.e., yi (k) = k+1 `=0 ξi (`). In the following ξ(k), y(k) ∈ Rn denote the vectors with entries ξi (k), yi (k). The idea is to choose probabilities for the random variables ξi so as to ensure convergence to the social optimum and to adjust overall consumption to the desired level C by applying a normalization factor Ω to the probabilities. When an agent joins the system at a time step k; it receives the normalization factor Ω(k). At each time step k, the central agency updates Ω(k) using a gain parameter τ , past utilization of the resource and its capacity and broadcasts the new value to all agents, n X  Ω(k + 1) = Ω(k) − τ ξi (k) − C , (8) i=1  where τ ∈ 0, max y∈[0,1]n n X i=1 yi gi0 (yi ) !−1  . (9) After receiving this signal agent i responds in a random fashion based on its available information. The probability functions σi (·) use the average allocation of resource to agent i and the derivative of the cost function and are given by, yi σi (Ω, yi ) = Ω 0 . (10) gi (yi ) Agent i updates its resource demand at each time step either by demanding one unit of the resource or not demanding it, as follows, ( 1 with probability σi (Ω(k), yi (k)); ξi (k + 1) = 0 with probability 1 − σi (Ω(k), yi (k)). It needs to be pointed out that for the formulation above we require assumptions on the gi and on admissible value of Ω, because the scheme requires that (10) does in fact define a probability. For ease of notation we define vi (z) := z/gi0 (z), z ∈ [0, 1] and v(y) to be the vector with components vi (yi ), y ∈ [0, 1]n . Definition 3.1 (Admissibility): Let n ∈ N and gi : [0, 1] → R+ be twice continuously differentiable, and strictly convex, i = 1, . . . , n. We call the set {gi , i = 1, . . . , n} and Ω > 0 admissible, if (i) vi is well defined on [0, 1], for all i = 1, . . . , n, (ii) there are constants 0 < a < b < 1 such that σi (Ω, z) = Ωvi (z) ∈ [a, b] for all i = 1, . . . , n, z ∈ [0, 1]. The definition of admissibility imposes several restrictions on the possible cost functions gi similar to those imposed in [12]. See this reference for a detailed discussion and possible relaxations. For the case that Ω is independent of time, so that (8) is not active, the convergence of the scheme follows using tools from classical stochastic approximation, [13]. Theorem 3.2 (Convergence of average allocations): Let n ∈ N. Assume the functions gi : [0, 1] → R+ are strictly convex, twice continuously differentiable and strictly increasing, i = 1, . . . , n. Let Ω > 0 and assume that {gi , i = 1, . . . , n} and Ω > 0 are admissible. Then, almost surely, limk→∞ y(k) = y ∗ , where y ∗ is characterized by the condition, Ω = gi0 (yi∗ ), i = 1, . . . , n. Proof: By definition we have, (11) 1 k y(k) + ξ(k). k+1 k+1 This may be reformulated as, y(k + 1) = y(k + 1) 1 [(σ(y(k)) − y(k)) + (ξ(k) − σ(y(k)))] . k+1 For the latter formulation Theorem 2.2 of [13] is applicable. To this end we note that, = y(k) + E(ξ(k + 1) − σ(y(k + 1))|Fk ) = 0, where Fk is the σ-algebra generated by the events up to time k. This follows immediately from the definition of the probabilities σi (·). Also the sequence {ξ(k) − σ(y(k))} is of course bounded. By assumption the map h : y 7→ σ(y)−y = Ωv(y) − y is Lipschitz continuous. P Also step-sizes a(k) = 1/k satisfy k a(k) = P the ∞, k a2 (k) < ∞ and the iterates y(k) are bounded. By [13, Theorem 2.2] it follows that almost surely y(k) converges to a connected chain transitive set of the differential equation, ẋ = Ωv(x) − x. It remains to show that the differential equation has an asymptotically stable fixed point whose domain of attraction contains the set [0, 1]n as this then determines the unique possible limit point of {y(k)}. We note first that the differential equation is given by the n decoupled equations, ẋi = Ωvi (xi ) − xi . The fixed points for each of these 1-dimensional equations is characterized by the condition Ωx∗i /gi0 (x∗i ) − x∗i = 0. We have by Definition 3.1 (ii) that, Ωvi (0) > 0 and Ωvi (1) − 1 < 0. (12) x∗i This shows that ∈ (0, 1) and so a little manipulation shows that fixed points are characterized by, Ω = gi0 (x∗i ). As gi is strictly convex, gi0 is strictly increasing and so the fixed point for each of the decoupled equations is unique. Now (12) together with sign considerations shows asymptotic stability and the desired property of the domain of attraction. The proof is complete. Remark 3.3 (Optimality): We note that the fixed point condition (11) can be interpreted as an optimality Pn condition—as established in (7). If we define C ∗ := i=1 yi∗ then (11) shows that y ∗ is the unique optimal point of the optimization problem, minimize n X i=1 gi (yi ) subject to n X yi = C ∗ , yi ≥ 0. i=1 The equation shows furthermore that Ω may be used to adjust the fixed point and thus the constraint. As the gi are strictly convex and increasing, the gi0 are positive and increasing. Thus increasing Ω increases each yi∗ (Ω) and thus the total constraint C ∗ (Ω), while decreasing Ω has the opposite effect. The simple PI controller for Ω in (8) thus has the purpose to adjust to the right level of resource consumption. The full proof of the convergence of the scheme with the PI-controller in the loop is beyond the scope of the present paper. IV. A LLOCATING MULTIPLE RESOURCES THROUGH COUPLED FEEDBACK LOOPS We turn our attention in this section to the case of multiple resources shared by the same population of agents. We present a new algorithm that generalizes the singleresource algorithm of the previous section to multiple unitdemand resources. The agents are coupled through these shared resources. In contrast to the single-resource case however, we do not provide a proof of the convergence of the allocations over time and the optimality property of the proposed algorithm. We present nonetheless in Section V empirical evidence that the allocations converge rapidly to a socially optimal allocation. Before presenting the algorithm, we introduce the following additional notions. Suppose that there exists δ > 0 such that Gδ is a set of second order continuously differentiable, convex and increasing functions and g1 , g2 , . . . , gn ∈ Gδ . We assume that Gδ is common knowledge to the control unit and each cost function gi is private and should be kept private. Despite the fact that Gδ is common knowledge, due to large number of cost functions gi in Gδ , it is difficult for control unit to guess gi of a particular agent. The distributed unit-demand multi-resource allocation algorithm is run by each agent in the system. Let τ j denotes the gain parameter, Ωj (k) denotes the normalization factor or the signal of controller of the feedback loop and C j represents the desired value or capacity of resource Rj , respectively, for all j. We use term control unit instead of controller here. The control unit updates Ωj (k) according to (14) at each time step and broadcasts it to all agents in the system, for all j and k. When an agent joins the system at a time step k; it receives the parameter Ωj (k) for resource Rj , for all j. Every agent’s algorithm updates its resource demand each time step either by demanding one unit of the resource or not demanding it. The normalization factor Ωj (k) depends on its value at previous time step, τ j , the capacity C j and total utilization of resource Rj at previous time step, for all j and k. After receiving this signal the agent i’s algorithm responds in a probabilistic manner. It calculates its probability σij (k) using its average allocation yij (k) of resource Rj and the derivative of its cost function, for all j and k, as described in (15). Using this probability it finds out the Bernoulli distribution, based on the numerical outcome 0 or 1 of the random variable, the algorithm decides whether to demand one unit of the resource or not. If numerical value is 1, then the algorithm demands one unit of the resource otherwise it does not demand that resource. This process repeats over time. We present the proposed unit-demand multi-resource allocation algorithm for the control unit in Algorithm 1 and for each agent in Algorithm 2. Algorithm 1: Algorithm of control unit Input: C 1 , . . . , C m , τ 1 , . . . , τ m , ξi1 (k), . . . , ξim (k), for k ∈ N and i ∈ N . Output: Ω1 (k + 1), Ω2 (k + 1), . . . , Ωm (k + 1), for k ∈ N. Initialization: Ωj (0) ← 0.3501 , for j ∈ M, foreach k ∈ N do foreach j ∈ M do calculate Ωj (k + 1) according to (14) and broadcast in the system; end end After introducing the algorithms, we describe here how to calculate different factors. Let x11 , . . . , xm n ∈ R+ be the deterministic values of average allocations, then the control unit calculates the gain parameter τ j with common knowledge of Gδ as follows, τ j ∈ 0, ( sup n X x11 ,...,xm n ∈R+ ,g1 ,...,gn ∈Gδ i=1 1 We  xji )−1 . 1 2 m ∇j gi (xi , xi , . . . , xi ) (13) initialize it with a positive real number for each resource. Algorithm 2: Unit-demand multi-resource allocation algorithm of agent i Input: Ω1 (k), Ω2 (k), . . . , Ωm (k), for k ∈ N. Output: ξi1 (k + 1), ξi2 (k + 1), . . . , ξim (k + 1), for k ∈ N. Initialization: ξij (0) ← 1 and yij (0) ← ξij (0), for j ∈ M. foreach k ∈ N do foreach j ∈ M do y j (k) i ; σij (k) ← Ωj (k) ∇j gi (y1 (k),...,y m i (k)) i generate Bernoulli independent random variable bji (k) with the parameter σij (k); if bji (k) = 1 then ξij (k + 1) ← 1; else ξij (k + 1) ← 0; end j j 1 yij (k + 1) ← k+1 k+2 yi (k) + k+2 ξi (k + 1); end end Now, we define Ωj (k + 1) which is based on utilization of resource Rj at time step k and common knowledge of Gδ as follows, Ωj (k + 1) = Ωj (k) − τ j n X  ξij (k) − C j . (14) i=1 We call Ωj (k) as normalization factor, used by the control unit. Now, after receiving normalization factor Ωj (k) from the control unit at time step k, an agent responds with probability σij (k) in the following manner to demand for resource Rj at next time step, for all i, j and k, σij (k) = Ωj (k) yij (k) . ∇j gi (yi1 (k), yi2 (k), . . . , yim (k)) (15) Notice that, Ωj (k) is used to bound the probability σij (k) ∈ (0, 1), for all i, j and k. Remark 4.1 (Privacy of probabilities): By using Ωj (k) as normalizationPfactor, the algorithm ensures the privacy of n probabilities i=1 σij (k) of agents, Pnthereby the control unit only knows about the utilization i=1 ξij (k) of resource Rj at previous time step k. Observe that if limk→∞ yij (k) → yi∗j for every resource j and agent i, as is the case in Theorem 3.2 for a single resource, then we can show that both σij (k) and Ωj (k) converge. In turn, by the definition (14), we would obtain that the consensus property of (7) and hence optimality. Notice furthermore that the system has very little communication overhead. Suppose that Ωj (k) takes the floating point values represented by µ bits. If there are m unitdemand resources in the system, then the communication overhead in the system will be µm bits per time unit. Moreover, the communication complexity in this is independent of the number of agents participating in the system. V. A PPLICATION TO ELECTRIC VEHICLE CHARGING In this section, we use Algorithms 1 and 2 to control electric vehicles that share a limited number of level 1 and level 2 charging points. We illustrate through numerical results that utilization of a charging point is concentrated around its desired value or capacity and agents receive the optimal charging points in long-term averages, we verify this using the consensus of derivatives of cost functions of agents which satisfies all the KKT conditions for the optimization Problem 2. As background perspective, the transportation sector in US contributed around 27% of green house gas (GHG) emission in 2015, in which light-duty vehicles like cars have 60% contribution. Furthermore, the share of carbon dioxide is 96.7% of all GHG gases from transportation sector [14]. To put it in context, currently we have more than 1 billion vehicles (electric (EV) as well as internal combustion engine (ICE)) on road worldwide [15], the number is increasing very rapidly which will result in increased CO2 emission in future. Therefore, strategies are needed to reduce the CO2 emission. Though, electric only vehicles produce zero emission but the electricity generating units produce GHG emissions at source depending on the power generation techniques used, for example, thermal-electric, hydro-electric, wind power, nuclear power, etc. US department of energy [16] states that the annual CO2 emission by an electric vehicle (EV) is 2, 079.7 kg (share of CO2 emission in producing electricity for charging the EV) and a gasoline vehicle or ICE is 5, 186.8 kg. Consider now a situation where a city sets aside a number of free (no monetary cost) electric vehicle supply equipment (EVSE) which supports level 1 and level 2 chargers at public EV charging station to serve the residents and/or to promote usage of electric vehicles. Level 1 charger works at 110 - 120 V AC, 15 - 20 A and takes around 8 - 12 hours to fully charge the battery of an EV whereas level 2 charger works at 240 V AC, 20 - 40 A and takes around 4 - 6 hours to fully charge the battery, depending on the battery capacity, on-board charger capacity, etc., [17]. The voltage and current rating of chargers vary, details of ranges can be found in [18], [19]. Now, suppose that the city has installed C 1 EVSEs which support level 1 chargers and C 2 EVSEs which support level 2 chargers. Let there are n electric cars coupled through level 1 and level 2 charging points. Now, the city must decide whether to allocate level 1 charge point or level 2 charge point to an electric car user to control total utilization of charging points. Clearly, in such a situation, charging points should be allocated in a distributed manner that preserves the privacy of individual users, but which also maximizes the benefit to a municipality. We use the proposed distributed stochastic algorithm which ensures the privacy of electric car users and allocates charging points optimally to maximize social welfare (for example, minimize total electricity consumption or CO2 emission). According to [20], on average 0.443 kg of CO2 is produced to generate and distribute 1 kWh of electric energy in European union with mix energy sources. Let, I be the 0.8 0.6 0.4 0.2 0 0 500 1.2 1 0.8 0 1000 7 ∇1 gi(.) Derivative of gi Level 1, charger 22 Level 2, charger 22 Level 1, charger 981 Level 2, charger 981 Derivative of gi Avg. alloc. of charge points 1 5000 6 5 4 3 10000 ∇2 gi(.) 0 Iterations Iterations (a) 5000 10000 Iterations (b) (c) Level 1 charger Level 2 charger 550 500 450 400 350 700 Utilization Total average allocations Fig. 1: (a) Evolution of average allocation of charging points, (b) evolution of profile of derivatives of gi of all electric cars with respect to level 1 chargers, (c) evolution of profile of derivatives of gi of all electric car with respect to level 2 chargers. 600 500 400 300 0 2000 4000 Iterations (a) Level 1 charger Level 2 charger 0 20 40 60 Iterations (b) Fig. 2: (a) Evolution of sum of average allocation of charging points, (b) utilization of charging points over last 60 time steps, the capacities of level 1 and level 2 chargers are C 1 = 400 and C 2 = 500, respectively. current flowing in the circuit and V be the voltage rating of the circuit, ECO2 be the rate of CO2 emission per kWh. If an EV is charged for t hours at a charging point, then its total share of CO2 emission, say TCO2 (t) for generation and distribution of I×V ×t kWh electric energy can be calculated as TCO2 (t) = I × V × t × ECO2 , we use ECO2 = 0.443 kg [20]. Table V illustrates the total CO2 emission in kg by level 1 and level 2 chargers in 4 hours duration. We use this data to formulate the cost function of an agent. CO2 emission using different EV chargers Charger type power (kW) CO2 emission in 4h Level 1 1.65 - 2.4 2.924 - 4.253 kg Level 2 4.8 - 9.6 8.51 - 17.01 kg Suppose that each car user has private cost function gi which depends on the average allocations yi1 (k) and yi2 (k) of level 1 and level 2 charging points, respectively. We assume that the city agency (control unit) broadcasts the normalization factors Ω1 (k) and Ω2 (k) to each competing electric car after every 4 hours, here we chose duration of 4 hours because of charging rate of level 2 chargers. Note that an EV user can unplug the vehicle in the middle of charging without fully charging the battery. Now, suppose that the cost functions are classified into four classes based on the type of vehicle, its battery capacity, on-board charger capacity, etc., a set of vehicles belong to each class. Let a = 2.9, b = 8.51 be the constants and f1i , f2i be uniformly distributed random variables, where f1i ∈ [1, 1.5], f2i ∈ [1, 2], for all i. The cost functions are listed in (16), where first and second term represents CO2 emission at basic assumed rate of charging of the battery whereas third and subsequent terms are CO2 emission due to different charging losses or factors. We observe that no allocation of charge points produce zero CO2 emission, the cost functions are as follows,  1 2 1 2 2 4   (i) ayi 1+ byi 2+ af1i (yi 1) 4+ bf2i (yi ) ,2 2    (ii) ayi + byi + af1i (yi ) /2 + bf2i (yi ) , (iii) ayi1 + byi2 + af1i (yi1 )4 /3 + af1i (yi1 )6 + gi (yi1 , yi2 ) =   bf2i (yi2 )4 ,    (iv) ayi1 + byi2 + af1i (yi1 )2 + bf2i (yi2 )6 . (16) Now, let the number of coupled electric cars be n = 1200 that are coupled through level 1 and level 2 chargers, we classify the (electric) cars as follows; cars 1 to 300 belong to class 1, cars 301 to 600 belong to class 2, cars 601 to 900 belong to class 3 and cars 901 to 1200 belong to class 4, each class has a set of cost functions and the probability of occurrence of each class are equal. Let C 1 = 400 and C 2 = 500. The parameters of the algorithms are initialized with the following values, Ω1 (0) = 0.328, Ω2 (0) = 0.35, τ 1 = 0.0002275, τ 2 = 0.0002125. We use the proposed Algorithm 1 and Algorithm 2 to allocate charging points to a number of electric cars coupled through level 1 and level 2 charging points. If a car user is looking for a free charging point then the user sends a request to the city agency using its cost function gi based on its average allocation of level 1 and level 2 charging points and city agency allocates any of these charging points or none in a stochastic manner. Car users do not share their cost functions or history of its allocations with other car users or with city agency. We present here, results of automatic allocation of charging points. We observe that the electric car users receive optimal allocation of each type of charging point and minimize overall CO2 emission. We observe in Figure 1(a) that the long-term average allocations of charging points of electric cars converge to their respective optimal values. As described earlier in (7), to show the optimality of a solution, the derivative of cost function of all cars with respect to a particular type of charger should make a consensus. The profile of derivatives of cost functions of all electric cars with respect to level 1 and level 2 chargers for a single simulation is illustrated in Figure 1(b) and 1(c), respectively. We observe that they converge with time and hence make a consensus, which meets the KKT condition for optimality. Note that we used third and subsequent terms of (16) to calculate ∇j gi which just shifts the value of derivatives by constants a or b without affecting the KKT points, but it provides faster convergence in simulation. The empirical results thus obtained, show the convergence of the longterm average allocations of charging points to their respective optimal values using the consensus of derivatives of the cost functions, which results in the optimum emission of CO2 . We also observed that σij (k) is in (0, 1) most of the time with the current values of Ωj (k) and τ j with a few initial overshoots. To overcomenthe overshoots of probability σij (k), o y j (k) we use σij (k) = min Ωj (k) ∇j gi (y1 (k),yi2 (k),...,ym (k)) , 1 , i i i for all i, j and k. 2(a) illustrates the sum of average allocations PFigure n j y (k) over time. We observe that the sum of average i=1 i allocations of charge pointsP converge to respective capacity n over time, i.e., for large k, i=1 yij (k) ≈ C j , for all j. We further illustrate the utilization of charging points for last 60 time steps in Figure 2(b). It is observed that most of the time total allocation of charging points is concentrated around its capacity. To reduce the overshoot of total allocation of level j charging points, we assume a constant γ j < 1 and modify the algorithm of city agency (control unit) to calculate Ωj (k +1) (cf. (14)) in the following manner, n X  j j j Ω (k + 1) = Ω (k) − τ ξij (k) − γ j C j , i=1 for all j ∈ {1, 2} and k. VI. C ONCLUSION We proposed a new algorithm to solve a class of multivariate resource allocation problems. The solution approach is distributed among the agents and requires no communication between agents and little communication with a central agent. Each agent can therefore keep its own cost function private. This generalizes the unit-demand single resource allocation algorithm of [1]. In the single-resource case, we showed that the long-term average allocation of resources converge to optimal values. In the multiple-resources case, experiments show that likewise the allocation converges rapidly to an optimum. One open problem is to prove convergence in the latter setting. Another one is to analyze the rate of convergence. In terms of applications, our proposed approach can be used to allocate resources such as Internet-connected devices in hospitals, smart grids, etc. It can also be used to allocate virtual machines to users in cloud computing. R EFERENCES [1] W. M. Griggs, J. Y. Yu, F. R. Wirth, F. Hausler, and R. Shorten, “On the design of campus parking systems with QoS guarantees,” IEEE Trans. Intelligent Transportation Systems, vol. 17, no. 5, pp. 1428– 1437, 2016. [2] A. R. Fioravanti, J. Marecek, R. N. Shorten, M. Souza, and F. R. Wirth, “On classical control and smart cities,” in IEEE 56th Annual Conference on Decision and Control (CDC), Dec 2017, pp. 1413– 1420. [3] R. Arnott and J. Rowse, “Modeling parking,” Journal of Urban Economics, vol. 45, no. 1, pp. 97 – 124, 1999. [4] D. Teodorovic and P. Lucic, “Intelligent parking systems,” European Journal of Operational Research, vol. 175, no. 3, pp. 1666 – 1681, 2006. [5] T. Lin, H. Rivano, and F. L. Moul, “A survey of smart parking solutions,” IEEE Transactions on Intelligent Transportation Systems, vol. 18, no. 12, pp. 3229–3253, Dec 2017. [6] I. Jones, “Road space allocation: the intersection of transport planning, governance and infrastructure,” 2014. [7] T. Raviv and O. Kolka, “Optimal inventory management of a bikesharing station,” IIE Transactions, vol. 45, no. 10, pp. 1077–1093, 2013. [8] P. DeMaio, “Bike-sharing: History, impacts, models of provision, and future,” Journal of Public Transportation, vol. 12, no. 4, pp. 41–56, 2009. [9] E. Crisostomi, R. Shorten, and F. Wirth, “Smart cities: A golden age for control theory? [industry perspective],” IEEE Technology and Society Magazine, vol. 35, no. 3, pp. 23–24, Sept 2016. [10] R. Cogill, O. Gallay, W. Griggs, C. Lee, Z. Nabi, R. Ordonez, M. Rufli, R. Shorten, T. Tchrakian, R. Verago, F. Wirth, and S. Zhuk, “Parked cars as a service delivery platform,” in 2014 International Conference on Connected Vehicles and Expo (ICCVE), Nov 2014, pp. 138–143. [11] S. Boyd and L. Vandenberghe, Convex Optimization. New York, NY, USA: Cambridge University Press, 2004. [12] F. Wirth, S. Stuedli, J. Y. Yu, M. Corless, and R. Shorten, “Nonhomogeneous Place-Dependent Markov Chains, Unsynchronised AIMD, and Network Utility Maximization,” ArXiv e-prints, Apr. 2014. [13] V. S. Borkar, Stochastic Approximation. Cambridge University Press, 2008. [14] U. EPA, “Fast facts: U.s. transportation sector ghg emissions 19902015,” July 2017. [15] J. Sousanis, “World vehicle population tops 1 billion units,” Aug. 2015. [16] U. D. Energy, “Emissions from hybrid and plug-in electric vehicles,” Feb. 2018. [17] S. Schey, “Canadian electric vehicle infrastructure deployment guidelines,” 2014. [18] M. Yilmaz and P. T. Krein, “Review of battery charger topologies, charging power levels, and infrastructure for plug-in electric and hybrid vehicles,” IEEE Transactions on Power Electronics, vol. 28, no. 5, pp. 2151–2169, May 2013. [19] Q. Wang, X. Liu, J. Du, and F. Kong, “Smart charging for electric vehicles: A survey from the algorithmic perspective,” IEEE Communications Surveys and Tutorials, vol. 18, no. 2, pp. 1500–1517, 2016. [20] E. assoc. BEV, “Energy consumption, CO2 emissions and other considerations related to battery electric vehicles,” European association for battery electric vehicles, April 2009.
3cs.SY
ORDERED DAGS: HYPERCUBESORT arXiv:1710.00944v1 [cs.DS] 3 Oct 2017 MIKHAIL GUDIM Abstract. We generalize the insertion into a binary heap to any directed acyclic graph (DAG) with one source vertex. This lets us formulate a general method for converting any such DAG into a data structure with priority queue interface. We apply our method to a hypercube DAG to obtain a sorting algorithm of complexity O(n log2 (n)). As another curious application, we derive a relationship between length of longest path and maximum degree of a vertex in a DAG. 1. Introduction Consider a sorted linked list, a binary heap and a Young tableau (see Problem 6 − 3 in [1]). The process of inserting a new element is very similar for all three: we repeatedly exchange newly added element with one of its neighbours until it is in correct place. This simple observation is the main motivation for the present work. Now let us briefly outline the contents. In Section 2 we fix notation and terminology for the entire paper, in particular we define the notion of an ordered DAG. Our main technical result is in Section 3 where we prove that the structure of an ordered DAG can be easily maintained. This allows us to construct a data structure with priority queue interface from any ordered DAG (Section 4). Section 5 demonstrates that some classical algorithms can be viewed as a special case of our general construction. The interaction between sorting and DAGs can be applied to prove statement about DAGs. As an example, we derive a relationship between the maximum degree of a vertex in a DAG and length of longest path (Corollary 5.5). The most juicy part of the paper is Section 6. There we apply our method to a case where underlying DAG is a hypercube and arrive at a sorting algorithm HypercubeSort, which to our knowledge has not yet been described. In Proposition 6.1 we derive an exact expression for the complexity of HypercubeSort in the worst case. Asymptotically it is O(n log2 (n)) . The Java implementation of HypercubeSort is available at [2]. 2. Terminology and Notation Definition 2.1. Let G be a DAG and suppose that each node v of G has an integer attribute v.label. We call such a DAG labeled DAG. We denote the multiset of all labels in a labeled DAG G by labels(G). Let (u, v) be an edge in a labeled DAG G. We use the following terminology: (1) Vertex u is a previous neighbour of v and v is a next neighbour of u. (2) If u.label ≤ v.label we say that (u, v) is a good edge. Otherwise, (u, v) is a bad edge. If (u, v) is a bad edge, we call u violating previous neighbour of v and we call v violating next neighbour of u. (3) Labeled DAG G is called ordered if all its edges are good. Example 2.2. An example of a ordered DAG is shown in Figure 1. Note that we allow equal labels for vertices. Date: October 4, 2017. 1 2 MIKHAIL GUDIM 1 6 4 2 8 8 6 10 14 12 9 16 Figure 1. An example of ordered dag. 3. Maintaining Ordered DAGs We now describe the procedure lowerLabel which is the workhorse of the entire paper. Generally speaking, it is just a generalization of insertion into a heap, but nevertheless we take care to prove its correctness rigorously. In the following pseudocode we assume that we have a procedure getLargestViolating(G, v) which when given a pointer v to a vertex in a labeled DAG G returns the pointer to a vertex u which is a violating previous neighbour of v with largest label attribute. If there is no previous violating neighbours (this includes the case when there are no previous neighbours at all), the procedure returns null. Algorithm 1 lowerLabel 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: procedure lowerLabel(G, v, newLabel) ⊲ G is a labeled DAG and v is a pointer to a vertex in G and newLabel is an integer less than v.label v.label = newLabel current = v violating = true while violating do largestV iolating = getLargestViolating(G, current) if largestV iolating == null then violating = f alse else exchange current with largestV iolating return Proposition 3.1. Let G be an ordered DAG, v a vertex in G and newLabel an integer less than v.label. (1) The procedure lowerLabel(G, v, newLabel) terminates. (2) After the termination G remains an ordered DAG. (3) Let L denote the multiset of labels of G before the call to lowerLabel and L′ denote the multiset of labels of G after the call. Then L′ is L with v.label replaced by newLabel. Example 3.2. Before the proof, it would be illustrative to look at an example. Figure 2 shows the execution of lowerLabel on a DAG from Example 2.2. Proof. It is easy to see that the procedure terminates because G is a finite DAG. Statement (3) is also clear, since the only step which changes the multiset of labels is in line 3 of the pseudocode. We prove (2) by showing that the lowerLabel maintains the following two-part invariant: At the end of each iteration of the while loop in lines 6-11: ORDERED DAGS: HYPERCUBESORT 1 6 4 2 8 8 6 10 14 1 3 9 6 4 16 2 6 4 2 8 8 6 9 1 3 4 10 4 16 2 6 9 8 (e) End of iteration 4 10 16 2 8 3 6 9 14 10 8 16 (d) End of iteration 3 8 6 3 9 6 (c) End of iteration 2 1 8 14 (b) End of iteration 1 14 3 8 6 (a) After execution of line 4 1 3 14 1 10 4 3 16 2 8 6 6 9 14 10 8 16 (f) End of iteration 5. The DAG G is now ordered, procedure exits. Figure 2. Procedure lowerLabel applied to ordered DAG from Figure 1 to lower label of a vertex from 12 to 3. The vertex current is highlighted in gray and the vertex that will be returned by getLargestViolating at next iteration is black. (1) All bad edges in G (if any) are entering current. (2) For any previous neighbour p of current and any next neighbour n of current p.label ≤ n.label. Before line 4 G is ordered. Right after line 4 executes current is v and it is the only vertex whose label attribute changed, so part (2) of the invariant is maintained and the only edges that could become bad are those entering and leaving current. Since the label of v becomes smaller, all edges leaving current remain good, but edges entering current could become bad, so part (1) of the invariant is maintained. Now assume the invariant was maintained for the first m iterations of the while loop. We show that it is maintained after (m + 1)-st iteration. If getLargestViolating returns null it means that there are no bad edges entering current and by part (1) of the invariant G is ordered DAG. The procedure exists. Now we consider the case when getLargestViolating returns non-null value. Let x denote the vertex in current variable before the exchange in line 11. Let α = x.label, denote by p1 , p2 , . . . , pk previous neighbours of x, by n1 , n2 , . . . , nl next neighbours of x and suppose getLargestViolating returns pk with pk .label = β. By definition of getLargestViolating the following inequalities are true: 4 MIKHAIL GUDIM β>α (1) (because pk is violating) and (2) β ≥ pi .label for all i with 1 ≤ i ≤ (k − 1) (because p.k is largest violating previous neighbour) Because part (1) of the invariant was maintained up to this moment, the following inequalities are true: α ≤ nj .label for all j with 1 ≤ j ≤ l (3) Because part (2) of the invariant was maintained up to this moment, the following inequalities are also true: pi .label ≤ nj .label for all i and j (4) After the exchange in line 11 current is pk and label attributes of only two vertices changed, namely x.label = β and pk .label = α. All edges entering x are of the form (pi , x) for 1 ≤ i ≤ k. By inequalities in (2) all edges (pi , x) for 1 ≤ i ≤ (k − 1) are good and by inequality (1) the edge (pk , x) is good. So all the edges entering x are good. All the edges leaving x are of the form (x, nj ) for 1 ≤ j ≤ l. They remain good by inequalities in (4) applied with i = k. Now let us look at current = pk . Before the exchange all edges entering and leaving pk were good. After the exchange, by the inequality (1) value of pk .label lowered. This means all the edges leaving pk remain good and only edges entering pk could become bad. So part (2) of the invariant is maintained.  The following pseudocode shows that in abstract sense the processes of lowering and raising value of label attribute are equivalent: Algorithm 2 raiseLabel 1: 2: 3: 4: 5: 6: 7: procedure raiseLabel(G, v, newLabel) ⊲ G is a labeled DAG and v is a pointer to a vertex in G and newLabel is an integer greater than v.label Multiply the label of each vertex of G by (−1) Reverse each edge in G ⊲ after this G is ordered Run the procedure lowerLabel(G, v, −newLabel) Multiply the label of each vertex of G by (−1) Reverse each edge in G In practice one can implement raiseLabel in a completely symmetrical way to lowerLabel by reversing the directions of edges and meaning of comparisons. 4. Ordered DAG Data Structure With Algorithms 1 and 2 at hand, it is probably clear how to make any DAG G with only one source vertex induces a data structure OrderedDagG . However, there are some details which we do not want to neglect. The constructor of OrderedDagG assigns value of ∞ to every vertex in the DAG. ORDERED DAGS: HYPERCUBESORT 5 To insert a new element with label l in principle one can pick any vertex v with v.label = ∞ and then call lowerLabel(v, l) to restore the order in G. But arbitrary choice is ambiguous and may be non-optimal. Therefore, we also assume that we have a (stateful) procedure getNext() which returns the next vertex of G in breadth-first order. In particular, the first call to getNext returns the source vertex s. The second call returns one of next neighbours of s. After all neighbours of s were returned, it returns neighbours of neighbours of s and so on. Thus we have: Algorithm 3 insert 1: 2: 3: 4: procedure insert(l) ⊲ The element l is the new label to be inserted into G. nextV ertex = getNext() lowerLabel(G, nextV ertex, l) Since G is ordered DAG, the source vertex s must have the minimum label. The procedure getMin returns this vertex. Given a vertex v in G we can remove v by calling raiseLabel(G, v, ∞)). In particular, we can remove the minimum value this way: Algorithm 4 removeMin 1: 2: 3: 4: procedure removeMin ⊲ Removes the vertex with minimum label attribute from G. s = getMin() raiseLabel(G, s, ∞) For the reference we make the following Summary: Summary 4.1. Any DAG G with N vertices and only one source vertex induces a data structure OrderedDagG , which implements the following interface: (1) OrderedDag(G): creates the data structure OrderedDagG , with v.label = ∞ for each vertex v in G. (2) insert(l): replaces one of ∞’s (if any left) with l in labels(G). (3) getMin(): returns a vertex whose label attribute is a minimum value of labels(G). (4) removeMin(): removes (a) minimum value from labels(G). (5) lowerLabel(v, newLabel): replaces v.label in labels(G) with newLabel < v.label. (6) raiseLabel(v, newLabel): replaces v.label in labels(G) with newLabel > v.label. 5. General DAGSort Given a DAG G with n vertices we can use OrderedDagG to sort array of n elements. 6 MIKHAIL GUDIM Algorithm 5 DAGSort 1: 2: 3: 4: 5: 6: 7: 8: procedure DAGSort(G, A) ⊲ G is a DAG with n vertices and A is array with n elements. dag = OrderedDag(G) for all elements a in A do dag.insert(a) ′ A = new array of size n for i from 0 to (n − 1) inclusively do A′ [i] = dag.removeMin() return A′ For a general DAG we have the following obvious coarse upper-bound on complexity: Proposition 5.1. Let G be any DAG with n vertices and only one source vertex s. Let Din and Dout denote the highest in- and out- degree of a vertex in G respectively and let L denote the maximum length of a simple path starting at s. Then DAGSort(G, •) makes at most nL(Din + Dout ) comparisons. Proof. During insertion new element will be exchanged with at most L vertices. To make one exchange we need at most Din comparisons, so the cost of inserting all n elements into OrderedDagG is bounded above by nDin L. The other term nDout L comes from extracting minimum element n times.  Now we put some well-know algorithms in the context of general DAGSort. Example 5.2. Let G be a DAG in Figure 3. With this G as an underlying DAG the DAGSort(G, •) is the selection sort algorithm. The vertex s always contains the minimum value. s Figure 3 Example 5.3. Let G be a DAG in Figure 5. With this G as an underlying DAG the DAGSort(G, •) is the insertion sort algorithm. s Figure 4 Example 5.4. Let G be a DAG in Figure 5. With this G as an underlying DAG the DAGSort(G, •) is the sorting algorithm using Young tableau. ORDERED DAGS: HYPERCUBESORT 7 s Figure 5 One can generalize two-dimensional Young tableaux to k-dimensional tableaux: the underlying √ DAG is a k-dimensional grid. If a grid has n elements then the length of longest path is k k n and each vertex has at most k previous and k next neighbours. Thus by upper bound of 5.1 the 1 DAGSort using k-dimensional Young tableaux is of complexity O(kn1+ k ). If we allow very high in-degree of a vertex in a DAG, we can make the longest path in the DAG small - consider DAG with one source vertex connected to other vertices. At the other extreme, consider a DAG where all the vertices are arranged in a linked list: all the vertices have small degree but the longest path is long. What can we say in a generic case? Corollary 5.5. Let G be any DAG with n ≥ 2 vertices and only one source vertex s. Let Din and Dout denote the highest in- and out- degree of a vertex in G respectively and let L denote the maximum length of a simple path starting at s. Then the following inequality holds: 1 log(n!) ≤ L(Din + Dout ) n In other words, to densely pack (length of longest path is small) n vertices into a DAG one cannot avoid vertices with high in-degrees. Proof. Let G be any DAG with n ≥ 2 vertices and let DAGSortG denote the sorting algorithm defined by G. Let I denote the input on which DAGSortG makes at least log(n!) comparisons to sort I. Such input always exists (see Section 8-1 of [1]). Let us denote the number of comparisons made by DAGSortG to sort I by T (I). We have the following lower bound on T (I): (5) log(n!) ≤ T (I) On the other hand, by the bound in Proposition 5.1 we have: (6) T (I) ≤ nL(Din + Dout ) Combining the two inequalities above gives the result.  6. HypercubeSort Let S be a set with k elements. The set of 2k subsets of S forms a DAG: vertices are subsets there is an arrow from subset S to subset T if T is obtained from S by adding one element. We denote this DAG by DAG(S). An example with S = {1, 2, 3} is shown in Figure 6. 8 MIKHAIL GUDIM {3} {2, 3} {1, 3} {1, 2, 3} ∅ {2} {1} {1, 2} Figure 6. DAG({1, 2, 3}) The DAG of subsets DAG(S) is a k-fold direct product of a DAG in Figure 7 with itself. Such a DAG is called k-dimensional hypercube. Since the vertices can be identified with subsets we have a notion of cardinality of a vertex: we say that a vertex v is hypercube is of cardinality m if v corresponds to an m-element subset of S. There is only one vertex s of cardinality zero (it corresponds to the empty subset) which is the only source vertex. Let u be a vertex of cardinality m > 0. Then length of any path from s to u is m, u has m previous neighbours and (k − m) next neighbours. Figure 7 We can apply the general DAGSort to the hypercube DAG and we call the resulting algorithm HypercubeSort. To implement HypercubeSort we can identify a vertex of a hypercube with the subset it represents which can be written uniquely as a binary string of length k. For example, the subset {2, 4, 5} of S = {1, 2, 3, 4, 5, 6, 7, 8} is written as 01011000. In turn, we can convert each binary string to a number, which can serve as an index into array. The procedure getNext can be implemented by first listing all 0-element subsets, then all 1-element subsets, then all 2-element subsets and so on. The exact algorithm that does not require any extra memory and each call takes O(1) time is described in Section 3 of [3]. Our Java implementation of HypercubeSort with all the details is available at [2], but in our version for simplicity we precompute the order of vertices by a recursive procedure and store the result. By upper bound in Proposition 5.1 it takes O(n log2 (n)) comparisons for HypercubeSort to sort n element array. Unfortunately, this bound cannot be improved by a more detailed analysis as the proof of the following proposition shows. Proposition 6.1. To sort n elements the algorithm HypercubeSort makes at most O(n log2 (n)) comparisons. Proof. We assume that n is a power of two. By symmetry between insertion and deletion operations, it is enough to estimate the number of comparisons to insert n = 2k elements. Denote this number by T (n). To insert one vertex of cardinality i it takes in the worst case i + (i − 1) + · · · + 1 = 12 (i + 1)i comparisons. There are exactly ki vertices of cardinality i. Thus   k X 1 k (i + 1)i (7) T (n) = 2 i i=0 ORDERED DAGS: HYPERCUBESORT 9 To evaluate the above summation, consider the function f defined by k   X k i+1 k x f (x) = x(1 + x) = i i=0 Take derivatives of the two expressions of f : f ′ (x) = (1 + x)k + kx(1 + x)k−1 = k   X k (i + 1)xi i i=0 And the second derivatives: f ′′ (x) = k(1 + x)k−1 + k(1 + x)k−1 + k(k − 1)x(1 + x)k−2 = k   X k i=1 i (i + 1)ixi−1 By comparing right-hand side of the last equation with equation (7) we see that T (n) = 12 f ′′ (1). But we can evaluate f ′′ (1) using formula on the left-hand side of the above equation with x = 1. The precise expression we get is k2k + k(k − 1)2k−2 . which is clearly O(2k k 2 ).  References [1] Thomas H. Cormen, Clifford Stein, Ronald L. Rivest, and Charles E. Leiserson. Introduction to Algorithms. McGraw-Hill Higher Education, 2nd edition, 2001. [2] M. Gudim. hypercubesort. github.com/mgudim/hypercubesort, 2017. [3] Albert. Nijenhuis and Herbert S. Wilf. Combinatorial algorithms. Academic Press New York, 1975. E-mail address: [email protected]
8cs.DS
arXiv:1504.02717v2 [math.GR] 11 May 2016 QUADRATIC NORMALISATION IN MONOIDS PATRICK DEHORNOY AND YVES GUIRAUD Abstract. In the general context of presentations of monoids, we study normalisation processes that are determined by their restriction to length-two words. Garside’s greedy normal forms and quadratic convergent rewriting systems, in particular those associated with the plactic monoids, are typical examples. Having introduced a parameter, called the class and measuring the complexity of the normalisation of length-three words, we analyse the normalisation of longer words and describe a number of possible behaviours. We fully axiomatise normalisations of class (4, 3), show the convergence of the associated rewriting systems, and characterise those deriving from a Garside family. 1. Introduction A normal form for a monoid M , with a specified generating subfamily S, is a map that assigns to each element of M a distinguished representative word over S. Our aim in this paper is to investigate a certain type of such normal forms and, more precisely, the associated normalisation processes, that is, the syntactic transformations that lead from an arbitrary word to a normal word. Here we restrict to geodesic normal forms, which select representatives of minimal length, and investigate the quadratic case, that is, when some locality conditions are satisfied: that a word is normal if, and only if, each of its length-two factors are normal, and that one can always transform a word into a normal word by a finite sequence of steps, each of which consists in normalising a length-two factor. This general framework includes two well-known classes of normalisation processes: those associated with Garside families as investigated in [8] and [10], building on the seminal example of the greedy normal form in Artin’s braid monoids [1, 11, 12], and those associated with quadratic rewriting systems as investigated for instance in [14] for Artin monoids and in [3, 4] for plactic monoids. So our current development can be seen as an effort to unify various approaches and understand their common features. This program is made natural by the observation that, in spite of their unrelated definitions, the normalisation processes arising in the above mentioned situations share common mechanisms: for instance, in each case, a lengththree word can be normalised in three steps, successively normalising the length-two factors in position 2-3, then in position 1-2, and in position 2-3 again. D. Krammer’s ideas had a seminal influence in our approach, in particular for the connection between normalisation and the monoid underlying Subsection 4.3, which he investigated in [18]. A similar connection was independently discovered by A. Hess and V. Ozornova in [15, 19, 16], partly building on unpublished work by M. Rodenhausen. Our current approach is close to theirs in the case of graded monoids. In this case, beyond minor terminology discrepancies, the factorability structures of [16] correspond to what we call normalisations of class (4, 3). But, in the general case, the two viewpoints are not directly comparable because of divergent treatment of units and invertible elements: in both approaches a “dummy” element is used, but with different assumptions, resulting in different notions of complexity and different conclusions. It seems that every factorability structure yields a normalisation of class (4, 5), but understanding which normalisations of class (4, 5) arise in this way remains open. 1991 Mathematics Subject Classification. 20M05, 68Q42, 20F10, 20F36, 18B40. Key words and phrases. normal form; normalisation; rewriting system; termination; convergence; plactic monoid; Chinese monoid; Artin–Tits monoid; Garside family. 1 2 PATRICK DEHORNOY AND YVES GUIRAUD Let us present our main results. The central technical notion is that of a normalisation, which is a pair (S, N ) made of a set S and an idempotent length-preserving map N from the free monoid S ∗ to itself: the intuition is that N (w) is the result of normalising w, that is, N (w) is the distinguished element in the equivalence class of w. The normalisation automatically determines the associated monoid via the defining relations w = N (w), and we take it as our basic object of investigation. We call quadratic a normalisation (S, N ) such that a word w is N -normal (meaning N (w) = w) if, and only if, each length-two factor of w is N -normal, and such that one can go from w to N (w) by applying a finite sequence of shifted copies of the restriction N of N to the set S [2] of length-two words. We then introduce, for every quadratic normalisation, a class, which is a pair of positive integers describing the complexity of normalisation for length-three words: by definition, if w is a length-three word, N (w) is equal to N212...[m] (w) or N121...[m] (w), meaning a length-m sequence of alternate applications of N in positions 1-2 and 2-3, and we say that the class is (c, c′ ) if one always reaches the normal form after at most c steps when starting from the left, and c′ steps from the right. We observe that the class, if not infinite, has the form (c, c′ ) with |c′ − c| 6 1, and that a system of class (c, c′ ) is of class (d, d′ ) for all d > c and d′ > c′ . We give a number of examples witnessing possible behaviours for the class and its analogue for the normalisation of longer words. However, most of our general results involve quadratic normalisations of class (4, 3) or (3, 4). The first main result is an axiomatisation of normalisations of class (4, 3) in terms of the restriction of the normalisation map to length-two words: Theorem A. If (S, N ) is a quadratic normalisation of class (4, 3), then the restriction N of N to S [2] is idempotent and satisfies N212 = N2121 = N1212 . Conversely, if φ is an idempotent map on S [2] that satisfies φ212 = φ2121 = φ1212 , there exists a quadratic normalisation (S, N ) of class (4, 3) satisfying φ = N . The direct implication is easy and extends to all classes. But the converse direction is more delicate and does not extend: a map on length-two words normalising length-three words needs not normalise words of greater length. The proof of Theorem A involves the monoid Mp studied in [18] and [16], which is an asymmetric version of Artin’s braid monoids where the relation σ2 σ1 σ2 = σ1 σ2 σ1 is replaced with σ2 σ1 σ2 = σ1 σ2 σ1 σ2 = σ2 σ1 σ2 σ1 . Let us mention that [16, Th. 3.4] is an analogue of Theorem A for factorability structures. The second main result involves termination. Every quadratic normalisation (S, N ) gives rise to a quadratic rewriting system, namely the one with rules w → N (w) for w a non-N -normal length-two word. By definition, this rewriting system is confluent and normalising, meaning that, for every initial word, there exists a finite sequence of rewriting steps leading to a unique N -normal word, but its convergence, meaning also that any sequence of rewriting steps is finite, is a different question. We prove Theorem B. If (S, N ) is a quadratic normalisation of class (3, 4) or (4, 3), then the associated rewriting system is convergent, with every rewriting sequence starting from a length-p word having length at most 2p − p − 1. The result can be compared with the easier result that, in class (3, 3), every rewriting sequence starting from a length-p word has length at most p(p − 1)/2, and it is optimal, in the sense that there exists a nonconvergent rewriting system of class (4, 4). The proof of Theorem B is delicate and relies on a diagrammatic tool called the domino rule. Theorem B exhibits a strong difference between the factorability structures of [16] and normalisations of class (4, 3), since the former can induce nonterminating rewriting systems, as witnessed by the counterexample of [16, Appendix, Prop. 7]. However, there is a connection between Theorem B and [16, Th. 7.3], which states termination in the case of a factorability structure that obeys the domino rule, hence, as a normalisation, is of class (4, 3). The arguments are different, and it is not clear how restrictive it is for a normalisation of class (4, 3) to be associated with a factorability structure. QUADRATIC NORMALISATION IN MONOIDS 3 As mentioned above, Garside normalisation [10] integrates into quadratic normalisations, more precisely normalisations of class (3, 3) in the case of a bounded Garside family, and of class (4, 3) in the general case. It is natural to ask for a characterisation of Garside systems inside the family of all normalisations of class (4, 3). This is the last one of our main results: Theorem C. Call a normalisation (S, N ) left-weighted if, for all s, t in S, the element s leftdivides the first entry of N (s|t) in the associated monoid. Then, for every normalisation (S, N ) such that the associated monoid M is left-cancellative and contains no nontrivial invertible element, the family S is a Garside family in M and (S, N ) is the derived normalisation if, and only if, (S, N ) is of class (4, 3) and left-weighted. The proof relies on nontrivial properties of Garside families and, again, on the domino rule available in class (4, 3). A consequence of Theorems B and C is that the rewriting system derived from a Garside family is always convergent, which generalises the case of Artin–Tits monoids with the elements of the corresponding Coxeter group as generators [14, Th 3.1.3,Prop. 3.2.1]. The paper is organised in five sections after this one. Section 2 contains basic definitions about normal forms and normalisations in the general case. We explain how the adjunction of a dummy generator with specific properties extends the use of length-preserving normalisations to non-graded monoids. In Section 3, we introduce quadratic normalisations as those normalisations whose map is determined by its restriction to length-two words, and we establish a bijective correspondence between the latter and a generalisation of convergent rewriting systems (with termination relaxed into normalisation). We also introduce the class, and its generalisation the p-class, as measures of the complexity of normalisation, and establish their basic properties. In particular, we give counterexamples showing the independence of the 3-class and of the p-class for p > 4. Section 4 is devoted to the specific case of quadratic normalisations of class (4, 3). Such systems provide well-behaved normalisation processes; we establish in particular an explicit universal formula for the normalisation of length-p words and, as an application, we show that being of class (4, 3) implies being of p-class (4, 3) for every p. The section ends with Theorem A. In Section 5, we study the relationship between the class of a quadratic normalisation and the termination of the associated rewriting system, proving in particular Theorem B. Finally, Section 6 is devoted to the connection with Garside families and the associated greedy normal forms, establishing Theorem C. Note that almost all observations in this paper extend from the context of monoids to that of categories, seen as monoids with a partially defined product. Thanks. The authors warmly thank Viktoriya Ozornova for having sent a number of useful comments about the first version of this paper and shared her view of the subject. 2. Normalisations and geodesic normal forms In this introductory section, we define normalisations and connect them with geodesic normal forms of monoids (Subsection 2.1). We explain how to add a “dummy” generator to make the restriction to length-preserving maps innocuous (Subsection 2.2). 2.1. Normalisations. If S is a set, we denote by S ∗ the free monoid over S and call its elements S-words, or simply words. We write kwk for the length of an S-word w, and w|w′ , or simply ww′ , for the product of two S-words w and w′ . Our aim is to investigate normal forms of a monoid M with respect to a generating family S, that is, maps from M to S ∗ that choose, for every element g of M , a distinguished expression of g by an S-word, or, equivalently, maps from S ∗ to itself that choose a distinguished element in each equivalence class. We shall privilege the latter approach, in which the primary object is the word map and the monoid is then derived from it. 4 PATRICK DEHORNOY AND YVES GUIRAUD Definition 2.1.1. A normalisation is a pair (S, N ), where S is a set and N is a map from S ∗ to itself satisfying, for all S-words u, v, w, (2.1.2) kN (w)k = kwk, (2.1.3) kwk = 1 implies N (w) = w, (2.1.4) N (u|N (w)|v) = N (u|w|v). An S-word w satisfying N (w) = w is called N -normal. If M is a monoid, we say that (S, N ) is a normalisation for M if M admits the presentation (2.1.5) hS | {w = N (w) | w ∈ S ∗ }i+. Note that (2.1.4) implies that N is idempotent. The homogeneity condition (2.1.2) is discussed (and partly skirted around) in Subsection 2.2. Example 2.1.6. Assume that S is a set and < is a linear order on S. For w in S ∗ , define N (w) to be the <∗ -minimal word obtained by permuting letters in w, where <∗ is the lexicographic extension of < to S ∗ . So, for instance, assuming a, b, c ∈ S and a < b < c, we find N (bcabac) = aabbcc. Then (S, N ) is a normalisation for the free commutative monoid N(S) over S. The following fact is a direct consequence of the definition: Lemma 2.1.7. If (S, N ) is a normalisation for a monoid M , then M admits a graduation such that all elements of S have degree one, that is, there exists a morphism d : M → (N, +) such that s ∈ S implies d(s) = 1. Proof. For g in M , all the S-words representing g must have the same length by (2.1.2): define d(g) to be this common length.  The following result connects Definition 2.1.1 with the alternative approach in which the monoid is given first. If a monoid M is generated by a set S, we denote by ev the canonical projection from S ∗ to M . Lemma 2.1.8. Assume that M is a monoid and S is a generating subfamily of M . If N is a length-preserving map from S ∗ to itself, then (S, N ) is a normalisation for M if, and only if, for all S-words w, w′ , the following conditions hold: (2.1.9) ev(N (w)) = ev(w), (2.1.10) ev(w) = ev(w′ ) implies N (w) = N (w′ ). Proof. Assume that (S, N ) is a normalisation for M . As (2.1.5) is a presentation of M , each relation N (w) = w is valid in M and, therefore, (2.1.9) holds. Next, assume that w, w′ are S-words satisfying ev(w) = ev(w′ ). As (2.1.5) is a presentation of M , (2.1.10) follows from N (u|w|v) = N (u|N (w)|v), which is (2.1.4). Conversely, assume that (2.1.9) and (2.1.10) are satisfied. By assumption on N , (2.1.2) is satisfied and, for s in S, we have N (s) ∈ S, so that S ⊆ M implies ev(s) = s and ev(N (s)) = N (s), whence (2.1.3) by (2.1.9). Then, for S-words u, v, w, we have ev(u|N (w)|v) = ev(u|w|v) by (2.1.9), whence (2.1.4) by (2.1.10). So (S, N ) is a normalisation. Finally, (2.1.5) is a presentation of M because, on the one hand, all relations N (w) = w are valid in M by (2.1.9) and, on the other hand, ev(w) = ev(w′ ) implies N (w) = N (w′ ) by (2.1.10), hence (2.1.9) implies that w and w′ are equivalent to N (w) modulo the relations of (2.1.5).  We now connect normalisations with the usual notion of a normal form. Definition 2.1.11. If M is a monoid and S is a generating subfamily of M , a normal form on (M, S) is a (set-theoretic) section of the canonical projection ev of S ∗ onto M . A normal form nf on (M, S) is called geodesic if, for every g in M , we have knf(g)k 6 kwk for every S-word w representing g. QUADRATIC NORMALISATION IN MONOIDS 5 For graded monoids, normalisations are equivalent to normal forms: Proposition 2.1.12. (i) If (S, N ) is a normalisation for a monoid M , we obtain a normal form on (M, S) by putting (2.1.13) nf(g) = N (w), where w is any representative of g. (ii) Conversely, assume that M is a graded monoid, S is a generating subfamily of M whose elements have degree 1, and nf is normal form on (M, S). Then we obtain a normalisation (S, N ) for M by putting (2.1.14) N (w) = nf(ev(w)). (iii) The correspondences of (i) and (ii) are inverses of one another. Proof. (i) First the definition makes sense, since, if w, w′ are two representatives of g, then (2.1.10) implies N (w) = N (w′ ). Next, assuming ev(w) = g, we obtain ev(nf(g)) = ev(N (w)) = ev(w) = g using (2.1.9), so nf is a section of ev. (ii) The assumption that M is graded implies kN (w)k = kwk for every S-word w. Then, (2.1.14) implies ev(N (w)) = ev(nf(ev(w))) = ev(w) because nf is a section of ev, so (2.1.9) holds. Finally, ev(w) = ev(w′ ) implies nf(ev(w)) = nf(ev(w′ )), whence (2.1.10). So, by Lemma 2.1.8, (S, N ) is a normalisation for M . (iii) If (S, N ) is a normalisation for M , and nf is defined by (2.1.13) and N ′ by (2.1.14), then N ′ (w) = nf(ev(w)) = N (w) holds, since w is a representative of ev(w). Conversely, if nf is a normal form on (M, S), and N is defined by (2.1.14) and nf′ by (2.1.13), then ev(w) = g implies nf′ (g) = N (w) = nf(g). Hence the correspondences of (i) and (ii) are inverses of one another.  2.2. The non-graded case. So far, according to Lemma 2.1.7, only graded monoids are eligible. We explain how to adapt our approach to arbitrary monoids. Definition 2.2.1. If (S, N ) is a normalisation, an element e of S is called N -neutral if (2.2.2) N (w|e) = N (e|w) = N (w)|e hold for every S-word w. If M is a monoid, we say that (S, N ) is a normalisation mod e for M if e is an N -neutral element of S and M admits the presentation (2.2.3) hS | {w = N (w) | w ∈ S ∗ } ∪ {e = 1}i+. We then put Se = S \ {e}, and write eve for the canonical projection of Se∗ onto M . If (S, N ) is a normalisation for a monoid M , (2.2.2) implies that there exists at most one N -neutral element in S. Then, if e is such an element, (S, N ) is a normalisation mod e for the monoid obtained by collapsing e in M . Lemma 2.2.4. Assume that (S, N ) is a normalisation mod e for a monoid M , and let πe be the canonical projection from S ∗ onto Se∗ . (i) The monoid M admits the presentation (2.2.5) hSe | {w = πe (N (w)) | w ∈ Se∗ }i+. (ii) For all S-words w0 , ..., wℓ , we have (2.2.6) N (w0 |e|w1 | ··· |wℓ−1 |e|wℓ ) = N (w0 | ··· |wℓ )|eℓ . (iii) For every S-word w, we have N (w) = w′ |eℓ , where w′ is an Se -word and ℓ is an upper bound of the number of occurrences of e in w. Proof. (i) By definition, M is generated by S, hence by Se . Next, for every Se -word w, the relation w = πe (N (w)) is valid in M owing to πe (w) = w. As M admits the presentation (2.2.3), it remains to check that all relations of (2.2.3) can be derived from those of (2.2.5) plus e = 1: 6 PATRICK DEHORNOY AND YVES GUIRAUD this is because the S-word N (w) is obtained from πe (N (w)) by inserting copies of e thanks to the relation e = 1. (ii) Use induction on ℓ > 0. For ℓ = 0, the result is immediate. For ℓ > 1, we find N (w0 |e|w1 | ··· |wℓ−1 |e|wℓ ) = N (w0 |e|w1 | ··· |wℓ−1 |N (e|wℓ )) by (2.1.4) = N (w0 |e|w1 | ··· |wℓ−1 |wℓ |e) by (2.2.2) = N (w0 |e|w1 | ··· |wℓ−1 |wℓ )|e by (2.2.2) = N (w0 | ··· |wℓ−1 |wℓ )|e ℓ by induction hypothesis. (iii) By (ii), we have N (w) = v|ep , where v is N (πe (w)) and p is the number of occurrences of e in w. By the same argument, we find that N (v) is w′ |eq , where w′ is N (πe (v)) and q is the number of occurrences of e in v. Since N is idempotent, we have v = N (v) = w′ |eq . We deduce that w′ contains no e and that N (w) = w′ |ep+q holds.  The following variation of Proposition 2.1.12 requires no graduation assumption: the solution is to add a dummy generator to preserve word length. Proposition 2.2.7. (i) If (S, N ) is a normalisation mod e for a monoid M , we obtain a geodesic normal form on (M, Se ) by putting (2.2.8) nf(g) = πe (N (w)), where w is any representative of g in S ∗ . (ii) Conversely, assume that M is a monoid, S is a generating subfamily of M , and nf is a geodesic normal form on (M, S). Put S e = S ∐ {e} and write eve for the canonical projection of S ∗ onto M extended to (S e )∗ by eve (e) = 1. Then we obtain a normalisation (S e , N ) mod e for M by putting (2.2.9) N (w) = nf(eve (w))|em , with m = kwk − knf(eve (w))k. (iii) The correspondences of (i) and (ii) are inverses of one another. Proof. (i) Let w, w′ be two representatives of g in S ∗ . Then one can be obtained from the other by applying relations v = v ′ with either v = u1 |N (u2 )|u3 and v ′ = u1 |u2 |u3 , or v = u1 |e|u2 and v ′ = u1 |u2 . In the first case, (2.1.4) gives N (v) = N (v ′ ). In the second case, Lemma 2.2.4 (ii) gives N (v) = N (v ′ )|e. Thus we have πe (N (w)) = πe (N (w′ )) and nfe (g) is well defined. Now, let M e be the monoid presented by (2.1.5), π : M e ։ M and eve : Se∗ ։ M be the canonical projections. For g in M and w be a representative of g in S ∗ , the relation π ◦ ev = eve ◦ πe and (2.1.9) imply eve (nf(g)) = eve (πe (N (w)) = π(ev(N (w))) = π(ev(w)) = g, so nf is a normal form on (M, Se ). Moreover, we have kπe (N (w))k 6 kN (w)k = kwk, so nf is geodesic. (ii) Since nf is geodesic, we have knf(eve (w))k 6 kwk for every S e -word w. So (2.2.9) makes sense and N is length-preserving. Next, for s ∈ S e , we have either s ∈ S and N (s) = nf(s) = s, or s = e and N (e) = nf(1)|e = e. Then, since nf is a section of ev, (2.2.9) gives eve (N (w)) = ev(nf(eve (w)) = eve (w), yielding nf(eve (u|N (w)|v)) = nf(eve (u|w|v)) and, since N is length-preserving, N (u|N (w)|v) = N (u|w|v). Thus (S e , N ) is a normalisation. Now, let w be an S e -word, with m = kwk − knf(eve (w))k. Then we have eve (w|e) = e ev (e|w) = eve (w), whence N (w|e) = nf(eve (w))|em+1 = N (w)|e, and, similarly, N (e|w) = N (w)|e, so e is N -neutral. Finally, by Lemma 2.2.4(i), the monoid M admits the presentation h(S e )e | {w = πe (N (w)) | w ∈ (S e )∗e }i+. Owing to the equalities (S e )e = S and πe (N (w)) = πe (nf(eve (w))|em ) = nf(ev(w)), the monoid M also admits the presentation hS | {w = nf(ev(w)) | w ∈ S ∗ }i+. (iii) Starting from (i), let (S e , N ′ ) be the normalisation mod e derived from nf using (ii). Then we have (Se )e = S and N ′ (w) = nf(ev(w))|em = πe (N (w))|em , whence N ′ (w) = N (w) by Lemma 2.2.4 (iii). Conversely, starting from (ii), let nf′ be the normal form derived from N QUADRATIC NORMALISATION IN MONOIDS 7 using (i). Then we have nf′ (g) = πe (N (w)) = πe (nf(eve (w))|em ) = nf(g) for every g in M with representative S-word w.  Remark. If a monoid M is graded with respect to a generating family S and nf is a normal form on (M, S), then two normalisations come associated with M and S: the one (S, N ) provided by Proposition 2.1.12 (ii), and the one (S e , N e ) provided by Proposition 2.2.7 (ii). The connection between these systems is given, for every S e -word w, by the equality πe (N e (w)) = N (πe (w)). 3. Quadratic normalisations and their class We now restrict our study to particular normalisations that are, in a convenient sense, generated by transformations of length-two words. After basic definitions and examples (Subsection 3.1), we relate those normalisations with rewriting systems (Subsection 3.2). Then we introduce the class of such a normalisation as a pair of elements of N ∪ {∞} that gives an upper bound on the complexity of normalisation for length-three words (Subsection 3.3). Finally, we consider the p-class, an analogue involving length-p words (Subsection 3.4). 3.1. Quadratic normalisations. Notation 3.1.1. (i) If S is a set and φ is a map from the set S [p] of length-p S-words to itself, then, for i > 1, we denote by φi the (partial) map of S ∗ to itself that consists in applying φ to the entries in position i, ..., i + p − 1. If u = i1 | ··· |in is a finite sequence of positive integers, we write φu for the composite map φin ◦ ··· ◦ φi1 . (ii) If (S, N ) is a normalisation, we denote by N the restriction of N to S [2] . Here is the main notion investigated in this paper: Definition 3.1.2. A normalisation (S, N ) is called quadratic if the following conditions hold: (3.1.3) An S-word w is N -normal if, and only if, every length-two factor of w is. For every S-word w, there exists a finite sequence u of positions, depending on w, (3.1.4) such that N (w) is equal to Nu (w). So, a normalisation (S, N ) is quadratic if N -normality only depends on length-two factors and if one can go from an S-word w to the S-word N (w) in finitely many steps, each of which consists in applying N to some length-two factor. Note that, provided S is finite, (3.1.3) implies that the language of all N -normal S-words is regular. Example 3.1.5. The normalisation (S, N ) of Example 2.1.6 is quadratic. Indeed, an S-word is N -normal if, and only if, all its length-two subfactors are of the form s|t with s 6 t, so (3.1.3) is satisfied. Moreover, (3.1.4) holds, since every S-word w can be transformed into the equivalent N -normal S-word N (w) by switching adjacent letters that are not in the expected order: for instance, if a < b < c, one has N (cbba) = abbc = N31213 (cbba). Note that the sequence of length-two normalisations is not unique, and depends on the initial word. Definition 3.1.2 gathers two locality conditions, which, taken separately, do not seem to have interesting consequences in our approach: (3.1.3) is a static characterisation of normal words, whereas (3.1.4) is dynamical in that it involves transformations into normal words. As (3.1.4) implies that a length-two word is N -normal if, and only if, it is N -invariant, it induces the right-to-left implication in (3.1.3). The next two counterexamples show that this is the only general connection between (3.1.3) and (3.1.4). Example 3.1.6. Let S = {a, b, c} and N : S ∗ → S ∗ be defined as follows: starting from w in S ∗ , we first replace every factor aba or aca with a3 , and then, in the resulting word, we replace every factor ab with ac and every factor ca with ba. Then (S, N ) is a normalisation (for (2.1.4), observe for instance that N (uabv) = N (uacv) holds both when v begins with a and when it does not), it satisfies (3.1.3) since a word is N -normal if and only if it contains no factor ab or ca, but it does not satisfy (3.1.4): neither aba nor aca is N -normal, but the only 8 PATRICK DEHORNOY AND YVES GUIRAUD S-words that can be obtained from aba and aca using N1 and N2 are aba and aca themselves. Hence (3.1.3) does not imply (3.1.4). Example 3.1.7. Let S = {a, b} and N : S ∗ → S ∗ be defined by N (w) = w for kwk 6 1, and N (w) = akwk−1 b for kwk > 2. Then (S, N ) is a normalisation for the monoid hS | ab = ba = b2 = a2 i+. Now (3.1.3) fails, since aab, which is N -normal, contains the non N -normal factor aa. But (3.1.4) is satisfied, since a straightforward induction gives N (w) = N 1| ··· |p−1 (w) for w of length p > 2. Hence (3.1.4) does not imply (3.1.3). When a normalisation (S, N ) is quadratic, the restriction N of N to S [2] is crucial. Here are first general properties. Proposition 3.1.8. (i) If (S, N ) is a quadratic normalisation for a monoid M , then N is idempotent and M admits the presentation (3.1.9) hS | {s|t = N (s|t) | s, t ∈ S}i+; (ii) If (S, N ) is a quadratic normalisation, then an element e of S is N -neutral if, and only if, it satisfies (3.1.10) N (e|s) = N (s|e) = s|e for every s in S. (iii) If (S, N ) is a quadratic normalisation mod e for a monoid M , then M admits the presentation (3.1.11) hSe | {s|t = πe (N (s|t)) | s, t ∈ Se }i+. Proof. (i) By (2.1.4), N is idempotent, hence so is its restriction N . The monoid M admits the presentation (3.1.9) because it admits the presentation (2.1.5) with the same generators, because the relations (3.1.9) are contained into the ones of (2.1.5), and because (3.1.4) implies that every relation of (2.1.5) is a consequence of finitely many relations of (3.1.4). (ii) The relations (3.1.10) are particular instances of (2.2.2), so they hold if e is N -neutral. Conversely, assume (3.1.10) and let w be an S-word. We first prove N (w|e) = N (w)|e. We have N (w|e) = N (N (w)|e) by (2.1.4). Moreover, every length-two factor of N (w)|e is N -normal. Indeed, for kwk > 1, writing N (w) = w′ |s with w′ ∈ S ∗ and s ∈ S, the length-two factors of N (w)|e are those of N (w), which are N -normal by (3.1.3), and s|e, which is N -normal by (3.1.10). Hence N (w)|e is N -normal by (3.1.3), which implies N (w|e) = N (w)|e. Now, we prove N (e|w) = N (w|e) by induction on kwk. The result is immediate for kwk = 0. Otherwise, write w = s|w′ , with s in S and w′ satisfying N (e|w′ ) = N (w′ |e). Using (2.1.4), (3.1.10) and the induction hypothesis on w′ , we find N (e|s|w′ ) = N (N (e|s)|w′ ) = N (s|e|w′ ) = N (s|N (e|w′ )) = N (s|N (w′ |e)) = N (s|w′ |e), so e is N -neutral. (iii) By (i), M is presented by hS | {s|t = N (s|t) | s, t ∈ S} ∪ {e = 1}i+. Applying the Tietze transformation that collapses e onto 1, we obtain the presentation hSe | {πe (s|t) = πe (N (s|t)) | s, t ∈ S}i+ for M . If at least one of s or t is e, then by (3.1.10), the corresponding relation boils down to s = s, t = t or 1 = 1, so that we can remove it. Otherwise, we have πe (s|t) = s|t, yielding (3.1.11).  3.2. Quadratic normalisations and rewriting. We recall that a (word) rewriting system is a pair (S, R) consisting of a set S and a binary relation R on S ∗ whose elements (w, w′ ) are written w → w′ and called rewriting rules. Assume that (S, R) is a rewriting system. We denote by →R the closure of R with respect to the product of S ∗ and by →∗R the reflexive-transitive closure of →R . An S-word w is R-normal if w →∗R w′ implies w′ = w. If w, w′ are S-words, w′ is an R-normal form of w if w →∗R w′ and w′ is R-normal. One says that (S, R) is quadratic if w → w′ ∈ R implies kwk = kw′ k = 2; reduced if w → w′ ∈ R implies that w′ is R-normal and w is R \ {w → w′ }-normal; normalising if every S-word admits at least an R-normal form; and confluent if the conjunction of w →∗R w1 QUADRATIC NORMALISATION IN MONOIDS 9 and w →∗R w2 implies w1 →∗R w′ and w2 →∗R w′ for some w′ . As a rewriting rule is a pair of words, there is no ambiguity in speaking of the monoid presented by (S, R). Proposition 3.2.1. (i) If (S, N ) is a quadratic normalisation for a monoid M , then we obtain a quadratic, reduced, normalising and confluent rewriting system (S, R) presenting M by putting (3.2.2) R = {s|t → N (s|t) | s, t ∈ S, s|t 6= N (s|t)}. (ii) Conversely, if (S, R) is a quadratic, reduced, normalising and confluent rewriting system presenting a monoid M , we obtain a quadratic normalisation (S, N ) for M by putting (3.2.3) N (w) = w′ where w′ is the R-normal form of w. (iii) The correspondences of (i) and (ii) are inverses of one another. Proof. (i) By definition, (S, R) is quadratic and reduced, and, for all S-words w and w′ , we have w →∗R w′ if, and only if, w′ = Nu (w) holds for some sequence u of positions. Thus, by (3.1.4), R is normalising. Moreover, the conjunction of w →∗R w1 and w →∗R w2 implies N (w1 ) = N (w2 ), hence (S, R) is confluent by (3.1.4). Finally, (S, R) is a presentation of M by (3.1.9). (ii) Since (S, R) is normalising and confluent, every S-word admits exactly one R-normal form, so (3.2.3) makes sense and implies that M admits the presentation (2.1.5). Next, since R is quadratic, N is length-preserving and preserves generators. Moreover, the R-normal forms of u|w|v and of u|N (w)|v are equal, whence N (u|w|v) = N (u|N (w)|v). So (S, N ) is a normalisation for M . Moreover, the definition of N implies that it satisfies both (3.1.3) and (3.1.4). (iii) The proof is straightforward.  Note that the rewriting system associated to a quadratic normalisation does not always terminate, meaning that there may exist infinite rewriting sequences w0 →R w1 →R w2 →R ···, as shown in Section 5. Example 3.2.4. If (S, N ) is the quadratic normalisation for the free commutative monoid N(S) of Example 2.1.6, the associated quadratic rewriting system (S, R) contains one rule ts → st for all s, t in S with t > s. By Proposition 3.2.1 (i), this rewriting system is normalising and confluent. Proposition 3.2.1(i) can be declined to account for a neutral element and the termination properties of the corresponding rewriting systems are related. Proposition 3.2.5. (i) If (S, N ) is a normalisation mod e for a monoid M , then we obtain a reduced, normalising and confluent rewriting system (Se , Re ) presenting M by putting (3.2.6) Re = {s|t → πe (N (s|t)) | s, t ∈ Se , s|t 6= N (s|t)}. (ii) If the rewriting system (S, R) of (3.2.2) terminates, then so does (Se , Re ). Proof. (i) Similar to Proposition 3.2.1(i). (ii) If w →Re w′ holds for Se -words w, w′ , then, by definition, there exists a position i satisfying w′ = πe (Ni (w)). Thus, there exists a sequence of positions u = i1 | ··· |ip satisfying Nu (Ni (w)) = w′ |em for some m, and where each Nij acts according to a rule e|s → s|e. Hence, each sequence w0 →Re w1 →Re ··· →Re wℓ in Se∗ lifts to a sequence w0 →R w0′ →∗R w1 |em1 →R w1′ |em1 →∗R w2 |em1 +m2 →∗R ··· →∗R wℓ |em1 + ··· +mℓ in S ∗ . So, if (Se , Re ) does not terminate, neither does (S, R).  3.3. The class of a quadratic normalisation. By definition, if (S, N ) is a quadratic normalisation and w is an S-word, then N (w) is obtained by successively applying the restriction N of N to various length-two factors. We shall now investigate the possibilities and introduce a parameter, called the class, evaluating the complexity of the procedure for length-three S-words. For such a w, there must exist a finite sequence u of positions 1 and 2, such that, with the convention of Notation 3.1.1, N (w) is equal to Nu (w). As N is idempotent, repeating 1 or 2 10 PATRICK DEHORNOY AND YVES GUIRAUD in the sequence u is useless, and it is enough to consider alternating words u of the form 121... or 212..., omitting the separators to make reading easier. For m > 0, we write 121...[m] for the alternating word 121... of length m, and similarly for 212...[m]. So, for instance, N212...[4] will stand for N2121 , that is, for the composition of N2 , N1 , N2 , and N1 with N2 applied first. According to the above discussion, if (S, N ) is a quadratic normalisation, then, for every length-three S-word w, there exists m such that N (w) is N121...[m] (w) or N212...[m] (w). Definition 3.3.1. For c a natural number, we say that a quadratic normalisation (S, N ) is of left-class c if N (w) = N121...[c] (w) holds for every w in S [3] . Symmetrically, we say that (S, N ) is of right-class c if N (w) = N212...[c] (w) holds for every w in S [3] . We say that (S, N ) is of class (c, c′ ) if it is of left-class c and right-class c′ . Example 3.3.2. Let (S, N ) be the lexicographic normalisation for NS of Example 2.1.6. For #S = 1, there is only one length-three S-word, which is N -normal, so (S, N ) is of class (0, 0). Assume now #S > 2. Then, one checks that, for all r, s, t in S, the words N121 (r|s|t) and N212 (r|s|t) are N -normal (and equal), so (S, N ) is of class (3, 3). On the other hand, assuming a < b, we find N12 (bba) = bab and N21 (baa) = aba, so (S, N ) is neither of left-class 2 nor of right-class 2. To give another example, consider S = {a, b} and N defined by N (w) = akwk if w contains an even number of letters b, and N (w) = akwk−1 b otherwise. One checks that (S, N ) is a quadratic normalisation for the monoid ha, b | ab = ba, a2 = b2 i+. Then, a case-by-case checking on S [3] shows that (S, N ) is of class (2, 3), but neither of left-class 1 nor of right-class 2, as shows the worst-case example N2 baa ) baa ( −→ N1 −→ aba N2 −→ aab. The following observation, already implicit in the above example, will be crucial. Lemma 3.3.3. Assume that (S, N ) is a quadratic normalisation. (i) If w is in S [3] , then N (w) = N121...[c] (w) implies N (w) = N121...[c+1] (w). (ii) If (S, N ) is of left-class c, then it is of left-class c′ for every c′ with c′ > c, and of right-class c′′ for every c′′ with c′′ > c + 1. Proof. (i) Assume N (w) = N121...[c](w). By (3.1.3), N (w) is invariant both under N1 and N2 , since it is N -normal. Hence we have N121...[c+1] (w) = N121...[c] (w). (ii) Assume that (S, N ) is of left-class c. Then (i) implies N (w) = N121...[c+1] (w) for every w in S [3] , so (S, N ) is of left-class c + 1 as well and, from there, it is of left-class c′ for every c′ > c. For w in S [3] , the assumption and (2.1.4) give N (w) = N121...[c] (N2 (w)) = N212...[c+1] (w). Hence (S, N ) is of right-class c + 1 and, from there, of right-class c′′ for every c′′ with c′′ > c + 1.  Define the minimal left-class of a quadratic normalisation (S, N ) to be the smallest integer c such that (S, N ) is of left-class c, if such an integer exists, and ∞ otherwise. We introduce the symmetric notion of minimal right-class, and define the minimal class to be the pair made of the minimal left-class and the minimal right-class. Lemma 3.3.4. The minimal class of a quadratic normalisation (S, N ) is either of the form (c, c′ ) with |c′ − c| 6 1, or (∞, ∞). If S is finite, the value (∞, ∞) is excluded. Proof. If the minimal left-class of (S, N ) is a finite number c, then Lemma 3.3.3 implies that (S, N ) is of right-class c + 1; hence the minimal right-class c′ satisfies c′ 6 c + 1 and, for symmetric reasons, we have c 6 c′ + 1, whence |c′ − c| 6 1. The assumption that (S, N ) is quadratic implies, for every w in S [3] , the existence of a smallest finite number cw satisfying N (w) = N121...[cw ] (w). If S is finite, the supremum of all numbers cw for w in S [3] is finite, and Lemma 3.3.3 (i) implies that c is the minimal left-class of (S, N ).  QUADRATIC NORMALISATION IN MONOIDS 11 The class of a normalisation (S, N ) can be characterised in terms of algebraic relations exclusively involving the map N . Proposition 3.3.5. A quadratic normalisation (S, N ) is of left-class c if, and only if, N satisfies (3.3.6) N121...[c] = N121...[c+1] = N212...[c+1] , and of class (c, c) if, and only if, N satisfies (3.3.7) N121...[c] = N212...[c] . Proof. Assume that (S, N ) is of left-class c. For every w in S [3] , Lemma 3.3.3 gives N (w) = N121...[c] (w) = N121...[c+1] (w) = N212...[c+1] (w), whence (3.3.6). Conversely, assume (3.3.6) and let w belong to S [3] . If c is odd, we obtain N1 (N121...[c](w)) = N1 (N1 (N121...[c−1] (w))) = N121...[c] (w), since N is idempotent, and, by (3.3.6), N2 (N121...[c] (w)) = N121...[c+1] (w) = N121...[c] (w). If c is even, a symmetric argument gives the same values. So, in all cases, the S-word N121...[c] (w) is invariant both under N1 and N2 , hence it is N -normal. As this holds for every w in S [3] , we conclude that (S, N ) is of left-class c. Assume that (S, N ) is of class (c, c). By (i), we have N121...[c] = N121...[c+1] = N212...[c+1] and, by the symmetric counterpart of (i), we have N212...[c] = N212...[c+1] = N121...[c+1] , whence (3.3.7) by merging the values. Conversely, assume (3.3.7) and let w belong to S [3] . Applying (3.3.7) to N1 (w) gives N121...[c] (N1 (w)) = N212...[c] (N1 (w)), reducing to N121...[c] (w) = N121...[c+1] (w), since N1 is idempotent. Similarly, applying (3.3.7) to N2 (w) leads to N212...[c+1] (w) = N212...[c](w). Merging the results and applying (3.3.7) to w, we deduce N121...[c+1] (w) = N121...[c] (w) = N212...[c] (w) = N212...[c+1] (w). As this holds for every w in S [3] , (3.3.6) is satisfied, so, by (i), (S, N ) is of left-class c. A symmetric argument implies that (S, N ) is of right-class c.  The following example shows that the minimal left-class of a quadratic normalisation can be an arbitrarily high integer. Example 3.3.8. For n > 2, let Sn = {a, b1 , ..., bn } and Rn consist of the rules abi → abi+1 for i < n odd and bi a → bi+1 a for i < n even. Then the rewriting system (Sn , Rn ) is convergent: termination is given by comparison of the number of b1 , then of b2 , then of b3 , etc.; confluence is obtained by observing that, for every minimal overlapping application of rules bi abj →Rn bi+1 abj and bi abj →Rn bi abj+1 , we have bi+1 abj →Rn bi+1 abj+1 and bi abj →Rn bi+1 abj+1 . Let (Sn , Nn ) be the associated quadratic normalisation as defined in Proposition 3.2.1. For n > 3, the minimal class of (Sn , Nn ) is (n − 1, n): length-three words that do not begin and finish with a are Rn -normal or become Rn -normal in one step, and the reduction of ab1 a looks like N− N2 N1 N2 N1 ab1 a ) −→ ab2 a −→ ab3 a −→ ··· ab1 a ( −→ −→ abn a, implying that the minimal left-class is n − 1, and the minimal right-class is n. The next example shows that the minimal left-class can be ∞. (Putting n = ∞ in Example 3.3.8 provides a non-normalising system: ab1 a has no normal form.) Example 3.3.9. For n > 2, let Sn = {a0 , ..., an } and Rn consist of the rules ai aj → a⌊ i+j ⌋ a⌈ i+j ⌉ 2 2 for i > j. 12 PATRICK DEHORNOY AND YVES GUIRAUD The rewriting system (Sn , Rn ) is convergent. Let (Sn , Nn ) be the associated quadratic normalisation. As in Example 2.1.6, the Nn -normal words are the lexicographically non-decreasing ones with respect to a1 < ··· < an . Then the minimal class of (Sn , Nn ) is (3+⌊log2 n⌋, 3+⌊log2 n⌋). Indeed, for 2p 6 n < 2p+1 , the worst case for the left-class is attained by a2p a2p a0 : putting i = ⌊2p+1 /3⌋, the latter Sn -word reduces to ai ai ai+1 (even p) or ai ai+1 ai+1 (odd p) in p + 3 steps. Moreover, if we define S∞ to be the infinite set {a0 , a1 , ...} and N∞ associated as above, (S∞ , N∞ ) is a quadratic normalisation with minimal class (∞, ∞) as, for every p, the reduction of a2p a2p a0 requires p + 3 steps. 3.4. The p-class. We now consider the normalisation of length-p words for p > 4. If (S, N ) is a quadratic normalisation, then, by definition, one can transform a length-p word w into N (w) by applying a finite number of elementary maps Ni with 1 6 i < p. Contrary to the case p = 3, there may exist many ways of composing these maps for p > 4: for instance, one can consider the left strategy consisting in always normalising the leftmost unreduced length-two factor of the current word, but this choice is arbitrary. Writing N [p] for the restriction of N to S-words of length p, more canonical decompositions arise when one expresses N [4] in terms of N [3] and, more generally, N [p] in terms of N [p−1] . Then the situation is similar to 3 vs. 2, and a natural notion of p-class appears. Definition 3.4.1. For p > 3, we say that a quadratic normalisation (S, N ) is of left-p-class c [p−1] if, for every w in S [p] , we have N (w) = N121...[c]. Symmetrically, we say that (S, N ) is of right[p−1] p-class c if, for every w in S [p] , we have N (w) = N212...[c] . We say that (S, N ) is of p-class (c, c′ ) if it is of left-p-class c and right-p-class c′ . Thus the left-class of Subsection 3.3 is the left-3-class, and similarly for the right-class and the class. Example 3.4.2. Consider the lexicographic normalisation (S, N ) of Example 3.3.2. We saw that, for #S > 2, the minimal (3)-class is (3, 3). An easy induction shows that, for every p > 4 [p−1] [p−1] and for every w in S [p] , the words N212 (w) and N121 (w) are lexicographically nondecreasing, hence N -normal. Thus (S, N ) is of p-class (3, 3). Then, assuming #S > 2 and a < b, we find [p−1] [p−1] N12 (bp−1 a) = babp−2 and N21 (bap−1 ) = ap−2 ba, which are not N -normal. So (S, N ) is neither of left-p-class 2 nor of right-p-class 2. The N -normality of S-words can be characterised in terms of N -normality of their length-p factors, with a straightforward proof: Lemma 3.4.3. If (S, N ) is a quadratic normalisation, then, for p > 2, an S-word w with kwk > p is N -normal if, and only if, every length-p factor of w is. All properties of the 3-class extend to the p-class for p > 3. In particular, when it is not (∞, ∞), the minimal p-class must be a pair of the form (c, c′ ) with |c − c′ | 6 1, and we have the following counterpart of Proposition 3.3.5, with a similar proof: Proposition 3.4.4. A quadratic normalisation (S, N ) is of left-p-class c if, and only if, the [p−1] [p−1] [p−1] map N [p−1] satisfies N121...[c] = N121...[c+1] = N212...[c+1], and of p-class (c, c) if, and only if, [p−1] [p−1] the map N [p−1] satisfies N121...[c] = N212...[c] . The following examples show that the behaviour of the 4-class is independent from that of the 3-class: the 4-class may be larger, equal, or smaller. Example 3.4.5. The normalisation (Sn , Nn ) of Example 3.3.8 has minimal 3-class is (n, n). However, for p > 4, its minimal p-class is (2, 2). Example 3.4.6. Let Sn = {a, b1 , ..., bn } and Nn be given by the rules abi →abi+1 for i odd and bi a→bi+1 a for i even (as in Example 3.3.8), completed with bi+1 bi → bi+1 bi+1 for i odd QUADRATIC NORMALISATION IN MONOIDS 13 and bi bi+1 →bi+1 bi+1 for i even. For p > 3, the minimal p-class of (Sn , Nn ) is (n − 1, n), with the worst case realised for abp−2 a. 1 Example 3.4.7. Let Sn = {a, b1 , ..., bn , c1 , ..., cn } and Nn be given by the rules abi →abi+1 and bi+1 ci →bi+1 ci+1 for i odd, and ci a→ci+1 a and bi ci+1 →bi+1 ci+1 for i even. Here it turns out that the minimal 3-class is (5, 5), whereas the minimal 4-class is (n − 1, n). For instance, [3] for n = 10, the worst cases are realised by N12121 (b4 c2 a) = b5 c5 a, and N2121212121 (ab1 c1 a) = ab10 c10 a. One also observes that the minimal p-class for p > 5 is (2, 2) for every n > 5. 4. Quadratic normalisations of class (4, 3) Example 3.4.7 shows that having left-class or right-class c does not say much about normalisation of words of length four and higher: an upper bound on the complexity of normalisation for length-three words implies no upper bound on the complexity of normalisation for longer words. We observe below that such a phenomenon is impossible when the class is small, namely when the class is (3, 4) or (4, 3). Our proof is based on an argument borrowed from [10], involving a diagrammatic approach called the domino rule. The results for classes (3, 4) and (4, 3) are entirely similar; the latter is chosen here in view of the connection with Garside normalisation in Section 6. The section comprises three parts. First, the domino rule is introduced in Subsection 4.1. Next, we establish a general formula for normalisation of long words when some domino rule is valid in Subsection 4.2. Finally, we show in Subsection 4.3 how standard braid arguments can be used to provide a complete axiomatisation of class (4, 3) normalisation. 4.1. The domino rule. By Proposition 3.3.5, if a quadratic normalisation (S, N ) has class (4, 3), the map N satisfies (3.3.6), which, in the current case, is (4.1.1) N212 = N2121 = N1212 . We shall now translate these conditions into a diagrammatic rule. Definition 4.1.2. Assume that S is a set and φ is a map from S [2] to itself. We say that the domino rule is valid for φ if, if, for all s1 , s2 , s′1 , s′2 , t0 , t1 , t2 in S satisfying s′1 |t1 = φ(t0 , s1 ) and s′2 |t2 = φ(t1 |s2 ), the assumption that s1 |s2 is φ-invariant implies that s′1 |s′2 is φ-invariant as well. The domino rule of Definition 4.1.2 becomes more understandable when illustrated in a diagram. To this end, we associate with every element s of the considered set S an s-labeled arrow, and use concatenation of arrows for the concatenation of elements (note that this amounts to viewing S ∗ as a category). s′ Let us indicate that a word s|t of S [2] is φ-invariant—hence N -normal when φ is the map N associated with a normalisation (S, N )—with a small arc, as in s t′ s t . Then, in the situation when s′ |t′ = φ(s|t) holds, we draw t a square diagram as on the right. ′ s1 s′2 With such conventions, the domino rule for φ corresponds to the diagram on the right: whenever the two squares are commut1 t2 tative and the three pairs of edges connected with small arcs are t0 φ-invariant, then so is the fourth pair indicated with a dotted arc. s1 s2 Lemma 4.1.3. A quadratic normalisation (S, N ) is of class (4, 3) if, and only if, the domino rule is valid for N . Proof. Assume that (S, N ) is of right-class 3, and let s1 , ..., t2 be elements of S satisfying the assumptions of the domino rule. By definition of the right-class, we have N (t0 |s1 |s2 ) = N212 (t0 |s1 |s2 ). As, by assumption, s1 |s2 is N -normal, we obtain N (t0 |s1 |s2 ) = N12 (t0 |s1 |s2 ) = N2 (s′1 |t1 |s2 ) = s′1 |s′2 |t2 . So s′1 |s′2 |t2 is N -normal, hence so is s′1 |s′2 , and the domino rule is valid for N . 14 PATRICK DEHORNOY AND YVES GUIRAUD Conversely, assume that the domino rule is valid for N . Let t0 |r1 |r2 be an arbitrary word in S [3] . Put s1 |s2 = N (r1 |r2 ), s′1 |t1 = N (t0 |s1 ), and s′2 |t2 = N (t1 |s2 ). Then s′2 |t2 is N -normal by construction, and s′1 |s′2 is N -normal by the domino rule, so s′1 |s′2 |t2 is N -normal. Hence we have N (w) = N212 (w) for every w in S [3] , and (S, N ) is of right-class 3.  4.2. Normalising long words. We shall now show that, is (S, N ) is a normalisation map of class (4, 3), there exists a simple formula for the normalisation of arbitrarily long words. Notation 4.2.1. Starting from δ1 = ε (the empty sequence) and using sh for the shift mapping that increases every entry by 1, we inductively define a finite sequence of positive integers δp by (4.2.2) δp = sh(δp−1 )|1|2| ··· |p − 2|p − 1 for p > 1. Thus we find, omitting the separation symbol, δ2 = 1, δ3 = 212, δ4 = 323123, δ5 = 4342341234, etc. Proposition 4.2.3. Assume that (S, N ) is a quadratic normalisation of class (4, 3). Then, for every p > 1 and every length-p word w, we have (4.2.4) N (w) = Nδp (w). So there is a universal recipe, prescribed by the sequence of positions δp , for normalising every word of length p. We begin with a preparatory result. Lemma 4.2.5. If (S, N ) is a quadratic normalisation and the domino rule is valid for N , then, for every t in S and every N -normal S-word s1 | ··· |sq , we have (4.2.6) N (t|s1 | ··· |sq ) = N12 ··· (q−1)q (t|s1 | ··· |sq ). Proof. For q = 1, (4.2.6) reduces to N (t|s1 ) = N (t|s1 ). Assume q > 2. Put t0 = t and inductively define s′i and ti by s′i |ti = N (ti−1 |si ) for i = 1, ..., q (see Figure 1). Then, by definition, we have s′1 | ··· |s′q |tq = N12 ··· (q−1)q (t|s1 | ··· |sq ), so, in order to establish (4.2.6), it suffices to show that the word s′1 | ··· |s′q |tq is N -normal. Now, for i = 1, ..., q − 1, the assumption that si |si+1 is N -normal and the validity of the domino rule imply that s′i |s′i+1 is N -normal as well. Finally, s′q |tq is N -normal by construction. Hence, every length-two factor of s′1 | ··· |s′q |tq is N -normal and, therefore, the latter is N -normal.  s′1 t = t0 t1 s1 s′q s′2 t2 s2 tq−1 tq tq sq Figure 1. Left-multiplying a normal word by an element of S: the domino rule guarantees that the upper row is normal whenever the lower row is. The diagram shows, in particular, that the monoid presented by (S, N ) satisfies the 2-Fellow Traveler Property with respect to left-multiplication [17]. Proof of Proposition 4.2.3. By Lemma 4.1.3, the domino rule is valid for N , hence Lemma 4.2.5 applies. We prove (4.2.4) using induction on p. For p 6 2 , the result is immediate. Assume p > 3 and let w = s1 |···|sp belong to S [p] . Put (4.2.7) s′2 |···|s′p := Nδp−1 (s2 |···|sp ) (see Figure 2). By induction hypothesis, the word s′2 |···|s′p is N -normal. On the other hand, by definition of position shifting, (4.2.7) implies (4.2.8) s1 |s′2 |···|s′p = Nsh(δp−1 ) (s1 |s2 |···|sp ). QUADRATIC NORMALISATION IN MONOIDS 15 Then, as s′2 |···|s′p−1 is N -normal and s1 belongs to S, Lemma 4.2.5 implies N (s1 |s′2 |···|s′p ) = N12 ··· (p−1) (s1 |s′2 |···|s′p ), whence, owing to the inductive definition of δp , (4.2.9) N (s1 |s′2 |···|s′p ) = N12 ··· (p−1) ◦ Nsh(δp−1 ) (s1 |s2 |···|sp ) = Nδp (s1 |s2 |···|sp ). Owing to (2.1.4), (4.2.8) implies that N (s1 |s2 |···|sp ) and N (s1 |s′2 |···|s′p ) are equal. Merging with (4.2.9), we deduce N (s1 |s2 |···|sp ) = Nδp (s1 |s2 |···|sp ).  The inductive normalisation process described in Proposition 4.2.3 and Figure 2 amounts to using the map N to construct a triangular grid as shown in Figure 3. s′′p−1 s′′1 s′′p Lemma 4.2.5 s1 s1 s′2 s′p s1 s2 sp induction hypothesis Figure 2. Inductive normalisation process of a length-p word s1 | ··· |sp based on the domino rule: first normalise s2 |···|sp into s′2 |···|s′p , and then normalise s1 |s′2 |···|s′p into s′′1 |···|s′′p , which is N -normal by Lemma 4.2.5. s1 s2 s3 s′1 s′2 s′3 step 4: step 5: step 6: N1 N2 N3 step 2: step 3: N2 N3 s′4 step 1: N3 s4 Figure 3. Normalising a length-p word in p(p − 1)/2 steps, here with p = 4: according to (4.2.4), the six steps correspond to applying Nδ4 , that is, N323123 . An important consequence of Proposition 4.2.3 is that, contrary to the situation of Example 3.4.7, it is impossible to have a large 4-class in class (4, 3). Corollary 4.2.10. If (S, N ) is a quadratic normalisation of class (4, 3), then (S, N ) is of p-class (4, 3) for every p > 3. Proof. Assume p > 3, and let w = s1 | ··· |sp lie in S [p] . We shall show that N (w) is equal to [p−1] [p−1] [p−1] [p−1] to w leads to an , and N2 , N1 N212 (w) by checking that successively applying N2 N -normal word. First, let s′2 | ··· |s′p = N (s2 | ··· |sp ). We have [p−1] (4.2.11) N2 (w) = s1 |s′2 | ··· |s′p . As s′2 | ··· |s′p is N -normal, Lemma 4.2.5 implies N (w) = N12 ··· (p−1) (s1 |s′2 | ··· |s′p ). Now, put t0 = s1 and, inductively, s′′i |ti = N (ti−1 |s′i+1 ) for i = 1, ..., p − 1. As s′2 | ··· |s′p−1 is N normal, Lemma 4.2.5 implies that s′′1 | ··· |s′′p−2 |tp−1 is N -normal, so we have N (s1 |s′2 | ··· |s′p−1 ) = s′′1 | ··· |s′′p−2 |tp−1 , whence (4.2.12) [p−1] N1 (s1 |s′2 | ··· |s′p ) = s′′1 | ··· |s′′p−2 |tp−1 |s′p . 16 PATRICK DEHORNOY AND YVES GUIRAUD By the same argument, s′′1 | ··· |s′′p−1 |tp is N -normal, hence so is a fortiori s′′2 | ··· |s′′p−1 |tp . By construction, we have s′′2 | ··· |s′′p−1 |tp = Np−1 (s′′2 | ··· |s′′p−2 |tp−1 |s′p ), whence N (s′′2 | ··· |s′′p−2 |tp−1 |s′p ) = s′′2 | ··· |s′′p−1 |tp , and, from there, [p−1] (4.2.13) N2 (s′′1 | ··· |s′′p−2 |tp−1 |s′p ) = s′′1 | ··· |s′′p−1 |tp . As s′′1 | ··· |s′′p−1 |tp is N -normal, it is N (w), so merging (4.2.11), (4.2.12), and (4.2.13) gives [p−1] N (w) = N212 (w), witnessing that (S, N ) is of right-p-class 3.  4.3. Axiomatisation. By Proposition 3.3.5, if a quadratic normalisation (S, N ) is not of minimal left-class ∞, the restriction N of N to S [2] satisfies (3.3.6) and its symmetric counterpart for c large enough. In particular, if (S, N ) has class (4, 3), then N satisfies (4.1.1), that is, N212 = N2121 = N1212 . We now go in the other direction, and prove that any idempotent map φ on S [2] satisfying the above relation necessarily stems from a quadratic normalisation of class (4, 3), thus completing a proof of Theorem A. Proposition 4.3.1. If S is a set and φ is a map from S [2] to itself satisfying (4.3.2) φ212 = φ2121 = φ1212 , there exists a quadratic normalisation (S, N ) of class (4, 3) satisfying φ = N . The problem is to extend φ into a map φ∗ on S ∗ such that (S, φ∗ ) is a quadratic normalisation of class (4, 3). Proposition 4.2.3 leads us into introducing the following extension of φ. Definition 4.3.3. For φ a map from S [2] to itself, we write φ∗ for the extension of φ to S ∗ defined by φ∗ (s) = s for s in S and φ∗ (w) = φδp (w) for w in S [p] . We will prove that, when (4.3.2) is satisfied, (S, φ∗ ) is a quadratic normalisation of class (4, 3). We begin with preparatory formulas of the form φu = φv when u and v are sequences of positions connected by a specific equivalence relation. Definition 4.3.4. We denote by ≡ the congruence on the free monoid (N \ {0})∗ of all finite sequences of positive integers generated by all shifted copies of 1 | 1 ≡ 1, 1 | 2 | 1 | 2 ≡ 2 | 1 | 2 | 1 ≡ 2 | 1 | 2, 1 | i ≡ i | 1 for i > 3. Note that the corresponding quotient monoid is a variant with infinitely many generators of the monoid Mn of [18]. Lemmas 4.3.6 and 4.3.10 below are essentially equivalent to [18, Prop. 67] but we include a short self-contained proof as our framework and notation are different. Lemma 4.3.5. If φ∗ satisfies the conditions of Proposition 4.3.1, then, for all ≡-equivalent sequences u and v, we have φu = φv . Proof. As φ∗ is idempotent, φi | i coincides with φi . For |i − j| > 2, φi and φj act on disjoint factors, so they commute. Finally, the relations for 2 | 1 | 2 and their shifted copies directly reflect (4.3.2).  Lemma 4.3.6. The following relations are valid for every p > 2: (4.3.7) δp ≡ p − 1 | ··· | 2 | 1 | sh(δp−1 ), (4.3.8) p | ··· | 2 | 1 | p | ··· | 2 | 1 (4.3.9) 1 | 2 | ··· | p | 1 | 2 | ··· | p ≡ 2 | 3 | ···p | 1 | 2 | ··· | p. ≡ p | ··· | 2 | 1 | p | ··· | 3 | 2, Proof. We use induction on p > 2. For p = 2, (4.3.7) reads 1 ≡ 1 | sh(ε), which is valid. Assume p > 3. Then we find δp = sh(δp−1 ) | 1 | 2 | ··· | p − 1 ≡ sh(p − 2 | ··· | 2 | 1 | sh(δp−2 )) | 1 | 2 | ··· | p − 1 2 = p − 1 | ··· | 3 | 2 | sh (δp−2 )) | 1 | 2 | ··· | p − 1 by definition of δp , by induction hypothesis, QUADRATIC NORMALISATION IN MONOIDS ≡ p − 1 | ··· | 3 | 2 | 1 | sh2 (δp−2 )) | 2 | ··· | p − 1 17 by i | 1 ≡ 1 | i for i = sh2 (j), = p − 1 | ··· | 3 | 2 | 1 | sh(sh(δp−2 )) | 1 | ··· | p − 2) by definition of δp−1 . = p − 1 | ··· | 3 | 2 | 1 | sh(δp−1 ) Next, for p = 2, (4.3.8) reads 2 | 1 | 2 | 1 ≡ 2 | 1 | 2, which is valid. For p > 3, we find by 1 | i ≡ i | 1 for i > 3, p | ··· | 2 | 1 | p | ··· | 2 | 1 ≡ p | ··· | 2 | p | ··· | 3 | 1 | 2 | 1 = sh(p − 1 | ··· | 1 | p − 1 | ··· | 2) | 1 | 2 | 1 ≡ sh(p − 1 | ··· | 1 | p − 1 | ··· | 2 | 1) | 1 | 2 | 1 = p | ··· | 2 | p | ··· | 3 | 2 | 1 | 2 | 1 by induction hypothesis, ≡ p | ··· | 2 | p | ··· | 3 | 2 | 1 | 2 by definition of ≡, = sh(p − 1 | ··· | 1 | p − 1 | ··· | 2 | 1) | 1 | 2 ≡ sh(p − 1 | ··· | 1 | p − 1 | ··· | 2) | 1 | 2 = p | ··· | 2 | p | ··· | 3 | 1 | 2 by induction hypothesis, ≡ p | ··· | 2 | 1 | p | ··· | 3 | 2 by i | 1 ≡ 1 | i for i > 3. The argument for (4.3.9) is symmetric.  Lemma 4.3.10. The following relations are valid for every p > 2 and 1 6 i < p: (4.3.11) δp ≡ δp | i ≡ i | δp . Proof. We use induction on p > 2. For p = 2, the only case to consider is i = 1, and (4.3.11) then reduces to 1 ≡ 1 | 1, which is true by definition. Assume p = 3. For i = 1, (4.3.11) reduces to 2 | 1 | 2 ≡ 2 | 1 | 2 | 1 ≡ 1 | 2 | 1 | 2 and, for i = 2, to 2 | 1 | 2 ≡ 2 | 1 | 2 | 2 and 2 | 1 | 2 ≡ 2 | 2 | 1 | 2, which are true by the definition of ≡. Assume now p > 4. For i = 1, we find δp | 1 ≡ p − 1 | ··· | 2 | 1 | p − 1 | ··· | 2 | sh2 (δp−2 ) | 1 2 ≡ p − 1 | ··· | 2 | 1 | p − 1 | ··· | 2 | 1 | sh (δp−2 ) 2 by (4.3.7) twice, by i | 1 ≡ 1 | i for i > 3, ≡ p − 1 | ··· | 2 | 1 | p − 1 | ··· | 2 | sh (δp−2 ) by (4.3.8), ≡ p − 1 | ··· | 2 | 1 | sh(δp−1 ) ≡ δp by (4.3.7) twice, and, for 2 6 i < p, using (4.3.7) and the induction hypothesis, we find δp | i ≡ p − 1 | ··· | 1 | sh(δp−1 ) | i = p − 1 | ··· | 1 | sh(δp−1 | i − 1) ≡ p − 1 | ··· | 1 | sh(δp−1 ) ≡ δp . The argument for i | δp ≡ δp is symmetric, with the definition of δp and (4.3.9) replacing (4.3.7) and (4.3.8).  Proof of Proposition 4.3.1. Assume that φ is idempotent and satisfies (4.3.2). Lemmas 4.3.5 and 4.3.11 imply, for all p > 3 and every w in S [p] , the equalities (4.3.12) φ∗ (φi (w)) = φ∗ (w) and φi (φ∗ (w)) = φ∗ (w) for i with 1 6 i < p. Let u, v, w be S-words with respective lengths m, n, p. Then we find φ∗ (u|φ∗ (w)|v) = φδm+n+p (u|φδp (w)|v) = φδm+n+p (φshm (δp ) (u|w|v)). The map φshm (δp ) is a composite of maps φi with m + 1 6 i 6 m + p − 1, so Lemma 4.3.10 implies φ∗ (u|φ∗ (w)|v) = φδm+n+p (u|w|v) = φ∗ (u|w|v), and we deduce that (S, φ∗ ) satisfies (2.1.4). As it also satisfies (2.1.2) and (2.1.3) by the definition of φ∗ , it is a normalisation.  The following example shows that the axiomatisation of class (4, 3) normalisations provided by Proposition 4.3.1 does not extend to higher classes. 18 PATRICK DEHORNOY AND YVES GUIRAUD Example 4.3.13. Let us consider the rewriting system of Example 3.4.7 with n = ∞, that is, S∞ = {a, b1 , b2 , ..., c1 , c2 , ...} with the rules abi →abi+1 and bi+1 ci →bi+1 ci+1 for i odd and [2] ci a→ci+1 a and bi ci+1 →bi+1 ci+1 for i even. The associated map φ on S∞ satisfies the relation φ12121 = φ21212 , but no quadratic normalisation (S∞ , N ) satisfies φ = N . Indeed, no S∞ -word that can be reached from ab1 c1 a by successive applications of φ on length-two factors is normal. 5. Class and termination By Proposition 3.2.1, a quadratic normalisation (S, N ) yields a reduced quadratic rewriting system (S, R) that is normalising and confluent. This however does not rule out the possible existence of infinite rewriting sequences, which we investigate here. The section comprises three parts. We first consider the case of class (3, 3) and prove an easy convergence result (Subsection 5.1). Next, the case of classes (3, 4) and (4, 3) is investigated in Subsection 5.2, where the not-so-easy convergence result stated as Theorem B is established. Finally, we show in Subsection 5.3 that the previous result is optimal by constructing a nonconvergent example in class (4, 4). 5.1. Termination in class (3, 3). We first consider the case of quadratic normalisations of class (3, 3), and we use an argument of finiteness on symmetric groups to prove: Proposition 5.1.1. If (S, N ) is a quadratic normalisation of class (3, 3), then the associated rewriting system (S, R) is convergent, and so is (Se , Re ) if e is an N -neutral element of S. More precisely, every rewriting sequence from a length-p word has length at most p(p − 1)/2. Proof. Assume that w0 , ..., wℓ are S-words satisfying wk →R wk+1 for 0 6 k < ℓ. Let p be the common length of the S-words wk . By assumption, for every k > 1, we have wk = Nik (wk−1 ) for some 1 6 ik < p, with wk 6= wk−1 . Let us observe, by induction on k, that u = i1 | ··· |ik is reduced in the sense of Coxeter theory, that is, it is a minimal-length representative of the associated element of the symmetric group Sp . For k = 0, the result is true as the empty word is reduced. Assume k > 1, and write u = u′ |i. By induction hypothesis, u′ is reduced. If u′ |i is not reduced, then, by the exchange lemma for Sp , see [2], there exists a sequence of positions u′′ such that u′ is equivalent to u′′ |i modulo the braid relations. Now, by Proposition 3.3.5, the assumption that (S, N ) is of class (3, 3) implies N121 = N212 and, from there, the equivalence of u′ and u′′ |i modulo the braid relations implies Nu′ = Nu′′ |i . Putting w′ = Nu′′ (w0 ), we obtain wk−1 = Ni (w′ ) and, since N is idempotent, wk = Ni (Ni (w′ )) = Ni (w′ ) = wk−1 , which contradicts wk−1 →R wk . So u must be reduced. Now, it is well-known that the length ℓ of a reduced word representing an element of Sp is bounded above by p(p − 1)/2, for instance because ℓ is the number of inversions of the permutation represented by u. So (S, R) terminates and, by Proposition 3.2.5, so does (Se , Re ) if e is an N -neutral element in S.  Remark. The bound p(p − 1)/2 in Proposition 5.1.1 is sharp, since, for the lexicographic normalisation (S, N ) of Example 2.1.6, normalising ap | ··· |a1 with a1 < ··· < ap actually requires p(p − 1)/2 steps. Proposition 5.1.1 applies to the example of plactic monoids, described thereafter. Those monoids have known normalisations that fit into our setting of quadratic normalisations, and were among the original motivations for extending the framework of Garside normalisation to the current one. Example 5.1.2. If X is a totally ordered finite set, the plactic monoid over X is the monoid PX generated by X and subject to xzy = zxy, for x 6 y < z, and yxz = yzx, for x < y 6 z. We refer to [4] for a recent reference on the following facts. The monoid PX is also generated by the family S of columns over X (the strictly decreasing products of elements of X). A pair c|c′ of columns is normal if kck > kc′ k holds and, for every 1 6 k 6 kc′ k, the kth element of c is at QUADRATIC NORMALISATION IN MONOIDS 19 most the one of c′ . Every equivalence class of X-words contains a unique tableau (a product c1 ···cn of columns such that each ci |ci+1 is normal), with minimal length in terms of columns: thus, mapping a S-word to the unique corresponding tableau defines a geodesic normal form nf on (PX , Se ), where e denotes the empty column. We consider the normalisation (S e , N ) associated to nf, which satisfies (3.1.3) by the definition of tableaux. Moreover, for every S-word w, the tableau nf(w) can be computed from any S-word w by Schensted’s insertion algorithm, progressively replacing each pair c|c′ of subsequent columns of w by nf(c|c′ ), which is a tableau with one or two columns. So, the normalisation (S e , N ) also satisfies (3.1.4), so that it is quadratic, and, when X contains at least two elements, it is of minimal class (3, 3) as testified by the computations of [3, §§4.2–4.4]. By Proposition 5.1.1, we recover [4, Th. 3.4]: the rewriting system (S, R) with R = {c|c′ → nf(c|c′ ) | c, c′ ∈ S} is finite, convergent and it presents PX . A similar argument leads to a (nonfinite) convergent quadratic presentation of PX in terms of rows, which are nondecreasing products of elements of X. The proof that the class is (3, 3) is given in [3, §§3.2–3.4]. 5.2. Termination in class (4, 3). We now consider the case of class (4, 3) and establish the general termination result stated as Theorem B: Proposition 5.2.1. If (S, N ) is a quadratic normalisation of class (4, 3), then the associated rewriting system (S, R) is convergent, and so is (Se , Re ) if e is an N -neutral element of S. More precisely, every rewriting sequence from a length-p word has length at most 2p − p − 1. Proposition 5.2.1 subsumes Proposition 5.1.1. But its proof resorts to different arguments, since Krammer’s monoid Mp , see [18], which should replace here the finite quotient-monoid Bp+ /{σi2 = σi | 1 6 i < p}, with 121 = 212 substituted with 121 = 2121, is infinite. Instead, we analyse N -normalisation directly to show that no infinite rewriting sequence may exist because one inevitably proceeds to the normal form. Proof. Let F (p) denote the maximal length of sequences w0 →R w1 →R ··· →R wℓ of S-words of length p, possibly ∞. We prove the inequality F (p) 6 2p − p − 1 using induction on p > 2. For p = 2, the inequality F (p) 6 1 holds, since N is idempotent. We now assume p > 3 and → consider a sequence − w = (w0 , ..., wℓ ) of length-p words satisfying wk →R wk+1 for 0 6 k < ℓ. → We shall distinguish several types of rewriting steps in the sequence − w , in connection with Proposition 4.2.3 and the triangular grid diagram of Figure 3. The latter corresponds to an → optimal strategy, which needs not be the case for − w , but we shall explain how to enrich each word wk into a word w bk by attaching with each letter of w a direction, either horizontal or vertical. We define Sb as S ∐ S, where S is a copy of S with an element s for each s in S, and we take the convention that s means “vertical s” and s means “horizontal s”: this associates with b every S-word w b a path in a triangular grid by starting from the top-left corner and attaching to the successive letters of w b horizontal left-to-right edges and vertical top-to-down edges. b We construct the S-words w bk inductively, in such a way that (5.2.2) for every length-two factor s|t or s|t of w bk , the S-word s|t is N -normal. b0 satisfies (5.2.2) by default, and First, for w0 = s1 | ··· |sp , we put w b0 = s1 | ··· |sp−1 |sp . Then w (the path associated with) w b0 consists of w0 drawn vertically, except the last letter, which is drawn horizontally. Assume that w bk−1 has been defined, it satisfies (5.2.2), and wk = Ni (wk−1 ) holds. Let s and t be the letters of wk−1 in positions i and i+1, and s′ |t′ = N (s|t). We look at the directions of the letters of w bk−1 in positions i and i + 1. The assumption wk−1 →R wk implies that s|t is not N -normal. By (5.2.2), this excludes the directions s|t and s|t. So only two cases are possible. In the case of a VH-step, meaning a vertical letter followed by a horizontal one, we define w bk to be obtained from w bk−1 by replacing, at position i, the factor s|t with s′ |t′ when t is not 20 PATRICK DEHORNOY AND YVES GUIRAUD ′ the last letter of wk−1 , and by s′ |t′ otherwise, which corresponds to replacing s t with s t′ ′ t′ respectively. In both cases, the length-two factor of wk starting at position i is or s thus N -normal, so (5.2.2) is satisfied at this position. The only other position where (5.2.2) might fail is i − 1, when the corresponding letter of w bk is horizontal, since, otherwise, (5.2.2) requires nothing on the factor. Now, going from w bk−1 to w bk replaces But, by construction, the pattern with necessarily comes from an earlier diagram . , in which the pairs indicated with small arcs are N -normal by induction hypothesis. Hence, going to wk means going to and the domino rule precisely implies that the top two horizontal edges form an N -normal word. So w bk satisfies (5.2.2). In the case of a VV-step (two vertical letters), we define w bk to be obtained from w bk−1 by replacing, at position i, the factor s|t with s′ |t′ . As the shape of w bk is the same as the one of w bk−1 , we only have to check (5.2.2) for the length-two factor at position i − 1, and only when its first letter is horizontal, that is, one goes from r s original pattern in w bk−1 arises from an earlier pattern t to r s t r s′ t′ . But, by construction, the , so that, when s|t is replaced by r s′ |t′ , the domino rule implies that r|s′ is N -normal, as the diagram s′ s t′ t witnesses. The construction of w b0 , ..., w bℓ is complete, and we now count how many VH-steps and VV→ − b steps can occur in w . First, each S-word w bk is associated with a path in the triangular grid diagram of Figure 3 and each VH-step causes this path to cross one square in the grid. As the → latter contains p(p − 1)/2 squares, we deduce that there are at most p(p − 1)/2 VH-steps in − w. We turn to VV-steps, partitioning them into several subtypes according to where they occur: we say that a VV-step is a VVj -step if it is located on the jth column, that is, it replaces a vertical factor s|t of w bk that is preceded by j − 1 horizontal letters. Now we fix j with 1 6 j < p → and count the VVj -steps that can occur in − w . For 1 6 i 6 p − j, let si,k be the letter that vertically occurs at the ith position in the jth column in w bk , if it exists. For a given value of i, define si,+ to be si,k where k is minimal such that si,k exists (if any) and, symmetrically, let si,− be si,k where k is maximal such that si,k exists (if any). For each k, if si,+ is defined for a 6 i, if si,k is defined for b 6 i 6 c, and if si,− is defined for i 6 d, we put vk = sa,+ | ··· |sb−1,+ |sb,k | ··· |sc,k |sc+1,− | ··· |sd,− . So vk is the factor of wk forming the jth column of w bk , preceded by the letters that are the first to appear in positions a, ..., b − 1 in column j in w bk+1 , ..., w bℓ , and followed by the last letters to appear in positions c+1, ..., d in column j in w b0 , ..., w bk−1 . If one goes from wk−1 to wk by a VHbk−1 step or a VVj ′ -step with j ′ 6= j, then we have vk = vk−1 : indeed, either the jth columns of w and w bk are equal, or a VH-step normalises the last letter sc,k−1 of the jth column of w bk−1 with the subsequent horizontal letter, or the first letter sb,k−1 of the jth column of w bk−1 with the previous horizontal letter; and, in the case of the last letter (the other one being symmetric), vk is vk−1 with sc,k replaced by sc,− , hence unchanged by definition of sc,− . Otherwise, if one goes from wk−1 to wk by a VVj -step, then vk−1 →R vk holds. As, by construction, the length → of the S-word vk is at most p − j, we conclude that the number of VVj -steps in − w is at most QUADRATIC NORMALISATION IN MONOIDS 21 F (p − j). Summing up, we deduce p(p − 1) + F (p − 1) + ··· + F (3) + F (2), 2 which solves into F (p) 6 2p + p − 1 owing to F (q) 6 2q − q − 1 that holds for every 2 6 q < p by induction hypothesis. Finally, as in the case of class (3, 3), Proposition 3.2.5 implies that, if (S, R) terminates and e is an N -neutral element in S, then so does (Se , Re ).  (5.2.3) F (p) 6 N1 N2 N1 N2 N3 N2 VV1 VV1 VV1 VV1 VH VH N1 N2 N3 N2 N3 VH VV2 VH VH VH ··· Figure 4. Types of the successive steps in the computation of N12123212323 (w) for w of length 4: in addition to the six VH-steps, which inexorably approach N (w), we find four VV1 -steps and one VV2 -steps; this turns out to be the only possible length-11 sequence for length-4 words. Remark. In the previous proof, one can observe that the number of VV-steps between two VH-steps is bounded above by F (p − 1), since columns in the grid have length at most p − 1, and deduce F (p) 6 p(p − 1)/2 + (p(p − 1)/2 + 1)F (p − 1), which is coarser than (5.2.3) but sufficient to inductively prove termination. The following result, formulated purely in terms of rewriting systems, is an immediate consequence of Proposition 5.2.1. Corollary 5.2.4. Assume that (S, R) is a reduced quadratic rewriting system. Define φ : S [2] → S [2] by φ(w) = w′ for w → w′ in R and φ(w) = w otherwise. (i) Assume that, for all r, s, t in S, with r|s not R-normal, if s|t is R-normal then φ12 (r|s|t) is R-normal, and if s|t is not R-normal then φ1212 (r|s|t) = φ212 (r|s|t). Then (S, R) is convergent. (ii) If S contains a φ-neutral element e and the conditions of (i) are satisfied for all r, s, t in Se , then (S, R) and (Se , Re ) are convergent, where Re consists of one rule w → πe (w′ ) for each w → w′ in R with w ∈ Se∗ . 5.3. Termination in higher classes. We show that Proposition 5.2.1 is optimal: from class (4, 4) onwards, no general termination result can be established, since both nonterminating and terminating rewriting systems may arise. Proposition 5.3.1. There exists a quadratic normalisation of class (4, 4) such that the associated rewriting system is not convergent. Proof. Let S = {a, b, b′, b′′ , c, c′ , c′′ , d} and let R consist of the five rules ab → ab′ , b′ c′ → bc, bc′ → b′′ c′′ , b′ c → b′′ c′′ , and cd → c′ d. We claim that the rewriting system (S, R), which is quadratic by definition, is normalising and confluent. However (S, R) is not terminating, as it admits the length-3 cycle abcd → ab′ cd → ab′ c′ d → abcd. We prove that (S, R) is normalising using an exhaustive description of the rewriting sequences starting from an arbitrary S-word. Let f be the accent-forgetting map a 7→ a; b, b′ , b′′ 7→ b; c, c′ , c′′ 7→ c; d 7→ d. For u a nonempty factor of abcd, we say that an S-word w is special of type u if f (w) = u holds. For w in S ∗ , inductively define a decomposition D(w) by D(ε) = ε and, if D(w) = w1 | ··· |wm and s ∈ S hold, D(ws) = w1 | ··· |wm s if wm s is special, and D(ws) = w1 | ··· |wm |s otherwise: D(w) is obtained by grouping the special factors of w as much as 22 PATRICK DEHORNOY AND YVES GUIRAUD possible. For instance, we find D(ab′ db′′ cdb′ ab′ ) = ab′ |d|b′′ cd|b′ |ab′ . Now, we observe that π is compatible with all rules of R and, moreover, every rule acts inside a special factor. Hence, if we have D(w) = w1 | ··· |wm , then the words w′ for which w →R w′ holds are those words w′ ′ satisfying D(w′ ) = w1′ | ··· |wm with wi →R wi′ for each i. Consequently, in order to prove that (S, R) is normalising and confluent, it suffices to prove it for the factors of the D-decomposition, that is, for special words. We review the ten types. First, an S-word w of type a, b, c, d, ab, bc, or cd is R-normal form, or we have w →R w′ for some R-normal S-word w′ . Next, there are nine S-words of type abc, and the corresponding restriction of →R is (where framed S-words are the R-normal ones) ab′ c′ abc′ abc′′ ab′ c′′ ab′ c abc ab′′ c ab′′ c′′ ab′′ c′ The graph for bcd is entirely similar. Finally, for the type abcd, we find: abc′ d ab′′ c′′ d abcd ab′ cd abc′′ d ab′ c′′ d ab′′ cd ab′′ c′ d ab′ c′ d Thus, for each type, the corresponding connected component of the relation →R contains exactly one R-normal S-word, which is reachable from any other S-word of the component. It follows that (S, R) is normalising and confluent. Moreover, the inspection of the normalisation of length-three S-words shows that the normalisation (S, N ) associated with R is of minimal class (4, 4).  By contrast, the following example shows that terminating rewriting systems may also arise when the minimal class is at least (4, 4). Example 5.3.2. For a totally ordered finite set X, the Chinese monoid over X is the monoid CX generated by X and submitted to the relations zyx = zxy = yzx, for x 6 y 6 z [6]. Assume that X has three elements and denote by S the eight-element set obtained from X by adjoining the empty word e, the three words yx for x < y, and yy if y is the middle element of X (neither the minimal one nor the maximal one). The following twelve rules are derivable from the defining relations of CX : the nine rules y|x → yx, y|yx → yx|y, yx|x → x|yx for x < y; the two rules y|zx → zx|y and z|yx → zx|y for x < y < z; and y|y → yy if y is the middle element of X. This reduced rewriting system terminates (using the weighted right-lexicographic order generated by x < yx for x 6 y and zx < y for x < y) and, after application of Knuth-Bendix completion, it yields a convergent rewriting system (Se , Re ) with 22 rules presenting CX . After homogenisation, we obtain a reduced, quadratic and convergent rewriting system (S, R), whose corresponding quadratic normalisation is of class (4, 4), the worst case being reached on z|yy|y if y is the middle element and z > y holds. Similar convergent quadratic presentations also exist when X has four or five elements (to be compared with the nonquadratic ones of [5, Th. 3.3]), the class being (5, 4) in both cases. 6. Garside normalisation In this last section, we investigate the connection between our current general framework and Garside families. It turns out that the latter provide natural examples of quadratic normalisations of class (4, 3) and that, conversely, a normalisation of class (4, 3) comes from a Garside family if, and only if, it satisfies some explicit additional condition called left-weightedness. The section is organised as follows. In Subsection 6.1, we briefly recall the basic definitions involving Garside families and the associated normal forms. In Subsection 6.2, we introduce the notion of a left-weighted normalisation and establish the above mentioned connection, QUADRATIC NORMALISATION IN MONOIDS 23 which is Theorem C of the introduction. Finally, in Subsection 6.3, we mention a few further consequences. 6.1. Greedy decompositions. Hereafter, if M is a left-cancellative monoid, we denote by 4 the associated left-divisibility relation, defined by f 4 g if f g ′ = g holds in M for some g ′ . The starting point is the notion of an S-normal word. Definition 6.1.1 ([10, Def. III.1.1]). If M is a left-cancellative monoid and S is included in M , an S-word s1 |s2 is called S-normal if the following condition holds: (6.1.2) ∀s∈S ∀f ∈M (s 4 f s1 s2 ⇒ s 4 f s1 ). An S-word s1 | ··· |sp is called S-normal if si |si+1 is S-normal for every i. The intuition underlying condition (6.1.2) is that s1 already contains as much of S as it can, a greediness condition; note that we do not only consider the left-divisors of s1 s2 that lie in S, but, more generally, all elements of S that left-divide f s1 s2 . Then the notion of a Garside family arises naturally. Here we state the definition in a restricted case fitting our current framework (see [10] for the general case): Definition 6.1.3. Assume that M is a monoid with no nontrivial invertible elements and S is a subset of M that contains 1. We say that S is a Garside family in M if every element g of M has an S-normal decomposition, that is, there exists an S-normal S-word s1 | ··· |sp satisfying s1 ···sp = g. Example 6.1.4. The seminal example of a Garside family is the family of all simple braids. Let Bn be Artin’s n-strand braid group and Bn+ be the submonoid of Bn consisting of all braids that can be represented by a diagram in which all crossings have a positive orientation (see for instance [13] or [10, Section I.1]). Then the subfamily Sn of Bn+ consisting of those positive braids that can be represented by a diagram in which any two strands cross at most once is a Garside family in Bn+ . More generally, if M is an Artin–Tits monoid, that is, a monoid defined by relations of the form stst... = tsts... where both terms have the same length, and if W is the Coxeter group obtained by adding the torsion relations s2 = 1 to the above relations, then M admits a Garside family that is a copy of W [9]. When W is finite, this Garside family (which consists of the divisors of some element ∆ connected with the longest element of W ) is minimal. When W is infinite, it is not minimal, but there exists in every case a finite Garside family [9]. For instance, e 2 , that is, M admits a presentation with three if M is the Artin–Tits monoid of (affine) type A generators σ1 , σ2 , σ3 and three relations σi σj σi = σj σi σj , then the associated Coxeter group is infinite, but M admits a finite Garside family S consisting of the sixteen right-divisors of the elements σ1 σ2 σ3 σ2 , σ2 σ3 σ1 σ3 , and σ3 σ1 σ3 σ1 . It turns out that a large number of monoids admit interesting Garside families, and many results involving such families, including various practical characterisations, and the derived normalisations are now known [10]. For our current approach, what counts is that Garside normalisation enters the framework of Sections 2 to 4. First, a mild discussion is in order, because the S-normal form as introduced in Definition 6.1.3 is not readily unique. Lemma 6.1.5. Assume that M is a left-cancellative monoid with no nontrivial invertible elements and S is a Garside family in M . (i) [10, Prop. III.1.25] Call two S-words ≃-equivalent if they only differ by appending final entries 1. Then every S-word that is ≃-equivalent to an S-normal word is S-normal; conversely, any two S-normal decompositions of the same element of M are ≃-equivalent. (ii) [10, Prop. III.1.30] Every element of M with a representative in S [p] admits an S-normal decomposition of length at most p. Building on Lemma 6.1.5, we immediately obtain 24 PATRICK DEHORNOY AND YVES GUIRAUD Proposition 6.1.6. Assume that M is a left-cancellative monoid with no nontrivial invertible elements and S is a Garside family of M . Then every element g of M admits a unique Snormal decomposition of minimal length, and the corresponding map is a geodesic normal form on (M, S \ {1}). We can then apply Proposition 2.2.7, and associate with the Garside family S a normalisation (S, N ). The latter involves the generating set S \ {1} enriched with one letter representing the unit, and it is then natural to use 1 for that letter so that we simply recover S. We shall then say that (S, N ) is derived from the Garside family S. In this case, 1 is an N -neutral element by Proposition 2.2.7, and M admits the presentation (2.2.3). Here is the main observation: Proposition 6.1.7. Assume that M is a left-cancellative monoid with no nontrivial invertible elements and S is a Garside family of M . Then the normalisation (S, N ) derived from S is quadratic of class (4, 3). Proof. That N satisfies (3.1.3) directly follows from Definition 6.1.1, since S-greedy words are defined by a condition that only involves length-two factors. For (3.1.4) and the more precise result about the class, it follows from [10, Prop. III.1.45] which states that the domino rule is valid for N . As the current statement is different from [10, Prop. III.1.45], we recall the argument. s So assume that s1 , s2 , s′1 , s′2 , t0 , t1 , t2 lie in S, that s1 |s2 is Snormal, and that we have s′1 |t1 = N (t0 |s1 ) and s′2 |t2 = N (t1 |s2 ). f s′1 s′2 Assume s ∈ S and s 4 f s′1 s′2 . A fortiori we have s 4 f s′1 s′2 t2 , hence s 4 f t0 s1 s2 , since the diagram on the right is commutative. As s1 |s2 t1 t2 is S-normal, we deduce s 4 f t0 s1 , whence s 4 f s′1 t1 . As s′1 |t1 is t0 ′ ′ ′ S-normal, we deduce s 4 f s1 . This shows that s1 |s2 is S-normal.  s1 s2 The result of Proposition 6.1.7 is optimal: as the example below shows, (4, 3) is in general the minimal class. Let us mention that there is a particular class of Garside families, called bounded [10, chapter VI], for which the class drops to (3, 3) or less. Garside monoids [7] are typical examples of the latter situation. Example 6.1.8. The normalisation derived from the finite Garside family mentioned in Exe 2 is not of class (3, 3): for instance, one finds ample 6.1.4 for the Artin–Tits monoid of type A N121 (σ1 |σ1 σ2 |σ1 σ3 ) = σ1 σ2 σ1 |σ2 |σ3 , in which σ2 |σ3 is not normal. 6.2. Left-weighted normalisation. Definition 6.1.1 is highly non-symmetric, so we can expect that the normalisations derived from Garside families satisfy some relations capturing the specific role of the left-hand side. Definition 6.2.1. Assume that (S, N ) is a (quadratic) normalisation for a monoid M . We say that (S, N ) is left-weighted if, for all s, t, s′ , t′ in S, the equality s′ |t′ = N (s|t) implies s 4 s′ in M . In other words, a normalisation (S, N ) is left-weighted if, for every s in S, the first entry of any length-two S-word N (s|t) is always a right-multiple of s in the associated monoid: normalising s|t amounts to adding something in the left entry. Lemma 6.2.2. The normalisation derived from a Garside family in a left-cancellative monoid with no nontrivial invertible element is left-weighted. Proof. Assume that (S, N ) derives from a Garside family S. If s′ |t′ = N (s|t) holds, s is an element of S, and we have st = s′ t′ , whence s 4 s′ t′ . By assumption, s′ |t′ is S-normal, so (6.1.2) implies s 4 s′ . Thus N is left-weighted.  We shall now establish that left-weightedness characterises Garside normalisation, as stated in Theorem C: QUADRATIC NORMALISATION IN MONOIDS 25 Proposition 6.2.3. Assume that (S, N ) is a quadratic normalisation mod 1 for a monoid M that is left-cancellative and contains no nontrivial invertible element. Then the following are equivalent: (i) The family S is a Garside family in M and (S, N ) derives from it. (ii) The normalisation (S, N ) is of class (4, 3) and is left-weighted. According to Proposition 6.1.7 and Lemma 6.2.2, the implication (i)⇒(ii) holds and we are left with the converse direction. So, until the end of the subsection, we assume that (S, N ) is a left-weighted quadratic normalisation mod 1 of class (4, 3) for a monoid M that is leftcancellative and contains no nontrivial invertible element. Our aim is to show that S is a Garside family in M and that N derives from it. We decompose the argument into several steps. Lemma 6.2.4. The family S is closed under right-divisor in M . Proof. Assume s ∈ S. An element g of M is a right-divisor of s if there exists f in M satisfying s = f g. We prove g ∈ S by induction on the minimal length kf k of the S-words representing f . For kf k = 0, we have s = g, whence g ∈ S. Assume kf k > 1. Then we can write f = f ′ t for some f ′ satisfying kf ′ k = kf k − 1 and some t in S. Then we have s = f ′ tg, so the induction hypothesis implies tg ∈ S and, therefore, the S-normal decompositions of tg are the S-words tg|1| ··· |1. Let s1 | ··· |sp be an N -normal decomposition of g. For p = 1, we have g = s1 ∈ S. So assume p > 2. By Proposition 4.2.3, as N is quadratic of class (4, 3), the domino rule is valid for N and, therefore, an N -normal decomposition of tg is s′1 | ··· |s′p |tp where we put t0 = t and s′i |ti = N (ti−1 |si ) for i = 1, ..., p. By ≃-uniqueness of the N -normal form, we have s′1 = tg and s′2 = ··· = s′p = tp = 1. Now, we prove using induction on k decreasing from p to 2 that tk−1 and sk equal 1. For k = p, we have s′p = tp = 1; by construction, we have tp−1 sp = s′p tp , whence tp−1 sp = 1, and tp−1 = sp = 1, since M contains no nontrivial invertible element. For 2 6 k < p, we have s′k = 1 by assumption and tk = 1 by induction hypothesis, so that the same argument gives tk−1 = sk = 1. Thus g admits an N -normal decomposition of the form s1 |1| ··· |1 and, therefore, it belongs to S.  Lemma 6.2.5. For g in M , define H(g) to be 1 for g = 1, and to be the first entry in the N -normal decomposition of g otherwise. Then H(g) is an element of S that left-divides g, and every element of S that left-divides g in M left-divides H(g). Proof. By definition, H(g) belongs to S, and it left-divides g in M , since we have g = H(g)ev(w) if H(g)|w is the N -normal decomposition of g. Now assume that t is an element of S that left-divides g, say g = th. Let s1 | ··· |sp be the N -normal decomposition of h. As N is quadratic of class (4, 3), the domino rule is valid for N , so the N -normal decomposition of g is s′1 | ··· |s′p |tp with t0 = t and s′i |ti = N (ti−1 |si ) for i = 1, ..., p. By uniqueness of the N -normal form, we must have H(g) = s′1 . But the fact that (S, N ) is left-weighted implies that t0 left-divides the first entry in N (t0 |s1 ), which is s′1 |t1 , so t 4 H(g) holds.  Lemma 6.2.6. The family S is a Garside family in the monoid M . Proof. By assumption, S contains 1 and, by Lemma 6.2.4, it is closed under right-divisor. So S is what is called solid in [10, Section IV.2]. Moreover, by definition, S is a generating family in M . Then, by [10, Prop. IV.2.7], we know that a solid generating family is a Garside family in M if, and only if, for every element g of M , there exists an element H(g) of S with the properties of Lemma 6.2.5. Thus the latter lemma implies that S is a Garside family in M .  We can now complete the argument. Proof of Proposition 6.2.3. Owing to the previous results, it only remains to show that, in the implication (ii)⇒(i), the given normalisation (S, N ) coincides with the one, say (S, N ′ ), derived 26 PATRICK DEHORNOY AND YVES GUIRAUD from the Garside family S. As both normalisations are quadratic, it is sufficient to prove N (s1 |s2 ) = N ′ (s1 |s2 ) for all s1 , s2 ∈ S, and, to this end, it is sufficient to prove that N (s1 |s2 ) is S-normal (in the sense of Definition 6.1.1). Now assume s′1 |s′2 = N (s1 |s2 ). Since S is a Garside family in M , we can appeal to [10, Corollary IV.1.31] which says that s′1 |s′2 is S-greedy if, and only if, every element of S that left-divides s′1 s′2 left-divides s′1 : we can skip the term f in (6.1.2). Now assume s ∈ S and s 4 s′1 s′2 = s1 s2 . By Lemma 6.2.5, we have t 4 H(s1 s2 ) = s′1 and, therefore, s′1 |s′2 is S-greedy.  Remark. In Proposition 6.2.3, we take as an assumption that the monoid M associated with (S, N, e) is left-cancellative and has no nontrivial invertible element. It is natural to wonder whether explicit conditions involving (S, N, e) imply these assumptions. For invertible elements, requiring that s|t 6= e|e implies N (s|t) 6= e|e is such a condition but, for left-cancellativity, we leave it as an open question. 6.3. Two further results. By Proposition 3.1.8, if (S, N ) is a quadratic normalisation for a monoid M , then M admits a presentation consisting of all quadratic relations s|t = s′ |t′ , with s′ |t′ = N (s|t). In fact, in the left-weighted case, this presentation can be replaced with a smaller one involving triangular relations of the form r|s = t. Proposition 6.3.1. Assume that (S, N ) is a left-weighted quadratic normalisation system of class (4, 3) mod e for a left-cancellative monoid M . Then M admits the presentation (Se , T ) where T consists of all relations s|t = st with s, t in Se satisfying st ∈ S. Proof. By Proposition 3.1.8 (i), we know that M admits a presentation in terms of S by the relations s|t = πe (N (s|t)) with s, t ∈ Se . First, if s, t in Se satisfy st ∈ Se , then we must have N (s|t) = st|e, and, if they satisty st = 1, then we must have N (s|t) = e|e, so that πe (N (s|t)) = st holds in both cases. Thus, T is included in the presentation of Proposition 3.1.8 (i). Conversely, let us show that each relation s|t = πe (N (s|t)) with s, t in Se follows from a finite number of relations of T . So assume that s and t lie in Se and let s′ |t′ = N (s|t). If t′ = e holds, we have s′ = st in M , so the result is true. Otherwise, the assumption that (S, N ) is left-weighted implies that there exists r in M satisfying sr = s′ . By construction, r is a right-divisor of s′ in M so, by Lemma 6.2.4, r must lie in S. Then, in M , we have s′ = sr, whence st = srt′ . The assumption that M is left-cancellative implies t = rt′ . Hence the relation s|t = s′ |t′ is the consequence of s|r = s′ and rt′ = t.  Note that the existence of the presentation of Proposition 6.3.1 is only possible in a nongraded context, except for the free monoid S ∗ with its presentation hS | i+. Example 6.3.2. Consider the braid monoid B3+ , that is, the monoid presented by ha, b | aba = babi+. Then B3+ has a Garside family consisting of the six elements 1, a, b, ab, ba, and aba. Proposition 6.3.1 provides a presentation of B3+ whose generators are the five nontrivial elements of the Garside family, and with the six relations a|b = ab, b|a = ba, and a|ba = b|ab = ab|a = ba|b = aba. This presentation is much smaller than the one provided by (3.1.11), that has the same five generators and 52 = 25 relations, such as ab|ab = aba|b or a|a = a|a. Another subsequent development is that Garside families give rise to convergent rewriting system. Indeed, Propositions 5.2.1 and 6.2.3 directly imply Proposition 6.3.3. Assume that M is a left-cancellative monoid with no nontrivial invertible elements and S is a Garside family in M . Let R consist of all rules s|t → w with s, t in S \ {1} and w the minimal length S-normal decomposition of s|t. Then the rewriting system (S \{1}, R) is convergent. As mentioned in Example 6.1.4, every finitely generated Artin–Tits monoid admits a finite Garside family. Being also left-cancellative with no nontrivial invertible element, Artin–Tits monoids are thus eligible to Proposition 6.3.3. QUADRATIC NORMALISATION IN MONOIDS 27 Corollary 6.3.4. Every Artin–Tits monoid admits a finite quadratic convergent presentation. Example 6.3.5. In the case of a spherical Artin–Tits monoid, the elements of the corresponding Coxeter group form a finite Garside family, and Corollary 6.3.4 corresponds to [14, Th. 3.1.3, Prop. 3.2.1]. In the nonspherical case, Corollary 6.3.4 is an improvement of the latter results, e 2 , the 16-element which only give an infinite convergent presentation. For instance, in type A e 2 with 15 Garside family described in Example 6.1.4 yields a convergent rewriting system for A generators and 87 relations. References [1] S.I. Adyan, Fragments of the word Delta in a braid group, Mat. Zam. Acad. Sci. SSSR 36-1 (1984) 25–34; translated Math. Notes of the Acad. Sci. USSR; 36-1 (1984) 505–510. [2] A. Bjorner, F. Brenti, Combinatorics of Coxeter Groups, Graduate Texts in Mathematics vol. 231, Springer (2005). [3] L. Bokut, Y. Chen, W. Chen, J. Li, New approaches to plactic monoid via Gröbner–Shirshov bases, J. Algebra 423 (2015) 301–317. [4] A. Cain, R. Gray, A. Malheiro, Finite Gröbner–Shirshov bases for Plactic algebras and biautomatic structures for Plactic monoids, J. Algebra 423 (2015) 37–52. [5] A. Cain, R. Gray, A. Malheiro, Rewriting systems and biautomatic structures for Chinese, hypoplactic, and sylvester monoids, Internat. J. Algebra Comput., to appear, arXiv:1310.6572. [6] J. Cassaigne, M. Espie, D. Krob, J.-C. Novelli, F. Hivert, The Chinese monoid, Internat. J. Algebra Comput. 11 (2001) 301–334. [7] P. Dehornoy, Groupes de Garside, Ann. Sci. Éc. Norm. Supér. 35 (2002) 267–306. [8] P. Dehornoy, V. Gebhardt, Algorithms for Garside calculus, J. Symbolic Comput. 63 (2014) 68–116. [9] P. Dehornoy, M. Dyer, C. Hohlweg, Garside families in Artin-Tits monoids and low elements in Coxeter groups, Comptes-Rendus Math. 353 (2015) 403–408. [10] P. Dehornoy, with F. Digne, E. Godelle, D. Krammer, J. Michel, Foundations of Garside Theory, EMS Tracts in Mathematics vol. 22 (2015). [11] E.A. El-Rifai, H.R. Morton, Algorithms for positive braids, Quart. J. Math. Oxford 45-2 (1994) 479–497. [12] D. Epstein, with J. Cannon, D. Holt, S. Levy, M. Paterson, W. Thurston, Word Processing in Groups, Jones and Bartlett Publishers (1992). [13] F.A. Garside, The braid group and other groups, Quart. J. Math. Oxford 20 (1969) 235–254. [14] S. Gaussent, Y. Guiraud, P. Malbos, Coherent presentations of Artin monoids, Compos. Math., to appear, arXiv:1203.5358. [15] A. Hess, Factorable monoids: resolutions and homology via discrete Morse theory, http://hss.ulb.unibonn.de/2012/2932/2932.pdf, 2012, PhD thesis. [16] A. Hess, V. Ozornova, Factorability, string rewriting and discrete Morse theory, arXiv:1412.3025. [17] M. Hoffmann, R.M. Thomas, A geometric characterization of automatic semigroups, Theoret. Comput. Sci. 369 (2006) 300–313. [18] D. Krammer, An asymmetric generalisation of Artin monoids, Groups Complex. Cryptol. 5 (2013) 141–168. [19] V. Ozornova, Factorability, discrete Morse theory, and a reformulation of K(π, 1)-conjecture, http://hss.ulb.uni-bonn.de/2013/3117/3117.pdf, 2013, PhD thesis. Laboratoire de Mathématiques Nicolas Oresme, CNRS UMR 6139, Université de Caen, 14032 Caen, France E-mail address: [email protected] URL: www.math.unicaen.fr/∼dehornoy INRIA πr 2 , Laboratoire Preuves, Programmes et Systèmes, CNRS UMR 7126, Université Paris 7, Case 7014, 75205 Paris Cedex 13, France E-mail address: [email protected] URL: www.pps.univ-paris-diderot.fr/~guiraud
4math.GR
Analyzing Knowledge Transfer in Deep Q-Networks for Autonomously Handling Multiple Intersections arXiv:1705.01197v1 [cs.LG] 2 May 2017 David Isele1 , Akansel Cosgun2 and Kikuo Fujimura2 Abstract— We analyze how the knowledge to autonomously handle one type of intersection, represented as a Deep QNetwork, translates to other types of intersections (tasks). We view intersection handling as a deep reinforcement learning problem, which approximates the state action Q function as a deep neural network. Using a traffic simulator, we show that directly copying a network trained for one type of intersection to another type of intersection decreases the success rate. We also show that when a network that is pre-trained on Task A and then is fine-tuned on a Task B, the resulting network not only performs better on the Task B than an network exclusively trained on Task A, but also retained knowledge on the Task A. Finally, we examine a lifelong learning setting, where we train a single network on five different types of intersections sequentially and show that the resulting network exhibited catastrophic forgetting of knowledge on previous tasks. This result suggests a need for a long-term memory component to preserve knowledge. DQN DQN DQN DQN (a) Direct Copy (b) Fine Tuning … DQN DQN DQN I. I NTRODUCTION Car companies has been increasing their R&D spending on Automated Driving (AD) technology in recent years, for good cause: AD promises to greatly reduce accidentrelated fatalities and increase productivity of the society as a whole. Although AD technology has made important strides over the last couple of years, current technology is still not ready for large scale roll-out. Urban environments especially pose significant challenges for AD, due to the unpredictable nature of pedestrians and vehicles in city traffic. Handling intersections safely and efficiently is one of the most challenging problems for Urban AD. Rule-based methods provide a predictable method to handle intersections. However, rule-based intersection handling approaches don’t scale well because it becomes increasingly harder to design hand-crafted rules as scene complexity increases. Moreover, the algorithm designer has to come up with hand-crafted rules and parameters for different types of intersections. By different intersection types, we mean single or multi-lane right, left turns and forward passing. Our goal for this research is to explore a machine learning based method that generalizes to various types of intersections. Machine learning, and particularly deep learning is a growing field that had tremendous impact on applications such as computer vision, speech recognition and language translation and it is increasingly being used for decision making. We model the AD vehicle as a learning agent, which learns from positive (successful passing) and negative experiences (collisions) in a reinforcement learning framework. 1 David Isele is with The University of Pennsylvania, Philadelphia, PA, USA Cosgun and Kikuo Fujimura are with the Honda Research Institute, Mountain View, CA, USA 2 Akansel DQN DQN … (c) Reverse Transfer (d) Lifelong Learning Fig. 1: We investigate 4 types of knowledge transfer between different types of intersections. The knowledge on how to handle an intersection is represented as a Deep Q-Network (DQN), which is trained from simulation data. At every intersection the DQN makes a decision to either wait at the intersection or go. We analyze a) directly copying a deep network to a new intersection b) fine tuning a previously trained deep network on a new intersection, c) whether fine tuning destroys old intersection knowledge in reverse transfer and d) lifelong learning of multiple intersections with a single deep neural network. In this paper we focus on how the knowledge for one type of intersection, represented as a Deep Q-Network (DQN), translates to other types of intersections (tasks). First we look at direct copy: how well a network trained for Task A performs in Task B. Second, we analyze how the performance of a network initialized from Task A and fine tuned in Task B compares to a randomly initialized network exclusively trained on Task B. Third, we investigate reverse transfer: if a network pre-trained for Task A and fine-tuned to Task B, preserves knowledge for Task A. Finally, we explore training a network for five tasks sequentially as a lifelong learning scenario. This paper is organized as follows. After providing a brief literature survey in Section II, we present the problem formulation as a DQN in Section III, before examining various knowledge sharing strategies in Section IV. After explaining the experimental setup in Section V, then present our results in Section VI before concluding in Section VII. II. R ELATED W ORK Recently there has been an increased interest in using machine learning techniques to control autonomous vehicles. In imitation learning, the policy is learned from a human driver [1]. Online planners based on partially observable Monte Carlo Planning (POMCP) have been shown to handle intersections [2] if the existence of an accurate generative model is available, and Markov Decision Processes (MDP) have been used offline to address the intersection problem [3], [4]. Additionally, machine learning has been used to optimize comfort from a set of safe trajectories [5]. Machine learning has greatly benefited from training on large amounts of data. This helps a system learn general representations and prevents over fitting based on incidental correlations in the sampled data. In the absence of huge datasets, training on multiple related tasks can give similar improvement gains [6]. A large breadth of research has investigated transferring knowledge from one system to another both in machine learning in general [7], and reinforcement learning specifically [8]. The training time and sample complexity of deep networks make transfer methods particularly appealing [9], and has prompted in depth investigation to help understand its behavior [10]. Recent work in deep reinforcement learning has looked at combining networks from different tasks to share information [11], [12]. And efforts have been made to enable a unified framework for learning multiple tasks through changes in architecture design [13] and modified objective functions [14] to address known problems like catastrophic forgetting [15]. III. I NTERSECTION H ANDLING USING D EEP Q-N ETWORKS We view intersection handling as a reinforcement learning problem, and use a Deep Q-Network (DQN) to learn the state action value Q-function. We assume the AD vehicle is at the intersection, the path is known to it, and the network is tasked with choosing between two actions: wait or go, for every time step. Once the agent decides to go, it follows an intelligent driver model for keeping distance with the vehicles in front. A. Reinforcement Learning In reinforcement learning, an agent in state s takes an action a according to the policy πθ parameterized by θ . The agent transitions to the state s0 , and receives a reward r. This collection is defined as an experience e = (s, a, r, s0 ). This is typically formulated as a Markov Decision Process (MDP) hS, A, P, R, γi, where S is the set of states, A is the set of actions that the agent may execute, P : S × A → S is the state transition function, R : S × A × S → R is the reward function, and γ ∈ (0, 1] is a discount factor that adds preference for earlier rewards and provides stability in the case of infinite time horizons. MDPs follow the Markov assumption that the probability of transitioning to a new state given the current state and action is independent of all previous states and actions p(st+1 |st , at , . . . , s0 , a0 ) = p(st+1 |st , at ). The goal at any time step t is to maximize the future discounted return Rt = ∑Tk=t γ k−t rk . In order to optimize the expected return we use Q-learning [16]. B. Q-learning Q-learning defines an optimal action-value function Q∗ (s, a) as the maximum expected return that is achievable following any policy given a state s and action a, Q∗ (s, a) = maxπ E[Rt |st = s, at = a, π]. This follows the dynamic programming properties of the Bellman equation, which state that if the values Q∗ (s0 , a0 ) are known for all a0 then the optimal strategy is to select a0 that maximizes the expected value of r + γQ∗ (s0 , a0 ): Q∗ (s, a) = E[r + γ max Q∗ (s0 , a0 )|s, a] . a0 (1) In Deep Q-learning [17], the optimal value function is approximated with a neural network Q∗ (s, a) ≈ Q(s, a; θ ). The parameters θ are learned by using the Bellman equation as an iterative update Qi+1 (s, a) = E[r +γ maxa0 Qi (s0 , a0 )|s, a] and minimizing the error between the expected return and the state-action value predicted by the network. This gives the loss for an individual experience in a deep Q-network (DQN)  2 L(ei , θ ) = ri + γ max Q(s0i , a0i ; θ ) − Q(si , ai ; θ ) . (2) a0i In practice, Q(st+1 , at+1 ; θ ) is a poor estimate early on, which can make learning slow since many updates are required to propagate the reward to the appropriate preceding states and actions. One way to make learning more efficient is to use n-step return[18] E[Rt |st = s, a] ≈ rt + γrt+1 + · · · + γ n−1 rt+n−1 + γ n maxat+n Q(st+n , at+n ; θ ). During learning, an ε-greedy policy is followed by selecting a random action with probability ε to promote exploration and otherwise greedily selecting the best action maxa Q(s, a; θ ) according to the current network. In order to improve the effectiveness of the random exploration we make use of dynamic frame skipping. Frequently the same repeated actions is required over several time steps. It was recently shown that allowing an agent to select actions over extended time periods improves the learning time of an agent [19]. For example, rather than having to explore through trial and error and build up over a series of learning steps that eight time steps is the appropriate amount of time an agent should wait for a car to pass, the agent need only discover that a ”wait eight steps” action is appropriate. Dynamic frame skipping can viewed as a simplified version of options [20] which is recently starting to be explored by the Deep RL community. [21], [22], [23]. C. Deep Neural Network setup The DQN uses a convolutional neural network with two convolution layers, and one fully connected layer. The first convolutional layer has 32 6 × 6 filters with stride two, the second convolution layer has 64 3 × 3 filters with stride 2. The fully connected layer has 100 nodes. All layers use leaky ReLU activation functions [24]. The final linear output layer has five outputs: a single go action, and a wait action at (a) Right (b) Left (c) Left2 (d) Forward (e) Challenge Fig. 2: Visualizations of different intersection scenarios. four time scales (1, 2, 4, and 8 time steps). The network is optimized using the RMSProp algorithm [25]. Our experience replay buffers have an allotment of 1, 000 experiences. At each learning iteration we samples a batch of 60 experiences. Since the experience replay buffer imposes off-policy learning, we are able to calculate the return for each state-action pair in the trajectory prior to adding each step into the replay buffer. This allows us to train directly on the n-step return and forgo the added complexity of using target networks [26]. The state space of the DQN is represented as a 18 × 26 grid in global coordinates. The epsilon governing random exploration was 0.05. For the reward we used +1 for successfully navigating the intersection, −1 for a collision, and −0.01 step cost. IV. K NOWLEDGE T RANSFER We are interested in sharing knowledge between different driving tasks. By sharing knowledge from different tasks we can reduce learning time and create more general and capable systems. Ideally knowledge sharing can be extended to involve a system that continues to learn after it has been deployed [27] and can enable a system to accurately predict appropriate behavior in novel situations [28]. We examine the behavior of various knowledge sharing strategies in the autonomous driving domain. A. Direct copy To demonstrate the extent of transfer and show the difference between tasks, we train a network on a single source task for 25,000 iterations. The unmodified network is then evaluated on every other task. We repeat this process, using each different task as a source task. B. Fine tuning Starting with a network trained for 10,000 iterations on a source task, we then fine tune a network for an additional 25,000 iterations on second target task. We use 10,000 iterations because it demonstrates substantial learning, but is suboptimal in order to emphasize the possible benefits gained from transfer. Fine tuning demonstrates the jumpstart and asymptotic performance as described by Taylor and Stone[8]. C. Reverse transfer After a network has been fine tuned on the target task, we evaluate the performance of that network on the source task. If training on a later task improves the performance of an earlier task this is known as reverse transfer. It is known that neural networks often forget earlier tasks in what is called catastrophic forgetting [29], [30], [15]. In the case of forgetting, retention describes the amount of previous knowledge retained by the network after training on a new task. This value is difficult to define formally since it must exclude any relevant knowledge for source tasks obtained from training on the target task, and additionally retention might include aspects that are not quantifiable such of weight configurations in the network. For example a network might exhibit catastrophic forgetting but in fact have retained a weight configuration that greatly reduces the training time needed to retrain the source task. Because of the difficulty of defining retention we define the empirical retention as the difference between the direct copy and fine tuned direct copy of the same network. D. Lifelong Learning Lifelong learning is the process of learning multiple tasks sequentially where the goal is to optimize the performance on every task [27], [31]. The combination of information from all previous tasks can be used to jumpstart learning a new task. In a reciprocal fashion, learning a new task can potentially refine existing knowledge for previous tasks. By having a single system that handles all tasks, the system is able to handle a broader set of problems and will likely generalize better to new problems. We examine how a deep Q-network performs when learning a sequence of tasks. The order in which tasks are encountered does impact learning, and several groups have investigated the effects of ordering [32], [33]. For our experiments we use a task ordering that demonstrates forgetting and hold it fixed for all experiments. We are interested in how each tasks performance changes over time. We test at regular intervals with testing run as a separate procedure that does not have an impact on the replay buffer or learning process of the network. V. E XPERIMENTAL S ETUP Experiments were run using the Sumo simulator [34], which is an open source traffic simulation package. This package allows users to model road networks, road signs, traffic lights, a variety of vehicles (including public transportation), and pedestrians to simulate traffic conditions in different types of scenarios. Importantly for the purpose of testing and evaluation of autonomous vehicle systems, Sumo provides tools that facilitate online interaction and vehicle control. For any traffic scenario, users can have control over a vehicle’s position, velocity, acceleration, steering direction VI. R ESULTS Direct Copy: Table I shows the results when a network is trained on one task and applied to another. In no instance does a network trained on a different task do better than a network trained on the matching task, but we do see that several tasks achieve similar performance with transfer. Particularly we see that the single lane tasks (right,left, and forward) are related, they are consistently the top performers in all single lane tasks. Additionally the more challenging multi-lane settings (left2 and challenge) appear connected, Fig. 3: Retention. The table examines the performance of a network on the source task after training on the target task. We subtract the baseline performance of a network trained exclusively on the target task. This shows how much of the source task training exists after training on the target task. 2 Left Forw Cha Training Method Right % Success % Collision Avg. Time Avg. Brake 99.0 0.96 4.70s 0.41s 98.5 1.50 4.51s 0.38s 81.1 18.8 4.39s 0.26s 98.1 1.80 4.60s 0.42s 74.1 25.8 4.02s 0.43s Left % Success % Collision Avg. Time Avg. Brake 87.7 12.3 5.35s 1.04s 96.3 3.65 5.36s 1.01s 76.8 23.1 5.31s 0.88s 95.1 4.84 5.48s 1.01s 66.2 33.7 4.64s 1.04s Left2 % Success % Collision Avg. Time Avg. Brake 70.1 29.8 6.02s 1.47s 76.3 23.6 5.90s 1.43s 91.7 8.15 6.48s 1.38s 74.5 25.4 6.06s 1.43s 74.6 25.4 5.38s 1.53s Forward % Success % Collision Avg. Time Avg. Brake 87.2 12.7 4.79s 1.05s 97.2 2.74 4.80s 1.02s 79.0 21.0 4.71s 0.91s 97.6 2.34 4.88s 1.03s 69.9 30.0 4.05s 1.08s Challenge % Success % Collision Avg. Time Avg. Brake 58.7 41.2 6.73s 2.81s 60.7 39.2 6.58s 2.79s 72.3 27.6 7.55s 2.78s 62.4 37.4 7.22s 2.78s 78.5 21.4 6.83s 2.79s llen ge Metric ard Task Left TABLE I: Direct Copy Performance Righ t and can simulate motion using basic kinematics models. Traffic scenarios like multi-lane intersections can be setup by defining the road network (lanes and intersections) along with specifications that control traffic conditions. To simulate traffic, users have control over the types of vehicles, road paths, vehicle density, and departure times. Traffic cars follow IDM to control their motion. In Sumo, randomness is simulated by varying the speed distribution of the vehicles and by using parameters that control driver imperfection (based on the Krauss stochastic driving model [35]). The simulator runs based on a predefined time interval which controls the length of every step. We ran experiments using five different intersection scenarios: Right, Left, Left2, Forward and a Challenge. Each of these scenarios is depicted in Figure 2. The Right scenario involves making a right turn, the Forward scenario involves crossing the intersection, the Left scenario involves making a left turn, the Left2 scenario involves making a left turn across two lanes, and the Challenge scenario involves crossing a six lane intersection. The Sumo traffic simulator is configured so that each lane has a 45 miles per hour (20 m/s) max speed. The car begins from a stopped position. Each time step is equal to 0.2 seconds. The max number of steps per trial is capped 100 steps which is equivalent to 20 seconds. The traffic density is set by the probability that a vehicle will be emitted randomly per second. We use depart probability of 0.2 for each lane for all tasks. Navigating intersections involves multiple conflicting objectives. We evaluate four metrics in order to collect our statistics. The metrics are as follows: • Percentage of successes: the percentage of the runs the car successfully reached the goal. This metric takes into both collisions and time-outs. • Percentage of collisions: a measure of the safety of the method. • Average time: how long it takes a successful trial to run to completion. • Average braking time: the amount of time other cars in the simulator are braking, this can be seen as a measure of how disruptive the autonomous car is to traffic. While there are multiple metrics, we focus on the percentage of success, which is the metric used in all our plots. All state representations ignores occlusion, assuming all cars are always visible. the Left2 network does substantially better than either of the single lane tasks on the Challenge task. Fine Tuning: Figure 4 shows fine tuning results. We see that in nearly all cases, pre-training with a different network gives a significant advantage in jumpstart [8] and in several cases there is an asymptotic benefit as well. When the fine tuned networks are re-applied to the source task the performance looks similar to direct copy, as shown in Figure 5. Reverse Transfer: While the performance on the source task drops after fine tuning, we see a trend of positive improvement compared to direct copy. This indicates that some information was retained by the network. Figure 3 shows the retention for each task pair, showing the percentage gain resulting from the initialization. The Left2 and Challenge tasks have less overlap with other tasks in the state space, so it is possible that more aspects of the initialization are left unchanged, which might explain why there is the (a) Right (b) Left (d) Forward (c) Left2 (e) Challenge Fig. 4: Fine-tuning comparison. A network for one task is initialized with the network of a different task. The colored lines indicate the initialization network. The black line indicates the performance of a network trained with a random initialization. Initializing a network with a network trained on another task is almost always advantageous. We notice a jumpstart benefit in every tested example, and observe several asymptotic improvements. Fig. 5: Direct Copy and Reverse Transfer. The x axis denotes the test condition. Black bars show the performance of single task learning. Light gray bars show the average performance of a network trained on one task and tested on another. The drop in performance demonstrates the difference between tasks. The dark gray indicates the average performance of reverse transfer: a network is trained on Task A, fine-tuned on Task B, and then evaluated on Task A. The drop in performance indicates catastrophic forgetting, but networks exhibit some retention of the initial task. largest amount of retention for these tasks. This hypothesis is supported by the fact that training on the Right task exhibits the most retention, since these two tasks have the least overlap. Lifelong learning: The results for the lifelong learning experiment are shown in Figure 6. Every task initially benefits from learning on the first task (Forward), although the performance in the Left2 and Challenge settings benefit less. In some cases we see that training on a different task helps up to a point and then further training hurts other tasks. For example, after training on approximately 5000 Fig. 6: Lifelong learning results. The background color indicates which task is being trained. Each solid line depicts the test performance for a different task. Dotted lines indicate the performance of a network trained on a single task for an equivalent period of time. The standard deviation across runs is indicated by the envelope. At several points in the learning process, the network shows evidence of forgetting previous tasks. trials of Forward setting, the Right task performance starts to decrease. Overall, we see an affinity between both the single lane tasks (Left, Right, and Forward) and the multi-lane tasks. When training on the Challenge task starts, Left2 benefits, but the single lane tasks exhibit catastrophic forgetting. Training on the Left task helps the other single lane tasks, but Challenge decreases in performance. However the results are not consistent across the grouping of single lane tasks. Training on the Right task has a much more detrimental effect on the multi-lane tasks than either Forward or Left. We suspect this is because right turns can ignore one of the lanes of traffic which matters to all other tasks. Overall the negative effects of catastrophic forgetting negate many of the positive effects of transfer. VII. C ONCLUSION In this paper we view the AD vehicle as a learning agent in a reinforcement learning setting, and analyze how the knowledge for handling one type of intersection, represented as a Deep Q-Network, translates to other types of intersections. We investigated and compared four different transfer methods between different intersections (tasks): direct copy, fine tuning, reverse transfer and lifelong learning. Our results have several conclusions. First, we found the success rates were consistently low when a network is trained on Task A but directly tested on Task B. Second, a network that is initialized with the network of a Task A and then finetuned on Task B generally performed better than a randomly initialized network that is trained on Task B. Third, when a network that is initialized with Task A, fine-tuned on Task B, and is tested back on Task A, it performed better than a network directly copied from Task B to Task A. Finally, we examine a lifelong learning domain, where we train a single network to handle all five intersection scenarios and show that the resulting network exhibited catastrophic forgetting of previous task knowledge. As future work, we will conduct research on the concept of a long-term memory and investigate how to effectively preserve previous task knowledge for lifelong learning. R EFERENCES [1] M. Bojarski, D. Del Testa, D. Dworakowski, B. Firner, B. Flepp, P. Goyal, L. D. Jackel, M. Monfort, U. Muller, J. Zhang, et al., “End to end learning for self-driving cars,” arXiv preprint arXiv:1604.07316, 2016. [2] M. Bouton, A. Cosgun, and M. J. Kochenderfer, “Belief state planning for navigating urban intersections,” IEEE Intelligent Vehicles Symposium (IV), 2017. [3] S. Brechtel, T. Gindele, and R. Dillmann, “Probabilistic decisionmaking under uncertainty for autonomous driving using continuous pomdps,” in Intelligent Transportation Systems (ITSC), 2014 IEEE 17th International Conference on. IEEE, 2014, pp. 392–399. [4] W. Song, G. Xiong, and H. Chen, “Intention-aware autonomous driving decision-making in an uncontrolled intersection,” Mathematical Problems in Engineering, vol. 2016, 2016. [5] S. Shalev-Shwartz, S. Shammah, and A. Shashua, “Safe, multiagent, reinforcement learning for autonomous driving,” arXiv preprint arXiv:1610.03295, 2016. [6] R. Caruana, “Multitask Learning,” Machine Learning, vol. 28, pp. 41– 75, 1997. [7] S. J. Pan and Q. Yang, “A Survey on Transfer Learning,” IEEE Transactions on Knowledge and Data Engineering, vol. 22, no. 10, 2010. [8] M. E. Taylor and P. Stone, “Transfer learning for reinforcement learning domains: A survey,” Journal of Machine Learning Research, vol. 10, no. Jul, pp. 1633–1685, 2009. [9] A. S. Razavian, H. Azizpour, J. Sullivan, and S. Carlsson, “CNN Features off-the-shelf: an Astounding Baseline for Recognition,” Computer Vision and Pattern Recognition Workshops (CVPRW), pp. 512– 519, Mar. 2014. [10] J. Yosinski, J. Clune, Y. Bengio, and H. Lipson, “How transferable are features in deep neural networks ?” NIPS, vol. 27, 2014. [11] A. A. Rusu, N. C. Rabinowitz, G. Desjardins, H. Soyer, J. Kirkpatrick, K. Kavukcuoglu, R. Pascanu, and R. Hadsell, “Progressive neural networks,” arXiv preprint arXiv:1606.04671, 2016. [12] H. Yin and S. J. Pan, “Knowledge transfer for deep reinforcement learning with hierarchical experience replay,” in AAAI Conference on Artificial Intelligence (AAAI), 2017. [13] R. K. Srivastava, J. Masci, S. Kazerounian, F. Gomez, and J. Schmidhuber, “Compete to compute,” in Advances in neural information processing systems, 2013, pp. 2310–2318. [14] J. Kirkpatrick, R. Pascanu, N. Rabinowitz, J. Veness, G. Desjardins, A. A. Rusu, K. Milan, J. Quan, T. Ramalho, A. Grabska-Barwinska, et al., “Overcoming catastrophic forgetting in neural networks,” arXiv preprint arXiv:1612.00796, 2016. [15] I. J. Goodfellow, M. Mirza, D. Xiao, A. Courville, and Y. Bengio, “An empirical investigation of catastrophic forgetting in gradient-based neural networks,” arXiv preprint arXiv:1312.6211, 2013. [16] C. J. Watkins and P. Dayan, “Q-learning,” Machine learning, vol. 8, no. 3-4, pp. 279–292, 1992. [17] V. Mnih, K. Kavukcuoglu, D. Silver, A. Graves, I. Antonoglou, D. Wierstra, and M. Riedmiller, “Playing atari with deep reinforcement learning,” arXiv preprint arXiv:1312.5602, 2013. [18] J. Peng and R. J. Williams, “Incremental multi-step q-learning,” Machine learning, vol. 22, no. 1-3, pp. 283–290, 1996. [19] A. Srinivas, S. Sharma, and B. Ravindran, “Dynamic action repetition for deep reinforcement learning,” AAAI Conference on Artificial Intelligence (AAAI), 2017. [20] R. S. Sutton and A. G. Barto, Reinforcement learning: An introduction. MIT press Cambridge, 1998, vol. 1, no. 1. [21] M. Jaderberg, V. Mnih, W. M. Czarnecki, T. Schaul, J. Z. Leibo, D. Silver, and K. Kavukcuoglu, “Reinforcement learning with unsupervised auxiliary tasks,” arXiv preprint arXiv:1611.05397, 2016. [22] C. Tessler, S. Givony, T. Zahavy, D. J. Mankowitz, and S. Mannor, “A deep hierarchical approach to lifelong learning in minecraft,” arXiv preprint arXiv:1604.07255, 2016. [23] T. D. Kulkarni, K. Narasimhan, A. Saeedi, and J. Tenenbaum, “Hierarchical deep reinforcement learning: Integrating temporal abstraction and intrinsic motivation,” in Advances in Neural Information Processing Systems, 2016, pp. 3675–3683. [24] A. L. Maas, A. Y. Hannun, and A. Y. Ng, “Rectifier nonlinearities improve neural network acoustic models,” in Proc. ICML, vol. 30, no. 1, 2013. [25] T. Tieleman and G. Hinton, “Lecture 6.5-rmsprop, coursera: Neural networks for machine learning,” University of Toronto, Tech. Rep, 2012. [26] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, et al., “Human-level control through deep reinforcement learning,” Nature, vol. 518, no. 7540, pp. 529–533, 2015. [27] S. Thrun, “Is learning the n-th thing any easier than learning the first?” Advances in neural information processing systems, pp. 640– 646, 1996. [28] D. Isele, M. Rostami, and E. Eaton, “Using task features for zeroshot knowledge transfer in lifelong learning,” In Proceedings of the International Joint Conference on Artificial Intelligence, 2016. [29] M. McCloskey and N. J. Cohen, “Catastrophic interference in connectionist networks: The sequential learning problem,” Psychology of learning and motivation, vol. 24, pp. 109–165, 1989. [30] R. Ratcliff, “Connectionist models of recognition memory: Constraints imposed by learning and forgetting functions,” Psychological review, vol. 97, no. 2, pp. 285–308, 1990. [31] P. Ruvolo and E. Eaton, “ELLA: An efficient lifelong learning algorithm,” Proceedings of the International Conference on Machine Learning, vol. 28, pp. 507–515, 2013. [32] Y. Bengio, J. Louradour, R. Collobert, and J. Weston, “Curriculum learning,” International Conference on Machine Learning, pp. 41–48, 2009. [33] P. Ruvolo and E. Eaton, “Active task selection for lifelong machine learning.” in AAAI Conference on Artificial Intelligence (AAAI), 2013. [34] D. Krajzewicz, J. Erdmann, M. Behrisch, and L. Bieker, “Recent development and applications of SUMO–simulation of urban mobility,” International Journal on Advances in Systems and Measurements (IARIA), vol. 5, no. 3–4, 2012. [35] S. Krauss, “Microscopic modeling of traffic flow: Investigation of collision free vehicle dynamics,” Ph.D. dissertation, Deutsches Zentrum fuer Luft-und Raumfahrt, 1998.
2cs.AI
Effective Differential Nullstellensatz for Ordinary DAE Systems with Constant Coefficients ∗ Lisi D’Alfonso♮ Gabriela Jeronimo♯ arXiv:1305.6298v2 [math.AC] 13 Jan 2014 Pablo Solernó♯ ♮ Departamento de Ciencias Exactas, Ciclo Básico Común, Universidad de Buenos Aires, Ciudad Universitaria, 1428, Buenos Aires, Argentina ♯ Departamento de Matemática and IMAS, UBA-CONICET, Facultad de Ciencias Exactas y Naturales,Universidad de Buenos Aires, Ciudad Universitaria, 1428, Buenos Aires, Argentina E-mail addresses: [email protected], [email protected], [email protected] February 4, 2018 Abstract We give upper bounds for the differential Nullstellensatz in the case of ordinary systems of differential algebraic equations over any field of constants K of characteristic 0. Let x be a set of n differential variables, f a finite family of differential polynomials in the ring K{x} and f ∈ K{x} another polynomial which vanishes at every solution of the differential equation system f = 0 in any differentially closed field containing K. Let d := max{deg(f ), deg(f )} and ǫ := max{2, ord(f ), ord(f )}. We show that f M belongs to the algebraic ideal generated by the successive derivatives of f of order at c(nǫ)3 , for a suitable universal constant c > 0, and M = dn(ǫ+L+1) . most L = (nǫd)2 The previously known bounds for L and M are not elementary recursive. 1 Introduction In 1890, D. Hilbert states his famous result, currently known as Hilbert’s Nullstellensatz: if k is a field and f1 , . . . fs , h are multivariate polynomials such that every zero of the fi ’s, in an algebraic closure of k, is a zero of h, then some power of h is a linear combination of the fi ’s with polynomial coefficients. In particular if f1 , . . . , fs have no common zeros, then there exist polynomials h1 , . . . hs such that 1 = h1 f1 + . . . + hs fs . The classical proofs give no information about the polynomials hi , for instance, they give no bound for their degrees. The knowledge of such bounds yields a simple way of determining whether the ∗ Partially supported by the following grants: UBACYT 20020110100063 (2012-2015) / Math-AmSud SIMCA “Implicit Systems, Modelling and Automatic Control” (2013-2014) / Subsidio para Investigador CONICET 4541/12 (2013) (P.S). 1 algebraic variety {f1 = 0, . . . , fs = 0} is empty. G. Hermann, in 1925, first addresses this question in [9] where she obtains a bound for the degrees of the hi ’s double exponential in the number of variables. In the last 25 years, several authors have shown bounds single exponential in the number of variables (for a survey of the first results see [1] and for more recent improvements see [10]). In 1932, J. F. Ritt in [21] introduces for the first time the differential version of Hilbert’s Nullstellensatz in the ordinary context: Let f1 , . . . fk , h be multivariate differential polynomials with coefficients in an ordinary differential field F. If every zero of the system f1 , . . . , fk in any extension of F is a zero of h, then some power of h is a linear combination of the fi ’s and a certain number of their derivatives, with polynomials as coefficients. In particular if the fi ’s do not have common zeros, then a combination of f1 , . . . fk and their derivatives of various orders equals unity. In fact, Ritt considers only the case of differential polynomials with coefficients in a differential field F of meromorphic functions in an open set of the complex plane. Later, H.W. Raudenbusch, in [20], proves this result for polynomials with coefficients in any abstract ordinary differential field of characteristic 0. In 1952, A. Seidenberg gives a proof for arbitrary characteristic (see [23]) and, in 1973, E. Kolchin, in his book [12], proves the generalization of this result to differential polynomials with coefficients in an arbitrary, not necessarily ordinary, differential field. None of the proofs mentioned above gives a constructive method for obtaining admissible values of the power of the polynomial h that is a combination of the fi ’s and their derivatives, or for the number of these derivatives. A bound for these orders of derivation allows us to work in a polynomial ring in finitely many variables and invoke the results of the algebraic Nullstellensatz in order to determine whether or not a differential system has a solution. A first step in this direction was given by R. Cohn in [2], where he proves the existence of the power of the polynomial h through a process that it is known to have only a finite number of steps. In [24], Seidenberg studies this problem in the case of ordinary and partial differential systems, proving the existence of functions in terms of the parameters of the input polynomials which describe the order of the derivatives involved; however, no bounds are explicitly shown there. The first known bounds on this subject are given by O. Golubitzky et al. in [6], by means of rewriting techniques. Their general upper bounds are stated in terms of the Ackermann function and, in particular, they are not primitive recursive (see [6, Theorem 1]). If the number of derivations is fixed (for instance, in the case of ordinary differential equations), the bounds become primitive recursive; however, they are not elementary recursive, growing faster than any tower of exponentials of fixed height. The present paper deals with effective aspects of the ordinary differential Nullstellensatz over the field C of complex numbers or, more generally, over arbitrary fields of constants of characteristic 0. Our main result, which can be found in Corollary 21 (see also Section 6 for the general case) states a doubly exponential upper bound for the number of required differentiations: Theorem Let x := x1 , . . . , xn and f := f1 , . . . , fs be differential polynomials in C{x}. Suppose that f ∈ C{x} is a differential polynomial such that every solution of the differ2 ential system f = 0 in any differentially closed field containing C satisfies also f = 0. Let d := max{deg(f ), deg(f )} and ǫ := max{2, ord(f ), ord(f )}. Then f M ∈ (f , . . . , f (L) ) where c(nǫ)3 L ≤ (nǫd)2 , for a universal constant c > 0, and M = dn(ǫ+L+1) . In particular, this theorem, combined with known degree bounds for the polynomial coefficients in a representation of 1 as a linear combination of given generators of trivial algebraic ideals, allows the construction of an algorithm to decide whether a differential system has a solution with a triple exponential running time. From a different approach, an algorithm for this decision problem, with similar complexity, can be deduced as a particular case of the quantifier elimination method for ordinary differential equations proposed by D. Grigoriev in [5]. Our approach focuses mainly on the consistency problem for first order semiexplicit ordinary systems over C, namely differential systems of the type of the system (4) below. An iterative process of prolongation and projection, together with several tools from effective commutative algebra and algebraic geometry, is applied in such a way that in each step the dimension of the algebraic constraints decreases until a reduced, zero-dimensional situation is reached. The bounds for this particular case are computed directly. Then, by means of a recursive reconstruction, we are able to obtain a representation of 1 as an element of the differential ideal associated to the original system. The results for any arbitrary ordinary DAE system over C are deduced through the classical method of reduction of order, the algebraic Nullstellensatz, and the Rabinowitsch trick. The generalization from C to an arbitrary field of constants of characteristic 0 is achieved by means of standard arguments of field theory. This paper is organized as follows. In Section 2 we introduce some basic tools and previous results from effective commutative algebra and algebraic geometry and some basic notions and notations from differential algebra. In Section 3 we address the case of semiexplicit systems with reduced 0-dimensional algebraic constraints. In Section 4 we show the process that reduces the arbitrary dimensional case to the reduced 0-dimensional one and then recover the information for the original system. In Section 5, the general case of an arbitrary ordinary DAE system over C is considered. Finally, in Section 6 we extend the previous results to any arbitrary base field K of characteristic 0 considered as a field of constants. 2 Preliminaries In this section we recall some definitions and results from effective commutative algebra and algebraic geometry and introduce the notation and basic notions from differential algebra used throughout the paper. 2.1 Some tools from Effective Commutative Algebra and Algebraic Geometry Throughout the paper we will need several results from effective commutative algebra and algebraic geometry. We recall them here in the precise formulations we will use. 3 Before proceeding, we introduce some notation. Let x = x1 , . . . , xn be a set of variables and f = f1 , . . . , fs polynomials in C[x]. We will write V (f ) for the algebraic variety in Cn defined by {f = 0} = {x ∈ Cn : f1 (x) = 0, . . . , fs (x) = 0}. If V ⊂ Cn is an algebraic variety, I(V ) will denote the vanishing ideal of the variety V , that is I(V ) = {f ∈ C[x] : f (x) = 0 ∀ x ∈ V }. One of the results we will apply is an effective version of the strong Hilbert’s Nullstellensatz (see for instance [10, Theorem 1.3]): Proposition 1 Let f1 , . . . , fs ∈ C[x1 , . . . , x√ n ] be polynomials of degrees bounded by d, and n let I = (f1 , . . . , fs ) ⊂ C[x1 , . . . , xn ]. Then ( I) d ⊂ I. In addition, we will need estimates for the degrees of generators of the (radical) ideal of an affine variety V ⊂ Cn . A classical result due to Kronecker [16] states that any algebraic variety in Cn can be defined by n + 1 polynomials in C[x1 , . . . , xn ]. Moreover, these n + 1 polynomials can be chosen to be Q-linear combinations of any finite set of polynomials defining the variety. In [7, Proposition 3], a refined version of Kronecker’s theorem is proved for irreducible affine varieties. In this version the degree of the n + 1 defining polynomials is bounded by the degree of the variety. We recall that the degree of an irreducible algebraic variety is defined as the number of points in the intersection of the variety with a generic linear variety of complementary dimension; for an arbitrary algebraic variety, it is defined as the sum of the degrees of its irreducible components (see [7]). Kronecker’s theorem with degree bounds can be extended straightforwardly to an arbitrary (not necessarily irreducible) algebraic variety V ⊂ Cn by considering equations of degree deg(C) for each irreducible componentPC of V and multiplying them in order to obtain a finite family of polynomials of degree C deg(C) = deg(V ) defining V : Proposition 2 Let V ⊂ Cn be an algebraic variety. Then, there exist n + 1 polynomials of degrees at most deg(V ) whose set of common zeros in Cn is V . In order to obtain upper bounds for the number and degrees of generators of the ideal of V , we will apply the following estimates, which follow from the algorithm for the computation of the radical of an ideal presented in [17, Section 4] (see also [15], [14]) and estimates for the number and degrees of polynomials involved in Gröbner basis computations (see, for instance, [3], [19] and [4]): Proposition 3 Let I = (f1 , . . . , fs ) ⊂ C[x1 , . . . , xn ] be an ideal generated by s polynomials of degrees at most d that define an algebraic variety of dimension r and let ν = max{1, r}. √ O(νn) polynomials of degrees at most Then, the radical ideal I can be generated by (sd)2 O(νn) 2 . (sd) Combining Propositions 2 and 3, we have: Proposition 4 Let V ⊂ Cn be an algebraic variety of dimension r and degree D and O(νn) polynomials ν = max{1, r}. Then, the vanishing ideal of V can be generated by (nD)2 O(νn) . of degrees at most (nD)2 4 Finally, in order to use the bounds in the previous proposition, we will need to compute upper bounds for the degrees of algebraic varieties. To this end, we will apply the following Bézout type bound, taken from [8, Proposition 2.3]: Proposition 5 Let V ⊂ Cn be an algebraic variety of dimension r and degree D, and let f1 , . . . , fs ∈ C[x1 , . . . , xn ] be polynomials of degree at most d. Then, deg(V ∩ V (f1 , . . . , fs )) ≤ Ddr . 2.2 Basic notions from Differential Algebra If z := z1 , . . . , zα is a set of α indeterminates, the ring of differential polynomials is denoted by C{z1 , . . . , zα } or simply C{z} and is defined as the commutative polynomial (p) ring C[zj , 1 ≤ j ≤ α, p ∈ N0 ] (in infinitely many indeterminates), with the derivation (i) (i+1) δ(zj ) = zj (i) , that is, zj stands for the ith derivative of zj (as usual, the first derivatives (p) (p) are also denoted by żj ). We write z(p) := {z1 , . . . , zα } and z[p] := {z(i) , 0 ≤ i ≤ p} for every p ∈ N0 . For a differential polynomial h lying in the differential polynomial ring C{z} the successive total derivatives of h are: h(0) := h h(p) := X i∈N0 ,1≤j≤α ∂h(p−1) (i) ∂zj (i+1) zj , for p ≥ 1. (i) The order of h ∈ C{z} with respect to zj is ord(h, zj ) := max{i ∈ N0 : zj appears in h}, and the order of h is ord(h) := max{ord(h, zj ) : 1 ≤ j ≤ α}. Given a finite set of differential polynomials h = h1 , . . . , hβ ∈ C{z}, we write [h] to denote the smallest differential ideal of C{z} containing h (i.e. the smallest ideal containing the polynomials h and all their derivatives of arbitrary order). For every i ∈ N, we write (i) (i) h(i) := h1 , . . . , hβ and h[i] := h, h(1) , . . . , h(i) . 3 3.1 The case of ODE’s with 0-dimensional reduced algebraic constraint An introductory case: univariate ODE’s We start by considering the simple case of trivial univariate differential ideals contained in C{x} where x is a single differential variable. Suppose that the trivial ideal is presented by two generators ẋ−f (x) and g(x), without common differential solutions, where f and g are polynomials in C[x]. Since we assume that there exists a representation of 1 as a combination of ẋ−f (x) and g(x) and suitable derivatives of them, by replacing in such a representation all derivatives x(i) by 0 for i ≥ 1, we deduce that the univariate polynomials f and g are relatively prime in C[x]. 5 Let 1 = pf + qg be an identity in C[x]; therefore, we have 1 = −p(x)(ẋ − f (x)) + q(x)g(x) + p(x)ẋ. (1) On the other hand, if we assume that g is square-free, from a relation 1 = a(x)g(x) + ∂g ∂g b(x) (x) we deduce ẋ = ẋa(x)g(x) + b(x)ẋ (x) = ẋa(x)g(x) + b(x)ġ. Thus, replacing ∂x ∂x ẋ in (1) we have: 1 = −p(x)(ẋ − f (x)) + (q(x) + p(x)ẋa(x))g(x) + p(x)b(x)ġ. In other words, we need at most one derivative of g in order to write 1 as combination of the derivatives of the generators ẋ − f (x) and g(x). Let us remark that a similar argument can be applied also if g is not assumed squarefree with the aid of the Faà di Bruno formula (see for instance [11]) which describes each differential polynomial g(i) as a Q-linear combination of products of x(j) , j ≤ i, and ∂k g up to order i. In this case it is not difficult to show that the successive derivatives ∂xk maximum number of derivatives of the input equations which allow us to write 1 can be bounded a priori by the smallest k such the first k derivatives of g are relatively prime and, moreover, no derivatives of ẋ − f of positive order are needed. Since we do not make use of this result, we have not included a complete proof here. 3.2 The multivariate case Now we consider the case of an arbitrary number of variables. Suppose that x = x1 , . . . , xn and u = u1 , . . . , um are independent differential variables. Let f = f1 , . . . , fn ∈ C[x, u] and g = g1 , . . . , gs ∈ C[x, u] be polynomials such that the (polynomial) ideal (g) ⊆ C[x, u] is radical and 0-dimensional. Suppose that the differential ideal generated by the n + s polynomials ẋ − f and g is the whole differential ring C{x, u} (i.e. 1 ∈ [ẋ − f , g]). The goal of this subsection is to show that the order of derivatives of the generators which allows us to write 1 as a combination of them is at most 1 (see Proposition 6 below). Under these assumptions, as in the previous section, we deduce that the polynomial ideal (f , g) is the ring C[x, u]; hence, we have an algebraic identity 1 = p · f + q · g for suitable n + s polynomials p, q ∈ C[x, u]. Thus, 1 = −p · (ẋ − f ) + q · g + p · ẋ. (2) Since the polynomial ideal (g) is assumed to be radical and 0-dimensional, for each variable xj there exists a nonzero square-free univariate polynomial hj ∈ C[xj ] such that ∂hj hj (xj ) ∈ (g) ⊆ C[x, u]. The square-freeness of hj implies that the relation 1 = aj hj +bj ∂xj holds in the ring C[xj ] for suitable polynomials aj , bj ∈ C[xj ] and then, after multiplying by x˙j we obtain the identities x˙j = aj x˙j hj + bj ḣj , for j = 1, . . . , n. 6 (3) On the other hand, each polynomial hj can be written as a linear combination of the polynomials g with coefficients in C[x, u], which induces by derivation a representation of its derivative h˙j as a linear combination of g, ġ with coefficients in C[x, u, ẋ, u̇]. Replacing hj and ḣj in (3) by these combinations and then replacing ẋ in (2), we conclude: Proposition 6 With the previous notations and assumptions we have 1 ∈ [ẋ − f , g] ⊆ C{x, u} if and only if 1 ∈ (ẋ − f , g, ġ) ⊆ C[x, u, ẋ, u̇]. In other words, in order to obtain a (differential) representation of 1 it suffices to derive once the algebraic reduced equations g. 4 The main case: ODE’s with arbitrary algebraic constraint We will now consider semiexplicit differential systems with no restrictions on the dimension of the algebraic variety of constraints. Let x = x1 , . . . , xn and u = u1 , . . . , um be differential variables, and let f = f1 , . . . , fn and g = g1 , . . . , gs be polynomials in C[x, u]. We consider the differential first order semiexplicit system  ẋ − f (x, u) = 0 (4) g(x, u) = 0 Suppose that the differential system (4) has no solution (or equivalently, 1 ∈ [ẋ−f , g] ⊆ C{x, u}). Our goal is to find bounds for the order of a representation of 1 as a combination of the polynomials ẋ−f , g and their derivatives. Without loss of generality we will suppose that the purely algebraic system g = 0 is consistent, because if it is not, it suffices to write 1 as a combination of the polynomials g and no derivatives are required. The following theorem will be proved at the end of this section: Theorem 7 Let x = x1 , . . . , xn and u = u1 , . . . , um be differential variables, and let f = f1 , . . . , fn and g = g1 , . . . , gs be polynomials in C[x, u]. Let V ⊂ Cn+m be the variety defined as the set of zeros of the ideal (g), 0 ≤ r := dim(V ), ν := max{1, r} and D be an upper bound for the degrees of f , g and V . Then, 1 ∈ [ẋ − f , g] ⇐⇒ cν 2 (n+m) where L ≤ ((n + m)D)2 1 ∈ (ẋ − f , . . . , x(L+1) − f (L) , g, . . . , g(L) ), for a universal constant c > 0. In what follows we will show how it is possible to obtain a system related to the original inconsistent input system (4) but whose algebraic variety of constraints has dimension 0. To do this, we consider a sequence of auxiliary inconsistent differential systems such that their algebraic constraints define varieties with decreasing dimensions. Once this descending dimension process is done, we will be able to apply the results of Section 3.2. Finally, we will estimate the order of derivatives of the equations which enable us to write 1 as an element of the differential ideal by means of an ascending dimension process associated to the same sequence of auxiliary systems. 7 4.1 The dimension descending process Let us begin by introducing some notation related to the differential part ẋ − f = 0 of the system (4) that will be used throughout this section. Notation 8 If h = h1 , . . . , hβ is a set of polynomials in C[x, u], we define e hi := m n X X ∂hi ∂hi fj + u̇k ∈ C[x, u, u̇] ∂xj ∂uk j=1 k=1 for i = 1, . . . , β. In other words, e := ∂h · f + ∂h · u̇. h ∂x ∂u e belong to the polynomial ideal (ẋ − f , ḣ) ∩ C[x, u, u̇]. Note that the polynomials h If I ⊂ C[x, u] is an ideal, we denote by Ie ⊂ C[x, u, u̇] the ideal generated by I and the polynomials e h with h ∈ I. Note that if a set of polynomials h generates the ideal I, then e generate the ideal Ie in C[x, u, u̇] and that Ie ⊂ (ẋ−f , h, ḣ)∩C[x, u, u̇]. the polynomials h, h The key point to our dimension descending process is the following geometric Lemma. Lemma 9 Let π : Cn+2m → Cn+m be the projection (x, u, u̇) 7→ (x, u) and suppose that the ideal (g) ⊂ C[x, u] is radical. If the system (4) has no solution, then no irreducible component of V (g) is contained e)) and, in particular, since π(V (g, g e)) ⊆ V (g), we have in the Zariski closure π(V (g, g e)) < dim V (g). that dim π(V (g, g Proof. Throughout the proof, for a set of variables z and a set of polynomials h in C[z], ∂h the #(h) × #(z) Jacobian matrix of the if z ⊂ z and h ⊂ h, we will denote by ∂z polynomials h with respect to the variables z. e)). We Suppose that there is an irreducible component C of V (g) included in π(V (g, g will construct a solution for the system (4). e)) is contained in V (g), there exists at Since the Zariski algebraic closed set π(V (g, g e) such that C = π(Z). From Chevalley’s least one irreducible component Z of V (g, g Theorem (see e.g. [18, Ch.2, §6]) there exists a nonempty Zariski open subset U of C e)). Moreover, since the ideal (g) is assumed to be contained in the image π(Z) ⊆ π(V (g, g radical, shrinking the open set U if necessary, we may also suppose that all point p ∈ U is ∂g a regular point of C and then, the Jacobian matrix (p) has rank n + m − dim C. ∂(x, u) Similarly, we may suppose also that for all p ∈ U the equality   ∂g ∂g rk (p) = max rk (x, u) : (x, u) ∈ C ∂u ∂u holds, and that the first columns of ∂g (p) are a C-basis of the column space of this matrix. ∂u 8 ∂g b = u1 , . . . , ul and u = ul+1 , . . . , um , then there exists a subset (p). If u ∂u ∂g ∂g b ⊆ x of cardinality k := n + m − dim C − l such that rk x (p) = rk (p) = k + l. b) ∂(b x, u ∂(x, u) b = x1 , . . . , xk . We denote x = xk+1 , . . . , xn . For simplicity assume that x Set l := rk Claim For every p ∈ U there exists a unique ηb ∈ Cl (depending on p) such that (p, ηb, 0) ∈ e). V (g, g e)) there exists (a, b) ∈ Cl × Cm−l (not Proof of the claim. Fix p ∈ U . Since U ⊆ π(V (g, g e). Thus necessarily unique) such that (p, a, b) ∈ V (g, g ∂g ∂g ∂g (p) · f (p) + (p) · a + (p) · b = 0. ∂x ∂b u ∂u In particular, the linear system in the unknowns (y, z) ∈ Cl × Cm−l : ∂g ∂g ∂g (p) · y + (p) · z = − (p) · f (p) ∂b u ∂u ∂x ∂g has a solution, or equivalently, the columns of (p) · f (p) belong to the linear subspace ∂x ∂g b , the generated by the columns of the matrix (p). By our choice of the variables u ∂u ∂g ∂g columns of the matrix (p) are a basis of this subspace. Then, the linear system (p) · ∂b u ∂b u ∂g e). This y = − (p) · f (p) has a unique solution ηb ∈ Cl , which means that (p, ηb, 0) ∈ V (g, g ∂x finishes the proof of the claim. Now we go back to the proof of the Lemma. We are looking for a solution of the system e)). (4) when the irreducible component C of the variety V (g) lies in π(V (g, g Fix a point (x0 , u0 ) = (b x0 , x 0 , u b0 , u0 ) ∈ U . From the Implicit Function Theorem around (x0 , u0 ), shrinking the open set U in the strong topology if necessary, there exists a neighborhood V0 ⊂ C(n−k)+(m−l) of the point (x0 , u0 ) (also in the strong topology) and differentiable functions ϕ1 : V0 → Ck and ϕ2 : V0 → Cl such that for any (x, u) = (b x, x, u b, u) ∈ U , the equality (b x, u b) = (ϕ1 (x, u), ϕ2 (x, u)) holds and in particular we have (x, u) = (ϕ1 (x, u), x, ϕ2 (x, u), u)) for all (x, u) ∈ U . (5) For i = k + 1, . . . , n, we write ψi (x, u) = fi (ϕ1 (x, u), x, ϕ2 (x, u), u) and ψ = ψ k+1 , . . . , ψ n . Let us consider the following ODE with initial condition in the n − k unknowns x:  ẋ = ψ(x, u0 ) (6) x(0) = x0 and let γ(t) = (γk+1 (t), . . . , γn (t)) be a solution of the system (6) in a neighborhood of 0. From this solution γ we define Γ(t) = (ϕ1 (γ(t), u0 ), γ(t), ϕ2 (γ(t), u0 ), u0 ) 9 in a neighborhood of 0. From (6) we have that (γ(0), u0 ) = (x0 , u0 ); therefore, the continuity of γ ensures that for all t in a neighborhood of 0, (γ(t), u0 ) belongs to the open set V0 and then Γ is well defined. It suffices to prove that Γ(t) is a solution of the original system (4), which leads to a contradiction since that system has no solution. First of all, by (5) we deduce that Γ(t) ∈ U ⊆ C for all t small enough and so, g(Γ(t)) = 0. In other words, Γ(t) satisfies the algebraic constraint of the system (4). In order to show that Γ(t) also satisfies the differential part of (4) we observe that its coordinates k + 1, . . . , n are simply γ(t), which satisfy the differential relations: d (γi (t)) = ψ i (γ(t), u0 ) dt for i = k +1, . . . , n. Since ψ i (γ(t), u0 ) = fi (Γ(t)), we conclude that Γ satisfies the last n−k differential equations of (4). It remains to show that it also satisfies the first k differential equations of (4). Taking the derivative with respect to the single variable t in the identity g(Γ(t)) = 0 we obtain: d d ∂g d ∂g ∂g (Γ(t)) · (ϕ1 (γ(t), u0 )) + (Γ(t)) · (γ(t)) + (Γ(t)) · (ϕ2 (γ(t), u0 )) = 0, ∂b x dt ∂x dt ∂b u dt and then − ∂g d ∂g d (Γ(t)) · (γ(t)) = (Γ(t)) · (ϕ(γ(t), u0 )), b) ∂x dt ∂(b x, u dt (7) where ϕ = (ϕ1 , ϕ2 ). e)), On the other hand, since for all t in a neighborhood of 0 we have Γ(t) ∈ U ⊆ π(V (g, g the previous Claim implies that there exist a unique ηb(t) ∈ Cl such that (Γ(t), ηb(t), 0) ∈ e) and then, if we write b V (g, g f = f1 , . . . , fk and f = fk+1 , . . . , fn , Hence, ∂g ∂g ∂g (Γ(t)) · b f (Γ(t)) + (Γ(t)) · f(Γ(t)) + (Γ(t)) · ηb(t) = 0. ∂b x ∂x ∂b u − ∂g ∂g (Γ(t)) · f (Γ(t)) = (Γ(t)) · (b f (Γ(t)), ηb(t)). b) ∂x ∂(b x, u (8) d ∂g (γ(t)) = ψ(γ(t), u0 ) = f (Γ(t)) and the matrix (Γ(t)) has a (k+l)×(k+l) b) dt ∂(b x, u invertible minor, comparing (7) and (8), we infer that Since d f (Γ(t)), ηb(t)). (ϕ(γ(t), u0 )) = (b dt d (ϕ1 (γ(t), u0 )) = b f (Γ(t)). Thus Γ verifies also the first k differential equadt tions in (4) and the lemma is proved. In particular Before we begin the descending process, let us remark that the new differential system induced by the construction underlying Lemma 9 trivially inherits the inconsistency from the input system (4): 10 Remark 10 Let notations be as in Lemma 9 and g1 be a set of generators of the (radical) e))). If the system (4) has no solution, neither does the differential system ideal I(π(V (g, g  ẋ − f (x, u) = 0 . g1 (x, u) = 0 p This is a consequence of the inclusion of algebraic ideals (g) ⊂ (g) ⊂ (g1 ), which implies the inclusion of differential ideals [g] ⊂ [g1 ]; hence, 1 ∈ [ẋ − f , g1 ]. We will now begin to present the descending dimension process induced by Lemma 9. Definition 11 From the system (4), we define recursively an increasing chain of radical ideals I0 ⊂ I1 ⊂ · · · in the polynomial ring C[x, u] as follows: p • I0 = (g). • Assuming that Ii is defined, consider the idealqIei ⊆ C[x, u, u̇] introduced in Notation 8 and suppose that 1 ∈ / Iei . We define Ii+1 = Iei ∩ C[x, u]. Let us observe some basic facts about this definition. First, note that I0 = I(V (g)) and, for i ≥ 1, if π : Cn+2m → Cn+m is the projection (x, u, u̇) 7→ (x, u), then Ii+1 = / Iei ). Secondly, I(π(V (Iei ))) (we have that V (Iei ) ⊂ Cn+2m is nonempty since we assume 1 ∈ from Lemma 9, it follows that the chain of ideals defined is strictly increasing since the inequality dim(V (Ii+1 )) < dim(V (Ii )) holds. We can estimate the length of this chain: if we define ρ := min{i ∈ Z≥0 : dim(V (Ii )) ≤ 0} we have that 0 ≤ ρ ≤ r (recall that we assume that the ideal I0 is a proper ideal with dim(V (I0 )) = r ≥ 0). Notice also that if ρ > 0, then dim(V (Iρ )) = 0 or −1 and dim(V (Iρ−1 )) > 0. Any system of generators gρ of the last ideal Iρ allows us to exhibit a new ODE system, related to the original one, with no solutions and such that 1 can be easily written as a combination of the generators of the associated differential ideal. More precisely, Proposition 12 Fix i = 0, . . . , ρ and let gi ⊂ C[x, u] be any system of generators of the radical ideal Ii . Then the DAE system  ẋ − f (x, u) = 0 gi (x, u) = 0 has no solution. In the particular case i = ρ, we also have that 1 belongs to the polynomial ideal (ẋ − f , gρ , ġρ ) ⊂ C[x, ẋ, u, u̇]. Proof. The first assertion follows from the iterated application of Remark 10. If i = ρ and dim(Iρ ) = −1 (i.e. if Iρ = C[x, u]) we have 1 ∈ (gρ ) ⊂ (ẋ − f , gρ , ġρ ). Otherwise, 11 if dim(Iρ ) = 0, since the ideal Iρ = (gρ ) is radical, the Proposition follows from the 0dimensional case considered in Proposition 6. In the following Lemma we will estimate bounds for the degree and the number of polynomials in suitable families gi which generate the ideals Ii , for each i = 1, . . . , ρ. It will be a consequence of Proposition 4. Lemma 13 Consider the DAE system (4), and let r := dim(V (g)), ν := max{1, r} and D := max{deg(f ), deg(g), deg(V (g))}. There exists a universal constant c > 0 such that for each 0 ≤ i ≤ ρ, the ideal Ii can be generated by a family of polynomials gi whose c(i+1)ν(n+m) . Moreover, if r > 0, this is number and degrees are bounded by ((n + m)D)2 ei . also an upper bound for the degrees of the polynomials g p Proof. First, notice that, if r = 0, then ρ = 0. Since g0 is a set of generators of (g), the bound is a direct consequence of Proposition 4. Let us now suppose that r > 0. From Proposition 4, since V (g) ⊂ Cn+m is an algebraic variety of dimension r0 := r and degree at most D0 := D, the radical ideal I0 = I(V (g)) can be generated by a set g0 c r (n+m) polynomials of degrees at most δ0 , where c0 is an adequate of δ0 := ((n + m)D)2 0 0 positive constant. By modifying the constant c0 if necessary, we may suppose that δ0 is e0 introduced in Notation 8. also an upper bound for the degrees of the polynomials g e0 )) is at most Following [7, Lemma 2], the degree of the variety π(V (Ie0 )) = π(V (g0 , g e0 )) and then, from Proposition 5 and the previous bounds we infer that deg(V (g0 , g c r (n+m) c0 r0 (n+m) e0 )) ≤ D0 δ0r0 = (n + m)r0 2 0 0 D 1+r0 2 =: D1 . deg(π(V (Ie0 ))) ≤ deg(V (g0 , g Applying again the estimate stated in Proposition 4, we have that the ideal I1 = I(π(V (Ie0 )) can be generated by a set g1 consisting of at most c0 r1 (n+m) δ1 := ((n + m)D1 )2 c0 r1 (n+m) (1+r = ((n + m)D)2 c r (n+m) ) 02 0 0 polynomials of degrees bounded by δ1 , where r1 := dim(V (I1 )) < r0 . By the choice of c0 , e1 . δ1 is also an upper bound for the degrees of the polynomials g Proceeding in the same way, it can be proved inductively that, for every 0 ≤ i ≤ ρ − 1, ei )) ≤ Di δiri = deg(π(V (Iei ))) ≤ deg(V (gi , g Qi c0 rj (n+m) 1 ) ((n + m)D) j=0 (1+rj 2 =: Di+1 n+m and, therefore, the radical ideal Ii+1 = I(π(V (Iei ))) can be generated by a system of polynomials gi+1 whose number and degrees are bounded by c0 ri+1 (n+m) δi+1 := ((n + m)Di+1 )2 c0 ri+1 (n+m) = ((n + m)D)2 Qi c0 rj (n+m) ) j=0 (1+rj 2 , ei . which is also an upper bound for the degrees of the polynomials g The result follows by choosing a universal constant c such that 1+r2c0 r(n+m) ≤ 2cr(n+m) for every r > 0. We introduce the following invariants associated to the chain of ideals I0 ⊂ I1 ⊂ · · · ⊂ Iρ and the generators gi , i = 0, . . . , ρ, considered in Lemma 13, that we will use in the next section. 12 Definition 14 With the previous notations, for each i = 0, . . . , ρ, we define εi as follows: ε0 := min{ε ∈ N : I0ε ⊆ (g)}, εi := min{ε ∈ N : Iiε ⊆ (ẋ − f , gi−1 , ġi−1 )} for i > 0. Observe that by definition, εi > 0 for all i. Moreover, they are well defined (i.e. finite) ei−1 ) ⊆ (ẋ − f , gi−1 , ġi−1 ) since Ii is the radical of the ideal Iei−1 ∩ C[x, u] and Iei−1 = (gi−1 , g (see the final remark in Notation 8). In fact, we can obtain upper bounds for these integer numbers in terms of the parameters of the input system (4): Proposition 15 As in Lemma 13, let D := max{deg(f ), deg(g), deg(V (g))}. We have the inequalities: ε0 ≤ D n+m and cir(n+m) εi ≤ ((n + m)D)2 for i = 1, . . . , ρ, where c > 0 is a universal constant. √ Proof. If i = 0 the bound follows from Proposition 1 applied to I = (g) and I0 = I in deg(g)n+m the polynomial ring C[x, u]: we have that I0 ⊂ (g) and then, ε0 ≤ D n+m . p Now, fix an index i = 1, . . . , ρ. From Definition 11, it follows that Ii is contained in ei−1 ) ⊂ C[x, u, u̇]. Thus, applying Proposition 1 to the ideal I = (gi−1 , g ei−1 ), (gi−1 , g ei−1 ) for ε := (((n + with the estimations of Lemma 13, we conclude that Iiε ⊂ (gi−1 , g cir(n+m) cir(n+m) n+2m , since in this case r > 0 and then ν = r. ) = ((n + m)D)(n+2m)2 m)D)2 ei−1 ) ⊂ (ẋ − f , gi−1 , ġi−1 ) changing The proposition follows from the fact that (gi−1 , g ′ the constant c by another one c′ such that the inequality (n + 2m)2cir(n+m) ≤ 2c ir(n+m) holds for any n, m. 4.2 Going Back to the Original System We follow the notations and keep the hypotheses of the previous section. The aim of this section is to prove the main Theorem 7, roughly speaking, an upper bound for the number of derivations needed to obtain a representation of 1 as an element of the differential ideal [ẋ − f , g] introduced in formula (4). Let gi , i = 0, . . . , ρ, be the polynomials in C[x, u] introduced in Lemma 13. From Proposition 12, the differential Nullstellensatz asserts that 1 ∈ [ẋ − f , gi ] for i = 0, . . . , ρ. Thus for each i there exists a non negative integer k (depending on i) such that 1 ∈ [k] ((ẋ − f )[k] , gi ) ⊆ C[x[k+1] , u[k] ]. For i = 0, . . . , ρ, we define: [k] ki := min{k ∈ N0 : 1 ∈ ((ẋ − f )[k] , gi )}. (9) Observe that, since (gi ) = Ii ⊂ Ii+1 = (gi+1 ), the sequence ki is decreasing and that Proposition 12 ensures that kρ ≤ 1. The following key lemma allows us to bound recursively each ki−1 in terms of ki with the help of the sequence εi introduced in Definition 14: 13 Lemma 16 Suppose that the finite sequence ki introduced in (9) is not identically zero and let µ := max{0 ≤ i ≤ ρ : ki 6= 0}. Then: 1. the inequality ki−1 ≤ 1 + εi ki holds for every 1 ≤ i ≤ µ. 2. kµ = 1 and ki = 0 for every i > µ. 3. k0 ≤ (µ + 1) µ Y εi . i=1 Proof. Obviously, ki = 0 for all i > µ from the definition of µ. Consider now 1 ≤ i ≤ µ + 1. From Definition 14, any g ∈ Ii = (gi ) satisfies gεi ∈ (ẋ − f , gi−1 , ġi−1 ). (10) For any j ≥ 1, if we differentiate jεi times the polynomial gεi , by means of Leibniz’s Formula, we have   X jεi εi (jεi ) = (g ) g(r1 ) . . . g(rεi ) , r1 . . . rεi r1 +r2 +...rεi =jεi where r1 , . . . , rεi are nonnegative integers and jεi r1 ...rεi  := (jεi )! . In the formula above, r1 ! . . . rεi ! (jεi )! (j) εi (g ) and, since the sum of all the rl , with (j!)εi l = 1, . . . , εi , must be jεi , in all the other terms there is at least one g(rl ) with rl < j. Thus, for every j = 0, . . . , ki , there exist polynomials pj,0 , . . . , pj,j−1, such that the equality the term with r1 = . . . = rεi = j equals j−1 εi (jεi ) (g ) (jεi )! (j) ǫi X = (g ) + pj,l g(l) (j!)εi l=0 holds; moreover, from (10), by differentiating jεi times we deduce that j−1 (jεi )! (j) εi X [1+jε ] (g ) + pj,l g (l) ∈ ((ẋ − f )[jεi ] , gi−1 i ). (j!)εi l=0 From these relations we deduce recursively that a common zero of the polynomials [1+k ε ] (ẋ − f )[ki εi ] and gi−1 i i is also a zero of the polynomials g, ġ, . . . , g (ki ) for every g ∈ Ii = [k ] (gi ); in particular, it is a common zero of (ẋ − f )[ki ] , gi i (recall that, by definition, εi is at least 1 and then ki εi ≥ ki for all i). This contradicts the definition of ki (see (9)). [1+k ε ] Therefore, 1 ∈ ((ẋ − f )[ki εi ] , gi−1 i i ) and then, ki−1 ≤ 1 + ki εi , which proves the first part of the lemma. In particular, if µ < ρ, taking i = µ + 1 in the previous inequality, we have 0 < kµ ≤ 1 + kµ+1 εµ+1 = 1, hence kµ = 1. In the case µ = ρ, Proposition 12 implies that kρ ≤ 1 and then, since kµ is assumed nonzero, we have kµ = kρ = 1. This proves the second assertion. 14 Finally, the last statement is an easy consequence of the previous ones: it follows from the fact that kµ = 1, applying recursively the inequality ki−1 ≤ 1 + ki εi for i = µ, µ − 1, . . . , 1. We are now ready to prove Theorem 7 stated at the beginning of this subsection as a corollary of the previous lemma and its proof: Proof of Theorem 7. We must estimate an upper bound for the minimum integer L such that 1 ∈ ((ẋ − f )[L] , g[L] ). By Definition 14 the inclusion (g0 )ε0 ⊆ (g) holds. We can repeat p the same argument as in the proof of Lemma 16 and prove that, for any g ∈ (g0 ) = I0 = (g) and for j = 0, . . . , k0 , there exist polynomials pj,0 , . . . , pj,j−1 such that j−1 ε0 (jε0 ) (g ) (jε0 )! (j) ε0 X = (g ) + pj,l g(l) ∈ (g[jε0 ] ). (j!)ε0 l=0 As before, this implies that a common zero of the polynomials (ẋ − f )[k0 ε0 ] and g[k0 ε0 ] is also a zero of g, . . . , g (k0 ) for an arbitrary element g ∈ (g0 ); in particular, taking into [k ] account that ε0 ≥ 1, it follows that it is a common zero of (ẋ − f )[k0 ] , g0 0 , contradicting the definition of k0 (see (9)). We conclude then that 1 ∈ ((ẋ − f )[k0 ε0 ] , g[k0 ε0 ] ). Thus, the inequality L ≤ k0 ε0 holds. If r = 0, from Proposition 6, we have that k0 = 1 and then, from Proposition 15, L ≤ ε0 ≤ D n+m . On the other hand, if r > 0, from Proposition 15 and Lemma 16, taking into account that µ ≤ r, we have that there is a constant c such that L ≤ k0 ε0 ≤ D n+m (µ + 1) Qµ i=1 ((n Pµ = (µ + 1)((n + m)D) cir(n+m) + m)D)2 i=0 2cir(n+m) 21+cµr(n+m) ≤ (µ + 1)((n + m)D) 1+cr 2 (n+m) ≤ (r + 1)((n + m)D)2 = ≤ ≤ . The desired bound follows taking a new constant c′ , in such a way that the inequality c′ r 2 (n+m) 1+cr 2 (n+m) holds. Finally, since ν = max{1, r}, it ≤ ((n + m)D)2 (r + 1)((n + m)D)2 c′ r 2 (n+m) is easy to see that D n+m and ((n+m)D)2 for a suitable universal constant c′′ > 0. The converse is obvious. c′′ ν 2 (n+m) are both bounded by ((n+m)D)2 As we have observed in the previous proof, if we assume r = 0 (i.e. the algebraic constraint g = 0 of the DAE system (4) defines a 0-dimensional algebraic variety in Cn+m ), the constant L can be bounded directly by ε0 . This estimation is optimal for this 15 kind of DAE systems as it is shown by the following example extracted from [6, Example 5]: Example 17 In the DAE system (4) suppose n = 1, x = x1 , u = u1 , . . . , um , f = 1, and g(x, u) = um − x21 , um−1 − u2m , . . . , u1 − u22 , u21 . As it is shown in [6, Example 5], this system has no solutions and 1 ∈ ((ẋ − f )[L] , g[L] ) if and only if L ≥ 2m+1 . On the other hand, the inequality ε0 ≤ 2m+1 holds from Proposition 1. Hence ε0 = 2m+1 and the upper bound is reached. 5 The general case The well-known method of reducing the order of a system of differential equations will enable us to apply the results of the previous Section to the general case. Let x = x1 , . . . , xn and f = f1 , . . . , fs be differential polynomials in C[x, . . . , x(e) ], with e ≥ 1. We consider the differential system  (e)   f1 (x, . . . , x ) = 0 .. (11) .   (e) fs (x, . . . , x ) = 0 Theorem 7 yields the following: Theorem 18 Let x = x1 , . . . , xn and f = f1 , . . . , fs be differential polynomials in C[x, . . . , x(e) ]. Let V ⊂ Cn(e+1) be the algebraic variety defined by {f = 0}, and let ν := max{1, dim(V )} and D := max{deg(g), deg(V )}. Then 1 ∈ [f ] ⇐⇒ 1 ∈ (f , . . . , f (L) ) cν 2 n(e+1) where L ≤ (n(e + 1)D)2 for a universal constant c > 0. (j) Proof. As usual, the introduction of the new of variables zi,j := xi , for i = 1, . . . , n and j = 0, . . . , e, and zj = z1,j , . . . , zn,j , allows us to transform the implicit system (11) into the following first order system with a set of polynomial constraints:  ż0 = z1     .. . (12)  ż  e−1 = ze   f = 0 where f = f1 (z0 , . . . , ze ), . . . , fs (z0 , . . . , ze ). It is clear that 1 ∈ [f ] ⇐⇒ 1 ∈ [ż0 − z1 , . . . , że−1 − ze , f ]. The differential part of the system (12) is given by an ODE consisting of ne equations in n(e + 1) variables and the constraints are given by polynomials in n(e + 1) variables, that is, f ∈ C[z0 , . . . , ze ]. Then, Theorem 7 applied to this system implies that 1 ∈ [ż0 − z1 , . . . , że−1 − ze , f ] ⇐⇒ 1 ∈ ((ż0 − z1 )[L] , . . . , (że−1 − ze )[L] , f 16 [L] ) cν 2 (n(e+1)) , with c > 0 a universal constant. Going back to the where L ≤ (n(e + 1)D)2 (k) (j+k) original variables, replacing zi,j by xi for i = 1, . . . , n, j = 0, . . . e and k = 0, . . . , L, we get that 1 ∈ [f ] ⇐⇒ 1 ∈ (f , . . . , f (L) ) and the Theorem follows. Applying the trivial bound dim(V ) ≤ n(e + 1) and Bezout’s inequality, which implies that deg(V ) ≤ dn(e+1) , we deduce the following purely syntactic upper bound for the order in the differential Nullstellensatz: Corollary 19 Let f ⊂ C{x} be a finite set of differential polynomials in the variables x = x1 , . . . , xn , whose degrees and orders are bounded by d and e respectively. Then, 1 ∈ [f ] ⇐⇒ 1 ∈ (f , . . . , f (L) ) c(n(e+1))3 where L ≤ (n(e + 1)d)2 for a universal constant c > 0. Now, once the order is bounded, as a straightforward consequence of the classical effective Nullstellensatz (see for instance [10, Theorem 1.1]), we can estimate the degrees of the polynomials involved in the representation of 1 as an element of the ideal [f ]. Corollary 20 Let f = {f1 , . . . , fs } ⊂ C{x} be a finite set of differential polynomials in the variables x = x1 , . . . , xn , whose degrees and orders are bounded by d and e respectively. Let ǫ := max{2, e}. Then 1 ∈ [ f ] if, and only if, there exist polynomials pij ∈ C[x[ǫ+L] ] L s X X (j) pij fi , where such that 1 = i=1 j=0 c(nǫ)3 L ≤ (nǫd)2 3 2c(nǫ) (j) deg(pij fi ) ≤ d(nǫd) and , for a universal constant c > 0. Proof. This corollary is an immediate consequence of the result in [10, Theorem 1.1]) applied to the polynomials f [L] of Corollary 19, once we notice that all the polynomials f [L] have degree bounded by d, since differentiation does not increase the degree, and that (j) N := n(e + L + 1) is the number of variables used. Thus deg(pij fi ) ≤ 2dN , and we only c(n(e+1))3 need to change the constant c for a new constant c′ > 0 such that (n(e + 1)d)2 ′ 3 2c (nǫ) c(n(e+1))3 n(e+(n(e+1)d)2 c′ (nǫ)3 (nǫd)2 +1) ≤ d and, for d ≥ 2, 2d (nǫd) take pij ∈ C and so, the degree upper bound also holds. ≤ . For d = 1, we can We remark that Corollary 20 allows us to construct an algorithm which decides if an ordinary DAE system f = 0 over C has a solution or not. It suffices to consider the coefficients of the polynomials pij as indeterminates (finitely many, since orders and degrees are bounded a priori ) and obtain them by solving a non homogeneous linear system over C. It is easy to see that the complexity of this procedure becomes triply exponential in the 17 parameters n and e. Another algorithm of the same hierarchy of complexity (i.e. triply exponential) can be deduced as a particular case of the quantifier elimination method of ordinary differential equations proposed by D. Grigoriev in [5]. In the usual way, we can deduce an effective strong differential Nullstellensatz from Corollary 19 and the well-known Rabinowitsch trick: Corollary 21 Let f ⊂ C{x} be a finite set of differential polynomials in the variables x = x1 , . . . , xn . Suppose that f ∈ C{x} is a differential polynomial such that every solution of the differential system f = 0 is a solution of the differential equation f = 0. Let d := max{deg(f ), deg(f )} and ǫ := max{2, ord(f ), ord(f )}. Then f M ∈ (f [L] ) ⊂ [ f ] where c(nǫ)3 M = dn(ǫ+L+1) and L ≤ (nǫd)2 for a universal constant c > 0. Proof. We start with the Rabinowitsch trick: since every solution of the system f = 0 is a solution of f = 0, if we introduce a new differential variable y, the differential system f = 0 , 1 − yf = 0 has no solution. Hence, 1 belongs to the differential ideal [f , 1 − yf ] ⊆ C{x, y}. Therefore, Corollary 19 implies that 1 belongs to the polynomial ideal (f [L] , (1−yf )[L] ), c′ (nǫ)3 c((n+1)(ǫ+1))3 , for suitable universal constants ≤ (nǫd)2 with L ≤ ((n + 1)(ǫ + 1)(d + 1))2 ′ c, c > 0. Taking any representation of 1 as a linear combination of the generators f [L] , (1− yf )[L] with polynomial coefficients and replacing each variable y (i) by the corresponding (f −1 )(i) for 0 ≤ i ≤ L, we deduce p that a suitable power of f belongs to the polynomial [L] ideal (f ) or, equivalently, f ∈ (f [L] ) in the polynomial ring C[x[ǫ+L] ]. N Now, applying [10, Theorem 1.3] stated in our Proposition 1, we conclude that f d ∈ (f [L] ) for N := n(ǫ+L+1), the number of variables of the ground polynomial ring C[x[ǫ+L] ], and the corollary is proved. With the same notation and assumptions as in Corollary 21, we can obtain upper bounds for the degrees of the polynomials involved in a representation of a power of f as an element of the differential ideal [f ]. Applying [13, Corollary 1.7], we have that, if f = f1 , . . . , fs are differential polynomials of degrees at least 3, there are polynomials s X L X (j) (j) pij fi with deg(pij fi ) ≤ (1 + d)M , where pij ∈ C[x[ǫ+L] ] such that f M = i=1 j=0 M = dn(ǫ+L+1) . For differential polynomials with arbitrary degrees, following the proof of the first part of Corollary 21 and taking into account the bounds in Corollary 20, we get a L s X X c(nǫ)3 f (j) f = 2(L + 1)dn(ǫ+L+1)+1 ≤ d(nǫd)2 peij fi , where M , with representation f M = i=1 j=0 deg(e pij ) ≤ 6 c(nǫ)3 2 d(nǫd) for a suitable universal constant c > 0. The case of an arbitrary field of constants In the previous sections the assumption of taking the complex numbers as the ground field is only essential in the proof of Lemma 9 because the Implicit Function Theorem is 18 applied. Even if the statement of this lemma makes sense in any field, we are not able to prove it in the more general case of any field of constants. However, it is not difficult to prove that if K is an arbitrary field of characteristic 0 (with the trivial derivation) the following analogue of Theorem 7 remains true for K. More precisely: Theorem 22 Let K be an arbitrary field of characteristic 0 with the trivial derivation, x = x1 , . . . , xn and u = u1 , . . . , um differential variables over K, f = f1 , . . . , fn and g = g1 , . . . , gs polynomials in K[x, u]. If d > 0 is an upper bound for the degrees of f and g we have: 1 ∈ [ẋ − f , g] ⊆ K{x, u} c(n+m)3 where L ≤ ((n + m)d)2 ⇐⇒ 1 ∈ (ẋ − f , . . . , x(L+1) − f (L) , g, . . . , g(L) ), for a suitable universal constant c > 0. Proof. We prove only the non trivial implication. Suppose that 1 ∈ [ẋ − f , g] ⊆ K{x, u} holds. Let k ⊆ K be the subfield of K which is generated over Q by the coefficients of the finitely many polynomials involved in a decomposition of 1 as an element of the ideal [ẋ − f , g]. Obviously, we have 1 ∈ [ẋ − f , g] in the differential ring k{x, u}. Since k is a finitely generated extension of Q and C is algebraically closed having infinite transcendence degree over Q, there exists a field Q-embedding σ : k → C. This morphism can be extended to an embedding of the ring k{x, u} into C{x, u}, simply by applying σ to the coefficients of the polynomials. Moreover, by considering k and C as fields of constants, σ defines a monomorphism of differential rings. In particular, the condition 1 ∈ [ẋ−f , g] ⊆ k{x, u} implies that 1 ∈ [ẋ−σ(f ), σ(g)] ⊆ σ(k){x, u} ⊆ C{x, u}. Now, applying Theorem 7 to the polynomials σ(f ), σ(g) we conclude that the relation 1 ∈ (ẋ − σ(f ), . . . , x(L+1) − σ(f )(L) , σ(g), . . . , σ(g)(L) ) (13) cν 2 (n+m) , where holds in an algebraic polynomial ring C[x[L+1] , u[L] ] with L ≤ ((n + m)D)2 D is the degree of the variety V ⊂ Cn+m defined by σ(g) and ν := max{1, dim(V )}. Using Bézout’s inequality we may replace D by dn+m and then, changing the constant c c(n+m)3 . Moreover, we can also replace C by if necessary, we may suppose L ≤ ((n + m)d)2 the subfield σ(k), because the coefficients of the polynomial combination underlying (13) may be chosen as solutions of a linear system with coefficients in that field. The theorem follows by taking σ −1 in that polynomial relation. Since all the statements in Section 5 follow by straightforward manipulations of the equations plus the bound stated in Theorem 7, we can replace C by any arbitrary base field of constants K of characteristic 0 and the results of that section remain true. Acknowledgments. The authors thank Michael Wibmer (RWTH Aachen University) for pointing out a way of extending the results from the field of complex numbers to an arbitrary field of constants of characteristic zero. 19 References [1] Berenstein, C.; Struppa, D. Recent Improvements in the Complexity of the Effective Nullstellensatz. Linear Algebra Appl. 157 (1991), 203–215. [2] Cohn, R. On the analogue for differential equations of the Hilbert-Netto theorem Bull. Amer. Math. Soc. Volume 47, Number 4 (1941), 268–270. [3] Dubé, T. The structure of polynomial ideals and Gröbner bases. SIAM J. Comput. 19, no. 4 (1990), 750–775. [4] Giusti, M. Some effectivity problems in polynomial ideal theory. EUROSAM 84 (Cambridge, 1984), Lecture Notes in Comput. Sci., 174, Springer, Berlin (1984), 159–171. [5] Grigoriev, D. Complexity of quantifier elimination in the theory of ordinary differential equations. EUROCAL ’87 (Leipzig, 1987), Lecture Notes in Comput. Sci., 378, Springer, Berlin (1989), 11–25. [6] Golubitsky, O.; Kondratieva, M.; Ovchinnikov, A.; Szanto, A. A bound for orders in differential Nullstellensatz. Journal of Algebra 322, no. 11 (2009), 3852–3877 [7] Heintz, J. Definability and fast quantifier elimination in algebraically closed fields. Theoret. Comput. Sci. 24, no. 3 (1983), 239–277. [8] Heintz, J.; Schnorr, C. Testing polynomials which are easy to compute. Logic and algorithmic (Zurich, 1980), Monograph. Enseign. Math., 30, Univ. Genève (1982), 237–254. [9] Hermann, G. Die Frage der endlich vielen Schritte in der Theorie der Polynomideale. Math. Ann. 95 (1926), 736–788. [10] Jelonek, Z. On the effective Nullstellensatz. Invent. Math. 162, no. 1 (2005), 1–17. [11] Johnson, W. The Curious History of Faà di Bruno’s Formula. The Amer. Math. Monthly, Vol. 109, No. 3 (2002), 217–234 [12] Kolchin, E. Differential Algebra and Algebraic Groups. Academic Press, NewYork, (1973). [13] Kollár, J. Sharp effective Nullstellensatz. J. Amer. Math. Soc. 1 (1988), no. 4, 963– 975. [14] Krick, T.; Logar, A. Membership problem, representation problem and the computation of the radical for one-dimensional ideals. Effective methods in algebraic geometry (Castiglioncello, 1990), Progr. Math., 94, Birkhuser Boston, Boston, MA (1991), 203– 216. [15] Krick, T.; Logar, A. An algorithm for the computation of the radical of an ideal in the ring of polynomials. Applied algebra, algebraic algorithms and error-correcting codes (New Orleans, LA, 1991), Lecture Notes in Comput. Sci., 539, Springer, Berlin (1991), 195–205. 20 [16] Kronecker, L. Grundzüge einer arithmetischen Theorie der algebraischen Grössen. J. Reine Angew. Math. 92 (1882), 1–123. [17] Laplagne, S. An algorithm for the computation of the radical of an ideal. ISSAC 2006, ACM, New York (2006), 191–195. [18] Matsumura, H. Commutative Algebra. Second Edition. The Benjamin/Cummings Publ. Company (1980). [19] Möller, M.; Mora, F. Upper and lower bounds for the degree of Groebner bases. EUROSAM 84 (Cambridge, 1984), Lecture Notes in Comput. Sci., 174, Springer, Berlin (1984), 172–83. [20] Raudenbush, H. Ideal theory and algebraic differential equations. Trans. Amer. Math. Soc. vol. 36 (1934), 361–368. [21] Ritt, J. Differential equations from the algebraic standpoint. Amer. Math. Soc. Colloq. Publ., Vol XIV, New York (1932). [22] Ritt, J. Differential Algebra. Amer. Math. Soc. Coll. Publ. Vol. 33, New York (1950). [23] Seidenberg, A. Some basic theorems in differential algebra (characteristic p arbitrary). Trans. Amer. Math. Soc. 73 (1952), 174–190 . [24] Seidenberg, A. An elimination theory for differential algebra. Univ. Calif. Publ. Math. (New Series) 3 (1956), 31–65 . 21
0math.AC
P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. 1 Joint Filter and Waveform Design for Radar STAP in Signal Dependent Interference arXiv:1510.00055v1 [cs.SY] 30 Sep 2015 Pawan Setlur, Member, IEEE, Muralidhar Rangaswamy, Fellow, IEEE Abstract Waveform design is a pivotal component of the fully adaptive radar construct. In this paper we consider waveform design for radar space time adaptive processing (STAP), accounting for the waveform dependence of the clutter correlation matrix. Due to this dependence, in general, the joint problem of receiver filter optimization and radar waveform design becomes an intractable, non-convex optimization problem, Nevertheless, it is however shown to be individually convex either in the filter or in the waveform variables. We derive constrained versions of: a) the alternating minimization algorithm, b) proximal alternating minimization, and c) the constant modulus alternating minimization, which, at each step, iteratively optimizes either the STAP filter or the waveform independently. A fast and slow time model permits waveform design in radar STAP but the primary bottleneck is the computational complexity of the algorithms. Index Terms Waveform design, waveform scheduling, space time adaptive radar, Capon beamformer, constant modulus, convex optimization, alternating minimization, regularization, proximal algorithms. I. I NTRODUCTION The objective of this report is to address waveform design in radar space time adaptive processing (STAP) [1]–[4]. An air-borne radar is assumed with an array of sensor elements observing a moving target on the ground. We will assume that the waveform design and scheduling are performed over one CPI rather than on an individual pulse repetition interval (PRI).To facilitate waveform design, we develop a STAP model considering the fast time samples along with the slow time processing. This is different P. Setlur is affiliated with the Wright State Research Inst., and as a research contractor with the US AFRL, WPAFB, OH, email:[email protected]. M. Rangaswamy is with Sensors Directorate, U.S. AFRL, WPAFB, OH, email:[email protected]. Approved for Public Release No.: 88ABW-2014-3392. P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. 2 from traditional STAP which generally considers the data after matched filtering [1], [2]. Nonetheless STAP research efforts have been proposed which consider inclusion of fast time samples in space time processing, see for example [1], [5], [6] and references therein. In line with traditional STAP, we formulate the waveform design, as an minimum variance distortionless response (MVDR) type optimization [7]. As we will see in the sequel, inclusion of the waveform increases the dimensionality of the correlation matrix. Classical Radar STAP is computationally expensive but the waveform adaptive STAP increases the complexity by several orders of magnitude. Therefore, benefits of waveform design in STAP come at the expense of increased computational complexity. The noise, clutter, and interference are modeled stochastically and are assumed to be mutually uncorrelated. Endemic to airborne STAP, clutter is persistent in most range gates resulting from ground reflections. The clutter correlation matrix is a function of the waveform causing the joint reliever filter and waveform optimization to be non-convex with no closed form solution. However, it is analytically shown here that the STAP MVDR objective is convex with respect to (w.r.t.) the receiver filter for a fixed but arbitrary waveform, and vice versa. Therefore, alternating minimization approaches arise as natural candidate solutions. As such, alternating minimization itself has a rich history in the optimization literature, possibly motivated directly from the works in [8]–[11], with some not so recent seminal contributions [12]–[15] and recent contributions (not exhaustive) [16], [17]. Other celebrated algorithms such as the ArimotoBlahut algorithm to calculate channel capacity, and the expectation-maximization (EM) algorithm are all examples of the alternating minimization. Here we address the joint optimization problem via a constrained alternating minimization approach, which has the favorable property of monotonicity in successive objective evaluations. Convergence, performance guarantees and other properties pertinent to this algorithm are further addressed. Full rank correlation matrices are required in implementing the constrained alternating minimization approach. In practice, radar STAP contends with rank deficient correlation matrices due to lack of homogeneous training data. In this case, the constrained alternating minimization approach is not implementable. To addresses this issue, we consider regularization of the STAP objective via strongly convex functions resulting in the constrained proximal alternating minimization [18]. Proximal algorithms, originally proposed by [19], [20] are well suited candidate techniques for constrained, large scale optimization [16], [21]–[24], applicable readily to our waveform adaptive STAP problem. In fact, as we will see subsequently the constrained proximal alternating minimization results in diagonal loading solutions, and for optimization-specific interpretations, the load factors may be related to the Lipschitz constants (w.r.t. the gradient). Signal dependent interference: Chicken or the Egg? The fundamental problem in practical radar waveform design is analogous to the chicken or the egg problem. Signal dependent interference, i.e., P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. 3 clutter, can only be perfectly characterized by transmitting a signal. Herein lies the central problem. The estimated clutter properties could therefore be dependent on what was transmitted in the first place. This is especially true for frequency selective and dispersive clutter responses frequently encountered in radar operations, for example, urban terrain. Therefore, any claim of optimality is myopic. Sadly the same problem would also persist when the target impulse responses are used to shape the waveform. Unfortunately, and as famously stated by Woodward [25], [26], “. . . what to transmit remains substantially unanswered” [27], [28]. We will assume like other works in the signal dependent interference waveform design [29]–[37], that the clutter response is known a priori. To a certain extent, this may be obtained via a combination of, either previous radar transmission [38], or assuming that the topography is known from ground elevation maps, synthetic aperture radar imagery [39], or access to knowledge aided databases as in the DARPA’s KASSPER program [40]. Literature: The signal dependent interference waveform design problem has had a rich history [41], [42]. Iterative approaches but not limited alternating minimization type techniques have been the subject of work in [29]–[37], [43] for SISO, MIMO radars but never in radar STAP. Waveform design for STAP without considering the signal dependent interference clutter was addressed in [44], where the authors premise is that the degrees of freedom from the waveform could be used in suppressing the interference and noise, while the degrees of freedom from the filter could be used exclusively for suppressing the clutter. A joint STAP waveform and STAP filter design was never considered. Further, their premise is erroneous for the following several reasons. For any radar application, but especially in STAP, obtaining range cells which are interference free or clutter free is impossible. Nonetheless assuming this was possible, then, the weight vector for exclusive clutter suppression uses the inverse of the clutter interference correlation matrix only, and not, as stated in [44], the inverse of the (clutter+noise+interference) correlation matrix. Furthermore such a detector may have disastrous consequences, because control in the false alarm rates becomes impossible due to the self induced coloring on other range cells which are contaminated by the clutter plus interference plus noise. Other contributions in waveform design and waveform scheduling for extended targets in radar using information theoretic measures, tracking etc can be seen in [45]–[50], [51]–[56], and the references therein. We outline some of the contributions for the signal dependent interference problem which have thus far appeared in the literature. Approaches different from Alternating minimization: In [29], [32], [34], [43] a single sensor radar was assumed. In [29], the authors used the symmetry property of the cross-ambiguity function to design an P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. 4 iterative algorithm for the signal dependent interference problem. Their algorithm cannot be modified easily for the multi-sensor framework and when noise is in general colored. The problem was addressed from a detection perspective in [32], and lead to a waterfilling [47] type solution. A similar waterfilling type metric albeit in the discrete time domain was obtained in [43], where the authors also imposed constant modulus and peak to average power ratio (PAPR) waveform constraints. An iterative algorithm was derived in [34], where monotonic increase in SINR was not guaranteed, and was shown that waveform could always be chosen as minimum phase. Alternating minimization type approaches: In [33], a MIMO sensor framework was employed, convergence was not addressed, convexity was not proven, and no practical waveform constraints were imposed on the design. See also in this report, Section III, paragraph following Rem. 5 where some of the conclusions drawn in [33] are further discussed. Alternating minimization was used in [35]–[37] but for reasons unknown, was called as sequential optimization. In [35], [36], a SISO model advocating joint filter and radar code design (after matched filtering) was employed. Analysis of the convexity of the objective in the individual filter or radar code was never shown. Convergence in iterates was not proven formally, neither was it shown via simulations. The constant modulus constraint was not invoked directly but through a similarity constraint. In [37], the authors used a MIMO radar framework, and relaxation techniques were employed in their iterative algorithm. Neither convergence nor convexity was demonstrated analytically. Constant modulus constraint and similarity constraints were enforced separately in the waveform design. Notation: The variable N is used interchangeably with the number of the fast time samples, as well as, the conventional dimension of arbitrary real or complex (sub)spaces. Its meaning is readily interpreted from context. The symbol || · || always denotes the l2 norm. Vectors are always lowercase bold, matrices are bold uppercase, λ is typically reserved for eigenvalues (with λo being an exception it used for the spatial frequency, defined later) and γ is strictly reserved for the Lagrange multipliers (γpq is an exception used for the radar cross section of the p-th scatterer in the q -th clutter patch). Solutions to the optimization are denoted as (·)o , i.e. the subscript o. the complex conjugate is denoted with (·)∗ . The set of reals, complex numbers, and natural numbers are denoted as R, C, N, respectively. Other symbols are defined upon first use and are standard in the literature. Organization: The STAP fast time-slow time model is delineated in Section II, and in Section III, the filter and waveform optimization is derived. Some preliminary simulations are presented in section IV and the resulting conclusions are drawn in Section V. 5 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. II. STAP M ODEL The radar consists of a calibrated air-borne linear array, comprising M sensor elements, each having an identical antenna pattern. Without loss of generality, assume that the first sensor in the array is the phase center, and acts as both a transmitter and receiver, the rest of the elements are purely receivers. The first sensor is located at xr ∈ R3 and the ground based point target at xt ∈ R3. The radar transmits the burst of pulses: u(t) = L X l=1 s(t − lTp ) exp(j2πfo (t − lTp )), t ∈ [0, T ) (1) where, fo is the carrier frequency, and Tp = 1/fp is the inverse of the pulse repetition frequency, fp . The pulse width and bandwidth are denoted as T , B , respectively. The coherent processing interval (CPI) consists of L pulses, each of width equal to T . The geometry of the scene is shown in Fig. 1, where θt and φt denote the azimuth and elevation. The radar and target are both assumed to be moving. For the time being, we ignore the noise, clutter and interference and assume a non-fluctuating target. Then the desired target’s received signal for the l-th pulse, and at the m-th sensor element is given by sml (t) = ρt s(t − lTp − τm )e(j2π(fo +fdm )(t−lTp −τm )) (2) where the target’s observed Doppler shift is denoted as fdm , and its complex back-scattering coefficient as ρt . Assume that the array is along the local x axis as shown in Fig. 1. Then, the coordinates of the m-th element is given by xt + md, d := [d, 0, 0]T , m = 0, 1, 2 . . . , M − 1, where d is the inter-element spacing. The delay τm could be re-written as τm = ||xr − xt ||/c + ||xr + md − xt ||/c s ||xr − xt || ||xr − xt || ||md||2 2mdT (xr − xt ) = 1+ + + 2 c c ||xr − xt || ||xr − xt ||2   (a) ||xr − xt || ||xr − xt || mdT (xr − xt ) ≡ + 1+ c c ||xr − xt ||2 =2 ||xr − xt || mdT (xr − xt ) + , c c||xr − xt || (3) (4) where in approximation (a), the term ∝ ||md||2 was ignored, i.e. it is assumed that d/||xr − xt || << 1, and then a binomial approximation was employed. From geometric manipulations, we also have: xr − xt = [sin(φt ) sin(θt ), sin(φt ) cos(θt ), cos(φt )]T . ||xr − xt || Using the above equation in (4), the delay τm , m = 0, 1, . . . , M − 1 can be rewritten as τm = 2 ||xr − xt || md sin(φt ) sin(θt ) + . c c (5) 6 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. The Doppler shift, i.e. fdm is computed as (ẋr − ẋt )T (xr − xt ) c||xr − xt ||   T (xr − xt )(ẋr − ẋt )T (xr − xt ) md ẋr − ẋt − + fo c ||xr − xt ||2 k|xr − xt ||3 fdm = 2fo (6) where ẋ(·) is the vector differential of x(·) w.r.t. time. In practice d is a fraction of the wavelength, and assuming that d/||xr − xt || << 1 we approximate the second term in (6) as 0. The Doppler shift is no longer a function of the sensor index, m, and is rewritten as fdm = fd = 2fo (ẋr − ẋt )T (xr − xt ) c||xr − xt || (7) A. Vector signal model Let s(t) be sampled discretely resulting in N discrete time samples. Consider for now the single range gate corresponding to the time delay τt . After a suitable alignment to a common local time (or range) reference, and invoking some standard assumptions, see also [57, A.1-A.3], the radar returns in l-th PRI written as a vector defined as yl ∈ CN M , is given by yl = ρt s ⊗ a(θt , φt ) exp(−j2πfd (l − 1)Tp ) a(θt , φt ) := [1, e−j2πϑ , . . . , e−j2π(M −1)ϑ ]T ∈ where s := [s1 , s2 , . . . , sN ]T ∈ CN (8) CM and ϑ := d sin(θt ) sin(φt )/λo is defined as the spatial frequency. Further it is noted that in (8), the constant phase terms have been absorbed into ρt . Considering the L pulses together, i.e. concatenating the desired target’s response for the entire CPI in a tall vector y, is defined as y∈ T T CN M L = [y0 T , y1 T , . . . , yL-1 ] = ρt v(fd ) ⊗ s ⊗ a(θt , φt ) v(fd ) := [1, e−j2πfd Tp , . . . , e−j2πfd (L−1)Tp ]T . (9) The vector y consists of both the spatial and the temporal steering vectors as in classical STAP, as well as the waveform dependency, via waveform vector s. Due to inclusion of the fast time samples in the waveform s, the STAP data cube is modified to reflect this change, and is depicted in Fig. 2. At the considered range gate, the measured snapshot vector consists of the target returns and the undesired returns, i.e. clutter returns, interference and noise. The contaminated snapshot at the considered range gate is then given by ỹ = y + yi + yc + yn = y + yu (10) where yi , yc , yn are the contributions from the interference, clutter and noise, respectively, and are assumed to be statistically uncorrelated with one another. The contribution of the undesired returns are treated in detail, starting with the noise as it is the simplest. 7 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. Noise: The noise is assumed to be zero mean, identically distributed across the sensors, across pulses, and in the fast time samples. The correlation matrix of yn is denoted as Rn ∈ CN M L×N M L . Interference: The interference consists of jammers and other intentional / un-intentional sources which may be ground based, air-borne or both. Let us assume that there are K interference sources. Further, since nothing is known about the jammers waveform characteristics, the waveform itself is assumed to be a stationary zero mean random process. Consider the k-th interference source in the l-th PRI, and at spatial co-ordinates (θk , φk ). Its corresponding snapshot contribution is modeled as, ykl = αkl ⊗ a(θk , φk ), k = 1, 2, . . . , K, l = 0, 1, . . . , L − 1 where αkl = [αkl (0), αkl (1), . . . , αkl (N − 1)]T ∈ CN is the random discrete segment of the jammer waveform, as seen by the radar in the l-th PRI. Stacking ykl for a fixed k as a tall vector, we have T T T yk = αk ⊗ a(θk , φk ) = [yko , yk1 , . . . , ykL−1 ]T ∈ αk : = [αk0 T , αk1 T , . . . , αkL−1 T ]T ∈ CN M L CN L (11) Using the Kronecker mixed product property, (see for e.g. [58]), the correlation matrix of yk is expressed as E{yk ykH } = Rkα ⊗ a(θk , φk )a(θk , φk )H where, E{αk αk H } := Rkα . For K mutually uncorrelated interferers, the K K K P correlation matrix is Ri = E{yk ykH } = P Rkα ⊗ a(θk , φk )a(θk , φk )H = P (IN L ⊗ a(θk , φk ))Rkα (IN L ⊗ k=1 k=1 a(θk , φk )H ), and is simplified as k=1 Ri = A(θ, φ)Rα A(θ, φ)H where Rα := Diag{R1α , R2α , . . . , RK α} ∈ (12) CN M LK×N M LK and A(θ, φ) ∈ CN M L×N M LK = [IN L ⊗ a(θ1 , φ1 ), IN L ⊗ a(θ2 , φ2 ), . . . , IN L ⊗ a(θK , φK )], here IN L the identity matrix of size N L × N L, and Diag{·, ·, . . . , ·} the matrix diagonal operator which converts the matrix arguments into a bigger diagonal matrix. hA 0 0 i For example, Diag{A, B, C} = 0 B 0 . 0 0 C Clutter: The ground is a major source of clutter in air-borne radar applications and is persistent in all range gates upto the gate corresponding to the platform horizon. Other sources of clutter surely exist, such as buildings, trees, as well as other un-interesting targets, which are ignored. We therefore consider only ground clutter and treat it stochastically. Let us assume that there are Q clutter patches indexed by parameter q. Each of these clutter patches are comprised of say P scatterers. The radar return from the p-th scatterer in the q-th clutter patch is given by γpq v(f cpq ) ⊗ s ⊗ a(θpq , φpq ) where γpq is its random complex reflectivity, f cpq is the Doppler shift observed from the p-th scatterer in the q-th 8 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. clutter patch, and θpq , φpq are the azimuth and elevation angles of this scatterer.The Doppler f cpq is given by, f cpq := 2fo ẋTr (xr − xpq ) . c||xr − xpq || (13) where xpq is the location of the p-th scatter in the q-th clutter patch. Since the clutter patch is stationary, the Doppler is purely from the motion of the aircraft as seen in (13). The contribution from the q-th clutter patch to the received signal is given by yq = P X p=1 γpq v(f cpq ) ⊗ s ⊗ a(θpq , φpq ), (14) H Rqγ := Bq Rpq γ Bq (15) with corresponding correlation matrix where, Bq = [v(f c1q ) ⊗ s ⊗ a(θ1q , φ1q ), v(f c2q ) ⊗ s ⊗ a(θ2q , φ2q ) . . . , v(f cP q ) ⊗ s ⊗ a(θP q , φP q )] ∈ CN M L×P T and Rpq γ is the correlation matrix of the random vector, [γ1q , γ2q , . . . , γP q ] . It is readily shown that the matrix Bq could be simplified as, Bq := B̆q (IP ⊗ s), where B̆q := [v(f c1q ) ⊗ A1q , v(f c2q ) ⊗ A2q , . . . , v(f cP q ) ⊗ APq ] ∈ CN M L×P N , and the structure of the matrix Apq ∈ CN M ×N (straightforward but not shown here) is defined such that s ⊗ a(θpq , φpq ) = Apq s, p = 1, . . . , P . Assuming that a particular scatterer from one clutter patch is uncorrelated to any other scatterer belonging to any other clutter patch, we have the net contribution of clutter Q P yc = yq , with corresponding correlation matrix given by q=1 Rc = Q X Rqγ . (16) q=1 The clutter model could further be simplified by the following arguments. Assuming a large range resolution which is typically the case for radar STAP [2] the scatterers in a particular clutter patch are in the same range gate and hence are assumed to possess approximately identical Doppler shifts, i.e. f cpq ≈ f cq = 2fo ẋT r (xr −xq ) c||xr −xq || . Similarly for the far field operation, and considering scatterers in the same azimuth resolution cell, and from the large range resolution argument, we may assume θpq ≈ θq and φpq ≈ φq , i.e. their nominal angular centers. These assumptions can now be incorporated in matrix Bq to simplify the clutter model, see also [57]. III. WAVEFORM D ESIGN The radar return at the considered range gate is processed by a filter characterized by a weight vector, w, whose output is given by wH ỹ. Since the vector s ∈ CN prominently figures in the steering vectors, the objective is to jointly obtain the desired weight vector, w and waveform vector, s. It is desired that the weight vector will minimize the output power, E{|wH yu |2 } = wH Ru (s)w. Mathematically, we may formulate this problem as: min wH Ru (s)w s. t wH (v(fd ) ⊗ s ⊗ a(θt , φt )) = κ w,s (17) 9 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. Range gates z Air-borne array vr xr Pulse index t y ✓t Sensor index Guard gate(s) xt Target Guard gate(s) x Fig. 1: Radar scene considering the ground based target at azimuth (θt ), elevation (φt ). The (x, y, z) axis are local to the aircraft carrying the array. Cell under test comprising N fast time samples Fig. 2: STAP data cube before matched filtering or range compression, depicting the considered range gate/cell and fast time slices (dashed lines). s H s ≤ Po In (17), the first constraint is the renowned,well known Capon constraint with κ ∈ R, typically κ = 1. An energy constraint enforced via the second constraint is to addresses hardware limitation. Before we derive the solutions to the optimization problem, it is useful to recall Lem. 1, which is well-known, used throughout this report but not stated explicitly. This fundamental result discusses the technique to compute stationary points of a real valued function w.r.t. its complex valued argument and its conjugate. Lemma 1. Let f (x, x∗ ) : CN → R. The stationary point of f (x, x∗ ) = f¯(xr , xi ) is found from the three equivalent conditions, 1. ∇xr f¯(xr , xi ) = 0 and ∇xi f¯(xr , xi ) = 0, or 2. ∇x f (x, x∗ ) = 0, or 3. ∇x∗ f (x, x∗ ) = 0. Here f¯ : RN × RN ∗ ∇x f (x, x ) := → R is the real equivalent of f (·, ·), xr = Re{x}, xi = Im{x}, where we define the gradient , ∂f∂x(·,·) ,··· [ ∂f∂x(·,·) 1 2 (·,·) T , ∂f ∂xN ] with xi as the i-th element of x, i = 1, 2, . . . N , and 0 is a column vector of all zeros of dimension N . Proof. This arises from the Wirtinger calculus see [59] 1 for a recent formal proof. Optimizing (17) w.r.t. w first, the solution to (17) is well known, and expressed as wo = 1 κR−1 u (s)(v(fd ) ⊗ s ⊗ a(θt , φt )) (v(fd ) ⊗ s ⊗ a(θt , φt ))H R−1 u (s)(v(fd ) ⊗ s ⊗ a(θt , φt )) also see refs. Brandwood, and A. van den Bos in [59] (18) 10 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. where Ru (s) = Ri + Rc (s) + Rn . We further emphasize that the weight vector is an explicit function of the waveform. Now substituting wo back into the cost function in (17), the minimization is purely w.r.t. s, and cast as, min s κ2 (v(fd ) ⊗ s ⊗ a(θt , φt ))H R−1 u (s)(v(fd ) ⊗ s ⊗ a(θt , φt )) s. t. sH s ≤ Po (19) A solution to (19) is not immediate, given the dependence of Ru on the waveform vector s. We consider first, the case when the clutter dependence on the waveform is ignored. Solutions to the design when clutter is considered are treated subsequently. A. Rayleigh-Ritz: Minimum eigenvector solution Ignoring the dependency of Ru on s, we readily see that the (19) can be recast as a Rayleigh-Ritz optimization, whose solution is given by v(fd ) ⊗ s ⊗ a(θt , φt ) = µmin (Ru ) (20) where µmin (Ru ) is the eigenvector corresponding to the minimum eigenvalue of Ru . This tensor equation implicitly defines the optimal s. It is readily seen that, v(fd ) ⊗ s ⊗ a(θt , φt ) = Gs, where G = v(fd ) ⊗ At , and  a(θt , φt )   0  At =    0  .. . 0 a(θt , φt ) 0 .. . 0 ··· ··· . a(θt , φt ) .. .. .. . . 0 0   0  ..  ∈ .  .. . CM N ×N . In general, the system is over-determined, and we solve this equation approximately via least squares (LS), ŝ = (GH G)−1 GH µmin (Ru ). (21) Moreover from (20) and the structure of the temporal and spatial steering vectors, as well as the orthonormality of the eigenvectors, it is readily seen that, ||v(fd ) ⊗ s ⊗ a(θt , φt )||2 = ||v(fd )||2 ||s||2 ||a(θt , φt )||2 = ||s||2 ||µmin (Ru )||2 = 1. (22) Hence the LS solution in (21) must be scaled to satisfy the desired energy requirements of the radar system. Decoupling LS: The LS solution in (21) can be further simplified due to the following linear relation between elements of v(fd ), a(θt , φt ), s and elements of µmin (Ru ), expressed as vl am sn = µh , l = 1, 2, . . . , L, m = 1, 2, . . . , M, n = 1, 2, . . . , N h = (l − 1)M N + (n − 1)M + m. (23) P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. 11 where vl , am , sn are the l-th, m-th, n-th elements of v(fd ), a(θt , φt ), s, and µh is the h-th element of µmin (Ru ), respectively. Therefore, the LS solution in (21) decouples as sn = where the vector µn ∈ (v(fd ) ⊗ a(θt , φt ))H µn , n = 1, 2, . . . , N (v(fd ) ⊗ a(θt , φt ))H (v(fd ) ⊗ a(θt , φt )) (24) CM L for a particular n consists of the M L appropriate elements, µh , h = (l − 1)M N + (n − 1)M + m, m = 1, 2, . . . , M, l = 1, 2, . . . , L, as highlighted in (23). The min. eigenvector solution is most relevant when noise and interference are considered and clutter is ignored in the waveform design [3]. it has some nice spectral properties similar (but not identical) to water-filling [3], [47]. Therefore this solution, although suboptimal, is a good initial waveform to interrogate the radar scene, but is unfortunately well known to suffer from poor modulus and sidelobe properties. Nonetheless, in certain exceptional cases and in the presence of clutter, this suboptimal solution is shown to be optimal, and is discussed at a later stage. The ensuing definitions and lemma proves useful subsequently. Lemma 2. (a) If vectors α, β and γ consist of the eigenvalues of the square but not necessarily Hermitian matrices, X∈ CN ×N , Y ∈ CM ×M and X⊗Y, respectively. Then γ = α⊗β. (b) Also, rank(X⊗Y) = rank(X)⊗rank(Y). Proof. For (a), let xi , i = 1, 2, . . . , N and yj , j = 1, 2, . . . , M are the eigenvectors corresponding to αi , βj i.e. the i-th and j-th eigenvalues, of X, Y, respectively. Then, from the mixed property of the Kronecker product, Xxi ⊗ Yyj = (X ⊗ Y)(xi ⊗ yj ) but the eigenvector relations imply that Xxi = αi xi , Yyj = βj yj . This implies that the ij-th eigenvalue of of X ⊗ Y is γij = αi βj with associated eigenvector xi ⊗ yj . Since the rank is equal to the number of non-zero eigenvalues for square matrices, the second follows directly from (a). Hence proved. Definition 1. (Convexity) A function f (x) : RN → R is convex if : (a) f (tx1 + (1 − t)x2 ) ≤ tf (x1 ) + (1 − t)f (x2 ) for any t ∈ [0, 1] (b) If f (x) is first order differentiable, then it is convex if f (xj ) ≥ f (xi ) + ∇xi f (xi )T (f (xj ) − f (xi )) where in (a)(b) xi ∈ RN , i = 1, 2, j = 1, 2, j 6= i. From our extensive simulations, we noticed that the original cost function in (17) is not jointly convex in w and s. Nevertheless, it is not straightforward to prove / disprove joint convexity w.r.t. both w and s analytically. Consider, then, the following propositions: Proposition 1. The objective function in (17) is individually convex w.r.t. s, for any fixed but arbitrary w CN → R depends on the waveform s, which is complex. Consider the following transformation2 , s = Ds̄ where s̄ ∈ R2N = [Re{s}T , Im{s}T ]T Proof. Definition 1 cannot be directly invoked as the objective g(s) = wH Ru (s)w : 2 Ideally one must decompose the function into real and imaginary components (as accomplished subsequently), but due to Hermitian symmetry, real valued-ness e.t.c., we take this shortcut, here, instead 12 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. and D = [IN , jIN ] ∈ CN ×2N . Now, we may define an equivalent g(s̄) : R2N → R to invoke the definition of convexity. We have to prove that,   Rn + Ri     pq w  Q w  X (IP ⊗ D(ts̄1 + (1 − t)s̄2 ))Rγ   + B̆q T H H q=1 (IP ⊗ (ts̄1 + (1 − t)s̄2 ) D )B̆q   Rn + Ri     Q ≤ twH  X w + pq T H H B̆ (I ⊗ Ds̄ )R (I ⊗ s̄ D )B̆ H q P 1 γ P 1 q q=1  Rn + Ri      Q + (1 − t)wH  X w + T H H B̆q (IP ⊗ Ds̄2 )Rpq γ (IP ⊗ s̄2 D )B̆q (25) q=1 where t ∈ [0, 1] and s̄i ∈ dom{g(s̄)}, i = 1, 2. After elementary algebra, the convexity requirement in (25) transforms to: Q X q=1 where xq ∈ CN P  pq T H xH xq ≥ 0 q Rγ ⊗ D(s̄1 − s̄2 )(s̄1 − s̄2 ) D (26) := B̆H q w. In other words, it is sufficient to show that iff (26) is true then (25) is also true and therefore convex. We notice immediately that (26) is a sum of Hermitian quadratic forms. Consider the matrix 3 T H pq Rpq γ ⊗ D(s̄1 − s̄2 )(s̄1 − s̄2 ) D , we know that Rγ  0 , since it is a covariance matrix and by definition atleast positive semi-definite (PSD). The other matrix, i.e. D(s̄1 − s̄2 )(s̄1 − s̄2 )T DH is of course rank-1 Hermitian, and is T H clearly PSD. From Lem. 2, it is straightforward to show that Rpq γ ⊗ D(s̄1 − s̄2 )(s̄1 − s̄2 ) D  0, ∀q. Then from the definition of positive semi-definiteness, each of the Q Hermitian quadratic forms in (26) is greater than zero, hence their sum is also greater than zero. Proposition 2. The objective function in (17) is individually convex w.r.t. w, for any fixed but arbitrary s. Proof. Given the guaranteed positive semi-definiteness of Ru (s), the proof is straightforward to demonstrate by invoking the convexity definition on the vector consisting of the real and imaginary parts of w. In fact, Prop. 1, Prop. 2 may be sharpened to include strong convexity, which, as we will show subsequently is desired for the solutions to exist, see the note immediately after (43). For now, however, individual convexity is sufficient to proceed with our analysis. 3 Here  is the Löwner partial order [58] 13 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. Remark 1. (Characteristic of STAP objective) The STAP objective in (17) has at most one minima for a fixed but arbitrary w ∈ ∀w ∈ C NML CN M L but ∀s ∈ CN . Likewise, it has at most one minima for a fixed but arbitrary s ∈ CN but This is concluded readily from Prop. 1, Prop. 2, i.e. the individual convexity. An illustrative example is provided in Fig. 3. Multiple Local Minima Minima characteristic of objective Minima not characteristic of objective w s Fig. 3: An illustrative non-convex example with multiple local minima. Contours in black are characteristic of the objective. Contours in blue violate convexity in the w, and s dimension individually, and are therefore not characteristic of the objective function. B. Constrained alternating minimization Motivated from Prop. 1, and Prop. 2, we propose a constrained alternating minimization technique which is iterative. Before we present details on this technique, consider the following minimization problem, which optimizes s, but for a fixed and arbitrary w: min wH Ru (s)w s. t. wH (v(fd ) ⊗ s ⊗ a(θt , φt )) = κ s sH s ≤ Po . (27) 14 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. In (27), the objective function could be rewritten as, wH Ru (s)w =wH (Rn + Ri )w + Q X q=1 (28) H H Tr{Rpq γ (IP ⊗ s )xq xq (IP ⊗ s)}. In (28), the trace operation is further simplified as: H H Tr{Rpq γ (IP ⊗ s )xq xq (IP ⊗ s)}   T H H T = vec Rpq (I ⊗ s )x x vec(IP ⊗ s) P q γ q H = sH HT (Rpq γ ⊗ xq xq )Hs = sH Zq (w)s where vec(IP ⊗ s) = Hs, with H ∈ RP 2 N ×N (29) = [H1 T , H2 T , . . . , HP T ]T . The matrix Hk ∈ RP N ×N , k = 1, 2, . . . , P is further decomposed into P , N × N matrices, and is defined such that the k-th N × N matrix is IN and the other (N − 1), N × N matrices are all equal to zero matrices. Remark 2. (a) At the very least, Q P q=1 Zq  0. (b) The matrix Zq  0 for P < N , always. (c) However, it may be positive definite, i.e. Zq  0 and hence Q P q=1 Zq  0 for P ≥ N and for Rpq γ  0. We note that (a) is readily implied from Prop. 1 since a Hermitian quadratic form xH Bx is convex (strictly H convex) iff B  0 ( B  0). Since Rpq γ ⊗ xq xq  0 always (≤ P non-zero eigenvalues and the rest are zeros) H and that P < N , in other words, the transformation HT (Rpq γ ⊗ xq xq )H : CP 2 N ×N × CP 2 N ×N → CN ×N and from the structure of H, the result (b) is obvious. For (c), we know that rank(H) = N , hence it could be shown after some tedious algebra that Zq may be PD only when P ≥ N and that Rpq γ is PD in the first place, also see for example [58, pg. 399]. Using (28) and (29), the Lagrangian of (27) is readily cast as, L(s, γ1 , γ2 ) = wH (Ri + Rn )w + Q X sH Zq (w)s (30) q=1 + Re{γ1∗ (wH Gs − κ)} + γ2 sH IN s − γ2 Po where γ1 ∈ C and γ2 ∈ R+ are the complex and real Lagrange parameters. Lagrange Dual: The Lagrange dual, denoted as H(γ1 , γ2 ) = inf L(s, γ1 , γ2 ). Since (30) consists of Hermitian s quadratic forms and other linear terms of s, we have H(γ1 , γ2 ) = L(so (γ1 , γ2 ), γ1 , γ2 ), where so (γ1 , γ2 ) is obtained by solving the first order optimality conditions, i.e. ∂L(s, γ1 , γ2 ) =0 ∂s (31) where, 0 is a column vector of size N and consists of all zeros. Further, in (31), while taking the derivative the 15 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. usual rules of complex vector differentiation apply, i.e. treat sH independent of s. The solution to (31) is readily obtained by differentiating (30), and expressed as: Q −1 γ1 X so (γ1 , γ2 ) = − Zq (w) + γ2 IN GH w. 2 q=1 (32) Using (32), the dual H(γ1 , γ2 ) is given by: H(γ1 , γ2 ) = wH (Ri + Rn )w − κRe{γ1∗ } − γ2 Po − Q −1 |γ1 |2 H X w G Zq (w) + γ2 IN GH w. 4 q=1 (33) Equation (33) is further simplified by decomposing, γ1 = γ1r + jγ1i . In which case, we notice that (33) is quadratic in γ1r , γ1i ,and purely linear in λ2 . The Lagrange dual optimization is therefore, H(γ1r , γ1i , γ2 ) max γ1r ,γ1i ,γ2 γ2 ≥ 0. s. t (34) Maximizing first w.r.t. γ1r , γ1i , we have the solutions, γ̄1r = −2κ , γ̄1i = 0. P −1 Q H H w G Zq (w) + γ2 IN G w q=1 Substituting the above solutions into (33), the Lagrange dual optimization problem and after ignoring an unnecessary additive constant, takes the form, Q −1  X −1 max κ2 wH G Zq (w) + γ2 IN GH w − γ 2 Po γ2 q=1 s. t. γ2 ≥ 0 (35) The associated Lagrangian for (35) is D(γ2 , γ) = where F := Q P κ2 wH GF−1 GH w − γ 2 Po − γ 3 γ 2 Zq (w) + γ2 IN . The first order optimality condition for the optimization (35) is given by: q=1  ∂ κ2 − Po − γ 3 = 0 H −1 H ∂γ2 w GF G w ∂F−1 H G w − Po − γ 3 = 0 ∂γ2 κ2 ∂F −1  H or wH G F−1 F G w − Po − γ 3 = 0 (wH GF−1 GH w)2 ∂γ2 or −κ2 (wH GF−1 GH w)2 wH G (36) 16 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. where γ3 is the Lagrange multiplier associated with the Lagrangian (36), and we also have ∂F ∂γ2 = IN . The complementary slackness and constraint qualifier for (35) i.e. γ3 γ2 = 0 and γ2 ≥ 0 form the rest of the equations comprising the KKT conditions. It is now readily shown that the solution to (35) is given by γ̄2 = max[0, γ2 ] (37)  γ2 solves γ2 κ2 wH GF−2 GH w − Po (wH GF−1 GH w)2 = 0. Proposition 3. The parameter γ̄2 = 0 solves (37). Proof. The spectral theorem for Hermitian matrices, allows for a decomposition, F = E(Λ+γ2 IN )EH . The matrix Λ is a diagonal matrix comprising eigenvalues in descending order, whereas, E is unitary and whose columns are the corresponding eigenvectors of F. For ease of exposition, denote z ∈ f (γ2 ) : R+ → R, expressed as CN := EH GH w, then assume a function f (γ2 ) := κ2 wH GF−2 GH w − Po (wH GF−1 GH w)2 !2 N N 2 2 X X |z | |z | n n = κ2 − Po (dn + γ2 )2 d + γ2 n=1 n=1 n (38) where zn , dn are the n-th elements of z, and the n-th eigenvalue in Λ. We analyze f (γ2 ) and γ2 f (γ2 ) in detail. The following (behavior at 0 and ∞) are readily observed lim f (γ2 ) = f (∞) = 0 (39a) γ2 →∞ N X N X |zn |2 dn n=1 |zn |2 lim f (γ2 ) = κ2 2 − Po γ2 →0 dn n=1 !2 = f (0) (39b) Furthermore, it is seen that df (γ2 ) f (γ2 ) dγ2 =0 = lim γ2 →∞ 1/γ2 γ2 →∞ (−1/γ 2 ) 2 (40) lim γ2 f (γ2 ) = lim γ2 →∞ Moreover, consider f (γ2 ) = h1 (γ2 ) − h2 (γ2 ) = 0, where h1 (γ2 ) = κ2 where fn (γ2 ) = |zn |2 dn +γ2 . N P n=1 2 fn (γ2 ) |zn |2 , h2 (γ2 ) = Po ( N P fn (γ2 ))2 , n=1 Note that f n(γ2 ) ↓, n = 1, 2, . . . , N and that hi (γ2 ) ↓, i = 1, 2, i.e. decreasing functions w.r.t. γ2 ∈ [0, ∞). Then equationf (γ2 ) = 0 implies that N X |zn |2 − Po κ (dn + γ2 )2 n=1 2 N X |zn |2 d + γ2 n=1 n N X !2 =0 X X κ2 or ( − Po )fn2 (γ2 ) = 2 fn1 (γ2 )fn2 (γ2 ) 2 |zn | n2 n n=1 1 (41) n2 6=n1 where (n1 , n2 ) ∈ (1, 2, . . . , N ). Recall that dn 6= 0∀n, dn ≥ dn+1 , n = 1, 2, . . . , N , and |zn | = 6 0∀n. A solution to (41) for γ2 ∈ [0, ∞) is readily derived in the trivial case, for example when fn1 (γ2 ) = fn2 (γ2 ), Po 6= κ2 , and for 17 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. h2 ( h1 ( 2) 2) or h1 ( or h2 ( 0 2 2) 2) ! Fig. 4: Two cases are presented assuming Po ≥ κ. (a) Blue: h1 (γ2 ), Red: h2 (γ2 ) and therefore f (γ2 ) is decreasing, (b) Blue: h2 (γ2 ), Red: h1 (γ2 ) and therefore f (γ2 ) is increasing. The blue and red curves intersect at ∞. |zn | to be some arbitrary constant for all n. For Po ≥ κ it may now be shown numerically that a solution to (41) for γ2 ∈ [0, ∞) does not exist. In fact, our extensive numerical simulations reveal that in general and assuming Po ≥ κ and for γ21 ≤ γ22   f (γ21 ) ≥ f (γ22 ) if f (0) > 0 γ21 and γ22 ∈ [0, ∞). (42)  f (γ21 ) ≤ f (γ22 ) if f (0) < 0 That is, f (γ2 ) is monotonic. From the above arguments, therefore, γ2 f (γ2 ) = 0 implies that γ2 = 0. Alternatively nevertheless, a solution to (37) may be found numerically and is computationally cheap. Note: (Inactive power constraint) It is noted that trivially γ̄2 = 0 may always be chosen as a solution with suitable choices of the free parameter Po . This implies that the power constraint is always satisfied and hence is an inactive constraint in the corresponding Lagrangian. A graphical behavior of hi (γ2 ), i = 1, 2 and thus the behavior of f (γ2 ) is seen from Fig. 4. Using Prop. 3, the waveform design solution is unique, a function of w and expressed as, P −1 Q κ Zq (w) GH w so (w) = q=1 P Q wH G . −1 H Zq (w) G w (43) q=1 Note: (Strong convexity) To compute the constrained alternating minimization solutions, the respective matrices in (43), (18) must be invertible, implying strong convexity individually w.r.t. w, s, respectively. This directly P  Q necessitates, λmin Zq (w) 6= 0 and λmin (Ru (s)) 6= 0, and hence also, positive definiteness of these matrices. q=1 The alternating minimization algorithm is now succinctly stated in Table I. 18 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. Remark 3. (Strong duality) The optimal value of the lagrange dual problem is given by wH (Ri + Rn )w + κ2 . P −1 Q H H w G Zq (w) G w q=1 It is therefore trivial to show that the duality gap between (27) and (34) is zero. In other words, strong duality holds between the primal in (27) and the dual in (34). From Slaters condition [60] the sufficient condition to ensure Q P strong duality is the existence of (43), i.e. the inverse of Zq (w) exists (see note below), and that the solution q=1 in (43) satisfies the power constraint. Note: (Lower bound on Q) Since rank( Q P q=1 Zq (w)) ≤ Q P rank(Zq (w)), assume the worst case P = 1, then we q=1 have that rank(Zq ) = 1. Therefore for Q distinct (different spatial signature and Doppler) clutter patches, Q ≥ N P ensures invertibility of Zq . q TABLE I: Constrained alternating minimization for waveform adaptive radar STAP 1) Initialize: Start with an initial waveform design, (0) defined as so , set counter k = 1 2) Filter design: Design the optimal filter weight (k) (k−1) vector, wo = wo (so ), where (18) is used to compute wo (·). 3) Waveform design: Design the updated waveform (k) (k) so = so (wo ), where (43) is used to compute so (·). 4) Check: If convergence is achieved, exit, else k = k + 1, go back to step-2. 1) Convergence, performance guarantees, and other properties: Denote (wk , sk ) as the sequence of iterates of the algorithm in Table I and define g(wk , sk ) := wk Ru (sk )wkH , then for k = 1, 2, . . . · · · g(wk , sk−1 ) ≥ g(wk , sk ) ≥ g(wk+1 , sk ) · · · . (44) Moreover, since at least Ru (s)  0, i.e. PSD ∀s, we have that g(w, s) ≥ 0, ∀w. Therefore each of the individual terms in (44) are lower bounded by zero, in other words g(wk1 , sk2 ) ≥ 0, k1 = k, or k + 1 and k2 = k, or k + 1, for k = 1, 2, . . . . Proposition 4. Iff the iterates (wk , sk ) of the constrained alternating minimization exist, then lim g(wk , sk ) is k→∞ finite. Proof. The non-increasing property in (44), and since each term in (44) is lower bounded, straightforward application of the monotone convergence theorem to the sequence, {g(wk , sk )},completes the proof. 19 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. We note that convergence to a finite limit as evidenced from Prop. 4 is indeed dependent on the constraints via the existence of the iterates (wk , sk ). This however does not imply convergence of the sequence {(wk , sk )}, for which, consider the following. Remark 4. The alternating minimization is a special case of the block Gauss-Siedel and block co-ordinate descent (BCD) algorithm with block size equal to two [12], [15]. Definition 2. (Convergence in if, ∀ > 0, ∃K ∈ N: RN ) A sequence {xk } ∈ RN , k = 1, 2, . . . is said to converge to x̃, a limit point, ||xk − x̃|| ≤ , k > K. Lemma 3. (Constrained alternating minimization lemma) Assume that a function g(z) : R2N → R, z = [xT , yT ]T is continuously differentiable over a closed nonempty convex set, A = A1 × A2 . Also, suppose the solution to the constrained optimization problems, min g(x, y) and min g(x, y) are uniquely attained. Let {zk } be the sequence x∈A1 y∈A2 generated by this algorithm, then every limit point of this sequence is also a stationary point. Proof. The proof in [14, Prop. 2.7.1] follows immediately to the alternating minimization assuming two blocks. Also see [15], where the convergence of the two block BCD was analyzed. The above Lem. 3 discusses convergence of the constrained alternating minimization.This lemma can be applied by decomposing our problem into its real equivalent along-with real and imaginary decomposition of w, s, and assuming the our constraint set A = A1 × A2 is closed convex and the minimizers are unique. The necessary condition of a unique minimizer [10] at each step is not obvious, but [9] showed that in the absence of this assumption the algorithm cycles endlessly around a particular objective value [14]. Further the algorithm provides limit points which are not stationary points [15]. To discuss the characteristics of the limits points at convergence, consider the remark, presented next. Remark 5. (Characterizing the solutions at convergence) If (w? , s? ) are the limit points of the sequence {(wk , sk )}. p Then, (w? , s? ) is a local minima, i.e. by definition g(w? , s? ) ≤ g(w, s),∃ > 0 with (w, s) : ||w − w? ||2 + ||s − s? ||2 ≤ . Further, (w? , s? ) : g(w? , s? ) ≤ g(w? , s), ∀s ∈ A2 and g(w? , s? ) ≤ g(w, s? ), ∀w ∈ A1 . The first statement in Rem. 5 directly results from from the stationarity condition as given in Lem. 3 and also since the objective is non-convex. The second statement in Rem. 5 arises from the individual convexity in w and s as shown in Prop. 1, Prop. 2. We note readily from Rem. 1, that unfortunately there is nothing special or strong about (w? , s? ) except the fact that they are local minima. It is well known that global extrema (minima or maxima) are attained only when the objective is either convex or concave. For a problem similar to ours and where the alternating minimization was applied, see [33, pg.3537] the authors state that their algorithm produces limit points which are stronger than local maxima, in our opinion this conclusion is suspect. They further claim that their algorithm produces global extrema in their filter design and waveform dimensions individually, which leads us to believe that their objective is concave, although this was never proved in [33]. In our opinion, Rem. 1 is also relevant to their objective by replacing minima by maxima, and hence we do not believe that the limit points produced by their algorithm are stronger than local extrema. 20 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. To derive the upper and lower bounds on g(wk , sk ) − g(wk+1 , sk ), the following well known lemmas are useful. Lemma 4. For any Hermitian matrix, A ∈ CN ×N and any arbitrary vector x ∈ CN ×N , we always have λmin (A)||x||2 ≤ xH Ax ≤ λmax (A)||x||2 , where λmin (A) and λmax (A) are the min. and max. eigenvalues of matrix A, respectively. Proof. The proof can be seen in [58], and is in fact fundamental to the Rayleigh-Ritz theorem. Lemma 5. For any two Hermitian matrices, A, B, both in N X i=1 CN ×N , λi (A)λN −i+1 (B) ≤ Tr{AB} ≤ N X λi (A)λi (B) i=1 where λi (·) ≥ λi+1 (·), i = 1, 2, . . . , N . Proof. See [61, Lemma. II. I] for a proof. Consider g(wk , sk ), we have g(wk , sk ) = wkH Ru (sk )wk = (wk − wk+1 + wk+1 )H Ru (sk )(wk − wk+1 + wk+1 ) = (wk − wk+1 )H Ru (sk )(wk − wk+1 ) (45) H + wk+1 Ru (sk )wk+1 + Re{(wk − wk+1 )H Ru (sk )wk+1 } 1/2 1/2 Moreover since the square root decomposition exists i.e., Ru (·) = Ru (·)Ru (·), then application of the CauchySchwartz inequality produces, Re{(wk − wk+1 )H Ru (sk )wk+1 } ≤ q q H R (s )w (wk − wk+1 )H Ru (sk )(wk − wk+1 ) wk+1 u k k+1 (46) Using (46) in (45) and since Ru (·) is PSD, we can show that g(wk , sk )−g(wk+1 , sk ) ≤ (wk −wk+1 )H Ru (sk )(wk − wk+1 ). Further using (44), we have the following upper and lower bounds 0 ≤ g(wk , sk ) − g(wk+1 , sk ) ≤ (wk − wk+1 )H Ru (sk )(wk − wk+1 ) (47) We notice immediately, that at convergence (wk − wk+1 )H Ru (sk )(wk − wk+1 ) → 0 since wk → wk+1 . Other bounds as in (47) can be readily derived. From Lem. 4, we can show that ≤ λmin (Ru (sk ))||wk ||2 − λmax (Ru (sk ))||wk+1 ||2 g(wk , sk ) − g(wk+1 , sk ) (48) 21 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. ≤ λmax (Ru (sk ))||wk ||2 − λmin (Ru (sk ))||wk+1 ||2 . Consider the following. Lemma 6. If x, y are arbitrary but distinct complex vectors of size N and let A := xxH − yyH , then, (a) matrix A has exactly two real non-zero eigenvalues, the rest N − 2 eigenvalues are all zeros, (b) of the two real and non-zero eigenvalues one is always positive and the other is always negative, and (c) if the x, y are not distinct, i.e. y = βx, β ∈ C, then there exists only one non-zero eigenvalue, (|1 − |β|2 |)||x||2 and the rest N − 1 eigenvalues are purely zeroes. Proof. First of all we notice A is Hermitian and hence its eigenvalues are real. The proof for (a) is obvious given the fact that A is a sum of two distinct outer products. In other words, rank(A) = 2, for all y 6= βx . Now we know that Tr{A} = λ1 + λ2 = xH x − yH y Tr{AAH } = λ21 + λ22 = ||x||4 + ||y||4 − 2|xH y|2 where λi , i = 1, 2 are the two non zero eigenvalues of A. The above set of equations can be reduced to a quadratic in any one eigenvalue. It can be shown that the only two possible solutions are then s ! ||x||2 − ||y||2 |xH y|2 − ||x||2 ||y||2 λ1 = 1+ 1−4 2 (||x||2 − ||y||2 )2 s ! ||x||2 − ||y||2 |xH y|2 − ||x||2 ||y||2 1− 1−4 λ2 = 2 (||x||2 − ||y||2 )2 H 2 2 (49) 2 y| −||x|| ||y|| Since λi , i = 1, 2 are purely real we have, 1 − 4 |x(||x|| ≥ 0 and from Cauchy Schwarz inequality, we also 2 −||y||2 )2 have that |xH y|2 − ||x||2 ||y||2 ≤ 0. Using these two facts, consider two specific cases, both of which are shown easily from elementary algebra,   λ1 > 0, λ2 < 0, if ||x||2 − ||y||2 ≥ 0 When ||x||2 − ||y||2 = 0, it is easily seen that λ1 = . (50) if ||x||2 − ||y||2 < 0  λ1 < 0, λ2 > 0, p ||x||2 ||y||2 − |xH y|2 > 0, λ2 = −λ1 < 0. We also note immediately from (49) that when, y = βx, λ1 = (1 − |β|2 )||x||2 , λ2 = 0. This completes the proof. H It is readily shown that g(wk , sk ) − g(wk+1 , sk ) = Tr{Ru (sk )(wk wkH − wk+1 wk+1 )}. Therefore, from Lem. 5, and Lem. 6, we have,  H ≤ λmax Ru (sk ) λ− (wk wkH − wk+1 wk+1 )  H + λmin Ru (sk ) λ+ (wk wkH − wk+1 wk+1 ) g(wk , sk ) − g(wk+1 , sk ) (51) 22 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014.  H ≤ λmax Ru (sk ) λ+ (wk wkH − wk+1 wk+1 )  H + λmin Ru (sk ) λ− (wk wkH − wk+1 wk+1 ) It is not immediately evident from the analysis which set of bounds in (47), (48), (51) are tight, hence combining them we have max   1 2   glb  (Ru (sk ), wk , wk+1 ), glb (Ru (sk ), wk , wk+1 ),  3 glb (Ru (sk ), wk , wk+1 )    ≤ g(wk , sk ) − g(wk+1 , sk ) ≤   1 2   gub  (Ru (sk ), wk , wk+1 ), gub (Ru (sk ), wk , wk+1 ), min   3  gub (Ru (sk ), wk , wk+1 )  i i where glb (Ru (sk ), wk , wk+1 ), gub (Ru (sk ), wk , wk+1 ), i = 1, 2, 3 are the lower and upper bounds as given in (47)-(48), (51), for i = 1, 2, 3, respectively. Similar upper and lower bounds can be readily derived for the other corresponding terms, g(wk+1 , sk ) − g(wk+1 , sk+1 ) using analysis presented thus far, and is not the focus now. Let us however denote these corresponding lower and upper bounds to be hilb (Ru (sk ), wk , wk+1 ), hiub (Ru (sk ), wk , wk+1 ), i = 1, 2, 3. C. Constrained proximal alternating minimization The proximal version of the constrained alternating minimization is iterative, and for the filter design step, optimizes at the k-th iteration, wH Ru (sk−1 )w + s. t wH (v(fd ) ⊗ sk−1 ⊗ a(θt , φt )) = κ w where αk−1 ∈ αk−1 ||w − wk−1 ||2 2 min (52) R+ can be seen as a weight attached to the regularizer / penalizer ||w − wk−1 ||2 . This parameter can be interpreted as follows, if it is small, it encourages the optimizer to look for viable solutions in the vicinity of wk−1 . However, if large, it penalizes the optimizer heavily for focusing even slightly in the immediate vicinity of wk−1 . In a similar spirit, the proximal version of the constrained alternating minimization for the waveform design step at the k-th iteration optimizes, βk−1 ||s − sk−1 ||2 2 min wkH Ru (s)wk + s. t. wkH (v(fd ) ⊗ s ⊗ a(θt , φt )) = κ s sH s ≤ Po (53) 23 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. (sk , wk+1 ) (sk , wk ) w (sk , wk+1 ) (sk , wk ) (sk+1 , wk+1 ) (sk+1 , wk+1 ) w Constraint set Constraint set s Constrained alternating minimization s Constrained Proximal alternating minimization Fig. 5: Constrained alternating minimization (left) and proximal constrained alternating minimization (right). Iso level contours (each point on a curve has identical function values) and constraint set in background are shown. Outer iso-curves assume higher function values than the inner iso-curves. On right, and for particular αk , βk , spheres (dashed, blue, dashed red) are the (two of the several) spheres of influence of the regularizer. Outer spheres penalize more than the inner. where βk−1 ∈ R+ is the weight attached to the regularizer ||s − sk−1 ||2 . Bounds on αk−1 , βk−1 relating it to the Lipschitz constants are deferred to forthcoming analysis. A graphical example comparing the constrained alternating minimization and the proximal constrained alternating minimization is shown in Fig. 5. Remark 6. The objective functions in (52), (53) are still individually convex in w, s, respectively. The regularizer terms ||w−wk−1 ||2 and ||s−sk−1 ||2 are strongly convex, and ∇2w (||w−wk−1 ||2 ) = I  0, ∇2s (||s−sk−1 ||2 ) = I  0, and therefore do not alter the individual convexity of wH Ru (sk−1 )w and wkH Ru (s)wk , w.r.t. w, s, respectively. The solutions to (52), (53) can be cast in terms of the proximal operator as wk =prox(αk−1 ,w) g(w, sk−1 ); wk−1  (54) s. t wH (v(fd ) ⊗ sk−1 ⊗ a(θt , φt )) = κ sk =prox(βk−1 ,s) g(wk , s); sk−1  s. t. wkH (v(fd ) ⊗ s ⊗ a(θt , φt )) = κ sH s ≤ Po (55) P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. where, for a general f (x) : 24 CN → R, the proximal operator is defined as  α prox(α,x) f (x); y := arg min f (x) + ||x − y||2 . 2 x (56) The proximal operator has a rich history in the literature, and well documented properties, see for example [20]–[22], [24]. A useful and interesting fact of this operator is that iff xo minimizes f (x) then xo = prox(α,x) (f (x); xo ), a proof is seen in [24]. Trust region interpretation. The objective now is to relate the unconstrained proximal minimization as in (56) to a well known technique in numerical optimization. A generalized trust region subproblem can be formulated for f (x) : CN → R [62] min f (x) x s. t. ||Ux − v||2 ≤ δ (57) where U, v are a general nonsingular matrix, and a vector, both characterizing the trust region. The positive scalar δ may be interpreted as a parameter which specifies the extent of the trust region. For U = I and v = y, the proximal minimization as in (56) and the trust region problem in (57) are equivalent for specific values of α and δ. In particular every solution of (56) is a solution to (57) for a particular δ. In the same spirit, every solution to (57) is an unconstrained minimizer to f (·) or a solution to (56) for a particular α, see also [22], [24]. The proximal optimizations problems, (52), (53) can be cast as equivalent constrained trust region subproblems, where for the k-th iteration, the trust region is characterized by the previous iteration, wk−1 , sk−1 , respectively. Closed form: A closed form solution to (52) is readily derived, expressed as in (58)  αk−1 −1 αk−1 γ∗ I wk−1 − 4 v(fd ) ⊗ sk−1 ⊗ a(θt , φt ) 2 2 2  αk−1 −1 H I v(fd ) ⊗ sk−1 ⊗ a(θt , φt ) − 2κ αk−1 wk−1 Ru (sk−1 ) + 2 γ4 =  H αk−1 −1 I v(fd ) ⊗ sk−1 ⊗ a(θt , φt ) v(fd ) ⊗ sk−1 ⊗ a(θt , φt ) Ru (sk−1 ) + 2 wk = Ru (sk−1 ) + (58) where γ4 is the Lagrange parameter associated with (52). The solution to (53) is also in closed form and the procedure to obtain it is similar to that used in deriving (43). Assuming that the Lagrange parameters for (53) are γ5 = γ5r + jγ5i , γ6 ∈ R+ , the solution is expressed in (59), sk = Q X q=1 Zq (wk ) + −1 βk−1  βk−1 γ5 I + γ6 I sk−1 − GH wk 2 2 2 (59) 25 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. where, ( βk−1 2 Re γ5r = 2 wkH G wkH G Zq (wk ) + q=1 Q P wkH G γ5i = Zq (wk ) + q=1 Q P ( βk−1 Im Q P wkH G Q P βk−1 2 I βk−1 2 I Zq (wk ) + q=1 −1 + γ6 I sk−1 + γ6 I βk−1 2 I −1 + γ6 I ) −κ GH wk −1 ) sk−1 . Zq (wk ) + q=1 βk−1 2 I −1 + γ6 I GH wk The Lagrange parameter γ6 is obtained by solving, the following γ6 r(γ6 ) = 0, γ6 ≥ 0 (60) obtained from the complementary slackness constraint on the Lagrange dual and where, r(γ6 ) = (Po − −2 bi  2 Q 2 X −1 H βk−1 βk−1 ak ) wkH G Zq (wk ) + I + γ6 I G wk 4 2 q=1 Q X −1 H dbr  H βk−1 dbi + (br − κ) wk G Zq (wk ) + I + γ6 I G wk dγ6 dγ6 2 q=1 −(b2i + (br − κ)2 )wkH G Q X Zq (wk ) + q=1 −2 H βk−1 I + γ6 I G wk . 2 Where we also define ak =sH k−1 Q X q=1 Zq (wk ) + −1 βk−1 I + γ6 I sk−1 2 ( ) Q X −1 βk−1 βk−1 H br = Re wk G Zq (wk ) + I + γ6 I sk−1 2 2 q=1 ( ) Q X −1 βk−1 βk−1 H Im wk G Zq (wk ) + I + γ6 I sk−1 bi = 2 2 q=1 Further, since the derivative, Re{·}, Im{·} are all linear we also have ( ) Q X  dbr βk−1 β −2 k−1 =− Re wkH G Zq (wk ) + I + γ6 I sk−1 dγ6 2 2 q=1 ( ) Q X −2 dbi βk−1 βk−1 H =− Im wk G Zq (wk ) + I + γ6 I sk−1 . dγ6 2 2 q=1 Remark 7. In general r(γ6 ) is not monotone and there exist one or more zero crossings excluding γ6 = ∞. However in our extensive numerical simulations, and assuming Po >> κ2 , γ6 = 0 solves (60). It is readily seen that lim r(γ6 ) = r(0) 6= 0, lim r(γ6 ) = 0, lim γ6 r(γ6 ) = 0. Nevertheless unlike Prop. 3, γ6 →0 γ6 →∞ γ6 →∞ Rem. 7 is not straightforward to demonstrate analytically, however can be shown numerically. See Section IV for 26 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. some demonstrative examples not specific to the radar problem. The value of γ6 = 0 is substituted in (59) to obtain the final waveform solution sk (·). Remark 8. (Strong duality) The primal problem, (53) and its associated dual have zero duality gap. This is straightforward but tedious to show. However we provide the optimal values attained by the primal as well as the dual, given below, wkH (Ri + Rn )wk + s∗H k Q X Zq (wk ) + q=1 + βk−1 −1 ∗ sk I 2 βk−1 ||sk−1 ||2 − βk−1 Re{s∗H k sk−1 } 2 (61) where using (59), Prop. 7, Q X βk−1 −1 βk−1 γ5 Zq (wk ) + I) ( sk−1 − GH wk ) s∗k = ( 2 2 2 q=1 βk−1 wkH G( Q P Zq (wk ) + q=1 γ5 = Q P wkH G( Zq (wk ) q=1 + βk−1 −1 sk−1 2 I) − 2κ . βk−1 −1 H G wk 2 I) This is not surprising since it is similar to Rem. 3. However, in this case the condition on the existence of the matrix is irrelevant, since the inverse in (59) always exists. Hence Slater’s condition now is a simple constraint qualifier (the power constraint) which must be satisfied as in Rem. 3. Interpretation with specific ranges of αk−1 , βk−1 and related to the Lipschitz constants. Some definitions and lemmas are useful for future discussions and are expressed below RN → R has a Lipschitz constant (and trivially real positive), L, when ||∇x̄ f (x̄) − ∇ȳ f (ȳ)|| ≤ L||x̄ − ȳ||, and ∀x̄, ȳ ∈ RN . Definition 3. (Lipschitz continuous gradient) A function f (x̄) : Note: (upper bound on Hessian ) If f (x̄) has a Lipschitz continuous gradient, with constant L, then using Taylor’s theorem, it can be proved that ∇x̄2 f (x̄)  LI. Remark 9. The Lipschitz constant for f (x̄) = x̄T B̄x̄ is the maximum eigenvalue of B̄, i.e. λmax (B̄), where B̄ ∈ RN ×N , x̄ ∈ RN . This is readily seen since ∇x̄ x̄T B̄x̄ = B̄x̄. Further since the induced (by an arbitrary z̄ ∈ RN ) spectral norm (notation: ||| · |||) is defined as |||B̄||| := sup{ z̄ ||B̄z̄|| : z̄ ∈ ||z̄|| RN , z̄ 6= 0}, ||B̄z̄|| = p z̄T B̄T B̄z̄ but we know from Lem. 4 that z̄T B̄z̄ ≤ λmax (B̄)||z̄||2 and that eigenvalues of B̄ and B̄T are identical. This further implies that z̄T B̄T B̄z̄ ≤ λ2max (B̄)||z̄||2 . Therefore from Definition 3, it is readily seen that the Lipschitz constant is the maximum eigenvalue of B̄. 27 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. Lemma 7. (Descent lemma) If f (x̄) : RN → R is continuously differentiable and has a Lipschitz continuous gradient described by constant L, then f (x̄) ≤ f (ȳ) + ∇ȳ f (ȳ)T (x̄ − ȳ) + 2L ||x̄ − ȳ||2 . Proof. See [14, Prop. A.24] and also [17, Lem2.2] relevant in general for the BCD. Consider an arbitrary g(x) := xH Bx, and B = BH , x ∈ could be defined as ḡ(x̄) := x̄T B̄x̄ where   Re{B} −Im{B} ∈ B̄ :=  Im{B} Re{B} R2N ×2N , CN . Since g(x) : CN → R, a real equivalent of g(x) x̄ = [Re{x}T Im{x}T ]T ∈ R2N . R2N ×2N and  B0 B0  ∈ C2N ×2N have identical eigenvalues, λ̃i , i = 1, 2, . . . , 2N . Moreover, if B is Hermitian, then λ̃i ∈ R+ , i = 1, 2, . . . , 2N are equal to twice the multiplicity of the eigenvalues of B ∈ CN ×N . Lemma 8. The matrix B̄ := h Re{B} −Im{B} Im{B} Re{B} i ∈ ∗ Proof. Owing to the complex to real-real isomorphism, it can be shown after algebraic manipulations that     B 0 jI I   = PH B̄P, P = √1   , PH = P−1 . ∗ 2 0 B I jI That is (62) indicates that B̄ and B 0 0 B∗  (62) are unitary equivalent. Therefore they share the same eigenvalues. Furthermore if B is Hermitian its eigenvalues are purely real, and hence trivially, the eigenvalues of B, B∗ are identical, and their eigenvectors are complex conjugates of one another. Hence the block diagonal matrix has identical eigenvalues as B but with multiplicity two. Consider the objective in (52), (53). Define ḡ(w̄, s̄k−1 ), ḡ(w̄k−1 , s̄k−1 ) as the real equivalents of g(w, sk−1 ), g(wk−1 , sk−1 ), respectively for the filter design objective as in (52). In addition, denote L1k−1 as the Lipschitz constant associated with ḡ(w̄k−1 , s̄k−1 ). Similarly using the same notation and for the objective in the waveform design objective as in (53) consider the real equivalents, ḡ(s̄, w̄k ), ḡ(s̄k−1 , w̄k ) and the Lipschitz constant denoted as L2k−1 . Then the following inequalities can now be shown. L1k−1 ||w̄k−1 − w̄||2 ≥ ḡ(w̄k−1 ) 2 L1k−1 +∇ḡ(w̄k−1 )T (w̄ − w̄k−1 ) + ||w̄k−1 − w̄||2 ≥ ḡ(w̄) 2 (63) L2k−1 ||s̄k−1 − s̄||2 ≥ ḡ(s̄k−1 ) 2 L2k−1 ||s̄k−1 − s̄||2 ≥ ḡ(s̄) +∇ḡ(s̄k−1 )T (s̄ − s̄k−1 ) + 2 (64) ḡ(w̄) + ḡ(s̄) + where in (63), the known’s s̄k−1 and in (64), the known’s w̄k are respectively treated as constants, therefore suppressed in notation for brevity. We further note that (63), (64) are tight, i.e. for w̄k = w̄k−1 , s̄k = s̄k−1 the inequalities are strict equality’s. The Lipschitz constants, L1k−1 , L2k−1 are readily derived using Lem. 8. 28 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. Remark 10. It is readily seen that if αk−1 ≥ L1k−1 and β2k−1 ≥ L2k−1 the inequalities in (63), (64) are valid by replacing L1k−1 , L2k−1 with αk−1 , βk−1 , respectively. The term in the first inequalities of (63), (64) are the proximal minimization objectives with αk−1 = L1k−1 , βk−1 = L2k−1 . The inequalities of (63), (64) are obtained from first applying the convexity Def. 1(b) (first order definition) and then subsequently adding the respective terms L1k−1 2 ||w̄k−1 − w̄||2 , L2k−1 2 ||s̄k−1 − s̄||2 and then using Lem. 7, the descent lemma. Additionally, it is recalled that the functions associated with the second inequalities of (63), (64) are the (unconstrained) objectives which are minimized by the gradient descent with step size L1k−1 , L2k−1 , respectively. That is, the new iterations are then w̄k = w̄k−1 − 1 L1k−1 ∇w̄ ḡ(w̄), and s̄k = s̄k−1 − 1 L2k−1 ∇s̄ ḡ(s̄). Therefore from (63), (64) and Rem. 10 we note that the proximal objective, the gradient descent objective are all surrogate albeit tight upper bounds on the true objective ∀αk−1 ≥ L1k−1 and ∀βk−1 ≥ L2k−1 . This interpretation is graphically depicted in Fig. 6 for the filter design objective as in (52) but for αk−1 = L1k−1 . A similar graphic interpretation is obvious for the waveform design stage and is therefore not shown. Tikhonov interpretation This interpretation is immediate from (58), (59). In fact from (52), (53), the quadratic regularizers ||w − wk−1 ||2 , ||s − sk−1 ||2 are essentially Tikhonov regularization terms. Geometrically they are spheres centered at wk−1 , sk−1 and encourage the current iterates to be in the vicinity of the previous iterates. Furthermore, since in the limit, the regularizer terms only decrease, this may be also seen as a vanishing Tikhonov regularization problem [24] for each iteration in both the waveform and the filter vectors. Proximal minimization: A training data starved STAP solution The regularization in (52), (53) leads to diagonally loaded solutions (58), (59) when compared to the constrained alternating minimization solutions as in (18) and (43). In particular, the diagonal loading serves two important purposes, firstly it offers a numerically stable solution by conditioning . Secondly and more importantly, it permits a weight vector solution when rank(Ru (s)) ≤ N M L. Practical STAP contends with rank deficient correlation matrices due to lack of sufficient training data from neighboring range cells due to outlier contamination or heterogeneity in the data. The solution in (52) ameliorates over the training data starved STAP scenarios. So far, we have considered the algorithms for waveform design without enforcing constraints such as const. modulus or sidelobe constraints. The minimum eigenvector solution belongs to this class of unconstrained waveform design. We will revisit this design by considering (19) and Lem. 4. Remark 11. The min. eigenvector solution in (20) is still optimal in the presence of clutter, provided Ri + Rn and Rc (s) share the same eigenvector corresponding to their min.eigenvalues, but with λmin (Rc (s)) = 0, always. This is readily seen since the optimization in (19), ignoring the constraint for now could be recast as max(v(fd )⊗ s s ⊗ a(θt , φt ))H R−1 u (s)(v(fd ) ⊗ s ⊗ a(θt , φt )). Now using Woodbury’s identity [63], we have (Ri + Rn + Ru (s))−1 = (Ri + Rn )−1 −1 −(Ri + Rn ) Rc (s) I + (Ri + Rn ) −1 Rc (s) −1 (65) −1 (Ri + Rn ) . 29 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. ḡ(w̄k 1) ḡ(w̄k + 1) L1k ||w̄k 2 1 w̄k ||2 + rḡ(w̄k 1 )T (w̄k w̄k L1k + ||w̄k 1 w̄k ||2 2 1) ḡ(w̄) ḡ(w̄k 1) ḡ(w̄k ) w̄k 1 w̄k Fig. 6: Upper bounds on the objective for the proximal algorithm w.r.t. the filter design. A similar graphical interpretation for the waveform design but with L2k−1 is also easy depicted but not shown here. Further using the eigenvector relations, (Ri + Rn )(v(fd ) ⊗ s ⊗ a(θt , φt )) = λmin (Ri + Rn )(v(fd ) ⊗ s ⊗ a(θt , φt )) and Rc (s)(v(fd ) ⊗ s ⊗ a(θt , φt )) = λmin (Rc (s))(v(fd ) ⊗ s ⊗ a(θt , φt )) = 0 in (65), it is readily seen that (v(fd ) ⊗ s ⊗ a(θt , φt ))H (Ri + Rn + Ru (s))−1 )(v(fd ) ⊗ s ⊗ a(θt , φt )) = λ−1 min (Ri + Rn ). The simplest example where Rem. 11 is satisfied is when the noise correlation matrix is scaled identity (may not be practical for narrowband radar), clutter correlation matrix is low rank. In STAP and for ideal scenarios, insights to the clutter rank are obtained by the Brennan’s rule [1]–[3]. A high clutter rank prevails due to the practical effects such as, the intrinsic clutter motion,velocity misalignment and crabbing, mutual coupling and antennae element mismatches as well as clutter ambiguities in Doppler resulting in aliasing [2]. D. Constant modulus alternating minimization So far, the optimization problems had no specific constraints (except the power/energy constraint) on the waveform, constant modulus is a desirable property to have in a waveform [64]. The optimum weight vector is unchanged by introducing the const. modulus constraint, and is identical to (18) for the constrained alternating minimization 4 . 4 The analysis of the proximal constrained alternating minimization with the const. mod. constraint is omitted, but can be readily derived from the analysis of its non-proximal counterpart, presented here. 30 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. Since the optimization w.r.t. weight vector is unchanged, we only treat the optimization for s but with the const. mod. constraint for a fixed but arbitrary w, formulated below min wH Ru (s)w s. t. wH (v(fd ) ⊗ s ⊗ a(θt , φt )) = κ s (66) |si | = ρ, i = 1, 2, . . . , N. where si is the i-th component in s. Unlike say (17), notice that in (66), constraining the power of the waveform is unnecessary since ρ is fixed but could be chosen arbitrarily to scale up / down the waveforms energy to satisfy hardware limitations. Therefore, the last N constraints in (66) implicitly impose the power requirements, but more importantly also impose the constant modulus constraint. The Lagrangian of (66) is expressed as L(s, γ7 , γ 5 ) = wH Ru (s)w + Re{γ7∗ (wH Qs − κ)} + sH Dγ s − ρ1T γ 8 where the Lagrange parameter, γ7 ∈ (67) C, and the Lagrange parameter vector γ 8 = [γ81 , γ82 , . . . , γ8N ]T ∈ RN are for the Capon constraint and the N const. mod. constraints, respectively. Furthermore in (67), define Dγ = " # γ81 .. , i.e. a diagonal matrix. The KKT conditions are expressed as . γ8N κ so (w) = Q P Zq (w) + Dγ −1 GH w q=1 wH G Q P (68a) Zq (w) + Dγ −1 GH w q=1 |soi (w)| = ρ, i = 1, 2, . . . , N. (68b) The waveform which simultaneously satisfies (68)(a)(b) is the solution. Moreover, note that (68)(a)(b) are 2N nonlinear equations with 2N unknowns. The first N unknowns are soi (w), i = 1, 2 . . . , N and the next N unknowns are the Lagrange parameters γ8i . Unfortunately, (68) is not in closed form but can be solved numerically for the N parameters, γ8i , i = 1, 2, . . . , N via a numerical root finder. Nonetheless we note that γ8i ∈ (−∞, ∞) and a reasonable initialization point is not forthcoming for the numerical root finding. Eliminating the constant modulus constraints Instead of solving the 2N non-linear equations as in (68)(a)(b), we take an alternative approach. One may reformulate the optimization (66) by eliminating the last N constraints, by imposing a structure on s, namely, si = ρ exp(jαi ). Other structures exists but from our experience, complex exponentials are the easiest to manipulate. The new optimization problem is now w.r.t. α = [α1 , α2 , . . . , αN ]T ∈ RN , expressed as min α wH Ru (s)w 31 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. wH (v(fd ) ⊗ s ⊗ a(θt , φt )) = κ s. t. (69) where in, s = ρ[exp(jα1 ), exp(jα2 ), . . . , exp(jαN )]T and αi ∈ [0, 2π), i = 1, 2, . . . , N . The Lagrangian corresponding to (69) is L(α, γ9 ) = wH Ru (s)w + Re{γ9∗ (wH Gs − κ)}. The KKT’s are expressed as, ∂L(α,γ9 ) ∂α (70) = 0 and wH Gs = κ. Noting that α is purely real, we have Q X ∂L(α, γ9 ) = −j Zq s ∂α q=1 s +j Q P q=1 Z∗q s∗ Z∗q s∗ s (71) q=1 +Im{γ9∗ (wH G)T The above equation can be simplified as, Im{ Q X ∗ s− s} = 0. γ9∗ H T 2 (w G) s}. Using this in (71), and taking the complex conjugate, while absorbing the negative sign into the constant γ9 5 , we have the KKTs in final form expressed as ( Im Q X γ9 Zq (w)so + GH w 2 q=1 ! ) s∗o =0 (72a) wH Gso = κ (72b) where 0 is a column vector of all zeros and of dimension N . The optimal solution, so , is a function of the optimal αo . This relationship although evident from (69) is not explicitly stressed in (72) for notational succinctness. Q P Define ZQ := Zq (w) and let zij , i = 1, 2, . . . , N, j = 1, 2 . . . , N be the ij-th element of ZQ . Noting that ZQ q=1 ∗ is Hermitian, we also have Im{zii } = 0, ∀i, zji = zij . Proposition 5. The Lagrange parameter γ9 = 0 solves (72). Proof. For any z ∈ C, and any θ ∈ [0, 2π], we have Im{z exp(jθ)} = Re{z} sin(θ) + Im{z} cos(θ). Using this and the fact that ZQ = ZH Q , the i-th equation in (72)(a) can be simplified as 2ρ N X j=1,j6=i Re{zij } sin(αjo − αio ) + Im{zij } cos(αjo − αio )  (73) = Im{γ9 ui exp(−jαio )}, i = 1, 2, . . . , N where ui is the i-th element of u = GH w Adding the N equations in (73), it easily seen that 0 but we know from (72)(b) that ρ N P i=1 N P i=1 ui exp(−jαio ) = κ, where κ ∈ Im{γ9 ui exp(−jαio } = R. Therefore this implies that Im{γ9 } = 0 or in other words, γ9 is purely real. Substituting this back into (72)(a) and following the same arguments as before, 5 new γ9 =old −γ9 . 32 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. this is possible if trivially ρ = 0 or γ9 = 0, the former is false since ρ = 0 does not solve (72)(b), therefore the latter must be true. Interpretation of γ9 = 0. With γ9 = 0, from (72)(a) we have that ( Q ) X Zq (w)so = 0 Im (74) q=1 wH Gso = κ. The first equation in (74) does not depend on ρ, but the second does. Therefore γ9 = 0 does not imply that the constraint in (69) is inactive. Rather, this implies that the KKTs enforce the Capon constraint in (69) for the constant modulus waveform by varying the unspecified modulus parameter ρ. The result in Prop. 5 has some very interesting consequences. Using γ9 = 0, the N equations in (73) and N therefore (72)(a), can be rewritten as a some linear matrix equation Z̄ p = 0, where Z̄ ∈ N ×( 2 ) and the Q αo Q R T o o o o o o i.e. has − αN vector pαo = [sin(α2o − α1o ), sin(α3o − α1o ) . . . , sin(αN −1 ), cos(α2 − α1 ), . . . , cos(αN − αN −1 )]  N o o 2 components consisting of sines and cosines of all possible differences of αi − αj , ∀i, ∀j 6= i. In other words,  pαo ∈ null Z̄Q . The rank of Z̄Q is not easy to calculate here but its maximum value is N . Therefore from the rank-nullity theorem, dim(null(Z̄Q )) ≥ N (N − 2). Clearly there could exist multiple vectors which are in this null space but we are not certain if this translates to multiple solutions of αo from this linear equation alone. Nonetheless, if multiple solutions exist to this linear equation, they must also satisfy (72)(b) to be considered as a solution to (69). In any case the optimal solution(s) are in, Cαo ⊂ Cαo = {αo : pαo ∈ null(Z̄Q ), N X RN , with u∗i exp(jαio ) = i=1 κ }. ρ (75) It remains to be seen if Cαo is singleton, or comprises many elements, but we are optimistic that it would not turn out to be empty. E. Practical Considerations: Classical STAP v.s Waveform adaptive STAP Here we addresses practical considerations on the fast time-slow time model in STAP which aids in the waveform design and compare this with the classical model in STAP (slow time). Hardware The fast-time slow-time model in STAP does not necessitate newer hardware nor does it require any modifications to the existing hardware. It does however assume that the current state-of-art permits arbitrary waveform generation and adaptive transmitting capabilities [38]. Computational complexity The inclusion of the waveform causes the correlation matrices to have larger dimension. Inverting large matrices are computationally prohibitive. Classical STAP requires inverting a complex M L × M L matrix which has a complexity of O((M L)2.373 )-O((M L)3 ) [65]. Waveform adaptive STAP requires inverting complex N M L × N M L complex matrices which has a computational complexity of O((N M L)2.373 )O((N M L)3 ) [65]. 33 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. Training data Due to the larger dimensions of the correlation matrices by inclusion of the waveform, it suddenly appears, albeit deceivingly, that more training data (from more neighboring range cells) are needed to estimate the correlation matrices. This is not true since inclusion of waveform simply includes the fast time samples. Hence the fast-time slow-time model uses the raw data prior to pulse compression or matched filtering, hence the training data requirements is identical to that required in the classical STAP case. Note that we are not interested in resolving targets within the pulse duration but rather outside it. 0 0 −0.5 −5 −1 −10 −1.5 −15 γ 2f ( γ 2) f ( γ 2) −2 −2.5 −3 −20 −25 −3.5 −30 −4 −35 −4.5 −5 0 10 20 30 40 50 γ2 60 70 80 90 −40 100 0 10 20 30 40 (a) 60 70 80 90 100 (b) −3 3.5 50 γ2 −3 x 10 1 x 10 0.9 3 0.8 2.5 0.7 γ 2f ( γ 2) f ( γ 2) 0.6 2 1.5 0.5 0.4 0.3 1 0.2 0.5 0.1 0 0 10 20 30 40 50 γ2 (c) 60 70 80 90 100 0 0 10 20 30 40 50 γ2 60 70 80 (d) Fig. 7: Simulations supporting Prop. 3, x-axis γ2 . Monotone increasing (a) f (γ2 ) and corresponding (b) γ2 f (γ2 ). Monotone decreasing (c) f (γ2 ) and corresponding (d) γ2 f (γ2 ). 90 100 34 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. 8 35 30 6 25 20 4 γ 6 r (γ 6 ) r (γ 6 ) 15 2 10 5 0 0 −5 −2 −10 −4 0 10 20 30 40 50 γ6 60 70 80 90 100 −15 0 10 20 30 (a) 40 50 γ6 60 70 (b) 30 25 r (γ 6 ) 20 15 10 5 0 0 10 20 30 40 50 γ6 60 70 80 90 100 (c) Fig. 8: Simulations supporting Rem. 7, x-axis γ6 . Example showing one zero crossing of (a) r(γ6 ) and corresponding (b) γ2 r(γ6 ). Monotone decreasing example for Po >> κ2 in (c) r(γ6 ). IV. S IMULATIONS First we will addresses simulations not specific to radar. A. Simulations supporting: Prop. 3 and Rem. 7 We ran simulations with random zn and random dn to analyze f (γ2 ) and γ2 f (γ2 ) numerically. In our extensive simulations we chose zn from complex normal distributions with different means and different variances. Since dn > 0 for all n, we used uniform distributions with different supports on the positive real axis excluding zero. We 80 90 100 35 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. 40 40 30 30 STAP beamformer cost (dB) 20 STAP beamformer cost (dB) 20 10 10 0 −10 −20 −30 −40 −50 0 2 4 6 8 10 12 14 16 Iterations −10 −20 −30 Trial−1 Trial−2 Trial−3 −40 −50 2 4 6 8 10 12 14 16 Iterations Fig. 9: Constrained alternating minimization: objective costs vs. iterations for 3 random, independent waveform initializations (inset: for 25 random initializations). Proximal Constrained Alternating Minimization −56 Trial−1 Trial−2 Trial−3 STAP beamformer cost (dB) STAP beamformer cost (dB) 40 20 0 −20 20 0 STAP beamformer cost (dB) 60 40 −60 −62 −64 −66 −20 −68 50 −40 Trial−1 Trial−2 150 Trial−3 100 200 250 Iterations −60 −40 −60 Proximal Constrained Alternating Minimization −58 Constrained Alternating Minimization 60 −80 5 10 15 20 25 30 Iterations (a) 35 40 45 50 55 60 50 100 150 200 250 Iterations (b) Fig. 10: (a) Constrained alternating minimization, (b) Proximal constrained alternating minimization (inset: magnified), minimum eigenvector waveform (dashed black). 300 36 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. 2.7 Sample−1 Sample−2 Sample−3 Sample−4 Sample−5 2.6 2.5 2.4 Modulus 2.3 2.2 2.1 2 1.9 1.8 1.7 1 2 3 4 5 6 7 8 Iterations Fig. 11: Convergence of non const. mod initial waveform to a con. mod Con. waveform: Final costs Final costs 10 6 Ratio: con. mod. cost/non const. mod. cost (dB) Ratio: con. mod. cost/non const. mod. cost (dB) 9 8 7 6 5 4 3 2 5 4 3 2 1 1 0 0 20 40 60 80 100 120 Monte Carlo Trials (a) 140 160 180 200 0 0 20 40 60 80 100 120 140 160 180 Monte Carlo Trials (b) Fig. 12: Constant modulus waveform design comparison with non const. mod. design, 200 trials initialized with: (a) random non-const. mod. Gaussian waveforms (b) random unit modulus waveforms, with phase drawn uniformly from [−π, π]. show only two representative simulation results for the monotonically increasing and decreasing cases in Fig. 7(a)(c), respectively. The corresponding function γ2 f (γ2 ) are also shown in Fig. 7(b)(d) for the two cases. Simulations for supporting Rem. 7 is presented next. Some parameters specifying the function r(γ6 ) were simulated randomly with the identical distributions used as in generating Fig. 8. The parameter κ = 2, Po = 10 was used in generating Fig. 8(a), the function γ6 r(γ6 ) is also shown in Fig. 8(b). As such, it is noted that Po = 10 is a a contrived example, typical radar applications will require Po to be in several hundred KW or several Hundred MW. 200 37 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. Reed Mallet Brennan Reed Mallet Brennan −18.5 −1 −19 SINR loss: standard deviation (dB) 0 SINR loss: mean (dB) −2 −3 −4 −5 −6 −7 −19.5 −20 −20.5 −21 −21.5 1 1.5 2 2.5 3 3.5 4 4.5 −22 5 1 1.5 2 2.5 × NML samples 3 3.5 4 4.5 5 × NML samples (a) (b) Fig. 13: Oracle: Reed Mallet Brennan rule. 0.5 0.5 0 0.4 0.4 0.3 −20 −20 −30 0.1 0 −40 −0.1 −50 0.2 Normalized Doppler 0.2 Normalized Doppler −10 −10 0.3 −30 0.1 0 −40 −0.1 −50 −0.2 −0.2 −60 −0.3 −0.4 −0.5 −1 0 −0.8 −0.6 −0.4 −0.2 0 s i n( θ ) (a) 0.2 0.4 0.6 0.8 1 dB −60 −0.3 −70 −0.4 −80 −0.5 −1 −70 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 s i n( θ ) (b) Fig. 14: Adapted patterns using designed waveform from alternating minimization, dashed line is the Doppler as a function of angle predicted by theory. In, (a) no clutter Doppler ambiguities, (b) clutter Doppler ambiguities shown with arrows. 1 dB −80 38 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. ROC curves 1 0.9 0.9 0.8 0.8 0.7 0.7 0.6 0.6 Pd Pd ROC curves 1 0.5 0.4 0.4 Optimized, SINR=0dB Not optimized Optimized, SINR=3dB Not optimized Optimized, SINR=6dB Not optimized 0.3 0.2 0.1 0 0.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Optimized, SINR=0dB Chirp Optimized, SINR=3dB Chirp Optimized, SINR=6dB Chirp 0.3 0.2 0.1 0 1 0 0.1 0.2 0.3 0.4 0.5 Pfa 0.6 0.7 0.8 0.9 1 Pfa (a) (b) Fig. 15: ROC (a) non con. mod design, (b) con. mod. design Constrained Proximal Alternating Minimization −40 Constrained Proximal Alternating Minimization −40.5 Constrained Alternating Minimization 0 25 −41 Trial−1 Trial−2 Trial−3 STAP beamformer cost (dB) 20 15 10 5 −42 Trial−2 Trial−3 −10 STAP beamformer cost (dB) STAP beamformer cost (dB) −5 −41.5Trial−1 −42.5 −43 −43.5 −44 0 −44.5 −20 −25 −30 −35 −45 20 −5 −15 25 30 −4035 40 45 50 55 35 40 60 65 70 45 50 55 Iterations −10 2 4 6 8 10 Iterations (a) 12 14 16 18 20 −45 20 25 30 60 Iterations (b) Fig. 16: Rank deficient waveform adaptive STAP (a) constrained alternating minimization, (b) constrained proximal alternating minimization. 65 70 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. 39 The zero crossing is the intersection of the dashed line (black) with the blue curve in Fig. 8(a). Now using Po = 20 and keeping the other parameters fixed we obtain Fig. 8(c) which shows that r(γ6 ) is monotonic decreasing whose limit at ∞ is 0. Radar Specific simulations: Here onward, some parameters are common to all the simulation examples and are stated now. The simulation parameters are in SI units unless mentioned otherwise. To reduce computation complexity while inverting large matrices and computing their eigen-decompositions, we considered the number of, sensors, waveform transmissions, and fast time samples in the waveform as M = 5, L = 32, N = 5, respectively. The carrier frequency was chosen to be 1GHz, and the radar bandwidth was 50MHz. The element spacing d = λo /2. B. Constrained alternating minimization The noise correlation matrix was assumed to have a correlation function given by exp(−|0.005n|), n = 0, 1, . . . , N M L. Two interference sources were considered at (θ = 0.3941, φ = 0.3) and at (−0.4941, 0.3). Both these interference sources had identical discrete correlation functions given by 0.2|n| , n = ±0, ±1, . . .. To simulate clutter we considered two clutter patches, consisting of five scatters each. The clutter correlation functions corresponding to the two patches were exp(−0.2|p|) and exp(−0.1|p|), p = ±0, ±1, . . . , ±P . The rest of the parameters are identical to those used in [57]. In Fig. 9, the STAP beamformer objective vs. iterations are shown for 3 independent, random waveform initializations but the inset shows 25 independent initializations or trials. The alternating minimization was initialized with waveforms whose fast time samples are chosen independently from a standard complex Gaussian distribution. The algorithm was terminated as soon as the current waveform iterate invalidated the set power constraint. From the figure and its inset it is clear that the STAP beamformer output is non-increasing thereby validating the monotonicity property of this algorithm. More importantly from Fig. 9, we see that the final objective value and the iterations to reach it for each trial are different from one another, attributed to the joint non-convexity of the objective w.r.t. w and s. Sensitivity to the random initialization is therefore duly noted. C. Constrained proximal alternating minimization All the simulations parameters are identical to the previous case. The constrained alternating minimization was initialized with random waveforms as in Fig. 9, immediately followed by its proximal counterpart. The termination of the former algorithm was identical to the previous case, then, the latter was run for 200 iterations. Three representative trials are shown in Fig. 10(a)(b), for the constrained alternating minimization and its proximal counterpart. In Fig. 10(b), the dashed black lines are the final objective values obtained from the min. eigenvector waveform having the same energy as its proximal counterpart. For the three trials and not surprisingly, the proximal objective value, for all practical purposes, is identical to that obtained from the waveform derived from (21) as evidenced from the inset. Therefore validating the implementation of both the constrained as well as its proximal counterpart. From Fig. 10(b) and unlike Fig. 9, three accumulation points w.r.t. the objective are clearly visible for the three trials indicating strong convergence. 40 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. D. Constant modulus The constant modulus algorithm was implemented numerically via the KKTs (i.e. (72)) and using the results from Prop. 5. The simulation parameters are identical to the two previous scenarios. In Fig. 11, the modulus of the fast time waveform samples vs. iterations are shown for the constant modulus alternating minimization algorithm. As seen from this figure, the algorithm was initialized with a non-constant modulus waveform. For this random initialization, convergence to a constant modulus is achieved in three iterations or less. We have however encountered cases where the algorithm has not converged for several iterations. Nevertheless this problem was not encountered when the algorithm was initialized with a random constant modulus waveform. Thus in practice, it is advocated that this algorithm be initialized with an arbitrary constant modulus waveform, viz. a chirp, rectangular pulse, etc.. The ratio of the final objective for the constant modulus algorithm to the objective for the non-constant modulus waveform design using the constrained alternating minimization is seen in Fig. 12(a)(b) for 200 random waveform initializations. After convergence, not unexpectedly, the constant modulus objective is more than the non-constant modulus objective. This trend is readily observed from Fig. 12(a)(b) for the 200 trials. This is to be expected since constant modulus waveforms are a subset of their non-constant modulus counterparts. In particular, the amplitude is constrained temporally in the constant modulus design, while the phase is allowed to be optimized. Whereas, the phase and amplitude are both optimized the non-constant modulus design. From these figures we can see that on one end, this ratio is as much as 10dB, and on the other it is almost 0dB. Nonetheless on the average, the non-const. modulus waveforms have lower objective values than objective values derived from the const. modulus waveforms. E. Oracle sample support requirements The ideal SINR is ρ2t |woH (v(fd )⊗so ⊗a(θt ,φt ))|2 woH Ru (so )wo where wo , so are obtained after optimization. Using the estimated co- variance matrix, say the sample covariance matrix, the definition of the estimated SINR is H ρ2t |west (v(fd )⊗sest ⊗a(θt ,φt ))|2 , H R̂ (s west u est )west where R̂u (·) is the estimated sample covariance matrix, and west , sest are the optimized weight and waveform vectors by using the estimated covariance in the optimization instead. A true SINR loss can be computed by using the estimated i.e. R̂pq γ in (15) and running the optimization algorithm for each Monte Carlo trial, resulting in an estimated sest . This is computationally heavy on our current resources, therefore not reported here. However, we will assume that an oracle has provided the optimal waveform to be transmitted. Then the oracle loss of SINR due to the estimated covariance is a random variable, captured by, SIN Rloss = woH Ru (so )wo H R̂ (s )w west u o est . Random data is now generated from zero mean multivariate complex Gaussian distributions to compute the sample covariance matrices, i.e. R̂i , R̂n and R̂pq γ . Two hundred Monte Carlo trials were run with differing sample supports. The mean and standard deviation of the oracle SIN Rloss are shown in Fig. 13(a)(b). Not surprisingly the RMB rule is followed perfectly. For the same sample support, the standard deviation is a few orders less than the mean. P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. 41 F. Adapted patterns The adapted pattern for the waveform dependent STAP objective function is expressed as P(fd , θ) = |woH (v(fd ) ⊗ so ⊗ a(θ, φ))|2 , for a fixed φ. (76) The adapted pattern in (76) is a function of angle, Doppler, the optimal weight and the waveform vectors, wo , so , respectively. Two examples are shown in Fig. 14(a)(b). Two interferers at (θ = −0.2, φ = π/3) and at (−0.2, π/3) were chosen. We modeled the clutter discretely from all azimuth angles from −π/2 to π/2 in discrete increments of −0.005π/2 radians. The clutter patches were fixed at an elevation angle of π/4 radians. The target was assumed to be at θt = 0.7, φt = π/4 with normalized Doppler equal to 0.31 and θt = 0, φt = π/4 with normalized Doppler equal to -0.4 in Fig14(a)(b), respectively. The adapted patterns in Fig. 14 are identical (upto a scaling) to those obtained from the classical STAP adapted pattern. This is not a surprise but is rather reassuring since the waveform in (76) affects all the Doppler frequencies and the azimuths identically. Moreover, we can always consider so ⊗ a(θ, φ) as a new /modified spatial steering vector. Hence as expected the inclusion of the optimal waveform will not alter the shape of the classical STAP adapted pattern. G. Detection Here, we investigate the impact of detection using the optimized waveforms and randomly selected waveforms. The detection test for the presence of a target at a particular range cell is cast as a binary hypothesis test, H0 : wH ȳ = wH yu H1 : wH ȳ = wH y + wH yu (77) where y, yu have been been defined in (8), (9). Assuming that yu is complex normal distributed, the test in (77) is readily evaluated. The weight vector is obtained after the optimization. The ROC curves for SINRs 0dB, 3dB and 6dB are shown in Fig. 15(a)(b) for the non const. modulus and const. modulus design, respectively. For generating Fig. 15(a), a random waveform was used having the same energy as that obtained after the alternating minimization algorithm. The waveform samples were drawn independently from a complex Gaussian distribution. In Fig. 15(b), a chirp waveform was used having the same bandwidth and energy as its optimized constant modulus counterpart. From these figures and as expected, from a detection standpoint, an optimized waveform performs much better than transmitting an un-optimized waveform. H. Realistic STAP waveform design We consider a scenario frequently encountered in STAP, the sample covariance matrix is rank deficient due to the paucity of training data. The simulation parameters are identical to those used as in Fig. 9, except that we considered ground clutter from all azimuths in [−π/2, π.2], similar to those used in generating Fig. 14. Furthermore, we constrained the rank of the resulting correlation matrices to be 30, equal to the numerical rank of the clutter correlation matrix for generating Fig. 16. The alternating minimization is first used for 20 iterations assuming an arbitrary diagonal loading factor equal to 100. After termination of this algorithm, the proximal algorithm was P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. 42 employed for 50 iterations. The results are shown in Fig. 16(a)(b). It is noted that in practice the ‘true’ min. eigenvector cannot be computed due to the rank deficiency. Interestingly nonetheless, the designed waveforms after the proximal optimization result in a STAP objective value which is close to that obtained from the waveform estimated from the ’true’ min. eigenvector. However, extensive simulations for the rank deficient STAP are needed to verify if this behavior is seen for other classes of noise plus interference, and clutter correlation matrices. V. C ONCLUSIONS Waveform design in STAP was the focus of this report assuming the dependence of the clutter response on the transmitted waveform. Our preliminary simulations indicate that the objective function was jointly non-convex in the weight and waveform vectors. However, we showed analytically that the objective function is individually convex in the waveform and the weight vector. This motivated a constrained alternating minimization technique which iteratively optimizes one vector while keeping the other fixed. A constrained proximal alternating minimization technique was propose to handle rank deficient STAP correlation matrices. To addresses practical design constraints we incorporated constant modulus constraints in our alternating minimization formulation. Simulations were chosen to demonstrate the monotonic decrease of the MVDR objective function using this alternating minimization algorithm. Preliminary simulations were presented to validate the theory. ACKNOWLEDGMENT This work was sponsored by US AFOSR under project 13RY10COR. All views and opinions expressed here are the authors own and does not constitute endorsement from the Department of Defense or the USAF. R EFERENCES [1] R. Klemm, Principles of Space-Time Adaptive Processing. Institution of Electrical Engineers, 2002. [2] J. Ward, Space-time Adaptive Processing for Airborne Radar, ser. Technical report (Lincoln Laboratory). Massachusetts Institute of Technology, Lincoln Laboratory, 1994. [3] J. Guerci, Space-Time Adaptive Processing for Radar. Artech House, 2003. [4] L. E. Brennan and L. S. Reed, “Theory of Adaptive Radar,” IEEE Transactions on Aerospace and Electronic Systems, vol. AES-9, no. 2, pp. 237–252, Mar. 1973. [5] D. Madurasinghe and A. P. Shaw, “Mainlobe jammer nulling via tsi finders: a space fast-time adaptive processor,” EURASIP J. Appl. Signal Process., vol. 2006, pp. 221–221, Jan. 2006. [6] Y. Seliktar, D. B. Williams, and E. J. Holder, “A space/fast-time adaptive monopulse technique,” EURASIP J. Appl. Signal Process., vol. 2006, pp. 218–218, Jan. 2006. [7] J. Capon, “High-resolution frequency-wavenumber spectrum analysis,” Proceedings of the IEEE, vol. 57, no. 8, pp. 1408– 1418, Jun. 1969. [8] M. J. D. Powell, “An efficient method for finding the minimum of a function of several variables without calculating derivatives,” The Computer Journal, vol. 7, no. 2, pp. 155–162, 1964. [9] M. Powell, “On search directions for minimization algorithms,” Mathematical Programming, vol. 4, no. 1, pp. 193–201, 1973. 43 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. [10] W. I. Zangwill, “Minimizing a function without calculating derivatives,” The Computer Journal, vol. 10, no. 3, pp. 293–296, 1967. [11] J. Ortega and W. Rheinboldt, Iterative solution of nonlinear equations in several variables. Academic Press, 1970. [12] Z. Luo and P. Tseng, “On the convergence of the coordinate descent method for convex differentiable minimization,” Journal of Optimization Theory and Applications, vol. 72, no. 1, pp. 7–35, 1992. [13] A. Auslender, “Asymptotic properties of the Fenchel dual functional and applications to decomposition problems,” J. Optim. Theory Appl., vol. 73, no. 3, pp. 427–449, Jun. 1992. [14] D. P. Bertsekas, Nonlinear Programming, 2nd ed. Athena Scientific, 1999. [15] L. Grippo and M. Sciandrone, “On the convergence of the block nonlinear gauss-seidel method under convex constraints,” Oper. Res. Lett., vol. 26, no. 3, pp. 127–136, Apr. 2000. [16] H. Attouch, J. Bolte, P. Redont, and A. Soubeyran, “Proximal alternating minimization and projection methods for nonconvex problems: An approach based on the Kurdyka-Lojasiewicz inequality,” Math. Oper. Res., vol. 35, no. 2, pp. 438–457, May 2010. [17] A. Beck, “On the convergence of alternating minimization with applications to iteratively reweighted least squares and decomposition schemes,” Optimization Online, 2013. [18] P. Setlur and M. Rangaswamy, “Proximal constrained waveform design algorithms for cognitive radar stap,” in Asilomar Conference on Signals, Systems and Computers, Nov 2014. [19] B. Martinet, “Brève communication. régularisation d’inéquations variationnelles par approximations successives,” ESAIM: Mathematical Modelling and Numerical Analysis - Modélisation Mathématique et Analyse Numérique, vol. 4, no. R3, pp. 154–158, 1970. [20] R. Rockafellar, “A dual approach to solving nonlinear programming problems by unconstrained optimization,” Mathematical Programming, vol. 5, no. 1, pp. 354–373, 1973. [21] D. P. Bertsekas and P. Tseng, “Partial proximal minimization algorithms for convex programming,” SIAM Journal on Optimization, vol. 4, pp. 551–572, 1994. [22] R. T. Rockafellar, “Monotone operators and the proximal point algorithm,” SIAM Journal on Control and Optimization, vol. 14, no. 5, pp. 877–898, 1976. [23] P. Combettes and J.-C. Pesquet, “Proximal splitting methods in signal processing,” in Fixed-Point Algorithms for Inverse Problems in Science and Engineering, ser. Springer Optimization and Its Applications, H. H. Bauschke, R. S. Burachik, P. L. Combettes, V. Elser, D. R. Luke, and H. Wolkowicz, Eds. Springer New York, 2011, pp. 185–212. [24] N. Parikh and S. Boyd, Proximal Algorithms, ser. Foundations and Trends(r) in Optimization. Now Publishers Incorporated, 2013. [25] P. Woodward and I. Davies, “Information theory and inverse probability in telecommunication,” Proceedings of the IEE-Part III: Radio and Communication Engineering, vol. 99, no. 58, pp. 37–44, 1952. [26] P. Woodward, “Theory of radar information,” Information Theory, IRE Professional Group on, vol. 1, no. 1, pp. 108–113, 1953. [27] ——, Probability and information theory, with applications to radar. Pergamon press London, 1953. [28] J. Benedetto, I. Konstantinidis, and M. Rangaswamy, “Phase-coded waveforms and their design,” IEEE Signal Processing Magazine, vol. 26, no. 1, pp. 22–31, Jan 2009. [29] D. DeLong and E. Hofstetter, “On the design of optimum radar waveforms for clutter rejection,” IEEE Trans. Inf. Theory, vol. 13, no. 3, pp. 454–463, 1967. P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. 44 [30] ——, “The design of clutter-resistant radar waveforms with limited dynamic range,” IEEE Trans. Inf. Theory, vol. 15, no. 3, pp. 376–385, May 1969. [31] D. DeLong, “Design of radar signals and receivers subject to implementation errors,” IEEE Trans. Inf. Theory, vol. 16, no. 6, pp. 707–711, Nov 1970. [32] S. Kay, “Optimal signal design for detection of gaussian point targets in stationary gaussian clutter/reverberation,” IEEE Jour. Sel. Top. Signal Proc., vol. 1, no. 1, pp. 31–41, 2007. [33] C.-Y. Chen and P. Vaidyanathan, “MIMO radar waveform optimization with prior information of the extended target and clutter,” TransSP, vol. 57, no. 9, pp. 3533–3544, 2009. [34] S. Pillai, H. Oh, D. Youla, and J. Guerci, “Optimal transmit-receiver design in the presence of signal-dependent interference and channel noise,” IEEE Trans. Inf. Theory, vol. 46, no. 2, pp. 577–584, 2000. [35] A. Aubry, A. De Maio, M. Piezzo, A. Farina, and M. Wicks, “Cognitive design of the receive filter and transmitted phase code in reverberating environment,” IET Radar Sonar and Navig., vol. 6, no. 9, pp. 822–833, December 2012. [36] A. Aubry, A. DeMaio, A. Farina, and M. Wicks, “Knowledge-aided (potentially cognitive) transmit signal and receive filter design in signal-dependent clutter,” IEEE Trans. Aerospace and Electronic Systems, vol. 49, no. 1, pp. 93–117, Jan 2013. [37] G. Cui, H. Li, and M. Rangaswamy, “MIMO radar waveform design with constant modulus and similarity constraints,” IEEE Trans. Signal Processing, vol. 62, no. 2, pp. 343–353, Jan 2014. [38] D. Cochran, S. Suvorova, S. Howard, and W. Moran, “Waveform libraries: Measures of effectiveness for radar scheduling,” IEEE Signal Processing Magazine, vol. 26, no. 1, pp. 12–21, 2009. [39] P. Setlur, T. Negishi, N. Devroye, and D. Erricolo, “Multipath exploitation in non-los urban synthetic aperture radar,” IEEE Jour. Selected Top. Sign. Proc., vol. 8, no. 1, pp. 137–152, Feb 2014. [40] J. Guerci and E. Baranoski, “Knowledge-aided adaptive radar at DARPA: an overview,” IEEE Signal Processing Magazine, vol. 23, no. 1, pp. 41–50, Jan 2006. [41] D. Middleton, An introduction to statistical communication theory: An IEEE press classic reissue. Piscataway, NJ, USA: IEEE Press, 1996. [42] H. Van Trees, Detection, Estimation, and Modulation Theory, ser. Detection, Estimation, and Modulation Theory. Wiley, 2004, no. pt. 1. [43] P. Stoica, H. He, and J. Li, “Optimization of the receive filter and transmit sequence for active sensing,” IEEE Trans. Signal Processing, vol. 60, no. 4, pp. 1730–1740, April 2012. [44] L. Patton, D. Hack, and B. Himed, “Adaptive pulse design for space-time adaptive processing,” in IEEE Sensor Array and Multichannel Signal Processing Workshop (SAM), June 2012, pp. 25–28. [45] P. Setlur and N. Devroye, “Adaptive waveform scheduling in radar: an information theoretic approach,” in In Proc. SPIE, Defense Security and Sensing, Symp., vol. 8361, 2012, pp. 836 103–836 103–11. [46] P. Setlur, N. Devroye, and Z. Cheng, “Waveform scheduling via directed information in cognitive radar,” in IEEE Statistical Signal Processing Workshop (SSP), Aug 2012, pp. 864–867. [47] M. Bell, “Information theory and radar waveform design,” IEEE Trans. Inf. Theory, vol. 39, no. 5, pp. 1578–1597, 1993. [48] ——, “Information theory and radar: mutual information and the design and analysis of radar waveforms and systems,” Ph.D. dissertation, Caltech, 1988. [49] A. Leshem, O. Naparstek, and A. Nehorai, “Information theoretic adaptive radar waveform design for multiple extended targets,” IEEE Jour. Selected Top. Sign. Proc., vol. 1, no. 1, pp. 42–55, June 2007. [50] R. Romero and N. Goodman, “Information-theoretic matched waveform in signal dependent interference,” in IEEE Radar Conference, 2008, pp. 1–6. 45 P. SETLUR AND M. RANGASWAMY: AFRL SENSORS DIRECTORATE TECH. REPORT, 2014. [51] W. Moran, S. Suvorova, and S. Howard, “Applications of sensor scheduling concepts to radar,” in Foundations and Applications for Sensor Management, A. Hero, D. Castanon, D. Cochran, and K. Kastella, Eds. Springer-Verlag, 2006, pp. 221–256. [52] S. Sira, A. Papandreou-Suppappola, D. Morrell, and D. Cochran, “Waveform-agile sensing for tracking multiple targets in clutter,” in 2006 40th Annual Conference on Information Sciences and Systems, 2006, pp. 1418–1423. [53] S. P. Sira, Y. Li, A. Papandreou-Suppappola, D. Morrell, D. Cochran, and M. Rangaswamy, “Waveform-agile sensing for tracking,” IEEE Signal Processing Magazine, vol. 26, no. 1, pp. 53–64, 2009. [54] D. Kershaw and R. Evans, “Optimal waveform selection for tracking systems,” IEEE Trans. Inf. Theory, vol. 40, no. 5, pp. 1536–1550, Sep. 1994. [55] ——, “Waveform selective probabilistic data association,” Aerospace and Electronic Systems, IEEE Transactions on, vol. 33, no. 4, pp. 1180–1188, 1997. [56] J. Li, L. Xu, P. Stoica, K. Forsythe, and D. Bliss, “Range compression and waveform optimization for MIMO radar: A Cramér Rao bound based study,” Signal Processing, IEEE Transactions on, vol. 56, no. 1, pp. 218–232, Jan 2008. [57] P. Setlur, N. Devroye, and M. Rangaswamy, “Waveform design and scheduling in space-time adaptive radar,” in In proc. IEEE Radar Conference, 2013. [58] R. Horn and C. Johnson, Matrix Analysis. Cambridge University Press, 2005. [59] A. Hjorungnes and D. Gesbert, “Complex-valued matrix differentiation: Techniques and key results,” IEEE Trans. Signal Processing, vol. 55, no. 6, pp. 2740–2746, June 2007. [60] S. Boyd and L. Vandenberghe, Convex Optimization. New York, NY, USA: Cambridge University Press, 2004. [61] J.-B. Lasserre, “A trace inequality for matrix product,” IEEE Trans. on Automatic Control, vol. 40, no. 8, pp. 1500–1501, Aug 1995. [62] J. J. Moré, “Generalizations of the trust region problem,” Optimization Methods and Software, vol. 2, pp. 189–209, 1993. [63] S. Kay, Fundamentals of Statistical Signal Processing, Volume 1: Estimation Theory. Prentice Hall, 1998. [64] P. Setlur and M. Rangaswamy, “Signal dependent clutter waveform design for radar stap,” in In Proc. IEEE Radar Conference, 2014. [65] V. V. Williams, “Multiplying matrices faster than Coppersmith-Winograd,” in Proceedings of the Forty-fourth Annual ACM Symposium on Theory of Computing, ser. STOC ’12, 2012, pp. 887–898.
3cs.SY
arXiv:1611.05555v1 [math.GT] 17 Nov 2016 A HOMOLOGY THEORY FOR A SPECIAL FAMILY OF SEMI-GROUPS SUJOY MUKHERJEE Abstract. In this paper, we construct a new homology theory for semi-groups satisfying the self distributivity axiom or the idempotency axiom. Next, we consider the geometric realization corresponding to the homology theory. We continue with the comparison of this homology theory with one term and two term (rack) homology theories of self-distributive algebraic structures. Finally, we propose connections between the homology theory and knot theory via Temperley-Lieb algebras. Contents 1. Introduction 1.1. Preliminaries 1.2. Lbo homology 1.3. A non-cyclic version of lbo homology 2. Geometric realization of the pre-simplicial set leading to lbo homology 2.1. A comparison between algebraic and geometric arguments 3. Temperley-Lieb algebra, Jones’ monoids and lbo homology 4. Odds and ends 4.1. Preliminary computational data 4.2. A comparison between the homology theories 4.3. Open questions 5. Acknowledgements References 2 2 3 9 10 14 17 20 20 20 22 22 23 Self-distributive algebraic structures such as quandles and racks are motivated by knot theory. Rack homology(also known as two term homology) for shelves was introduced by Roger A. Fenn, Colin P. Rourke and Brian J. Sanderson [FRS1, FRS2, FRS3]. This was modified into quandle homology by J. Scott Carter, Daniel Jelsovsky, Seiichi Kamada, Laurel Langford and Masahico Saito to define co-cycle invariants for knots [CJKLS]. Later, one term homology for shelves was introduced by Józef H. Przytycki [Prz1]. While quandles are very useful from a knot theoretic point of view, for algebraic purposes one may juggle with the axioms of a quandle Date: September 19, 2015, and in revised form, November 16, 2016. 2010 Mathematics Subject Classification. Primary: 18G60. Secondary: 20N02, 57M25. Key words and phrases. pre-simplicial modules, shelves, Temperley-Lieb algebra, two term (rack) homology, one term homology. The author was supported by the Presidential Merit Fellowship of the George Washington University. 1 2 SUJOY MUKHERJEE to obtain other algebraic structures and study these under the same settings. This note grew out of a similar attempt. While trying to understand the behavior of rack and one term homology of associative shelves I decided to manipulate some axioms and explore. What I obtained is described in this note. Józef H. Przytycki suggested that the homology theory should be called elbow homology (or lbo homology). To understand this terminology please stare long enough at the graphical interpretation of the face maps in Figure 2! The note is organized as follows. The following section introduces the necessary tools required for defining the homology theory after which it discusses the main aspects of lbo homology. In Section 2 the geometric aspects of lbo homology have been introduced. Lbo homology has connections to Temperley-Lieb algebras and Jones’ monoids. This has been discussed in Section 3. As associative shelves lie in the intersection of associative algebraic structures and self-distributive algebraic structures, there are several homology theories that work for associative shelves. A comparative study has been done in Section 4 along with tables of computations done for lbo homology. Based on these, open questions are discussed. 1. Introduction The necessary prerequisites for defining the homology theory is introduced in the following subsection. 1.1. Preliminaries. A shelf or a right self-distributive algebraic structure is a magma (X, ∗) satisfying the following axiom for all a, b, c ∈ X: (a ∗ b) ∗ c = (a ∗ c) ∗ (b ∗ c). A shelf is called a rack if there exists ¯∗ : X × X −→ X such that for all a, b ∈ X, (a¯∗b) ∗ b = a = (a ∗ b)¯∗b. In addition, if every element in a rack is idempotent, then the algebraic structure obtained is called a quandle. On the other hand, if every element in a shelf is idempotent, the resulting algebraic structure is called a spindle. The three axioms of a quandle correspond to the three Reidemeister moves and therefore quandles are very useful tool to build invariants of links. However, to work with framed links it is enough to consider racks. As will be observed later, the associativity axiom is needed for lbo homology. However, the trivial quandle is the unique rack1 which satisfies the associativity axiom. This is bad news for lbo homology from a knot theoretic point of view. In 2015, it was proven that shelves with an identity element (unit) are associative. The proof follows from the following two propositions. Proposition 1.1 (Sam C.). For a unital shelf (X, ∗), the following axioms hold: (1) a ∗ a = a, for all a ∈ X. In other words, (X, ∗) is a spindle. (2) a ∗ b = b ∗ (a ∗ b) for all a, b ∈ X. (3) a ∗ b = (a ∗ b) ∗ b for all a, b ∈ X. 1The trivial quandle is defined in the following way. Let (X, ∗) be a magma. For all a, b ∈ X define a ∗ b = a. Here, the trivial quandle is referred to as a rack to emphasize that the second and not the first axiom of a quandle is playing a role here. There are several spindles which are associative. A HOMOLOGY THEORY FOR A SPECIAL FAMILY OF SEMI-GROUPS 3 A shelf satisfying all the three axioms in the above proposition is called a pre unital shelf and a shelf satisfying the second and the third axioms of the above proposition is called a proto unital shelf. The converse of Proposition 1.1 does not hold but it is easy to observe that removing the unit element from a unital shelf gives a pre unital shelf and adding unit element to a pre unital shelf gives a unital shelf [CMP]. Proposition 1.2 (Sam C.). Proto unital shelves are associative. The relations between the various algebraic structures discussed above is summarized in Figure 1. Figure 1. Relations between the algebraic structures. 1.2. Lbo homology. It is well known that to construct a homology theory it is enough to construct a pre-simplicial module (also known as semi-simplicial module). The pre-simplicial module allows for a chain complex to be constructed by defining the boundary map as the alternating sum of the face maps of the pre-simplicial module [Lod]. Lbo homology is developed in the same way. Definition 1.3. A pre-simplicial module (Cn , di,n ) consists of a sequence of R-modules Cn over a ring R for n ≥ 0, and face maps di,n : Cn −→ Cn−1 for all 0 ≤ i ≤ n such that for i < j, di,n ◦ dj,n+1 = dj−1,n ◦ di,n+1 .2 2As is usually done, to simplify notation the second index of the face maps will be omitted in the rest of this note. 4 SUJOY MUKHERJEE Now let ∂n : Cn −→ Cn−1 and for all x ∈ Cn , let n X ∂n (x) = (−1)i di (x). i=0 It is not difficult to observe that ∂n ◦ ∂n+1 = 0, so that (Cn , ∂n ) is a chain complex. Following is the same construction in the context of lbo homology. Let (X, ∗) be an associative shelf and Cn = ZX n+1 for n ≥ 0 and trivial otherwise. Let di : Cn −→ Cn−1 for 0 ≤ i ≤ n be given by, (1.1)   (x0 ∗ x1 , x2 , · · · , xn−1 , xn ∗ x0 ) di (x0 , x1 , · · · , xn ) = (xn ∗ x0 , x1 , · · · , xn−2 , xn−1 ∗ xn )   (x0 , x1 , · · · , xi−2 , xi−1 ∗ xi , xi ∗ xi+1 , xi+2 , · · · , xn ) if i=0, if i=n, else. Figure 2. Graphical interpretation of the ith face map of lbo homology. The next thing to prove is that (Cn , di ) is a pre-simplicial module. But before proving this, some examples are considered to illustrate how the face maps use the axioms of an associative shelf. A non-trivial case in the above definition would occur when n = 1. Part (1) of Example 1.4 explains that case. Example 1.4. Let (x0 , x1 , ..., xn ) ∈ ZX n+1 . (1) For n = 1, d0 (x0 , x1 ) = x0 ∗ x1 ∗ x0 , and d1 (x0 , x1 ) = x1 ∗ x0 ∗ x1 . Here, multiplication on the left and then on the right is the same as multiplication on the right and then on the left as (X, ∗) is a semi-group. (2) Let n = 2, i = 0, j = 2. Then d0 ◦ d2 (x0 , x1 , x2 ) = d0 (x2 ∗ x0 , x1 ∗ x2 ) = (x2 ∗ x0 ) ∗ (x1 ∗ x2 ) ∗ (x2 ∗ x0 ). d1 ◦ d0 (x0 , x1 , x2 ) = d1 (x0 ∗ x1 , x2 ∗ x0 ) = (x2 ∗ x0 ) ∗ (x0 ∗ x1 ) ∗ (x2 ∗ x0 ). A HOMOLOGY THEORY FOR A SPECIAL FAMILY OF SEMI-GROUPS 5 (3) Let n = 3, i = 1, j = 2. Then d1 ◦d2 (x0 , x1 , x2 , x3 ) = d1 (x0 , x1 ∗x2 , x2 ∗x3 ) = (x0 ∗ (x1 ∗ x2 ), (x1 ∗ x2 ) ∗ (x2 ∗ x3 )). d1 ◦ d1 (x0 , x1 , x2 , x3 ) = d1 (x0 ∗ x1 , x1 ∗ x2 , x3 ) = ((x0 ∗ x1 ) ∗ (x1 ∗ x2 ), (x1 ∗ x2 ) ∗ x3 ). The example above implies that the axioms necessary for (Cn , di ) to be a presimplicial module are the associativity axiom and a∗b∗b∗c = a∗b∗c for a, b, c ∈ X. The second axiom holds for associative shelves as, (1.2) a ∗ b ∗ b ∗ c = a ∗ b ∗ c ∗ b ∗ c = a ∗ c ∗ b ∗ c = a ∗ b ∗ c. Proposition 1.5. (Cn , di ) is a pre-simplicial module. Proof. The proof of this proposition requires a careful organization of the various possibilities for the sole axiom of a pre-simplicial module and dividing them in to multiple cases. Case 1: For n = 0, 1, 2, 3, checking each of the small number of possibilities suffices. Case 2: Let n > 3, 0 < i < j < n, j = i + 1, that is when i and j are adjacent to each other. An arbitrary element in the domain of di looks like (..., xi−1 , xi , xi+1 , xi+2 , ...). Then, di ◦ dj (..., xi−1 , xi , xi+1 , xi+2 , ...) = di ◦ di+1 (..., xi−1 , xi , xi+1 , xi+2 , ...) = di (..., xi−1 , xi ∗ xi+1 , xi+1 ∗ xi+2 , ...) = (..., xi−1 ∗ (xi ∗ xi+1 ), (xi ∗ xi+1 ) ∗ (xi+1 ∗ xi+2 ), ...). On the other hand, dj−1 ◦ di (..., xi−1 , xi , xi+1 , xi+2 , ...) = di ◦ di (..., xi−1 , xi , xi+1 , xi+2 , ...) = di (..., xi−1 ∗ xi , xi ∗ xi+1 , xi+2 , ...) = (..., (xi−1 ∗ xi ) ∗ (xi ∗ xi+1 ), (xi ∗ xi+1 ) ∗ xi+2 , ...). Under the axioms of associative shelves and using 1.2 it follows that both sides are equal. Case 3: Let n > 3, 0 < i < j < n, j = i + 2. Now i and j are neighbors but not adjacent. Let (..., xi−1 , xi , xi+1 , xi+2 , xi+3 , ...) be an arbitrary element in the domain of di . Then, di ◦ dj (..., xi−1 , xi , xi+1 , xi+2 , xi+3 , ...) = di ◦ di+2 (..., xi−1 , xi , xi+1 , xi+2 , xi+3 , ...) = di (..., xi−1 , xi , xi+1 ∗ xi+2 , xi+2 ∗ xi+3 , ...) = (..., xi−1 ∗ xi , xi ∗ (xi+1 ∗ xi+2 ), xi+2 ∗ xi+3 , ...). On the other hand, di ◦ dj (..., xi−1 , xi , xi+1 , xi+2 , xi+3 , ...) = di+1 ◦ di (..., xi−1 , xi , xi+1 , xi+2 , xi+3 , ...) = di+1 (..., xi−1 ∗ xi , xi ∗ xi+1 , xi+2 , xi+3 , ...) = (..., xi−1 ∗ xi , (xi ∗ xi+1 ) ∗ xi+2 , xi+2 ∗ xi+3 , ...). In this case, associativity is the only axiom necessary to show the equality of the two expressions. 6 SUJOY MUKHERJEE Case 4: Let n > 3, 0 < i < j < n, j − i > 2. This case is almost trivial as the di face map and the dj face map do not interact with each other at all and therefore the axiom of a pre-simplicial module follows immediately without the need of any axioms of an associative shelf. The cases when j = n, that is when j is at the right end is similar except a shift in indexes and are left for the reader to verify.  The above proposition and defining the boundary maps ∂n in the usual way as the alternate sum of the face maps of the pre-simplicial module leads on to the following theorem. Theorem 1.6. (Cn , ∂n ) is a chain complex. The homology groups obtained from the chain complex in the above theorem will be called the lbo homology groups. The boundary maps of this homology are cyclic in nature. It turns out that by using similar face maps but not in a cyclic manner, it is possible to form a different homology theory. This homology theory is described briefly in the following subsection. It is important to note here that while the associativity axiom is always necessary for lbo homology, it is possible to exchange the right self-distributivity axiom with idempotence. Therefore, lbo homology also works if the algebraic structure of interest is an idempotent semi-group. Although there is a non-trivial intersection between associative shelves and idempotent semi-groups in the form of associative spindles, there is no containment in either direction. See Figure 3. Further, one can also work with semi-groups satisfying the axiom a ∗ b ∗ b ∗ c = a ∗ b ∗ c for all a, b, c ∈ semi-group. Figure 3. Relations between associative shelves and idempotent semi-groups. Example 1.4 part (1), illustrates the face maps d0 and d1 when n = 1. It follows that ∂1 (x0 , x1 ) = x0 ∗ x1 ∗ x0 − x1 ∗ x0 ∗ x1 , for (x0 , x1 ) ∈ ZX 2 . This implies that lbo homology measures how far a proto unital shelf or idempotent semi-group is from being commutative. In particular, when the algebraic structure under consideration is finite and commutative, the zero homology group is Z|X| . A HOMOLOGY THEORY FOR A SPECIAL FAMILY OF SEMI-GROUPS 7 It would be useful to extend the pre-simplicial module leading on to lbo homology to a simplicial module for the useful implications. I do not know how to do it. The pre-simplicial module leading on to lbo homology, however, can be extended to a very weak simplicial module for special families of associative shelves and idempotent semi-groups. The notion of a very weak simplicial module was introduced in [Prz1, Prz2]. Definition 1.7. A simplicial module (Cn , di,n , sj,n ) consists of a sequence of Rmodules Cn over a ring R for n ≥ 0, face maps di,n : Cn −→ Cn−1 , and degeneracy maps sj,n : Cn −→ Cn+1 for all 0 ≤ i, j ≤ n such that, (1) di,n ◦ dj,n+1 = dj−1,n ◦ di,n+1 , f or i < j. (2) si,n ◦ sj,n−1 = sj+1,n ◦ si,n−1 , f or i ≤ j.  sj−1,n−1 ◦ di,n , for i < j, (3) di,n ◦ sj,n−1 = sj,n−1 ◦ di−1,n , for i > j + 1. (4) di,n+1 ◦ sj,n = di+1,n+1 ◦ sj,n = IdCn .3 A very weak simplicial module need not satisfy axiom 4 in the above definition. Now consider the pre-simplicial module (Cn , di,n ) leading on to lbo homology. To convert it to a very weak simplicial module a degeneracy map is necessary which satisfies axioms 2 and 3 in the last definition. Definition 1.8. Let (X, ∗) be a magma. If there exists an element e ∈ X such that x ∗ e = e = e ∗ x for all x ∈ X then e is called a zero. There are many associative shelves and idempotent semi-groups with zeros. Table 1 shows one example of each. In particular, any associative shelf or idempotent semi-group can be extended to another associative shelf or idempotent semi-group by adding a zero element. This follows as both the associative axiom and the self-distributive axiom work for triplets involving the zero element. Table 1. An idempotent semi-group and an associative shelf. ∗ 0 1 2 3 0 0 0 0 0 1 0 1 1 1 2 0 1 2 1 3 0 3 3 3 ∗ 0 1 2 3 0 0 0 0 0 1 0 0 0 0 2 0 1 2 2 3 0 1 2 3 Let (X, ∗) be an associative shelf or an idempotent semi-group with zero element e. Consider homomorphisms (degeneracy maps) sj,n : Cn −→ Cn+1 for all 0 ≤ j ≤ n given by sj,n (x0 , x1 , ..., xn ) = (x0 , x1 , ..., xj−1 , e, e, xj+1 , ..., xn ). Proposition 1.9. (Cn , di , sj ), the pre-simplicial module leading on to lbo homology along with the sj maps defined above is a very weak simplicial module. Proof. To prove the proposition, it is necessary to verify the three axioms of a very weak simplicial module. The first axiom follows from Proposition 1.5. For the second and the third axioms, the various possibilities are tested. 3As for pre-simplicial modules, to simplify notation the second index of the face maps will be omitted in the rest of this note. 8 SUJOY MUKHERJEE A2: si ◦ sj = sj+1 ◦ si , for i ≤ j. Case 1: As before, for n = 0, 1, 2, 3, checking all the possibilities one by one suffices. Case 2: Let n > 3, 0 < i = j < n. Let (..., xi−1 , xi , xi+1 , xi+2 , ...) be an arbitrary element in the domain of sj . Then, si ◦ sj (..., xi−1 , xi , xi+1 , xi+2 , ...) = si ◦ si (..., xi−1 , xi , xi+1 , xi+2 , ...) = si (..., xi−1 , e, e, xi+1 , xi+2 , ...) = (..., xi−1 , e, e, e, xi+1 , xi+2 , ...). On the other hand, sj+1 ◦ si (..., xi−1 , xi , xi+1 , xi+2 , ...) = si+1 ◦ si (..., xi−1 , xi , xi+1 , xi+2 , ...) = si+1 (..., xi−1 , e, e, xi+1 , xi+2 , ...) = (..., xi−1 , e, e, e, xi+1 , xi+2 , ...). Therefore, both the sides are equal. Note that no additional axioms were needed. Case 3: Let n > 3, 0 < i < j < n, j = i + 1. Let (..., xi−1 , xi , xi+1 , xi+2 , ...) be an arbitrary element in the domain of sj . Then, si ◦ sj (..., xi−1 , xi , xi+1 , xi+2 , ...) = si ◦ si+1 (..., xi−1 , xi , xi+1 , xi+2 , ...) = si (..., xi−1 , xi , e, e, xi+2 , ...) = (..., xi−1 , e, e, e, e, xi+2 , ...). On the other hand, sj+1 ◦ si (..., xi−1 , xi , xi+1 , xi+2 , ...) = si+2 ◦ si (..., xi−1 , xi , xi+1 , xi+2 , ...) = si+2 (..., xi−1 , e, e, xi+1 , xi+2 , ...) = (..., xi−1 , e, e, e, e, xi+2 , ...). Once again, both the sides are equal without the need of any additional axiom. The computations for the cases when j > i + 1 are similar and equality holds as there is no interaction between the two maps like in the previous  case. sj−1,n−1 ◦ di,n , for i < j, A3: di,n ◦ sj,n−1 = sj,n−1 ◦ di−1,n , for i > j + 1. Case 1: Once again for n = 0, 1, 2, 3, the small number of possibilities are verified. Case 2: Let n > 3, 0 < i < j < n, j = i + 1, Let (..., xi−1 , xi , xi+1 , xi+2 , ...) be an arbitrary element in the domain of di , sj . Then, di ◦ sj (..., xi−1 , xi , xi+1 , xi+2 , ...) = di ◦ si+1 (..., xi−1 , xi , xi+1 , xi+2 , ...) = di (..., xi−1 , xi , e, e, xi+2 , ...) = (..., xi−1 ∗ xi , xi ∗ e, e, xi+2 , ...). A HOMOLOGY THEORY FOR A SPECIAL FAMILY OF SEMI-GROUPS 9 On the other hand, sj−1 ◦ di (..., xi−1 , xi , xi+1 , xi+2 , ...) = si ◦ di (..., xi−1 , xi , xi+1 , xi+2 , ...) = si (..., xi−1 ∗ xi , xi ∗ xi+1 , xi+2 , ...) = (..., xi−1 ∗ xi , e, e, xi+2 , ...). Therefore, both the sides are equal as e is a right zero. Case 3: Let n > 3, 0 < i < j < n, j = i+2, Let (..., xi−1 , xi , xi+1 , xi+2 , xi+3 , ...) be an arbitrary element in the domain of di , sj . Then, di ◦ sj (..., xi−1 , xi , xi+1 , xi+2 , xi+3 , ...) = di ◦ si+2 (..., xi−1 , xi , xi+1 , xi+2 , xi+3 , ...) = di (..., xi−1 , xi , xi+1 , e, e, xi+3 , ...) = (..., xi−1 ∗ xi , xi ∗ xi+1 , e, e, xi+3 , ...). On the other hand, sj−1 ◦ di (..., xi−1 , xi , xi+1 , xi+2 , xi+3 , ...) = si+1 ◦ di (..., xi−1 , xi , xi+1 , xi+2 , xi+3 , ...) = si+1 (..., xi−1 ∗ xi , xi ∗ xi+1 , xi+2 , xi+3 , ...) = (..., xi−1 ∗ xi , xi ∗ xi+1 , e, e, xi+3 , ...). Equality holds once again without the need of any additional axiom. The remaining cases for the first part of the axiom are similar to the last case as there is no interaction between the two maps and therefore are not computed separately. The computations for the second part of the axiom are similar. However, it should be noted that in the first part of the axiom, right zero was required. For the second part of the axiom to hold, left zero is necessary. Moreover, verification of the cases for j = n just require a shift in indexes and are left for the reader to verify.  It is possible to construct degenerate sub-complexes for very weak simplicial modules by dividing by the relation di ◦ si − di+1 ◦ si analogous to degenerate sub-complexes for simplicial modules [Prz2]. 1.3. A non-cyclic version of lbo homology. As was mentioned in the last subsection, for the same algebraic structures it is possible to form a different (not completely!) homology theory which is non-cyclic and less interesting. The presimplicial module leading on to this version of lbo homology is as follows. Let (X, ∗) be a semi-group satisfying a ∗ b ∗ b ∗ c = a ∗ b ∗ c and Cnnc = ZX n+1 nc for 0 ≤ i ≤ n be given by, for n ≥ 0 and trivial otherwise. Let di : Cnnc −→ Cn−1 (1.3)  if i=0,  (x0 ∗ x1 , x2 , · · · , xn−1 , xn ) if i=n, di (x0 , x1 , · · · , xn ) = (x0 , x1 , · · · , xn−2 , xn−1 ∗ xn )   (x0 , x1 , · · · , xi−2 , xi−1 ∗ xi , xi ∗ xi+1 , xi+2 , · · · , xn ) else. 10 SUJOY MUKHERJEE 1.1 and 1.3 have different face maps in the extreme cases. It is not very difficult to observe that all the conditions of a pre-simplicial module are satisfied and therefore after defining boundary maps ∂nnc the theorem below follows. Theorem 1.10. (Cnnc , ∂nnc ) is a chain complex. In particular, ∂1 (x0 , x1 ) = x0 ∗ x1 − x0 ∗ x1 = 0, for (x0 , x1 ) ∈ ZX 2 . Therefore, for a semi-group (X, ∗) satisfying a ∗ b ∗ b ∗ c = a ∗ b ∗ c, H0nc (X) = C0nc = ZX. 2. Geometric realization of the pre-simplicial set leading to lbo homology In a pre-simplicial module if the chain modules are replaced with sets (i.e. without the module structure) with appropriate differentials, the resulting structure is known as a pre-simplicial set (also known as semi-simplicial complex). A presimplicial set leads on to a CW complex which is built by gluing simplexes together using the face maps of the pre-simplicial set [Gie, Hu, Lod, Mil, Prz2]. The advantage of doing this is that the homology groups of a homology theory which is completely developed algebraically can be computed by using simplicial homology which is very well developed. Moreover, the construction being well defined, the geometric structures obtained at each dimension are invariants of the underlying algebraic structure. The idea, with more details in the context of lbo homology is as follows. Definition 2.1. A pre-simplicial set (Xn , di,n ) consists of a sequence of sets Xn for n ≥ 0, and face maps di,n : Xn −→ Xn−1 for all 0 ≤ i ≤ n such that for i < j, di,n ◦ dj,n+1 = dj−1,n ◦ di,n+1 .4 Figure 4. The standard 0, 1, 2, and 3 dimensional simplexes. A pre-simplicial set leads to a pre-simplicial module by changing the sequence of sets Xn to a sequence of free modules Xn over a ring R. The converse is not true in general. Therefore, a pre-simplicial set can be converted in to a homology theory by the technique discussed in the last section. By definition of lbo homology 4As for pre-simplicial modules, to simplify notation the second index of the face maps will be omitted in the rest of this note. A HOMOLOGY THEORY FOR A SPECIAL FAMILY OF SEMI-GROUPS 11 and Proposition 1.5, the pre-simplicial module leading on to lbo homology is a pre-simplicial set. Let L be a pre-simplicial set. Let the category ∆ be the co-pre-simplicial space with standard simplices as the objects, n X ∆n = {(y0 , y1 , ..., yn ) ∈ Rn+1 such that yi = 1, yi ≥ 0}. i=0 The morphisms (co-face maps) are defined by di : ∆n −→ ∆n+1 given by di (y0 , y1 , ..., yn ) = (y0 , y1 , ..., yi−1 , 0, yi , ..., yn ). The co-face maps satisfy di ◦ dj−1 = dj ◦ di for i < j. Then the geometric realization of L denoted by |L| is the CW complex associated to L, that is for x ∈ Xn and y ∈ ∆n−1 , F n n≥0 (Xn × ∆ ) . |L| = (x, di (y)) = (di (x), y) Here Xn has discrete topology and |L| has quotient topology. Figure 4 shows the standard 0, 1, 2, and 3 dimensional cells. Now let us visualize the first few cells of the CW complex corresponding to lbo homology. For this, let us recollect the first few boundary maps. Let (x0 , x1 , ...xn ) ∈ X n. ∂1 (x0 , x1 ) = x0 ∗ x1 ∗ x0 − x1 ∗ x0 ∗ x1 . ∂2 (x0 , x1 , x2 ) = (x0 ∗ x1 , x2 ∗ x0 ) − (x0 ∗ x1 , x1 ∗ x2 ) + (x2 ∗ x0 , x1 ∗ x2 ). ∂3 (x0 , x1 , x2 , x3 ) = (x0 ∗ x1 , x2 , x3 ∗ x0 ) − (x0 ∗ x1 , x1 ∗ x2 , x3 ) + (x0 , x1 ∗ x2 , x2 ∗ x3 ) − (x3 ∗ x0 , x1 , x2 ∗ x3 ). Corresponding to lbo homology let L be the pre-simplicial set defined for a finite associative shelf or a finite idempotent semi-group (X, ∗) having n elements. Then the 0-cells of the CW complex are n points, each corresponding to one element from the algebraic structure. The 1 dimensional cells are edges corresponding to the gluing instructions obtained from the face maps of lbo homology and so on. Figures 5 and 6 demonstrate the geometric realization of the individual cells obtained from lbo homology in small dimensions. In Figure 6, (x0 , x1 , x2 , x3 ) denotes the 3 dimensional cell, the blue tuples represent the four triangles, the red ones represent the six edges and the expressions in black correspond to the four vertices.5 The figure is easily interpreted after the following routine calculation. ∂3 (x0 , x1 , x2 , x3 ) = (x0 ∗ x1 , x2 , x3 ∗ x0 ) − (x0 ∗ x1 , x1 ∗ x2 , x3 ) + (x0 , x1 ∗ x2 , x2 ∗ x3 ) − (x3 ∗ x0 , x1 , x2 ∗ x3 ). ∂2 (x0 ∗ x1 , x2 , x3 ∗ x0 ) = (x0 ∗ x1 ∗ x2 , x3 ∗ x0 ∗ x1 ) − (x0 ∗ x1 ∗ x2 , x2 ∗ x3 ∗ x0 ) + (x3 ∗ x0 ∗ x1 , x2 ∗ x3 ∗ x0 ). ∂2 (x0 ∗ x1 , x1 ∗ x2 , x3 ) = (x0 ∗ x1 ∗ x2 , x3 ∗ x0 ∗ x1 ) − (x0 ∗ x1 ∗ x2 , x1 ∗ x2 ∗ x3 ) + (x3 ∗ x0 ∗ x1 , x1 ∗ x2 ∗ x3 ). ∂2 (x0 , x1 ∗ x2 , x2 ∗ x3 ) = (x0 ∗ x1 ∗ x2 , x2 ∗ x3 ∗ x0 ) − (x0 ∗ x1 ∗ x2 , x1 ∗ x2 ∗ x3 ) + (x2 ∗ x3 ∗ x0 , x1 ∗ x2 ∗ x3 ). 5For the vertices, the parentheses are not used for simpler notation. 12 SUJOY MUKHERJEE Figure 5. The 0, 1, and 2 dimensional simplexes from lbo homology. ∂2 (x3 ∗ x0 , x1 , x2 ∗ x3 ) = (x3 ∗ x0 ∗ x1 , x2 ∗ x3 ∗ x0 ) − (x3 ∗ x0 ∗ x1 , x1 ∗ x2 ∗ x3 ) + (x2 ∗ x3 ∗ x0 , x1 ∗ x2 ∗ x3 ). ∂1 (x0 ∗ x1 ∗ x2 , x3 ∗ x0 ∗ x1 ) = (x0 ∗ x3 ∗ x0 ∗ x1 ∗ x2 ) − (x3 ∗ x2 ∗ x3 ∗ x0 ∗ x1 ). ∂1 (x0 ∗ x1 ∗ x2 , x2 ∗ x3 ∗ x0 ) = (x0 ∗ x3 ∗ x0 ∗ x1 ∗ x2 ) − (x2 ∗ x1 ∗ x2 ∗ x3 ∗ x0 ). ∂1 (x3 ∗ x0 ∗ x1 , x2 ∗ x3 ∗ x0 ) = (x3 ∗ x2 ∗ x3 ∗ x0 ∗ x1 ) − (x2 ∗ x1 ∗ x2 ∗ x3 ∗ x0 ). ∂1 (x0 ∗ x1 ∗ x2 , x1 ∗ x2 ∗ x3 ) = (x0 ∗ x3 ∗ x0 ∗ x1 ∗ x2 ) − (x1 ∗ x0 ∗ x1 ∗ x2 ∗ x3 ). ∂1 (x3 ∗ x0 ∗ x1 , x1 ∗ x2 ∗ x3 ) = (x3 ∗ x2 ∗ x3 ∗ x0 ∗ x1 ) − (x1 ∗ x0 ∗ x1 ∗ x2 ∗ x3 ). ∂1 (x2 ∗ x3 ∗ x0 , x1 ∗ x2 ∗ x3 ) = (x2 ∗ x1 ∗ x2 ∗ x3 ∗ x0 ) − (x1 ∗ x0 ∗ x1 ∗ x2 ∗ x3 ). Let us now understand the geometric realization for the associative shelf shown in Table 2. There are two elements in the associative shelf. Therefore, in the geometric realization Table 2. A small there are two 0 dimensional simplexes (verassociative shelf. tices) denoted by 0 and 1. There are four 1 ∗ 0 1 dimensional simplexes (edges) and eight 2 di0 0 0 mensional simplexes (triangles). 1 1 1 ∂1 (0, 0) = 0−0, and is therefore represented by a loop starting at 0. Due to same reason, (1, 1) is represented by a loop starting at 1. ∂1 (0, 1) = 0 ∗ 1 ∗ 0 − 1 ∗ 0 ∗ 1. Using the multiplication table of the associative shelf we obtain, ∂1 (0, 1) = 0 − 1. Similarly, ∂1 (1, 0) = 1 − 0. The geometric realization of the 1-skeleton is demonstrated in Figure 7. The geometric structure is homotopy equivalent to a wedge of three A HOMOLOGY THEORY FOR A SPECIAL FAMILY OF SEMI-GROUPS 13 Figure 6. The 3 dimensional simplex from lbo homology. Figure 7. The 1-skeleton of the CW complex. circles (S1 ∨ S1 ∨ S1 ) and has 0th homology Z which matches with the 0th lbo homology group of the associative shelf. Taking into account the second boundary map to visualize the complex up to the third dimension gets a little complicated. 14 SUJOY MUKHERJEE ∂2 (0, 0, 0) = (0, 0) − (0, 0) + (0, 0). ∂2 (0, 0, 1) = (0, 1) − (0, 0) + (1, 0). ∂2 (0, 1, 0) = (0, 0) − (0, 1) + (0, 1). ∂2 (0, 1, 1) = (0, 1) − (0, 1) + (1, 1). ∂2 (1, 0, 0) = (1, 0) − (1, 0) + (0, 0). ∂2 (1, 0, 1) = (1, 1) − (1, 0) + (1, 0). ∂2 (1, 1, 0) = (1, 0) − (1, 1) + (0, 1). ∂2 (1, 1, 1) = (1, 1) − (1, 1) + (1, 1). The simplexes (0, 0, 0) and (1, 1, 1) fill up the closed curves formed by (0, 0) and (1, 1) in Figure 7 and form contractible discs (triangles). The simplexes (0, 0, 1) and (1, 1, 0) are symmetric up to change of indices. Figure 8 shows the geometric realization of (0, 0, 1). The simplexes (0, 1, 0), (0, 1, 1), (1, 0, 0), and (1, 0, 1) are homotopic to cones over the loops (0, 0) or (1, 1). The resulting structure after gluing all the simplexes appropriately to Figure 7 looks like a cylinder capped off at both ends with three hollow spaces inside. From the ends of the cylinder with the caps as bases two cones start and are attached to the cylinder along the edges (0, 1) and (1, 0). In particular, the fundamental group of the geometric realization of X is trivial and therefore H1 (X) = 0. In fact, computer calculations show that Hi (X) = 0 for 0 < i < 10. Figure 8. Geometric realization of the simplex (0, 0, 1). 2.1. A comparison between algebraic and geometric arguments. This subsection comprises of the interpretation of H0 (X) when X is a proto unital shelf or idempotent semi-group. The interpretation is first done algebraically in the form of Propositions 2.2 and 2.3 followed by the interpretation using geometric arguments. In particular, the following discussion provides a simpler computation technique for H0 (X) when X is a finite proto unital shelf or a finite idempotent semi-group. However, before that consider the following observations which prove the equivalence of the commutativity axiom and ∂0 = 0 (braid group relation) in idempotent semi-groups and proto unital shelves. Proposition 2.2. Let (X, ∗) be a proto unital shelf or an idempotent semi-group and a, b ∈ X. Then a ∗ b = b ∗ a if and only if a ∗ b ∗ a = b ∗ a ∗ b. A HOMOLOGY THEORY FOR A SPECIAL FAMILY OF SEMI-GROUPS 15 Proof. (1) For a proto unital shelf, a ∗ b ∗ a = b ∗ a ∗ b ⇐⇒ b ∗ a = a ∗ b. In other words, a ∗ b 6= b ∗ a ⇐⇒ a ∗ b ∗ a 6= b ∗ a ∗ b. (2) For an idempotent semi-group a ∗ b ∗ a = b ∗ a ∗ b =⇒ a ∗ b ∗ a ∗ b = b ∗ a ∗ b ∗ b =⇒ a ∗ b = b ∗ a ∗ b. Similarly, a ∗ b ∗ a = b ∗ a ∗ b =⇒ b ∗ a ∗ b ∗ a = b ∗ b ∗ a ∗ b =⇒ b ∗ a = b ∗ a ∗ b. Together, they imply a ∗ b = b ∗ a. Conversely, a ∗ b = b ∗ a =⇒ b ∗ a ∗ b = b ∗ b ∗ a = b ∗ a, and a ∗ b = b ∗ a =⇒ a ∗ b ∗ a = b ∗ a ∗ a = b ∗ a. Together, they imply a ∗ b ∗ a = b ∗ a ∗ b. Therefore, a ∗ b 6= b ∗ a ⇐⇒ a ∗ b ∗ a 6= b ∗ a ∗ b.  Figure 9. The geometric interpretation of Proposition 2.3. Proposition 2.3. (1) Let (X, ∗) be a semi-group satisfying a ∗ b ∗ b ∗ c = a ∗ b ∗ c for a, b, c ∈ X. Then, ZX H0 (X) = , ∼ where ∼ is generated in the following way. For a, b ∈ X, a ∼ b if there exist x, y ∈ X such that a = x ∗ y ∗ x and b = y ∗ x ∗ y. (2) Let (X, ∗) be a proto unital shelf or an idempotent semi-group. Then, ZX H0 (X) = , ≈ 16 SUJOY MUKHERJEE where ≈ is generated in the following way. For a, b ∈ X, a ≈ b if there exist x, y ∈ X such that a = x ∗ y and b = y ∗ x. In particular, if (X, ∗) is commutative, H0 (X) = ZX. Proof. (1) It follows immediately from the definition of the first boundary map, namely, ∂1 (a, b) = a ∗ b ∗ a − b ∗ a ∗ b, for a, b ∈ X. (2) When (X, ∗) is a proto unital shelf it follows because x ∗ y = y ∗ x ∗ y and x ∗ y ∗ x = y ∗ x for x, y ∈ X. When (X, ∗) is an idempotent semi-group, it has to be shown that relations ∼ and ≈ are equal. Let x ∗ y ≈ y ∗ x. Then, (y ∗ x) ∗ y ≈ (x ∗ y) ∗ y = x ∗ y ≈ y ∗ x = (y ∗ x) ∗ x ≈ (x ∗ y) ∗ x. On the other hand, let x ∗ y ∗ x ∼ y ∗ x ∗ y. Then, y ∗ x = y ∗ x ∗ y ∗ x = y ∗ x ∗ y ∗ y ∗ x ∼ y ∗ (y ∗ x) ∗ y = y ∗ x ∗ y ∼ x ∗ y ∗ x = x ∗ (x ∗ y) ∗ x ∼ x ∗ y ∗ x ∗ x ∗ y = x ∗ y ∗ x ∗ y = x ∗ y.  Table 3. An idempotent semi-group (on the left) and a semigroup neither satisfying the axioms of a proto unital shelf nor the idempotence axiom (on the right). ∗ 0 1 2 3 0 0 0 0 0 1 0 1 1 1 2 0 1 2 1 3 0 3 3 3 ∗ 0 1 2 3 0 0 0 0 0 1 0 0 0 1 2 2 2 2 2 3 2 2 2 3 The zeroth lbo homology group of semi-groups satisfying a∗b∗c = a∗b∗b∗c can’t be computed in general just by studying commutativity in the multiplication table as the equivalence of the braid group relation and the commutativity axiom does not hold in general. For example, consider the semi-group X shown on the right in Table 3. H0 (X) = Z3 , which would not be the result if the above proposition is used to compute H0 (X). The example below illustrates how the above proposition is used to compute the 0th lbo homology group of idempotent semi-groups and proto unital shelves. Example 2.4. Consider the idempotent semi-group of four elements shown in Table 3. There are two places in the multiplication table where the commutativity axiom is not satisfied. 1 ∗ 3 6= 3 ∗ 1, 2 ∗ 3 6= 3 ∗ 2. Therefore, X = {0}∪{1, 3}∪{2} is the partition from Proposition 2.3. The number of equivalence classes is 3. Hence, H0 (X) = Z3 . Let (X, ∗) be a finite proto unital shelf or a finite idempotent semi-group. Then H0 (X) is the zero homology group of the 1-skeleton in the geometric realization. The zero homology group counts the number of components of the geometric structure. In the 1-skeleton, vertices are joined by edges (bringing down the number of components) when a ∗ b ∗ a 6= b ∗ a ∗ b. In the case of proto unital shelves or idempotent semi-groups this equivalently happens when a ∗ b 6= b ∗ a. In particular, A HOMOLOGY THEORY FOR A SPECIAL FAMILY OF SEMI-GROUPS 17 the edge (a, b) and (b, a) joins the components corresponding to a ∗ b and b ∗ a. Translating the language of equivalent classes to components, this basically means that two vertices x and y are in the same component of the 1-skeleton if for two vertices a, b, the image of the edge (a, b) is not zero, x = a ∗ b and y = b ∗ a. In particular, when (X, ∗) is commutative, the number of components is equal to the number of elements in X and therefore the zero homology group of the 1-skeleton is Z |X| . 3. Temperley-Lieb algebra, Jones’ monoids and lbo homology The notion of a Temperley-Lieb algebra was introduced in 1971 by Harold N. V. Temperley and Elliott H. Lieb [TL]. A visually appealing diagrammatic definition of the algebra was given by Louis H. Kauffman [Kau]. Briefly, the idea is as follows [Abr, PT]. Figure 10. Demonstration of multiplication in Temperley-Lieb algebra. Consider rectangles with n marked points on the upper side and another n marked points on the lower side. The marked points are then paired with strings so that the strings do not intersect. These diagrams are identified up to planar isotopy and are called Kauffman diagrams. The number of Kauffman diagrams for 2n marked points is equal to the nth Catalan number. Multiplication between two such diagrams A and B is done by identifying the lower side of the rectangle corresponding to A with the upper side of the rectangle corresponding to B. In other words, the diagrams are concatenated or stacked. Closed loops are eliminated by multiplying by r where R is a commutative ring and r ∈ R, a fixed element. An example of the operation and elimination of the closed loop is shown in Figure 10. For 2n points, the n-strand Temperley-Lieb algebra denoted by T Ln (r) is defined as an R-linear algebra spanned by the Kauffman diagrams. Equivalently, Temperley-Lieb algebras can be defined using generators and relations. Moreover, the set of Kauffman diagrams for n pairs of points can be given a monoid structure by treating r as a generator along with the standard generating set. Considering two Kauffman diagrams equivalent up to elimination of 18 SUJOY MUKHERJEE trivial components the algebraic structure obtained is called the Jones’ monoid [DE, DEEFHHL]. The Jones’ monoid obtained from T Ln (r) is denoted by Jn . The primary reason for looking at Temperley-Lieb algebras in connection to lbo homology is the Jones’ monoids. It is not difficult to observe that many of the elements in these monoids are idempotent with the concatenation operation. Further, the operation is also associative. The question one should ask at this time is whether or not these idempotent elements can be identified and whether or not they form a closed sub-structure inside the Jones’ monoids. Well, it turns out to be not very obvious. All the five elements in J3 are idempotent elements. However, two of the fourteen elements in J4 are not idempotent. Moreover, the twelve idempotent elements are not closed under the concatenation operation. Figure 11 shows the non idempotent elements in J4 . Notice that they are mirror images of each other. Figure 11. Non-idempotent elements in J4 . I. Dolinka et al. characterized the idempotent elements in the Jones’ monoid [DEEFHHL]. Using the notion of an interface graph, they proved the following proposition. Proposition 3.1 (I. Dolinka et al.). An element in the Jones’ monoid is idempotent iff its interface graph has no odd path. The following table displays the number of idempotents in the Jones’ monoids Jn with growing n. The remark after the table provides the pathway for constructing families of idempotent sub-monoids of Jn . Table 4. Idempotents in Jn . 1 1 2 2 3 5 4 5 6 12 36 96 7 8 311 886 9 3000 Remark 3.2. The number of partitions of the integer n whose largest part is k is equal to the number of partitions of n with k parts. If this value for given n is denoted by nk then nk = (n − k)k + (n − 1)k−1 . The value of k which is of interest in the current context is 3. Then the recurrence relation becomes n3 = A HOMOLOGY THEORY FOR A SPECIAL FAMILY OF SEMI-GROUPS 19 (n − 3)3 + (n − 1)2 . The first few terms in this sequence starting for n = 1 are 1, 2, 3, 4, 5, 7, 8, 10, 12, 14.... Definition 3.3. Let j ∈ Jn . P = a1 + a2 + ... + ak for some positive k is said to a partition of j if j can be divided with (k − 1) vertical line segments with the divided parts having a1 , a2 , ..., ak strings. Figure 12 demonstrates the idea of partitioning elements in Jones’ monoids. In the figure, n = 10 and P = 2 + 1 + 2 + 5. Notice that the identity element in Jn admits every partition of P . Figure 12. Partitioning elements in Jones’ monoids. Proposition 3.4. Let P be a partition of the natural number n with each part having value at most 3. Denote by JSM Pn 6 the set of elements in Jn for which P is a partition. Then JSM Pn is an idempotent monoid. Proof. As each part of the partition P has value at most 3, individually each of these are elements of J1 , J2 , or J3 and therefore idempotent. Globally, that is for the entire element idempotence follows as none of the parts interact with each other.  Note that two Jones’ sub-monoids in Jn are isomorphic if and only if they correspond to the same partition. Moreover, the trivial Jones’ sub-monoid is present in every Jn as every Jn admits the partition 1 + 1 + ... + 1(n-times). As is obvious by now, lbo homology can be computed for Jones’ sub-monoids. Since, Jones’ sub-monoids are idempotent semi-groups, they are not separately enumerated in this note. The reason behind eliminating trivial components in Kauffman diagrams earlier is that all the elements when composed with themselves do not generate the same number of trivial components and by definition the face maps of lbo homology do not allow this. 6Jones’ sub-monoid corresponding to partition P in J is abbreviated as JSM P . n n 20 SUJOY MUKHERJEE 4. Odds and ends There is much more to discover about lbo homology. Some ideas and experimental data are summarized in this section. 4.1. Preliminary computational data. This part of the note is dedicated towards preliminary computational data of lbo homology. To avoid lengthening the note unnecessarily, in this section the algebraic structures will be presented in programming notation. For example, the associative shelf in Table 1 is presented by {{0, 0, 0, 0}, {0, 0, 1, 1}, {0, 0, 2, 2}, {0, 0, 2, 3}}. The rows with a K(coffee cup) symbol on the left in Table 5 are also idempotent semi-groups and the rows with a K(coffee cup) symbol on the left in Table 6 are also associative shelves. Table 7 shows computations for semi-groups satisfying the axiom a ∗ b ∗ b ∗ c = a ∗ b ∗ c but not idempotence or right self-distributivity. Table 5. Lbo homology of associative shelves up to order 3. K K K K K K K K K K K K Associative shelf: X H0 (X) H1 (X) H2 (X) H3 (X) {{0, 0}, {0, 0}} Z2 Z3 Z4 Z7 2 {{0, 0}, {0, 1}} Z Z 0 Z {{0, 0}, {1, 1}} Z 0 0 0 {{0, 1}, {0, 1}} Z 0 0 0 3 8 20 {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}} Z Z Z Z57 3 6 9 {{0, 0, 0}, {0, 0, 0}, {0, 0, 1}} Z Z Z Z19 3 6 7 {{0, 0, 0}, {0, 0, 0}, {0, 0, 2}} Z Z Z Z21 2 5 7 {{0, 0, 0}, {0, 0, 0}, {2, 2, 2}} Z Z Z Z17 3 3 {{0, 0, 0}, {0, 0, 1}, {0, 0, 2}} Z Z Z Z5 3 4 {{0, 0, 0}, {0, 1, 0}, {0, 0, 2}} Z Z 0 Z6 2 {{0, 0, 0}, {0, 1, 0}, {2, 2, 2}} Z Z 0 Z {{0, 0, 0}, {0, 1, 1}, {0, 1, 1}} Z3 Z6 Z7 Z21 {{0, 0, 0}, {0, 1, 1}, {0, 1, 2}} Z3 Z3 0 Z7 2 2 {{0, 0, 0}, {0, 1, 1}, {0, 2, 2}} Z Z 0 Z4 {{0, 0, 0}, {0, 1, 2}, {0, 1, 2}} Z2 Z2 0 Z4 {{0, 0, 0}, {1, 1, 1}, {2, 2, 2}} Z 0 0 0 {{0, 0, 2}, {0, 0, 2}, {0, 0, 2}} Z2 Z5 Z7 Z17 {{0, 0, 2}, {0, 1, 2}, {0, 0, 2}} Z2 Z 0 Z {{0, 0, 2}, {0, 1, 2}, {0, 2, 2}} Z2 Z2 0 Z4 {{0, 1, 2}, {0, 1, 2}, {0, 1, 2}} Z 0 0 0 4.2. A comparison between the homology theories. This subsection is dedicated towards comparing the different homology theories for associative shelves. In particular, group homology, Hochschild homology, lbo homology, one term homology and rack homology are discussed. As the initial approach to lbo homology was from the side of self-distributive algebraic structures, group homology and Hochschild homology are not studied in detail. However, one can explore more in this direction. Unless otherwise stated, the notation for lbo homology remains unchanged. A brief description of the other four homology theories are as follows [Prz1]. A HOMOLOGY THEORY FOR A SPECIAL FAMILY OF SEMI-GROUPS 21 Table 6. Lbo homology of some idempotent semi-groups up to order 4. K K K K K Idempotent semi-group: X {{0, 0, 0}, {0, 1, 2}, {2, 2, 2}} {{0, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 3}} {{0, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 2, 0}, {3, 3, 3, 3}} {{0, 0, 0, 0}, {1, 1, 1, 1}, {2, 2, 2, 2}, {3, 3, 3, 3}} {{0, 0, 0, 0}, {0, 1, 1, 1}, {0, 1, 2, 3}, {0, 3, 3, 3}} {{0, 0, 0, 0}, {0, 1, 2, 3}, {0, 2, 2, 3}, {3, 3, 3, 3}} {{0, 0, 0, 0}, {0, 1, 1, 3}, {0, 2, 2, 3}, {3, 3, 3, 3}} {{0, 0, 0, 0}, {0, 1, 2, 3}, {0, 1, 2, 3}, {3, 3, 3, 3}} {{0, 0, 0, 0}, {0, 1, 2, 3}, {2, 2, 2, 2}, {3, 3, 3, 3}} {{0, 0, 0, 0}, {0, 1, 0, 1}, {0, 0, 2, 2}, {0, 1, 2, 3}} {{0, 1, 2, 3}, {0, 1, 2, 3}, {0, 1, 2, 3}, {0, 1, 2, 3}} H0 (X) Z2 Z4 Z3 Z Z3 Z3 Z2 Z2 Z2 Z4 Z H1 (X) Z2 Z9 Z4 0 Z5 Z5 Z4 Z4 Z3 Z5 0 H2 (X) 0 Z6 0 0 0 0 0 0 0 0 0 H3 (X) Z4 Z27 Z6 0 Z21 Z21 Z16 Z16 Z9 Z15 0 Table 7. Lbo homology of semi-groups satisfying a∗b∗c = a∗b∗b∗c up to order 4. Algebraic structure: X {{0, 0, 0}, {0, 0, 0}, {0, 1, 2}} {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 2, 3}} {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 1, 1, 3}} {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 1, 2, 3}} {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 2}, {0, 1, 0, 3}} {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 2, 0}, {0, 1, 0, 3}} {{0, 0, 0, 0}, {0, 1, 1, 1}, {0, 1, 1, 1}, {0, 1, 2, 3}} {{0, 0, 0, 0}, {0, 1, 1, 3}, {0, 1, 1, 3}, {3, 3, 3, 3}} {{0, 0, 0, 3}, {0, 0, 0, 3}, {0, 1, 2, 3}, {0, 0, 0, 3}} {{0, 0, 0, 3}, {0, 0, 0, 3}, {0, 1, 2, 3}, {0, 0, 3, 3}} {{0, 0, 2, 2}, {0, 0, 2, 2}, {0, 0, 2, 2}, {0, 1, 2, 3}} H0 (X) Z3 Z4 Z4 Z4 Z4 Z4 Z4 Z3 Z3 Z3 Z3 H1 (X) Z3 Z10 Z10 Z7 Z11 Z8 Z6 Z9 Z3 Z5 Z3 H2 (X) Z Z17 Z17 Z8 Z3 Z7 Z Z10 Z Z Z H3 (X) Z5 Z58 Z58 Z25 Z11 Z26 Z22 Z47 Z5 Z17 Z5 Definition 4.1. Let (X, ∗) be a semi-group. For n ≥ 0, let Cn = ZX n+1 and ∂n : Cn −→ Cn−1 given by: ∂n (x0 , x1 , ..., xn ) = (x1 , x2 , ..., xn ) + n−1 X (−1)i (x0 , x1 , ..., xi ∗ xi+1 , xi+2 , ..., xn ) i=1 + (−1)n (x0 , x1 , ..., xn−1 ). Then, (Cn , ∂n ) is a chain complex and the group homology groups denoted by H∗G (X) are defined in the usual way. Definition 4.2. Let (X, ∗) be a semi-group. For n ≥ 0, let Cn = ZX n+1 and ∂n : Cn −→ Cn−1 given by: ∂n (x0 , x1 , ..., xn ) = n−1 X (−1)i (x0 , x1 , ..., xi ∗xi+1 , xi+2 , ..., xn )+(−1)n (xn ∗x0 , x1 , ..., xn−1 ). i=0 Then, (Cn , ∂n ) is a chain complex and the Hochschild homology groups denoted by H∗H (X) are defined in the usual way. 22 SUJOY MUKHERJEE Definition 4.3. Let (X, ∗) be a shelf. For n ≥ 0, let Cn = ZX n+1 and ∂n : Cn −→ Cn−1 given by: ∂n (x0 , x1 , ..., xn ) = (x1 , x2 , ..., xn )+ n X (−1)i (x0 ∗xi , x1 ∗xi , ..., xi−1 ∗xi , xi+1 , xi+2 , ..., xn ). i=1 Then, (Cn , ∂n ) is a chain complex and the one term homology groups denoted by H∗O (X) are defined in the usual way. Definition 4.4. Let (X, ∗) be a shelf. For n ≥ 0, let Cn = ZX n+1 and ∂n : Cn −→ Cn−1 given by: ∂n (x0 , x1 , ..., xn ) = n X (−1)i {(x0 , x1 , ..., xi−1 , xi+1 , xi+2 , ...xn ) i=1 −(x0 ∗ xi , x1 ∗ xi , ..., xi−1 ∗ xi , xi+1 , xi+2 , ..., xn )}. Then, (Cn , ∂n ) is a chain complex and the rack homology groups denoted by H∗R (X) are defined in the usual way. The one term and rack homology groups of associative shelves were studied in [CMP]. In particular, it was proven that for associative shelves with a right fixed element the rack homology groups are Z in all dimensions. Moreover, it was observed that proto unital shelves always have right zero. Table 5 indicates that lbo homology groups of proto unital shelves are not constant. Unital shelves have trivial one term homology groups in all positive dimensions. In particular, one term homology groups of shelves with either a left zero or a right unit are trivial in all positive dimensions [Prz1]. Again, from Table 5 one may infer that lbo homology of such shelves is more interesting. 4.3. Open questions. With the very limited computational data that is there, one might suspect some patterns in lbo homology. They are as follows. Remark 4.5. Let (X, ∗) be an idempotent semi-group of size n for n > 3. Tables 5 and 6 suggest that H2 (X) = 0 for all but the trivial idempotent semi-group for each n. It would be interesting to find the reason behind this! Conjecture 4.6. There is no torsion in lbo homology. One possible way to attack the above conjecture is by studying the homotopy type of the CW complex formed by the geometric realization arising from lbo homology. Remark 4.7. There are not many geometric interpretations of the idempotence axiom. However, with such an interpretation, lbo homology may turn out to be a very useful invariant for those geometric structures assuming it would not be difficult to convert the associativity axiom in a similar manner. In connection to knot theory it might be useful to consider coloring knotted trivalent graphs. 5. Acknowledgements The author would like to thank Louis H. Kauffman, Józef H. Przytycki, and Masahico Saito for their useful comments and suggestions. A HOMOLOGY THEORY FOR A SPECIAL FAMILY OF SEMI-GROUPS 23 References [Abr] Samson Abramsky, Temperley-Lieb Algebra: From Knot Theory to Logic and Computation via Quantum Mechanics. Mathematics of Quantum Computing and Technology, 415–458, 2008. e-print: http://arxiv.org/abs/0910.2737 [CJKLS] J. S. Carter, D. Jelsovsky, S. Kamada, L. Langford, M. Saito, Quandle Cohomology and State-sum Invariants of Knotted Curves and Surfaces. Trans. Amer. Math. Soc. 355 (2003), no. 10, 3947-3989. e-print: http://arxiv.org/abs/math/9903135 [CMP] A. S. Crans, S. Mukherjee, J. H. Przytycki, On The Homology Of Associative Shelves. (pre-print) e-print: http://arxiv.org/abs/1603.08590 [DE] I. Dolinka, J. East, The idempotent generated subsemigroup of the Kauffman monoid. (preprint) e-print: http://arxiv.org/abs/1602.01157v1 [DEEFHHL] I. Dolinka, J. East, A. Evangelou, D. FitzGerald, N. Ham, J. Hyde, N. Loughlin, Idempotent Statistics of the Motzkin and Jones Monoids. (pre-print) e-print: http://arxiv. org/abs/1507.04838 [FRS1] R. Fenn, C. Rourke, B. Sanderson, An introduction to species and the rack space. M.E.Bozhuyuk (ed), Topics in Knot Theory (Proceedings of the Topology Conference, Erzurum), NATO Adv. Sci. Inst. Ser. C. Math. Phys. Sci., 399, Kluver Academic Publishers, 33-35, 1993. [FRS2] R. Fenn, C. Rourke, B. Sanderson, Trunks and classifying spaces. Applied Categorical Structures, 3, 1995, 321-356. [FRS3] R. Fenn, C. Rourke, B. Sanderson, James Bundles and Applications. preprint, 1996 eprint: http://www.maths.warwick.ac.uk/cpr/ftp/james.ps [Gie] J. B. Giever, On the Equivalence of Two Singular Homology Theories. Annals of Mathematics, Second Series, Vol. 51, No. 1 (Jan., 1950), pp. 178-191. [Hu] S. T. Hu, On the realizability of homotopy groups and their operations. Pacific Journal of Mathematics, Vol. 1, No. 4 (1951), pp. 583-602. [Kau] L. H. Kauffman, State models and the Jones’ polynomial. Topology, 26 (1987), no. 3, 395407. [Lod] J. L. Loday, Cyclic Homology. Grund. Math. Wissen. Band 301, Springer-Verlag, Berlin, 1992 (second edition, 1998). [Mil] J. Milnor, The Geometric Realization of a Semi-Simplicial Complex. Annals of Mathematics, Second Series, Vol. 65, No. 2 (Mar., 1957), pp. 357-362. [Prz1] J. H. Przytycki, Distributivity versus associativity in the homology theory of algebraic structures. Demonstratio Mathematica, 44(4), 2011, pp. 823-869. e-print:http://arxiv.org/ abs/1109.4850 [Prz2] J. H. Przytycki, Knots and distributive homology: from arc colorings to Yang-Baxter homology. Chapter in New Ideas in Low Dimensional Topology, Series on Knots and Everything, Vol. 56 (World Scientific, 2015), pp. 413-438. e-print:http://arxiv.org/abs/1409.7044 [PT] A. Piwocki, P. Traczyk, Representations of small braid groups in Temperley-Lieb algebra. Topology and its applications, 156 (2008), 392-398. [TL] H. N. V. Temperley, E. H. Lieb, Relations between the “percolation” and “colouring” problem and other graph-theoretical problems associated with regular planar lattices: some exact results for the “percolation” problem. Proc. Roy. Soc. London Ser. A, 322(1549):251280, 1971. Department of Mathematics, The George Washington University, Washington DC, USA. E-mail address: [email protected]
4math.GR
Published as a conference paper at ICLR 2015 M OVE E VALUATION IN G O U SING D EEP C ONVOLUTIONAL N EURAL N ETWORKS arXiv:1412.6564v2 [cs.LG] 10 Apr 2015 Chris J. Maddison University of Toronto [email protected] Aja Huang1 , Ilya Sutskever2 , David Silver1 Google DeepMind1 , Google Brain2 {ajahuang,ilyasu,davidsilver}@google.com A BSTRACT The game of Go is more challenging than other board games, due to the difficulty of constructing a position or move evaluation function. In this paper we investigate whether deep convolutional networks can be used to directly represent and learn this knowledge. We train a large 12-layer convolutional neural network by supervised learning from a database of human professional games. The network correctly predicts the expert move in 55% of positions, equalling the accuracy of a 6 dan human player. When the trained convolutional network was used directly to play games of Go, without any search, it beat the traditional-search program GnuGo in 97% of games, and matched the performance of a state-of-the-art Monte-Carlo tree search that simulates two million positions per move. 1 I NTRODUCTION The most frequently cited reason for the difficulty of Go, compared to games such as Chess, Scrabble or Shogi, is the difficulty of constructing an evaluation function that can differentiate good moves from bad in a given position. The combination of an enormous state space of 10170 positions, combined with sharp tactics that lead to steep non-linearities in the optimal value function, has led many researchers to conclude that representing and learning such a function is impossible (Müller, 2002). In previous years, the most successful methods have sidestepped this problem altogether using Monte-Carlo search, which dynamically evaluates a position through random sequences of self-play. Such programs have led to strong amateur level performance, but a considerable gap still remains between top professional players and the strongest computer programs. The majority of recent progress has been due to increased quantity and quality of prior knowledge, which is used to bias the search towards more promising states in both the search tree and during rollouts (Coulom, 2007; Gelly & Silver, 2011; Enzenberger et al., 2010; Baudiš & Gailly, 2012; Huang et al., 2011), and it is widely believed that this knowledge is the major bottleneck towards further progress (Huang & Müller, 2013). However, this knowledge again is ultimately compiled into an evaluation function or distribution that expresses a preference over moves. In this paper we address these fundamental questions of representation and learning of Go knowledge, by using a deep convolutional neural network (CNN). Although CNNs have previously been applied to the game of Go, with modest success (Schraudolph et al., 1994; Enzenberger, 1996; Sutskever & Nair, 2008), previous architectures have typically been limited to one hidden layer of relatively small size, and have not exploited recent advances in computational power. In this paper we use much deeper and larger CNNs of 12 hidden layers and several billion connections to represent and learn Go knowledge. We find that this increase in depth and size leads to a qualitative jump in performance, suggesting that contrary to previous beliefs, a strong move evaluation function for Go can indeed be represented and learnt by such architectures. We focus on a supervised learning setup, in which the network is trained to predict expert human moves, using a large database of professional 19 × 19 Go games. The predictive accuracy of the 1 Published as a conference paper at ICLR 2015 CNN on a held-out set of positions reaches 55%, which is a significant improvement over the 35% and 39% predictive accuracy reported for some of the strongest Go programs, and comparable to the performance of the 6 dan author on the same data set. Furthermore, when the CNN was used to play games by directly selecting the move recommended by the network output, without any search, it equalled the performance of state-of-the-art Monte-Carlo search programs, such as Pachi (Baudiš & Gailly, 2012), that are given 10,000 rollouts per move (i.e., programs that combine handcrafted or shallow prior knowledge with a search that simulates two million positions), and the first strong Monte-Carlo search program MoGo with 100,000 rollouts per move (Gelly & Silver, 2007). In addition, direct move selection using the CNN beat GnuGo (a traditional search program) in 97% of games.1 Finally, we demonstrate that the Go knowledge embodied by the CNN can be effectively combined with Monte-Carlo tree search, by using a delayed prior knowledge procedure. In this approach, the CNN is evaluated asynchronously on a GPU, and results are incorporated into the main search procedure once available. Using 100,000 rollouts per move, the overall search defeats the raw CNN in 87% of games. 2 P RIOR W ORK Convolutional neural networks have a long history in the game of Go. Schraudolph Schraudolph et al. (1994) trained a simple CNN (exploiting rotational, reflectional, and colour inversion symmetries) to predict final territory, by reinforcement learning from games of self-play. The resulting program beat a simplistic handcrafted program called Wally. NeuroGo (Enzenberger, 1996) used a more sophisticated architecture to predict final territory, eyes, and connectivity, again exploiting symmetries; and used a connectivity pathfinder to propagate information across weakly connected groups of stones. Enzenberger’s program also used reinforcement learning from self-play. When combined with an alpha-beta search, NeuroGo equalled the performance of GnuGo on 9 × 9 Go, and reached around 13 kyu on 19 × 19 Go. Sutskever & Nair (2008) applied convolutional networks to supervised learning of expert moves, but using a small 1 hidden layer CNN; this matched the state-of-the-art prediction performance, achieving 34.6% accuracy, but this was not sufficient to play Go at any reasonable level. The most successful current programs in Go are based on Monte-Carlo tree search (Kocsis & Szepesvári, 2006). The basic algorithm was augmented in MoGo to use prior knowledge to bootstrap value estimates in the search tree (Gelly & Silver, 2007); and to use abstractions over subtrees to accelerate the search (Gelly & Silver, 2011). The strongest current programs such as CrazyStone apply supervised learning to construct a move selection policy; this is then used to bias the exploration during search; a faster policy is also learned that selects moves during rollouts (Coulom, 2007). CrazyStone achieved a 35% move prediction accuracy by extracting a large database of common patterns from expert games, and combining them into a large linear softmax. Recent work in image recognition has demonstrated considerable advantages of deep convolutional networks over alternative architectures. Krizhevsky et al. (2012) were the first to achieve a very large performance gain with large and deep convolutional neural networks over traditional computer vision systems. Improved convolutional neural network architectures (primarily in the form of deeper networks) (Simonyan & Zisserman, 2014) provided another substantial improvement, culminating with Szegedy et al. (2014), who reduced the error rate of Krizhevsky et al. (2012) from 15.3% top-5 error to 7.0%. The power and generality of large and deep convolutional neural networks suggests that they may do well on other “visual” domains, such as computer Go. 3 DATA The dataset used in this work comes from the KGS Go Server. It consists of sequences of board positions st for complete games played between humans of varying rank. Board state information includes the position of all stones on the 19x19 board and the sequence allows one to determine the 1 Since we performed this research, we have learned that Clark & Storkey (2014) independently adopted a similar approach using a smaller 8-layer CNN to achieve 44% move prediction accuracy; and defeated GnuGo in 86% of games. 2 Published as a conference paper at ICLR 2015 Feature Black / white / empty Liberties Liberties after move Legality Turns since Capture size Ladder move KGS rank Planes 3 4 6 1 5 7 1 9 Description Stone colour Number of liberties (empty adjacent points) Number of liberties after this move is played Whether point is legal for current player How many turns since a move was played How many opponent stones would be captured Whether a move at this point is a successful ladder capture Rank of current player Table 1: Features used as inputs to the CNN. sequence of moves; a move at is encoded as a 1 of 361 indicator for each position on the 19x19 board. We collected 29.4 million board-state next-move pairs (st , at ) corresponding to 160,000 games. Each position st was preprocessed into a set of 19 × 19 feature planes φ(st ), that serve as input to the neural network. The features that we use come directly from the raw representation of the game rules (stones, liberties, captures, legality, turns since). In addition, we have one simple tactical feature representing a basic common pattern in Go known as ladders; in practice this adds a small performance benefit, but the results that we report would be qualitatively similar even without these features. Many of the features are split into multiple planes of binary values, for example in the case of liberties there are separate binary features representing whether each intersection has 1 liberty, 2 liberties, 3 liberties, >= 4 liberties. The feature planes are listed in Table 1.2 Finally, we used the following minor innovation. Our dataset consists of games from players of different strengths. Specifically, the KGS data contains more games by lower dan players, and fewer games by higher dan players. As a result, a naive approach to training on the KGS data will result in a network that primarily imitates weaker players. Alternatively, training only on games by stronger players would result in a massive reduction of training data. To mitigate this, we provided the network with an additional global inputs indicating the player’s rank. Specifically we add 9 feature planes each indicating a specific rank. This is like a 1 of 9 encoding that represents the strength of the current player. That is, if the network is learning to predict a move made by a d dan player, the dth rank feature plane is filled with 1s and the remaining 8 planes are filled with 0s. This has the effect of providing a dynamic bias to the network that depends on rank. Because every Go game is symmetric under reflections and rotations, we augmented the dataset by sampling uniformly from one of the 8 symmetric boards as we filled minibatches in gradient descent. The dataset was split into a training set of 27.4 million board-state next-move pairs and a test set of 2 million. This split was done before shuffling, so this corresponds to a test set with distinct games. 4 A RCHITECTURE & T RAINING In this section we describe the precise network architecture and the details of the training procedure. We used a deep convolutional neural network with 12 weight matrices for each of 12 layers and rectified linear non-linearities. The first hidden layer’s filters were of size 5×5 and the remainder were of size 3×3, with a stride of 1. Every layer operated on a 19 × 19 input space, with no pooling; outputs were zero-padded back up up to 19 × 19. The number of filters in each layer ranged from 64 to 192. In addition to convolutions, we also used position-dependent biases (following Sutskever & Nair (2008)). Our best model has 2.3 million parameters, 630 million connections, and 550,000 hidden units. The output layer of the CNN was also convolutional with position dependent biases, but with only two filters. Each produced a 19 × 19 plane, corresponding to inputs to two softmax distributions of size 361. The first softmax is the distribution over the next move if it is the black player’s turn, and 2 Due to the computational cost of running extensive experiments, it is possible that some of these features are unnecessary or redundant. 3 Published as a conference paper at ICLR 2015 the second softmax is the distribution over the next move if it is the white player’s move. Although both players may often prefer the same move, in general the optimal policy may select different moves for each player. We also experimented with weight symmetries Schraudolph et al. (1994). Given that the board is symmetric, it makes sense to force the filters and biases to be rotationally and reflectionally symmetric, by aggregating weight updates over the 8-fold symmetry group between connections. This type of symmetry is stronger than the symmetric data augmentation described above, since it enforces local symmetry of all filters at all locations on the board, not just global symmetry of the entire board. For training the network, we used asynchronous stochastic gradient descent (Dean et al., 2012) with 50 replicas each on its own GPU. All parameters were initialized randomly from a uniform[-0.05, 0.05]. Each replica was trained for 25 epochs with a batchsize of 128, a fixed learning rate of 0.128 normalized by batchsize, and no momentum. The network was then fine-tuned on a single GPU with vanilla SGD for 3 epochs with an annealed learning rate, beginning at half the learning rate for the asynchronous setting and halved again every epoch. After augmenting the dataset with random symmetries overfitting was very minor — our 10 layer network overfit by under 1% achieving 55% on the training set and 54.5% on the test set. Even at the end of training errors on the test set did not increase. This suggests that we are currently operating in an underfitting regime suggesting that further improvement is possible. All reported accuracies are on a held out test set. 5 R ESULTS 5.1 I NVESTIGATION OF W EIGHT S YMMETRIES We evaluated the effect of weight symmetries on a smaller CNN with 3 and 6 layers respectively. These networks were trained on a reduced feature set, excluding rank, liberties after move, capture size, ladder move, and only including a history of one move. The results are given in the table below: model 3 layer, 64 filters 3 layer, 64 filters, symmetric 6 layer, 192 filters 6 layer, 192 filters, symmetric % Accuracy 43.3 44.3 49.6 49.4 These results suggest that, perhaps surprisingly, weight symmetries have a strong effect on move prediction for small and shallow networks, but the effect appeared to disappear completely in larger and deeper networks. 5.2 ACCURACY AND P LAYING S TRENGTH To understand how the performance depends on network depth, we trained several networks of different depths. Each CNN used the same architecture as described above, except that the number of 3 × 3 layers was restricted to 3, 6, 10 and 12 respectively. We measured the prediction accuracy on the test set, and also the playing strength of the CNN when it was used to directly select moves. This was achieved by inputting the current position into the network, and selecting the action with maximum probability in the softmax output for the current player. Unless otherwise specified the KGS rank feature was set to its maximum setting. Performance was evaluated against the benchmark program GnuGo 3.8, running at its highest level 10. Comparisons are given with reported values for the 3 dan Monte-Carlo search program Aya3 ; simultaneously published results on a somewhat shallower CNN Clark & Storkey (2014)4 ; and also with the prediction accuracy of a 6 dan human (the second author) on randomly sampled positions 3 http://computer-go.org/pipermail/computer-go/2014-December/007018.html It should be noted that Clark & Storkey (2014) did not use the highly-predictive turns since feature, because they believed that it would hurt the network’s play. This is an interesting hypothesis, which this work does not address. 4 4 Published as a conference paper at ICLR 2015 1.0 0.9 % accuracy 0.8 0.7 0.6 12-layer CNN 6-layer CNN 3-layer CNN 3-layer, 16-filters CNN 0.5 0.4 0.3 1 5 10 15 20 25 30 35 40 45 n Figure 1: Probability that the expert’s move is within the top-n predictions of the network. The 10 layer CNN was omitted for clarity, but it’s performance is only slightly worse than 12 layer. Note y-axis begins at 0.30. from the test set. All games were scored using Chinese rules, refereed by GnuGo; duplicate games were excluded from results. It is apparent from the results that larger and deeper networks have qualitatively better performance than shallow networks, reaching 97% winning rate against GnuGo for a large 12-layer network compared to 3.4% for a small 3-layer network. Furthermore, the accuracy on the supervised learning task is clearly strongly correlated with playing performance, demonstrating that the knowledge learnt by the network generalises effectively to the real task of evaluating moves. Depth 3 layer 3 layer 6 layer 10 layer 12 layer 8 layer (Clark & Storkey, 2014)4 Aya 2014 Human 6 dan Size 16 filters 128 filters 128 filters 128 filters 128 filters ≤ 64 filters % Accuracy 37.5 48.0 51.2 54.5 55.2 44.4 38.8 52 ±5.8 % Wins vs. GnuGo 3.4 61.8 84.4 94.7 97.2 86 6 100 stderr ± 1.1 ± 2.6 ± 1.9 ± 1.2 ± 0.9 ± 2.5 ± 1.0 It is also valuable to know that the correct move is within the network’s n most confident predictions. If n can be kept small, then this knowledge can be used to reduce the program’s effective search space. We find that the top-n performance of our network is quite strong; in particular, the network is able to predict the correct expert move 94% of the time when n = 10. Next, we compared how the CNN performed when asked to imitate players of different strengths. We used the same CNN, trained on KGS data of all ranks, and asked it to select moves as if it was playing according to a specified rank. The opponent was a fixed 10 layer, 128 filter CNN trained without the KGS rank feature. The results clearly show that the network plays significantly better when it is asked to imitate a stronger player. KGS rank 1 dan 5 dan 9 dan % wins vs. 10-layer CNN 49.2 60.1 67.9 stderr ± 3.6 ± 1.6 ± 5.0 Finally, we evaluated the overall strength of the 12-layer CNN when used for move selection, by playing against several publicly available benchmark programs. All programs were played at the strongest available settings, and a fixed number of rollouts per move, as specified in the table. 5 Published as a conference paper at ICLR 2015 Opponent GnuGo MoGo Pachi Fuego Pachi Fuego Rollouts per move Games won by CNN 97.2 45.9 11.0 12.5 47.4 23.3 100,000 100,000 100,000 10,000 10,000 stderr ± 0.9 ± 4.5 ± 2.1 ± 5.8 ± 3.7 ± 7.8 The neural network is considerably stronger than the traditional search-based program GnuGo, and its performance is on a par with MoGo with 100,000 rollouts per move (Gelly & Silver, 2007), and Pachi running a somewhat reduced search of 10,000 rollouts per move (a search that visits approximately 2 million positions). It wins more than 10% of games against Fuego (latest svn revision 1966) (Enzenberger et al., 2010) and Pachi 10.99 playing at a strong level (using 100,000 rollouts per move over 16 threads).5 6 S EARCH The overarching goal of this work is to build a strong Go playing program. To this end, we attempted to integrate our move prediction network with Monte Carlo Tree Search (MCTS). Combining MCTS with a large deep neural network is far from trivial, since the CNN is slower than the natural speed of the search, and it is not feasible to evaluate every node with the neural network. The 12-layer network takes 0.15s to evaluate a minibatch of size 128.6 We address this problem by using asynchronous node evaluation. In asynchronous node evaluation, MCTS builds its search tree and tracks the new nodes that are added into the search tree. When the number of new nodes equals the minibatch size, all these new positions are submitted to the CNN for evaluation on a GPU. The GPU computes the move recommendations, while the search continues in parallel. Once the GPU computation is complete, the prior knowledge in the new nodes is updated to contain move evaluations from the CNN. The network evaluates the nodes in a FIFO order, in order to maximally influence the search tree. By using a single machine with Intel® Xeon® CPU E5-2643 v2 @ 3.50GHz and GeForce GTX Titan Black GPU, we are able to maintain a MCTS search at approximately 47,000 rollouts per second, without dropping CNN evaluations. However, it should be noted that the performance of asynchronous node evaluation is significantly less than a fully synchronous and serial implementation, since new information from the search is only utilised after a significant lag (around 0.15s in our case), due to the GPU computation. In addition, the MCTS engine utilised standard heuristics for computer Go: RAVE (Gelly & Silver, 2011), a UCT exploration strategy similar to Chaslot et al. (2008), and very simple rollouts based solely on 3 × 3 patterns (Huang et al., 2011). We measured the performance of the search-based program by playing games between the 12-layer CNN with MCTS, and a baseline 12-layer CNN without any search. Using 100,000 rollouts per move, the search-based program beats the baseline CNN in 87% of games. Rollouts per move 100,000 10,000 7 % wins against baseline 86.7 67.6 stderr ± 3.5 ± 2.6 D ISCUSSION In this work, we showed that large deep convolutional neural networks can predict the next move made by Go experts with an accuracy that exceeds previous methods by a large margin, approximately matching human performance. Furthermore, this predictive accuracy translates into much 5 The 8-layer network of Clark & Storkey (2014) won 12% of games against the older version Fuego 1.1 at 10 seconds per move on 2 × 1.6 GHz cores. We tested our 12-layer CNN against Fuego 1.1 at 5 and 10 seconds per move on 2 × 3.1GHz cores, winning 56% and 33% respectively. 6 Reducing the minibatch size does not significantly speed up end-to-end computation time in our GPU implementation. 6 Published as a conference paper at ICLR 2015 165 257 256 280 282 161 162 163 160 9 8 164 83 192 193 150 3 151 7 254 296 226 227 266 82 116 115 117 268 206 225 243 255 250 251 174 146 157 153 5 252 15 242 182 10 11 12 186 187 196 1 224 184 210 219 238 239 145 144 147 149 152 155 253 183 113 114 209 208 185 207 216 6 231 222 148 203 154 156 292 180 119 118 240 237 233 232 221 204 132 46 181 247 111 112 14 259 235 234 270 125 64 271 277 261 278 124 85 108 58 61 276 279 281 90 88 63 53 52 66 294 295 84 45 171 170 198 55 50 51 54 289 283 44 41 173 93 172 287 286 288 275 104 89 229 189 22 19 175 228 20 18 57 56 60 40 39 37 92 99 47 49 214 290 285 178 137 38 33 81 80 102 68 48 140 177 134 142 36 34 35 95 97 100 73 139 4 70 72 136 133 130 32 31 75 74 96 67 69 71 98 135 128 129 30 121 120 76 21 103 143 217 43 265 246 110 109 106 107 91 105 101 13 42 127 131 123 176 77 17 211 16 94 297 126 298 299 29 300 28 86 87 301 26 27 166 244 2 25 167 274 24 23 122 201 272 249 78 79 169 168 199 200 248 273 158 159 59 51 62 50 65 51 138 128 141 133 179 77 188 176 190 128 191 77 194 176 195 133 197 202 168 205 199 212 168 213 128 215 199 218 168 220 176 223 230 176 236 221 241 77 245 199 258 168 260 176 262 216 263 264 219 267 199 269 208 284 168 291 199 293 168 301 end 77 77 77 12layerCNN (?) Figure 2: A game played between the 12-layerB+Resign CNN (without any search) and Fuego (using 100k roll- outs/move). The CNN plays white. () (komi: 7.5) Fuego100k (?) stronger move evaluation and playing strength than has previously been possible. Without any search, the network is able to outperform traditional search based programs such as GnuGo, and compete with state-of-the-art MCTS programs such as Pachi and Fuego. Powered by TCPDF (www.tcpdf.org) In Figure 2 we present a sample game played by the 12-layer CNN (with no search) versus Fuego (searching 100K rollouts per move) which was won by the neural network player. It is clear that the neural network has implicitly understood many sophisticated aspects of Go, including good shape (patterns that maximise long term effectiveness of stones), Fuseki (opening sequences), Joseki (corner patterns), Tesuji (tactical patterns), Ko fights (intricate tactical battles involving repeated recapture of the same stones), territory (ownership of points), and influence (long-term potential for territory). It is remarkable that a single, unified, straightforward architecture can master these elements of the game to such a degree, and without any explicit lookahead. On the other hand, we note that the network still has weaknesses: notably it sometimes fails to understand the global picture, behaving as if the life and death status of large groups has been incorrectly assessed. Interestingly, it is precisely these global aspects of the game for which Monte-Carlo search excels, suggesting that these two techniques may be largely complementary. We have provided a preliminary proof-of-concept that MCTS and deep neural networks may be combined effectively. It appears that we now have two core elements that scale effectively with increased computational resource: scalable planning, using Monte-Carlo search; and scalable evaluation functions, using deep neural networks. In the future, as parallel computation units such as GPUs continue to increase in performance, we believe that this trajectory of research will lead to considerably stronger programs than are currently possible. 7 Published as a conference paper at ICLR 2015 R EFERENCES Baudiš, Petr and Gailly, Jean-loup. Pachi: State of the art open source go program. In Advances in Computer Games, pp. 24–38. Springer, 2012. Chaslot, Guillaume M. J-B., Winands, Mark H. M., van den Herik, H. Jaap, Uiterwijk, Jos W. H. M., and Bouzy, Bruno. Progressive strategies for Monte-Carlo tree search. New Mathematics and Natural Computation, 4:343–357, 2008. doi: 10.1142/S1793005708001094. Clark, Christopher and Storkey, Amos. Teaching deep convolutional neural networks to play Go. arXiv preprint arXiv:1412.3409, 2014. Coulom, Rémi. Efficient selectivity and backup operators in Monte-Carlo tree search. In Computers and games, pp. 72–83. Springer, 2007. Dean, Jeffrey, Corrado, Greg, Monga, Rajat, Chen, Kai, Devin, Matthieu, Mao, Mark, aurelio Ranzato, Marc’, Senior, Andrew, Tucker, Paul, Yang, Ke, Le, Quoc V., and Ng, Andrew Y. Large scale distributed deep networks. In Pereira, F., Burges, C.J.C., Bottou, L., and Weinberger, K.Q. (eds.), Advances in Neural Information Processing Systems 25, pp. 1223–1231. Curran Associates, Inc., 2012. URL http://papers.nips.cc/paper/ 4687-large-scale-distributed-deep-networks.pdf. Enzenberger, Markus. The integration of a priori knowledge into a Go playing neural network. URL: http://www. markus-enzenberger. de/neurogo. html, 1996. Enzenberger, Markus, Müller, Martin, Arneson, Broderick, and Segal, R. Fuego - an open-source framework for board games and Go engine based on monte carlo tree search. IEEE Trans. Comput. Intellig. and AI in Games, 2(4):259–270, 2010. Gelly, S. and Silver, D. Combining online and offline learning in UCT. In 17th International Conference on Machine Learning, pp. 273–280, 2007. Gelly, S. and Silver, D. Monte-Carlo tree search and rapid action value estimation in computer Go. Artificial Intelligence, 175:1856–1875, 2011. Huang, Shih-Chieh and Müller, Martin. Investigating the limits of Monte-Carlo tree search methods in computer Go. In Computers and Games - 8th International Conference, CG 2013, Yokohama, Japan, August 13-15, 2013, Revised Selected Papers, pp. 39–48, 2013. Huang, Shih-Chieh, Coulom, Rémi, and Lin, Shun-Shii. Monte-Carlo simulation balancing in practice. In Proceedings of the 7th International Conference on Computers and Games, pp. 81–92. Springer-Verlag, 2011. Kocsis, Levente and Szepesvári, Csaba. Bandit based Monte-Carlo planning. In Machine Learning: ECML 2006, pp. 282–293. Springer, 2006. Krizhevsky, Alex, Sutskever, Ilya, and Hinton, Geoffrey E. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012. Müller, Martin. Computer Go. Artif. Intell., 134(1-2):145–179, 2002. Schraudolph, Nicol N, Dayan, Peter, and Sejnowski, Terrence J. Temporal difference learning of position evaluation in the game of Go. Advances in Neural Information Processing Systems, pp. 817–817, 1994. Simonyan, Karen and Zisserman, Andrew. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. Sutskever, Ilya and Nair, Vinod. Mimicking Go experts with convolutional neural networks. In Artificial Neural Networks-ICANN 2008, pp. 101–110. Springer, 2008. Szegedy, Christian, Liu, Wei, Jia, Yangqing, Sermanet, Pierre, Reed, Scott, Anguelov, Dragomir, Erhan, Dumitru, Vanhoucke, Vincent, and Rabinovich, Andrew. Going deeper with convolutions. arXiv preprint arXiv:1409.4842, 2014. 8
9cs.NE
Characterizing Demand Graphs for the (Fixed-Parameter) Shallow-Light Steiner Network Problem arXiv:1802.10566v1 [cs.DS] 28 Feb 2018 Amy Babay Michael Dinitz Zeyu Zhang Department of Computer Science Johns Hopkins University March 1, 2018 Abstract We consider the Shallow-Light Steiner Network problem from a fixed-parameter perspective. Given a graph G, a distance bound L, and p pairs of vertices (s1 , t1 ), . . . , (sp , tp ), the objective is to find a minimum-cost subgraph G0 such that si and ti have distance at most L in G0 (for every i ∈ [p]). Our main result is on the fixed-parameter tractability of this problem with parameter p. We exactly characterize the demand structures that make the problem “easy”, and give FPT algorithms for those cases. In all other cases, we show that the problem is W[1]-hard. We also extend our results to handle general edge lengths and costs, precisely characterizing which demands allow for good FPT approximation algorithms and which demands remain W[1]-hard even to approximate. 1 Introduction In many network design problems we are given a graph G = (V, E) and some demand pairs (s1 , t1 ), (s2 , t2 ), . . . , (sp , tp ) ⊆ V × V , and are asked to find the “best” (usually minimum-cost) subgraph in which every demand pair satisfies some type of connectivity requirement. In the simplest case, if the demands are all pairs and the connectivity requirement is just to be connected, then this is the classical Minimum Spanning Tree problem. If we consider other classes of demands, then we get more difficult but still classical problems. Most notably, if the demands form a star (or any connected graph on V ), then we have the famous Steiner Tree problem. If the demands are completely arbitrary, then we have the Steiner Forest problem. Both problems are known to be in FPT with parameter p [12] (i.e., they can be solved in f (p) · poly(n) time for some function f ). There are many obvious generalizations of Steiner Tree and Steiner Forest of the general network design flavor given above. We will be particularly concerned with length-bounded variants, which are related to (but still quite different from) directed variants. In Directed Steiner Tree (DST) the input graph is directed and the demands are a directed star (either into or out of the root), while in Directed Steiner Network (DSN) the input graph and demands are both directed, but the demands are an arbitrary subset of V × V . Both have been well-studied (e.g., [8, 28, 9, 11, 1]), and in particular it is known that the same basic dynamic programming algorithm used for Steiner Tree will also give an FPT algorithm for DST. However, DSN is known to be W[1]-hard, so it is not believed to be in FPT [14]. In the length-bounded setting, we typically assume that the input graph and demands are undirected but each demand has a distance bound, and a solution is only feasible if every demand is connected within distance at most the given bound (rather than just being connected). One of 1 the most basic problems of this form is the Shallow-Light Steiner Tree problem (SLST), where the demands form a star with root r = s1 = s2 = · · · = sp and there is a global length bound L (so in any feasible solution the distance from r to ti is at most L for all i ∈ [p]). As with DST and DSN, SLST has been studied extensively [22, 25, 18, 17]. If we generalize this problem to arbitrary demands, we get the Shallow-Light Steiner Network problem, which is the main problem we study in this paper. Surprisingly, it has not received nearly the same amount of study (to the best of our knowledge, this paper is the first to consider it explicitly). It is formally defined as follows (note that we focus on the special case of unit lengths, and will consider general lengths in Sections 5 and 6): Definition 1.1 (Shallow-Light Steiner Network). Given a graph G = (V, E), a cost function c : E → R+ , a length function l : E → R+ , a distance bound L, and p pairs of vertices {s1 , t1 }, . . . , {sp , tp }. The objective of SLSN is to find a minimum cost subgraph G0 = (V, S), such that for every i ∈ [p], there is a path between si and ti in G0 with length less or equal to L. Let H be the graph with vertex set {s1 , . . . , sp , t1 , . . . , tp } and edge set {{s1 , t1 }, . . . , {sp , tp }}. We call H the demand graph of the problem. We use |H| to represent the number of edges in H. Both the directed and the length-bounded settings share a dichotomy between considering either star demands (DST/SLST) or totally general demands (DSN/SLSN). But this gives an obvious set of questions: what demand graphs make the problem “easy” (in FPT) and what demand graphs make the problem “hard” (W[1]-hard)? Recently, Feldmann and Marx [14] gave a complete characterization for this for DSN. Informally, they proved that if the demand graph is transitively equivalent to an “almost-caterpillar” (the union of a constant number of stars where their centers form a path, as well as a constant number of extra edges), then the problem is in FPT, and otherwise the problem is W[1]-hard. While a priori there might not seem to be much of a relationship between the directed and the length-bounded problems, there are multiple folklore results that relate them, usually by means of some sort of layered graph. For example, any FPT algorithm for the DST problem can be turned into an FPT algorithm for SLST (with unit edge lengths) and vice versa through such a reduction (though this is a known result, to the best of our knowledge it has not been written down before, so we include it for completeness in Section 3.2). Such a relationship is not known for more general demands, though. In light of these relationships between the directed and the length-bounded settings and the recent results of [14], it is natural to attempt to characterize the demand graphs that make SLSN easy or hard. We solve this problem, giving (as in [14]) a complete characterization of easy and hard demand graphs. Our formal results are given in Section 2, but informally we show that SLSN is significantly harder than DSN: the only “easy” demand graphs are stars (in which case the problem is just SLST) and constant-size graphs. Even tiny modifications, like a star with a single independent edge, become W[1]-hard (despite being in FPT for DSN). 1.1 Connection to Overlay Routing SLSN is particularly interesting due to its connection to overlay routing protocols that use dissemination graphs to support next-generation Internet services. Many emerging applications (such as remote surgery) require extremely low-latency yet highly reliable communication, which the Internet does not natively support. Babay et al. [3] recently showed that such applications can be supported by using overlay networks to enable routing schemes based on subgraphs (dissemination graphs) rather than paths. Their extensive analysis of real-world data shows that two node-disjoint overlay paths effectively overcome any one fault in the middle of the network, but specialized dissemination graphs are needed to address problems at a flow’s source or destination. Because problems affecting a source typically involve probabilistic loss on that source’s outgoing links, a natural approach 2 to increase the probability of a packet being successfully transmitted is to increase the number of outgoing links on which it is sent. In [3], when a problem is detected at a particular flow’s source, that source switches to use a dissemination graph that floods its packets to all of its overlay neighbors and then forwards them from these neighbors to the destination. The paths from the source’s neighbors to the destination must meet the application’s strict latency requirement, but since the bandwidth used on every edge a packet traverses must be paid for, the total number of edges used should be minimized. Thus, constructing the optimal dissemination graph in this setting is precisely the Shallow-Light Steiner Tree problem, where the root of the demands is the destination and the other endpoints are the neighbors of the source. While Babay et al. [3] show that building an optimal SLST is an effective strategy for overcoming failures at either a source or destination, they find that simultaneous failures at both the source and the destination of a flow must also be addressed. Since it is not known in advance which neighbors of the source or destination will be reachable during a failure, the most resilient approach is to require a latency-bounded path from every neighbor of the source to every neighbor of the destination. This is precisely SLSN with a complete bipartite demand graph. Since no FPT algorithm for SLSN with complete bipartite demands was known, [3] relied on a heuristic that worked well in practice. In the context of dissemination-graph-construction problems, our results provide a good solution for problems affecting either a source or a destination: the FPT algorithm for the SLST problem is quite practical, since overlay topologies typically have bounded degree (and thus a bounded total number of demands). Note that while unit lengths are not typical in overlay networks, handling the true lengths which arise in practice (which are not arbitrary) is a simple modification. The search for an FPT algorithm for more resilient dissemination graphs (e.g., SLSN with complete bipartite demands) motivated our work, but a trivial corollary of our main results is that this problem is unfortunately W[1]-hard. 2 Our Results and Techniques In order to distinguish the easy from the hard cases of the SLSN problem with respect to the demand graph, we should first define the problem with respect to a class (set) of demand graphs. Definition 2.1. Given a class C of graphs. The problem of Shallow-Light Steiner Network with restricted demand graph class C (SLSNC ) is the SLSN problem with the additional restriction that the demand graph H of the problem must be isomorphic to some graph in C. We define Cλ as the class of all demand graphs with at most λ edges, and C ∗ as the class of all star demand graphs (there is a central vertex called the root, and every other vertex in the demand graph is adjacent to the root and only the root). Our main result is that these are precisely the easy classes: SLSNCλ can be solved in polynomial time for fixed λ, and SLSNC ∗ (while NP-hard) is in FPT for parameter p. And for any other class C (i.e., any class which is not just a subset of C ∗ ∪ Cλ for some constant λ), the problem SLSNC is W[1]-hard with parameter p. Note that SLSNC ∗ is precisely the SLST problem, for which a folklore FPT algorithm exists (for completeness, we prove this result in Section 3.2). So our results imply that if we do not have a constant number of demands and are not just SLST, then the problem is actually W[1]-hard. More formally, we prove the following theorems. Theorem 2.2. For any constant λ > 0, there is a polynomial time algorithm for the unit-length arbitrary-cost SLSNCλ problem. By “unit-length arbitrary-cost” we mean that the length l(e) = 1 for all edges e ∈ E, while the cost c is arbitrary. To prove this theorem, we first prove a structural lemma which shows that the optimal solution must be the union of several lowest cost paths with restricted length 3 (these paths may be between steiner nodes, but we show that there cannot be too many). Then we just need to guess all the endpoints of these paths, as well as all the lengths of these paths. 4 It can be proved that there are only nO(p ) possibilities. Since p ≤ λ is a constant, the running time is polynomial in n. The algorithm and proof is in Section 3.1. Theorem 2.3. The unit-length arbitrary-cost SLSNC ∗ problem has an FPT algorithm with parameter p. As mentioned, SLSNC ∗ is exactly the same as SLST, so we use a folklore reduction between SLST and DST to prove this theorem. The detailed proof is in Section 3.2. Theorem 2.4. If C is a recursively enumerable class, and C * Cλ ∪ C ∗ for any constant λ, then SLSNC is W[1]-hard with parameter p, even in the unit-length and unit-cost case. Many W[1]-hardness results for network design problems reduce from the Multi-Colored Clique (MCC) problem, and we are no exception. We reduce from MCC to SLSNC 0 , where C 0 is a specific subset of C which has some particularly useful properties, and which we show must exist for any such C. Since C 0 ⊆ C, this will imply the theorem. The reduction is in Section 4.2. All of these results were in the unit-length setting. We extend both our upper bounds and hardness results to handle arbitrary lengths, but with some extra complications. If p = 1 (there is only one demand), then with arbitrary lengths and arbitrary costs the SLSN problem is equivalent to the Restricted Shortest Path problem, which is known to be NP-hard [19]. Therefore we can no longer hope for a polynomial time exact solution. Note that FPT with constant parameter is equivalent to P, so we change our notion of “easy” from “solvable in FPT” to “arbitrarily approximable in FPT”: we  show (1 + ε)-approximation algorithms for the easy cases, and prove that there is no 45 − ε -approximation algorithm for the hard cases in f (p) · poly(n) time for any function f . Theorem 2.5. For any constant λ > 0, there is a fully polynomial time approximation scheme ( FPTAS) for the arbitrary-length arbitrary-cost SLSNCλ problem. Theorem 2.6. There is a (1 + )-approximation algorithm in O(4p · poly( nε )) time for the arbitrary-length arbitrary-cost SLSNC ∗ problem. For both upper bounds, we use basically the same algorithm as the unit-length arbitrary-cost case, with some changes inspired by the (1 + ε)-approximation algorithm for the Restricted Shortest Path problem [24]. These results can be found in Section 5. Our next theorem is analogous to Theorem 2.4, but since costs are allowed to be arbitrary we can prove stronger hardness of approximation (under stronger assumptions). Theorem 2.7. Assume that (randomized) Gap-Exponential Time Hypothesis (Gap-ETH, see [7]) holds. Let ε > 0 be a small constant, and C be a recursively enumerable class where C * Cλ ∪C ∗ for any constant λ. Then, there is no 45 − ε -approximation algorithm in f (p)·nO(1) time for SLSNC for any function f , even in the unit-length and polynomial-cost case. Note that this theorem uses a much stronger assumption (Gap-ETH rather than W[1] 6= FPT), which assumes that there is no (possibly randomized) algorithm running in 2o(n) time can distinguish whether a 3SAT formula is satisfiable or at most a (1 − ε)-fraction of its clauses can be satisfied. This enables us to utilize the hardness result for a generalized version of the MCC problem from [10], which will allow us to modify our reduction from Theorem 2.4 to get hardness of approximation. This result appears in Section 6. 2.1 Relationship to [14] As mentioned, our results and techniques are strongly motivated and influenced by the work of Feldmann and Marx [14], who proved similar results in the directed setting. Informally, 4 they showed that Directed Steiner Network is in FPT if the demand graph is an “almostcaterpillar”, and otherwise it is W[1]-hard. So they had to show how to reduce from a W[1] problem (MCC, as in our reduction) to DSN where the demand graph is not an almost-caterpillar, and like us had to consider a few different cases depending on the structure of the demand graph. The main case of their reduction (which was not already implied by prior work) is when the demand graph is a 2-by-k complete bipartite graph (i.e., two stars with the same leaf set). For this case, their reduction from MCC uses one star to control the choice of edges in the clique and another star to control the choice of vertices in the clique. They set this up so that if there is a clique of the right size then the “edge demands” and the “vertex demands” can be satisfied with low cost by making choices corresponding to the clique, while if no such clique exists then any way of satisfying the two types of demands simultaneously must have larger cost. The 2-by-k complete bipartite graph is also a hard demand graph in our setting, and the same reduction from [14] can be straightforwardly modified to prove this (this appears as one of our cases). However, we prove that far simpler demand graphs are also hard. Most notably, the “main” case of our proof is when the demand graph is a single star together with one extra edge. Since we have only a single star in our demand graph, we cannot have two “types” of demands (vertex demands and edge demands) in our reduction. So we instead use the star to correspond to “edge demands” and use the single extra edge to simultaneously simulate all of the “vertex demands”. This makes our reduction significantly more complicated. With respect to upper bounds, the algorithm of [14] is quite complex in part due to the complexity of the demand graphs that it must solve. Our hardness results for SLSN imply that we need only concern ourselves with demand graphs that are star or have constant size. The star setting is relatively simple due to a reduction to DST, but it is not obvious how to use any adaptation of [14] (or the earlier [13]) to handle a constant number of demands for SLSN. Our algorithm ends up being relatively simple, but requires a structural lemma which was not necessary in the DSN setting. 3 Algorithms for Unit-Length Arbitrary-Cost SLSN In this section we discuss the “easy” cases of SLSN. We present a polynomial-time algorithm for SLSN with a constant number of demands in Section 3.1. In Section 3.2, we describe a reduction from SLSN with star demand graphs to DST, which gives an FPT algorithm. 3.1 Constant Number of Demands For any constant λ, we show that there is a polynomial-time algorithm that solves SLSNCλ (Theorem 2.2). This algorithm relies on the following structural lemma, which allows us to limit the structure of the optimal solution. This lemma works not only for the unit-length case, but also for the arbitrary-length case. Lemma 3.1. In any feasible solution S ⊆ E of the SLSN problem, there exists a way to assign a path Pi between si and ti in S for each demand {si , ti } ∈ H such that: • For each i ∈ [p], the total length of Pi is at most L and there is no cycle in Pi . • For each i, j ∈ [p] and u, v ∈ Pi ∩ Pj , the paths between u and v in Pi and Pj are the same. Proof. We give a constructive proof. Let m = |S| and S = {e1 , . . . , em }. We first want to modify the lengths to ensure that there is always a unique shortest path. Let ∆ denote the minimum length difference between any two subsets of S with different total length, i.e., ∆= A,B⊆S, P X min P e∈B l(e) e∈A l(e)6= 5 e∈A l(e) − X e∈B l(e) . We create a new length function g where g(ei ) = l(ei ) + ∆ · 2−i . Note that ∆ is always non-zero for any S which has at least 2 edges, and the problem is trivial when |S| = 1. We now show that any P two paths have P different lengths under g. Consider any two different paths Px and Py . If l(e) = 6 e∈Px e∈Py l(e), then without loss of generality we assume P P e∈Px l(e) < e∈Py l(e). Then X P l(e) + m X e∈Px l(e) = X e∈Px P g(e) − e∈Py X e∈Py X ∆ · 2−i < i=1 e∈Px e∈Px Otherwise, if X g(e) ≤ l(e) + ∆ ≤ X e∈Py e∈Px l(e) < X g(e). (1) e∈Py l(e), then g(e) = X ∆ · 2−i − X ∆ · 2−i 6= 0. i:ei ∈Py i:ei ∈Px Therefore in both cases Px and Py have different lengths under g. For each demand {si , ti } ∈ H, we let Pi be the shortest path between si and ti in S under the new length function g. Because any two paths under g have different length, the shortest path between each {si , ti } ∈ H is unique. In addition, because these are shortest paths and edge lengths are positive, they do not contain any cycles. For each i ∈ [p], we can see that Pi is also one of the shortest paths between si and ti under original length function l. This is because in equation (1) we proved that a shorter path under length function l is still a shorter path under length function g. Since S is a feasible solution, the shortest path between si and ti in S must have length at most L. Thus for each i ∈ [p], we P have e∈Pi l(e) ≤ L. For any two different paths Pi and Pj , let u, v ∈ Pi ∩ Pj . If the subpath of Pi between u and v is different from the subpath of Pj between u and v, then by the uniqueness of shortest paths under g we know that either Pi or Pj is not a shortest path (since one of them could be improved by changing the subpath between u and v). This contradicts our definition of Pi and Pj , and hence they must use the same subpath between u and v. Lemma 3.1 implies that for each two paths Pi and Pj , either they do not share any edge, or they share exactly one (maximal)  subpath. Since there are only p demands, the total number of shared subpaths is at most p2 . Therefore we can solve the unit-length arbitrary-cost SLSNCλ by guessing these subpaths. The Q of these subpaths, and let Q0 = Sp first step of our algorithm is to guess the endpoints 0 Q ∪ ( i=1 {si , ti }). The second step is to guess a set E ⊆ {{u, v} | u, v ∈ Q0 , u 6= v}. Intuitively, a pair {u, v} ∈ E 0 means there is a path between u and v in the optimal solution such that only the endpoints of this path is in Q0 . Then we also guess the length l0 ({u, v}) of such path for each {u, v} ∈ E 0 . Finally, we connect each pair of u, v ∈ V where {u, v} ∈ E 0 by lowest cost paths with restricted length l0 ({u, v}), check feasibility, and output the optimal solution. The detailed algorithm is in Algorithm 1 in Section 3.1. 4 Claim 3.2. The running time of Algorithm 1 is nO(p ) . Proof. Clearly there are at most np(p−1) possibilities for Q, and for each Q there are at most 2 2 2(p(p−1)+2p) possible sets E 0 and at most L(p(p−1)+2p) possible l0 . Since we assume unit edge lengths, we can use the Bellman-Ford algorithm to find the lowest cost path within a given length bound in polynomial time. Checking feasibility also takes polynomial time using standard 2 2 shortest path algorithms. Thus, the running time is at most np(p−1) · 2(p(p+1)) · n(p(p+1)) · poly(n). 6 Algorithm 1 Unit-length arbitrary-cost SLSNCλ P Let M ← e∈E c(e) and S ← E for Q ⊆ V where Sp |Q| ≤ p(p − 1) do 0 Q ← Q ∪ ( i=1 {si , ti }) for E 0 ⊆ {{u, v} | u, v ∈ Q0 , u 6= v} and l0 : E 0 → [L] do T ←∅ for {u, v} ∈ E 0 do T ← T ∪ {the lowest cost path between u and v with length at most l0 ({u, v})} // if such path does not exist, T remains the same end for P 0 if T is a feasible solution and e∈T l (e) < M then P M ← e∈T c(e) and S ← T end if end for end for return S 3.1.1 Proof of Theorem 2.2: 4 By Claim 3.2, the running time of Algorithm 1 is nO(p ) . Since λ is constant and p ≤ λ, this running time is polynomial in n. Now we will prove correctness. The algorithm always returns a feasible solution, because we replace S by T only if T is feasible, and thus S is always a feasible solution. Therefore, we only need to show that this algorithm returns a solution with cost at most the cost of the optimal solution. Let the optimal solution be S ∗ . We assign Pi∗ for all i ∈ [p] as in Lemma 3.1. Recall that path Pi∗ and Pj∗ can share at most one (maximal) subpath for each i, j ∈ [p] where i 6= j. Let Q∗ be the endpoint set of the (maximal) subpaths which are shared by some Pi∗ and Pj∗ , and Sp let Q0∗ = Q∗ ∪ i=1 {si , ti }. We can see that the optimal solution S ∗ can be partitioned to a collection of paths by Q∗ . We use E 0∗ to represent whether two vertices in Q0∗ are “adjacent” on some path Pi∗ : for any u, v ∈ Q0∗ where u 6= v, the set E 0∗ contains {u, v} if and only if there exists i ∈ [p] such that u, v ∈ Pi∗ , and there is no vertex w ∈ Q0∗ \ {u, v} which is in the subpath between u and v ∗ in Pi∗ . For each {u, v} ∈ E 0∗ , let P{u,v} be the subpath between u and v on path Pi∗ . This is well defined because by Lemma 3.1 the subpath is unique. We define l0∗ ({u, v}) as the length ∗ of P{u,v} for each {u, v} ∈ E 0∗ ∗ ∗ Note that for any {u, v} 6= {u0 , v 0 } ∈ E 0∗ , we also know that P{u,v} and P{u 0 ,v 0 } are edge00 00 disjoint. To see this, assume that they do share an edge, and let u and v be the endpoints ∗ ∗ 00 of the (maximal) shared subpath between P{u,v} and P{u and v 00 are both in Q0∗ , 0 ,v 0 } . Then u and at least one of them is in Q0∗ \ {u, v} or in Q0∗ \ {u0 , v 0 }, which contradicts our definition of E 0∗ . Since the algorithm iterates over all possibilities for Q, E 0 and l0 , there is some iteration in which Q = Q0∗ , E 0 = E 0∗ , and l0 ≡ l0∗ . We will show that the algorithm also must find an optimal feasible solution in this iteration. For each i ∈ [p], the path Pi∗ is partitioned to edge-disjoint subpaths by Q0∗ . Let qi be the number of subpaths, and let the endpoints be si = vi,0 , vi,1 , . . . , vi,qi −1 , vi,qi = ti . We further let ∗ ∗ ∗ these subpaths be P{s , P{v , . . . , P{v . By the definition of l0∗ , for each j ∈ [qi ], i ,vi,1 } i,1 ,vi,2 } i,qi −1 ,ti } there must be a path between vi,j−1 and vi,j with length at most l0∗ ({vi,j−1 , vi,j }) in graph G. Thus after the algorithm visited {vi,j−1 , vi,j } ∈ E 0∗ , the edge set T must contains a path 7 between u and v with length at most l0∗ ({vi,j−1 , vi,j }). Therefore that the edge set T Pqiwe know l0∗ ({vi,j−1 , vi,j }) ≤ L, and in this iteration contains a path between si and ti with length j=1 thus it is a feasible solution. Let M inCost(u, v, d) be the lowest cost for aPpath between u and v with distance at most d in graph G, then the total cost of this solution is {u,v}∈E 0∗ M inCost(u, v, l0∗ ({u, v})). Moreover, ∗ ∗ for each {u, v} ∈ E 0∗ and {u0 , v 0 } ∈ E 0∗ with {u, v} = 6 {u0 , v 0 }, the paths P{u,v} and P{u 0 ,v 0 } are ∗ 0∗ edge-disjoint, and each P{u,v} has cost at least M inCost(u, v, l ({u, v})). Thus the cost of the P optimal solution is at least {u,v}∈E 0∗ M inCost(u, v, l0∗ ({u, v})), and so the algorithm outputs an optimal solution and it runs in polynomial time. Corollary 3.3. For any constant λ > 0, there is a polynomial time algorithm for the arbitrarylength unit-cost SLSNCλ . Proof. We can use the same technique, but instead of guessing the length l0 we guess the cost c0 , and then find shortest path under cost bound c0 . We can also use Bellman-Ford algorithm in this step. 3.2 Star Demand Graphs (SLSNC ∗ ) We do a reduction from SLSNC ∗ to the DST problem. This is essentially folklore. We include it here for completeness. Definition 3.4 (Directed Steiner Tree). Given a directed graph G = (V, E), a cost function c : E → R+ , a root s, and p vertices t1 , . . . , tp , the objective of the DST problem is to find a minimum cost subgraph G0 = (V, S), such that for every i ∈ [p], there is a path from s to ti in G0 . Theorem 3.5 ([13]). There is an FPT algorithm for the DST problem with parameter p. 3.2.1 Proof of Theorem 2.3: Let (G = (V, E), c, l ≡ 1, {{s1 , t1 }, . . . , {sp , tp }}, L) be a unit-length arbitrary-cost SLSN instance with restricted demand graph class C ∗ . Since C ∗ is the class of stars, we let s = s1 = s2 = . . . = sp . For the reduction, we first create a (L+1)-layered graph G0 , where each layer has |V | vertices. Let v (i) represent the vertex v ∈ V in layer i. Then for each i ∈ [L] and u, v ∈ V , we add an edge from u(i−1) to v (i) if {u, v} ∈ E, and we give this edge cost c0 (u(i−1) , v (i) ) = c(u, v). For each i ∈ [L] and each v ∈ V , we also add an edge (v (i−1) , v (i) ) with cost c0 (v (i−1) , v (i) ) = 0. (L) (L) This gives us an instance (G0 , c0 , s(0) , t1 , . . . , tp ) of DST. Since this reduction clearly takes only polynomial time (since L ≤ n due to the unit-length setting), the only thing left is to show that the two instances have the same optimal cost. Let S be the optimal solution of our starting SLSN instance. Let ds (v) be the distance between s and v in S. We can construct a solution S 0 for the DST instance of cost at most c(S). First, for each i ∈ [L] and {u, v} ∈ S with ds (u) + 1 = ds (v), we add (u(ds (u)) , v (ds (v)) ) to (i−1) (i) S 0 . Then, for each j ∈ [p] and i = ds (tj ), . . . , L, we add (tj , tj ) to S 0 . Note that the cost 0 of S is at most the cost of S, since every non-zero cost edge in S 0 corresponds to a different edge in S with the same cost. S 0 is also a feasible solution, because for every i ∈ [p] there is a path s – vi,1 – . . . – vi,ds (ti )−1 – ti in S with length at most L, such that ds (vi,j ) = j for each (1) (d (t )−1) (d (t )) (L) j ∈ [ds (ti ) − 1], and thus S 0 contains path s(0) – vi,1 – . . . – vi,dss (tii )−1 – ti s i – . . . – ti . Now let S 0 be the optimal solution of the DST instance. We can construct a solution S for our original SLSNC ∗ instance as follows: for any u, v ∈ V where u 6= v, we add {u, v} to S if there exists an i such that (u(i−1) , v (i) ) ∈ S 0 . Clearly the cost of S is at most the cost 8 of S 0 because every edge in S corresponds to a different edge in S 0 with the same cost. S is (0) (1) (L−1) also a feasible solution, since for every i ∈ [p] there is a path s(0) = vi,0 – vi,1 – . . . – vi,L−1 – (L) (L) vi,L = ti in S 0 , and thus S contains path s – vi,1 – . . . – vi,L−1 – ti with length at most L. Notice that there may be j ∈ [L] such that vi,j = vi,j−1 , but this only decreases the length and has no effect on cost. Therefore, the two instances have the same optimal cost. Combining this with Theorem 3.5 allows us to get an FPT algorithm for the unit-length arbitrary-cost SLSNC ∗ by first reducing to DST and then using the algorithm from Theorem 3.5. 4 W[1]-Hardness for Unit-Length Unit-Cost SLSN In this section we prove our main hardness result, Theorem 2.4. We begin with some preliminaries, then give our reduction and proof. 4.1 Preliminaries We prove Theorem 2.4 by constructing an FPT reduction from the Multi-Colored Clique (MCC) problem to the unit-length unit-cost SLSNC problem for any C * Cλ ∪ C ∗ . We begin with the MCC problem. Definition 4.1 (Multi-Colored Clique). Given a graph G = (V, E), a number k ∈ N and a coloring function c : V → [k]. The objective of the MCC problem is to determine whether there is a clique T ⊆ V in G with |T | = k where c(x) 6= c(y) for all x, y ∈ T . For each i ∈ [k], we define Ci = {v ∈ V : c(v) = i} to be the vertices of color i. We can assume that the graph does not contain edges where both endpoints have the same color, since those edges do not affect the existence of a multi-colored clique. It has been proven that the MCC problem is W[1]-complete. Theorem 4.2 ([15]). The MCC problem is W[1]-complete with parameter k. We first define a few important classes of graphs. These are the major classes that fall outside of C ∗ ∪ Cλ , so we will need to be able to reduce MCC to SLSN where the demand graphs are in these classes, and then this will allow us to can prove the hardness for general C * C ∗ ∪ Cλ . For every k ∈ N, we define the following graph classes. Each of the first four classes is just one graph up to isomorphism, but classes 5 and 6 are sets of graphs, so we use the notation H instead of H for these classes. Note that each of the first three classes is just a star with an additional edge, so we use ∗ to make this clear. ∗ 1. Hk,0 : a star with k(k − 1) leaves and an edge with both endpoints not in the star. ∗ 2. Hk,1 : a star with (k(k − 1) + 1) leaves and an edge {u, v} where u is a leaf of the star and v is not in the star. ∗ 3. Hk,2 : a star with (k(k − 1) + 2) leaves, and an edge {u, v} where both u and v are leaves of the star. 4. Hk,k : k(k − 1) + 1 edges where all the endpoints are different (i.e., a matching of size k(k − 1) + 1). 5. H2,k : the class of graphs that have exactly k(k −1)+2 vertices, and contain a 2 by k(k −1) complete bipartite subgraph (not necessarily an induced subgraph). 6. Hk : the class of graphs that contain at least one of the graphs in previous five classes as an induced subgraph. We first prove the following lemma. 9 Lemma 4.3. For any k ≥ 2, if a graph H is not a star and H has at least 8k 10 edges, then H ∈ ∗ ∗ ∗ Hk , and we can find an induced subgraph which is isomorphic to a graph in {Hk,0 , Hk,1 , Hk,2 , Hk,k }∪ H2,k ∪ Hk in poly(|H|) time. Proof. We give a constructive proof. We first claim that either there is a vertex in H which has degree at least 2k 4 or there is an induced matching in H of size k 2 . Suppose that all vertices have degree less than 2k 4 . Then we can create an induced matching by adding an arbitrary edge {u, v} ∈ H to a edge set M , removing all vertices that are adjacent to either u or v from H, and repeating until there are no more edges in H. In each iteration we reduce the total number 10 2 of edges by at most 2 · 2k 4 · 2k 4 , thus |M | ≥ 8k 8k8 = k . Since when we add an edge {u, v} we also remove all vertices adjacent to u or v, every future edge we add to M will have endpoints which are not adjacent to u or v, and thus M is an induced matching of H with size k 2 . If H has an induced matching of size k 2 , then H ∈ Hk because it contains Hk,k as an induced subgraph, and thus we are done. Otherwise, H has a vertex s with degree at least 2k 4 . Let S be the neighbors of s. If there is any vertex other than s that is adjacent to at least k(k − 1) vertices in S, then H contains a 2 by k(k − 1) complete bipartite subgraph, so it contains an induced subgraph H 0 ∈ H2,k and thus is in Hk . So suppose that there is no vertex other than s that is adjacent to at least k(k −1) vertices in S. Consider the case that there is no edge between any pair of vertices in S; then, because H is not a star, there must be an edge {u, v} ∈ H with at least one of u, v not in S ∪ {s}. Since both u and v are adjacent to at most k(k −1) vertices in S, there are at least k 4 −2·k(k −1) ≥ k(k −1) vertices in S that are not adjacent to either u or v. Let the set of these vertices be T . Then ∗ ∗ the induced subgraph on vertex set T ∪ {s, u, v} is either Hk,0 or Hk,1 , depending on whether {u, v} ∩ T is an empty set. Now the only remaining case is that there is at least one edge in H with both endpoints in ∗ S. In this case, we can find Hk,2 as an induced subgraph as follows: We first let S0 = S. Then, in each iteration t we let vt be a vertex in St−1 that is adjacent to the fewest number of other vertices in St−1 . We add vt to the vertex set T , and then delete vt and all the vertices in St−1 that are adjacent to vt to get St . This process repeats until we have |T | = k(k − 1). We can use induction to show that, after each iteration t ≤ k(k − 1), there is always at least one edge in H where both endpoints are in St . The base case is t = 0, where such an edge clearly exists. Assume the claim holds for iteration t − 1, consider the iteration t ≤ k(k − 1). If vt is not adjacent to any other vertex in St−1 , then removing vt does not affect the fact that there is at least one edge left, and thus the claim still holds. Otherwise, vt is adjacent to at least one vertex in St−1 . Thus, each vertex in St−1 must be adjacent to at least one vertex in St−1 . Since there is no vertex other than s which is adjacent to at least k(k − 1) vertices in S, we know that at most k 2 vertices are deleted in each iteration, and thus there are still at least 2k 4 − k 2 · k(k − 1) ≥ k 4 vertices in St−1 . Because removing vt and its neighbors can only affect the degree of at most k 2 (k − 1)2 vertices in St−1 , there must still be an edge left between the vertices in St . Let {u, v} be one of the edges in H where both endpoints are in St , then the induced subgraph ∗ on vertex set T ∪ {s, u, v} is Hk,2 . Thus H ∈ Hk . It is easy to see that all the previous steps directly find an induced subgraph which is ∗ ∗ ∗ isomorphic to a graph in {Hk,0 , Hk,1 , Hk,2 , Hk,k } ∪ H2,k ∪ Hk and takes polynomial time, thus the lemma is proved. 4.2 Reduction In this subsection, we will prove the following reduction theorem. 10 Theorem 4.4. Let (G = (V, E), c) be an MCC instance with parameter k, and let H ∈ Hk be a demand graph. Then a unit-length unit-cost SLSN instance (G0 , L) with demand graph H can be constructed in poly(|V ||H|) time, and there exists a function g (computable in time poly(|H|)) such that the MCC instance has a clique with size k if and only if the SLSN instance has a solution with cost g(H). In order to prove this theorem, we first introduce a construction for any demand graph ∗ ∗ ∗ H ∈ {Hk,0 , Hk,1 , Hk,2 , Hk,k } ∪ H2,k , and then use the instances constructed in these cases to construct the instance for general H ∈ Hk . The construction for H ∈ H2,k is similar to [14], which proves the W[1]-hardness of the DSN problem. We change all the directed edges in their construction to undirected, and add some edges and dummy vertices. This construction is presented in Section 4.2.3. To handle ∗ ∗ ∗ Hk,0 , Hk,1 , Hk,2 , and Hk,k , we need to change this basic construction due to the simplicity of the demand graphs. Because the constructions for these four graphs are quite similar, we first ∗ ∗ introduce the construction for Hk,0 in Section 4.2.1, and then show how to modify it for Hk,1 , ∗ Hk,2 , and Hk,k in Section 4.2.2. 4.2.1 ∗ Case 1: Hk,0 Given an MCC instance (G = (V, E), c) with parameter k, we create a unit-length and unit-cost ∗ SLSN instance (G0 , L) with demand graph Hk,0 as follows. ∗ We first create a graph Gk with integer edge lengths (we will later replace all non-unit length edges by paths). See Figure 1 for an overview of this graph. The vertex set Vk∗ contains 6 layers of vertices and another group of vertices. The first layer V1 is just  a root r. The second layer V2 contains a vertex z{i,j} for each 1 ≤ i < j ≤ k, so there are k2 vertices. The third layer V3 contains a vertex ze for each e ∈ E, so there are |E| vertices. The fourth layer V4 contains a vertex xv,j for each v ∈ V and j ∈ [k] with j 6= c(v), so there are |V | · (k − 1) vertices. The fifth layer V5 again contains a vertex x0v,j for each v ∈ V and j ∈ [k] with j 6= c(v). The sixth layer V6 contains a vertex li,j for each i, j ∈ [k] where i 6= j, so there are k(k − 1) vertices. Finally, we have a vertex yi for i = 0, . . . , k, so there are k + 1 vertices in the set Vy . Let fi : N → N be the function defined by fi (j) = j + 1 if j + 1 6= i and fi (j) = j + 2 if j + 1 = i. This function gives the next integer after j, but skips i. Let fit (j) = fi (fi (. . . fi (j))) denote this function repeated t times. Recall that Ci = {v ∈ V : c(v) = i}. The edge set Ek∗ contains following edges, with lengths as indicated: • E1 = {{r, z{i,j} } | 1 ≤ i < j ≤ k}, each edge in E1 has length 2. • E2 = {{z{c(u),c(v)} , ze } | e = {u, v} ∈ E}, each edge in E2 has length 1. • E3 = {{ze , xu,c(v) } | e = {u, v} ∈ E}, each edge in E3 has length 2k 2 − 2. Note that if {ze , xu,c(v) } ∈ E3 , then {ze , xv,c(u) } ∈ E3 • E4 = {{xv,j , x0v,j } | v ∈ V, j 6= c(v)}, each edge in E4 has length 1. • E5 = {{x0v,j , lc(v),j } | v ∈ V, j 6= c(v)}, each edge in E5 has length 2k 2 − 2. • Eyx = {{yi−1 , xv,fi (0) } | i ∈ [k], v ∈ Ci }, each edge in Eyx has length 4. k−1 • Exx = {{x0v,j , xv,fc(v) (j) } | v ∈ V, j ∈ [k] \ {c(v), fc(v) (0)}}, each edge in Exx has length 3. • Exy = {{x0v,f k−1 (0) , yi } | i ∈ [k], v ∈ Ci }, each edge in Exy has length 3. i 0 Let G be the graph obtained from G∗k by replacing each edge e ∈ Ek∗ by a length(e)-hop path. We create an instance of SLSN on G0 by setting the demands to be {r, li,j } for all i, j ∈ [k] where i 6= j, as well as {y0 , yk }. Note that these demands form a star with k(k − 1) leaves and ∗ an edge with both endpoints not in the star, so it is isomorphic to Hk,0 . We set the distance 2 bound L to be 4k . 11 𝑧𝑧 1,2 Color 1 Vertices ⋯ 𝑦𝑦0 𝑙𝑙1,2 𝑙𝑙1,3 𝑦𝑦1 ⋯ 𝑙𝑙1,𝑘𝑘 𝑧𝑧 1,3 ⋯ 𝑥𝑥𝑢𝑢,1 𝑥𝑥𝑢𝑢,3 𝑥𝑥𝑢𝑢,4 ′ ′ ′ 𝑥𝑥𝑢𝑢,1 𝑥𝑥𝑢𝑢,3 𝑥𝑥𝑢𝑢,4 𝑙𝑙2,1 𝑟𝑟 𝑧𝑧 1,𝑘𝑘 𝑧𝑧 2,3 𝑧𝑧 𝑢𝑢,𝑣𝑣 Edges between Color 2 and 3 Color 2 Vertices ⋯ 𝑥𝑥𝑢𝑢,𝑘𝑘 𝑙𝑙2,3 ′ 𝑥𝑥𝑢𝑢,𝑘𝑘 ⋯ ⋯ 𝑦𝑦2 𝑙𝑙2,𝑘𝑘 𝑧𝑧 𝑘𝑘−1,𝑘𝑘 ⋯ Figure 1: G∗k 𝑥𝑥𝑣𝑣,2 Color 3 Vertices ⋯ ′ 𝑥𝑥𝑣𝑣,2 ⋯ 𝑦𝑦3 ⋯ ⋯ ⋯ 𝑦𝑦𝑘𝑘 𝑙𝑙𝑘𝑘,𝑘𝑘−1 ∗ ∗ This construction clearly takes poly(|V ||Hk,0 |) time. Let g(Hk,0 ) = 4k 4 − 4k 3 + 32 k 2 + 52 k, ∗ which is clearly computable in poly(Hk,0 ) time. We will first prove the easy direction in the correctness of the construction. Lemma 4.5. If there is a multi-colored clique of size k in G, then there is a solution S for the ∗ ∗ SLSN instance (G0 , L) with demand graph Hk,0 , and the total cost of S is g(Hk,0 ). Proof. Let v1 , . . . , vk be a multi-colored clique of size k in G, where vi ∈ Ci for all i ∈ [k]. We create a feasible solution S to our SLSN instance, which contains following paths in G0 (i.e., edges in G∗k ):  • {r, z{i,j} } for each 1 ≤ i < j ≤ k. The total cost of these edges is 2 · k2 = k 2 − k.  2 • {z{i,j} , z{vi ,vj } } for each 1 ≤ i < j ≤ k. The total cost of these edges is k2 = k 2−k . • {z{vi ,vj } , xvi ,j } and {z{vi ,vj } , xvj ,i } for each 1 ≤ i < j ≤ k. The total cost of these edges  is 2 · (2k 2 − 2) · k2 = 2k 4 − 2k 3 − 2k 2 + 2k.  • {xvi ,j , x0vi ,j } for each i, j ∈ [k] where i 6= j. The total cost of these edges is 2 · k2 = k 2 − k.  • {x0vi ,j , li,j } for each i, j ∈ [k] where i 6= j. The total cost of these edges is 2·(2k 2 −2)· k2 = 2k 4 − 2k 3 − 2k 2 + 2k. • {yi−1 , xvi ,fi (0) } for each i ∈ [k]. The total cost of these edges is 4k. • {x0vi ,j , xvi ,fi (j) } for each i ∈ [k] and j ∈ [k] \ {i, fik−1 (0)}. The total cost of these edges is 3 · k(k − 2) = 3k 2 − 6k. • {x0v k−1 (0) i ,fi , yi } for each i ∈ [k]. The total cost of these edges is 3k. 2 Therefore, the total cost is k 2 − k + k 2−k + 2k 4 − 2k 3 − 2k 2 + 2k + k 2 − k + 2k 4 − 2k 3 − 2k 2 + ∗ 2k + 4k + 3k 2 − 6k + 3k = 4k 4 − 4k 3 + 32 k 2 + 52 k = g(Hk,0 ). Now we show the feasibility of this solution. For each i, j ∈ [k] where i 6= j, the path between r and li,j is r – z{i,j} – z{vi ,vj } – xvi ,j – x0vi ,j – li,j . The length of this path is 2 + 1 + 2k 2 − 2 + 1 + 2k 2 − 2 = 4k 2 , thus it is a feasible path. The path between y0 and yk is y0 – xv1 ,2 – x0v1 ,2 – xv1 ,3 – x0v1 ,3 – . . . – xv1 ,k – x0v1 ,k – y1 – xv2 ,1 0 – xv2 ,1 – xv2 ,3 – x0v2 ,3 – . . . – y2 – . . . – yk . The length of this path is (4+1·(k−1)+3·(k−2)+3)·k = 4k 2 , thus it is a feasible path. 12 For the other direction, we begin the proof with a few claims. We first show that the only feasible way to connect r and li,j is to pick one edge between every two adjacent layers. We can also see in Figure 1 that for each i ∈ [k], there are |Ci | disjoint “zig-zag” paths between yi−1 and yi , and each path corresponds to a vertex with color i. We will also show that the only feasible way to connect y0 and yk is to pick one zig-zag path between each yi−1 and yi . From ∗ these claims we can then prove that, if the cost of the optimal solution is at most g(Hk,0 ), then there is a multi-colored clique in G. Claim 4.6. For all i, j ∈ [k] where i 6= j, any path Pi,j between r and li,j with length at most 4k 2 must be of the form r – z{i,j} – z{u,v} – xu,j – x0u,j – li,j , where u ∈ Ci , v ∈ Cj and {u, v} ∈ E. Proof. We can see that G∗k is a 6-layer graph with a few additional paths between the fourth layer and the fifth layer. Thus Pi,j must contain at least one edge between each two adjacent layers. From the construction of G∗k , all the edges between two adjacent layers have the same length. If we sum up the length from r to the fourth layer plus the length from the fifth layer to li,j , it is already 2 + 1 + 2k 2 − 2 + 2k 2 − 2 = 4k 2 − 1. Thus, between the fourth layer and the fifth layer we can only choose one length 1 edge. We know that the vertex in the fifth layer must adjacent to li,j , so it must be x0u,j for some u ∈ Ci . Thus, the edge between the fourth layer and the fifth layer must be {xu,j , x0u,j }, because this is the only length 1 edge adjacent to x0u,j . In addition, the only way to go from r to xu,j with one edge per layer is to pass through vertex z{i,j} and z{u,v} for some v ∈ Cj and {u, v} ∈ E. Therefore Pi,j must correspond to an edge {u, v} ∈ E where u ∈ Ci and v ∈ Cj , and it has form r – z{i,j} – z{u,v} – xu,j – x0u,j – li,j . Claim 4.7. Any path Py between y0 and yk with length at most 4k 2 does not contain any edge in E1 ∪ E2 ∪ E3 ∪ E5 . Proof. We prove the claim by contradiction. If Py contains an edge in E1 ∪ E2 ∪ E3 ∪ E5 , it must contain at least two edges with length 2k 2 − 2 (one edge to go out of the fourth and the fifth layer, and another one to go back). Since any edge which has endpoint y0 has length 4 and any edge which has endpoint yk has length 3, the total length 2 · (2k 2 − 2) + 4 + 3 = 4k 2 + 3 already exceeds the length bound 4k 2 , giving a contradiction. Claim 4.8. Any path Py between y0 and yk with length at most 4k 2 can be divided to k subpaths as follows. For each i ∈ [k], there is a subpath Pvi between yi−1 and yi with length 4k, of the form yi−1 – xvi ,fi (0) – x0vi ,fi (0) – xvi ,fi2 (0) – x0vi ,f 2 (0) – . . . – xvi ,f k−1 (0) – x0v ,f k−1 (0) – y1 , where i i i i vi ∈ C i . Proof. Since we have Claim 4.7, it suffices to consider the edge set E4 ∪ Eyx ∪ Exx ∪ Exy . We can see that E4 ∪ Eyx ∪ Exx ∪ Exy can be partitioned to k|V | paths, where for each i ∈ [k] and each v ∈ Ci , there is a path Pv which connects yi−1 and yi with length 4k. The path is yi−1 – xv,fi (0) – x0v,fi (0) – xv,fi2 (0) – x0v,f 2 (0) – . . . – xv,f k−1 (0) – x0v,f k−1 (0) – y1 . We can see that these i i i paths are vertex disjoint except for the endpoints y0 , y1 , . . . , yk . Therefore, the only way to go from y0 to yk is by passing through y0 , y1 , . . . , yk one-by-one. Thus, for each i ∈ [k], Py must contain a subpath Pvi where vi ∈ Ci . Because each of these subpaths has length 4k, the total cost is already 4k · k = 4k 2 , which is exactly the length bound. Therefore, Py can not contain any other edge, which proves the lemma. Now, we can prove the other direction in the correctness of the construction. Lemma 4.9. Let S be an optimal solution for the SLSN instance (G0 , L) with demand graph ∗ ∗ Hk,0 . If S has cost at most g(Hk,0 ) = 4k 4 − 4k 3 + 23 k 2 + 52 k, then there is a multi-colored clique of size k in G. 13 Proof. For each i, j ∈ [k] with i 6= j, let Pi,j be a (arbitrarily chosen) path in S which connects r and li,j with length at most L = 4k 2 . Let P = {Pi,j | i, j ∈ [k], i 6= j} be the set of all these paths. We also let Py be a (arbitrary) path in S of length at most L which connects y0 and yk . From Claim 4.8, Py can be divided to k subpaths, each of which corresponds to a vertex vi . We will show that v1 , . . . , vk form a clique in G (i.e., for each 1 ≤ i < j ≤ k, we have {vi , vj } ∈ E). We first prove that these paths must share certain edges due to the cost bound of the optimal solution. From Claim 4.6, we know that each Pi,j costs exactly 2+1+2k 2 −2+1+2k 2 −2 = 4k 2 . In addition, from the form of Pi,j we can also see that these paths are almost disjoint, except that Pi,j and Pj,i may share a length 2 edge {r, z{i,j} } ∈ E1 and a length 1 edge {z{i,j} , ze } ∈ E2 . Therefore, in order to satisfy the demands between r and all of the li,j ’s, the total cost of the  edges in S ∩ (E1 ∪ E2 ∪ E3 ∪ E4 ∪ E5 ) is at least 4k 2 · k(k − 1) − k2 · (2 + 1) = 4k 4 − 4k 3 − 32 k 2 + 23 k, even if every Pi,j and Pj,i do share edge {r, z{i,j} } and edge {z{i,j} , ze }. We now calculate the cost of the edges in S ∩ (Eyx ∪ Exx ∪ Exy ). From Claim 4.8, the total cost of edges in Py ∩ (Eyx ∪ Exx ∪ Exy ) is at least · k = 3k 2 + k. Thus, the total  (4 + 32 · (k − 1) + 3) 3 3 2 4 ∗ 4 3 ), cost is already at least 4k − 4k − 2 k + 2 k + (3k + k) = 4k − 4k 3 + 32 k 2 + 52 k = g(Hk,0 so S cannot contain any edge which has not been counted yet. Therefore, every edge in Py ∩ E4 must appear in some path in P. In fact, by the form of the paths in P, we can see that for each i, j ∈ [k] where i 6= j, the edge {xvi ,j , x0vi ,j } ∈ Py ∩ E4 can only appear in path Pi,j , rather than any other Pi0 ,j 0 . Thus xvi ,j is in path Pi,j , and similarly xvj ,i is in path Pj,i . Recall that Pi,j and Pj,i must share an edge {z{i,j} , ze } for some e ∈ E because of the cost bound, and z{vi ,vj } is the only vertex which adjacent to both xvi ,j and xvj ,i , we can see that e can only be {vi , vj }. Therefore {vi , vj } ∈ E, which proves the lemma. 4.2.2 Case 2, 3, and 4: Cases 2, 3, and 4 are basically the same as Case 1, so we discuss them in the same subsection. ∗ Case 2: Hk,1 We use the same G∗k , G0 , and L in the construction of the SLSN instance for demand graph ∗ ∗ Hk,0 , and also set g(Hk,1 ) = 4k 4 − 4k 3 + 23 k 2 + 25 k. The only difference is the demand graph. Besides the demand of {r, li,j } for all i, j ∈ [k] where i 6= j, and {y0 , yk }, there is a new demand {r, y0 }. Clearly this new demand graph is a star with (k(k − 1) + 1) leaves, and an edge in which ∗ exactly one of the endpoints is a leaf of the star, so it is isomorphic to Hk,1 . Assume there is a multi-colored clique of size k in G. The paths connecting previous demands in the solution of the SLSN instance are the same as Case 1. The path between r and y0 is r – z{1,2} – z{v1 ,v2 } – xv1 ,2 – y0 . All the edges in this path are already in the previous paths, so the cost remains the same. The length of this path is 2 + 1 + 2k 2 − 2 + 4 = 2k 2 + 5 < 4k 2 , which satisfies the length bound. ∗ Assume there is a solution for the SLSN instance (G0 , L, Hk,1 ) with cost 4k 4 −4k 3 + 23 k 2 + 52 k. The proof that there exists a multi-colored clique of size k in G is the same as Case 1. ∗ Case 3: Hk,2 As in Case 2, only the demand graph changes. The new demand graph is the same as in Case 2 but again with a new demand {r, yk }. Since {r, y0 } was already a demand, our new demand graph is a star with (k(k − 1) + 2) leaves (the li,j ’s and y0 and yk ), and an edge between ∗ two of its leaves (y0 and yk ), which is isomorphic to Hk,2 . Assume there is a multi-colored clique of size k in G. The paths connecting previous demands in the solution of the SLSN instance are the same as Case 2. The path between r and yk is r – z{k−1,k} – z{vk−1 ,vk } – xvk ,k−1 – yk . All the edges in this path are already in the previous paths, so the cost stays the same. The length of this path is 2 + 1 + 2k 2 − 2 + 4 = 2k 2 + 5 < 4k 2 , which 14 satisfies the length bound. ∗ Assume there is a solution for the SLSN instance (G0 , L, Hk,2 ) with cost 4k 4 −4k 3 + 23 k 2 + 52 k. The proof that there exists a multi-colored clique of size k in G is the same as Case 1. Case 4: Hk,k In order to get Hk,k as our demand graph, we have to slightly change the construction from Case 1. We still first make a weighted graph Gk,k = (Vk,k , Ek,k ) and then transform it to the unit-length unit-cost graph G0 . For the vertex set Vk,k , we add another layer of vertices 0 | i, j ∈ [k], i 6= j} to Vk∗ before the first layer V1 . For the edge set Ek,k , we include all V0 = {li,j the edges in Ek∗ , but change the length of edges in E1 to length 1. We also add another edge 0 set E0 = {{li,j , r} | i, j ∈ [k], i 6= j}. Each edge in E0 has length 1. 0 The demands are {li,j , li,j } for each i, j ∈ [k] where i 6= j, as well as {y0 , yk }. This is a matching of size k(k − 1) + 1, which is isomorphic to Hk,k . We still set the length bound to be L = 4k 2 , and set g(Hk,k ) = 4k 4 − 4k 3 + 2k 2 + 2k. If there is a multi-colored clique of size k in G, the construction for the solution in G0 is 0 0 similar to Case 1. For each i, j ∈ [k] where i 6= j, the path between li,j and li,j becomes li,j – 0 r – z{i,j} – z{vi ,vj } – xvi ,j – xvi ,j – li,j (i.e., one more layer before the root r). It is easy to see that the length bound and size bound are still satisfied. Assume there is a solution for the SLSN instance (G0 , L, Hk,k ) with cost 4k 4 −4k 3 +2k 2 +2k. The proof that there exists a multi-colored clique of size k in G is essentially the same as Case 0 1, except the path between li,j and li,j has one more layer. 4.2.3 Case 5: H2,k In this case, we slightly modify the reduction of [14]. We first change all the edges from directed to undirected. In addition, in [14] the demand graph is precisely a 2-by-k(k − 1) bipartite graph, but we also handle the generalization in which there may be more demands between vertices on each sides (i.e., the 2-by-k(k − 1) bipartite graph is just a subgraph of our demands). In order to do this, we add some dummy vertices and some edges. Given an MCC instance (G = (V, E), c) with parameter k, and a demand graph H ∈ H2,k , we create a unit-length and unit-cost SLSN instance G0 with demand isomorphic to H as follows. We first create a weighted graph G2,k = (V2,k , E2,k ). The vertex set V2,k contains 5 layers of vertices. The first layer V1 is just two roots r1 , r2 . The second layer V2 contains a vertex z{i,j} for each 1 ≤ i < j ≤ k, and a vertex yi for each i ∈ [k]. The third layer V3 contains a vertex ze for each e ∈ E, and a vertex yv for each v ∈ V . The fourth layer V4 contains a vertex xv,j for each v ∈ V and j 6= c(v). The fifth layer V5 contains a vertex li,j for each i, j ∈ [k] where i 6= j. The edge set E2,k contains the following edges: • E11 = {{r1 , z{i,j} }, 1 ≤ i < j ≤ k}, each edge in E11 has length 1. • E12 = {{z{c(u),c(v)} , ze } | e = {u, v} ∈ E}, each edge in E12 has length 1. • E13 = {{ze , xu,c(v) } | e = {u, v} ∈ E}, each edge in E13 has length 1. Note that if {ze , xu,c(v) } ∈ E13 , then {ze , xv,c(u) } ∈ E13 • E21 = {{r2 , yi } | i ∈ [k]}, each edge in E21 has length 1. • E22 = {{yc(v) , yv } | v ∈ V }, each edge in E22 has length 1. • E23 = {{yv , xv,j } | v ∈ V, j 6= c(v)}, each edge in E23 has length 1. • Exl = {{xv,j , lc(v),j } | v ∈ V, j 6= c(v)}, each edge in Exl has length 4. • Ell = {{li,j , li0 ,j 0 } | i, j, i0 , j 0 ∈ [k], i 6= j, i0 6= j 0 , (i, j) 6= (i0 , j 0 )}, each edge in Ell has length 7. We get a unit-length graph G0 from G2,k by replacing every edge e ∈ E2,k by a length(e)hop path. Our SLSN instance consists of the graph G0 , length bound L = 7, and the following 15 𝑟𝑟1 𝑧𝑧 1,2 ⋯ 𝑧𝑧 1,𝑘𝑘 𝑧𝑧 2,3 ⋯ 𝑧𝑧 𝑘𝑘−1,𝑘𝑘 Edges between 𝑧𝑧 𝑢𝑢,𝑣𝑣 Color 2 and 3 𝑙𝑙1,2 𝑙𝑙1,3 ⋯ 𝑙𝑙1,𝑘𝑘 𝑦𝑦1 𝑦𝑦2 𝑦𝑦𝑢𝑢 ⋯ 𝑟𝑟2 𝑦𝑦3 𝑦𝑦𝑣𝑣 𝑦𝑦𝑘𝑘 ⋯ 𝑥𝑥𝑢𝑢,1 𝑥𝑥𝑢𝑢,3 𝑥𝑥𝑢𝑢,4 ⋯ 𝑥𝑥𝑢𝑢,𝑘𝑘 ⋯ 𝑥𝑥𝑣𝑣,1 𝑥𝑥𝑣𝑣,2 𝑥𝑥𝑣𝑣,4 ⋯ 𝑥𝑥𝑣𝑣,𝑘𝑘 ⋯ 𝑙𝑙2,1 𝑙𝑙2,3 𝑙𝑙2,4 ⋯ 𝑙𝑙2,𝑘𝑘 𝑙𝑙3,1 𝑙𝑙3,2 𝑙𝑙3,4 ⋯ 𝑙𝑙3,𝑘𝑘 Color 2 Vertices Color 3 Vertices ⋯ 𝑙𝑙𝑘𝑘,𝑘𝑘−1 Every pair is connected Figure 2: G2,k demands (which will be isomorphic to H). For each r ∈ {r1 , r2 } and i, j ∈ [k] with i 6= j, there is a demand between r and li,j (note that these demands form a 2 by k(k − 1) complete bipartite graph. Let this complete bipartite subgraph be B. For the rest of the demands, we arbitrarily choose a mapping between V1 = {r1 , r2 } and the 2-side of the bipartite graph in H, as well as a mapping between V5 = {li,j | i, j ∈ [k], i 6= j} and the k(k − 1)-side. There is a demand between two vertices u, v ∈ V1 ∪ V5 if there is an edge between u, v in H. This construction clearly takes poly(|V ||H|) time. Let g(H) = 7|H|−7k 2 +9k −7·1{r1 ,r2 }∈H , where 1{r1 ,r2 }∈H is an indicator variable for {r1 , r2 } being a demand in H. This function is also computable in time poly(|H|). We first prove the easy direction in the correctness of the reduction. Lemma 4.10. If there is a multi-colored clique of size k in G, then there is a solution S for the SLSN instance (G0 , L) with demand graph H ∈ H2,k , and the total cost of S is 7|H| − 7k 2 + 9k − 7 · 1{r1 ,r2 }∈H . Proof. Let v1 , . . . , vk be a multi-colored clique of size k in G, where vi ∈ Ci for all i ∈ [k]. We create a feasible solution S to our SLSN instance, which contains following paths in G0 (i.e., edges in G2,k ):  2 • {r1 , z{i,j} } for each 1 ≤ i < j ≤ k. The total cost of these edges is k2 = k 2−k .  2 • {z{i,j} , z{vi ,vj } } for each 1 ≤ i < j ≤ k. The total cost of these edges is k2 = k 2−k . • {z{vi ,vj } , xvi ,j } and {z{vi ,vj } , xvj ,i } for each 1 ≤ i < j ≤ k. The total cost of these edges  is 2 · k2 = k 2 − k. • {r2 , yi } for each i ∈ [k]. The total cost of these edges is k. • {yi , yvi } for each i ∈ [k]. The total cost of these edges is k. • {yvi , xvi ,j } for each i, j ∈ [k] where i 6= j. The total cost of these edges is 2 · • {xvi ,j , li,j } for each i, j ∈ [k] where i 6= j. The total cost of these edges is 4·2· k 2 k 2   = 4k 2 −4k. = k 2 − k. • {u, v} for each {u, v} ∈ H \ (B ∪ {{r1 , r2 }}). The total cost of these edges is 7 · (|H| − 2 · k(k − 1) − 1{r1 ,r2 }∈H ) = 7|H| − 14k 2 + 14k − 7 · 1{r1 ,r2 }∈H . 2 2 Therefore, the total cost is k 2−k + k 2−k + k 2 − k + k + k + k 2 − k + 4k 2 − 4k + 7|H| − 14k 2 + 14k − 7 · 1{r1 ,r2 }∈H = 7|H| − 7k 2 + 9k − 7 · 1{r1 ,r2 }∈H . 16 Now we show the feasibility of this solution. For each i, j ∈ [k] where i 6= j, the path between r1 and li,j is r1 – z{i,j} – z{vi ,vj } – xvi ,j – li,j , and the path between r2 and li,j is r2 – yi – yvi – xvi ,j – li,j . Both paths have length 7, which is within the length bound. For each {u, v} ∈ H \ (B ∪ {{r1 , r2 }}), u and v have an edge with length 7, thus a path under the length bound exists. Finally, if there exists a demand between r1 and r2 , we can follow the path r1 – z{1,2} – z{v1 ,v2 } – xv1 ,2 – yv1 – y1 – r2 , which has length 6. Now we prove the other direction. ∗ Let S be an optimal solution for the SLSN instance (G0 , L) with demand graph Hk,0 . If S 3 2 5 4 3 has cost at most 4k − 4k + 2 k + 2 k, then there is a multi-colored clique of size k in G. Lemma 4.11. Let S be an optimal solution for the SLSN instance (G0 , L) with demand graph H ∈ H2,k . If S has cost at most 7|H| − 7k 2 + 9k − 7 · 1{r1 ,r2 }∈H , then there is a multi-colored clique of size k in G. Proof. For each i, j ∈ [k] where i 6= j, let P1,i,j ⊆ S be a (arbitrarily chosen) path between r1 and li,j with length at most 7, and P2,i,j ⊆ S be a (arbitrarily chosen) path between r2 and li,j with length at most 7. Let P1 = {P1,i,j | i, j ∈ [k], i 6= j}, and P2 = {P2,i,j | i, j ∈ [k], i 6= j}. As in lemma 4.9, we first show that some edges must be shared by multiple paths by calculating the total cost. In order to satisfy the demand for each {li,j , li0 ,j 0 } ∈ H \ (B ∪ {{r1 , r2 }}), the only way is to use the edge between li,j and li0 ,j 0 in Ell . Otherwise, suppose the path has more than one edge, since the only edges incident on any li,j have length either 4 or 7, the cost of two of these edges already exceeds the length bound. Thus the total cost of the edges in S ∩ Ell is at least 7|H| − 7|B| − 7 · 1{r1 ,r2 }∈H = 7|H| − 14k 2 + 14k − 7 · 1{r1 ,r2 }∈H . We can see that each of the paths in P1 ∪ P2 must have exactly one edge between every two adjacent levels, and they cannot have any other edges because of the length bound. Thus, each path P1,i,j ∈ P1 must have form r1 – z{i,j} – z{u,v} – xu,j – li,j for some {u, v} ∈ E with u ∈ Ci and v ∈ Cj , and each path in P2,i,j ∈ P2 must have form r2 – yi – yv – xv,j – li,j for some v ∈ Ci . By looking at the form of paths in P1 , we can see that these paths are almost disjoint, except that P1,i,j and P1,j,i may share edge {r1 , z{i,j} } ∈ E11 and edge {z{i,j} , ze } ∈ E12 . Since paths in P1 only contain edges in E11 ∪E12 ∪E13 ∪ Exl , the cost of edges in S ∩ (E11 ∪ E12 ∪ E13 ∪ Exl ) must be at least 7 · k(k − 1) − k2 − k2 = 6k 2 − 6k, even if every P1,i,j and P1,j,i do share edge {r1 , z{i,j} } and edge {z{i,j} , ze }. We then look at the form of paths in P2 . We can see that the first 3 hops of these paths only contain edges in E21 ∪ E22 ∪ E23 . In addition, these paths are all disjoint on edges in E23 . Moreover, in order to reach all li,j from r2 within length 7, these paths should contain all edges in E21 and at least k edges in E22 . Therefore, the total cost of edges in S ∩ (E21 ∪ E22 ∪ E23 ) should be at least k(k − 1) + k + k = k 2 + k. By summing up all these edges, the total cost of edges in S is already at least 7|H| − 14k 2 + 14k − 7 · 1{r1 ,r2 }∈H + 6k 2 − 6k + k 2 + k = 7|H| − 7k 2 + 9k − 7 · 1{r1 ,r2 }∈H = g(H), which means S cannot contain any edge that has not been counted before. Therefore, S must contain exactly k edges in E22 , and each of these edges must have a different yi as an endpoint. We let these edges be {y1 , yv1 }, . . . , {yk , yvk }, where vi ∈ Ci for all i ∈ [k]. We claim that v1 , . . . , vk forms a (multicolored) clique in G. For each 1 ≤ i < j ≤ k, by looking at the form of paths in P2 , we know that the path P2,i,j must be r2 – yi – yvi – xvi ,j – li,j . Because of the total cost limitation, the edge {xvi ,j , li,j } ∈ P2,i,j ∩ Exl must also appear in some path in P1 . By looking at the form of the paths in P1 , the only possible path is P1,i,j . Similarly, path P2,j,i must share edge {xvj ,i , lj,i } with P1,j,i . Again by looking at the form of the paths in P1 , the edge in {z{i,j} , ze } ∈ S ∩ E12 which is shared by P1,i,j and P1,j,i must have e = {vi , vj }, which means {vi , vj } ∈ E. 17 Therefore, v1 , . . . , vk forms a clique in G. 4.2.4 Case 6: Hk We now want to construct an SLSN instance for a demand graph H ∈ Hk from an MCC instance (G = (V, E), c) with parameter k. By the definition of Hk , for some t ∈ [5] there is a graph H (t) of Case t that is an induced subgraph of H. We use Lemma 4.3 to find the graph H (t) . Let (G(t) , L) be the SLSN instance obtained by applying our reduction for Case t to the MCC instance (G, c), and let the corresponding function be g (t) . We now want to transform the SLSN instance (G(t) , L) with demand graph H (t) into a new SLSN instance (G0 , L) with demand graph H, so that instance (G(t) , L, H (t) ) has a solution with cost g (t) (H (t) ) if and only if instance (G0 , L, H) has a solution with cost g(H) = g (t) (H (t) ) + L · (|H| − |H (t) |). If there is such a construction which runs in polynomial time, then there is a multi-colored clique of size k in G if and only if instance (G0 , L, H) has a solution with cost g(H). This will then imply Theorem 4.4. The graph G0 is basically just G(t) with some additional vertices and edges from H \H (t) . For each vertex v in H but not in H (t) , we add a new vertex v to G0 . For each edge {u, v} ∈ H \H (t) , we add an L-hop path between u and v to G0 . The construction still takes poly(|V ||H|) time, because the construction for the previous cases takes poly(|V ||H (t) |) time and the construction for Case 6 takes poly(|G(t) ||H|) time. Here |H (t) | ≤ |H|, and we know that |G(t) | is polynomial in |V | and |H (t) |. Lemma 4.12. SLSN instance (G(t) , L, H (t) ) has a solution with cost g (t) (H (t) ) if and only if instance (G0 , L, H) has a solution with cost g(H) = g (t) (H (t) ) + L · (|H| − |H (t) |). Proof. If instance (G(t) , L, H (t) ) has a solution with cost g (t) (H (t) ). Let the solution be S (t) . (t) For each new L-hop path between u and v in G0 be Pe . Then S e = {u, v} ∈ H \ H , let the (t) 0 S ∪ e∈H\H (t) Pe is a solution to G with cost g (t) (H (t) ) + L · (|H| − |H (t) |). If instance (G0 , L, H) has a solution with cost g (t) (H (t) )+L·(|H|−|H (t) |), let the solution be S. Since for each e = {u, v} ∈ H \ H (t) , the only path between u and v in G0 within the length bound is the new L-hop path Pe , any valid solution must include all these Pe , which has total cost L · (|H| − |H (t) ). In addition, for each demand {u, v} which is also in H, any path between u and v in G0 within the length bound will not include any new edge, becauseSotherwise it will strictly contain an L-hop path, and have length more than L. Therefore, S \ e∈H\H (t) Pe is a solution to G(t) with cost g (t) (H (t) ). Therefore Theorem 4.4 is proved. 4.3 Proof of Theorem 2.4: If C is a recursively enumerable class, and C * Cλ ∪ C ∗ for any constant λ, then for every k ≥ 2, let Hk be the first graph in C where Hk is not a star and has at least 2k 10 edges. The time for finding Hk is f (k) for some function f . From Lemma 4.3 we know that Hk ∈ Hk , so that we can use Theorem 4.4 to construct the SLSNC instance with demand Hk . The parameter p = |Hk | of the instance is a function just of k, and the construction time is FPT from Theorem 4.4. Therefore this is a FPT reduction from the MCC problem to the unit-length unit-cost SLSNC problem. Thus Theorem 4.2 implies that the unit-length unit-cost SLSNC problem is W[1]-hard with parameter p. 18 5 Algorithms for Arbitrary-Length Arbitrary-Cost SLSN The idea for the algorithms for arbitrary-length arbitrary-cost SLSN is the same as that for unit-length arbitrary cost. However, the arbitrary-lengths increase the difficulty of the problem. For example, we cannot use Bellman-Ford algorithm to find the lowest cost path within a certain distance bound. We also cannot go over all the possible lengths of the paths in the dynamic programming algorithm, because it will take exponential time. In order to recover from this, we utilize some techniques in the (1 + ε)-approximation algorithm for the Restricted Shortest Path problem, where the problem is the special case of SLSN with p = 1. 5.1 Preliminaries In this section, we will introduce two algorithms: the first one gives a bound on the optimal solution of the SLSN problem, and the second one finds the shortest path under some flexible cost constraint. The algorithms are similar to the algorithms for the Restricted Shortest Path problem. Given an SLSN instance, the first algorithm OptLow orders all the edges in E by cost and starts from the lowest one. In each iteration i, let ei be the edge considered, and let Gei be the graph that contains all edges in E with cost at most c(ei ). The algorithm checks if Gei contains a feasible solution of the SLSN instance, and returns C = c(ei ) if a solution exists. The pseudocode is in Algorithm 2. Algorithm 2 OptLow(G = (V, E), c, l, H) Order all the edges in E by the cost and get c(e1 ) ≤ c(e2 ) ≤ . . . ≤ c(e|E| ) for i = 1, . . . , |E| do Gei ← the graph that contains all edges in E with cost at most c(ei ) if Gei has a feasible solution then C ← c(ei ) break end if end for return C Lemma 5.1. Let C be the solution returned by Algorithm 2 and OP T be the cost of the optimal solution for the SLSN instance (G = (V, E), c, l, H). Then C ≤ OP T ≤ n2 C, and the running time is polynomial in n. Proof. Since a graph in which all edges have cost less than C does not have a feasible solution, we know that every feasible solution contains an edge which has cost at least C, so the optimal solution has cost at least C. For the upper bound, because graph Gei contains a feasible subgraph, so there is a feasible solution with cost at most n2 C, thus the optimal solution has cost at most n2 C. Because we can use a standard shortest path algorithm for each pair of demands to test the feasibility, we can see that the running time is polynomial in n. Following is the second algorithm, which is aiming to find a low cost path under certain distance bound. Algorithm 3 is essentially l m a dynamic programming algorithm on graph G, n·c(e) ∗ which first defined new costs ce = for all e ∈ E, and then calculate the shortest path  nεC  from s to t with bounded new cost ε . 19 Algorithm 3 M inDist(G = (V, E), c, l, s, t, ε, C) for e ∈ El do m c∗e ← n·c(e) εC end for for v ∈ V \ {s} do d(v, 0) ← ∞ end for d(s, 0) ← 0   for i = 1, . . . , nε do for v ∈ V do d(v, i) ← mine=(u,v)∈E,c∗e ≤i l(e) + d(u, i − c∗e ) end for end for C ∗ ← arg mini∈[b n c] d(t, i) ε if d(t, C ∗ ) < ∞ then return the corresponding path for d(t, C ∗ ) else return ∅ end if Lemma 5.2. Given a graph G = (V, E), a cost function c, a length function l, a pair of vertices (s, t), a constant ε > 0, and a cost bound C, if there exists a path between s and t with cost at most (1 − 2ε)C and distance D, then Algorithm 3 returns a path between s and t with cost at most C and distance at most D. The running time is polynomial in nε . Proof. The running time of this algorithm is clearly polynomial in nε because there is only poly( nε ) slots of d(v, i). We first claim that d(v, i) is the minimal length of a path from s to v under new cost i. This can be proven easily by induction. The base case is i = 0, where d(s, 0) = 0, and for other v ∈ V \ {s}, the minimal length is infinity. For the inductive step, we consider the last edge {u, v} of the shortest path from s to v under new cost i. By removing this edge from the path, it must be a path from s to u under new cost i − c∗{u,v} . Therefore our claim holds. If there exists a path between s and t with cost at most (1 − 2ε)C and distance D, let the edge set of this path be S. Then because S has at most n edges, we know that the new total cost of S is P jnk X X  n · c(e)  n · n(1 − 2ε)C e∈S c(e) ∗ ≤ +n≤ +n≤ . ce = εC εC εC ε e∈S e∈S Thus the algorithm must return a non-empty set S 0 , which connects s and t with distance at most D. Now we can calculate the original cost of path S 0 . We know that P jnk X X  n · c(e)  n · e∈S 0 c(e) ∗ ≥ ce = > . ε εC εC 0 0 e∈S e∈S Thus X e∈S 0 c(e) < j n k εC n εC · ≤ · = C. ε n ε n 20 Therefore, the algorithm returns a path S 0 , which has cost at most C and distance at most D. 5.2 Constant Number of Demands With the algorithms in Section 5.1, we can now introduce our FPTAS algorithm for arbitrarylength arbitrary-cost SLSNCλ . Since Lemma 3.1 still holds for the arbitrary length case, we can use the same idea as in Algorithm 1. However, in the arbitrary length case we can not guess the exact length of each subpath, because there are too many possible lengths. We even can not guess an approximate length for each subpath, because any violation on the length bound may make the solution infeasible. Therefore, we switch to guess the approximate cost of each subpath to solve this problem. The algorithm for arbitrary-length arbitrary-cost SLSNCλ first bound the optimal cost using 0 Algorithm 2. Then Sp guess the endpoint set Q and the set E which intuitively represents how the vertices in Q ∪ i=1 {si , ti } connected to each other, the same way as in Algorithm 1. After that, the algorithm switch to guess the cost c0 of each subpath, basically up to a (1 + ε) error. Finally, the algorithm connect each pair of u, v ∈ V where {u, v} ∈ E 0 by shortest paths with restricted cost c0 ({u, v}) using Algorithm 3, check the feasibility, and output the optimal solution. The detailed algorithm is in Algorithm 4. Algorithm 4 arbitrary-length arbitrary-cost SLSNCλ C ← OptLow(G = (V, E), c, l, H) P M ← e∈E c(e) S←E for Q ⊆ V where S |Q| ≤ p(p − 1) do Q0 ← Q ∪ pi=1 {si , ti }     for E 0 ⊆ {{u, v} | u, v ∈ Q0 , u 6= v}, c0 : E 0 → {− 2 log1+ε n , . . . , −1, 0, 1, . . . , 2 log1+ε n + 3} do T ←∅ for {u, v} ∈ E 0 do 0 T ← T ∪ M inDist(G, c, l, u, v, ε, (1 + ε)c ({u,v}) C) end for P if T is a feasible solution and e∈T c(e) < M then P M ← e∈T c(e) S←T end if end for end for return S 4 Claim 5.3. The running time for Algorithm 4 is is ( nε )O(p ) . Proof. We know that OptLow can be done in polynomial time by Lemma 5.1. Similar to Algorithm 1, we can also see that there are at most np(p−1) possible Q, and for each Q there   2 2 are at most 2(p(p−1)+2p) possible E 0 , and at most (2 · 2 log1+ε n + 3)(p(p−1)+2p) possible c0 . The algorithm 3 in the inner loop takes poly( nε ) running time. Thus the total running time is 2 n (p(p+1))2 at most np(p−1) · 2(p(p+1)) · ( 5 log · poly( nε ) + poly(n). ε ) 21 5.2.1 Proof of Theorem 2.5: The running time has been proven in Claim 5.3, which is polynomial in nε if λ ≥ p is a constant. The correctness is also similar to Algorithm 1. Because the algorithm only returns feasible solution, so we only need to show that this algorithm returns a solution with cost at most the cost of the optimal solution. ∗ We define S ∗ , Pi∗ , Q∗ , Q0∗ , l0∗ , P{u,v} the same as in the proof of Theorem 2.2. We further 0∗ ∗ define c ({u, v}) as the cost of P{u,v} for each {u, v} ∈ E 0 . 0 Since the algorithm iterates over all possibilities for Q,m E 0 and is some iteration in l c , there mo nl 2 c0∗ 0∗ 0 0∗ 0 . The reason that which Q = Q , E = E , and c ≡ max log1+ε (1−2ε)C , − 2 log1+ε nε this c0 must have been iterated is because of Lemma 5.1. We can see that, c0∗ ({u, v}) ≤ OP T ≤ n2 C for every {u, v} ∈ E 0∗ , and so that       c0∗ ({u, v}) n2 C log1+ε ≤ log1+ε ≤ 2 log1+ε n + 3. (1 − 2ε)C (1 − 2ε)C We will show that the algorithm also must find a feasible solution in this iteration. For each i ∈ [p], the path Pi∗ is partitioned to edge-disjoint subpaths by Q0∗ . Let qi be the number of subpaths, and let the endpoints be si = vi,0 , vi,1 , . . . , vi,qi −1 , vi,qi = ti . We further ∗ ∗ ∗ let these subpaths be P{s , P{v , . . . , P{v . By the definition of l0∗ and c0∗ , for i ,vi,1 } i,1 ,vi,2 } i,qi −1 ,ti } each j ∈ [qi ], there must be a path between vi,j−1 and vi,j with length at most l0∗ ({vi,j−1 , vi,j }) and cost at most 0 c0∗ ({vi,j−1 , vi,j }) ≤ (1 − 2ε) · (1 + ε){c (vi,j−1 ,vi,j }) C. Therefore, by Lemma 5.2 we know that the edge set T in this iteration must contains a path between u and v with length at most l0∗ ({vi,j−1 , vi,j }) and cost at most  0∗  c ({vi,j−1 , vi,j }) εC c0 ({vi,j−1 ,vi,j }) (1 + ε) C ≤ max , 2 . 1 − 2ε n Pqi 0∗ Because the summation j=1 l ({vi,j−1 , vi,j }) is at most L, we know that the edge set T in this iteration must satisfies demand {si , ti } for each i ∈ [p]. Therefore it is a feasible solution. We can also see that the cost of the edge set T in this iteration is at most  0∗  X X c ({u, v}) εC 1 max , 2 ≤ c0∗ ({u, v}) + εC 1 − 2ε n 1 − 2ε 0∗ 0∗ e∈E {u,v}∈E OP T + εC 1 − 2ε OP T ≤ + εOP T 1 − 2ε ≤ (1 + 4ε)OP T. ≤ (2) (3) ∗ P Equation0∗ (2) is because the all the Pu,v are edge-disjoint, and thus we have OP T = (u,v)∈E 0∗ c ({u, v}). Equation (3) is because we know that OP T ≥ C by Lemma 5.1. Therefore, the algorithm outputs a (1 + 4ε)-approximation of the optimal solution. By replacing ε with 4ε in the whole algorithm, we get a (1 + ε)-approximation. 5.3 Star Demand Graphs (SLSNC ∗ ) For the case that the demand graph is a star, let s = s1 = s2 = . . . = sp , and T = {t1 , . . . , tp }. We first bound the optimal cost using Algorithm 2, and then assign a new cost for each edge depending our bound of the optimal cost. Finally, we use a dynamic programming algorithm 22 which is similar to the algorithm for DST to solve the problem under the new edge costs, and we can show that it is a (1 + ε)-approximation to the optimal solution in the original edge cost. The detailed algorithm is in Algorithm 5. Here we are aiming to set d(v, R, j) as the smallest height of a tree, such that the root is v, the total new cost is at most j, and it contains all the vertices in R. Then, we can find the minimal j which makes d(v, T, j) ≤ L, and this j is the minimal cost of a feasible solution under the new cost. Note that we only need to consider the height of trees because the optimal solution in this case is always a tree. Algorithm 5 arbitrary-length arbitrary-cost SLSNC ∗ C ← OptLow(G = (V, E), c, l, H) for e ∈ El do m c∗e ← n·c(e) εC end for l 3 m for v ∈ V, R ⊆ T , and j ∈ [ n (1+ε) ] do ε ( 0, if |R| = 1 and v ∈ R, or R = ∅ d(v, R, j) ← ∞, otherwise end for m l 3 do for j = 1, . . . , n (1+ε) ε for i = 1, . . . , p do for v ∈ V, R ⊆ T with |R| = i do d(v, R, j) ← minv0 ∈V,R0 ⊆R,k≤j−c∗ 0 (l({v, v 0 }) + max{d(v 0 , R0 \ {v}, k), d(v 0 , R \ R0 \ {v,v } {v}, j − c∗{v,v0 } − k)}) end for end for end for l 3 m for j = 1, . . . , n (1+ε) do ε if d(s, T, j) ≤ L then return the corresponding tree for d(s, T, j) end if end for Lemma 5.4. The optimal solution S ∗ of the SLSNC ∗ problem is always a tree. Proof. We can assign path P1 , . . . Pp as in the Lemma 3.1. Because S ∗ is an optimal solution, it will not contain any edge other than the edges in P1 , . . . Pp . If there is a cycle in S ∗ , then there are two paths Pi and Pj intersect at a vertex v other than the root s, and the paths to v are different, which contradict with Lemma 3.1. Therefore S ∗ is always a tree. We again first prove the running time. Claim 5.5. Algorithm 5 runs in time O(4p · poly( nε )). Proof. Because running algorithm OptLow and setting new costs runs in polynomial time, we only need l 3to prove m the time of the dynamic programming part. We can see that, d has at most n (1+ε) p n·2 · slots, and filling each of them takes at most n · 2p time, so the total running ε time is O(4p · poly( nε )). 23 We then prove the correctness of the dynamic programming part. m l 3 ], the d(v, R, j) stores the smallest Lemma 5.6. For each v ∈ V , S ⊆ T , and j ∈ [ n (1+ε) ε height of a tree, such that the root is v, the total new cost is at most j, and it contains all the vertices in R. Proof. We prove the lemma using induction. The base case is that R = ∅ or R = {v}, which has already been initialized. The algorithm fill all the d(v, R, j) with the ascending order of j and then ascending order of |R|, so for any v 0 ∈ V , R0 ⊆ R, and k ≤ j − c∗{v,v0 } , we know that d(v 0 , R0 \ {v}, k) and d(v 0 , R \ R0 \ {v}, j − c∗{v,v0 } − k) must have already been filled before filling d(v, R, j). We will show that when updated, d(v, R, j) is at most and at least the smallest height of a tree, such that the root is v, the total new cost is at most j, and it contains all the vertices in R. For the “at most” part, let S be the lowest tree, such that the root is v, the total new cost is at most j, and it contains all the vertices in R. If S is not in the base case, then either v has degree 1, or v has degree more than 1 in S. If v has degree 1, then there must be a v 0 which is adjacent to v, and the tree rooted at v 0 is the lowest height tree, which contains all the vertices in R \ {v}, and the total cost is at most j −c∗{v,v0 } . This case is already considered in the algorithm by setting R0 = R and k = j −c∗{v,v0 } , thus in this case d(v, R, j) is at most the height of S. If v has degree more than 1, then S can be split to two trees S1 and S2 with the same root v. Let R1 = R ∩ S1 , then the height of S is at least the lowest possible height of S1 , and also at least the lowest possible height of S2 . This case is considered in the algorithm by setting v 0 = v, R0 = R1 and k be the cost of S1 , thus in this case d(v, R, j) is also at most the height of S. For the “at least” part, we only need to show that there exist a tree with height d(v, R, j) such that the root is v, the total new cost is at most j, and it contains all the vertices in R. Let v ∗ , R∗ , and k ∗ be the value of v 0 , R, and k which gives the minimum value of d(v, R, j). Then after removed redundant edges, the union of the edge {u, v}, the tree for d(v ∗ , R∗ \ {v}, k ∗ ), and the tree for d(v ∗ , R \ R∗ \ {v}, j − c∗{v,v∗ } − k ∗ ) is a tree which the root is v, the total new cost is at most j, and it contains all the vertices in S, with height d(v, R, j). Therefore d(v, R, j) is correctly set to what we want. No we can finally prove our Theorem 2.6. 5.3.1 Proof of Theorem 2.6 The running time has already been proven in Claim 5.5. P Now we prove the correctness. Let S ∗ be the optimal solution and let OP T = e∈S ∗ c(e). Then, the new cost of this solution is at most X X  n · c(e)  c∗e = εC e∈S ∗ e∈S ∗ P n · e∈S ∗ c(e) ≤ +n εC n · OP T n · εOP T ≤ + εC εC n = (1 + )OP T εC3  n (1 + ε) ≤ , ε 24 because from Lemma 5.4 we know that |S ∗ | ≤ n and from Lemma 5.1 we know that C ≤ OP T ≤ n2 C. Since S ∗ is a tree with height at most L, such that the root is s, the total new cost is at n (1 + )OP T , and it contains all the vertices in T , from Lemma 5.6 and the last section most εC of Algorithm 5 we know that the algorithm must returns a tree S with height at most L, the n total new cost is at most εC (1 + )OP T , and it contains all the vertices in T , which is a feasible solution. Now we calculate the original cost of S. Because P X X  n · c(e)  n · n e∈S c(e) ∗ (1 + )OP T ≥ ce = ≥ , εC εC εC e∈S we know that solution. 6 P e∈S e∈S c(e) ≤ (1 + )OP T , which is a (1 + ε) approximation to the optimal Hardness for Unit-Length Polynomial-Cost SLSN 6.1 Preliminaries In this section, we will do a FPT reduction from the Multi-Colored Densest k-Subgraph (Multi-Colored DkS) problem to the unit-length polynomial-cost SLSNC problem with a C * Cλ ∪ C ∗ . Here is the definition of the Multi-Colored DkS problem. Definition 6.1 (Multi-Colored Densest k-Subgraph). Given a graph G = (V, E), a number k ∈ N, a coloring function c : V → [k], and a factor α < 1. The objective of the Multi-Colored DkS problem is to distinguish the following two cases: • There is a k-clique in G, where each vertex has different color. • Every subgraph of G induced by k vertices contains less than α · k 2  edges. Previously, it has been proven that, assume Gap-ETH holds, then there is no FPT algorithm for Multi-Colored DkS even with α = o(1). Formally, the theorem is as follows. Theorem 6.2 ([10], Corollary 24). Assuming (randomized) Gap-ETH, for any function h(k) = o(1) and any function f , there is no f (k) · nO(1) -time algorithm that solves Multi-Colored DkS with factor α = k −h(k) . We can easily get a weaker version of this theorem which α = O(1). Corollary 6.3. For any constant 0 < α < 1, for any function f , assuming (randomized) Gap-ETH there is no f (k) · nO(1) -time algorithm that solves Multi-Colored DkS with factor α. Proof. We can set h(k) = logk 6.2 1 α in Theorem 6.2. Reduction Theorem 6.4. Let 1 ≥  > 0 be an arbitrary constant, and let G = (V, E), coloring function c : V → [k], and factor ε be a Multi-Colored DkS instance. Let H ∈ Hk . Then we can construct a unit-length polynomial-cost SLSN instance (G0 , L) with demand graph H in poly(|V ||H|) time, and there exists a function g (computable in time poly(|H|)) such that • If there is a k-clique in G, where each vertex has different color, then the SLSN instance has a solution with cost g(H). 25 • If every subgraph of G induced by k vertices contains less than ε·  cost of the SLSN instance is at least 45 − ε g(H). k 2  edges, then the optimal As in the unit-length unit-cost setting, we will first design a reduction for demand graphs ∗ ∗ ∗ H ∈ {Hk,0 , Hk,1 , Hk,2 , Hk,k } ∪ H2,k first, and then consider the general H ∈ Hk . 6.2.1 ∗ Case 1: Hk,0 Let G = (V, E) with coloring function c : V → [k] and factor ε be a Multi-Colored DkS instance. We create a unit-length and polynomial-cost SLSN instance G0 with demand graph ∗ Hk,0 as following. We again use the length-weighted graph G∗k constructed in Section 4.2.1. We change the cost of edges in E2 ∪ E4 to 4k 4 , while keeping the cost equal to the length for the rest of the edges. G0 is again a graph that each edge e ∈ Ek∗ is replaced by a length(e)-hop path. Where the cost of edges is divided equally for each hop. The demands are the same as the demands in ∗ Section 4.2.1, and L is still 4k 2 . The construction still takes |V ||Hk,0 |. The function g is slightly ∗ 6 5 4 ∗ different, where g(Hk,0 ) = 6k − 6k + 3k + k, this function is also computable in poly(Hk,0 ) time. Using the same solution as in the proof of Lemma 4.5, we can see that, If there is a multicolored clique of size k, then the SLSN instance has a solution with cost    5 k 3 + k(k − 1) · (4k 4 − 1) = 6k 6 − 6k 5 + 3k 4 + k, 4k 4 − 4k 3 + k 2 + k + 2 2 2  k because the cost of 2 + k(k − 1) edges in this solution is changed from 1 to 4k 4 . The other direction for the correctness is the following lemma. Lemma 6.5. Let S be an optimalsolution for the SLSN instance (G0 , L) with demand graph  ∗ ∗ ), then there is a subgraph of G with ε · k2 edges. . If S has cost at most 45 − 4ε g(Hk,0 Hk,0 Proof. For each i, j ∈ [k] where i 6= j, let Pi,j be a (arbitrarily chosen) path in S which connects r and li,j with length at most L = 4k 2 . Let P = {Pi,j | i, j ∈ [k], i 6= j} be the set of all these paths. We also let Py be a (arbitrarily chosen) path in S which connects y0 and yk with length at most L. From Claim 4.8, Py can be divided to k subpaths, each correlates to a vertex vi . We will  show that the induced subgraph on vertex set {v1 , . . . , vk } has at least ε · k2 edges. In fact, let R = {{vi , vj } | i, j ∈ [k], i 6= j, Pi,j ∩ E2 = Pj,i ∩ E2 , Py ∩ Pi,j ∩ E4 6= ∅, Py ∩ Pj,i ∩ E4 6= ∅}, we  will show that R ⊆ E and |R| ≥ ε · k2 . For any {vi , vj } ∈ R, by looking at the definition of G∗k and the form of the path Py and Pi,j in Claim 4.6 and 4.8, we know that if Py ∩ Pi,j ∩ E4 is not an empty set, then it must contain only one edge {xvi ,j , x0vi ,j }. Similarly, Py ∩ Pj,i ∩ E4 must be the edge {xvj ,i , x0vj ,i }. From this, we can see that Pi,j ∩ E2 = Pj,i ∩ E2 must be the edge {z{i,j} , z{vi ,vj } }, because z{vi ,vj } is the only vertex which is adjacent to both xvi ,j and xvj ,i . Therefore by the definition of E2 , we know that {vi , vj } is an edge of E, which means R ⊆ E. Thus the only thing left is to show that  |R| ≥ ε · k2 . From Claim 4.8, because Py contains k subpaths, and each subpath contains k − 1 edges in E4 , we know that |Py ∩ E4 | ≥ k(k − 1). From Claim 4.6, because for each i, j ∈ [k] where i 6= j, there is at least one edge in Pi,j ∩ E4 , and they must be different from each other, we know that S S i,j∈[k],i6=j Pi,j ∩ E4 ≥ k(k − 1). Let x = |S ∩ E4 | = (Py ∪ i,j∈[k],i6=j Pi,j ) ∩ E4 , then Py ∩ [ i,j∈[k],i6=j [ Pi,j ∩ E4 = |Py ∩ E4 | + i,j∈[k],i6=j 26 Pi,j ∩ E4 − x ≥ 2k(k − 1) − x. Let T = {Pi,j | i, j ∈ [k], i 6= j, Py ∩ Pi,j ∩ E4 6= ∅}, then |T | ≥ 2k(k − 1) − x, because each Pi,j can share at most one edge with Py . We also know that each edge {z{i,j} , ze } ∈ S ∩ E2 can only appear in at most two different paths, which are Pi,j and Pj,i . Let y = |S ∩ E2 |. From Claim 4.6 we know that each path in T must contain at least one edge in S ∩ E2 , thus there are at least |T | − y edges in S ∩ E2 which appear in two different paths in T . Therefore |R| ≥ |T | − y. 4 Now we calculate the  size∗ of R. Because every edge in E2 ∪ E4 has cost 4k , and the total ε 5 cost is less than 4 − 4 g(Hk,0 ), thus we have %  $   ε 5 ∗ 15 3ε 4 − 4 g(Hk,0 ) ≤ x + y = |S ∩ E2 | + |S ∩ E4 | ≤ − k(k − 1), 4k 4 8 8 so that    k |R| ≥ |T | − y ≥ 2k(k − 1) − x − y ≥ 2k(k − 1) − k(k − 1) ≥ ε · . 2  Therefore the induced subgraph with vertex set {v1 , . . . , vk } has at least ε · k2 edges. 6.2.2 15 3ε − 8 8  Case 2, 3, and 4: In this setting, the construction of Case 2, 3 still keep the same as Case 1, and the change for 4 are basically the same as the unit-cost setting. ∗ Case 2: Hk,1 We use the same G∗k , G0 and L in the construction of the SLSN instance for demand graph ∗ ∗ Hk,0 , and also set g(Hk,1 ) = 6k 6 − 6k 5 + 4k 4 + k. The only difference is the demand graph. Besides the demand of {r, li,j } for all i, j ∈ [k] where i 6= j, and {y0 , yk }, there is a new demand {r, y0 }. Clearly this new demand graph is a star with (k(k − 1) + 1) leaves, and an edge in which ∗ . exactly one of the endpoints is a leaf of the star, so it is isomorphic to Hk,1 Assume there is a multi-colored clique of size k in G. The paths connecting previous demands in the solution of the SLSN instance are the same as Case 1. The path between r and y0 is r – z{1,2} – z{v1 ,v2 } – xv1 ,2 – y0 . All the edges in this path is already in the previous paths, so the cost remains the same. The length of this path is 2 + 1 + 2k 2 − 2 + 4 = 2k 2 + 5 < 4k 2 , which satisfies the length bound. ∗ Assume there is a solution for the SLSN instance (G0 , L, Hk,1 ) with total cost less than   k 5 ε ∗ 4 − 4 g(Hk,1 ). The proof of existing a subgraph of G with ε · 2 edges is the same as Case 1. ∗ Case 3: Hk,2 As in Case 2, only the demand graph changes. The new demand graph is the same as in Case 2 but again with a new demand {r, yk }. Since {r, y0 }was already a demand, our new demand graph is a star with (k(k − 1) + 2) leaves (the li,j ’s and y0 and yk ), and an edge between two of ∗ its leaves (y0 and yk ), which is isomorphic to Hk,2 . Assume there is a multi-colored clique of size k in G. The paths connecting previous demands in the solution of the SLSN instance are the same as Case 2. The path between r and yk is r – z{k−1,k} – z{vk−1 ,vk } – xvk ,k−1 – yk . All the edges in this path is already in the previous paths, so the cost stays the same. The length of this path is 2 + 1 + 2k 2 − 2 + 4 = 2k 2 + 5 < 4k 2 , which satisfies the length bound. ∗ Assume there is a solution for the SLSN instance (G0 , L, Hk,2 ) with total cost less than   k 5 ε ∗ 4 − 4 g(Hk,2 ). The proof of existing a subgraph of G with ε · 2 edges is the same as Case 1. Case 4: Hk,k 27 In order to get Hk,k as our demand graph, we have to slightly change the construction in Case 1. We still first make a weighted graph Gk,k = (Vk,k , Ek,k ) and then transform it to the 0 unit-length graph G0 . For the vertex set Vk,k , we add another layer of vertices V0 = {li,j | ∗ i, j ∈ [k], i 6= j} in to Vk before the first layer V1 . For the edge set Ek,k , we include all the edges in Ek∗ , but change the edges in E1 to length 1 and cost 1. We also add another edge set 0 E0 = {{li,j , r} | i, j ∈ [k], i 6= j}. Each edge in E0 has length 1 and cost 1. 0 The demands are {li,j , li,j } for each i, j ∈ [k] where i 6= j, as well as {y0 , yk }. This is a matching of size k(k − 1) + 1, which is isomorphic to Hk,k . We still set the length bound to be 2 L = 4k 2 , and set g(Hk,k ) = 6k 6 − 6k 5 + 3k 4 + k2 + k2 . If there is a multi-colored clique of size k in G, the construction for the solution in G0 is 0 0 – and li,j becomes li,j similar to Case 1. For each i, j ∈ [k] where i 6= j, the paths between li,j 0 r – z{i,j} – z{vi ,vj } – xvi ,j – xvi ,j – li,j (i.e., one more layer before the root r). It is easy to see that the length bound and size bound are still satisfied. Assume there is a solution for the SLSN instance (G0 , L, Hk,k ) with total cost less than   k 5 ε 4 − 4 g(Hk,k ). The proof of existing a subgraph of G with ε · 2 edges is the same as Case 1, 0 and li,j has one more layer. except the path between li,j 6.2.3 Case 5: H2,k For any ε > 0, assume there is a demand graph H ∈ H2,k and a Multi-Colored DkS instance G = (V, E) with coloring function c, factor ε, and parameter k. We create a unit-length and polynomial-cost SLSN instance G0 as following. We again use the length-weighted graph G2,k constructed in Section 4.2.3. We change the cost of edges in E22 to 4k 4 (k − 1), the cost of edges in E12 ∪ Exl to 8k 4 , while keeping the cost equal to the length for the rest of the edges. G0 is again a graph that each edge e ∈ E2,k is replaced by a length(e)-hop path. Where the cost of edges is divided equally for each hop. The demands are the same as the demands in Section 4.2.3, and L is still 7. The construction still takes |V ||H|. The function g is slightly different, where g(H) = 16k 6 − 16k 5 − 10k 2 + 11k + 7|H| − 7 · 1{r1 ,r2 }∈H . Using the same solution as in the proof of Lemma 4.10, we can see that, If there is a multicolored clique of size k, then the SLSN instance has a solution with cost   k 7|H| − 7k 2 + 9k − 7 · 1{r1 ,r2 }∈H + k · (4k 4 (k − 1) − 1) + k(k − 1) · (8k 4 − 1) + · (8k 4 − 4) 2 =16k 6 − 16k 5 − 10k 2 + 11k + 7|H| − 7 · 1{r1 ,r2 }∈H , because the cost of k edges in E22 in this solution is changed from 1 to 4k 4 (k − 1), the cost of  k 4 2 edges in E12 in this solution is changed from 1 to 8k , and the cost of k(k − 1) edges in Exl 4 in this solution is changed from 4 to 8k . The other direction for the correctness is the following lemma. 0 Lemma 6.6. Let S be an optimal solution  for the SLSN instance (G , L) with demand  graph H ∈ H2,k . If S has cost less than 45 − 4ε g(H), then there is a subgraph of G with ε · k2 edges. Proof. For each i, j ∈ [k] where i 6= j, let P1,i,j be a (arbitrarily chosen) path in S which connects r1 and li,j , and P2,i,j be a (arbitrarily chosen) path in S which connects r2 and li,j . Let P1 = {P1,i,j | i, j ∈ [k], i 6= j}, and P2 = {P2,i,j | i, j ∈ [k], i 6= j}. We can see that each of these paths must have exactly one edge between each two levels. Where paths in P1 have form r1 – z{i,j} – z{u,v} – xu,j – li,j with c(u) = i, c(v) = j, and {u, v} ∈ E. The paths in P2 have form r2 – yi – yv – xv,j – li,j with c(v) = i. For each color i ∈ [k], we can see that, in order to connect r2 with all li,j , there must be at S least one edge {yi , yv } ∈ S ∩ E22 with v ∈ Ci . Let vi = arg maxv∈Ci {yi , yv } ∩ j∈[k]\{i} P2,i,j 28 be the vertex which is in the most number of paths in  P2 . We will prove that the induced subgraph with vertex set {v1 , . . . , vk } has at least ε · k2 edges. For each i ∈ [k], the edge {yi , yv } ∈ S ∩ E22 can only appear in at most k − 1 different paths, which are P2,i,j where j ∈ [k] \ {i}. Because {yi , yvi } appears in most number of paths in P2 , any {yi , yv } other than {yi , yvi } can appear in at most k−1 2 different paths. Let x = |S ∩ E22 |. Let T = {(i, j) | i, j ∈ [k], i 6= j, {yi , yvi } ∈ P2,i,j }. Then, |T | ≥ k(k − 1) − (x − k) · k−1 = 2 3 k−1 2 k(k − 1) − 2 x. We know that there is at least one different edge in Exl for each P1,i,j ∈ P1 where (i, j) ∈ T , S thus Exl ∩ (i,j)∈T P1,i,j ≥ |T |. There is also at least one different edge in Exl for each S P2,i,j ∈ P2 , thus Exl ∩ i,j∈[k],i6=j P2,i,j ≥ k(k − 1). Let y = |S ∩ Exl |, then Exl ∩ [ [ P1,i,j ∩ (i,j)∈T i,j∈[k],i6=j P2,i,j ≥ Exl ∩ [ [ P1,i,j + Exl ∩ ≥ |T | + k(k − 1) − y = P2,i,j − |S ∩ Exl | i,j∈[k],i6=j (i,j)∈T 5 k−1 k(k − 1) − x − y. 2 2 For each (i, j) ∈ T , by looking at the form of P1 and P2 , we know that Exl ∩ P1,i,j can not intersect with P2,i0 ,j 0 with any (i0 , j 0 ) 6= (i, j). And if Exl ∩ P1,i,j do intersect with P2,i0 ,j 0 , the intersection must be exactly one edge {xvi ,j , li,j }. Therefore, let T 0 = {P1,i,j | (i, j) ∈ T, {xvi ,j , li,j } ∈ Exl ∩ P1,i,j ∩ P2,i,j }, we have |T 0 | ≥ 52 k(k − 1) − k−1 2 x − y. Let z = |S ∩ E12 | and R = {{vi , vj } | P1,i,j ∈ T 0 , P1,j,i ∈ T 0 , P1,i,j ∩ E12 = P1,j,i ∩ E12 }. Because each path in T 0 has an edge in S ∩ E12 , and any edge (zc(u),c(v) , z{u,v} ) ∈ S ∩ E12 can appear in at most two paths P1,c(u),c(v) and P1,c(v),c(u) in T 0 , we know that |R| ≥ |T 0 | − z. For any {vi , vj } ∈ R, because {xvi ,j , li,j } ∈ P1,i,j and {xvj ,i , lj,i } ∈ P1,j,i , by looking at the form of P1,i,j and the form of P1,j,i , we know that P1,i,j ∩ E12 = P1,j,i ∩ E12 can only be the edge {z{i,j} , z{vi ,vj } }, which means {vi , vj } ∈ E. Therefore R ⊆ E. Thus the only thing left is  to show that |R| ≥ ε · k2 . Because |H| ≤ (k(k − 1) + 2)(k(k − 1) + 1), we have    ε 5 k−1 5 ε 4 − 4 g(H) x+y+z ≤ − k(k − 1). ≤ 2 8k 4 2 2 Thus we have |R| ≥ |T 0 | − z ≥ 5 k−1 5 k(k − 1) − x − y − z ≥ k(k − 1) − 2 2 2  5 ε − 2 2  k(k − 1) ≥ ε · Therefore the induced subgraph with vertex set {v1 , . . . , vk } has at least ε · 6.2.4 k 2    k . 2 edges. Case 6: Hk For any small constant ε > 0, we now want to construct a SLSN instance for a demand graph H ∈ Hk from a Multi-Colored DkS instance (G = (V, E), c), factor ε, and parameter k. By definition of Hk , for some t ∈ [5] there is a graph H (t) of Case t which is an induced subgraph of H. We use Lemma 4.3 to find out the graph H (t) . Let (G(t) , L) be the SLSN instance obtained from applying our reduction for case t from the Multi-Colored DkS instance (G = (V, E), c). We want to construct a instance (G0 , c0 , L) with demand graph H, and makes sure that • If the SLSN instance (G(t) , c(t) , L) has a solution with cost g (t) (H (t) ), then the SLSN instance (G0 , c0 , L) has a solution with cost g(H). 29  • If the optimal cost of the SLSN instance (G0 , c0 , L) is less than 45 − ε g(H), then the  optimal cost of the SLSN instance (G(t) , c(t) , L) is less than 54 − 4ε g (t) (H (t) ). If there is such a construction, then • If there is a multi-colored clique in G with size k, then the SLSN instance (G0 , c0 , L) has a solution with cost g(H).  • If the optimal cost of the SLSN instance (G0 , c0 , L) is less than 54 − ε g(H), then there  is a induced subgraph of G with k vertices and at least ε · k2 edges. Which is what we need for Theorem 6.4. The graph G0 is basically graph G(t) with some additional vertices and edges appeared in l m L|H| (t) (t) H \ H . We first increase the cost for all the edges in G by multiplicative factor . ε For each vertex v in H but not in H (t) , we add a new vertex v to G0 . For each edge {u, v} ∈ H \ H (t)l, we madd a L-hop path between u and v to G0 , each new edge has cost 1. We set L|H| ε g(H) = · g (t) (H (t) ) + L · (|H| − |H (t) |). This is computable in poly(|H|) time. The construction still takes poly(|V ||H|) time, because the construction for the previous cases takes poly(|V ||H (t) |) time and the construction for Case 6 takes poly(|G(t) ||H|) time. Here |H (t) | ≤ |H|, and we know that |G(t) | is polynomial in |V | and |H (t) |. If instance (G(t) , L, H (t) ) has a solution with cost g (t) (H (t) ), let the optimal solution be S (t) . 0 For each e = {u, v} ∈ H \ H (t) , let the new L-hop l path m between u and v in G be Pe . Then S S (t) ∪ e∈H\H (t) Pe is a solution to G0 with cost L|H| · g (t) (H (t) ) + L · (|H| − |H (t) |) = g(H). ε  If instance instance (G0 , L, H) has a solution with cost less than 45 − ε g(H), let the optimal solution be S. Since for each e = {u, v} ∈ H \ H (t) , the only path between u and v in G0 within the length bound is the new L-hop path Pe . Any valid solution must include all these Pe , which in total costs L·(|H|−|H (t) |). In addition, for each demand {u, v} which is also in H (t) , any path between u and v in G0 within the length bound will not include any new edge, because otherwise S it will contain a L-hop path, and have length more than L. Therefore, S \ e∈H\H (t) Pe is a solution to G(t) with cost less than    5 1 l m − ε g(H) − L · (|H| − |H (t) |) L|H| 4 ε       5 1 L|H| m =l −ε · g (t) (H (t) ) + L · (|H| − |H (t) |) − L · (|H| − |H (t) |) L|H| 4 ε ε    L · (|H| − |H (t) |) · 54 − ε − 1 5 l m = − ε · g (t) (H (t) ) + L|H| 4 ε L · |H| · 5 − ε · g (t) (H (t) ) + L|H| 4 ε   5 ε (t) (t) ≤ − ε · g (H ) + 4 4   5 ε ≤ − g (t) (H (t) ). 4 4   ≤ 1 4 Therefore Theorem 6.4 is proved. 30 6.3 Proof of Theorem 2.7: If C is a recursively enumerable class, and C * Cλ ∪ C ∗ for any constant λ, then for every k ≥ 2, let Hk be the first graph in C where Hk is not a star and it has at least 2k 10 edges. The time for finding Hk is f (k) for some function f . From Lemma 4.3 we know that Hk ∈ Hk , so that we can use Theorem 6.4 to construct the SLSNC instance with demand Hk . The parameter p = |Hk | of the instance is only related with k, and the construction time is FPT from Theorem 6.4. Therefore this is a FPT reduction from the Multi-Colored DkS problem with parameter k and  factor ε to the unit-length polynomial-cost SLSNC problem with approximation factor 54 − ε . From Corollary 6.3, the unit-length polynomial-cost SLSNC problem has no 54 − ε -approximation algorithm in f (p) · poly(n) time for any function f , assuming Gap-ETH. References [1] Amir Abboud and Greg Bodwin. Reachability preservers: New extremal bounds and approximation algorithms. In Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2018, pages 1865–1883, 2018. [2] Ajit Agrawal, Philip Klein, and R Ravi. When trees collide: An approximation algorithm for the generalized steiner problem on networks. SIAM Journal on Computing, 24(3):440– 456, 1995. [3] Amy Babay, Emily Wagner, Michael Dinitz, and Yair Amir. Timely, reliable, and costeffective internet transport service using dissemination graphs. In 37th IEEE International Conference on Distributed Computing Systems, ICDCS 2017, pages 1–12, 2017. [4] MohammadHossein Bateni, MohammadTaghi Hajiaghayi, and Dániel Marx. Approximation schemes for steiner forest on planar graphs and graphs of bounded treewidth. Journal of the ACM (JACM), 58(5):21, 2011. [5] Piotr Berman and Viswanathan Ramaiyer. Improved approximations for the steiner tree problem. Journal of Algorithms, 17(3):381–408, 1994. [6] Jaroslaw Byrka, Fabrizio Grandoni, Thomas Rothvoss, and Laura Sanità. Steiner tree approximation via iterative randomized rounding. Journal of the ACM (JACM), 60(1):6, 2013. [7] Parinya Chalermsook, Marek Cygan, Guy Kortsarz, Bundit Laekhanukit, Pasin Manurangsi, Danupon Nanongkai, and Luca Trevisan. From gap-eth to fpt-inapproximability: Clique, dominating set, and more. In Foundations of Computer Science (FOCS), 2017 IEEE 58th Annual Symposium on, pages 743–754. IEEE, 2017. [8] Moses Charikar, Chandra Chekuri, To-yat Cheung, Zuo Dai, Ashish Goel, Sudipto Guha, and Ming Li. Approximation algorithms for directed steiner problems. Journal of Algorithms, 33(1):73–91, 1999. [9] Chandra Chekuri, Guy Even, Anupam Gupta, and Danny Segev. Set connectivity problems in undirected graphs and the directed steiner network problem. ACM Transactions on Algorithms (TALG), 7(2):18, 2011. [10] Rajesh Chitnis, Andreas Emil Feldmann, and Pasin Manurangsi. Parameterized approximation algorithms for directed steiner network problems. arXiv preprint arXiv:1707.06499, 2017. [11] Eden Chlamtác, Michael Dinitz, Guy Kortsarz, and Bundit Laekhanukit. Approximating spanners and directed steiner forest: Upper and lower bounds. In Proceedings of the TwentyEighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, pages 534– 553, 2017. 31 [12] Stuart E Dreyfus and Robert A Wagner. The steiner problem in graphs. Networks, 1(3):195– 207, 1971. [13] Jon Feldman and Matthias Ruhl. The directed steiner network problem is tractable for a constant number of terminals. SIAM Journal on Computing, 36(2):543–561, 2006. [14] Andreas Emil Feldmann and Dániel Marx. The complexity landscape of fixed-parameter directed steiner network problems. In 43rd International Colloquium on Automata, Languages, and Programming, ICALP 2016, volume 55 of LIPIcs, pages 27:1–27:14. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2016. [15] Michael R Fellows, Danny Hermelin, Frances Rosamond, and Stéphane Vialette. On the parameterized complexity of multiple-interval graph problems. Theoretical Computer Science, 410(1):53–61, 2009. [16] Michel X Goemans and David P Williamson. A general approximation technique for constrained forest problems. SIAM Journal on Computing, 24(2):296–317, 1995. [17] Longkun Guo, Kewen Liao, and Hong Shen. On the shallow-light steiner tree problem. In Parallel and Distributed Computing, Applications and Technologies (PDCAT), 2014 15th International Conference on, pages 56–60. IEEE, 2014. [18] Mohammad Taghi Hajiaghayi, Guy Kortsarz, and Mohammad R Salavatipour. Approximating buy-at-bulk and shallow-light k-steiner trees. Algorithmica, 53(1):89–103, 2009. [19] Refael Hassin. Approximation schemes for the restricted shortest path problem. Mathematics of Operations research, 17(1):36–42, 1992. [20] Kamal Jain. A factor 2 approximation algorithm for the generalized steiner network problem. Combinatorica, 21(1):39–60, 2001. [21] Richard M Karp. Reducibility among combinatorial problems. In Complexity of computer computations, pages 85–103. Springer, 1972. [22] Guy Kortsarz and David Peleg. Approximating shallow-light trees. Technical report, Association for Computing Machinery, New York, NY (United States), 1997. [23] L Kou, George Markowsky, and Leonard Berman. A fast algorithm for steiner trees. Acta informatica, 15(2):141–145, 1981. [24] Dean H Lorenz and Danny Raz. A simple efficient approximation scheme for the restricted shortest path problem. Operations Research Letters, 28(5):213–219, 2001. [25] Joseph Naor and Baruch Schieber. Improved approximations for shallow-light spanning trees. In Foundations of Computer Science, 1997. Proceedings., 38th Annual Symposium on, pages 536–541. IEEE, 1997. [26] Gabriel Robins and Alexander Zelikovsky. Improved steiner tree approximation in graphs. In SODA, pages 770–779, 2000. [27] Alexander Zelikovsky. Better approximation bounds for the network and euclidean steiner tree problems. University of Virginia, Charlottesville, VA, 1996. [28] Leonid Zosin and Samir Khuller. On directed steiner trees. In Proceedings of the thirteenth annual ACM-SIAM symposium on Discrete algorithms, pages 59–63. Society for Industrial and Applied Mathematics, 2002. 32
8cs.DS
Variant tolerant read mapping using min-hashing Jens Quedenfeld1,3 and Sven Rahmann2,3 arXiv:1702.01703v2 [q-bio.GN] 8 Feb 2017 1 Chair of Theoretical Computer Science, Technical University of Munich, Germany [email protected] 2 Genome Informatics, Institute of Human Genetics, University Hospital Essen, University of Duisburg-Essen, Essen, Germany [email protected] 3 Bioinformatics, Computer Science XI, TU Dortmund, Germany Abstract. DNA read mapping is a ubiquitous task in bioinformatics, and many tools have been developed to solve the read mapping problem. However, there are two trends that are changing the landscape of readmapping: First, new sequencing technologies provide very long reads with high error rates (up to 15%). Second, many genetic variants in the population are known, so the reference genome is not considered as a single string over ACGT, but as a complex object containing these variants. Most existing read mappers do not handle these new circumstances appropriately. We introduce a new read mapper prototype called VATRAM that considers variants. It is based on Min-Hashing of q-gram sets of reference genome windows. Min-Hashing is one form of locality sensitive hashing. The variants are directly inserted into VATRAMs index which leads to a fast mapping process. Our results show that VATRAM achieves better precision and recall than state-of-the-art read mappers like BWA under certain cirumstances. VATRAM is open source and can be accessed at https://bitbucket.org/Quedenfeld/vatram-src/. 1 Introduction In bioinformatics, DNA read mapping has become an important basic step for many sequencing analysis tasks. Given millions of short DNA fragments (so called reads) over the alphabet Σ = {A, C, G, T } and a reference genome which is a long DNA string that is many magnitudes longer than the reads, the problem is to locate these reads in that genome. A typical (short) read length is 100–300 nucleotides [14], the human reference genome has a length of approximately 3 billion nucleotides. Since not all individuals are identical, there are some differences between a given read and the corresponding interval on the reference genome. Furthermore, the sequencing machines are not perfect and produces sequencing errors, therefore, the best match is searched for, e.g. according to the edit distance. To solve the read mapping problem efficiently, usually an index data structure is used to find an exact match between a short substring of the read and the 2 reference genome. Afterwards, the exact match (called seed ) is extended to a full alignment. Many popular read mappers (such as BWA [12] or Bowtie2 [10]) use the FM index which is based on suffix arrays and the Burrows Wheeler Transformation [7]. However, if there are many differences between the read and the reference genome, then there are few unique long seeds that can be found, but many unspecific short seeds, so common read mappers have difficulties to map reads with many errors efficiently This problem becomes more and more important for two reasons. First, there are new sequencing technologies (for example from Pacific Biosciences [6]) which produce long reads with up to 60 000 nucleotides and a high error rate of 10%– 15%. Second, thousands of individual human genomes have been sequenced in the last years, so many frequent variants are known. It is commonly accepted that the human genome is not represented well by a single string over the alphabet Σ. To improve the read mapping process it is necessary to consider these known variants. About 90% of the differences between the individuals of one species are single nucleotide polymorphisms (SNPs), which are substitutions of one single nucleotide in DNA. Other important variant types are insertions or deletions of one or more nucleotides as well as large structural rearrangements. Index data structures based on the FM index have problems to handle these new circumstances, so new types of indexes have to be explored. One such alternative is locality sensitive hashing (LSH) on q-gram sets of reference intervals. LSH has been already used for finding similarities between different DNA sequences [4] as well as for genome assembly [1] of PacBio reads. However, as far as we know LSH was not used for read mapping yet. We have developed a prototype of a read mapper called VATRAM (VAriant Tolerant ReAd Mapper ) which is able to consider known variants. VATRAM uses MinHashing [2] which is one specific form of LSH. This paper is organized as follows: In section 2 we describe in detail how the index of VATRAM works and how it is created. Afterwards (section 3) we explain how reads can be found in the reference genome using this index and how they are aligned using our variant tolerant aligner. Section 4 contains several experiments where VATRAM is compared to other read mappers. Preliminary ideas, implementations and experiments were reported in an internal report [9] and a Master’s thesis [16]; the present article contains our summarized findings. The source code of VATRAM is available at https:// bitbucket.org/Quedenfeld/vatram-src/. 2 2.1 Index creation Basic idea The index of VATRAM is created as follows. First, each chromosome is divided into windows of length w, such that the windows are slightly longer than the typical read length n. The distance between two consecutive windows is denoted by o ≤ w, so the windows may (and usually do) overlap. A typical configuration is w = 1.4n and o = 1.25n [16]. 3 For each window, the set of contained q-grams (substrings of length q) is determined. If the window contains a SNP which appears with a known population frequency higher than δ, then the q-grams containing the SNP are added to the window’s q-gram set. A typical value is δ = 0.2. If there are two or more SNPs with a distance lower than q, then we add all combinations of q-grams to the set. However, if are too many SNPs within a given substring of length q, than these SNPs are ignored, because adding all combinations would enlarge the q-gram set too much. In the extreme case there would be q consecutive positions where all four bases (A,C,G,T) are allowed. So there would be 4q possible q-grams for that substring. If we added these to the window’s q-gram set, it would contain all possible q-grams, so there is no information which could help us to map a read to this window. By default a limit of l = 3 q-grams for each q-gram position is used. Each q-gram set is mapped to a single value using a technique called minhashing [2]. For that purpose we conceptually choose an arbitrary permutation of all q-grams uniformly at random. A q-gram set is mapped to the smallest qgram according to the order defined by this permutation. The resulting q-gram is called the signature value of the window. If we compare two q-gram sets Q and Q0 the min hash property holds: Lemma 1 (Min-hash property). Let Q be the set of all strings over Σ of length q. Given two sets Q ⊂ Q, Q0 ⊂ Q and the set Π of all permutations on Q, let π ∈ Π be a random permutation. For any Q ⊂ Q, define h(Q) := minπ (Q). The probability that Q and Q0 are hashed to the same value h(Q) = h(Q0 ) is equal to the Jaccard coefficient of Q and Q0 , P (h(Q) = h(Q0 )) = |Q ∩ Q0 | . |Q ∪ Q0 | (1) A proof can be found in [2]. Of course, in practice it is not possible to do this, because there are (4q )! different permutations, so log2 (4q !) bits are required to represent a permutation. For a common value like q = 16, this is about 4 · 1010 bits per permutation, which is not practical. Therefore, instead of a permutation we choose a random 32 bit word which is called permutation value. The q-grams are also represented by 32 bit hash values4 The signature value is calculated using the exclusive or operation (XOR) between each q-gram hash and the permutation value π and then taking the minimum: hπ (Q) = min{x ⊕ π | x ∈ Q}. (2) Using 32 random bits and the XOR technique instead of a true random permutation means that the pre-conditions of Lemma 1 do not hold and the 4 If the q-gram length is larger than 16, some q-grams are mapped to the same hash value. However, we found out that longer words (e.g. 64 bit) only increases the memory consumption, but the mapping quality stays almost the same. 4 min-hash property may be violated [3]. However, empirical studies have shown that in practice the XOR technique approximates the desired property well [5]. Mapping each window to a single signature value is not enough to find a read. Therefore s different permutation values are used. The parameter s is called signature length. 2.2 Data structure For each permutation value a data structure, such as a simple hash table, is needed to map the calculated signature values (of each window) to the particular window in the reference genome. Instead of a simple hash table, we use a two layer succinct rank data structure, because it needs less memory. An one layer rank data structure consists of a bit array B, an offset array C and a data array D. The bit array is divided into blocks of length λ. For each block there is one entry in the offset array that indicates the number of 1’s in B up to this block. The data array contains one data entry for each 1 in B, so the length of D is equal to the number of 1’s in B. Given an index i in B with B[i] = 1, the corresponding data entry D[j] can be efficiently accessed by using the offset array C. Additional information about rank data structures can be found for example in [15]. This one layer rank data structure can be directly used for our purpose. Each entry in B represents a possible signature value, so the length of B is 232 . The elements of the data array are also arrays that contain the particular window references. This data structure has two disadvantages resulting in a very high memory 32 consumption: First, the array B needs 28 Bytes = 512 MB space. Note that this space is needed for each permutation value, so the memory consumption of B must be multiplied with s, so for s = 36 we get a memory usage of already 18 GB for the bit arrays. Second, the most signature values are unique, i.e. the most arrays in D contain only one window reference. This leads to a high memory overhead. The first problem is solved by using a two layer rank data structure which is visualized in figure 1. For the human genome with 3 billion nucleotides, there are 24 million windows (when using the default window distance o = 125). Thus, only 0.6%5 of the entries are 1’s and with λ = 32 at least 82%6 of the blocks contain only zeros. The two layer rank data structure uses the arrays B + and C + in the super layer and B − , C − and D− in the second layer. Note that the data array D+ of the super layer equals the arrays B − and C − . The array B − contains only those blocks of B that contain at least one “1”. The super layer is needed to decide if a given block k in B is empty (i.e. B + [k] = 0) or not (i.e. B + [k] = 1). The data array D− is exactly the same as before, so D− = D. By 5 6 6 Because 24·10 ≈ 0.006 232 There are 24 million windows, so at most 24 million blocks can contain at least one 6 “1”. Thus, the ratio of blocks that contains only zeros is 1 − 24·10 = 0.8211... 232 /λ 5 default, the block size of the super layer is λ+ = 64 and the block size of the second layer is λ− = 32. Fig. 1. Visualization of the two layer rank data structure. The figure was adapted from [9], some variable names were changes. The second problem can be solved as follows. Usually a window reference is stored as a 32 bit value. However, for reasonable configurations there are always less than 230 (about one billion) windows, so the two most significant bits can be used for meta information. If there is only one window for a given signature value, then the two bits are set to 00 and the window reference is stored directly in D− . For signature values having exactly two corresponding windows, there is one additional array whose elements consists of two window references. The corresponding entry in D− contains the index in that array and the meta bits are set to 01. Furthermore there is one array whose elements consists of up to four window references and another one whose elements are dynamic arrays. The described data structure is called Multi Window Manager and visualized in figure 2. Using more permutations leads to better results in the sense that we are better able to distinguish true similarities from random hits; however, the memory consumption increases linearly with the number of permutations. For the human genome and reads of length n = 100 usually s = 36 permutation values are used which leads to a memory consumption of about 14 GB [16]. For longer reads, the window distance relative to the read length (o/n) can be decreased, so there are less windows and therefore less value pairs that have to be stored in the rank data structure, so the number of permutations can be increased. 6 00 17 01 2 Multi Window Manager doubleWindowBuckets 3 5 10 26 15 4 8 6 7 23 27 16 18 28 − ··· 2 10 11 19 21 22 25 1 9 12 14 15 {4, 8, 13} ··· multiWindowBuckets 1 {4, 8} ··· quadrupleWindowBuckets 0 4 8 13 − 11 Output Window references {17} ... Input Entry in D− Fig. 2. Visualization of the MultiWindowManager {1, 9, 12, 14, 15} 7 3 Read mapping Mapping and aligning a DNA read is done in two phases. In the mapping phase, candidate windows of the reference genome are determined and converted to candidate intervals. In the alignment phase, a variant tolerant alignment between the read and the candidate intervals is performed to obtain the best alignment, taking all variants into account. 3.1 Finding reference intervals To find a given read in the reference genome, first its q-grams set is determined. Then the signature values are determined analogous to the index creation using the same permutation values. Each signature value is looked up in the index data structure, so for each permutation value we receive a (possibly empty) list of window indices. The same procedure is done with the reverse complement of the read. Now we count how many times each window index was found. This is done by sorting all found window indices. To accelerate this, we sort each window list in the index data structure already during the index creation. Then we use merge sort to merge the already sorted window lists. If a read is located between two windows, there are common q-grams with both windows and therefore we probably obtain several common signature values for both windows. For this reason neighboring windows are summarized to a so-called window sequence. Single windows (that have no neighbors) are also represented by a singleton window sequence. Each window sequence is scored using the number of hits for each contained window. The score is calculated as follows. Given a window sequence Ω that consists of |Ω| windows. Let c1 , . . . , c|Ω| be the number of hits for each contained window. If |Ω| = 1, then the score is simply c1 . For longer window sequences the score C(Ω) is defined by C(Ω) := max i∈{1,2,...,|Ω|−1} (ci + ci+1 ) (3) The idea is that a read cannot intersect with more than two windows if n + w < 2o holds, which is fulfilled in the standard configuration. Therefore, P|Ω| adding all ci of a long window sequence (i.e. i=1 ci ) would result in too large scores if there is a repetitive region in the reference region. The best scoring windows sequences are selected (by default at most κ = 64). Then each window sequence is converted to an interval on the reference genome. Window sequences containing one window are enlarged depending on how often the window index was found (a window with only a few hits it is further enlarged than a window with many hits). Window sequences containing two windows are contracted, because it is likely that the read is contained in both windows. The more hits for the windows in the window sequence are found, the smaller is the resulting interval. 8 Let α > 0 and β1 ≤ 0 be arbitrary constants, let c1 be the number of hits for a singleton window sequence and s the signature length. Then the window sequence is enlarged by  c1  w · α 1 − β1 (4) s nucleotides on both sides, where w is the window length. If β1 = 1 and if we have a hit for each permutation, then c1 = s holds and thus there is no enlargement. Let β2 be another arbitrary constant and c1 and c2 the number of hits for a window sequence of length 2. Let a and b be the start and end position of the window sequence (i.e. a is the first position of the left window and b is the last position of the right window). The resulting start position a0 and end position b0 of the interval are defined by: w − o + n − 2q c2 · β2 · (5) s 2 c1 w − o + n − 2q b0 := b + n − q − · β2 · (6) s 2 If the number of hits are maximal and if β2 = 1, then the resulting interval has the length n. The larger c1 is, the more nucleotides of the read are probably located in the first window, so the right border of the interval can be contracted more than the left one. If a window sequence consists of three or more windows, then the start and end position of the window sequence are used as interval. By default the parameters have the values α = 0.43 and β1 = β2 = 0.3. a0 := a − n + q + 3.2 Variant tolerant alignment Each interval is processed by a variant tolerant aligner. The aligner is based on Ukkonen’s algorithm [17] and uses dynamic programming to calculate the optimal alignment according to the edit distance considering SNPs and indel variants. Let r = r1 , . . . , rm be the read and t = t1 , . . . , tn be an interval on the reference genome. To handle SNPs the characters of reference genome are not elements of the set Σ = {A, C, G, T }, but of its power set P(Σ). For example, ti = {A, C} means that there is a SNP variant at position i and both nucleotides A and C co-exist at this position. Let F be a matrix of size m × n. The element F [i, j] denotes the edit distance between r1 r2 · · · ri and tj 0 tj 0 +1 · · · tj with some j 0 ≤ j, so we have F [i, 0] = i 0≤i≤m F [0, j] = 0 1≤j≤n The other matrix elements are calculated using the following recursive formula if there are no indel variants.   F [i − 1, j − 1] + [[pi 6∈ tj ]] +1 F [i, j] = min F [i − 1, j] (7)  F [i, j − 1] +1 9 Deletions can be considered by jumping back in the matrix. If there is a deletion variant of length k that ends at position j, such that the bases tj−k , . . . , tj−1 are skipped, than the recursive formula for the column j is  F [i − 1, j − 1] + [[pi 6∈ tj ]]     +1  F [i − 1, j] +1 F [i, j] = min F [i, j − 1] (8)   F [i − 1, j − k − 1] + [[p ∈ 6 t ]]  i j   F [i, j − k − 1] +1 If there are more deletions that ends at positions j, they can be added to the recursion formula by appending two more terms to the minimum expression. So the recursion to be used at each reference position j is determined by the number and length(s) of the deletion variants ending at position j. Handling insertions is slightly more complex. If there is an insertion s1 s2 · · · sk before position j (such that a string containing this insertion is for example tj−1 s1 · · · sk tj ), then we need k optional extra columns in the matrix F . To calculate the column for s1 we have to access the column for tj−1 . The columns s2 , · · · , sk can be determined straight-forwardly using the above recursion (7). To calculate the column tj we not only have to access the column tj−1 , but also sk (analogous to equation (8)). So for each insertion that ends before position j two terms are added to the minimum expression. In contrast to the index of VATRAM, the aligner uses all available variants. Filling the whole matrix consumes too much time. Therefore the user can set an error threshold k, so that only the parts of the matrix whose values are less or equal to this threshold are calculated. The details of this technique are more complicated, since there can be insertion or deletion variants and you have to ensure that all matrix elements that are accessed are already calculated. The basic idea is to store for each matrix element an additional information called next row which indicates the row index of the next element in the given column that is not larger than k. The next row information of column j is written during the calculation of the column j − 1 in F . Before an uninitialized element in F will be accessed, it is set to k + 1 beforehand. It can be shown that it does not matter that the correct value of that element is maybe larger than k + 1. In [9] the details of this acceleration method are extensively described and the correctness of this pruning rule is proven. The alignment is done for each given interval. If the user is only interested in the best mapping, then the alignment cost of the first alignment can be used as error threshold for the second alignment to speed up the alignment process. 3.3 Paired-end reads and long reads VATRAM is also able to map paired-end reads. For that purpose both read sequences u and v of the paired-end read are first processed separately. After creating the list of window sequences Lu and Lv for both read sequences, we look for window sequence pairs (lu , lv ) ∈ Lu × Lv , such that the distance between lu 10 and lv fits to the insert size distribution of the paired-end reads. To rank the window sequence pairs, the scoring values are combined to a single value. Finally, the alignment is done separately for both read sequences. So far, we assume that all reads have a constant (or nearly constant) length n. However, some sequencing machines produce reads which length varies considerably. For example PacBio reads [6] have a length from a few hundred nucleotides up to 60 000. The window based approach of VATRAM needs reads of more or less constant length. Thus, variably long reads are split into fragments whose length ñ fits to the window length w. Then analogous to paired-end reads for each fragment the corresponding window sequence lists L1 , . . . , Lk are calculated. Afterwards, we look for tuples (l1 , . . . , lk ) ∈ L1 × · · · × Lk of windows sequences whose distances fits to the distance of the read fragments. The scores of the window sequences are combined to a single value which is used for ranking the window sequence tuples. If some fragments at the end or maybe in the mid of the read are not found, then there are some gaps in the tuple, so we allow that each li is equal to an empty window sequence (or more formally (l1 , . . . , lk ) ∈ L01 × · · · × L0k where L0i := Li ∪ {∅} for all 1 ≤ i ≤ k). In this case the tuple gets a lower score, but the read can still be mapped if the tuple represents the correct position. After ranking, each tuple is converted into an interval which is processed by the aligner. The splitting procedure is applied if the fraction n/w is larger than a given constant f (by default f = 0.8 is used). 4 Experiments We compare our read mapper VATRAM to other read mappers. These are BWASW [13], as Bowtie2 [10], BWA-MEM [11] in standard configuration and BWAMEM configured such that it uses the edit distance as metric for the alignment (denoted as “BWA-MEM in edit-distance configuraiton”). Moreover we have tested mrsFastUltra [8], which is a variant tolerant read mapper like VATRAM. Our read mapper was executed with and without using the known variants to quantify the benefit of using variants. VATRAMs parameter configuration is shown in table 1. The formula for the signature length is an empirical result that leads to an approximately constant memory usage of about 14 GB independent of the window distance respectively read length. For n = 100 the signature length is s = 36. 4.1 Simulated reads In our first experiment we used simulated single-end reads of constant length to compare VATRAM with other read mappers. Using simulated reads has the advantage over real reads that the correct position is known. The reads were created from the human reference genome (GRCh37). Each known variant is inserted into the reads with its population frequency. Furthermore sequencing errors respectively unknown variants are inserted in the reads 11 Table 1. Parameters used for the experiments. The splitting procedure was only used for data sets whose reads have variable length. In this case the parameters are w = 140, o = 125 and s = 36. The lower part of the table shows parameters that are only needed for read mapping and not for index creation (in contrast to the parameters in the upper part). Symbol w o q Meaning window length window distance q-gram length s signature length δ l κ α β1 β2 ñ f variant consideration threshold variant combination limit maximal number of selected window sequences interval calculation interval calculation interval calculation fragment length for reads with variable length a read is split if n/w > f h Value 1.4n 1.25n 17i 8.63n 22.6+0.0138n 20% 3 64 0.43 0.3 0.3 100 0.8 with a probability of 2%, 4% or 8% per position. Of the errors, 90% are substitutions of single nucleotides, the remaining 10% are insertions or deletions of variable length. The ratio of the correct and wrong mapped reads as well as the runtime and the memory consumption are shown in figure 3 for different read lengths. Note that the sum of the correct and wrong mapped reads is not equal to 100%, because there can be reads that remain unmapped by the particular read mapped, so the sum is equal to the fraction of the reads that were mapped. As we can see the memory consumption of VATRAM (about 14 GB) is significantly higher than those of the other read mappers. As most modern workstations have 16 GB of memory or even more, we do not expect this to be a major disadvantage. The runtime of VATRAM is (in most cases) higher than the runtime of BWA or Bowtie2. The reason for this is that VATRAM takes variants into account and thus solves a problem that is more complex than the alignment that is done by BWA or Bowtie2. In fact, most of the runtime of VATRAM is needed to calculate the variant tolerant alignment. The mapping process (i.e. calculating the signature values of a read, looking them up to get the window indices and converting them to intervals) is much faster (approximately five times) than the alignment calculation[16]. The read mapper mrsFastUltra needs more time than VATRAM if the error rate is less or equal to 4%. With an error rate of 8%, mrsFastUltra is faster than VATRAM, but then over 50% of the reads are left unmapped. VATRAM maps more reads to the correct position than mrsFastUltra which is also variant tolerant. However, BWA-MEM produces even better results (especially for the short reads) although it has no information about the known variants. The number of wrongly mapped reads of VATRAM is small, similar 12 mapped correctly f = 2% f = 4% f = 8% 100 % 100 % 100 % 80 % 80 % 80 % 60 % 60 % 60 % 40 % 40 % 40 % 20 % 20 % 20 % 0% 0% 100 200 300 400 500 98 % 96 % 94 % mapped wrongly mapped correctly (details) 100 % 100 200 300 400 500 100 200 300 400 500 100 % 100 % 98 % 95 % 96 % 90 % 94 % 85 % 92 % 80 % 90 % 100 200 300 400 500 4% 6% 3% 4% 2% 2% 1% memory consumption (in GB) runtime per nucleotide (in µs) 0% 5 4 3 2 1 0 100 200 300 400 500 100 200 300 400 500 0% 0% 5 4 3 2 1 0 100 200 300 400 500 100 200 300 400 500 75 % 12 % 10 % 8% 6% 4% 2% 0% 5 4 3 2 1 0 15 15 15 10 10 10 5 5 5 0 100 200 300 400 500 read length BWA-MEM VATRAM 0 100 200 300 400 500 read length BWA-MEM (edit-distance) VATRAM (without variants) 0 100 200 300 400 500 100 200 300 400 500 100 200 300 400 500 100 200 300 400 500 100 200 300 400 500 read length BWA-SW mrsFast-Ultra Bowtie2 Fig. 3. Comparison between different readmappers using simulated reads. The error rate was 2%, 4% and 8% per position (the error rate in the diagrams of one column is constant and shown above the diagrams of the first row). The x-axis shows the read length. The ratio of correctly mapped reads is shown twice (first and second row) to improve the visibility. 13 to BWA-MEM and Bowtie2. The lowest fraction of wrongly mapped reads is achieved by mrsFastUltra. However, this is not surprising, since mrsFastUltra can only map a small number of reads, so many reads that are difficult to map correctly are left unmapped. Although the simulated reads contain variants, there is no great benefit to consider them with VATRAM. Only for a read length of n = 100 and an error of 2%, the improvement is visible in figure 3. However, the fraction of correctly mapped reads only increases by 0.18%-points to 94.86%. This is considerably fewer than the results of BWA-MEM in edit-distance configuration with 97.4%. The reason for this small improvement is that most known variants appears with a frequency of less than 20%. These variants are not considered by VATRAMs index, because the variant consideration threshold was δ = 0.2. A lower threshold would lead to even worse results [16], since reads that do not contain the variant (these are more than 80%) are found with a lower probability if the variant is added to the index. In this experiment, VATRAM did not produce better results than BWAMEM, although it uses extra knowledge about the known variants. However, VATRAM outperformed the variant-toleratn read mapper mrsFastUltra. The benefit of considering the variants was very low. 4.2 Real reads In this section we use real data sets to compare the read mappers. When using real reads, the correct position is not known. One solution is to compare only the number of mapped reads. However, this is not a reasonable measure, because one may map a read to an arbitrary position which would lead to the best possible performance under this evaluation metric. Another method is to compare the edit distance of the different alignments. However, calculating the edit distance between a read and the corresponding interval on the reference genome does not consider any variants and therefore the unknown correct position of the read would not necessarily have the smallest distance. Therefore we decided to use VATRAM’s aligner to realign the reads to the interval on the reference genome given by the different read mappers. A mapping is defined as correct if there is no other mapping that leads to a lower edit distance considering all known variants. If two or more different mappings have the same optimal alignment cost, then all are treated as correct. Note that this does not provide VATRAM with an advantage because the aligner of VATRAM is just a tool to calculate the optimal alignment considering all known variants. Table 2 shows an overview of the different data sets. There are two pairedend data sets with a constant read length as well as three single-end data sets with a variable read length created with three different sequencing machines. Real paired-end reads In Figure 4 the results of the two paired-end data sets are shown. There are no values for mrsFastUltra, because the program crashes for unknown reason. mapped correctly 14 100 % 100 % 98 % 96 % 94 % 92 % 90 % 88 % 86 % 80 % 60 % 40 % 20 % 0% mapped wrongly ERR259389 ERR967952 2.5 % 1.2 % 1% 0.8 % 0.6 % 0.4 % 0.2 % 0% 2% 1.5 % 1% 0.5 % 0% runtime per nucleotide (in µs) ERR259389 0.5 ERR967952 15 0.4 10 0.3 0.2 5 0.1 0 0 ERR259389 BWA-MEM VATRAM BWA-MEM (edit-distance) VATRAM (without variants) ERR967952 BWA-SW Bowtie2 Fig. 4. Real datasets with paired-end reads (see Table 2). mrsFastUltra crashes on both datasets. 15 Table 2. Data sets used in the experiments. The data set name refers to NCBI sequence read archive (SRA). Column n shows the average read length, column Type indicates whether the data set contains paired-end (PE) ord single-end (SE) reads and the column Const? shows if all reads in the data set have the same length (yes) or not (no). The last column shows the error threshold that was used for the read mapper VATRAM. Note that the later alignment that is executed for each read mapper is done with a much higher error threshold to ensure that always the best alignment is calculated. Name ERR259389 ERR967952 DRR003760 SRR003174 SRX533609 Sequencing machine Illumina MiSeq Illumina MiSeq Illumina MiSeq 454 GS FLX Titanium PacBio RS II n 151 250 180 565 8651 Type PE PE SE SE SE Const? Err.thr. yes 15 yes 25 no 20 no 60 no 450 For the first dataset (ERR259389 ) VATRAM achieves with 0.017% an extremely low rate of wrongly mapped reads. The number of reads that Bowtie2 mapped wrongly are more than 4 times larger and the other read mappers produce even worse results according to this measure. On the other hand, only 90.7% of the reads are mapped correctly by VATRAM. The other read mappers achieve 95.8% or more; so many reads remain unmapped when using VATRAM. In the dataset ERR967952 the ratios of correctly mapped reads are almost equal for VATRAM, Bowtie2, BWA-SW and BWA-MEM in standard configuration. However, BWA-MEM in edit-distance configuration is able to map about 17%-points more reads correctly than the other read mappers. On the other hand the number of wrongly mapped reads of BWA-MEM (in both configuraitons), Bowtie2 and BWA-SW is always twice as large as the number of reads that VATRAM mapped wrongly. Which read mapper is better depends on the application: If you want to have many correctly mapped reads, it makes sense to use BWA-MEM in edit-distance configuration, if you want to minimize the number of wrongly mapped reads, it is better to use VATRAM. The runtime of VATRAM in this dataset is comparable with the runtime of Bowtie2 and BWAMEM. This is interesting, because the alignment process of VATRAM is usually much more time consuming due to the consideration of variants. For both data sets there is only a slight benefit when the variants are added to the index. According to the number of correctly mapped reads, there is no change visible in Figure 4. The ratio of wrongly mapped reads decreases for the data set ERR967952 by about 17%. The runtime was reduced by approximately 6% in the dataset ERR259389. For the other data sets there was no significant change. Real reads with variable length So far we only analyzed data sets where all reads have the same length. However, sequencing machines like “454 GS” FLX or PacBio produce reads with varying length. In Figure 5 the results for three such data sets are shown. mapped correctly 16 100 % 100 % 98 % 96 % 94 % 92 % 90 % 88 % 86 % 80 % 60 % 40 % 20 % 0% mapped wrongly DRR003760 SRR003174 6% 30 % 4% 20 % 2% 10 % 0% 0% DRR003760 SRR003174 12 runtime per nucleotide (in µs) SRX533609 SRX533609 40 10 30 8 6 20 4 10 2 0 0 DRR003760 BWA-MEM VATRAM SRR003174 BWA-MEM (edit-distance) VATRAM (without variants) SRX533609 BWA-SW Bowtie2 Fig. 5. Real reads with variable length. Information about the data sets can be found in Table 2. There are no results for mrsFast-Ultra, because it is not able to map reads with variable length. 17 The data set DRR003760 is interesting, because considering the variants leads to clearly better results for VATRAM. The ratio of correctly mapped reads increases from 86.7% to 90.1%. Such a high improvement of 3.4%-points was not measured in other datasets, neither for the synthetic nor for the real data sets. The reason for this is that the reads of the DRR003760 are located in the human HLA region which contains much variants in a very small area. Therefore, there is a great benefit, if the known variants are added to VATRAMs index. However, the ratio of correctly mapped reads is still lower than the corresponding ratio of BWA-MEM (92.3% in standard respectively 94.2% in edit-distance configuration). The data set SRR003174 shows that VATRAM is able to produce better results than BWA-MEM: Not only is VATRAMs ratio of wrongly mapped reads smaller than the ratio of BWA-MEM (in both configurations), but VATRAM also maps more reads to the correct position, even for the edit distance configuration of BWA-MEM which always leads to the highest number of correctly mapped read in the other experiments. The data sets DRR003760 and SRR003174 contain reads with an moderate read length of 180 respectively 565 nucleotides on average. The last column in figure 5 shows the results for a read data set generated by a PacBio sequencing machine whose reads are much longer (SRX533609 ). VATRAMs aligner was not constructed to align such long reads with 10 000 nucleotides or even more. Therefore its running time is more than 20 times longer than the running of BWA-MEM in standard configuration. Only Bowtie2 needs even more time than VATRAM, since it was not designed for such long reads either. According to the number of correctly and wrongly mapped reads VATRAM performs clearly better than BWA-MEM in standard configuration. However, if the edit distance configuration of BWA-MEM is used (which makes more sense, since the edit distance is used as measure to determine whether a read is mapped correctly), then the ratio of correctly mapped reads is 12%-points better than VATRAMs ratio. However, also the ratio of wrongly mapped reads is 6.6%-points greater than the corresponding ratio of VATRAM. Which read mapper is better in this case depends on the application. VATRAM achieves the best precision, however the recall of BWA-MEM in edit-distance configuration is better than VATRAMs recall. 5 Discussion and conclusion In the last decades many read mappers were developed, so there is the question why one should develop another read mapper. Most of the commonly used read mappers do not use knowledge about known variants. However, there are many differences between the reference genome and the genome of one individual. By now about 150 millions of variants are known7 whose usage may improve the mapping process significantly. Common read mappers (like BWA or Bowtie2) 7 https://www.ncbi.nlm.nih.gov/dbvar/content/org_summary, access date: 20th January 2017. 18 treat these variants similarly to sequencing errors and thus may have problems to map reads containing known variants to the correct position. Therefore we developed a new read mapper called VATRAM based on min-hasing that is able to consider known variants. In section 4 we compared VATRAM with other read mappers. In most cases BWA-MEM in edit-distance configuration performs best according to the ratio of correctly mapped reads. For the data set SRR003174, VATRAM was the best read mapper. An additional strength of VATRAM is the very low ratio of wrongly mapped reads. It was usually much better than the ratio of Bowtie2 or BWA. We tested not only common, non-variant tolerant read mappers like BWA or Bowtie2, but also the variant tolerant read mapper mrsFastUltra. However, its results were not convincing according to the very low rate of correctly mapped reads. Furthermore, it failed to handle all five tested real data sets. VATRAM needs more time than BWA or Bowtie2 to process a data set. This is not surprising, since calculating a variant tolerant alignment is more complex and therefore more time consuming than a usual alignment that is for example performed by Bowtie2 and BWA. We executed VATRAM with and without the information about the known variants. The benefit of considering the variants is usually small, because only a small ratio of the reads contain variants. However, for the data set DRR003760 which contains reads from a region with many variants in a small area the mapping quality of VATRAM improved significantly after adding the known variants to the index. All in all, VATRAM is a competitive read mapper in comparison to BWA and Bowtie2. Currently VATRAM is implemented as a prototype, and certainly further optimizations in terms of speed and memory usage are possible. An open question is in how many individuals a variant must appear such that adding this variant to the index leads to better results. This question could also be analyzed theoretically (using lemma 1), independent from the details of VATRAMs implementation. References 1. Berlin, K., Koren, S., Chin, C.S., Drake, J.P., Landolin, J.M., Phillippy, A.M.: Assembling large genomes with single-molecule sequencing and locality-sensitive hashing. Nature biotechnology 33(6), 623–630 (2015) 2. Broder, A.Z.: On the resemblance and containment of documents. In: Compression and Complexity of Sequences (SEQUENCES’97). pp. 21–29. IEEE (1997) 3. Broder, A.Z., Charikar, M., Frieze, A.M., Mitzenmacher, M.: Min-wise independent permutations. In: Proceedings of the 30th annual ACM symposium on Theory of computing (STOC). pp. 327–336. ACM (1998) 4. Buhler, J.: Efficient large-scale sequence comparison by locality-sensitive hashing. Bioinformatics 17(5), 419–428 (2001) 5. Casperson, M.: Minhash for dummies. http://matthewcasperson.blogspot.de/ 2013/11/minhash-for-dummies.html (November 2013) 19 6. Eid, J., Fehr, A., Gray, J., Luong, K., Lyle, J., Otto, G., Peluso, P., Rank, D., Baybayan, P., Bettman, B., Bibillo, A., Bjornson, K., Chaudhuri, B., Christians, F., Cicero, R., Clark, S., Dalal, R., deWinter, A., Dixon, J., Foquet, M., Gaertner, A., Hardenbol, P., Heiner, C., Hester, K., Holden, D., Kearns, G., Kong, X., Kuse, R., Lacroix, Y., Lin, S., Lundquist, P., Ma, C., Marks, P., Maxham, M., Murphy, D., Park, I., Pham, T., Phillips, M., Roy, J., Sebra, R., Shen, G., Sorenson, J., Tomaney, A., Travers, K., Trulson, M., Vieceli, J., Wegener, J., Wu, D., Yang, A., Zaccarin, D., Zhao, P., Zhong, F., Korlach, J., Turner, S.: Real-time DNA sequencing from single polymerase molecules. Science 323(5910), 133–138 (2009) 7. Ferragina, P., Manzini, G.: Indexing compressed text. Journal of the ACM 52(4), 552–581 (2005) 8. Hach, F., Sarrafi, I., Hormozdiari, F., Alkan, C., Eichler, E.E., Sahinalp, S.C.: mrsFAST-Ultra: a compact, SNP-aware mapper for high performance sequencing applications. Nucleic Acids Research 42(Webserver-Issue), 494–500 (2014) 9. Kramer, B., Quedenfeld, J., Schrinner, S., Bargull, M., Benadjemia, K., Stricker, J., Losch, D.: VATRAM – VAriant Tolerant ReAd Mapper. Tech. rep., Project Group PG583, Computer Science, TU Dortmund, Germany (2015) 10. Langmead, B., Salzberg, S.L.: Fast gapped-read alignment with Bowtie 2. Nature methods 9(4), 357–359 (2012) 11. Li, H.: Aligning sequence reads, clone sequences and assembly contigs with BWAMEM. arXiv preprint arXiv:1303.3997 (2013) 12. Li, H., Durbin, R.: Fast and accurate short read alignment with Burrows–Wheeler transform. Bioinformatics 25(14), 1754–1760 (2009) 13. Li, H., Durbin, R.: Fast and accurate long-read alignment with Burrows-Wheeler transform. Bioinformatics 26(5), 589–595 (2010) 14. Metzker, M.L.: Sequencing technologies—the next generation. Nature Reviews Genetics 11(1), 31–46 (2010) 15. Navarro, G.: Compact Data Structures: A Practical Approach. Cambridge University Press, Cambridge (009 2016) 16. Quedenfeld, J.: Variantentolerantes Readmapping durch Locality Sensitive Hashing. Master’s thesis, Computer Science XI, TU Dortmund, Germany (2016) 17. Ukkonen, E.: Finding approximate patterns in strings. Journal of Algorithms 6(1), 132 – 137 (1985)
8cs.DS
A Framework for Time-Consistent, Risk-Averse Model Predictive Control: Theory and Algorithms arXiv:1703.01029v1 [math.OC] 3 Mar 2017 Yin-Lam Chow1 , Sumeet Singh2 , Anirudha Majumdar2 , Marco Pavone2 Abstract In this paper we present a framework for risk-averse model predictive control (MPC) of linear systems affected by multiplicative uncertainty. Our key innovation is to consider time-consistent, dynamic risk metrics as objective functions to be minimized. This framework is axiomatically justified in terms of time-consistency of risk assessments, is amenable to dynamic optimization, and is unifying in the sense that it captures a full range of risk preferences from risk-neutral to worst case. Within this framework, we propose and analyze an online risk-averse MPC algorithm that is provably stabilizing. Furthermore, by exploiting the dual representation of time-consistent, dynamic risk metrics, we cast the computation of the MPC control law as a convex optimization problem amenable to real-time implementation. Simulation results are presented and discussed. I. I NTRODUCTION Safety-critical control and decision-making applications demand the consideration of events with small probabilities that can nevertheless have catastrophic effects if realized (e.g., an unmanned aerial vehicle crashing due to an unexpectedly large wind gust or an adaptive cruise control system causing an accident due to a highly unlikely action taken by a neighboring vehicle). Accordingly, one of the main research thrusts for Model Predictive Control (MPC) [1], [2] is to find techniques that are robust in the face of such risks. Current techniques for handling uncertainty within the MPC framework fall into two categories: (1) min-max (or worst-case) formulations, where the performance indices to be minimized are computed with respect to the worst possible disturbance realization [3], [4], [5], [6], and (2) 1 Institute for Computational and Mathematical Engineering, Stanford University, Stanford, CA 94305, USA. Email: [email protected]. 2 Department of Aeronautics and Astronautics, Stanford University, CA 94305, USA. Emails: {ssingh19, anirudha, pavone} @stanford.edu. 1 stochastic formulations, where risk-neutral expected values of performance indices (and possibly constraints) are considered [7], [8], [9], [10], [11] (see also the recent review [12]). The main drawback of the worst-case approach is that the control law may be too conservative, since the MPC law is required to guarantee stability and constraint fulfillment under the worst-case scenario (which may have an arbitrarily small probability of occurring). On the other hand, stochastic formulations, whereby the assessment of future random outcomes is accomplished through a risk-neutral expectation, may be unsuitable in scenarios where one desires to protect the system from the risks associated with large deviations. In general, there are three main challenges with incorporating risk-sensitivity into control and decision-making problems: Rationality and consistency: The behavior of a control system using a certain risk metric (i.e., a function that maps an uncertain cost to a real number) should be consistent over time. Intuitively, time-consistency stipulates that if a given sequence of costs incurred by the system, when compared to another sequence, has the same current cost and lower risk in the future, then it should be considered less risky at the current time (see Section II-B for a formal statement). Examples of “irrational” behavior that can result from a time-inconsistent risk metric include: (1) a control system intentionally seeking to incur losses [13], or (2) deeming states to be dangerous when in fact they are favorable under any realization of the underlying uncertainty [14], or (3) declaring a decision-making problem to be feasible (e.g., satisfying a certain risk threshold) when in fact it is infeasible under any possible subsequent realization of the uncertainties [15]. Remarkably, some of the most common strategies for incorporating risk aversion in decisionmaking (discussed below) display such inconsistencies [16], [14]. Computational tractability: A risk metric generally adds a nonlinear structure to the optimization problem one must solve in order to compute optimal actions. Hence it is important to ensure the computational tractability of the optimization problem resulting from the choice of risk metric, particularly in dynamic decision-making settings where the control system must plan and react to disturbances in real-time. Modeling flexibility: One would like to calibrate the risk metric to the control application at hand by: (1) exploring the full spectrum of risk assessments from worst-case to risk-neutral, and (2) ensuring that the risk metric can be applied to a rich set of uncertainty models (e.g., beyond Gaussian models). Most popular methods in the literature for assessing risks do not satisfy these three require2 ments. The Markowitz mean-variance criterion [17], which has dominated risk management for over 50 years, leads to time-inconsistent assessments of risk in the multi-stage stochastic control framework and also yields computationally intractable problems [13]. Moreover, it is rather limited in terms of modeling flexibility since there is only a single tuning parameter that trades off mean and variance. For example, worst-case risk assessments cannot be captured in such a framework. Finally, the mean-variance metric relies on only the first two moments of the distribution and is thus not well-suited to applications where the disturbance model is non-Gaussian. A popular alternative to the mean-variance criterion is the entropic risk metric: ρ(X) =  log E[eθX ] /θ, θ ∈ (0, 1). The entropic risk metric has been widely studied in the financial mathematics [18], [19] and sequential decision making [20], [21], [22] literatures, and for modeling risk aversion in LQG control problems [23], [24]. While the entropic risk is a more computationally tractable alternative to the mean-variance criterion and can also lead to timeconsistent behavior [25], practical applications of the entropic risk metric have proven to be problematic. Notice that the first two terms of the Taylor series expansion of ρ(X) form a weighted sum of mean and variance with regularizer θ, i.e., ρ(X) ≈ E(X) + θE(X − E[X])2 . Consequently, the primary concerns are similar to those associated with the mean-variance measure of risk, e.g., the optimal control policies heavily weight a small number of risk-averse decisions, and are extremely sensitive to errors in the distribution models [26], [27], [28]. The entropic risk metric is a particular example of the general class of methods that model risk aversion using concave utility functions (convex disutility functions in the cost minimization setting). While the expected (dis)utility framework captures the intuitive notion of diminishing marginal utility, it suffers from the issue that even very little risk aversion over moderate costs leads to unrealistically high degrees of risk aversion over large costs [29], [30] (note that this is a limitation of any concave utility function). This is an undesirable property from a modeling perspective and thus makes the expected utility framework challenging to apply in practice. In order to overcome such challenges, in this paper we incorporate risk aversion in MPC by leveraging recent strides in the theory of dynamic risk metrics developed by the operations research community [31], [16]. This allows us to propose a framework that satisfies the requirements outlined above with respect to rationality and consistency, computational tractability, and modeling flexibility. Specifically, the key property of dynamic risk metrics is that, by reassessing risk at multiple points in time, one can guarantee time-consistency of risk preferences and the 3 agent’s behavior [31], [16]. Remarkably, in [16], it is proven that time-consistent risk measures can be represented as a composition of one-step risk metrics, which allows for computationally tractable risk evaluation in real-time. Moreover, the one-step risk metrics are coherent risk metrics [32], which have been thoroughly investigated and widely applied for static decision-making problems in operations research and finance. Coherent risks were originally conceived in [32] from an axiomatization of properties that any rational agent’s risk preferences should satisfy (see Section II for a formal statement of these axioms). In addition to being axiomatically justified, coherent risk metrics capture a wide spectrum of risk assessments from risk neutral to worst-case and thus provide a unifying approach to static risk assessments. Since time-consistent dynamic risks are composed of one-step coherent risks, they inherit the same modeling flexibility. The contribution of this paper is threefold. First, we introduce a class of dynamic risk metrics, referred to as Markov dynamic polytopic risk metrics, that capture a full range of risk assessments and enjoy a geometrical structure that is particularly favorable from a computational standpoint. Second, we present and analyze a risk-averse MPC algorithm that minimizes in a receding-horizon fashion a Markov dynamic polytopic risk metric, under the assumption that the system’s model is linear and is affected by multiplicative uncertainty. Finally, by exploring the geometric structure of Markov dynamic polytopic risk metrics, we present a convex programming formulation for risk-averse MPC that is amenable to a real-time implementation (for moderate horizon lengths). Our framework has three main advantages: (1) it is axiomatically justified, in the sense that risk, by construction, is assessed in a time-consistent fashion; (2) it is amenable to dynamic and convex optimization, primarily due to the compositional form of Markov dynamic polytopic risk metrics and their geometry; and (3) it is general, in that it captures a full range of risk assessments from risk-neutral to worst-case. In this respect, our formulation represents a unifying approach for risk-averse MPC. A preliminary version of this paper was presented in [33]. In this extended and revised version, we present the following key extensions: (1) the introduction of constraints on state and control variables for the original infinite-horizon problem, (2) a new offline/online MPC formulation for handling these constraints, (3) a derivation of a computationally verifiable lower bound on the optimal infinite-horizon cost objective and an upper bound on the infinite-horizon cost objective induced by the MPC control policy, (4) additional numerical experimental results including a detailed comparison between our solution algorithm and the one proposed in [8]. The rest of the paper is organized as follows. In Section II we provide a review of the theory 4 of dynamic risk metrics. In Section III we discuss the stochastic model we address in this paper. In Section IV we introduce and discuss the notion of Markov dynamic polytopic risk metrics. In Section V we state the infinite horizon optimal control problem we wish to address and in Section VI we derive conditions for risk-averse closed-loop stability. In Section VII we present the MPC adaptation of the infinite horizon problem and present various approaches for computation in Section IX. In Section VIII, we derive bounds on the infinite-horizon cost function performance of the optimal and MPC algorithms and thereby rigorously quantify the sub-optimality of our approach. Numerical experiments are presented and discussed in Section X. Finally, in Section XI we draw some conclusions and discuss directions for future work. II. R EVIEW OF DYNAMIC R ISK T HEORY In this section, we briefly describe the theory of coherent and dynamic risk metrics, on which we will rely extensively in this paper. The material presented in this section summarizes several novel results in risk theory achieved in the past ten years. Our presentation strives to present this material in an intuitive fashion and with a notation tailored to control applications. A. Static, Coherent Measures of Risk Consider a probability space (Ω, F, P), where Ω is the set of outcomes (sample space), F is a σ-algebra over Ω representing the set of events we are interested in, and P is a probability measure over F. In this paper we will focus on disturbance models characterized by probability mass functions, hence we restrict our attention to finite probability spaces (i.e., Ω has a finite number of elements or, equivalently, F is a finitely generated algebra). Denote with Z the space of random variables Z : Ω 7→ (−∞, ∞) defined over the probability space (Ω, F, P). In this paper a random variable Z ∈ Z is interpreted as a cost, i.e., the smaller the realization of Z, the better. For Z, W , we denote by Z ≤ W the point-wise partial order, i.e., Z(ω) ≤ W (ω) for all ω ∈ Ω. By a risk measure (or risk metric; we will use these terms interchangeably) we understand a function ρ(Z) that maps an uncertain outcome Z into the extended real line R ∪ {+∞} ∪ {−∞}. In this paper we restrict our analysis to coherent risk measures, defined as follows: Definition II.1 (Coherent Risk Measures). A coherent risk measure is a mapping ρ : Z → R, satisfying the following four axioms: 5 A1 Convexity: ρ(λZ +(1−λ)W ) ≤ λρ(Z)+(1−λ)ρ(W ), for all λ ∈ [0, 1] and Z, W ∈ Z; A2 Monotonicity: if Z ≤ W and Z, W ∈ Z, then ρ(Z) ≤ ρ(W ); A3 Translation invariance: if a ∈ R and Z ∈ Z, then ρ(Z + a) = ρ(Z) + a; A4 Positive homogeneity: if λ ≥ 0 and Z ∈ Z, then ρ(λZ) = λρ(Z). These axioms were originally conceived in [32] and ensure the “rationality” of single-period risk assessments (we refer the reader to [32] for a detailed motivation of these axioms). One of the main properties for coherent risk metrics is a universal representation theorem for coherent risk metrics, which in the context of finite probability spaces takes the following form: Theorem II.2 (Representation Theorem for Finite Probability Spaces [34, page 265]). Consider the probability space {Ω, F, P} where Ω is finite and has cardinality L ∈ N, i.e., Ω = {ω1 , . . . , ωL }, F is the σ-algebra of all subsets (i.e., F = 2Ω ), and P = (p(1), . . . , p(L)), with n all probabilities positive. Let B be the set of probability density functions: B := ζ ∈ RL : o PL p(j)ζ(j) = 1, ζ ≥ 0 . The risk measure ρ : Z → R is a coherent risk measure if and j=1 only if there exists a convex bounded and closed set U ⊂ B such that ρ(Z) = maxζ∈U Eζ [Z]. The result states that any coherent risk measure is an expectation with respect to a worst-case density function ζ, chosen adversarially from a suitable set of test density functions (referred to as the risk envelope). B. Dynamic, Time-Consistent Measures of Risk This section provides a multi-period generalization of the concepts presented in Section II-A and follows closely the discussion in [16]. Consider a probability space (Ω, F, P), a filtration F0 ⊂ F1 ⊂ F2 · · · ⊂ FN ⊂ F, and an adapted sequence of real-valued random variables Zk , k ∈ {0, . . . , N }. We assume that F0 = {Ω, ∅}, i.e., Z0 is deterministic. The variables Zk can be interpreted as stage-wise costs. For each k ∈ {0, . . . , N }, denote with Zk the space of random variables defined over the probability space (Ω, Fk , P); also, let Zk,N := Zk × · · · × ZN . Given sequences Z = {Zk , . . . , ZN } ∈ Zk,N and W = {Wk , . . . , WN } ∈ Zk,N , we interpret Z ≤ W component-wise, i.e., Zj ≤ Wj for all j ∈ {k, . . . , N }. The fundamental question in the theory of dynamic risk measures is the following: how do we evaluate the risk of the sequence {Zk , . . . , ZN } from the perspective of stage k? The answer, within the modern theory of risk, relies on two key intuitive facts [16]. First, in dynamic settings, 6 the specification of risk preferences should no longer entail constructing a single risk metric but rather a sequence of risk metrics {ρk,N }N k=0 , each mapping a future stream of random costs into a risk metric/assessment at time k. This motivates the following definition. Definition II.3 (Dynamic Risk Measure). A dynamic risk measure is a sequence of mappings ρk,N : Zk,N → Zk , k ∈ {0, . . . , N }, obeying the following monotonicity property: ρk,N (Z) ≤ ρk,N (W ) for all Z, W ∈ Zk,N such that Z ≤ W . The above monotonicity property (analogous to axiom A2 in Definition II.1) is, arguably, a natural requirement for any meaningful dynamic risk measure. Second, the sequence of metrics {ρk,N }N k=0 should be constructed so that the risk preference profile is consistent over time [35], [36], [37]. A widely accepted notion of time-consistency is as follows [16]: if a certain outcome is considered less risky in all states of the world at stage k + 1, then it should also be considered less risky at stage k. The following example (adapted from [15]) shows how dynamic risk measures as defined above might indeed result in time-inconsistent, and ultimately undesirable, behaviors. Example II.4. Consider the simple setting whereby there is a final cost Z and one seeks to evaluate such a cost from the perspective of earlier stages. Consider the three-stage scenario tree in Figure 1, with the elementary events Ω = {U U, U D, DU, DD}, and the filtration F0 = {∅, Ω}, n o F1 = ∅, {U }, {D}, Ω , and F2 = 2Ω . U p p 1 R 1 UU p p p D 1 UD DU p DD Fig. 1: Scenario tree for example II.4. Consider the dynamic risk measure: ρk,N (Z) := max Eq [Z|Fk ], q∈U k = 0, 1, 2 where U contains two probability measures: one corresponding to p = 0.4, and the other one to p = 0.6 Assume that the random cost is Z(U U ) = Z(DD) = 0, and Z(U D) = Z(DU ) = 100. Then, one has ρ1 (Z)(ω) = 60 for all ω, and ρ0 (Z)(ω) = 48. Now consider the following two 7 options (“policies”). The first option is to receive a (random) cost deduction Z from the threestage scenario tree above. The second option is to simply receive a deterministic cost deduction W = 50 (with no further costs incurred). In this case, the chosen dynamic risk measure deems Z strictly riskier than the deterministic cost W in all states of nature at time k = 1, but nonetheless W is deemed riskier than Z at time k = 0 – a paradox! It is important to note that there is nothing special about the selection of this example; similar paradoxical results could be obtained with other risk metrics. We refer the reader to [16], [36], [37] for further insights into the notion of time-consistency and its practical relevance. The issue then is what additional “structural” properties are required for a dynamic risk measure to be timeconsistent. We first provide a rigorous version of the previous definition of time-consistency. Definition II.5 (Time-Consistency ([16])). A dynamic risk measure {ρk,N }N k=0 is time-consistent if, for all 0 ≤ l < k ≤ N and all sequences Z, W ∈ Zl,N , the conditions Zi = Wi , i = l, . . . , k − 1, and ρk,N (Zk , . . . , ZN ) ≤ ρk,N (Wk , . . . , WN ), imply that ρl,N (Zl , . . . , ZN ) ≤ ρl,N (Wl , . . . , WN ). As we will see in Theorem II.7, the notion of time-consistent risk measures is tightly linked to the notion of coherent risk measures, whose generalization to the multi-period setting is given below: Definition II.6 (Coherent One-step Conditional Risk Measures ([16])). A coherent one-step conditional risk measure is a mapping ρk : Zk+1 → Zk , k ∈ {0, . . . , N − 1}, with the following four properties: • Convexity: ρk (λZ + (1 − λ)W ) ≤ λρk (Z) + (1 − λ)ρk (W ), ∀λ ∈ [0, 1] and Z, W ∈ Zk+1 ; • Monotonicity: if Z ≤ W then ρk (Z) ≤ ρk (W ), ∀Z, W ∈ Zk+1 ; • Translation invariance: ρk (Z + W ) = Z + ρk (W ), ∀Z ∈ Zk and W ∈ Zk+1 ; • Positive homogeneity: ρk (λZ) = λρk (Z), ∀Z ∈ Zk+1 and λ ≥ 0. We are now in a position to state the main result of this section. 8 Theorem II.7 (Dynamic, Time-consistent Risk Measures ([16])). Consider, for each k ∈ {0, . . . , N }, the mappings ρk,N : Zk,N → Zk defined as ρk,N = Zk + ρk (Zk+1 + ρk+1 (Zk+2 + . . . + ρN −2 (ZN −1 + ρN −1 (ZN )) . . .)), (1) where the ρk ’s are coherent one-step conditional risk measures. Then, the ensemble of such mappings is a dynamic, time-consistent risk measure. Remarkably, Theorem 1 in [16] shows (under weak assumptions) that the “multi-stage composition” in equation (1) is indeed necessary for time-consistency. Accordingly, in the remainder of this paper, we will focus on the dynamic, time-consistent risk measures characterized in Theorem II.7. III. M ODEL D ESCRIPTION Consider the discrete time system: xk+1 = A(wk )xk + B(wk )uk , (2) where k ∈ N is the time index, xk ∈ RNx is the state, uk ∈ RNu is the (unconstrained) control input, and wk ∈ W is the process disturbance. We assume that the initial condition x0 is deterministic. We assume that W is a finite set of cardinality L, i.e., W = {w[1] , . . . , w[L] }. For each stage k and state-control pair (xk , uk ), the process disturbance wk is drawn from set W according to the probability mass function p = [p(1), p(2), . . . , p(L)]> , where p(j) = P(wk = w[j] ), j ∈ {1, . . . , L}. Without loss of generality, we assume that p(j) > 0 for all j. Note that the probability mass function for the process disturbance is time-invariant, and that the process disturbance is independent of the process history and of the state-control pair (xk , uk ). Under these assumptions, the stochastic process {xk } is clearly a Markov process. By enumerating all realizations of the process disturbance wk , system (2) can be rewritten as:    A x + B1 uk if wk = w[1] ,   1 k .. .. xk+1 = . .     AL xk + BL uk if wk = w[L] , where Aj := A(w[j] ) and Bj := B(w[j] ), j ∈ {1, . . . , L}. The results presented in this paper can be immediately extended to the time-varying case (i.e., where the probability mass function for the process disturbance is time-varying). To simplify notation, however, we prefer to focus this paper on the time-invariant case. 9 IV. M ARKOV P OLYTOPIC R ISK M EASURES In this section we refine the notion of dynamic time-consistent risk metrics (as defined in Theorem II.7) in two ways: (1) we add a polytopic structure to the dual representation of coherent risk metrics, and (2) we add a Markovian structure. This will lead to the definition of Markov dynamic polytopic risk metrics, which enjoy favorable computational properties and, at the same time, maintain most of the generality of dynamic time-consistent risk metrics. A. Polytopic Risk Measures According to the discussion in Section III, the probability space for the process disturbance has a finite number of elements. Accordingly, consider Theorem II.2; by definition of expectation, one P has Eζ [Z] = Lj=1 Z(j)p(j)ζ(j). In our framework (inspired by [38]), we consider coherent risk measures where the risk envelope U is a polytope, i.e., there exist matrices S I , S E and vectors T I , T E of appropriate dimensions such that  U poly = ζ ∈ B | S I ζ ≤ T I , S E ζ = T E . We will refer to coherent risk measures representable with a polytopic risk envelope as polytopic risk measures. Consider the bijective map q(j) := p(j)ζ(j) (recall that, in our model, p(j) > 0). Then, by applying such map, one can easily rewrite a polytopic risk measure as ρ(Z) = max Eq [Z], q∈U poly where q is a probability mass function belonging to a polytopic subset of the standard simplex, i.e.: U poly n o L I I E E = q∈∆ |S q≤T , S q=T , (3)  P P where ∆L := q ∈ RL : Lj=1 q(j) = 1, q ≥ 0 . Accordingly, one has Eq [Z] = Lj=1 Z(j)q(j) (note that, with a slight abuse of notation, we are using the same symbols as before for U poly , S I , and S E ). The class of polytopic risk measures is large: we give below some examples (also note that any comonotonic risk measure is a polytopic risk measure [37]). Example IV.1 (Examples of Polytopic Risk Measures). As a first example, the expected value of a random variable Z can be represented according to equation (3) with polytopic risk envelope n o poly L U = q ∈ ∆ | q(j) = p(j), j ∈ {1, . . . , L} . 10 A second example is represented by the average upper semi-deviation risk metric, defined as   ρAUS (Z) := E [Z] + c E (Z − E [Z])+ , where 0 ≤ c ≤ 1 and (x)+ := max(0, x). This metric can be represented according to equation (3) with polytopic risk envelope ([39], [34]): !   L X poly L U = q ∈ ∆ | q(j) = p(j) 1 + h(j) − h(j)p(j) , 0 ≤ h(j) ≤ c, j ∈ {1, . . . , L} . j=1 A related risk metric is the mean absolute semi-deviation risk metric, defined as   ρAS (Z) = E [Z] + c E Z − E [Z] , where 0 ≤ c ≤ 1. This metric can be represented using a risk envelope identical to that for ρAUS with the only change being h(j) ∈ [−c, c] [39]. A risk metric that is very popular in the finance industry is the Conditional Value-at-Risk (CVaR), defined as ([40])  1 + CVaRα (Z) := inf y + E [(Z − y) ] , y∈R α  (4) where α ∈ (0, 1]. CVaRα can be represented according to equation (3) with the polytopic risk envelope (see [34]): n o p(j) U poly = q ∈ ∆L | 0 ≤ q(j) ≤ , j ∈ {1, . . . , L} . α As a special case, CVaR0 corresponds to the worst case risk and can be trivially represented according to (3) with polytopic risk envelope U poly = ∆L . Other important examples include spectral risk measures [41], optimized certainty equivalent and expected utility [42], [34], and distributionally-robust risk [8]. The key point is that the notion of polytopic risk metric covers a full gamut of risk assessments, ranging from risk-neutral to worst case. B. Markov Dynamic Polytopic Risk Metrics Note that in the definition of dynamic, time-consistent risk measures, since at stage k the value of ρk is Fk -measurable, the evaluation of risk can depend on the whole past, see [16, Section IV]. For example, the weight c in the definition of the average upper mean semi-deviation risk metric can be an Fk -measurable random variable (see [16, Example 2]). This generality, which appears 11 of little practical value in many cases, leads to optimization problems that are intractable. This motivates us to add a Markovian structure to dynamic, time-consistent risk measures (similarly as in [16]). We start by introducing the notion of Markov polytopic risk measure (similar to [16, Definition 6]). Definition IV.2 (Markov Polytopic Risk Measures). Consider the Markov process {xk } that evolves according to equation (2). A coherent one-step conditional risk measure ρk (·) is a Markov polytopic risk measure with respect to {xk } if it can be written as ρk (Z(xk+1 )) = max q∈Ukpoly (xk ,p) Eq [Z(xk+1 )] where Ukpoly (xk , p) = {q ∈ ∆L | SkI (xk , p)q ≤ TkI (xk , p), SkE (xk , p)q = TkE (xk , p)} is the polytopic risk envelope. In other words, a Markov polytopic risk measure is a coherent one-step conditional risk measure where the evaluation of risk is not allowed to depend on the whole past (for example, the weight c in the definition of the average upper mean semi-deviation risk metric can depend on the past only through xk ), and the risk envelope is a polytope. Correspondingly, we define a Markov dynamic polytopic risk metric as follows. Definition IV.3 (Markov Dynamic Polytopic Risk Measures). Consider the Markov process {xk } that evolves according to equation (2). A Markov dynamic polytopic risk measure is a set of mappings ρk,N : Zk,N → Zk defined as ρk,N = Z(xk ) + ρk (Z(xk+1 ) + . . . + ρN −2 (Z(xN −1 ) + ρN −1 (Z(xN ))) . . .)), for k ∈ {0, . . . , N }, where ρk are single-period Markov polytopic risk measures. Clearly, a Markov dynamic polytopic risk metric is time-consistent. Definition IV.3 can be extended to the case where the probability distribution for the disturbance depends on the current state and control action. We avoid this generalization to keep the exposition simple and consistent with model (2). V. P ROBLEM F ORMULATION In light of Sections III and IV, we are now in a position to state the risk-averse optimization problem we wish to solve in this paper. Our problem formulation relies on Markov dynamic polytopic risk metrics that satisfy the following stationarity assumption. 12 Assumption V.1 (Time-invariance of Risk Assessments). The polytopic risk envelopes Ukpoly are independent of time k and state xk , i.e. Ukpoly (xk , p) = U poly (p), ∀k. This assumption is crucial for the well-posedness of our formulation and to devise a tractable MPC algorithm that relies on linear matrix inequalities. We next introduce a notion of stability tailored to our risk-averse context. Definition V.2 (Uniform Global Risk-Sensitive Exponential Stabilty). System (2) is said to be Uniformly Globally Risk-Sensitive Exponentially Stable (UGRSES) if there exist constants c ≥ 0 and λ ∈ [0, 1) such that for all initial conditions x0 ∈ RNx , k > ρ0,k (0, . . . , 0, x> k xk ) ≤ c λ x0 x0 , for all k ∈ N, (5) where {ρ0,k } is a Markov dynamic polytopic risk measure satisfying Assumption V.1. If condition (5) only holds for initial conditions within some bounded neighborhood Ω of the origin, the system is said to be Uniformly Locally Risk-Sensitive Exponentially Stable (ULRSES) with domain Ω. Note that, in general, UGRSES is a more restrictive stability condition than mean-square stability, as illustrated by the following example. Example V.3 (Mean-Square Stability versus Risk-Sensitive Stability). System (2) is said to be Uniformly Globally Mean-Square Exponentially Stable (UGMSES) if there exist constants c ≥ 0 and λ ∈ [0, 1) such that for all initial conditions x0 ∈ RNx ,   k > E x> k xk ≤ c λ x0 x0 , for all k ∈ N, see [43, Definition 1] and [8, Definition 1]. Consider the discrete time system  √  0.5 x with probability 0.2, k xk+1 = √  1.1 xk with probability 0.8. (6) A sufficient condition for system (6) to be UGMSES is that there exist positive definite matrices P = P >  0 and L = L>  0 such that   > > E x> k+1 P xk+1 − xk P xk ≤ −xk Lxk , for all k ∈ N, see [8, Lemma 1]. One can easily check that with P = 100 and L = 1 the above inequality is satisfied, and, hence system (6) is UGMSES. 13 Assuming risk is assessed according to the Markov dynamic polytopic risk metric ρ0,k = CV aR0.5 ◦ . . . ◦ CV aR0.5 , we next show that system (6) is not UGRSES. In fact, using the dual representation given in Example IV.1, one can write CVaR0.5 (Z(xk+1 )) = max Eq [Z(xk+1 )], q∈U poly where U poly = {q ∈ ∆2 | 0 ≤ q1 ≤ 0.4, 0 ≤ q2 ≤ 1.6}. Consider the probability mass function q = [0.1/1.1, 1/1.1]> . Since q ∈ U poly , one has CVaR0.5 (x2k+1 ) ≥ 0.5 x2k 0.1 1 + 1.1 x2k = 1.0455 x2k . 1.1 1.1 By repeating this argument, one can then show that ρ0,k (x2k+1 ) = CVaR0.5 ◦ . . . ◦ CVaR0.5 (x2k+1 ) ≥ ak+1 x> 0 x0 , where a = 1.0455. Hence, one cannot find constants c and λ that satisfy equation (5). Consequently, system (6) is UGMSES but not UGRSES. Consider the MDP described in Section III and let Π be the set of all stationary feedback n control policies, i.e., Π := π : RNx → RNu }. Consider the quadratic cost function C : RNx × RNu → R≥0 defined as C(x, u) := kxk2Q + kuk2R , where Q = Q>  0 and R = R>  0 are given state and control penalties, and kxk2A defines the weighted norm, i.e., xT Ax. Define the multi-stage cost function: J0,k (x0 , π) := ρ0,k   C(x0 , π(x0 )), . . . , C(xk , π(xk )) , where {ρ0,k } is a Markov dynamic polytopic risk measure satisfying Assumption V.1. The problem we wish to address is as follows. Optimization Problem OPT — Given an initial state x0 ∈ RNx , solve inf π∈Π subject to lim sup J0,k (x0 , π) k→∞ xk+1 = A(wk )xk + B(wk )π(xk ) kTu π(xk )k2 ≤ umax , kTx xk k2 ≤ xmax System is UGRSES where (Tu , umax ) and (Tx , xmax ) describe constraints on the control and state respectively (given as second-order cone constraints). 14 ∗ We denote the optimal cost function as J0,∞ (x0 ). Note that the risk measure in the definition of UGRSES is assumed to be identical to the risk measure used to evaluate the cost of a policy. Also, by Assumption V.1, the single-period risk metrics are time-invariant, hence one can write   ρ0,k C(x0 , π(x0 )), . . . , C(xk , π(xk )) = C(x0 , π(x0 )) + ρ(C(x1 , π(x1 )) + . . . + ρ(C(xk , π(xk ))) . . .), (7) where ρ is a given Markov polytopic risk metric that models the “amount” of risk aversion. This paper addresses problem OPT along three main dimensions: 1) Find sufficient conditions for risk-sensitive stability (i.e., for UGRSES). 2) Design a MPC algorithm to efficiently compute a suboptimal state-feedback control policy. 3) Find lower bounds for the optimal cost of problem OPT . VI. R ISK -S ENSITIVE S TABILITY In this section we provide a sufficient condition for system (2) to be UGRSES, under the assumptions of Section V. This condition relies on Lyapunov techniques and is inspired by [8] (Lemma VI.1 indeed reduces to Lemma 1 in [8] when the risk measure is simply an expectation). Lemma VI.1 (Sufficient Conditions for UGRSES). Consider a policy π ∈ Π and the corresponding closed-loop dynamics for system (2), denoted by xk+1 = f (xk , wk ). The closed-loop system is UGRSES if there exists a function V (x) : RNx → R and scalars b1 , b2 , b3 > 0, such that for all x ∈ RNx , b1 kxk2 ≤ V (x) ≤ b2 kxk2 , and (8) 2 ρ(V (f (x, w))) − V (x) ≤ −b3 kxk . We call such a function V (x) a risk-sensitive Lyapunov function. Proof. From the time-consistency, monotonicity, translational invariance, and positive homogeneity of Markov dynamic polytopic risk measures, condition (8) implies ρ0,k+1 (0, . . . , 0, b1 kxk+1 k2 ) ≤ ρ0,k+1 (0, . . . , 0, V (xk+1 )) = ρ0,k (0, . . . , 0, V (xk ) + ρ(V (xk+1 ) − V (xk ))) ≤ ρ0,k (0, . . . , 0, V (xk ) − b3 kxk k2 ) ≤ ρ0,k (0, . . . , 0, (b2 − b3 )kxk k2 ). 15 Also, since ρ0,k+1 is monotonic, one has b1 ρ0,k+1 (0, . . . , 0, kxk+1 k2 ) ≥ 0, which implies b2 ≥ b3 and in turn (1 − b3 /b2 ) ∈ [0, 1). Since V (xk )/b2 ≤ kxk k2 , by using the previous inequalities one can write:   b3 ρ0,k+1 (0, . . . , 0, V (xk+1 )) ≤ ρ0,k (0, . . . , 0, V (xk ) − b3 kxk k ) ≤ 1− ρ0,k (0, . . . , 0, V (xk )) . b2 2 Repeating this bounding process, one obtains:  k k  b3 b3 ρ0,k+1 (0, . . . , 0, V (xk+1 )) ≤ 1 − ρ0,1 (V (x1 )) = 1 − ρ (V (x1 )) b2 b2  k k+1   b3 b3 2 V (x0 ) − b3 kx0 k ≤ b2 1 − kx0 k2 . ≤ 1− b2 b2 Again, by monotonicity, the above result implies ρ0,k+1 (0, . . . , 0, x> k+1 xk+1 ) b2 ≤ b1  b3 1− b2 k+1 x> 0 x0 . By setting c = b2 /b1 and λ = (1 − b3 /b2 ) ∈ [0, 1), the claim is proven. Remark VI.2 (Sufficient Conditions for ULRSES). The closed-loop system is ULRSES with domain Ω if the conditions in (8) only hold within the bounded set Ω. VII. M ODEL P REDICTIVE C ONTROL P ROBLEM This section describes a MPC strategy that approximates the solution to OPT . We note that while an exact solution to OPT would lead to time-consistent risk assessments, MPC is not guaranteed to be time consistent over an entire infinite horizon realization since it is inherently myopic. The MPC strategy thus provides an efficiently implementable policy that approximately mimics the time-consistent nature of the optimal solution to OPT . A. The Unconstrained Case In this section we set up the receding horizon version of problem OPT under the assumption that there are no constraints. Consider the following receding-horizon cost function for N ≥ 1: J(xk|k , πk|k , . . . , πk+N −1|k , P ) :=ρk,k+N C(xk|k , πk|k (xk|k )), . . . , (9) C(xk+N −1|k , πk+N −1|k (xk+N −1|k ), xTk+N P xk+N  , where xh|k is the state at time h predicted at stage k (a discrete random variable), πh|k is the control policy to be applied at time h as determined at stage k (i.e., πh|k : RNx → RNu ), and 16 P = P T  0 is a terminal weight matrix. We are now in a position to state the model predictive control problem. Optimization problem MPC — Given an initial state xk|k ∈ RNx and a prediction horizon N ≥ 1, solve min πk|k ,...,πk+N −1|k J xk|k , πk|k , . . . , πk+N −1|k , P  subject to xk+h+1|k = A(wk+h )xk+h|k + B(wk+h )πk+h|k (xk+h|k ), h ∈ {0, . . . , N − 1}. Note that a Markov policy is guaranteed to be optimal for problem MPC (see [16, Theorem 2]). The optimal cost function for problem MPC is denoted by Jk∗ (xk|k ), and a minimizing ∗ ∗ , . . . , πk+N policy is denoted by {πk|k −1|k } (if multiple minimizing policies exist, then one of the minimizing policies is selected arbitrarily). For each state xk , we set xk|k = xk and the (time-invariant) model predictive control law is then defined as ∗ π M P C (xk ) =πk|k (xk|k ). (10) Note that the model predictive control problem MPC involves an optimization over time-varying closed-loop policies, as opposed to the classical deterministic case where the optimization is over open-loop sequences. A similar approach is taken in [7], [8]. We will show in Section IX how to solve problem MPC efficiently. The following theorem shows that the model predictive control law (10), with a proper choice of the terminal weight P , is risk-sensitive stabilizing, i.e., the closed-loop system (2) is UGRSES. Theorem VII.1 (Stochastic Stability for Model Predictive Control Law, Unconstrained Case). Consider the model predictive control law in equation (10) and the corresponding closed-loop dynamics for system (2) with initial condition x0 ∈ RNx . Suppose that P = P T  0, and there exists a matrix F such that: L X j=1 ql (j) (Aj + Bj F )T P (Aj + Bj F ) − P + Q + F T RF ≺ 0, (11) for all l ∈ {1, . . . , card(U poly,V (p))}, where U poly,V (p) is the set of vertices of polytope U poly (p), ql is the lth element in set U poly,V (p), and ql (j) denotes the jth component of vector ql , j ∈ {1 . . . , L}. Then, the closed loop system (2) is UGRSES. 17 Proof. We will show that Jk∗ is a risk-sensitive Lyapunov function (Lemma VI.1). Specifically, we want to show that Jk∗ satisfies the two inequalities in equation (8); the claim then follows by simply noting that, in our time-invariant setup, Jk∗ does not depend on k. Consider the bottom inequality in equation (8). At time k consider problem MPC with state −1 ∗ xk|k . The sequence of optimal control policies is given by {πk+h|k }N h=0 . Let us define a sequence of control policies from time k + 1 to N according to   π ∗ k+h|k (xk+h|k ) πk+h|k+1 (xk+h|k ) :=  F xk+N |k if h ∈ [1, N − 1], (12) if h = N . −1 ∗ This is simply the concatenation of the sequence {πk+h|k }N h=1 with a linear feedback law for stage N (the reason why we refer to this policy with the subscript “k + h|k + 1” is that we will use this policy as a feasible policy for problem MPC starting at stage k + 1). Consider problem MPC at stage k +1 with initial condition given by xk+1|k+1 = A(wk )xk|k + ∗ (xk|k ), and denote with J k+1 (xk+1|k+1 ) the cost of the objective function for the MPC B(wk )πk|k problem corresponding to the control policy sequence in (12). Note that xk+1|k+1 (and therefore J k+1 (xk+1|k+1 )) is a random variable with L possible realizations, given xk|k . Define:  Zk+N := xTk+N |k −P + Q + F T RF xk+N |k , T  Zk+N +1 := (A(wk+N |k ) + B(wk+N |k )F )xk+N |k P (A(wk+N |k ) + B(wk+N |k )F )xk+N |k . By exploiting the dual representation of Markov polytopic risk metrics, one can write  Zk+N + ρk+N (Zk+N +1 ) = xTk+N |k −P + Q + F T RF xk+N |k + max q∈U poly (p) L X q(j)xTk+N |k (Aj + Bj F )T P (Aj + Bj F ) xk+N |k . j=1 Combining the equation above with equation (11), one readily obtains the inequality Zk+N + ρk+N (Zk+N +1 ) ≤ 0. 18 (13) One can then write the following chain of inequalities:  ∗ ∗ (xk+1|k )), . . . , (xk|k )) + ρk ρk+1,N C(xk+1|k , πk+1|k Jk∗ (xk|k ) = C(xk|k , πk|k (14) !  kxk+N |k k2Q + kxk+N |k k2F T RF +ρk+N (Zk+N +1 ) −Zk+N −ρk+N (Zk+N +1 ) ≥ ∗ C(xk|k , πk|k (xk|k ))  ∗ + ρk ρk+1,N C(xk+1|k , πk+1|k (xk+1|k )), . . . , kxk+N |k k2Q + kxk+N |k k2F T RF  + ρk+N (Zk+N +1 ) !  = J k+1 (xk+1|k+1 )   ∗ ∗ ≥ C(xk|k , πk|k (xk|k )) + ρk Jk+1 (xk+1|k+1 ) , ∗ (xk|k ))+ρk C(xk|k , πk|k  (15) where the first equality follows from the definitions of Zk+N and of dynamic, time-consistent risk measures, the second inequality follows from equation (13) and the monotonicity property of Markov polytopic risk metrics (see also [16, Page 242]), the third equality follows from the ∗ and definition of J k+1 (xk+1|k+1 ), and the fourth inequality follows from the definition of Jk+1 the monotonicity of Markov polytopic risk metrics. Consider now the top inequality in equation (8). One can easily bound Jk∗ (xk|k ) from below according to: Jk∗ (xk|k ) ≥ xTk|k Qxk|k ≥ λmin (Q)kxk|k k2 , (16) where λmin (Q) > 0 by assumption. To bound Jk∗ (xk|k ) from above, define: MA := max max r∈{0,...,N −1} j0 ,...,jr ∈{1,...,L} kAjr . . . Aj1 Aj0 k2 . Since the problem is unconstrained (and, hence, zero is a feasible control input) and by exploiting the monotonicity property, one can write:     Jk∗ (xk|k ) ≤ C(xk|k , 0) + ρk C(xk+1|k , 0) + ρk+1 C(xk+2|k , 0) + . . . + ρk+N −1 kxk+N |k k2P . . .   ≤ kQk2 kxk|k k22 + ρk kQk2 kxk+1|k k22 + ρk+1 kQk2 kxk+2|k k22 + . . .   + ρk+N −1 kP k2 kxk+N k22 . . . . Therefore, by using the translational invariance and monotonicity property of Markov polytopic risk measures, one obtains the upper bound: Jk∗ (xk|k ) ≤ (N kQk2 + kP k2 ) MA kxk|k k22 . 19 (17) Combining the results in equations (15), (16), (17), and given the time-invariance of our problem setup, one concludes that Jk∗ (xk|k ) is a risk-sensitive Lyapunov function for the closed-loop system (2), in the sense of Lemma VI.1. This concludes the proof. B. The Constrained Case We now enforce the state and control constraints introduced in problem OPT within the receding horizon framework. Consider the time-invariant ellipsoids: U := {u ∈ RNu | kTu uk2 ≤ umax }, X := {x ∈ RNx | kTx xk2 ≤ xmax }. While we focus on ellipsoidal state and control constraints in this paper, our methodology can readily accommodate component-wise and polytopic constraints via suitable LMI representations, for example, see [44], [45] for detailed derivations. Our receding horizon framework may be decomposed into two steps. First, offline, we search for an ellipsoidal set Emax and a local feedback control law u(x) = F x that renders Emax control invariant and ensures satisfaction of state and control constraints. Additionally, within the offline step, we search for a terminal cost matrix P (for the online MPC problem) to ensure that the closed-loop dynamics under the model predictive controller are risk-sensitive exponentially stable. The online MPC optimization then constitutes the second step of our framework. Consider first, the offline step. We parameterize Emax as follows: Emax (W ) := {x ∈ RNx | x> W −1 x ≤ 1}, (18) where W (and hence W −1 ) is a positive definite matrix. The (offline) optimization problem to solve for W , F , and P is presented below. 20 Optimization Problem PE — Solve max W =W > 0,F,P =P > 0 subject to logdet(W ) > > Tu Tu F F u2max L X j=1 − W −1  0, (19) ql (j) (Aj + Bj F )> P (Aj + Bj F ) − P + (F > RF + Q) ≺ 0, ∀ql ∈ U poly,V (p) (20) ∀j ∈ {1, . . . , L} : (Aj + Bj F )> Tx> Tx (Aj + Bj F ) − W −1  0, x2max (Aj + Bj F )> W −1 (Aj + Bj F ) − W −1  0. (21) (22) The objective in problem PE is to maximize the volume of the control invariant ellipsoid Emax (W ). Note that Emax (W ) may contain states outside of X, however, we restrict our domain of interest to the intersection X∩Emax (W ). The semi-definite inequality in (20) defines the terminal cost matrix P (ref. inequality (11) in Theorem VII.1), and will be instrumental in proving risksensitive stability for system (2) under the model predictive control law. Note that inequality (20) is bi-linear in the decision variables. In Section IX, we will derive an equivalent Linear Matrix Inequality (LMI) characterization of (20) in order to derive efficient solution algorithms. We first analyze the properties of the state feedback control law u(x) = F x within the set Emax (W ). Lemma VII.2 (Properties of Emax ). Suppose problem PE is feasible and x ∈ X ∩ Emax (W ). Let u(x) = F x. Then, the following statements are true: 1) kTu uk2 ≤ umax , i.e., the control constraint is satisfied. 2) kTx (A(w)x + B(w)u) k2 ≤ xmax surely, i.e., the state constraint is satisfied at the next step surely. 3) A(w)x + B(w)u ∈ Emax (W ) surely, i.e., the set Emax (W ) is robust control invariant under the control law u(x). Thus, u(x) ∈ U and A(w)x + B(w)u ∈ X ∩ Emax (W ) surely. Proof. We first prove 1) and 2) and thereby establish u(x) as a feasible control law within the set Emax (W ). Notice that: 1 1 kTu F xk2 ≤ umax ⇔ kTu F W 2 (W − 2 x)k2 ≤ umax . 21 1 From (18), applying the Schur complement, we know that kW − 2 xk2 ≤ 1 for any x ∈ Emax (W ). 1 Thus, by the Cauchy Schwarz inequality, a sufficient condition is given by kTu F W 2 k2 ≤ umax , which can be written as 1 1 (F W 2 )> Tu> Tu (F W 2 )  u2max I ⇔ F > Tu> Tu F  u2max W −1 . Re-arranging the inequality above yields the expression given in (19). The state constraint can be proved in an identical fashion by leveraging (18) and (21). It is omitted for brevity. We now prove the third statement. By definition of a robust control invariant set, we are required to show that for any x ∈ Emax (W ), that is, for all x that satsify the inequality: x> W −1 x ≤ 1, application of the control law u(x) yields the following inequality: (Aj x + Bj F x)> W −1 (Aj x + Bj F x) ≤ 1, ∀j ∈ {1, . . . , L}. Using the S-procedure [46], it is equivalent to show that there exists λ ≥ 0 such that the following condition holds:   −1 > −1 λW − (Aj + Bj F ) W (Aj + Bj F ) 0    0, ∗ 1−λ for all j ∈ {1, . . . , L}. By setting λ = 1, one obtains the largest feasibility set for W and F . The expression in (22) corresponds to the (1,1) block in the matrix above. Lemma VII.2 establishes X ∩ Emax (W ) as a robust control invariant set under the feasible feedback control law u(x) = F x. This result will be crucial to ascertain the persistent feasibility and closed-loop stability properties of the online optimization algorithm. We are now ready to formalize the MPC problem. Suppose the feasible set of solutions in problem PE is non-empty and define W = W ∗ and P = P ∗ , where W ∗ , P ∗ are the maximizers for problem PE. Consider the following online optimization problem: Optimization problem MPC — Given an initial state xk|k ∈ X and a prediction horizon N ≥ 1, solve min πk|k ,...,πk+N −1|k subject to J xk|k , πk|k , . . . , πk+N −1|k , P  xk+h+1|k = A(wk+h )xk+h|k + B(wk+h )πk+h|k (xk+h|k ), πk+h|k (xk+h|k ) ∈ U, xk+h+1|k ∈ X, h ∈ {0, . . . , N − 1}, xk+N |k ∈ Emax (W ) surely. 22 Note that a Markov policy is guaranteed to be optimal for problem MPC (see [16, Theorem 2]). The optimal cost function for problem MPC is denoted by Jk∗ (xk|k ), and a minimizing policy ∗ ∗ is denoted by {πk|k , . . . , πk+N −1|k }. For each state xk , we set xk|k = xk and the (time-invariant) model predictive control law is then defined as ∗ π M P C (xk ) =πk|k (xk|k ). (23) Note that problem MPC involves an optimization over time-varying closed-loop policies, as opposed to the classical deterministic case where the optimization is over open-loop control inputs. A similar approach is taken in [7], [8]. We will show in Section IX how to solve problem MPC efficiently. We now address the persistent feasibility and stability properties for problem MPC. Theorem VII.3 (Persistent Feasibility). Define XN to be the set of initial states for which problem MPC is feasible. Assume xk|k ∈ XN and the control law is given by (23). Then, it follows that xk+1|k+1 ∈ XN surely. Proof. Given xk|k ∈ XN , problem MPC may be solved to yield a closed-loop optimal control policy: ∗ ∗ {πk|k (xk|k ), . . . , πk+N −1|k (xk+N −1|k )}, such that xk+N |k ∈ X ∩ Emax (W ). Consider problem MPC at stage k + 1 with initial condition xk+1|k+1 . From Lemma VII.2, we know that the set X ∩ Emax (W ) is robust control invariant under the feasible feedback control law u(x) = F x. Thus, ∗ ∗ {πk+1|k (xk+1|k ), . . . , πk+N −1|k (xk+N −1|k ), F xk+N |k }, (24) is a feasible control policy at stage k + 1. Note that this is simply a concatenation of the optimal −1 ∗ tail policy from the previous iteration {πk+h|k (xk+h|k )}N h=1 , with the state feedback law F xk+N |k for the final step. ∗ Since a feasible control policy exists at stage k + 1, xk+1|k+1 = Aj xk|k + Bj πk|k (xk|k ) ∈ XN for any j ∈ {1, . . . , L}, completing the proof. Theorem VII.4 (Stochastic Stability with MPC). Suppose the initial state x0 lies within XN . Then, under the model predictive control law given in (23), the closed-loop system is ULRSES with domain XN . 23 Proof. The first part of the proof is identical to the reasoning presented in the proof for Theorem VII.1. In particular, we leverage the policy given in (24) as a feasible policy for problem MPC at stage k + 1 and inequality (20) to show:  ∗ ∗ (xk+1|k+1 ), (xk|k ) + ρk (Jk+1 Jk∗ (xk|k ) ≥ C xk|k , πk|k (25) for all xk|k ∈ XN . Additionally, we retain the same lower bound for Jk∗ (xk|k ) as given in (16). The upper bound for Jk∗ (xk|k ) is derived in two steps. First, define MA := max max r∈{0,...,N −1} j0 ,...,jr ∈{1,...,L} αjr . . . αj1 αj0 , where αj := kAj + Bj F k2 . Suppose xk|k ∈ X∩Emax (W ). From Lemma VII.2, we know that the control policy πk+h|k (xk+h|k ) = N −1 {F xk+h|k }h=0 is feasible and consequently, X ∩ Emax (W ) ⊆ XN . Defining θf := kQ + F > RF k2 , we thus have      Jk∗ (xk|k ) ≤C xk|k , F xk|k + ρk C xk+1|k , F xk+1|k + . . . + ρk+N −1 x> P x ... k+N |k k+N |k    ≤θf kxk|k k22 + ρk θf kxk+1|k k22 + . . . + ρk+N −1 kP k2 kxk+N k22 . . . , for all xk|k ∈ X ∩ Emax (W ). Exploiting the translational invariance and monotonicity property of Markov polytopic risk metrics, one obtains the upper bound: Jk∗ (xk|k ) ≤ (N θf + kP k2 ) MA kxk|k k22 , ∀xk|k ∈ X ∩ Emax (W ). | {z } (26) :=β>0 In order to derive an upper bound for Jk∗ (xk|k ) with the above structure for all xk|k ∈ XN , we draw inspiration from a similar proof in [47]. By leveraging the finite cardinality of the disturbance set W and the set closure preservation property attributed to the inverse of continuous functions, it is possible to show that XN is closed. Then, since XN is necessarily a subset of the bounded set X, it follows that XN is compact. Thus, there exists some constant Γ > 0 such that Jk∗ (xk|k ) ≤ Γ for all xk|k ∈ XN . That Γ is finite follows from the fact that {kxk+h|k k2 }N h=0 and N −1 are finitely bounded for all xk|k ∈ XN . Now since Emax (W ) is compact {kπk+h|k (xk+h|k )k2 }h=0 and non-empty, there exists a d > 0 such that Ed := {x ∈ RNx | kxk2 ≤ d} ⊂ Emax (W ). Let β̂ = max{βkxk22 | kxk2 ≤ d}. Consider now, the function: (Γ/β̂)βkxk22 . Then since βkxk22 > β̂ for all x ∈ XN \ Ed and Γ ≥ β̂, it follows that   Γβ ∗ kxk|k k22 , ∀xk|k ∈ XN , Jk (xk|k ) ≤ β̂ 24 (27) as desired. Combining the results in equations (25), (16), (27), and given the time-invariance of our problem setup, one concludes that Jk∗ (xk|k ) is a risk-sensitive Lyapunov function for the closed-loop system (2), in the sense of Lemma VI.1. This concludes the proof. Remark VII.5 (Performance Comparisons). The two-step optimization methodology proposed via Problems PE and MPC is similar to the approach described in [8] in that both the control invariant ellipsoid (Emax ) and the conditions to ensure stability are computed offline, while problem MPC is solved online. This hybrid procedure is more computationally efficient than the online algorithm given in [48], and boasts better performance as compared with the offline algorithm in [3]. On the other hand, the stability analysis here differs from [8] since we use Jk∗ as the Lyapunov function instead of the fixed quadratic form described in [8]. This allows us to formulate a less-constrained framework and achieve superior performance. To gain additional insight into this comparison, we present an alternative formulation of problems PE and MPC in Appendix A, analogous to the approach in [8], and present numerical results exemplifying the performance improvement in Section X-B. VIII. B OUNDS ON O PTIMAL C OST In this section, by leveraging semi-definite programming, we provide a lower bound for the optimal cost of problem OPT and an upper bound for the optimal cost using the MPC algorithm. These bounds will be used in Section X to bound the factor of sub-optimality for our MPC control algorithm. In the following, let h i> > > A := A1 . . . AL , and h i> > > B := B1 . . . BL , and for each ql ∈ U poly,V (p), define Σl := diag(ql (1), . . . , ql (L))  0. Theorem VIII.1 (Bounds for Problem OPT ). Lower Bound: Suppose the feasible set of the following Linear Matrix Inequality in the symmetric matrix X  0 is non-empty:   > > R + B (Σl ⊗ X)B B (Σl ⊗ X)A    0, > ∗ A (Σl ⊗ X)A − (X − Q) (28) for all l ∈ {1, . . . , card(U poly,V (p))}. Then, the optimal cost of problem OPT can be lower bounded as ∗ J0,∞ (x0 ) ≥ max{x> 0 Xx0 : X satisfies LMI (28)}. 25 Upper Bound: For all x0 ∈ XN , J0∗ (x0 ) ≥ lim sup J0,k (x0 , π M P C ). k→∞ Proof. Lower Bound: Consider a symmetric matrix X such that the LMI in equation (28) is satisfied. Also, let π be a stationary feedback control policy that is feasible for problem OPT . At stage k, consider a state xk (reachable under policy π) and the corresponding control action uk = π(xk ) (since π is a feasible policy, the pair (xk , uk ) clearly satisfies the state-control > constraints). By pre- and post-multiplying the LMI (28) with [u> k , xk ] and its transpose, one obtains the inequality > > > > > > u> k Ruk + uk B (Σl ⊗ X)Buk + 2uk B (Σl ⊗ X)Axk + xk (A (Σl ⊗ X)A − (X − Q))xk ≥ 0, which implies x> k Xxk − L X j=1 > ql (j)(Aj xk + Bj uk )> X(Aj xk + Bj uk ) ≤ u> k Ruk + xk Qxk , for all l ∈ {1, . . . , cardinality(U poly,V (p))}. Since U poly (p) is a convex polytope of probability vectors q (with vertex set U poly,V (p)), then the inequality above holds for any q ∈ U poly (p). Exploiting the dual representation of Markov polytopic risk measures, one has ρk (x> k+1 Xxk+1 ) = maxq∈U poly (p) Eq [x> k+1 Xxk+1 ], which leads to the inequality > > > x> k Xxk − ρk (xk+1 Xxk+1 ) ≤ uk Ruk + xk Qxk . As the above inequality holds for all k ∈ N, one can write, for all k ∈ N, k X h=0 x> h Xxh − ρh (x> h+1 Xxh+1 )  ≤ k X  > u> Ru + x Qx . h h h h h=0 Since each single-period risk measure is monotone, their composition ρ0 ◦ . . . ◦ ρk−1 is monotone as well. Hence by applying ρ0 ◦ . . . ◦ ρk−1 to both sides one obtains ! ! k k X X   > > ≤ ρ0 ◦ . . . ◦ ρk−1 u> . ρ0 ◦ . . . ◦ ρk−1 x> h Ruh + xh Qxh h Xxh − ρh (xh+1 Xxh+1 ) h=0 h=0 By repeatedly applying the translational invariance property (see Definition II.6), the right-hand side can be written as ku0 k2R + kx0 k2Q + ρ0 (ku1 k2R + kx1 k2Q + . . . + ρk−1 (kuk k2R + kxk k2Q ) . . .)  > > > = ρ0,k u> 0 Ru0 + x0 Qx0 , . . . , uk Ruk + xk Qxk = J0,k (x0 , π), 26 where the last equality follows from the definition of dynamic, time-consistent risk measures (Theorem II.7). As for the left-hand side, note that the translation invariance and positive homogeneity property imply that a coherent one-step conditional risk measure is subadditive, i.e., ρh (Z + W ) ≤ ρh (Z) + ρh (W ), where Z, W ∈ Zh+1 . In turn, subadditivity implies that ρh (Z − W ) ≥ ρh (Z) − ρh (W ). Hence, by repeatedly applying the translation invariance and monotonicity property and the inequality ρh (Z − W ) ≥ ρh (Z) − ρh (W ), one obtains ! k X  ρ0 ◦ . . . ◦ ρk−1 kxh k2X − ρh (kxh+1 k2X ) h=0 = kx0 k2X − ρ0 (kx1 k2X )  + ρ0 kx1 k2X − ρ1 (kx2 k2X ) + ρ1 kx2 k2X − ρ2 (kx3 k2X ) + . . .   2 2 + ρk−1 (kxk kX − ρk (kxk+1 kX ) . . . ≥ kx0 k2X − ρ0 ◦ . . . ◦ ρk−1 ◦ ρk (x> k+1 Xxk+1 ) > = x> 0 Xx0 − ρ0,k+1 (0, . . . , xk+1 Xxk+1 ). Since π is a feasible policy, then limk→∞ ρ0,k (0, . . . , x> k+1 xk+1 ) = 0 almost surely. Hence, one readily obtains (using the monotonicity and positve homogeneity property) > lim ρ0,k+1 (0, . . . , 0, x> k+1 Xxk+1 )) ≤ λmax (X) lim ρ0,k+1 (0, . . . , xk+1 xk+1 ) = 0, k→∞ k→∞ almost surely. Collecting all results so far, one has the inequality x> 0 Xx0 ≤ lim J0,k (x0 , π), k→∞ for all symmetric matrices satisfying the LMI (28) and all feasible policies π. By maximizing the left-hand side and minimizing the right-hand side one obtains the claim. Upper Bound: For all k ∈ N, inequality (15) provides the relation  ∗ Jk∗ (xk|k ) ≥ C(xk|k , π M P C (xk|k )) + ρk Jk+1 (xk+1|k+1 ) . Since x0 ∈ XN and problem MPC is recursively feasible, we obtain the following sequence of state-control pairs: {(xk|k , π M P C (xk|k ))}∞ k=0 . Applying inequality (15) recursively and using the 27 monotonicity property of coherent one-step risk measures, we deduce the following: J0∗ (x0|0 ) ≥ C(x0|0 , π M P C (x0|0 )) + ρ0 (J1∗ (x1|1 ))  ≥ C(x0|0 , π M P C (x0|0 )) + ρ0 C(x1|1 , π M P C (x1|1 )) + ρ1 (J2∗ (x2|2 ))  MP C ≥ . . . ≥ C(x0|0 , π (x0|0 )) + ρ0 C(x1|1 , π M P C (x1|1 )) + . . . + ρk−1 (C(xk|k , π MP C (xk|k )) + ∗ Jk+1 (xk+1|k+1 )) . . .   ≥ C(x0|0 , π M P C (x0|0 )) + ρ0 C(x1|1 , π M P C (x1|1 )) + . . . + ρk−1 (C(xk|k , π M P C (xk|k ))) . . . = ρ0,k (C(x0|0 , π M P C (x0|0 )), . . . , C(xk|k , π M P C (xk|k ))), ∀k, ∗ (xk+1|k+1 ) ≥ 0, and the equality where the second to last inequality follows from the fact that Jk+1 follows from the definition of dynamic, time-consistent risk metrics. Noting that xk|k = xk for all k ∈ N and by taking the limit k → ∞ on both sides, one obtains the claim. IX. S OLUTION A LGORITHMS Prior to solving problem MPC, one would first need to find a matrix P that satisfies (20). Expression (20) is a bilinear semi-definite inequality in (P, F ). It is well known that checking feasibility of a bilinear semi-definite inequality constraint is an NP-hard problem [49]. Nonetheless, one can transform this bilinear semi-definite inequality constraint into an LMI by applying the Projection Lemma [50]. The next two results present LMI characterizations of conditions (19), (20), (21), and (22). The proofs are provided in Appendix B. Theorem IX.1 (LMI Characterization of Stability Constraint). Consider the following set of > LMIs with decision variables Y , G, Q = Q  0:   1 IL×L ⊗ Q 0 0 −Σl2 (AG + BY )     −1 ∗ R 0 −Y      0, 1   2G ∗ ∗ I −Q   > ∗ ∗ ∗ −Q + G + G (29) for all l ∈ {1, . . . , card(U poly,V (p))}. The expression in (20) is equivalent to the set of LMIs in −1 (29) by setting F = Y G−1 and P = Q . Furthermore, by the application of the Projection Lemma to the expressions in (19), (21) and (22), we obtain the following corollary: 28  Corollary IX.2. Suppose the following set of LMIs with decision variables Y , G, and W = W >  0 are satisfied:       x2max I −Tx (Aj G + Bj Y ) u2max I −Tu Y W −(Aj G + Bj Y )    0,    0,    0. ∗ −W + G + G> ∗ −W + G + G> ∗ −W + G + G> (30) Then, by setting F = Y G−1 , the LMIs above represent sufficient conditions for the LMIs in (19), (21) and (22). Note that in Corollary IX.2, strict inequalities are imposed only for the sake of analytical simplicity when applying the Projection Lemma. Using similar arguments as in [3], non-strict versions of the above LMIs may also be derived, for example, leveraging some additional technicalities [51]. A solution approach for the receding horizon adaptation of problem OPT is to first solve the LMIs in Theorem IX.1 and Corollary IX.2. If a solution for (P, Y, G, W ) is found, problem MPC can be solved via dynamic programming (see [16, Theorem 2]) after state and action discretization, see, e.g., [52], [53]. Note that the discretization process might yield a large-scale dynamic programming problem for which the computational complexity scales exponentially with the resolution of discretization. This motivates the convex programing approach presented next. A. Convex Programming Approach While problem MPC is defined as an optimization over Markov control policies, in the convex programming approach, we re-define the problem as an optimization over history-dependent policies. One can show (with a virtually identical proof) that the stability Theorem VII.4 still holds when history-dependent policies are considered. Furthermore, since Markov policies are optimal in our setup (see [16, Theorem 2]), the value of the optimal cost stays the same. The key advantage of history-dependent policies is that their additional flexibility leads to a convex formulation of the online problem. Consider the following parameterization of history-dependent control policies. Let j0 , . . . , jh ∈ {1, . . . , L} be the realized indices for the disturbances in the first h + 1 steps of the MPC problem, where h ∈ {1, . . . , N − 1}. The control to be exerted at stage h is denoted by U h (j0 , . . . , jh−1 ). Similarly, we refer to the state at stage h as X h (j0 , . . . , jh−1 ). 29 The dependence on (j0 , . . . , jh−1 ) enables us to keep track of the growth of the scenario tree. In terms of this new notation, the system dynamics (2) can be rewritten as: X 0 := xk|k , U 0 ∈ U, X 1 (j0 ) = Aj0 X 0 + Bj0 U 0 , h = 1, X h (j0 , . . . , jh−1 ) = Ajh−1 X h−1 (j0 , . . . , jh−2 ) + Bjh−1 U h−1 (j0 , . . . , jh−2 ), h ≥ 2. (31) The final solution algorithm is presented below. Algorithm MPC — Given an initial state x0 ∈ X and a prediction horizon N ≥ 1, solve • Offline step: Solve max > logdet(W ) W =W > 0,G,Y,Q=Q 0 subjected to the LMIs in expressions (29) and (30). • Online Step: Suppose the feasible set of solutions in the offline step is ∗ ∗ non-empty. Define: W = W ∗ and P = (Q )−1 where W ∗ and Q are the maximizers for the offline step. Now at each step k ∈ {0, 1, . . . , }, solve: ρk,k+N (C(xk|k , U 0 ), . . . , C(X N −1 , U N −1 ), γ2 ) min γ2 (j0 , . . . , jN −1 ), X h (j0 , . . . , jh−1 ), U 0 , U h (j0 , . . . , jh−1 ), h ∈ {1, . . . , N }, j0 , . . . , jN −1 ∈ {1, . . . , L} (32) subject to – the LMIs  1  ∗ X N (j0 , . . . , jN −1 )> W   γ (j , . . . , jN −1 )I   0,  2 0 ∗ X N (j0 , . . . , jN −1 )> P −1    0. (33) – the system dynamics in equation (31); – the control and state constraints for h ∈ {1, . . . , N }: kTu U 0 k2 ≤ umax , kTu U h (j0 , . . . , jh−1 )k2 ≤ umax , (34) kTx X h (j0 , . . . , jh−1 )k2 ≤ xmax Then, set π M P C (xk|k ) = U 0 . Note that the terminal cost has been equivalently reformulated via the epigraph constraint in 30 (33) using the variable γ2 in order to represent it within the LMI framework (in contrast to the original representation of the cost, which was quadratic in the decision variables). This algorithm is clearly suitable only for “moderate” values of N , given the combinatorial explosion of the scenario tree. As a degenerate case, when we exclude all lookahead steps, problem MPC is reduced to an offline optimization. By trading off performance, one can compute the control policy offline and implement it directly online without further optimization: Algorithm MPC 0 — Given x0 ∈ X, solve: min > γ2 γ2 , W = W >  0, G, Y, Q = Q  0 subject to LMIs (29), (30) and   > 1 x0  0, ∗ W   > γ I x0  2   0. ∗ Q Then, set π M P C (xk ) = Y G−1 xk . The domain of feasibility for MPC 0 is the control invariant set X∩Emax (W ). Showing ULRSES for algorithm MPC 0 is more straightforward than the corresponding analysis for problem MPC and is summarized within the following corollary. Corollary IX.3 (Quadratic Lyapunov Function). Suppose problem MPC 0 is feasible. Then, system (2) under the offline MPC policy: π M P C (xk ) = Y G−1 xk is ULRSES with domain X ∩ Emax (W ). Proof. From Theorem IX.1, we know that the set of LMIs in (29) is equivalent to the expression in (20) when F = Y G−1 . Then since x0 ∈ X ∩ Emax (W ), a robust control invariant set under the local feedback control law u(x) = Y G−1 x, exploiting the dual representation of Markov polytopic risk measures yields the inequality > > ρk (x> k+1 P xk+1 ) − xk P xk ≤ −xk Lxk ∀k ∈ N, (35) T where L = Q + (Y G−1 ) R (Y G−1 ) = L>  0. Define the Lyapunov function V (x) = x> P x. Set b1 = λmin (P ) > 0, b2 = λmax (P ) > 0 and b3 = λmin (L) > 0. Then by Lemma VI.1, this stochastic system is ULRSES with domain X ∩ Emax (W ). Note that our algorithms require a vertex representation of the risk polytopes (rather then the hyperplane representation in Definition IV.2). In our implementation, we use the vertex enumeration function included in the MPT toolbox [54], which relies on the simplex method. 31 X. N UMERICAL E XPERIMENTS In this section we present several numerical experiments that were run on a 2.3 GHz Intel Core i5, MacBook Pro laptop, using the MATLAB YALMIP Toolbox (version 2.6.3 [55]) with the SDPT3 solver. All measurements of computation time are given in seconds. A. A 2-state, 2-input Stochastic System Consider a stochastic system with 6 scenarios: xk+1 = A(wk )xk + B(wk )uk where wk ∈ {1, 2, 3, 4, 5, 6} and         2 0.5 −0.1564 −0.0504 1.5 −0.3 0.5768 0.2859  , A2 =   , A3 =   , A4 =  , A1 =  −0.5 2 −0.0504 −0.1904 0.2 1.5 0.2859 0.7499     1.8 0.3 0.2434 0.3611  , A6 =  , A5 =  −0.2 1.8 0.3611 0.3630         3 0 −0.9540 0 2 0 −0.2587 −0.9364  , B2 =   , B3 =   , B4 =  , B1 =  0 3 −0.7773 0.1852 0 2 0.4721 0     4 0 −1.6915 0  , B6 =  . B5 =  0 4 1.0249 −0.3834 The transition probabilities between the scenarios are uniformly distributed, i.e., P(w = i) = 1/6, i ∈ {1, 2, 3, 4, 5, 6}. Clearly there exists a switching sequence such that this open loop stochastic system is unstable. The objectives of the model predictive controller are to 1) guarantee closedloop ULRSES, 2) satisfy the control input constraints, with Tu = I2×2 , umax = 2.5, and 3) satisfy the state constraints, with Tx = I2×2 , xmax = 5. The initial state is x0 (1) = x0 (2) = 2.5. The objective cost function follows expression (9), with Q = R = 0.01 × I2×2 and the one-step Markov polytopic risk metric is CVaR0.75 . We simulated the state trajectories with 100 Monte Carlo samples, varying the number of lookahead steps N from 1 to 6, and compared the closed-loop performance from algorithms MPC and MPC 0 . Since at every time step we can only access the realizations of the stochastic system in the current simulation, we cannot compare the performance of the model predictive controller with Problem OPT exactly. Instead, for each simulation, the MPC algorithm was run until a stage k 0 such that kxk0 k2 ≤ 10−4 . We then computed the empirical risk from all Monte Carlo simulations for a given horizon length using the cost function J0,k0 . The performance of the 32 MPC algorithms are evaluated based on the empirical risk and the cost upper bound (computed using Theorem VIII.1), and is summarized in Table I. TABLE I: Performance for Example X-A. Algorithms Empirical Risk Cost (Upper Bound) Mean (Variance) of Time per MPC Iteration C − MPC 0 4.016 (4.983) Offline: 0.3574 (0.0091), Online: 0 (0) C − MPC, N = 1 2.882 (3.481) Offline: 0.3252 (0.0023), Online: 0.1312 (0.0032) C − MPC, N = 2 1.686 (2.288) Offline: 0.3241 (0.0042), Online: 0.8214 (0.0256) C − MPC, N = 3 1.105 (1.525) Offline: 0.3380 (0.0133), Online: 2.9984 (0.3410) C − MPC, N = 4 0.898 (1.063) Offline: 0.3421 (0.0117), Online: 40.9214 (2.4053) C − MPC, N = 5 0.676 (0.794) Offline: 0.3989 (0.0091), Online: 498.9214 (15.4921) C − MPC, N = 6 0.440 (0.487) Offline: 0.4011 (0.0154), Online: 7502.90075 (98.4104) Solving the MPC problem with more lookahead steps decreases the performance index (J0∗ (x0 )), i.e., the sub-optimality gap of the MPC controller decreases. However, since the size of the online MPC problem scales exponentially with the number of lookahead steps, we can see that the online computation time scales exponentially from about 4 seconds at N = 3 to over 7300 seconds at N = 6. Due to this drastic increase in computation complexity, we are only able to run 5 Monte Carlo trials for each case at N ∈ {4, 5, 6} for illustration. Note that the offline computation time is almost constant in all cases as the complexity of the offline problem is independent of the number of lookahead steps. Finally, using Theorem VIII.1 we obtain a lower bound value of 0.1276 for the optimal solution of problem OPT . The looseness in the sub-optimality gap may be attributed to neglecting stability and state/control constraint guarantees in the lower bound derivation. B. Comparison with [8] Define the following stochastic system " # " A1 = −0.8 1 0 0.8 , A2 = # −0.8 1 0 1.2 " , A3 = −0.8 1 0 −0.4 # , B1 = B2 = B3 = [0, 1]T , the initial state is x0 = [5, 5]> , and uncertainty wk is governed by an unknown probability mass function (different at each time step k), which belongs to the set of distributions  M = m = δ1 [0.5, 0.3, 0.2] + δ2 [0.1, 0.6, 0.3] + δ3 [0.2, 0.1, 0.7] : [δ1 , δ2 , δ3 ] ∈ B . 33 TABLE II: Comparison with [8]. Method Empirical Risk Cost Standard Deviation Mean (Variance) of Time per MPC Iteration Algorithm MPC 82.9913 78.0537 Offline: 0.1448 (0.0299), Online: 10.8312 (2.3914) MPC algorithm in [8] 90.3348 98.0748 Offline: 0.1309 (0.0099), Online: 13.5374 (4.0046) In this experiment we compare the performance of algorithm MPC with a risk-averse adaptation of the MPC algorithm in [8] (the problem formulation is given in Appendix A). Notably, the cost function and stability constraints in [8] which only use the expectation operator, are replaced with their risk-sensitive counterparts, i.e., a time-consistent Markov polytopic risk measure (the one-step dynamic coherent risk in this example is defined as a distributionally robust expectation operator over the set distributions M, i.e. ρ(Z) = maxm∈M Em [Z]). This was done to enable a fair comparison that is based solely on the structure of the overall solution algorithms and not on the objective or stability constraints. The cost matrices used in this test are Q = diag(1, 5) and R = 1. The state constraint matrix and threshold are given by Tx = I2×2 , xmax = 12, and the control constraint matrix and threshold are given by Tu = 1, umax = 2. While the MPC algorithm in [8] implemented scenario tree optimization techniques to reduce numerical complexity (to less than 20 nodes in their example), it is beyond the scope of this paper. For this reason, we choose N = 3 (giving 27 leaves in the scenario tree) to ensure that the above problems have similar online complexity. Table II shows the results from 100 Monte Carlo trials. Due to the additional complexity of the LMI conditions in algorithm MPC, the offline computation time for our algorithm is slightly longer. Nevertheless, the resulting policy yields a lower empirical risk and standard deviation, and has a shorter online computation time as compared with its counterpart in [8]. This is due, in part, to the fact that we do not rely upon a fixed quadratic robust Lyapunov function (see Appendix A for further details) to guarantee closed-loop stability as in [8] and instead leverage the MPC cost function (see Theorem VII.4). This allows us to formulate a less constrained solution algorithm and achieve superior performance, accentuating the advantages of a risk averse approach to MPC. C. Safety Brake in Adaptive Cruise Control Adaptive cruise control (ACC) [56], [57] extends the functionalities of conventional cruise control. In addition to tracking the reference velocity of the driver, ACC also enforces a separation 34 distance between the leading vehicle (the host) and the follower (the vehicle that is equipped with the ACC system) to improve passenger comfort and safety. This crucial safety feature prevents a car crash when the host stops abruptly due to unforeseeable hazards. In this experiment, we design a risk-sensitive controller for the ACC system that guarantees a safe separation distance between vehicles even when the host stops abruptly. As a prediction model for the MPC control problem, we define vk and ak to be the speed and the acceleration of the follower respectively, and vl,k , al,k as the velocity and acceleration of the leader. The acceleration ak is modeled as the integrator ak+1 = ak + Ts uk , where Ts is the sampling period, and the control input uk is the rate of change of acceleration (jerk) which is assumed to be constant over the sampling interval. The leader and follower velocities are given by vk+1 = vk + Ts ak , vl,k+1 = wk vl,k , where wk is the leader’s geometric deceleration rate. Since this rate captures the degree of abrupt stopping, its evolution has a stochastic nature. Here we assume wk belongs to the sample space W = {0.5, 0.7, 0.9} whose transition follows a uniform distribution. Furthermore, the distance dk between the leader and the follower evolves as dk+1 = dk + Ts (vl,k − vk ). In order to ensure safety, we also set the reference distance to be velocity dependent, which can be modeled as dref,k = δref + γref vk with δref = 4m and γref = 3s. Together, the system dynamics may be written as (2), where wk ∈ {1, 2, 3}, and xk := [dk − dref,k , vk , ak , vl,k ]. In order to guarantee comfort and safety, we assume the constraints |uk | ≤ 3ms−3 (bounded jerk), and |vk | ≤ 12ms−1 (bounded speed), and the state and control weighting matrices within the quadratic cost are Q = diag(Qd , Qv , 0, 0), R = Qu , where Qd , Qv , Qu are the weights on the separation distance tracking error, velocity, and jerk, respectively. To study the risk-averse behavior of the safety brake mechanism, we design a risk-sensitive MPC controller based on the dynamic risk compounded by the mean absolute semi-deviation with c = 1. For demonstrative purposes, the MPC lookahead step is simply set to one (N = 1). The performance of the risk sensitive ACC system is illustrated by the state trajectories in Figure 2 (for brevity we only show the distance trajectory dk ). It can be seen that the controller is able to stabilize 35 TABLE III: Statistics for Risk-Sensitive ACC System. Method Mean Cost Standard Deviation Mean (Variance) of Time per MPC Iteration c=1 451.3442 9.5854 Offline: 0.3944 (0.0036) , Online: 0.0727 (0.0054) c = 0 (Risk Neutral) 423.8701 12.7447 Offline: 0.4011 (0.0024) , Online: 0.0450 (0.0067) the stochastic error dk − dref,k (in the risk-sensitive sense) such that the speed of the follower vehicle gradually vanishes, and the separation distance dk between the two cars converges to the constant δref . Notice that besides error tracking, the dynamic mean semi-deviation risk sensitive objective function also regulates the variability of distance separation between the two vehicles, as shown in Figure 2 and Table III. Compared with the risk-neutral MPC approach (c = 0), this risk-sensitive ACC system results in a lower variance in separation distance, suggesting a more comfortable passenger experience. State Trajectory: Distances Magnitude 15 10 5 0 10 20 Time 30 Fig. 2: Separation distance dk trajectories of the Safety Brake in Risk Sensitive Adaptive Cruise Control. XI. C ONCLUSION AND F UTURE W ORK In this paper we presented a framework for risk-averse MPC by leveraging recent advances in the theory of dynamic risk metrics developed by the operations research community. The proposed approach has the following advantages: (1) it is axiomatically justified and leads to time-consistent risk assessments; (2) it is amenable to dynamic and convex programming; and (3) it is general, in that it captures a full range of risk assessments from risk-neutral to worst 36 case (due to the generality of Markov polytopic risk metrics). Our framework thus provides a unifying perspective on risk-sensitive MPC. We plan to extend our work to handle cases where the state and control constraints are required to hold only with a given probability threshold (in contrast to hard constraints) by exploiting techniques such as probabilistic invariance [58]. This relaxation has the potential to provide significantly improved performance at the risk of occasionally violating constraints. Second, we plan to combine our approach with methods for scenario tree optimization in order to reduce the online computation load. Third, while polytopic risk metrics encompass a wide range of possible risk assessments, extending our work to non-polytopic risks and more general stage-wise costs can broaden the domain of application of the approach. Finally, an important consideration from a practical standpoint is the choice of risk metric appropriate for a given application. We plan to develop principled approaches for making this choice, e.g., by computing polytopic risk envelopes based on confidence regions for the disturbance model. 37 A PPENDIX A A LTERNATIVE F ORMULATION OF P ROBLEM PE AND MPC In this section we present alternative formulations of problems PE and MPC inspired by the approach in [8]. The methodology here is to design (offline) an equivalent control invariant set Emax and a robust Lyapunov function such that ULRSES and constraint fulfillment are guaranteed using a local state feedback control law u(x) = F x. Let P = P >  0 and L = L>  0. Define V (xk ) = x> k P xk . If V (xk+1 ) − V (xk ) ≤ −x> k Lxk , surely, ∀k ∈ N, (36) then V (xk ) is a robust Lyapunov function for system (2). In the online problem, the inequality above is relaxed to its stochastic counterpart as shown in (8). We first formalize the offline optimization problem: Optimization Problem PE — Given an initial state x0 ∈ X, and a matrix L = L>  0, solve max W =W > 0,Y,γ>0 logdet(W ) −1 subject to x> x0 ≤ 1, 0W Y> Tu> Tu Y  W, u2max T > Tx (Aj W + Bj Y )> x2 (Aj W + Bj Y )  W, ∀j ∈ {1, . . . , L}, xmax   1/2 > > W (L W ) (A W + B Y ) j j     ∗   0, ∀j ∈ {1, . . . , L}. (37) γINx 0   ∗ 0 W Suppose problem PE above is feasible. Set P = γW −1 . The control invariant set is then defined   to be the intersection X∩Emax , where Emax := x ∈ RNx | x> W −1 x ≤ 1 = x ∈ RNx | x> P x ≤ γ . Note that X∩Emax is a robust control invariant set under the feasible local feedback control law u(x) = Y W −1 x. The constraint in (37) is an equivalent reformulation of the robust Lyapunov condition given in (36) where xk+1 = (A(w) + B(w)Y G−1 ) x. That is, the closed-loop dynamics are ULRSES with domain X∩Emax under the feedback control law u(x) = Y G−1 x. In an attempt to improve the stability properties of the system beyond what is achievable via this feedback control law, the online MPC problem is formalized as follows: 38 Optimization problem MPC — Given an initial state xk|k ∈ X∩Emax and a prediction horizon N ≥ 1, solve min πk|k ,...,πk+N −1|k J xk|k , πk|k , . . . , πk+N −1|k , P  subject to xk+h+1|k = A(wk+h )xk+h|k + B(wk+h )πk+h|k (xk+h|k ), πk+h|k (xk+h|k ) ∈ U, xk+h+1|k ∈ X, h ∈ {0, . . . , N − 1}, xk+1|k ∈ Emax (W ) surely, (38)  > ρk (Axk|k + Bπk|k )> P (Axk|k + Bπk|k ) − x> k P xk ≤ −xk|k Lxk|k . (39) Provided problem MPC is recursively feasible, ULRSES with domain X ∩ Emax is enforced automatically via (39) which leverages the risk-sensitive Lyapunov function x> k P xk , where P is the solution to the offline problem. Persistent feasibility however, is guaranteed by the constraint in (38). A few remarks are in order. First, notice that problem PE also includes an initial condition inclusion constraint x0 ∈ Emax . That is, the set Emax is re-designed for each initial condition in order to ensure the existence of a feasible risk-sensitively stabilizing control law, and thereby the feasibility of problem MPC. Second, constraint (38), necessary for ensuring recursive feasibility for problem MPC, is rather restrictive as compared with how the control invariant set Emax is used within our algorithm, i.e., as a terminal set constraint. When combined with the risk-sensitive stability constraint (39), necessary due to the reliance upon a fixed quadratic Lyapunov function, the resulting formulation yields worse performance (in terms of cost function optimality), and a smaller domain of feasibility. 39 A PPENDIX B P ROOF OF T HEOREM IX.1 AND C OROLLARY IX.2 We first present the Projection Lemma: Lemma B.1 (Projection Lemma). For matrices Ω(X), U (X), V (X) of appropriate dimensions, where X is a matrix variable, the following statements are equivalent: 1) There exists a matrix W such that Ω(X) + U (X)W V (X) + V (X)> W > U (X)> ≺ 0. 2) The following inequalities hold: U (X)⊥ Ω(X)(U (X)⊥ ))> ≺ 0, (V (X)> )⊥ Ω(X)((V (X)> )⊥ )> ≺ 0, where A⊥ is the orthogonal complement of A. Proof. See Chapter 2 in [50]. We now give the proof for Theorem IX.1 by leveraging the Projection lemma:  Proof. (Proof of Theorem IX.1) Using simple algebraic factorizations, ∀l ∈ {1, . . . , cardinality U poly,V (p) }, inequality (20) can be be rewritten as   >  I P 0 0 0 I  1     1 Σ 2 (A + BF )  0 −I   2 0 0 L×L ⊗ P  l   Σl (A + BF )      0.     0  F 0 −R 0 F      1 1 Q2 0 0 0 −I Q2 By Schur complement, the above expression is equivalent to      I 1 ⊗ Q 0 0 0 I 0 0 L×L 2    I 0 0 Σl (A + BF )   0 R−1 0 0  0 I 0      0 I 0   0,   F     0 0 I 0 0 0 I 1    1 0 0 I Q2 1 > 2 > 0 0 0 −Q (A + BF ) Σl F Q2 > where Q = P −1 . Now since Q = Q  0 and R = R>  0, we also have the following identity:      I ⊗ Q 0 0 0 I 0 0 L×L    I 0 0 0    0 R−1 0 0     0 I 0 0 I 0 0     0.  0 0 I    0 0 I 0    0 0 I 0 0 0 0 −Q 0 0 0 40 Next, notice that  ⊥ 1   1 −Σl2 (A + BF ) 2   (A + BF ) I 0 0 Σ l     −F     =  ,   0 I 0 F 1     2 −Q 1   2 0 0 I Q I  ⊥   0   I 0 0 0 0         = 0 I 0 0 . 0     0 0 I 0 I Now, set:     1 0 −Σl2 (A + BF )       0  0  −F      T , V =  . , U =  1  0  0  −Q 2      I 0 −Q I  IL×L ⊗ Q 0 0   0 R−1 0  Ω = −  0 0 I  0 0 0  Then by Lemma B.1, it is equivalent to find a matrix G that satisfies the following inequality  ∀l ∈ {1, . . . , cardinality U poly,V (p) }:      >   >  1 1 −Σl2 (A + BF ) −Σl2 (A + BF ) 0 0 IL×L ⊗ Q 0 0 0            0    0   −1 0 R 0 0 −F −F   >        G + G +           0.  1 1           2 2 0 0 0 0 I 0 −Q −Q           I I I I 0 0 0 −Q (40) 1 Setting F = Y G−1 and pre-and post-multiplying the above inequality by diag(I, R 2 , I, I) yields the LMI given in (29). Furthermore, from the inequality −Q + G + G>  0 where Q  0, we know that G + G>  0. Thus, by the Lyapunov stability theorem, the linear time-invariant system ẋ = −Gx with Lyapunov function x> x is asymptotically stable (i.e. all eigenvalues of G have positive real part). Therefore, G is an invertible matrix and F = Y G−1 is well defined. Proof. (Proof of Corollary IX.2) We will prove that the third inequality in (30) implies inequality (22). Details of the proofs on the implications of the first two inequalities in (30) follow from identical arguments and will be omitted for the sake of brevity. Using simple algebraic factorizations, inequality (22) may be rewritten (in strict form) as:  >   −1 I W 0 I       0, ∀j ∈ {1, . . . , L}. Aj + Bj F 0 −W −1 Aj + Bj F By Schur complement, the above expression is equivalent to    h i W 0 I    0, ∀j ∈ {1, . . . , L}. I Aj + Bj F  > 0 −W (Aj + Bj F ) 41 Furthermore since W  0, we also have the identity    h i W 0 I     0. I 0  0 −W 0 Now, notice that:  ⊥  ⊥ h i h i −(Aj + Bj F ) 0   = I Aj + Bj F ,   = I 0 . I I Then by Lemma B.1, it is equivalent to find a matrix G such that the following inequality holds ∀j ∈ {1, . . . , L}:  >      >   −(A + B F ) W 0 −(Aj + Bj F ) 0 0 j j   0.  +  G   +   G>  I 0 −W I I I (41) Note that Lemma B.1 provides an equivalence (necessary and sufficient) condition between (41) and (22) if G is allowed to be any arbitrary LMI variable. However, in order to restrict G to be the same variable as in Theorem IX.1, the equivalence relation reduces to sufficiency only. Setting F = Y G−1 in the above expression gives the claim. R EFERENCES [1] J. Qin and T. Badgwell, “A survey of industrial model predictive control technology,” Control Engineering Practice, vol. 11, no. 7, pp. 733–764, 2003. [2] Y. Wang and S. Boyd, “Fast model predictive control using online optimization,” IEEE Transactions on Control Systems Technology, vol. 18, no. 2, pp. 267–278, 2010. [3] M. V. Kothare, V. Balakrishnan, and M. Morari, “Robust constrained model predictive control using linear matrix inequalities,” Automatica, vol. 32, no. 10, pp. 1361–1379, 1996. [4] C. E. de Souza, “Robust stability and stabilization of uncertain discrete-time Markovian jump linear systems,” IEEE Transactions on Automatic Control, vol. 51, no. 5, pp. 836–841, 2006. [5] J. Löfberg, “Minimax approaches to robust model predictive control,” Ph.D. dissertation, Linköping University, 2003. [6] D. Q. Mayne, “Model predictive control: Recent developments and future promise,” Automatica, vol. 50, no. 12, pp. 2967–2986, 2014. [7] J. A. Primbs and C. H. Sung, “Stochastic receding horizon control of constrained linear systems with state and control multiplicative noise,” IEEE Transactions on Automatic Control, vol. 54, no. 2, pp. 221–230, 2009. [8] D. Bernardini and A. Bemporad, “Stabilizing model predictive control of stochastic constrained linear systems,” IEEE Transactions on Automatic Control, vol. 57, no. 6, pp. 1468–1480, 2012. [9] M. Cannon, B. Kouvaritakis, S. V. Rakovic, and Q. Cheng, “Stochastic tubes in model predictive control with probabilistic constraints,” IEEE Transactions on Automatic Control, vol. 56, no. 1, pp. 194–200, 2011. [10] J. Fleming, M. Cannon, and B. Kouvaritakis, “Stochastic tube MPC for LPV systems with probabilistic set inclusion conditions,” in Proc. IEEE Conf. on Decision and Control, 2014. 42 [11] D. Mayne, “Robust and stochastic model predictive control: Are we going in the right direction?” Annual Reviews in Control, vol. 41, pp. 184–192, 2016. [12] A. Mesbah, “Stochastic model predictive control: An overview and perspectives for future research,” IEEE Control Systems Magazine, vol. 36, no. 6, pp. 30–44, 2016. [13] S. Mannor and J. N. Tsitsiklis, “Mean-variance optimization in Markov decision processes,” in Int. Conf. on Machine Learning, 2011. [14] A. Sarlette, “Geometry and symmetries in coordination control,” Ph.D. dissertation, Université of Liège, Belgium, 2009. [15] B. Roorda, J. M. Schumacher, and J. Engwerda, “Coherent acceptability measures in multi-period models,” Mathematical Finance, vol. 15, no. 4, pp. 589–612, 2005. [16] A. Ruszczyński, “Risk-averse dynamic programming for Markov decision process,” Mathematical Programming, vol. 125, no. 2, pp. 235–261, 2010. [17] H. Markowitz, “Portfolio selection,” Journal of Finance, vol. 7, no. 1, pp. 77–91, 1952. [18] H. U. Gerber and G. Pafum, “Utility functions: From risk theory to finance,” North American Actuarial Journal, vol. 2, no. 3, pp. 74–91, 1998. [19] W. H. Fleming and S. J. Sheu, “Risk-sensitive control and an optimal investment model,” Mathematical Finance, vol. 10, no. 2, pp. 197–213, 2000. [20] R. Howard and J. Matheson, “Risk-sensitive Markov decision processes,” Management Science, vol. 8, no. 7, pp. 356–369, 1972. [21] O. Mihatsch and R. Neuneier, “Risk-sensitive reinforcement learning,” Machine Learning, vol. 49, no. 2, pp. 267–290, 2002. [22] N. Bäuerle and U. Rieder, “More risk-sensitive Markov decision processes,” Mathematics of Operations Research, vol. 39, no. 1, pp. 105–120, 2013. [23] P. Whittle, “Risk-sensitive linear/quadratic/gaussian control,” Advances in Applied Probability, vol. 13, no. 4, pp. 764–777, 1981. [24] K. Glover and J. C. Doyle, “Relations between H∞ and risk sensitive controllers,” in Analysis and Optimization of Systems. Springer-Verlag, 1987. [25] K. Detlefsen and G. Scandolo, “Conditional and dynamic convex risk measures,” Finance and Stochastics, vol. 9, no. 4, pp. 539–561, 2005. [26] R. C. Green and B. Hollifield, “When will mean-variance efficient portfolios be well diversified?” Journal of Finance, vol. 47, no. 5, pp. 1785–1809, 1992. [27] M. J. Best and R. R. Grauer, “On the sensitivity of mean-variance-efficient portfolios to changes in asset means: Some analytical and computational results,” The Review of Financial Studies, vol. 4, no. 2, pp. 315–342, 1991. [28] H. Föllmer and T. Knispel, “Entropic risk measures: Coherence vs convexity, model ambiguity and robust large deviations,” Stochastics and Dynamics, vol. 11, no. 02n03, pp. 333–351, 2011. [29] M. Rabin, “Risk aversion and expected-utility theory: A calibration theorem,” Econometrica, vol. 68, no. 5, pp. 1281–1292, 2000. [30] C. X. Wang, S. Webster, and N. C. Suresh, “Would a risk-averse newsvendor order less at a higher selling price?” European Journal of Operational Research, vol. 196, no. 2, pp. 544–553, 2009. [31] A. Ruszczyński and A. Shapiro, “Optimization of convex risk functions,” Mathematics of Operations Research, vol. 31, no. 3, pp. 433–452, 2006. [32] P. Artzner, F. Delbaen, J.-M. Eber, and D. Heath, “Coherent measures of risk,” Mathematical Finance, vol. 9, no. 3, pp. 203–228, 1999. 43 [33] Y. Chow and M. Pavone, “A framework for time-consistent, risk-averse model predictive control: Theory and algorithms,” in American Control Conference, 2014. [34] A. Shapiro, D. Dentcheva, and A. Ruszczyński, Lectures on stochastic programming: Modeling and theory, 2nd ed. SIAM, 2014. [35] P. Cheridito and M. Stadje, “Time-inconsistency of VaR and time-consistent alternatives,” Finance Research Letters, vol. 6, no. 1, pp. 40–46, 2009. [36] A. Shapiro, “Dynamic programming approach to adjustable robust optimization,” Operations Research Letters, vol. 39, no. 2, pp. 83–87, 2010. [37] D. A. Iancu, M. Petrik, and D. Subramanian, “Tight approximations of dynamic risk measures,” Mathematics of Operations Research, vol. 40, no. 3, pp. 655–682, 2015. [38] A. Eichhorn and W. Römisch, “Polyhedral risk measures in stochastic programming,” SIAM Journal on Optimization, vol. 16, no. 1, pp. 69–95, 2005. [39] W. Ogryczak and A. Ruszczyński, “From stochastic dominance to mean-risk models: Semi-deviations as risk measures,” European Journal of Operational Research, vol. 116, no. 1, pp. 33–50, 1999. [40] R. T. Rockafellar and S. Uryasev, “Optimization of conditional value-at-risk,” Journal of Risk, vol. 2, pp. 21–41, 2000. [41] D. Bertsimas and D. B. Brown, “Constructing uncertainty sets for robust linear optimization,” Operations Research, vol. 57, no. 6, pp. 1483–1495, 2009. [42] A. Ben-Tal and M. Teboulle, “An old-new concept of convex risk measure: The optimized certainty equivalent,” Mathematical Finance, vol. 17, no. 3, pp. 449–476, 2007. [43] L. B. Ryashko and H. Schurz, “Mean square stability analysis of some linear stochastic systems,” Dynamic Systems and Applications, vol. 6, no. 2, pp. 165–190, 1996. [44] C. W. Scherer, “Mixed H2 /H∞ control for time-varying and linear parametrically-varying systems,” Int. Journal of Robust and Nonlinear Control, vol. 6, no. 9-10, pp. 929–952, 1996. [45] M. Chilali and P. Gahinet, “H∞ design with pole placement constraints: an LMI approach,” IEEE Transactions on Automatic Control, vol. 41, no. 3, pp. 358–367, 1996. [46] V. A. Yakubovich, “The S-procedure in non-linear control theory,” Vestnik Leningrad University Math, vol. 4, pp. 73–93, 1977, In Russian, 1971. [47] J. Rawlings and D. Mayne, Model predictive control: Theory and design. Nob Hill Publishing, 2013. [48] B.-G. Park and W. H. Kwon, “Robust one-step receding horizon control of discrete-time markovian jump uncertain systems,” Automatica, vol. 38, no. 7, pp. 1229–1235, 2002. [49] O. Toker and H. Ozbay, “On the NP-hardness of solving bilinear matrix inequalities and simultaneous stabilization with static output feedback,” in American Control Conference, 1995. [50] R. E. Skelton, T. Iwasaki, and K. Grigoriadis, A Unified Algebraic Approach to Linear Control Design. CRC Press, 1997. [51] C. W. Scherer, “The general nonstrict algebraic Riccati inequality,” Linear Algebra and its Applications, vol. 19, pp. 1–33, 1995. [52] Y. Chow and M. Pavone, “A uniform-grid discretization algorithm for stochastic optimal control with risk constraints,” in Proc. IEEE Conf. on Decision and Control, 2013. [53] C.-S. Chow and J. N. Tsitsiklis, “An optimal one-way multigrid algorithm for discrete-time stochastic control,” IEEE Transactions on Automatic Control, vol. 36, no. 8, pp. 898–914, 1991. [54] M. Herceg, M. Kvasnica, C. N. Jones, and M. Morari, “Multi-parametric toolbox 3.0,” in European Control Conference, 2013. 44 [55] J. Löfberg, “YALMIP : A toolbox for modeling and optimization in MATLAB,” in IEEE Int. Symp. on Computer Aided Control Systems Design, 2004. [56] C.-Y. Liang and H. Peng, “Optimal adaptive cruise control with guaranteed string stability,” Vehicle System Dynamics, vol. 32, no. 4-5, pp. 313–330, 1999. [57] M. Bichi, G. Ripaccioli, S. Di Cairano, D. Bernardini, A. Bemporad, and I. V. Kolmanovsky, “Stochastic model predictive control with driver behavior learning for improved powertrain control,” in Proc. IEEE Conf. on Decision and Control, 2010. [58] M. Cannon, B. Kouvaritakis, and X. Wu, “Probabilistic constrained mpc for multiplicative and additive stochastic uncertainty,” IEEE Transactions on Automatic Control, vol. 54, no. 7, pp. 1626–1632, 2009. 45 Yin-Lam Chow received a B. Eng degree in Mechanical Engineering from the University of Hong Kong in 2009, a M.Sc. degree in Aerospace Engineering from Purdue University in 2011, and is currently a Ph.D. candidate at Stanford University in the Institute for Computational and Mathematical Engineering. His research interests include control theory, machine learning, sequential decision making and reinforcement learning. Sumeet Singh is a Ph.D. candidate at Stanford University in the Autonomous Systems Lab. He received a B. Eng. in Mechanical Engineering and a Diploma of Music (Performance) from the University of Melbourne in 2012, and a M.Sc. in Aeronautics and Astronautics from Stanford University in 2015. Prior to joining Stanford, Sumeet worked in the Berkeley Micromechanical Analysis and Design lab at University of California Berkeley in 2011, and the Aeromechanics Branch at NASA Ames in 2013. Sumeet’s current research interests include the design of stochastic and robust nonlinear MPC algorithms, with specific applications to spacecraft control. Anirudha Majumdar is currently a postdoctoral scholar at Stanford University in the Autonomous Systems Lab. He will be starting as an Assistant Professor at Princeton University in 2017. He completed his Ph.D. in the Electrical Engineering and Computer Science department at MIT. Majumdar received his undergraduate degree in Mechanical Engineering and Mathematics at the University of Pennsylvania, where he was a member of the GRASP lab. His research interests lie in controlling highly agile robotic systems such as UAVs with formal safety guarantees. Majumdar’s research has been recognized with the Siebel Foundation Scholarship and the Best Conference Paper Award at the International Conference on Robotics and Automation (ICRA) 2013. Marco Pavone is an Assistant Professor of Aeronautics and Astronautics at Stanford University, where he is the Director of the Autonomous Systems Laboratory. Before joining Stanford, he was a Research Technologist within the Robotics Section at the NASA Jet Propulsion Laboratory. He received a Ph.D. degree in Aeronautics and Astronautics from the Massachusetts Institute of Technology in 2010. Dr. Pavone’s areas of expertise lie in the fields of controls and robotics. His main research interests are in the development of methodologies for the analysis, design, and control of autonomous systems, with an emphasis on autonomous aerospace vehicles and large-scale robotic networks. He is a recipient of a PECASE Award, an ONR YIP Award, an NSF CAREER Award, a NASA Early Career Faculty Award, a Hellman Faculty Scholar Award, and was named NASA NIAC Fellow in 2011. He is currently serving as an Associate Editor for the IEEE Control Systems Magazine. 46
3cs.SY
OPERATIONS ON CATEGORIES OF MODULES ARE GIVEN BY SCHUR FUNCTORS arXiv:1610.02180v2 [math.CT] 19 May 2017 MARTIN BRANDENBURG Abstract. Let k be a commutative Q-algebra. We study families of functors between categories of finitely generated R-modules which are defined for all commutative kalgebras R simultaneously and are compatible with base changes. These operations turn out to be Schur functors associated to k-linear representations of symmetric groups. This result is closely related to Macdonald’s classification of polynomial functors. 1. Introduction Let k be a commutative ring. We would like to understand functors between categories of finitely generated modules FR : Modfg (R) → Modfg (R) which are defined for all commutative k-algebras R simultaneously and behave well with respect to base changes. This means that there are isomorphisms of S-modules FR (M ) ⊗R S −∼ → FS (M ⊗R S) for k-homomorphisms R → S and finitely generated R-modules M , which are coherent in a suitable sense; see Definition 2.1 for details. We will call them operations over k. Typical examples include the n-th tensor power M 7→ M ⊗n , the n-th symmetric power M 7→ Symn (M ) and the n-th exterior power M 7→ Λn (M ). More generally, if Vn is any finitely generated right k[Σn ]-module, then M 7→ Vn ⊗k[Σn ] M ⊗n is an operation; here the symmetric group Σn acts from the left on M ⊗n by permuting the tensor factors. Under finiteness conditions any direct sum of such operations is again an operation. We will call them Schur operations, because if k is a field and the k-algebra R is fixed, or even R = k, these functors are called Schur functors in representation theory [14, Section 6.1] and operad theory [21, Section 5.1]. In Joyal’s theory of linear species [19, Chapitre 4] they are called analytic functors. Our main result states that, under suitable assumptions on k, every operation is a Schur operation. Theorem. Let k be a commutative Q-algebra. Then every operation Modfg → Modfg over k is isomorphic to a Schur operation M M 7→ Vn ⊗k[Σn ] M ⊗n n≥0 for some sequence of finitely generated right k[Σn ]-modules Vn . A similar classification holds for operations Modfp → Modfp between categories of finitely presented modules. See Theorem 5.12 for a description of those sequences (Vn ) which are allowed here. For example, finite sequences are allowed. Examples 2.4, 2.5 and 2.6 show why the theorem fails in characteristic p > 0. 2 MARTIN BRANDENBURG A similar result was obtained by Macdonald [24] (see also [23, Appendix A in Chapter I]) who considered polynomial functors between categories of finitely generated modules over a fixed commutative Q-algebra R, and gave a full classification for polynomial functors on finitely generated projective modules. A similar classification therefore also holds for strict polynomial functors [7, 15, 20, 28] over a commutative Q-algebra k, which may be identified with operations Modfg,proj → Modfg,proj over k between categories of finitely generated projective modules. The classification in terms of Schur operations does not work for k = Z, but in this case one can at least calculate the K0 -ring of the category of strict polynomial functors [18, Theorem 8.5]. We will adapt several techniques by Macdonald to our situation in order to reduce the classification from arbitrary operations first to homogeneous and later to multilinear operations; the latter are functors Modfg (R)n → Modfg (R) which are R-linear in each variable, are defined for all commutative k-algebras R simultaneously and behave well with respect to base changes. Their classification is quite simple. Theorem. Let k be a commutative ring and n ∈ N. Then every multilinear operation Modnfg → Modfg over k is isomorphic to the operation (M1 , . . . , Mn ) 7→ V ⊗k (M1 ⊗R . . . ⊗R Mn ), where V is some finitely generated k-module. Although our proof uses finiteness assumptions in a crucial way, we conjecture that multilinear operations Modn → Mod have the same classification. For this it suffices to consider the case n = 1, i.e. linear operations. The classification of all operations Mod → Mod would be a consequence. The mentioned description of operations is actually the “essential surjectivity” part of the following equivalence of categories, which is our main result; here “bounded” refers to a certain finiteness condition introduced in Section 4. Theorem. Let k be a commutative Q-algebra. Then the category of bounded operations Modfg → Modfg over k is equivalent to the category of finite sequences (Vn )n∈N of finitely generated right k[Σn ]-modules. A similar classification is true for bounded operations Modfp → Modfp . See Theorem 5.12 for a description of the category of all operations Modfg → Modfg , and see Remark 5.11 for a description of operations Modnfg`→ Modfg with n arguments. Our result may be interpreted as follows: Let P = n≥0 Σn be the permutation groupoid. Then the category of bounded operations Modfp → Modfp over k is equivalent b fp of finitely presented functors Pop → Modfp (k). This is actually an to the category P k b fp is equipped equivalence of k-linear tensor (i.e. symmetric monoidal) categories, when P k with Day convolution. Since the permutation groupoid P is the tensor category freely b fp is the finitely cocomplete k-linear tensor generated by a single object, it follows that P k category freely generated by an object X [3, Remark 5.1.14]; for this reason we denote it by Modfp (k)[X]. It follows rather formally from the 2-categorical Yoneda Lemma that the category of operations which are defined on all finitely cocomplete k-linear tensor categories simultaneously and behave well with respect to base changes is equivalent to Modfp (k)[X] (cf. [8]). In this respect, our result says that, if k is a Q-algebra, bounded operations on finitely presented modules over commutative k-algebras are “universal enough” to be defined on arbitrary finitely cocomplete k-linear tensor categories. This OPERATIONS ON CATEGORIES OF MODULES 3 is quite surprising. It is also quite interesting that the study of operations on modules is equivalent to the study of representations of symmetric groups. The author’s motivation to study operations on modules originates from the contravariant equivalence of 2-categories between tensorial stacks and stacky tensor categories (cf. [3, Section 3.4] and [6, Section 3.5]). It has the following finitely presented analogue (which has the advantage that some set-theoretic issues disappear): To every stack X over a commutative ring k, which we allow to be fibered in categories and also be possibly non-algebraic, we may associate the finitely cocomplete k-linear tensor category Qcohfp (X ) of quasi-coherent modules of finite presentation. These are precisely the operations X → Modfp over k. Conversely, to every finitely cocomplete k-linear tensor category C we may associate the stack Specfp (C) over k which maps a commutative k-algebra R to the category Specfp (C)(R) := Homf c⊗/k (C, Modfp (R)) of finitely cocontinuous k-linear tensor functors from C into Modfp (R). This defines a 2-adjunction Qcohfp {stacks over k} ⊥ Specfp  op finitely cocomplete k. linear tensor categories We call a stack X over k fp-tensorial if the canonical morphism X → Specfp (Qcohfp (X )) is an equivalence, and a finitely cocomplete k-linear tensor category C is called fp-stacky if the canonical morphism C → Qcohfp (Specfp (C)) is an equivalence. Thus, there is a contravariant equivalence of 2-categories between fp-tensorial stacks over k and fpstacky finitely cocomplete k-linear tensor categories. Tensorial schemes and stacks have been investigated in [3, 6, 17]. It is natural to ask if the tensor category Modfp (k)[X], the “polynomial 2-ring in one variable over k” (cf. [9]), is fp-stacky. Its universal property implies Specfp (Modfp [X]) ' Modfp . Therefore, Qcohfp (Specfp (Modfp (k)[X])) identifies with the category of operations Modfp → Modfp over k. The canonical tensor functor from Modfp (k)[X] associates to every finite sequence of finitely presented k[Σn ]-modules Vn the corresponding Schur operation M Vn ⊗k[Σn ] M ⊗n . M 7→ n∈N Therefore, our result says that, if k is a Q-algebra, this functor is fully faithful and that its essential image consists of Lbounded operations. In particular, Modfp (k)[X] is not fp-stacky, since for example n∈N Λn is an operation on Modfp which is not bounded. We may say that Modfp (k)[X] is approximately fp-stacky. These issues might disappear in the setting of arbitrary, not necessarily finitely presented, modules. However, we could not prove the classification of linear operab k is stacky (from tions in this generality so far. We conjecture that Mod(k)[X] = P which it would follow that the stack Mod is tensorial), i.e., that it is equivalent to the category of operations Mod → Mod over k via Schur operations. More generally, Mod(k)[X1 , . . . , Xn ] should be stacky and hence be equivalent to the category of operations Modn → Mod over k. Another interesting problem is to describe the category of operations CAlg → Mod from commutative algebras to modules. Every functor V : FinSetop → Mod(k), i.e. augmented symmetric simplicial k-module, induces such an operation via the coend Z X∈FinSet A 7→ V (X) ⊗k A⊗X . 4 MARTIN BRANDENBURG We may ask if this defines an equivalence [FinSetop , Mod(k)] −∼ → [CAlg, Mod]. Since op [FinSet , Mod(k)] is the cocomplete k-linear tensor category freely generated by a commutative algebra object [16], this question asks if [FinSetop , Mod(k)] is stacky. Organization of the paper The paper is organized as follows: In Section 2 we give the basic definitions concerning operations. In Section 3 we classify linear and multilinear operations. In Section 4 we show that every operation decomposes uniquely into homogeneous operations. In Section 5 we discuss the linearization of a homogeneous operation and use it to prove our main theorems. In Section 6 we give a constructive proof of the classification of linear operations. Acknowledgements I am very grateful to Alexandru Chirvasitu, who made major contributions to this paper in its early stages, particularly to Section 4. I also would like to thank Ingo Blechschmidt for sharing his beautiful constructive proofs appearing in Section 6, Oskar Braun for his careful proofreading of the preprint, Bernhard Köck for drawing my attention to [18], as well as Antoine Touzé and Ivo Dell’Ambrogio for helpful discussions on the subject at the University of Lille. Finally I would like to thank the anonymous referee for making several suggestions for improvement. 2. Operations If R is a ring, we will denote by Mod(R) the category of right R-modules. The full subcategories of finitely generated resp. finitely presented right R-modules are denoted by Modfg (R) resp. Modfp (R). As usually, when R is commutative, we will not always distinguish between left and right modules. Definition 2.1. Let k be a commutative ring. An operation Mod → Mod over k is a family of functors FR : Mod(R) → Mod(R), defined for every commutative k-algebra R, equipped with isomorphisms of S-modules θf (M ) : FR (M ) ⊗R S −∼ → FS (M ⊗R S), for each k-homomorphism f : R → S, natural in M ∈ Mod(R), such that the following two coherence conditions are satisfied: the diagram θidR (M ) FR (M ) ⊗R R ∼ = FR (M ⊗R R) ∼ = FR (M ) commutes, and for all k-homomorphisms f : R → S, g : S → T the diagram (FR (M ) ⊗R S) ⊗S T θf (M )⊗S T FS (M ⊗R S) ⊗S T ∼ = FR (M ) ⊗R T commutes. θg (M ⊗R S) FT ((M ⊗R S) ⊗S T ) ∼ = θg◦f (M ) FT (M ⊗R T ) OPERATIONS ON CATEGORIES OF MODULES 5 A morphism of operations (F, θ) → (F 0 , θ0 ) is defined as a family of morphisms of functors αR : FR → FR0 , defined for every commutative k-algebra R, such that for all k-homomorphisms f : R → S and all R-modules M the diagram FR (M ) ⊗R S θf (M ) αS (M ⊗R S) αR (M )⊗S FR0 (M ) ⊗R S FS (M ⊗R S) θf0 (M ) FS0 (M ⊗R S) commutes. Usually we will suppress the isomorphisms θf from the notation. Operations of the form Modfg → Modfg and Modfp → Modfp over k are defined in a similar way. For fixed n ∈ N, operations with n arguments F : Modn → Mod are defined in a similar way, including the variants with Modfg and Modfp . Here, we require natural isomorphisms FR (M1 , . . . , Mn ) ⊗R S −∼ → FS (M1 ⊗R S, . . . , Mn ⊗R S). Example 2.2. Let n ∈ N. The most basic example of an operation is the family of functors M 7→ M ⊗R n := M ⊗R · · · ⊗R M, equipped with the canonical isomorphisms M ⊗R n ⊗R S −∼ → (M ⊗R S)⊗S n , mapping (m1 ⊗· · ·⊗mn )⊗s to (m1 ⊗1)⊗· · ·⊗(mn ⊗1)·s. For n = 0 this is the constant operation M 7→ R, and for n = 1 the identity operation M 7→ M . The most basic example of an operation with two arguments is the tensor product (M, N ) 7→ M ⊗R N equipped with the canonical isomorphisms (M ⊗R N ) ⊗R S −∼ → (M ⊗R S) ⊗S (N ⊗R S). Example 2.3. If I is any set, then the direct sum M 7→ M ⊕I defines an operation over k, but the direct product M 7→ M I does not unless k is the zero ring or I is finite. The next three examples illustrate why our classification result requires that k is a commutative Q-algebra. Example 2.4. If k is any commutative ring, then the second exterior power M 7→ Λ2 (M ) = M ⊗2 /hm ⊗ m : m ∈ M i defines an operation over k. If 2 is invertible in k, then we have Λ2 (M ) = M ⊗2 /hm ⊗ n + n ⊗ m : m, n ∈ M i ∼ = V ⊗k[Σ2 ] M ⊗2 , where V denotes the alternating representation of Σ2 of rank 1. However, when k is a field of characteristic 2, we cannot find a representation V of Σ2 such that there is an isomorphism of operations Λ2 (M ) ∼ = V ⊗k[Σ2 ] M ⊗2 . This also reflects the observation that we cannot define Λ2 in arbitrary finitely cocomplete symmetric monoidal k-linear categories unless 2 is invertible in k [3, Remark 4.4.7]. Example 2.5. If k is any commutative ring, then the divided power algebra [27, Chapitre III] M 7→ Γ(M ) as well as its homogeneous parts M 7→ Γd (M ) provide operations over k; the base change isomorphisms are constructed in [27, Théorème III.3]. If k is a commutative Q-algebra, then there is an isomorphism of operations Γd ∼ = Symd , but this is false if k is a field of characteristic p > 0. 6 MARTIN BRANDENBURG Example 2.6. Assume that k is a commutative Fp -algebra. Then we can define an operation over k by mapping an R-module M to M ⊗R,ϕR R, where ϕR : R → R is the Frobenius homomorphism. For a fixed k-algebra R this is usually called the Frobenius twist [15, Section 1]. The base change isomorphisms for f : R → S are given by (M ⊗R,ϕR R) ⊗R S −∼ → M ⊗R,f ◦ϕR S = M ⊗R,ϕS ◦f S −∼ → (M ⊗R S) ⊗S,ϕS S. Remark 2.7. If F : Mod → Mod is an operation over k and R is a commutative k-algebra, then we have FR (R) ∼ = FR (k ⊗k R) ∼ = Fk (k) ⊗k R. If f ∈ R and M is some R-module, then we have  FR (M )[f −1 ] ∼ = FR[f −1 ] M [f −1 ] . If G is a commutative monoid, then we use the notation M [G] := M ⊗R R[G], and we have  FR (M )[G] ∼ = FR[G] M [G] . For the special case G = Nd this becomes  FR (M )[T1 , . . . , Td ] ∼ = FR[T1 ,...,Td ] M [T1 , . . . , Td ] . Remark 2.8. We may rephrase the definition of an operation using 2-categorical language [5] as follows. There is a pseudofunctor Mod : CAlg(k) → CAT which associates to every commutative k-algebra R its category of R-modules Mod(R) and to every k-homomorphism R → S the base change functor  ⊗R S equipped with the usual coherence isomorphisms;  denotes a placeholder. Here, CAT denotes the “2-category” of categories; one may use universes in order to make this precise. Then an operation Mod → Mod is just a pseudonatural transformation Mod → Mod, and a morphism of operations is just a modification between them. A similar statement holds for operations Modn → Mod and the variants Modfg and Modfp . Remark 2.9. In algebraic geometry, pseudonatural transformations X → Mod are sometimes called quasi-coherent modules on X , especially when X is a stack (say, in the étale topology on the category of affine k-schemes). If the target is Modfg or Modfp , these quasi-coherent modules are called of finite type resp. of finite presentation. The pseudofunctors Mod, Modfg and Modfp are stacks by descent theory [29], and operations on them are just quasi-coherent modules (of finite type, resp. of finite presentation) on themselves. Remark 2.10. Up to size issues, there is a “category” of operations over k, which we will denote by [Mod, Mod]. As with every category of quasi-coherent modules, this is actually a small-cocomplete symmetric monoidal k-linear category (which includes, by definition, that ⊗ is cocontinuous and k-linear in each variable). Colimits and tensor products are computed pointwise:  (colimi Fi )R (M ) = colimi (Fi )R (M ) , 1R (M ) = R, (F ⊗ G)R (M ) = FR (M ) ⊗ FR (M ). OPERATIONS ON CATEGORIES OF MODULES 7 Operations have an additional structure, given by composition: (F ◦ G)R (M ) = FR (GR (M )). This defines another monoidal structure on [Mod, Mod], which is however not symmetric and not cocomplete. We remark that the corresponding monoidal structure on the category of linear species [Pop , Mod(k)] is the substitution product [19, Chapitre 4]. The “category” [Modn , Mod] of operations Modn → Mod is also a small-cocomplete symmetric monoidal k-linear category, but it has no composition when n > 1. The “categories” [Modnfg , Modfg ] and [Modnfp , Modfp ] are defined similarly. Remark 2.11. If is not clear a priori if [Mod, Mod] is small-complete, and if so how the limits are computed. It is even less clear if [Mod, Mod] is an abelian category. Remark 2.12. If Modfg,proj : CAlg(k) → CAT denotes the pseudofunctor of finitely generated projective modules, there is a restriction functor [Modfg , Modfg ] → [Modfg,proj , Modfg ]. It has no a priori reason to be fully faithful, let alone to be an equivalence. The category of strict polynomial functors by Friedlander and Suslin may be identified with [Modfg,proj , Modfg,proj ] by using [7, Proposition 2.5]. Some authors [20, 28] allow the codomain to be Mod, but the domain in the theory of strict polynomial functors has always been Modfg,proj . One can use [2, Theorem 2.14] to define an extension functor [Modproj , Mod] → [Mod, Mod], which again has no a priori reason to be an equivalence. Therefore the category of operations is a priori just a variant of the category of strict polynomial functors, and a description of one category does not directly imply a description of the other one. There is another difference between operations and strict polynomial functors. Remark 2.13. The components FR : Mod(R) → Mod(R) of an operation F admit an enrichment in the cartesian monoidal category of functors [CAlg(R), Set] as follows: We may view Mod(R) as a category enriched in [CAlg(R), Set] by defining, for every pair of R-modules (M, N ), the functor HomR (M, N ) : CAlg(R) → Set on objects S by HomR (M, N )(S) := HomS (M ⊗R S, N ⊗R S). The map of sets FR : HomR (M, N ) → HomR (FR (M ), FR (N )) extends to a natural transformation HomR (M, N ) → HomR (FR (M ), FR (N )) via mapping an S-linear map f : M ⊗R S → N ⊗R S to the S-linear map FS (f ) FR (M ) ⊗R S −∼ → FS (M ⊗R S) −−−→ FS (N ⊗R S) −∼ → FR (N ) ⊗R S. This extra structure of FR will be very useful in Section 4. It is similar, but not identical to the enrichment in the definition of a strict polynomial functor [28]: Here one requires maps of sets HomR (M, N ) ⊗R S → HomR (FR (M ), FR (N )) ⊗R S which are natural in S, i.e. that HomR (M, N ) → HomR (FR (M ), FR (N )) is a polynomial rule (“lois polynomes”) in the sense of Roby [27]. The canonical map HomR (M, N ) ⊗R S → HomS (M ⊗R S, N ⊗R S) is bijective if M is finitely generated projective, but in general it is neither injective nor surjective. 8 MARTIN BRANDENBURG 3. Linear and multilinear operations Linear and multilinear operations provide a basic class of operations which we are going to classify first. Definition 3.1. Let k be a commutative ring. An operation F : Modfg → Modfg over k is called linear if for every commutative k-algebra R the functor FR : Modfg (R) → Modfg (R) is R-linear. This defines a full subcategory [Modfg , Modfg ]1 ⊆ [Modfg , Modfg ]. It contains the identity operation and is closed under composition, therefore may be regarded as a monoidal k-linear category. The category [Modfp , Modfp ]1 is defined in a similar way. Example 3.2. Let V be some finitely generated k-module. Then M 7→ V ⊗k M becomes a linear operation using the natural isomorphisms (V ⊗k M ) ⊗R S −∼ → V ⊗k (M ⊗R S) for k-homomorphisms R → S. In fact, this construction induces a k-linear functor Modfg (k) → [Modfg , Modfg ]1 , V 7→ V ⊗k . We may equip this functor with the structure of a monoidal functor by using the natural isomorphisms k ⊗k  −∼ →  and (V ⊗k W ) ⊗k  −∼ → V ⊗k (W ⊗k ). Theorem 3.3. The monoidal functor constructed above yields an equivalence of monoidal k-linear categories Modfg (k) ' [Modfg , Modfg ]1 . The same construction yields Modfp (k) ' [Modfp , Modfp ]1 . Proof. We construct an explicit pseudo-inverse functor. Let F : Modfg → Modfg be a linear operation over k. We associate to it the finitely generated k-module V := Fk (k). If M is some finitely generated R-module, then there is a natural R-linear map M −∼ → HomR (R, M ) −→ HomR (FR (R), FR (M )) −∼ → HomR (V ⊗k R, FR (M )) −∼ → Homk (V, FR (M )|k ), which corresponds to a natural R-linear map αR (M ) : V ⊗k M → FR (M ). This is, in fact, a morphism of linear operations α : V ⊗k  → F , as can be checked from the coherence condition in Definition 2.1 applied to k → R → S. We have to show that it is an isomorphism. By Remark 2.7, it is an isomorphism when M = R. Since linear operations are additive, it is also an isomorphism when M is a finitely generated free R-module. We first show that αR (M ) is an epimorphism for every R-module M . By taking the cokernel of α, which is a linear operation again, it suffices to prove the following: If G is a linear operation which vanishes on finitely generated free modules, then G = 0. Take any finitely generated R-module M . If p is any prime ideal of R, we have GQ(R/ p) (M ⊗R Q(R/ p)) = 0 OPERATIONS ON CATEGORIES OF MODULES 9 since Q(R/ p) is a field and therefore M ⊗R Q(R/ p) is free. It follows that 0 = GR (M ) ⊗R Q(R/ p) ∼ = GR (M )p / p GR (M )p . Nakayama’s Lemma implies GR (M )p = 0. Since p was arbitrary, this shows GR (M ) = 0. It remains to prove that αR (M ) : V ⊗k M → FR (M ) is injective. If this happens to be the case, let us call M good. Since linear functors are additive, direct summands of good modules are good. Since M is a direct summand of M ⊕ R, which has the structure of a commutative R-algebra in which M squares to zero, we may assume that M is the underlying R-module of a commutative R-algebra S. More generally, we assume that M = N |R is the underlying R-module of some good S-module N , where S is a commutative R-algebra. Consider the following commutative diagram: V ⊗k M unit α ((V ⊗k M ) ⊗R S)|R ∼ α FR (M ) unit counit (V ⊗k (M ⊗R S))|R (V ⊗k N )|R α (FR (M ) ⊗R S)|R ∼ FS (M ⊗R S)|R α counit FS (N )|R Here unit and counit refer to the adjunction between extending and restricting scalars. The composition V ⊗k M → (V ⊗k N )|R is the identity, and α : (V ⊗k N )|R → FS (N )|R is an isomorphism since N is a good S-module. Hence, the diagram implies that α : V ⊗k M → FR (M ) is a split monomorphism. Therefore, M is a good R-module.  Remark 3.4. The usage of Nakayama’s Lemma in the proof above is the only reason why we have restricted ourselves to finitely generated modules. Remark 3.5. One might wonder if there is a constructive proof of Theorem 3.3, which does neither use the existence of prime ideals nor the law of the excluded middle. This is indeed possible and will be shown in Section 6. Definition 3.6. Let k be a commutative ring and n ∈ N. An operation with n arguments F : Modnfg → Modfg will be called multilinear if it is linear in each variable. This means that for every index 1 ≤ i ≤ n and every family of finitely generated R-modules M1 , . . . , Mi−1 , Mi+1 , . . . , Mn the functor FR (M1 , . . . , Mi−1 , , Mi+1 , . . . , Mn ) : Modfg (R) → Modfg (R) is R-linear. This defines a full subcategory [Modnfg , Modfg ]1,...,1 ⊆ [Modnfg , Modfg ]. For n = 1 we recover [Modfg , Modfg ]1 . Example 3.7. Let V be some finitely generated k-module. Then Modfg (R)n → Modfg (R), (M1 , . . . , Mn ) 7→ V ⊗k (M1 ⊗R · · · ⊗R Mn ) becomes a multilinear operation using the natural isomorphisms (V ⊗k (M1 ⊗R · · · ⊗R Mn )) ⊗R S −∼ → V ⊗k ((M1 ⊗R S) ⊗S · · · ⊗S (M1 ⊗R S)). In fact, this induces a functor Modfg (k) → [Modnfg , Modfg ]1,...,1 . Theorem 3.8. The functor constructed above yields an equivalence of categories Modfg (k) ' [Modnfg , Modfg ]1,...,1 . 10 MARTIN BRANDENBURG The same construction yields Modfp (k) ' [Modnfp , Modfp ]1,...,1 . Proof. As in Theorem 3.3, we construct a pseudo-inverse functor by mapping a multilinear operation F : Modnfg → Modfg to the finitely generated k-module V := Fk (k, . . . , k), and the natural R-linear maps M1 ⊗R · · · ⊗R Mn −∼ → HomR (R, M1 ) ⊗R · · · ⊗R HomR (R, Mn )  − → HomR FR (R, . . . , R), FR (M1 , . . . , Mn ) −∼ → Homk (V, FR (M1 , . . . , Mn )|k induce a morphism of multilinear operations V ⊗k (M1 ⊗R · · · ⊗R Mn ) → FR (M1 , . . . , Mn ). It suffices to prove that it is an isomorphism. We will argue by induction on n, the case n = 0 being trivial. Now let us assume n ≥ 1 and that the theorem is true for n − 1. Let us fix some commutative k-algebra R and some R-module M1 . Then we may define a multilinear operation Modn−1 → Modfg over R by fg (M2 , . . . , Mn ) 7→ FS (M1 ⊗R S, M2 , . . . , Mn ) for S-modules M2 , . . . , Mn , where S is a commutative R-algebra. By induction hypothesis, the canonical homomorphism FR (M1 , R, . . . , R) ⊗R (M2 ⊗S · · · ⊗S Mn ) → FS (M1 ⊗R S, M2 , . . . , Mn ) is an isomorphism. We will only need this for S = R. Varying R and M1 , we observe that M1 7→ FR (M1 , R, . . . , R) defines a linear operation over k. Thus, by Theorem 3.3, the canonical homomorphism V ⊗k M1 → FR (M1 , R, . . . , R) is an isomorphism. We finish the proof by composing this isomorphism with the previous one.  Remark 3.9. We have shown rather indirectly that multilinear operations are right exact in each variable, and we have found a characterization of tensor products which does not involve right exactness in any way, but rather base change. Notice that the Eilenberg-Watts Theorem [11] would immediately imply the classification of linear operations Mod → Mod (resp. Modfp → Modfp ) if we already knew that they consisted of cocontinuous (resp. right exact) functors. 4. Homogeneous operations In this section we will show that every operation Mod → Mod over a commutative ring k decomposes uniquely into homogeneous operations. This is analogous to the homogeneous decomposition of strict polynomial functors [15, §2]. Lemma 4.1. Let R be a commutative k-algebra and let A be a commutative R-bialgebra. Consider the category of comodules CoMod(A) with its forgetful functor to Mod(R). If F : Mod → Mod is an operation over k, then the functor FR : Mod(R) → Mod(R) lifts OPERATIONS ON CATEGORIES OF MODULES 11 to a functor CoMod(A) → CoMod(A). CoMod(A) CoMod(A) FR Mod(R) Mod(R) Proof. Let M be an R-module equipped with an A-coaction h : M → M ⊗R A. This coaction corresponds 1:1 to a family of monoid homomorphisms αB : HomCAlg(R) (A, B) → EndMod(B) (M ⊗R B) for commutative R-algebras B which are natural in B [10, II, §2, no 2]. The monoid structure on HomCAlg(R) (A, B) is induced by the commutative bialgebra structure of A. Specifically, αB (f ) is defined from h by M ⊗f ⊗B h⊗B M ⊗µ B M ⊗R B −−−→ M ⊗R A ⊗R B −−−−−→ M ⊗R B ⊗R B −−−−→ M ⊗R B. Conversely, a family (αB )B∈CAlg(R) is mapped to the coaction αA (idA ) η A M −−→ M ⊗R A −−−−→ M ⊗R A. Using this description of comodule structures, we obtain an A-coaction on FR (M ) using the natural monoid homomorphisms (cf. Remark 2.13) EndMod(B) (M ⊗R B) → EndMod(B) (FB (M ⊗R B)) −∼ → EndMod(B) (FR (M ) ⊗R B). Specifically, the R-linear coaction M → M ⊗R A corresponds to some A-linear map M ⊗R A → M ⊗R A, which induces an A-linear map FR (M ) ⊗R A → FR (M ) ⊗R A (using the identification FR (M ) ⊗R A ∼ = FA (M ⊗R A)), which corresponds to some Rlinear map FR (M ) → FR (M ) ⊗R A, the A-coaction on FR (M ). If another A-comodule h0 : M 0 → M 0 ⊗R A is given, one easily checks that for every homomorphism M → M 0 of A-comodules the induced homomorphism FR (M ) → FR (M 0 ) is also a homomorphism of A-comodules.  Definition 4.2. If G is a commutative Lmonoid, let us denote by grG Mod(R) the category of G-graded R-modules. If M = g∈G Mg is a graded R-module and R → S is a L k-homomorphism, we endow M ⊗R S with the grading M ⊗R S = g∈G Mg ⊗R S. This defines a pseudofunctor grG Mod : CAlg(k) → CAT together with a forgetful operation grG Mod → Mod. Corollary 4.3. Let G be a commutative monoid. Every operation Mod → Mod lifts, along the forgetful operation grG Mod → Mod, to an operation grG Mod → grG Mod. grG Mod Mod grG Mod F Mod Proof. This follows from Lemma 4.1 because grG Mod(R) is isomorphic to the category of R[G]-comodules [10, II, §2, 2.5] when the monoid algebra R[G] is equipped L with the counit g 7→ 1 and the comultiplication g 7→ g ⊗ g. Specifically, if M = g∈G Mg is G-graded, the corresponding coaction is the R-linear map P P M → M [G], g∈G mg 7→ g∈G mg · g. 12 MARTIN BRANDENBURG By adjunction this corresponds to an R[G]-linear map M [G] → M [G], which induces an R[G]-linear map FR (M )[G] → FR (M )[G]. The homogeneous component FR (M )g ⊆ FR (M ) of degree g ∈ G is the submodule consisting of those elements u ∈ FR (M ) such that u · 1 ∈ FR (M )[G] gets mapped to u · g ∈ FR (M )[G]. If R → S is a k-homomorphism, one has to check that the isomorphism θ : FR (M ) ⊗R S → FS (M ⊗R S) preserves the gradings. This follows from the coherence conditions in Definition 2.1 applied to R → R[G] → S[G] and R → S → S[G].  Definition 4.4. Let F : Mod → Mod be an operation. By Corollary 4.3, F lifts to an operation grN Mod → grN Mod. There is a canonical operation Mod → grN Mod which equips every module with the trivial grading concentrated in degree 1. The composition Mod → grN Mod → grN Mod corresponds to a family of operations Fn : Mod → Mod with an isomorphism of operations M Fn −∼ → F. n∈N We call Fn the homogeneous component of degree n of F . Specifically, if M is some R- module, then (Fn )R (M ) consists of those elements u ∈ FR (M ) such that FR[T ] T ·idM [T ] maps u · 1 to u · T n ∈ FR (M )[T ] (using the identification FR[T ] (M [T ]) ∼ = FR (M )[T ]). Definition 4.5. Let n ∈ N. An operation F : Mod → Mod is called homogeneous of degree n if for every R-module M we have  FR[T ] T · idM [T ] = T n · idFR[T ] (M [T ]) . Let [Mod, Mod]n ⊆ [Mod, Mod] denote the full subcategory of operations which are homogeneous of degree n. Corollary 4.6. There is an equivalence of categories Y M [Mod, Mod]n → [Mod, Mod], (Fn )n∈N 7→ Fn . n∈N n∈N Proof. We define a pseudo-inverse functor by F 7→ (Fn )n∈N , where Fn is the homogeneous component of degree n of F . Using flatness of R → R[T ], it follows easily that Fn is, in fact, homogeneous of degree n. If F, F 0 are two operations, using the compatibility with the base change R → R[T ], one checks that every morphism F → F 0 restricts to a morphism Fn → Fn0 , where L n ∈ N is arbitrary. Finally, notice that the homogeneous component of degree n of n∈N Fn is precisely Fn .  Using similar definitions for finitely generated modules, we obtain: Corollary 4.7. There is a fully faithful functor Y [Modfg , Modfg ] → [Modfg , Modfg ]n , F 7→ (Fn )n∈N . n∈N Its essentially image consists of those families (Fn )n∈N of operations, homogeneous of degree n, such that for every L finitely generated R-module M almost all images (Fn )R (M ) vanish; in other words, n∈N (Fn )R (M ) is supposed to be finitely generated. OPERATIONS ON CATEGORIES OF MODULES 13 Example 4.8. The n-th exterior power Λn is an operation which is homogeneous of L degree n. The direct sum n∈N Λn is an operation both on Mod and on Modfg . This is because if some R-module M is generated by n elements, then Λm R (M ) = 0 for all m > n. This shows that there are operations on Modfg with infinitely many non-trivial homogeneous components. Definition 4.9. Let us call an operation F : Modfg → Modfg bounded if there is some n ∈ N such that Fm = 0 for all m > n. We get a full subcategory [Modfg , Modfg ]bounded of [Modfg , Modfg ]. Remark 4.10. By Corollary 4.7, we have [Modfg , Modfg ]bounded ' M [Modfg , Modfg ]n . n∈N L Here, we use the notation i∈I Ci for the full subcategory of objects (Xi )i∈I such that almost all Xi are zero. Q i∈I Ci consisting of those Corollaries 4.6 and 4.7 allow us to restrict our attention to the categories of homogeneous operations [Mod, Mod]n resp. [Modfg , Modfg ]n for some fixed value of n ∈ N. In the remainder of this section, each time Mod may be replaced by Modfg . Lemma 4.11. Let F : Mod → Mod be an operation. Then F is homogeneous of degree n if and only if for every commutative k-algebra R, every R-module M and  every element r ∈ R we have FR r · idM = rn · idFR (M ) . Proof. The direction ⇐= follows by applying the assumption to the R[T ]-module M [T ] and the element T ∈ R[T ]. The direction =⇒ follows  byn applying the base change R[T ] → R, T 7→ r to the assumption FR[T ] T · idM [T ] = T · idFR (M )[T ] .  Our next result shows that homogeneous operations consist of polynomial functors in the sense of [24, Sections 1 and 2]. It also shows the connection to Roby’s polynomial rules (cf. [27, Théorème I.1] and Remark 2.13). Lemma 4.12. Let F : Mod → Mod be an operation which is homogeneous of degree n. If M, N are R-modules, then the map  FR : HomR (M, N ) → HomR FR (M ), FR (N ) has the following property: Let d ∈ N and f1 , . . . , fd ∈ HomR (M, N ). Then there is a polynomial   P ∈ HomR FR (M ), FR (N ) T1 , . . . , Td which is homogeneous of degree n, such that for all r1 , . . . , rd ∈ R we have FR (r1 · f1 + · · · + rd · fd ) = P (r1 , . . . , rd ). For example, in case of the homogeneous operation M 7→ M ⊗2 of degree n = 2 and d = 2, we have (r1 · f1 + r2 · f2 )⊗2 = r12 · f1⊗2 + r1 r2 · (f1 ⊗ f2 ) + r1 r2 · (f2 ⊗ f1 ) + r22 · f2⊗2 . Proof. Let ∆ : M → M ⊕d be the diagonal and ∇ : N ⊕d → N be the codiagonal. Then we may factor the morphism r1 · f1 + · · · + rd · fd as follows: M ∆ M ⊕d Ld i=1 ri ·idM M ⊕d Ld i=1 fi N ⊕d ∇ N 14 MARTIN BRANDENBURG Thus, it suffices to write FR (⊕di=1 ri ·idM ) as a homogeneous polynomial in r1 , . . . , rd with coefficients in the ring S := EndR FR (M ⊕d ) . Using the base change R[T1 , . . . , Td ] → R, Ti 7→ ri , we see that it suffices to consider the universal case: We have to prove that      α := FR[T1 ,...,Td ] ⊕di=1 Ti · idM [T1 ,...,Td ] : FR (M ⊕d ) T1 , . . . , Td → FR (M ⊕d ) T1 , . . . , Td is induced by a homogeneous polynomial of degree n in S[T1 , . . . , Td ]. We consider the Nd -grading on M ⊕d for which, for every 1 ≤ i ≤ d, the i-th summand M is the homogeneous component of degree ei = (0, . . . , 1, . . . , 0). By Corollary 4.3, the module FR (M ⊕d ) inherits an Nd -grading. In fact, α|FR (M ⊕d ) is the corresponding R[T1 , . . . , Td ]coaction. In general, if we apply to an Nd -graded module, i.e. an R[T1 , . . . , Td ]-comodule, the base change along the morphism of bialgebras R[T1 , . . . , Td ] → R[T ], Ti 7→ T , we obtain the N-grading of total degrees. Applying this to M ⊕d , we get the trivial Ngrading concentrated in degree 1. Since F is homogeneous of degree n, we deduce that the Nd -grading on FR (M ⊕d ) has only homogeneous components of total degree n, the other ones being zero. This means that the homomorphism α|FR (M ⊕d ) : FR (M ⊕d ) → FR (M ⊕d )[T1 , . . . , Td ] lands inside the R-submodule of polynomials which are homogeneous of degree n over FR (M ⊕d ). Since there are only finitely many (i1 , . . . , id ) ∈ Nd with i1 + · · · + id = n, we conclude that α|FR (M ⊕d ) is given by a polynomial over S which is homogeneous of degree n.  Corollary 4.13. An operation F : Mod → Mod is homogeneous of degree 1 if and only if it is linear. In particular, the two definitions of [Mod, Mod]1 in Definitions 3.1 and 4.5 coincide. Proof. (Cf. [24, Remark (2.3)]) The direction ⇐= is trivial. In order to prove =⇒, we apply Lemma 4.12. If f1 , f2 : M → N are two R-linear maps, there are two R-linear maps g1 , g2 : FR (M ) → FR (N ) such that FR (r1 · f1 + r2 · f2 ) = r1 · g1 + r2 · g2 holds for all r1 , r2 ∈ R. For r1 = 1, r2 = 0 this shows g1 = FR (f1 ). Likewise, we have g2 = FR (f2 ). Thus, FR (r1 · f1 + r2 · f2 ) = r1 · FR (f1 ) + r2 · FR (f2 ) holds for all r1 , r2 ∈ R. This means that FR is R-linear.  Homogeneous operations of degree 0 are easy to classify. Lemma 4.14. There is an equivalence of categories [Mod, Mod]0 ' Mod(k) which maps F to Fk (k). Proof. (Cf. [24, Remark (2.3)]) Any k-module V induces the “constant” operation M 7→ V ⊗k R which is homogeneous of degree 0. It maps k 7→ V . Conversely, if F : Mod → Mod is an operation which is homogeneous of degree 0, then for all R-modules M we have FR (0 · idM ) = 00 · idFR (M ) = idFR (M ) . It follows from this that FR (0 : N → M ) is inverse to FR (0 : M → N ). In particular, we have FR (M ) ∼ = FR (0) ∼ = FR (0 ⊗k R) ∼ = Fk (k) ⊗k R. This isomorphism is natural in M . Besides, the coherence conditions in Definition 2.1 applied to k → R → S show that this defines an isomorphism of operations.  OPERATIONS ON CATEGORIES OF MODULES 15 5. Linearization of operations In this section, we will closely follow [24, Sections 3 and 4]. The method may be seen as a categorification of the well-known polarization or linearization procedure for homogeneous polynomials [26, Section 3.2]. Remark 5.1. Let n ∈ N. Let F 0 : Modn → Mod be an operation with n arguments. If G is any commutative monoid, then F 0 lifts to an operation grG Modn → grG Mod. This is done exactly as in Corollary 4.3. Namely, if (M1 , . . . , Mn ) ∈ Mod(R)n , then G-gradings on the Mi correspond to morphisms Mi [G] → Mi [G] satisfying certain properties, i.e. to a morphism (M1 , . . . , Mn )[G] → (M1 , . . . , Mn )[G], which induces a morphism FR0 (M1 , . . . , Mn )[G] → FR0 (M1 , . . . , Mn )[G], which in turn corresponds to some G-grading on FR0 (M1 , . . . , Mn ). In particular, if G = Nn and we endow each Mi with the trivial Nn -grading concentrated in degree ei = (0, . . . , 1, . . . , 0), we obtain an Nn -grading on FR0 (M1 , . . . , Mn ) whose homogeneous components define operations Fi01 ,...,in : Modn → Mod which are homogeneous of degree (i1 , . . . , in ) and satisfy M Fi01 ,...,in ∼ = F 0. (i1 ,...,in )∈Nn As in Lemma 4.11, homogeneity means that for all commutative k-algebras R, all Rmodules M1 , . . . , Mn and all elements r1 , . . . , rn ∈ R we have  (Fi01 ,...,in )R r1 · idM1 , . . . , rn · idMn = r1i1 · · · rnin · id(Fi0 ,...,in )R (M1 ,...,Mn ) . 1 Using the base change R[T1 , . . . , Tn ] → R[T ], Ti 7→ T , we see that the associated Ngrading on FR0 (M1 , . . . , Mn ) given by total degrees is induced by the trivial N-grading on (M1 , . . . , Mn ) where each Mi has degree 1. Analogous remarks hold for Modfg . Definition 5.2. Let n ∈ N. Let F : Mod → Mod be an operation which is homogeneous of degree n. We define the operation F 0 : Modn → Mod by FR0 (M1 , . . . , Mn ) := FR (M1 ⊕ · · · ⊕ Mn ), equipped with the evident base change isomorphisms. We now apply Remark 5.1 and L 0 ∼ 0 construct a decomposition F = i1 ,...,in Fi1 ,...,in into homogeneous operations. Here, the only non-trivial operations are those with i1 + · · · + in = n; this is because the associated N-grading on FR0 (M1 , . . . , Mn ) = FR (M1 ⊕ · · · ⊕ Mn ) is induced by the trivial N-grading on M1 ⊕ · · · ⊕ Mn concentrated in degree 1 and F is assumed to be homogeneous of degree n. In particular, we define the operation 0 LF := F1,...,1 : Modn → Mod and call LF the linearization of F . Explicitly, an element u ∈ FR (M1 ⊕ · · · ⊕ Mn ) belongs to (LF )R (M1 , . . . , Mn ) if and only if the endomorphism     FR (M1 ⊕ · · · ⊕ Mn ) T1 , . . . , Tn → FR (M1 ⊕ · · · ⊕ Mn ) T1 , . . . , Tn L which is induced by the endomorphism ni=1 Ti · idMi [T1 ,...,Tn ] maps u · 1 to u · T1 · · · Tn . We make similar definitions for operations F : Modfg → Modfg . Example 5.3. For the operation F = Λ2 , which is homogeneous of degree 2, the homogeneous components of F 0 (M, N ) = Λ2 (M ⊕ N ) are F 0 (M, N )2,0 = Λ2 (M ), 16 MARTIN BRANDENBURG 0 (M, N ) = Λ2 (N ). More generally, the F 0 (M, N )1,1 = LF (M, N ) = M ⊗ N and F0,2 linearization of Λn is the n-fold tensor product. Definition 5.4. Let F : Modfg → Modfg be an operation which is homogeneous of degree n. Let F 0 and LF be defined as in Definition 5.2. Let σ ∈ Σn be a permutation and let M1 , . . . , Mn be a sequence of R-modules. There is an isomorphism σ̃ : M1 ⊕ · · · ⊕ Mn → Mσ(1) ⊕ · · · ⊕ Mσ(n) characterized by σ̃ ◦ ισ(i) = ιi , and therefore an isomorphism (denoted by the same symbol) σ̃ : FR0 (M1 , . . . , Mn ) → FR0 (Mσ(1) , . . . , Mσ(n) ). It is easily checked that this restricts to an isomorphism σ̃ : (LF )R (M1 , . . . , Mn ) → (LF )R (Mσ(1) , . . . , Mσ(n) ). Basically, this is because T1 · · · · · Tn is a symmetric polynomial. In particular, for every R-module M , the symmetric group Σn acts from the right on the R-module (LF )R (M, . . . , M ). In particular, we obtain a right k[Σn ]-module structure on the kmodule (LF )k (k, . . . , k). This right k[Σn ]-module will be denoted by VF . Every morphism of operations F → G restricts to a morphism of operations LF → LG and then to a morphism of right k[Σn ]-modules VF → VG . This defines a functor  [Modfg , Modfg ]n → Modfg k[Σn ] , F 7→ VF . Definition 5.5. Conversely, let V be a finitely generated right k[Σn ]-module. We define the corresponding Schur operation by SV : Modfg → Modfg , M 7→ V ⊗k[Σn ] M ⊗n , equipped with the evident base change isomorphisms. Here, Σn acts from the left on M ⊗n by σ · (m1 ⊗ · · · ⊗ mn ) := mσ−1 (1) ⊗ · · · ⊗ mσ−1 (n) . Observe that SV is homogeneous of degree n, and that every homomorphism of right k[Σn ]-modules V → W induces a morphism SV → SW of operations. This defines a functor  Modfg k[Σn ] → [Modfg , Modfg ]n , V 7→ SV . Theorem 5.6. Let k be a commutative Q-algebra. Then for every finitely generated right k[Σn ]-module V there is an isomorphism of right k[Σn ]-modules V −∼ → VSV . Moreover, it is natural in V . Proof. Let v ∈ V and consider the element α(v) := v ⊗ (e1 ⊗ · · · ⊗ en ) ∈ V ⊗k[Σn ] (k ⊕ · · · ⊕ k)⊗n = (SV0 )k (k, . . . , k). We claim that it is contained in the linearization (LSV )k (k, . . . , k). In fact, the image under the k[T1 , . . . , Tn ]-coaction is equal to v ⊗ (e1 · T1 ⊗ · · · ⊗ en · Tn ) = α(v) · T1 · · · Tn . Clearly, α(v) depends linearly on v. If σ ∈ Σn is a permutation, then α(vσ) = vσ ⊗ (e1 ⊗ · · · ⊗ en ) = v ⊗ σ(e1 ⊗ · · · ⊗ en ) = v ⊗ (eσ−1 (1) ⊗ · · · ⊗ eσ−1 (n) ) = v ⊗ (σ̃(e1 ) ⊗ · · · ⊗ σ̃(en )) = α(v)σ̃. OPERATIONS ON CATEGORIES OF MODULES 17 Thus, we obtain a homomorphism of right k[Σn ]-modules α : V → VSV , which is clearly natural in V . We will show that α is an isomorphism in the case V = k[Σn ] first. In this case, SV identifies with the operation M 7→ M ⊗n , and hence SV0 identifies with the operation M (M1 , . . . , Mn ) 7→ Mi1 ⊗ · · · ⊗ Min . 1≤i1 ,...,in ≤n The R[T1 , . . . , Tn ]-coaction maps u ∈ Mi1 ⊗ · · · ⊗ Min to u · Ti1 · · · Tin . Thus, LSV identifies with the operation M (M1 , . . . , Mn ) 7→ Mσ(1) ⊗ · · · ⊗ Mσ(n) . σ∈Σn In particular, there is an isomorphism k[Σn ] −∼ → (LSV )k (k, . . . , k). One checks that it coincides with α. A similar calculation works for the case V = k[Σn ] ⊗k N for some finitely generated k-module N . To treat the general case, we use the fact that Q is a splitting field for Σn [22, Corollary ∼ Qr 4.16], which implies that there is an isomorphism of Q-algebras Q[Σn ] −→ i=1 Mni (Q) for some sequence of natural numbers n1 , . . . , nr . Here, Mni (Q), as a submodule of Q[Σn ], is the isotypical component Q of an irreducible Q[Σn ]-module Vi . The isomorphism ∼ (k). From this it follows that every (finitely induces an isomorphism k[Σn ] −→ ri=1 MnL i generated) k[Σn ]-module is isomorphic to ri=1 Vi ⊗k Ni for some sequence of (finitely generated) k-modules N1 , . . . , Nr . Each Vi is a direct summand of Q[Σn ], so that each Vi ⊗k Ni is a direct summand of k[Σn ] ⊗k Ni . Since we already know that α is an isomorphism for k[Σn ] ⊗k Ni , and both functors V 7→ SV and F 7→ VF are additive, the general case follows.  Theorem 5.7. Let k be a commutative Q-algebra. Then for every homogeneous operation F : Modfg → Modfg over k of degree n there is an isomorphism of operations SVF −∼ → F. Moreover, it is natural in F . Proof. Let R be a commutative k-algebra. In Lemma 4.12 we have proven that the functor FR : Modfg (R) → Modfg (R) is a polynomial functor which is homogeneous of degree n in the sense of [24, Sections 1 and 2]. It follows from [24, Theorem 4.10] that there is a natural isomorphism (LF )R (M, . . . , M )Σn −∼ → FR (M ). Specifically, it is given by the composition FR (∇) (LF )R (M, . . . , M )Σn ,→ (LF )R (M, . . . , M ) ,→ FR (M ⊕ · · · ⊕ M ) −−−→ FR (M ), where ∇ : M ⊕n → M is the codiagonal. The inverse has a similar description. Since LF is homogeneous of degree (1, . . . , 1), we may apply Corollary 4.13 to each variable to deduce that LF is multilinear in the sense of Definition 3.6. Thus, Theorem 3.8 shows that for all R-modules M1 , . . . , Mn the canonical homomorphism (LF )k (k, . . . , k) ⊗k (M1 ⊗R · · · ⊗R Mn ) → (LF )R (M1 , . . . , Mn ) 18 MARTIN BRANDENBURG is an isomorphism. In particular, there is an isomorphism → (LF )R (M, . . . , M ). (LF )k (k, . . . , k) ⊗k M ⊗n −∼ This is an isomorphism of right k[Σn ]-modules when we use the right action of Σn on (LF )R (M, . . . , M ) (resp. (LF )k (k, . . . , k)) from Definition 5.4 and the right action of Σn on M ⊗n which is induced by the left action from Definition 5.5 via pullback with σ 7→ σ −1 . Since n!, the order of Σn , is invertible in k, it follows that  (LF )R (M, . . . , M )Σn ∼ = (LF )R (M, . . . , M )Σ ∼ = (LF )k (k, . . . , k) ⊗k M ⊗n n Σn ∼ = (LF )k (k, . . . , k) ⊗k[Σn ] M ⊗n , where in the last tensor product we use the left action of Σn on M ⊗n again. Composing all these isomorphisms yields a natural isomorphism → FR (M ). VF ⊗k[Σn ] M ⊗n −∼ One checks that this is, in fact, a morphism of operations.  Theorem 5.8. Let n ∈ N. Let k be a commutative Q-algebra. Then V 7→ SV defines an equivalence of categories  Modfg k[Σn ] ' [Modfg , Modfg ]n . Proof. This follows from Theorems 5.7 and 5.6.  Remark 5.9. One can use the classification of representations of Σn in order to make the classification of homogeneous operations even more explicit [13, Chapter 8]. For example, the three irreducible Schur operations which are homogeneous of degree 3 are Sym3 , Λ3 and M 7→ (Λ2 (M ) ⊗ M )/ (a ∧ b) ⊗ c + (b ∧ c) ⊗ a + (c ∧ a) ⊗ b : a, b, c ∈ M . Every other homogeneous operation of degree 3 on Modfg is a linear combination of such operations. L Theorem 5.10. Let k be a commutative Q-algebra. Then (Vn )n∈N 7→ n∈N SVn induces an equivalence of categories M  Modfg k[Σn ] ' [Modfg , Modfg ]bounded . n∈N Proof. This follows from Theorem 5.8 and Remark 4.10.  Remark 5.11. Theorem 5.10 remains true for Modfp using the same proof. Besides, a very similar proof can be used to show, for every m ∈ N, M  Modfg k[Σn1 × · · · × Σnm ] ' [Modm fg , Modfg ]bounded . n∈Nm The equivalence maps (Vn )n∈Nm to the Schur operation with m arguments M ⊗nm (M1 , . . . , Mm ) 7→ Vn ⊗k[Σn1 ×···×Σnm ] M1⊗n1 ⊗ · · · ⊗ Mm . n∈Nm We can also describe the full category of operations over a field k of characteristic zero. If V is a finitely generated right k[Σn ]-module, then V is isomorphic to a finite direct sum of copies of Specht modules Vλ associated to partitions λ of n [14, Lecture 4]. We will say that λ appears in V if the multiplicity mλ (V ) of Vλ in V is positive. OPERATIONS ON CATEGORIES OF MODULES 19 Theorem 5.12. Let k be a field of characteristic zero. Then F 7→ (VFn )n∈N induces an equivalence of categories between [Modfg , Modfg ] and the category of sequences of finitely generated right k[Σn ]-modules Vn such that, for every d ∈ N, there are only finitely many partitions of length ≤ d that appear in one of the Vn . Proof. By Corollary 4.7 and Theorem 5.7, the category [Modfg , Modfg ] is equivalent to the category of sequences of finitely generated right k[Σn ]-modules Vn such that for every finitely generated R-module M almost all of the R-modules Vn ⊗k[Σn ] M ⊗n vanish. Since Schur functors preserve epimorphisms, and free R-modules are base changes of free k-modules, it suffices to consider the case R = k and M = k ⊕d for some d ∈ N. We have M ⊕mλ (Vn ) Vn ⊗k[Σn ] M ⊗n ∼ Vλ ⊗k[Σn ] M ⊗n . = λ partition of n This vanishes if and only if for all λ appearing in Vn we have Vλ ⊗k[Σn ] M ⊗n = 0. By [14, Theorem 6.3 (1)], this happens if and only if the length of λ is > d. Thus, for fixed d ∈ N, the condition is that almost all n have the property that all partitions appearing in Vn are of length > d. This is logically equivalent to the condition that there are only finitely many partitions of length ≤ d that appear in one of the Vn .  Example 5.13. The partitions ( ), (1), (2), . . . of length 1 do not induce an operation on Modfg . In fact, they correspond to the symmetric algebra on Mod. In contrast, the partitions ( ), (1), (1, 1), (1, 1, 1), . . . have exactly one partition of length d, for each d ∈ N, and therefore do induce an operation on Modfg , namely the exterior algebra. We could also allow that, for instance, the n-th partition has multiplicity n. Another positive example is the sequence of partitions (sorted by length, not degree) ( ), (1), (2), (1, 1), (2, 1), (2, 2), (1, 1, 1), (2, 1, 1), (2, 2, 1), (2, 2, 2), . . . . 6. Appendix on constructive algebra In our proof of Theorem 3.3 we implicitly used both the axiom of choice and the law of the excluded middle. In this section we will give a proof of Theorem 3.3 and hence of Theorem 3.8 which works in constructive algebra. This means that we will not use the law of the excluded middle. In particular, by Diaconescu’s Theorem, the axiom of choice will not be available. Our first result is a constructive version of Grothendieck’s Generic Freeness Lemma [12, Theorem 14.4]. Actually, it is only the special case for R-modules; the general statement also involves R-algebras. We will include the proof because we could not find a proper reference for precisely this version. Lemma 6.1. Let R be a commutative reduced ring. Let M be a finitely generated Rmodule. Assume that f ∈ R has the following property: every g ∈ hf i such that M [g −1 ] is free over R[g −1 ] satisfies g = 0. Then we have f = 0. In particular, for f := 1, if every g ∈ R such that M [g −1 ] is free over R[g −1 ] satisfies g = 0, then R = 0. Proof. By considering the R[f −1 ]-module M [f −1 ] and using R[f −1 ] = 0 ⇔ f = 0, it suffices to consider the case f = 1. Thus, every g ∈ R such that M [g −1 ] is free over R[g −1 ] satisfies g = 0, and our goal is to prove R = 0. Let m1 , . . . , mn be a generating system of M . We will argue by induction on n ∈ N. The case n = 0 is trivial. Let n ≥ 1. We will prove that m1 , . . . , mn is a basis. So let us assume g1 m1 +· · ·+gn mn = 0 with g1 , . . . , gn ∈ R. Then for every 1 ≤ i ≤ n, the localization M [gi−1 ] is generated by m1 , . . . , m ci , . . . , mn , and it satisfies the same assumptions as M . Therefore, by 20 MARTIN BRANDENBURG induction hypothesis, we conclude R[gi−1 ] = 0 and hence gi = 0. This proves that M is free over R. Hence, 1 = 0 by assumption.  Remark 6.2. In the presence of the law of the excluded middle, i.e. in classical mathematics, the special case f = 1 in Lemma 6.1 says that for R 6= 0 there is some element g ∈ R \ {0} such that M [g −1 ] is free over R[g −1 ]. This is the more common formulation of generic freeness. However, this statement is not valid in constructive mathematics. Geometrically, Lemma 6.1 says that there is a dense open subset U ⊆ Spec(R) such that M ∼ |U is locally free. In the internal language of the topos of sheaves on Spec(R) [25], this simply says that M ∼ is not not free. This property may be deduced from the fact that the structure sheaf R∼ is a field from the internal perspective and the observation that finitely generated vector spaces are not not free by the usual argument in linear algebra [4, Lemma 5.9]. In fact, this argument has just been repeated in our proof of Lemma 6.1 using the external language. Lemma 6.3. Let R be a commutative ring. Let M and N be two finitely generated Rmodules with the following property: If S is a commutative R-algebra such that M ⊗R S is free over S, then N ⊗R S = 0. Then we may conclude N = 0. p Proof. Consider the reduced commutative ring R0 := R/ Ann(N ). The R0 -modules M 0 := M ⊗R R0 and N 0 := N ⊗R R0 satisfy the same assumption as the R-modules M and N . Assume that f 0 ∈ R0 has the property that M 0 [f 0−1 ] is free over R0 [f 0−1 ]. We will prove f 0 = 0. By assumption, we have N 0 [f 0−1 ] = 0. Because N 0 is finitely generated, there is p some k ∈ N such that f 0k N 0 = 0. Choose a preimage f ∈ R. Then we have k 0 0k f N ⊆ Ann(N p )N . Since f = 0 is equivalent to f = 0, we might as well assume that f N ⊆ Ann(N )N holds. By [1, Propositionp 2.4], applied to the endomorphism f · idN : N → N , there are elements r0 , . . . , rn−1 ∈ Ann(N ) such that f n + rn−1 f n−1 + · · · + r1 f + r0 ∈ Ann(N ). p This implies f n ∈ Ann(N ) and therefore f 0 = 0. We have proven that every f 0 ∈ R0 such that M 0 [f 0−1 ] is free over R0 [f 0−1 ] satisfies f 0 = 0. By Lemma 6.1, we conclude R0 = 0. This means 1 ∈ Ann(N ), i.e. N = 0.  Example 6.4. Lemma 6.3 remains true if just N is assumed to be finitely generated, but in general it does not hold. Let f ∈ R be a regular element, M := R/f R and N := colimn>0 R/f n R. The transition maps are [x] 7→ [f x]. If M ⊗R S = S/f S is free over S, this means that f ∈ ker(R → S) or f ∈ S × holds. Thus, S is an R/f R-algebra or an R[f −1 ]-algebra. In the first case, we have N ⊗R R/f R = N/f N = 0 and hence N ⊗R S = 0. In the second case, we have N ⊗R R[f −1 ] = N [f −1 ] = 0 and hence N ⊗R S = 0. But N = 0 holds if only if f is a unit. So we may take R := Z and f := 2. Constructive proof of Theorem 3.3. We only have to give a constructive proof of the statement that a linear operation G : Modfg → Modfg vanishes when it vanishes on free modules, because the rest of the proof was constructive anyway. Let M be a finitely generated R-module. If S is a commutative R-algebra such that M ⊗R S is free over S, then we have GR (M ) ⊗R S ∼ = GS (M ⊗R S) = 0. Thus, Lemma 6.3 applies and yields GR (M ) = 0.  OPERATIONS ON CATEGORIES OF MODULES 21 References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] M. Atiyah, I. G. Macdonald, Introduction to commutative algebra. Addison-Wesley Series in Mathematics, vol. 361, Addison-Wesley, Boston (1969) S. Bouc, Non-additive exact functors and tensor induction for Mackey functors, volume 144 of Memoirs A.M.S., vol. 683 (2000) M. Brandenburg, Tensor categorical foundations of algebraic geometry, Ph.D. thesis, preprint, arXiv:1410.1716 (2014) I. Blechschmidt, Using the internal language of toposes in algebraic geometry, draft, https:// github.com/iblech/internal-methods/blob/master/notes.pdf, retrieved on 27 Sep 2016 J. Bénabou, Introduction to bicategories, In: Reports of the Midwest Category Seminar, Lecture Notes in Mathematics, vol. 47. Springer, pp. 1–77 (1967) M. Brandenburg, A. Chirvasitu, Tensor functors between categories of quasi-coherent sheaves, J. Algebra 399, 675–692 (2014) C. P. Bendel, E. M. Friedlander and A. Suslin, Infinitesimal 1-Parameter Subgroups and Cohomology, J. Amer. Math. Soc. 10, 693–728 (1997) J. Baez, T. Trimble et al., Schur functor, nLab article, https://ncatlab.org/nlab/show/Schur+ functor, retrieved on 27 Sep 2016 A. Chirvasitu, T. Johnson-Freyd, The Fundamental Pro-groupoid of an Affine 2-scheme, Appl. Categ. Struct. 21(5), 469–522 (2013) M. Demazure, P. Gabriel, Groupes algébriques. Tome I: Géométrie algébrique, généralités, groupes commutatifs, Masson & Cie, Éditeur, Paris; North-Holland Publishing Co., Amsterdam (1970) S. Eilenberg, Abstract description of some basic functors, J. Indian Math. Soc. (New Ser.) 24, 231–234 (1960) D. Eisenbud, Commutative Algebra – with a View Toward Algebraic Geometry, Graduate Texts in Mathematics, vol. 150. Springer, Berlin (1995) W. Fulton, Young tableaux. With applications to representation theory and geometry, London Mathematical Society Student Texts, vol. 35. Cambridge University Press, Cambridge (1997) W. Fulton, J. Harris, Representation theory. A first course, Graduate Texts in Mathematics, Readings in Mathematics, vol. 129. Springer, Berlin (1991) E. M. Friedlander, A. Suslin, Cohomology of finite group schemes over a field, Invent. Math. 127(2), 209–270 (1997) M. Grandis, Finite sets and symmetric simplicial sets, Theory Appl. Categ. 8(8), 244–252 (2001) J. Hall, D. Rydh, Coherent tannaka duality and algebraicity of hom-stacks, preprint, arXiv:1405.7680 (2014) T. Harris, B. Köck, L. Taelman, Exterior power operations on higher K-groups via binary complexes, preprint, arXiv:1607.01685v2 (2016) A. Joyal, Foncteurs Analytiques et Espèces de Structures, In: Combinatoire énumérative (Montreal, Quebec, 1985), Lecture Notes in Mathematics, vol. 1234. Springer, pp. 126–159 (1986) H. Krause, Koszul, Ringel and Serre duality for strict polynomial functors, Compos. Math. 149(6), 996–1018 (2013) J.-L. Loday, B. Valette, Algebraic operads, Grundlehren der mathematischen Wissenschaften, vol. 346. Springer, Berlin (2012) M. Lorenz, A Tour Of Representation Theory, Preliminary Version (January 11, 2017): https: //www.math.temple.edu/∼lorenz/book.html, retrieved on 02 Apr 2017 I. G. Macdonald, Symmetric functions and Hall polynomials. Oxford University Press, Oxford (1979) I. G. Macdonald, Polynomial functors and wreath products, J. Pure Appl. Algebra 18, 173–204 (1980) C. Mulvey, Intuitionistic algebra and representations of rings, In: Recent advances in the representation theory of rings and C*-algebras by continuous sections, vol. 148, pp. 3–57. Memoirs of the American Mathematical Society, Providence, RI (1974) C. Procesi, Lie groups: an approach through invariants and representations. Springer, Berlin (2006) N. Roby, Lois polynomes et lois formelles en théorie des modules, Ann. Sci. École Norm. Sup. (3) 80, 213–348 (1963) 22 MARTIN BRANDENBURG [28] A. Touzé, Foncteurs strictement polynomiaux et applications, Habilitation thesis, 2014, Université Paris 13, http://math.univ-lille1.fr/∼touze/NotesRecherche/Habilitation A Touze.pdf, retrieved on 02 Apr 2017. [29] A. Vistoli, Grothendieck topologies, fibered categories and descent theory, In: Fundamental Algebraic Geometry: Grothendieck’s FGA Explained, Mathematical Surveys and Monographs, vol. 123, pp. 1–104. American Mathematical Society, Providence, RI (2005) E-mail address: [email protected]
0math.AC
arXiv:1511.09229v2 [cs.DS] 3 Dec 2015 Efficient Deterministic Single Round Document Exchange for Edit Distance Djamal Belazzougui DTISI, CERIST Research center, 05 rue des trois freres Aissou, Benaknoun, Algiers, Algeria December 4, 2015 Abstract Suppose that we have two parties that possess each a binary string. Suppose that the length of the first string (document) is n and that the two strings (documents) have edit distance (minimal number of deletes, inserts and substitutions needed to transform one string into the other) at most k. The problem we want to solve is to devise an efficient protocol in which the first party sends a single message that allows the second party to guess the first party’s string. In this paper we show an efficient deterministic protocol for this problem. The protocol runs in time O(n·polylog(n)) and has message size O(k2 + k log2 n) bits. To the best of our knowledge, ours is the first efficient deterministic protocol for this problem, if efficiency is measured in both the message size and the running time. As an immediate application of our new protocol, we show a new error correcting code that is efficient even for large numbers of (adversarial) edit errors. 1 Introduction Suppose that we have two parties that possess each a binary string. Suppose that the length of the first string (document) is n and that the two strings (documents) have edit distance (minimal number of deletes, inserts and substitutions needed to transform one string into the other) at most k. The problem we want to solve is to devise an efficient protocol in which the first party sends a single message that allows the second party to guess the first party’s string. We call this problem the one-way document exchange under the edit distance. In this paper, we answer an open question raised in [2] by showing a deterministic solution to this problem with message size O(k 2 + k log2 n) bits and encoding-decoding time O(n · polylog(n)) 12 . This result 1 The decoding time is actually O((n + m) · polylog(n + m)), where m is message size. However, we can safely assume that m ≤ n, if the message size of the protocol exceeds n, then we can just send the original string. 2 f (n) = polylog(n) if and only if f (n) = log c (n) for some constant c. 1 is to be compared to previous randomized schemes that achieve O(k 2 log n) [3], O(k log n log(n/k)) [6], and O(k log2 n log∗ n) bits [7]. We note that an optimal code should use Θ(k log(n/k)) bits [13, 2], and in fact this can be achieved with a protocol that runs in time exponential in n. However, to the best of our knowledge no such deterministic code with polynomial time decoding and encoding is known for arbitrary values of k. We are not aware of any deterministic protocol with message size polynomial in k log n and encoding-decoding time polynomial in n when k > 1 3 . Our solution is based on a modification of the randomized one described in [6], in which we replace randomized string signatures (like Rabin-Karp hash function [8]) with deterministic ones [17]. As an immediate application of our new protocol, we show a new error correcting code that is efficient for large numbers of (adversarial) edit errors. This improves on the code recently shown in [3], which works only for a very small number of errors. 2 Tools and Prelminaries In this section, we describe the main tools and techniques that will be used in our solution. 2.1 Strings, periods and deterministic samples Our main tools will be from string algorithmic literature. Recall that a string p[1..m] is a sequence of m characters from alphabet Σ. In this paper, we are mostly interested in Σ = {0, 1}. We denote by pq or p · q the string that consists in the concatenation of string p with string q. We denote by p[i..j], the substring of p that spans positions i to j. We denote by |p| the length of string p. The edit-distance between two strings p and q is defined as the minimal number of edit operations necessary to transform p into q, where the considered operations are character insertion, deletion, or substitution. We denote by pc the string that consists in the concatenation of c copies of string p. We now give some definitions about string periodicities. Recall that a string p has period π if and only if p is prefix of (p[1..π])k for some integer constant k > 0. An equivalent definition states that π is a period of p if p[i] = p[i − π] for all i ∈ [π + 1, m]. If π is the shortest period of p, then π is simply called the period (we will usually mention when we talk about an arbitrary period that is not necessarily the shortest). We will make use of some easy simple properties of periods: 1. Let π a period of a string p. Then π will also be a period of any substring of p of length at least π. 2. Given two strings p and q of same length and same period π, then p = q if and only if p[1..π] = q[1..π]. We will also use this lemma whose (trivial) proof is omitted. 3 For k = 1, the Levenstein code [11, 16] achieves optimal log n + O(1) bits. 2 Lemma 1. Suppose that a string T has two substrings T [i..j] and T [i′ ..j ′ ] such that: 1. i′ > i and j ′ > j (none of the two substrings is included in the other). 2. π is a period of both strings. 3. j ≥ i′ + π (the overlap between the two substrings is at least π). Then π will also be period of substring T [i..j ′ ]. We will also make extensive use of the periodicity lemma due to Fine and Wilf [4]: Lemma 2. Suppose that a string p of length m has two periods π1 and π2 such that p + q − gcd(p, q) ≤ m, then it will also have period π3 = gcd(p, q). However, we will apply it only when we have two periods of lengths at most m/2: Lemma 3. Suppose that a string p of length m has two periods π1 , π2 ≤ m/2, then it will also have period π3 = gcd(p, q). The following lemma is easy to prove using Lemma 3: Lemma 4. Given a string p of length m with period π, then for any k ≤ min(π − 1, m/3), we can always find a substring of p of length 3k whose period is more than k. Proof. The proof is by contradiction. Suppose that every substring of length 3k has period at most k. Let the period of p[1..3k] be π1 ≤ k. Then suppose the period of p[π1 + 1..π1 + 3k] is π2 ≤ k. Then π2 = π1 by basic periodicity lemma, since if it was not the case, then π ′ = gcd(π1 , π2 ) ≤ π2 /2 will be period of p[π1 + 1..π1 + π2 ] (and hence period of p[π1 + 1..π1 + 3k]) and it will also be period of p[1..π1 ] (and hence of p[1..3k]). Hence, we have a contradiction and p[1..3k] and p[π1 + 1..π1 + 3k] will have same period π1 . This implies that π1 is period of p[1..π1 + 3k]. We continue in the same way until we reach string p[1..iπ1 + 3k] with i = ⌊(m − 3k)/π1 ⌋. We thus have that p[j − π1 ] = p[j] for all j ∈ [π1 + 1.., iπ1 + 3k]. Before continuing, we notice that m − 3k ≤ (i + 1)π1 − 1 and thus iπ1 +3k ≥ m−π1 +1 ≥ m−k+1. We can now state that p[j −π1 ] = p[j] for all j ∈ [π1 + 1.., m − k + 1]. At this point, we let π0 = π1 and consider the string p′ = p[m − 3k + 1, m]. Assume this string has a period π ′ 6= π with π ′ ≤ k. Then the substring p′′ = p[m−3k+1, iπ1 +3k] has length at least 2k, since iπ1 +3k ≥ m−π1 ≥ m−k. Now by periodicity lemma p′′ will have periods π0 ≤ k and π ′ ≤ k and thus will also have period π ′′ = gcd(π0 , π ′ ). Now this implies that π ′′ is also shortest period of p′ since prefix q ′ of p′ of length π ′ is of period π ′′ and thus string p′ is prefix of (p′ [1..π ′ ])c1 = ((q ′ )c2 )c1 = (q ′ )c2 c1 for some constants c1 , c2 ≥ 2. Thus we have a contradiction with the fact that π ′ is shortest period of p′ . We thus have proved that π0 is period of p′ and thus that p′ [j] = p′ [j − π0 ] for 3 all j ∈ [π0 + 1, 3k]. This is equivalent to the fact that p[j] = p[j − π0 ] for all j ∈ [m − 3k + π0 + 2, m] and thus all j ∈ [m − 2k + 2, m]. Since we already had p[j] = p[j − π0 ] for all j ∈ [π0 + 1.., m − k + 1], we conclude that p[j] = p[j − π0 ] for all j ∈ [π0 + 1.., m] and thus π0 ≤ k is period of p, a contradiction. We will also use the following lemma by Vishkin [17] about deterministic string sampling. Lemma 5. [17] Given a non-periodic pattern p of length m we can always find a set S ⊂ [1..m] with |S| ≤ log m−1 and a constant k < m/2 such that given any text T , if T [i..i + m − 1] matches p at all positions in S then T [j..j + m − 1] 6= p for all j ∈ [i − k..i − 1]∪[i + 1..i − k + m/2]. Moreover, the set S and the constant k can be determined in time O(m). We can then immediately prove the following lemma: Lemma 6. Given a pattern p of length m and period π ≤ m/3 we can always find a set S ⊂ [1..π] with |S| ≤ log π such that given any text T , if T [i..i + m − 1] has period (not necessarily shortest) π and matches p at all positions in S then T [j..j + m − 1] 6= p for all j ∈ [i + 1..i + π − 1]. Moreover, the set S can be determined in time O(m). Proof. The lemma can be proved by using Lemma 5 twice. Let p′ = p[1..2π − 1]. It is easy to see that p′ is non-periodic. If it was, then it would have another period π ′ < π and p would have period gcd(π, π ′ ) < π, a contradiction. Now, by Lemma 5 applied on p′ , we can find a set S ⊂ [1..2π − 1] with |S| ≤ log π + 1 and a constant k < π such that given any text T , if T [i..i + 2π − 1] matches p′ at positions S, then T [j..j + 2π − 1] 6= p′ for all j ∈ [i − k..i − 1]∪[i + 1..i − k + π − 1]. Now assume that T [i..i + m] is periodic with period π ≤ m/3 then the fact that T [i..2π − 2] matches p′ at positions S, implies that T [j..j + 2π − 1] 6= p′ for all j ∈ [i + 1..i − k + π − 1]. Since T [i..3π − 1] is periodic too, then T [i..2π − 2] = T [i + π..3π − 2] and T [i + π..3π − 2] matches p′ at positions S and applying the lemma again we get that T [j..j +2π −1] 6= p′ for all j ∈ [i+π −k..i+π −1]. Thus we have have that T [j..j + 2π − 1] 6= p′ for all j ∈ [i + 1..i + π − 1]. Also, since p′ and T [i..2π − 1] have both period π, comparing any positions in S reduces to comparing characters at positions in a set S ′ ⊂ [1..π] with |S ′ | ≤ |S|. This finishes the proof of the lemma. 2.2 Supporting algorithms In this subsection, we describe some supporting algorithms. These are only useful for efficient implementation (time) of our main algorithms. Our main results can be understood without the need to understand these algorithms. They are usually not the most efficient ones, but we tried to find the simplest algorithms that run in optimal time, up to logarithmic factors. All lemmas are folklore or easily follow from known results. 4 Lemma 7. Given a string T of length n and fixed length m we can compute the periods of all periodic substrings of T of length m in time O(n log n). Proof. We use the algorithm [10] to compute all the runs of string T . This will allow to compute the run of any periodic substring. In [10] it is proved that the number or runs in a string of length n is O(n) and moreover the set of all runs can be computed in O(n) time. Given a text T , a run is a substring s = T [i..j] so that s is periodic with period π ≤ (j − i + 1)/2 and π is not a period of T [i − 1..j] and T [i..j + 1]. In other words, runs are the maximally long periodic substrings of T and any periodic substring or T of period π will be substring of a run with the same period. Given a length m, we can use the runs to determine the periods of substrings of length m of T in time O(n log n). We first make the observation that the period of substring of T is the shortest among the periods of all runs that include the substring. We can thus show the following algorithm. We put the runs into two lists, a list Ls sorted by increasing starting positions and another list Le sorted by increasing ending positions. We then for i increasing from 1 to n − m + 1 do the following: 1. Check if the next run in the list Ls has starting position i and if so insert into the binary search tree and advance the list pointer. 2. Scan the list Le until reaching a run that ends in position less than i and remove all the encountered runs from the binary search tree and update the list pointer to the successor of the last removed run. 3. Finally, set the period of string T [i..i + m − 1] to be the smallest of among the periods of runs currently stored in the binary search tree. The correctness of the algorithm stems from the fact that at any step i the binary search tree will contain exactly the runs that span substring T [i..i + m − 1]. Concerning the running time, it is clear that every operation takes at most O(log n) time and thus running time of all steps is O(n log n). In addition, the slowest operation in the preprocessing is the sorting of the lists Ls and Le which takes O(n log n). Thus, the whole algorithm runs in time O(n log n). This finishes the proof of the lemma. Lemma 8. [9] We can determine the period of a string of length n in time O(n). Lemma 9. Given a string T of length n, we can build a data structure of size O(n), so that we can check whether the period of any substring T [i..j] has period π (not necessarily shortest one) in time O(1). Proof. We build suffix tree on T [12] with support for Lowest common ancestor queries [1]. This will allow to answer longest common prefix queries between substrings of T . Then checking whether 5 2.3 Error correcting codes We will make use of the systematic error correcting codes. Given a length n and a parameter k < n/2, one would wish to have an algorithm that takes any string s of length n bits and encodes it into a string s′ of length f (n, k) such that one can recover s from s′ even if up to k positions of s are corrupted. Reed-Solomon codes [14] are a family of codes in which f (n) = n + Θ(k log n). A code is said to be systematic if s′ can be written as concatenation of s with a string r of Θ(k log n) bits. The string r is called the redundancy of the code. In fact a Reed-Solomon code can be used to correct a string of length n over alphabet [1..Θ(n)] against k errors using the same redundancy Θ(k log n) bits. Lemma 10. [5] There exists a systematic Reed-Solomon code for strings of length n over alphabet [1..Θ(n)] which can be encoded and decoded in time Θ(n · polylog(n)). We notice that a systematic Reed-Solomon code can be used to implement an efficient document exchange under the hamming distance. Given a string s of length n, simply compute the systematic error correcting code on s and send the redundancy r. The receiver can then concatenate his own string with r and use the decoding algorithm. Clearly if the receiver’s string differs from s in at most k positions, then the decoding algorithm will be able to recover the string s. 3 Document Exchange for Edit Distance Our scheme is based on the one devised by Irmak, Mihaylov and Suel [6] (henceforth denoted IMS). The scheme is randomized (Monte-Carlo). Our contribution is to show how to make the scheme deterministic at the cost of a slight increase in message size. 3.1 IMS Randomized protocol The IMS scheme works as follows: given a string TA of length n without loss of generality assume that n = 2b k for some integer b and that k is a power of two. Divide the string into 2k pieces of equal lengths and send the hash signatures on each piece. Then divide the string into 4k pieces and send the signatures compute the hash signatures of all pieces (each string has hash signature of length c log n for some constant c), compute systematic error encoding code (Reed-Solomon for example) on them with redundancy 2k and send the redundancy. We do the same at all levels until we reach Θ(n/ log n) pieces of length c log n bits, for some constant c in which case, we send redundancy of length Θ(k log n) bits on the piece’s content. At the end, we will get log(n/k) levels, at each level sending Θ(k log n) bits for total of Θ(k log(n/k) log n) bits. The receiver holding a string TB of length n with edit distance at most k from string TA can recover TA solely from the message as follows. At root level he 6 tries to match every signature i with substrings of TB of length B starting at positions [iB + 1 − k, iB + 1 + k], where B = n/(2k) at each step comparing the hash signatures. If any hash signature matches we conclude that strings are equal and we copy the block. The main idea is that we can match all but k pieces 4 . For each piece that matches a substring of TB , we can divide the substring into two pieces and compute the hash signatures on it. For pieces that are not matched we divide them into two pieces and associate random signatures with them. Thus at next step, we can build 4k signatures and be assured that at most 2k hash signatures could be wrong. We then correct the 2k wrong hash signatures using the redundancy and continue. At next step for every i ∈ [1..4k], try to match signature number i with substrings of TB of length B that start at positions [iB + 1 − k, iB + 1 + k], this time with B = n/(4k). We then induce (up to) 8k signatures from the matching substrings of TB (if a signature of a block of TA does not match any string of TB , we put 2 arbitrary signatures), and be assured that at most 2k signatures are wrong. We continue in the same way, at each step deducing the hash signatures at consecutive levels, until we reach the bottom level, at which we copy the content of each matching blocks from TB instead of writing two signatures. We then can deduce the content of TA after correcting the n/B copied blocks each of length B = c log n bits (at most 2k blocks are wrong). The whole algorithm works with high probability, for sufficiently large constant c, since a substring of TB will match a signature of a substring of TA if they are equal and will not match with high probability if they differ. 3.2 Our Deterministic protocol We will show how to use the deterministic signatures of Lemma 5 to make the IMS protocol deterministic. Before giving formal details, we first give an overview of the modification. First, recall that at each level, we need to find for each block of SA , a matching substring from SB . This matching string will have to be in a window of size 2k + 1. In the randomized scheme, the signatures will allow to ensure that with high probability a substring will match a block only if it is equal. Our crucial observation is that we are allowed to return an arbitrary false positive match if no substring in the window matches the block, since the error-correcting code will allow to recover the information. However, in case of a match, we will have to return only the matching substring (no false negatives or false positives are allowed). By using deterministic samples and exploiting properties of string periodicities we will be able to eliminate all but one matching substring as long as the compared strings are long enough (the length has to be at least ck for some suitable constant c). Due to this constraint our scheme will not work at bottom levels. We thus stop using it at the first level with blocks of size ck bits and instead store the redundancy to allow to 4 This comes from a basic property of edit distance which states that if string T B is at edit distance k from string TA , then at all but k blocks of TB can be found in TA , and moreover their positions in TB is shifted from their position in TB , by at most k positions. 7 recover these blocks, incurring Θ(k 2 ) more bits of redundancy. We now give more details on our scheme. Encoding We reuse the same scheme as above (the IMS scheme) but this time using deterministic signatures and stopping at level with pieces of length max(32k, 2⌈log log n⌉ ) bits. At each level (except the bottom), the signature of a piece p = TA [iB + 1, iB + B] will consist in the following information: 1. Let π be the period of p. We will store the starting position s and length ℓ of some substring p′ of p. If π ≤ 4k + 2 then we set p′ = p, s = 0 and ℓ = B. Otherwise, Let p′′ be a substring of p of length 12k + 6 and period π ′′ longer than 4k + 2 (this is always possible by Lemma 4, since the string p has period more than 4k + 2). If p′′ is non-periodic, then we let p′ = p′′ , otherwise set p′ = p′′ [1..2π − 1]. Notice that |p′ | ≥ 8k + 4 and p′ is always non-periodic. The starting position and length need O(log n) bits. 2. A deterministic sample of p′ which stores Θ(log k) positions of p′ and the value of the characters at those positions. Each position is stored using Θ(log k) bits, since in case p′ = p′′ , we have |p′′ | ≤ 12k + 6 and in case p′ = p, all samples are from first π ≤ 4k + 2 positions. We also store the period π ′ of p′ . In total we store O(log n + log2 k) bits. It is clear that the total information stored for each piece will be of length O(log n + log2 k) bits. At the bottom, level, the string TA is divided into pieces of length n/B with B = max(32k, 2⌈log log n⌉ ) and the stored redundancy will be Θ(2k(B + log n)) = Θ(k(k + log n)) bits allowing to recover 2k pieces each of length max(32k, 2⌈log log n⌉ ) bits. At the other levels the redundancy will allow to recover up to 2k wrong piece signatures, necessitating redundancy O(k(log2 k + log n)) bits. It remains to describe more precisely how the redundancy is generated. At each level, we will have a sequence of n/B signatures of length rB . Since a Reed-Solomon code for a string of length n deals only with alphabet size up to n, we will divide each signature into d = Θ(rB / log(n/B)) blocks each of length Θ(log(n/B)) bits, build d sequences where a sequence i ∈ [1..d] consists in the concatenation of block i from all successive signatures. It is clear that the redundancy is as stated above and that the encoding will allow to recover from up to 2k wrong signatures. Decoding The recovery will be done now at each level by matching every piece’s signature against 2k + 1 consecutive substrings of TB . The main idea is that at most one substring could match (multiple substrings could match only if they are equal). More in detail for matching signature of string TA [iB+1, iB+B] against substrings starting at positions j ∈ [iB − k, iB + k] in TB we match the substring q ′ = TB [j + s, j + s + ℓ − 1] against the signature of string p′ . We first determine whether π ′ is period (not necessarily shortest) of q ′ and if so, compare the signatures of q ′ and p′ (comparing the substrings at sampled positions). We then can keep only one position as follows: 8 1. If ℓ < B, we know that π > 4k + 2, and by Lemma 5, we can eliminate all but one candidate position j. To see why, notice that |p′ | ≥ 8k + 4 and thus by 6 we can eliminate t candidates to the left and t′ = 4k + 2 − t − 1 candidates to the right for some t ≥ 0. Notice that either t or t′ has to be at least 2k. It is clear, then that we can not have two candidates j and j ′ within distance 2k without one of the two eliminating the other. 2. If ℓ = B, we have π ≤ 4k + 2, and the checking will work correctly since we have 3π = 12k + 6 ≤ 32k and so Lemma 6 applies and any matching location j will allow to eliminate the next π − 1 positions. Moreover, all following substrings of period π starting at locations at least j + π will have to be equal to some substring starting at location in [j, j + π − 1]. This is easy to see. Let j ′ ≥ j + π be such a position and let j ′′ = ((j ′ −j) mod π)+j. Let q ′ = TB [j ′ ..j ′ +B −1] and q ′′ = TB [j ′′ ..j ′′ +B −1]. Since j ′ ∈ [j..j + B − π + 1], we can apply Lemma 1, and induce that Q = TB [j..j ′ + B − 1] has also period π. Since q ′′ = TB [j ′′ ..j ′′ + B − 1] is substring of Q, we deduce that it has period π as well. Also q ′′ [1..π] = TB [j ′′ ..j ′′ + π − 1] = TB [j ′ ..j ′ + π − 1] = q ′ [1..π], since Q has period π. Thus q ′ = q ′′ , since they both have period π and their first π characters are the same. Thus we can eliminate all positions except ones that are actually the same strings (they are all π positions apart). Runtime analysis It remains to show that the protocol can be implemented in both sides with running time O(n · polylog(n)). We start with the sender. At each level, the sender needs to compute the the period of each piece which can be done in time O(B) using Lemma 8. If the period is longer than 4k + 2, then it needs to find a substring of the piece of length 12k + 6 with period more than 4k + 2. This can be done by computing the periods of all periodic substrings in time O(B log B) using Lemma 7. Then at least one of the strings should be non-periodic or should be periodic with period more than 4k + 2. If it was periodic we already have its period, otherwise, we compute its period using Lemma 8. Then the deterministic sample for substring p′ associated with a piece is also computed in O(B) time according to lemmas 5 and 6. Summing up over all n/B pieces we get running time O((n/B)B log B) ∈ O(n log n) for computing the signatures of all pieces. Then computing the redundancy of the Reed-Solomon encoding of the concatenation of the pieces’ encoding can be done 2 k+log n ) according to Lemma 10. Thus the in time O((n/B) · polylog(n/B) log log n total computation time at each level is O(n · polylog(n)) and at all log(n/k) levels is also O(n · polylog(n)). This finishes the analysis of computation time at the sender’s side. It remains to show that the time spent on the receiver’s side can also be upper bounded by O(n · polylog(n)). The only non-trivial steps are: 1. The decoding of Reed-Solomon encoded strings, which can be done within the same time as encoding. 9 2. The determination of whether a given substring from the receiver side has a certain period π which can be determined in constant time after preprocessing of the whole string in O(n) time (see Lemma 9). All other steps are either trivial or identical to the ones on the sender’s side. Thus we have that the running time on both sides is O(n · polylog(n)). We thus have proved the main theorem of this paper: Theorem 11. There exists a one-way deterministic protocol for document exchange under the edit distance with running time O(n·polylog(n)) and message size O(k 2 + k log2 n) bits. 4 A Scalable Error Correcting Code In [2] it was shown that one can construct an efficient error correcting code for (adversarial) edit errors 5 with near-linear encoding-decoding time and redundancy O(k 2 log k log n) bits. However, the analysis of both the time and redundancy assumes that k is very small compared to n. In fact the scheme is √ not even defined for values of k as small as log log n. We can use our main result to construct an error correcting code with redundancy r = O(k 3 + k 2 log2 n) bits and encoding-decoding time complexity O(n · polylog(n)). The scheme works for k as large as O(n1/3 ). Given the input string s of length n, we first construct the message described in Theorem 11. The size of this message is O(k 2 + k log2 n) bits. Then we protect this message against k edit operations by using a (2k + 1)-repetition code similarly to [2]6 . The size of the protected message is then m = r(2k + 1) (each input bit is duplicated 2k + 1 times in the output). We finally send the original string followed by the protected message for a total size n + m bits. Then, the receiver can consider the first n bits as the original (potentially corrupted) message to be corrected, and then consider the remaining bits (between m − k and m + k), as the protected message. The original message can then be recovered from the protected message as follows. Divide the protected message into r blocks of length exactly 2k+1 (except the last one which can have any length in [1, 3k+1). Then, for every block, output the majority bit in that block. One can easily see that one edit error in the protected message will change the count of ones in the block it occurs in and following blocks by at most ±1. Thus, the decoding of the protected message will be robust against k edit errors. Also, it is easy to see that k edit operations on the n + m sent bits will imply that the first n bits will differ from the original string by at most k operations and the last m − k to m + k bits will differ from the original protected message by at most k edit operations. After decoding the protected message and recovering the original 5 In this model, the receiver must be able to recover the original string regardless of the locations of errors, as long as their number is bounded by some parameter k [15]. 6 They actually use a (3k + 1)-repetition code, but as our analysis shows below, a (2k + 1)repetition code is sufficient in our case. 10 message, the receiver uses it in combination with the (potentially corrupted) received string to recover the original string. Finally, analyzing the running time, the only additional step we do compared to the document exchange protocol is the encoding and decoding of the message which takes time O(m) ∈ O(n). This shows that the total encoding and decoding time for our proposed code is O(n · polylog(n)). We thus have shown the following theorem: Theorem 12. There exists an error correcting code for (adversarial) edit errors with redundancy O(k 3 + k 2 log2 n) bits and encoding-decoding time O(n · polylog(n)). The scheme works for any k ∈ O(n1/3 ). Acknowledgements This work was initiated when the author was visiting MADALGO (Aarhus University) in Spring 2012. The author wishes to thank Hossein Jowhari and Qin Zhang for the initial fruitful discussions that motivated the problem. References [1] Michael A Bender and Martin Farach-Colton. The lca problem revisited. In LATIN 2000: Theoretical Informatics, pages 88–94. Springer, 2000. [2] Joshua Brakensiek, Venkatesan Guruswami, and Samuel Zbarsky. Efficient low-redundancy codes for correcting multiple deletions. arXiv preprint arXiv:1507.06175 and to appear at SODA conference, 2016. [3] Diptarka Chakraborty, Elazar Goldenberg, and Michal Kouckỳ. Low distortion embedding from edit to hamming distance using coupling. In Electronic Colloquium on Computational Complexity (ECCC), volume 22, page 4, 2015. [4] Nathan J Fine and Herbert S Wilf. Uniqueness theorems for periodic functions. Proceedings of the American Mathematical Society, 16(1):109–114, 1965. [5] Shuhong Gao. A new algorithm for decoding reed-solomon codes. In Communications, Information and Network Security, pages 55–68. Springer, 2003. [6] Utku Irmak, Svilen Mihaylov, and Torsten Suel. Improved single-round protocols for remote file synchronization. In INFOCOM, pages 1665–1676, 2005. [7] Hossein Jowhari. Efficient communication protocols for deciding edit distance. In Algorithms–ESA 2012, pages 648–658. Springer, 2012. 11 [8] Richard M Karp and Michael O Rabin. Efficient randomized patternmatching algorithms. IBM Journal of Research and Development, 31(2):249–260, 1987. [9] Donald E Knuth, James H Morris, Jr, and Vaughan R Pratt. Fast pattern matching in strings. SIAM journal on computing, 6(2):323–350, 1977. [10] Roman Kolpakov and Gregory Kucherov. Finding maximal repetitions in a word in linear time. In Foundations of Computer Science, 1999. 40th Annual Symposium on, pages 596–604. IEEE, 1999. [11] Vladimir I Levenshtein. Binary codes capable of correcting deletions, insertions, and reversals. In Soviet physics doklady, volume 10, pages 707–710, 1966. [12] Edward M McCreight. A space-economical suffix tree construction algorithm. Journal of the ACM (JACM), 23(2):262–272, 1976. [13] Alon Orlitsky. Interactive communication of balanced distributions and of correlated files. SIAM Journal on Discrete Mathematics, 6(4):548–564, 1993. [14] Irving S Reed and Gustave Solomon. Polynomial codes over certain finite fields. Journal of the society for industrial and applied mathematics, 8(2):300–304, 1960. [15] Leonard J Schulman and David Zuckerman. Asymptotically good codes correcting insertions, deletions, and transpositions. IEEE transactions on information theory, 45(7):2552–2557, 1999. [16] R. R. Varshamov and G. M. Tenengol’ts. One asymmetric error correcting codes. Avtomatika i Telemechanika, 26(2):288–292, 1965. [17] Uzi Vishkin. Deterministic sampling-a new technique for fast pattern matching. In STOC, pages 170–180, 1990. 12
8cs.DS
arXiv:1510.05433v2 [cs.DS] 11 May 2016 Fast Parallel Operations on Search Trees Yaroslav Akhremtsev Peter Sanders Institute of Theoretical Informatics KIT Karlsruhe, Germany Email: [email protected] Institute of Theoretical Informatics KIT Karlsruhe, Germany Email: [email protected] Abstract—Using (a, b)-trees as an example, we show how to perform a parallel split with logarithmic latency and parallel join, bulk updates, intersection, union (or merge), and (symmetric) set difference with logarithmic latency and with information theoretically optimal work. We present both asymptotically optimal solutions and simplified versions that perform well in practice – they are several times faster than previous implementations. I. I NTRODUCTION Sorted sequences that support updates and search in logarithmic time are among the most versatile and widely used data structures. For the most frequent case of elements that can only be compared, search trees are the most widely used representation. When practical performance is an issue, (a, b)-trees are very successful since they exhibit better cache efficiency than most alternatives. Since in recent years Moore’s law only gives further improvements of CPU performance by allowing machines with more and more cores, it has become a major issue to also parallelize data structures such as search trees. There is abundant work on concurrent data structures that allows asynchronous access by multiple threads [4], [10], [16]. However, these approaches are not scalable in the worst case, when all threads try to update the same part of the data structure. Even for benign inputs, the overhead for locking or lock-free thread coordination makes asynchronous concurrent data structures much slower than using bulk-operations [8], [9], [21] or operations manipulating entire trees [1]. We concentrate on bulk operations here and show in Section VII that they can be reduced to tree operations.1 The idea behind bulk operations is to perform a batch of operations in parallel. A particularly practical approach is to sort the updates by key and to simultaneously split both the update sequence and the search tree in such a way that the problem is decomposed into one sequential bulk update problem for each processor [8], [9]. Our main contribution is to improve this approach in two ways making it essentially optimal. Let m denote the size of the sequence to be updated and k ≤ m denote the number of updates. Also assume that the update sequence is already sorted by key. On the one hand, we reduce the span for a bulk update from O(log k log m) to O(log m). On the other hand, we reduce the work from O(k log m) to O(k log m k) 1 It is less clear how to go the opposite way – viewing bulk operations as whole-tree operations – in the general mixed case including interactions between operations. (to simplify special case treatments for the case k ≈ m, in this paper we define the logarithm to be at least one) which is information-theoretically optimal in the comparison based model. After introducing the sequential tools in Section II, we present logarithmic time parallel algorithms for splitting and joining multiple (a, b)-trees in Sections III and IV respectively. These are then used for a parallel bulk update with the claimed bounds in Section VI. For the detailed proofs we refer to the full version of the paper. Related Work We begin with the work on sequential data structures. Kaplan and Tarjan described finger trees in [14] with access, insert, and delete operations in logarithmic time, and joining of two trees in O(log log m) time. Brodal et al. described a catenable sorted lists [3] with access, insert, and delete operations in logarithmic time, and combination of two lists in worst case constant time. The authors state that it is hard to implement a split operation and it will lead to access, insert and delete operations in O(log m log log m) time. A significant amount of the research has been done for operations on pairs of trees, in particular, union, intersection and difference. A lower bound for the union operation is Ω(k log m k ) in the comparison based model [5]. Brown and Tarjan [5] presented an optimal union algorithm for AVL trees and 2-3 trees. They also published an optimal algorithm for union level-linked 2-3 trees [6]. The same results were achieved for the level-linked (a, b) trees [12]. Paul, Vishkin and Wagener gave the first parallel algorithm for search, insertion and deletion algorithms for 2-3 trees on EREW PRAMs [20]. The same result was achieved for Btrees [11] and for red-black trees [19]. All these algorithms perform O(k log m) work. The first EREW PRAM union algorithm with O(k log m k ) work and O(log m) span was given by Katajainen et al. [15]. But this algorithm contains a false proposition and the above bounds do not hold [2]. Blelloch et al. [2] presented a parallel union algorithm with expected O(k log m k ) work and O(log k) span for the EREW PRAM with scan operation. This implies O(log2 m) span on a plain EREW PRAM. Recently, they presented a framework that implements union set operation for four balancing schemes of search trees [1]. Each scheme has its own join operation; all other operations are implemented using it. Experiments in [1] indicate that our algorithms are faster – probably because equal to x and vright the rest. We let vleft and vright be the roots of (a, b)-trees. Next, we continue to join all the left trees with the roots vleft among the path from the leaf y to the root of T using the join algorithm described above. As the result we obtain T1 . The same join operations are performed with the right trees, which give us T2 . All join operations can be performed in total time O(log |T |), since the left and right trees have increasing height. Consider the roots v1 , v2 , . . . , vk of the left trees and their corresponding ranks r1 , r2 , . . . , rk , where r1 ≤ r2 ≤ . . . ≤ rk . We first join trees with roots v1 and v2 . Next, we join v3 with the result of the previous join, and so on. The first join operation takes time O(r2 − r1 + 1), thePnext one takes time O(r3 − r2 + 1). Thus, the total time k−1 is i=1 O(ri+1 − ri + 1) = O(k + rk − r1 ) = O(log |T |). c) Sequential Union of a Sorted Sequence with an (a, b)tree: Here we present an algorithm to union an (a, b)-tree and a sorted sequence I = hi1 , . . . , ik i This algorithm is similar to the algorithm described in [5]. Let lj denote the leaf where element ij will be inserted (i.e., the leaf containing the smallest element with key ≥ ij ). First, we locate l1 by following the path from the root of T to l1 and saving this root-leaf path on a stack P . When l1 is located, we insert i1 there (possibly splitting that node and generating a splitter key to be inserted in the parent). Next, we pop elements from P until we have found the lowest common ancestor of l1 and l2 . We then reverse the search direction now searching for l2 . We repeat this process until all elements are inserted. m We visit O(k log m k ) nodes and perform O(k log k ) splits during the course of the algorithm according to Theorems 3 and 4 from [12]. Hence, the total work of the algorithm is O(k log m k ) even without using level-linked (a, b)-trees as in [12]. their implementations are based on binary search trees which are less cache efficient than (a, b)-trees. II. P RELIMINARIES We consider weak (a, b)-trees, where b ≥ 2a [12]. A search tree T is an (a, b)-tree if • all leaves of T have the same depth • all nodes of T have degree not greater than b • all nodes of T except the root have degree ≥ a • the root of T has degree not less than min(2, |T |) • the values are stored in the leaves Let m be an upper bound of the size of all involved trees. We denote the parent of some node n by p(n). The rank r(n) of the node n is the number of nodes (including n) on the path from n to any leaf in its subtrees. We define the rank of a tree T , denoted r(T ), to be the rank of its root. We denote the left-most (right-most) path from the root to the leaf as the left (right) spine. We employ two operations to process the nodes of the tree. The fuse operation fuses nodes n1 , n2 using a splitter key – this key ≤ any key in n1 and ≥ any key in n2 – into a node n. The split operation splits a node n into two nodes n1 , n2 and a splitter key such that n1 contains the first b d2 c (here d is the degree of n) children of n, n2 contains remaining d d2 e children of n, and the b d2 cth key of n is the splitter key. Here we explain the basic algorithms for joining two trees and splitting a tree into two trees that are basis of all our algorithms. A more detailed description can be found in [17]. a) Joining Two Trees: We now present an algorithm to join two (a, b)-trees T1 and T2 such that all elements of T1 are less than or equal to the elements of T2 and r(T1 ) ≥ r(T2 ). This algorithm joins the trees T1 and T2 into a tree T in time O(r(T1 ) − r(T2 ) + 1) = O(log(max(|T1 |, |T2 |))) = O(log |T |). Our main goal is to ensure that the resulting tree is balanced. First, we descend r(T1 ) − r(T2 ) nodes on the right spine until we reach the node n such that r(n) = r(T2 ). Next, we choose the largest key in T1 as the splitter. If the degree of the root of T2 or n is less than a then we fuse them into n. If the degree of n after the fuse is ≤ b then the join operation ends. Otherwise, we split n into n and the root of T2 and update the splitter key (if necessary). The degrees of n and the root of T2 are less than b after the split, since we fuse them if at least one of them has degree less than a. We insert the splitter key and the pointer to the root of T2 into p(n). Further, the join operation proceeds as an insert operation [17]. We propagate splits up the right spine until all nodes have degree less than or equal to b or a new root is created. The case r(T1 ) ≤ r(T2 ) is handled similarly. b) Sequential Split: We now describe how to split an (a, b)-tree T at a given element x into two trees T1 and T2 , such that all elements in the tree T1 are ≤ x, and all elements in the tree T2 are ≥ x. First, we locate a leaf y in T containing an element of minimum value in T greater than x. Now consider the path from the root to the leaf y. We split each node v on the path into the two nodes vleft and vright , such that vleft contains all children of v less than or III. PARALLEL S PLIT The parallel split algorithm resembles the sequential version, but we need to split a tree T into k subtrees T1 , . . . , Tk using a sorted sequence of separating keys S = hs1 , . . . , sk i, where tree Ti contains keys greater than si−1 and less or equal than si (we define s0 = −∞ and sk = ∞ to avoid special cases). For simplicity we assume that k is divisible by p (the number of processors). If k > p then we split the tree T into p subtrees according to the subset of separators S 0 = hsk/p , s2k/p , . . . , s(p−1)k/p i. Afterwards, each PE (processor element) performs k/p − 1 additional sequential splits to obtain k subtrees. From this point on we assume that p = k. Theorem 1. We can split a tree T into k trees with O(k log |T |) work and O(log |T |) span. Note that the algorithm is non-optimal – it performs O(k log |T |) work whereas the best sequential algorithm splits a tree T into k subtrees in O(k log |Tk | ) time. We now describe the parallel split algorithm. First, the PE i locates a leaf li for each si ∈ S, which contains the maximum element in T less than or equal to si . Also, we save a first node ri on the path from the root, where li−1 and li are in different subtrees. For r1 this means a dummy node above the 2 root. Next, PE i copies all nodes on the path from li to ri , but only keys ≤ si and their corresponding children. We consider these nodes to be the roots of (a, b)-trees and join them as in the sequential split algorithm. We can do this in O(log m) time, as these trees have monotone or strictly increasing ranks. Let us refer to the resulting tree as Tright . The same actions can be done on the path from li−1 to ri , except that we copy elements greater than si−1 to new nodes. After joining the new nodes we obtain a tree Tleft . We also build a tree Tcentral from the keys and corresponding children of the node ri that are in the range (si−1 , si ]. The last step is to join the trees Tleft , Tcentral and Tright . These operations can be done in parallel for each i, since all write operations are performed on copies of the nodes owned by the processor performing the respective operations. When we finish building the trees T1 , . . . , Tk (we use a barrier synchronization to determine this in O(log k) time) we erase all nodes on the path in T from the root to each leaf li . Each PE i then erases all nodes on the path from leaf li to ri , excluding ri . Each PE locates necessary leaf, builds trees Tleft , Tright by traversing up and down a path not longer than O(log |T |)) nodes. Also each PE erases a sequence of nodes not longer than the height of the tree Tright , which is O(log |T |). Therefore, Theorem 1 holds. a[i] points to the spine node with rank i. The only challenge is to keep this array up to date in constant time. We describe the second issue in Section IV-A2: how to perform all required node splits in constant time. The main observation is that if there are no nodes of degree b on the spines then there are no node splits during the course of the algorithm. So we preprocess each tree Ti such that there are no nodes of degree b on their left/right spines by traversing each tree in a bottom up fashion. The preprocessing can be done in parallel in O(log m) time. Now consider the task of joining a sequence of preprocessed trees. The only nodes of degree b that could be on the left/right spines will appear during the course of the join algorithm. We can take advantage of this fact by assigning a dedicated PE to each node of degree b. This PE will split the node when needed. We describe how to maintain the sizes of the subtrees in Section IV-A3. This allows us to search for the i-th smallest element in a tree T in O(log |T |) time. We use the search of the i-th smallest element in Section VI-A. Note that we dedicate several tasks to one PE during the course of the algorithm but this does not affect the resulting time bound. Finally, we combine the above ideas into the modified join algorithm in IV-A4. This algorithm joins k trees in O(log k + log m) time. Lemma 1. We can join k trees in O(log k +log m) time using k processors on a CREW PRAM. IV. PARALLEL J OIN PWe describe how to join k trees T1 , . . . , Tk , where m = i |Ti | and p = k, since this is the most interesting case. When joining k > p trees, we can assign ≤ dk/pe trees to each PE. First, we present a non-optimal parallel join algorithm. Next, we present a modified sequential join algorithm. Finally, we construct an optimal parallel join algorithm that combines the non-optimal parallel join and the modified sequential join algorithms. We explain how to obtain the result of Lemma 1 in Section IV-A4. As a result we obtain an algorithm that performs join of k trees in O(log m+log k) time, has work O(k log m), and consumes O(k log m) memory. 1) Fast Access to Spine Nodes by Rank: Suppose we need to retrieve a node with a certain rank on the right spine of a tree U . The case for the left spine is similar. We maintain an array of pointers to the nodes on the right spine of U such that the i-th element of the array points to the node with rank i on the right spine. See Figure 1(a). We build this array during the preprocessing step. We can retrieve a node by its rank in constant time with such an array. The only problem is that after a join of U with another tree some pointers of the array point to nodes that are not on the right spine. We describe how to maintain the pointers to the spine nodes throughout the join operations up-to-date. Suppose that we have joined two trees U and V , where r(U ) ≥ r(V ). Let RU and RV denote the arrays of the pointers to the nodes on the right spines of U and V respectively. The first r(V ) pointers of RU point to the nodes that are not on the right spine anymore. Consequently, nodes that were on the right spine of the tree V are on the right spine of U now. The first r(V ) elements of RV point to the nodes on the right spine of U with the ranks in [1, r(V )], and elements of RU with the indices in (r(V ), r(U )] point to the nodes on the right spine of U with the rank in (r(V ), r(U )]. Hence, the interval [1, r(U )] is split into the two subintervals: [1, r(V )] and (r(V ), r(U )]. See Figures 1(b) and 1(c). Now we show how to retrieve a node by its rank in constant Theorem 2. We can join k trees with O(k log m k ) work and O(log k +log m) parallel time using k processors on a CREW PRAM. Note that the algorithm is optimal, since the best sequential algorithm joins k (a, b)-trees in O(k log m k ) time [18]. A. Non-optimal parallel join. Let us first explain the basics of the parallel algorithm. The simple solution is to join pairs of trees in parallel (parallel pairwise join). After each group of parallel join operations, the number of trees halves. Hence, each tree takes part in at most dlog ke join operations. Each join operation takes O(log m) time. That is, we can join k trees in time O(log k log m). We improve this bound to O(log m + log k) by reducing the time for a join operation to a constant by solving the two following problems in constant time: finding a node with a specific rank on a spine of a tree and performing a sequence of splits of nodes with degree b. We describe the first issue in Section IV-A1: we can retrieve a spine node with specified rank using an array a where the 3 time during a sequence of the join operations. First, we explain how to maintain the arrays with up-to-date pointers to the right spine after the join operation. Suppose we join trees U and V and we need to know the node n ∈ U where r(n) = r(V ). We maintain stacks SU and SV for trees U and V respectively, which are implemented using linked lists. Each element of these stacks is a pair (R, I), where R is an array with pointers to the right spine of the corresponding tree. I is an interval of the indices of the elements in R, such that R[i] (∀i ∈ I) points to a node on the right spine of the tree. We maintain the following invariants for each tree Ti and its corresponding stack during the course of the algorithm: T1 B ... A U ... (a) Figure 2: We join T1 with T2 , T3 , T4 , T5 . Each Ti has stack Si with a pair (Ri , Ii ), i = 1 . . . 5. We add (R2 , I2 ) to S1 during the join of T1 and T2 . We do the same during the join of T1 and T3 . Next, we pop (R3 , I3 ), (R2 , I2 ) from S1 and add (R4 , I4 ) to it during the join of T1 and T4 . We pop (R4 , I4 ) from S1 and add (R5 , I5 ) to it during the join of T1 and T5 . stack SU contains all pairs of SV and pairs with intervals [r(V ) + 1, rj+1 − 1], [ri , ri+1 − 1], where i = j + 1, . . . , |SU |. We do not add the pair with the interval [r(V ) + 1, rj+1 − 1] to the stack SU if r(V ) + 1 > rj+1 − 1. Now we show that the invariants hold for the resulting stack SU . The union of the pairs in SV is [1, r(V )] and all intervals in the stack SV are disjoint and sorted. The intervals [r(V ) + 1, rj+1 − 1], [ri , ri+1 − 1], where i = j + 1, . . . , |SU |, are disjoint, sorted, and their union is [r(V ) + 1, r(U )]. Hence, Invariants 1 and 2 are hold. We also have popped all pairs (R, I) ∈ SU , such that no element of R points to a node on the right spine of U . Hence, Invariant 3 holds. Consequently, the stack SU satisfies all the invariants after its combination with SV . See Figure 2. a) Maintaining the Invariants in Parallel: Here we present a parallel algorithm to maintain the Invariants 2 and 3 throughout all join operations. More precisely, we show how to perform a sequence of pop operations on a stack and a combination of two stacks in constant time on a CREW PRAM. We demand that each element of the stack has a dedicated PE for this. Initially, a stack S of a tree contains only one element and we dedicate it the PE that corresponds to this tree. Each element e of S contains additional pointers: Start, StackID, and Update. Start points to the flag that signals to start the parallel pop operations. StackID points to the unique id number of the stack containing the element e. Update is used to update Start and StackID pointers in new elements of the combination of two stacks. Each element of a stack has the same Start, Update and StackID. We refer to this condition as the stack invariant. Additionally, we maintain a global array UpdateData of size p. Here we discuss how to combine stacks SU and SV and maintain the invariants in constant time. The combination can be done in constant time, since the stacks are implemented as linked lists. Next, we repair the stack invariant; we set C (b) RU B U V T5 (b) The elements of the stack S1 during the sequence of the join operations. RV V T4 (R3 , I3 ) (R2 , I2 ) (R2 , I2 ) (R4 , I4 ) (R5 , I5 ) (R1 , I1 ) (R1 , I1 ) (R1 , I1 ) (R1 , I1 ) (R1 , I1 ) Begin 1 2 3 4 RU .. . T3 (a) The sequence of trees. 1) The stack Si contains disjoint intervals [ri , ri+1 − 1], for i = 1, . . . , |Si |, r1 = 1, r|Si |+1 = r(Ti ) + 1. These intervals are arranged in sorted order in Si . S 2) (R,I)∈Si I = [1, r(Ti )]. 3) The element R[i] (i ∈ I) points to the node n on the right spine where r(n) = i for ∀ (R, I) ∈ Si . ... T2 C (c) Figure 1: Letter A denotes the first r(V ) elements of RU . Letter B denotes the last r(U ) − r(V ) elements of RU . Letter C denotes the first r(V ) elements of RV . Let us first consider the simple case, where each stack contains only a single element. Next, we extend it to the general case. The stack SU contains a pair (RU , [1, r(U )]), and the stack SV contains a pair (RV , [1, r(V )]) after the preprocessing step. The invariants are true for SU and SV . After the join operation we add the element of SV on the top of SU . Consequently, the SU contains (RV , [1, r(V )]) and (RU , (r(V ), r(U )]), and the invariants hold. Now we describe the general case. Suppose that the stacks SU and SV contain more than one pair and they satisfy the invariants from above. We need to find a node with rank r(V ) on the right spine of U . First, we search for the pair (R, I) ∈ SU , such that r(V ) ∈ I. Let SU contains pairs with the following intervals: [ri , ri+1 − 1], where i = 1, . . . , |SU |, r1 = 1, r|SU |+1 = r(U ) + 1. We pop pairs from the stack SU until we find a pair with interval I = [rj , rj+1 − 1] such that r(V ) ∈ I. After the join operation we push the elements of SV on the top of SU . We refer to this operation as the combination of SU and SV . Consequently, 4 the values of the pointers Start, Update, StackID in the old elements of SU to the values of the pointers in the new elements of SU . The PE dedicated to tree U starts the repair using Algorithm 1. Each PE dedicated to the element s ∈ SU that was in SV permanently performs Algorithm 2 until it updates the variables Start, Update, StackID in s. Finally, we wait a constant amount of time until each PE finishes updating the pointers of its corresponding element. Input: old element s ∈ SU , new element s0 ∈ SU Function Start_Repair_Stack_Inv(s, s0 ) UpdateData[s0 .StackID].Start = s.Start; UpdateData[s0 .StackID].Update = s.Update; UpdateData[s0 .StackID].StackID = s.StackID; Set flag pointed to by s0 .Update; Algorithm 1: Starts the repair of the stack invariant of SU after combination of SU and SV . The algorithm first works as the basic join operation from Section II. We can perform a sequence of splits of degree-b nodes in parallel using the fact that there is a dedicated PE to each node with degree b. This is a case because we assign the PE previously responsible for handling tree V to a node v ∈ U after the join operation, if the degree of v becomes equal to b. Let us prove that each join operation can increase the length of a sequence of degree-b nodes by at most one. This fact allows us to assign a dedicated PE to each degree b node. Lemma 2. A join operation can be implemented so that sequences of degree-b nodes grow by at most one element. Proof: First, we analyze the case when a degree-b node appears during a join operation. Let node n has degree b − 1 and p(n) is in the sequence of degree-b nodes. Figure 3(a) shows that if the rightmost child of n splits then we insert a splitter key into n and its degree is equal to b now. We show that the sequence of degree-b nodes (where p(n) is) grows only by an one node by proving the following fact: the new child of n has degree less than b after the join operation. If the rank of the new child is greater than r(V ) then it has degree less than b, since it has been split. The case when the rank of the new child equal to r(V ) we further analyze. Consider two sequences of degree-b nodes in U and V and a node n0 ∈ U on the right spine such that r(n0 ) = r(V ). We show that they can not be combined into one sequence after the join operation. We consider only the case when the sequence in V contains its root. Otherwise it is obvious that the sequences will not be combined. Consider the case when p(p(n0 )) is in a sequence of degreeb nodes and p(n0 ) has degree b − 1. If the fuse of n0 and the root of V does not occur then the root of V will be a new child of p(n0 ). See Figure 3(b). The length of the sequence will increase by one, since the degree of p(n0 ) will be b. If the root of V has degree b then the sequences of degree-b nodes will be combined. Hence, our goal to ensure that the degree of the root of V remains less than b. Thus, we split the root of the tree V if it has degree b before the join operation and increase the height of V by one. Consider the case when p(n0 ) is in a sequence of degreeb nodes. The fuse of the root of V and n0 occurs when at least one of them has degree less than a. We fuse them into n0 that may result in n0 having degree b. See Figure 3(c). Consequently, n0 has degree b as well as its parent and the sequences will be combined. Then we split n0 and insert the splitter key in p(n0 ). This split prevents the combination of two sequences. We also split the nodes in the sequence of degree-b nodes where p(n0 ) is, since the degree of p(n0 ) is b + 1. We do this in parallel in constant time as further described. a) Assigning PEs: We now explain how to assign a PE to a new degree-b node n. Suppose that n has extended some sequence of degree-b nodes according to Lemma 2. We assign the freed PE of the tree V to n. Hence, this PE can split n during some following join operation. Now let us discuss how we assign a PE to n in more detail. Input: new element s0 ∈ SU Function Repair_Stack_Inv(s0 ) if flag pointed to by s0 .Update is set then s0 .Start = UpdateData[s0 .StackID].Start; s0 .Update = UpdateData[s0 .StackID].Update; s0 .StackID = UpdateData[s0 .StackID].StackID; end Algorithm 2: Updates Start, Update, StackID in the new elements of SU . Now we present a parallel algorithm that performs a sequence of pop operations on the stack SU . We can perform any number of the pop operations on a stack in constant time in parallel, since each element of the stack has a dedicated PE. Recall that we want to find an element (R, I) in SU such that r(V ) ∈ I. The PE dedicated to the tree U sets the flag pointed to by Start to start a sequence of pop operations. Each PE that is dedicated to an element s = (R, I) ∈ SU permanently performs the function Pop(s). This function checks the flag pointed to by Start; it exits if the flag is unset. Otherwise, the function checks if r(V ) ∈ I; if r(V ) is to the right of I on the integer axis then we mark the element s as deleted. Next, we perform another parallel test. Each PE – if its corresponding element is not marked deleted – checks if the next element of the stack is deleted. There is only one element that is not marked deleted, but the next element is marked deleted, since the intervals of elements of SU are sorted according to Invariant 1. This element is a pair (R, I) such that r(V ) ∈ I. Next, we make a parallel deletion of the marked elements and wait a constant amount of time until each PE finishes. 2) Splitting a Sequence of Degree b Nodes in Parallel: Here we present a modified join operation of two trees U and V , where r(U ) ≥ r(V ) (the case r(U ) < r(V ) is similar), that performs all splits in constant time in parallel. We demand the following preconditions: 1) We join a sequence of preprocessed trees; that is, there are no nodes of degree b on the right spine in the beginning. 2) We know a pointer to the node n ∈ U where r(V ) = r(n). 5 p(p(n0 )) p(n) 5 ··· p(n0 ) ··· n ··· (a) new child 0 p(n ) ··· n0 (b) ··· V 7 y ··· n0 5 10 11 12 7 y x 10 11 12 15 16 17 ··· V 15 16 17 (a) (c) (b) 5 Figure 3: The growth of a sequence of degree-b nodes. 7 x We extend each node by an additional pointer MetaData to a special data structure: a flag Start and an integer Rank. The Start flag signals to all PEs assigned to the nodes of the same sequence of degree-b nodes to start the parallel split of this sequence. We assign the pointer MetaData in p(n) to the pointer MetaData in n. Finally, we command to the PE that is dedicated to n to perform permanently the function Split_B_Node(n), which is described further. b) Splitting a Sequence of Degree-b Nodes: The PE dedicated to U assigns r(V ) to Rank and next sets Start when we need to perform a split of nodes of a sequence of degree-b nodes in parallel. Each PE dedicated to a node n in this sequence permanently performs the function Split_B_Node(n). This function checks the flag Start; it exits if the flag is unset. Otherwise, the function starts splitting n if r(n) ≥ Rank. Let us consider the parallel split of the sequence of degree-b nodes more precisely. Each PE splits its corresponding node y by creating a new node x and coping the first b 2b c − 1 keys from y to x. The last d 2b e − 1 keys remain in y. Next, the PE waits until p(y) is split and then inserts the splitter key and the pointer to x into p(y). Next, we wait until each PE finishes. This takes constant time on a PRAM. See Figure 4. It is crucial that all nodes with the degree b sequence are still the parents of their rightmost children after the split, because we know only the parent pointer for each child (we store a parent pointer in each node). Note that all the nodes which were on the right spine before the split step remain on the right spine after it. This property is crucial to access spine nodes in constant time. 3) Maintaining Subtree Sizes: Here we present a parallel algorithm to update the size of each subtree in a tree T , where T is the result of joining T1 , · · · , Tk . First, we save all the nodes where the joins of two trees occurred during the join operation of k trees. Suppose we join two trees U and V , such that r(U ) ≥ r(V ). We save a node n ∈ U on the right spine that has rank r(n) = r(V ). Next, we dedicate the PE that was previously dedicated to V to node n. Consequently, each of these nodes has a unique dedicated PE. Now suppose we have finished joining k trees. Consider k − 1 saved nodes and the PEs dedicated to them. The PE that made the last join operation of two trees sets the global flag Join Done and performs the function Update_Subtree_Sizes. Other PEs permanently perform the function Update_Subtrees_Sizes as well. This function checks the flag Join Done; it exits if the flag is unset. Otherwise, it updates the subtree sizes of T as follows: each 10 11 y 12 16 15 17 (c) Figure 4: We split a sequence of the two 4-degree nodes in (2, 4)-tree (a). First, we split each of the nodes in parallel (b). The nodes with keys 7 and 12 remain parents of their rightmost child. Next, we insert the splitter keys 11, 16 and pointers to the nodes with keys 10 and 15 into the parent nodes (c). PE follows up the path from corresponding saved node to the root of T and updates the subtree sizes. The algorithm works in O(log m) time on a CREW PRAM. 4) The Parallel Join Algorithm: Now we have presented the necessary subroutines and can use them to construct the parallel join algorithm. Lemma 3. We can join trees U and V , where r(U ) ≥ r(V ) (the case r(U ) < r(V ) is similar), in constant time. Proof: We retrieve a node u with rank r(V ) on the right spine of U in constant time as described in Section IV-A1. Next, we insert the root of V as the rightmost child of p(u) or fuse it with u. Finally, we perform the splits of nodes with degree ≥ b in constant time as described in IV-A2. Therefore, we join U and V in constant time. We have T1 , . . . , Tk trees and each of these trees has its own dedicated PE. Each PE i, where i is odd, performs the modified join operation of Ti and Ti+1 in constant time according to Lemma 3. If r(Ti ) ≥ r(Ti+1 ) then PE i + 1 is freed after this join operation, otherwise PE i is freed. Now the freed PE performs Algorithm 3 and the other PE performs the next join operation. Finally, each PE deletes the corresponding stack, left and right spines when all trees are joined. Therefore, Lemma 1 holds. Input: a node n of degree b, a stack element s Function Main(n, s) Split_B_Node(n); Repair_Stack_Invariant(s); Pop(s); Update_Subtree_Sizes(); Algorithm 3: Main function, which is performed by all freed PEs B. Sequential join of t trees We present a sequential algorithm to join t preprocessed trees in O(t) time. This algorithm joins trees in pairs. During a join operation we, first, access a spine node by its rank; 6 work and O(log m) parallel time. Next, we split the sequence of trees into the groups of size log k and join each group in O(log k) parallel time by Lemma 6. The work of this step is dk/ log keO(log k) = O(k). We preprocess the k ) work dk/ log ke resulting trees with O(dk/ log ke log m log k and O(log m) parallel time. Next, we join the dk/ log ke trees using a non-optimal parallel join algorithm with work O(dk/ log ke logdk/ log ke) and O(logdk/ log ke) parallel time by Lemma 1. The total work of the algorithm is O(k log m k ), the parallel time is O(log k + log m), and Theorem 2 holds. Note that this algorithm can not maintain subtree sizes. next, we connect the trees and split nodes of degree b. Both operations can be done in amortized constant time. a) Fast Access to Spine Nodes by Rank: Consider joining U and V , where r(U ) ≥ r(V ) (the case r(U ) < r(V ) is similar). We use the same idea as in Section IV-A1 to retrieve a spine node with rank r(V ) in U . We maintain a stack with arrays of the pointers to the nodes on the right and left spines for each tree that we have built during the preprocessing step. Initially, each stack contains one element. Each tree and its corresponding stack satisfy the invariants from Section IV-A1that guarantees that the pointers of the arrays in the stack point to the nodes on the right (left) spine. To maintain the invariants we, first, perform a sequence of pop operations on the stack of U to retrieve a spine node; next, we combine stacks of U and V . See details in Section IV-A1. We combine two stacks in worst-case constant time, since each stack is represented using a linked list. Each pop operation removes an element that was in the stack as a result of the previous combine operation. Therefore, we can charge the cost of the sequence of s pop operations to the previous s combine operations. Hence, the sequence of s pop operations takes amortized constant time. See the detailed proof of the amortized constant cost of the sequence of s pop operations in [7, Chapter 17: Amortized Analysis, p. 460 – 461]. V. L IGHTWEIGHT PARALLEL J OIN The parallel join algorithm from Section IV is optimal on a CREW PRAM. Because this algorithm is theoretical and difficult to implement, we suggest an other approach to join k trees T1 , . . . , Tk . We devote the rest of this section to outlining a proof of the following theorem. The idea is to replace the pipelining tricks used in previous algorithms [20] by a local synchronization that can actually be implemented on asynchronous shared memory machines. Theorem 3. We can join k trees with expected O(k log m k) work and expected time O(log m + log k) using p = k processors on a CREW PRAM. Lemma 4. Consider joining of two trees. We can access a spine node by its rank in amortized constant time. We decrease the running time of the parallel join that joins k trees in O(log m log k) time (see Section IV) by using arrays with pointers to right (left) spine nodes. We build such arrays during the preprocessing step for each tree. See details in Section IV-A. First, we assign a PE t to tree Tt . Next, our algorithm works in iterations. We define the sequence of trees present during iteration i as T1i , . . . , Tkii (k1 = k). In the beginning of each iteration we generate a random bit cit for tree Tti where t = i 1 . . . ki . During an iteration i PE t joins Tti to Tt−1 (or Tti i and Tt+1 if t = 1), if one of the following conditions holds: Lemma 5. Consider joining of t preprocessed trees T1 , . . . , Tt . We split O(t) degree-b nodes over all operations. Proof: We use the potential method [7] to prove this fact. method [7] We define the potential function φ as the total number of the nodes of degree b on the left and rights spines of trees to be joined. Suppose that the sequential join algorithm has joined trees T1 , . . . , Ti−1 . We denote the result as T and let φ(T ) = φi−1 . Then the amortized number of splits that occurred during the join operation of T and Ti is cˆi = ci + φi − φi−1 , where ci is the actual number of occurred splits. Note that φi−1 + P1t ≥ φi and Pt ci ≤ |φi − φi−1 |, therefore cˆi = O (1) and i=2 cˆi = i=2 ci + φt − φ1 . Initially, the trees are preprocessed and do notPcontain nodes Pt of degree b t on the spines, hence φ1 = 0 and i=2 ci ≤ i=2 cˆi = O(t). 1) 2) 3) 4) i i ) r(Tt−1 ) > r(Tti ) and r(Tti ) < r(Tt+1 i i i i r(Tt−1 ) > r(Tt ), r(Tt ) = r(Tt+1 ), and cit = 1 i i r(Tt−1 ) = r(Tti ), r(Tti ) < r(Tt+1 ), cit−1 = 0, and cit = 1 i i i i r(Tt−1 ) = r(Tt ), r(Tt ) = r(Tt+1 ), cit−1 = 0, and cit = 1 These rules ensure that only trees at locally minimal height are joined and that ties are broken randomly and in such a way that no chains of join operations occur in a single step. In the beginning, the join operation proceeds like in basic join operation II-0a. But we do not insert a new child into the p(n) i (n ∈ Tt−1 and r(n) = r(Tti )) if its degree equals b; instead we take n and the new child, join them, and put the result into Tti . We do this in constant time, since the ranks of Tti and the new child are equal. The rank of Tti increases by one. We call this procedure subtree stealing. This avoids chains of splitting operations that would lead to non-constant work in iteration i. Lemma 6. We can join t trees in O(t) time. Proof: Consider the join of two trees U and V where r(U ) ≥ r(V ). First, we search for a spine node in U to insert the root of V in amortized constant time according to Lemma 4. Next, we split the nodes of degree b in the resulted tree in amortized constant time according to Lemma 5. Therefore, we join t trees in O(t) time. C. Optimal parallel join Now we present an optimal join algorithm with O(k) work and O(log k + log m) parallel time. First, we preprocess the k trees using k processors with O(k log m k) Lemma 7. Assume that we joined two trees Ttii and Ttjj (i < j) with a tree T , where no keys in T is larger than any key in 7 Ttii and Ttjj , and no joins with this tree occurred between the iterations i and j. Then r(Ttii ) ≤ r(Ttjj ). Tree s1 t1 Proof: Since Ttii and T were joined then r(T ) ≥ r(Ttii ) and r(Ttii ) ≤ r(Ttii +1 ). But r(Ttjj ) ≥ r(Ttii +1 ). Hence, r(Tijj ) ≥ r(Ttii ). Lemma 7 shows that we join trees in ascending order of their ranks. Therefore, we do not need to update the pointers that point to the nodes with rank less than r(Ttii ), since r(Ttjj ) ≥ r(Ttii ); that is, we do not join trees smaller then r(Ttii ). T I Tt Tt 1 It t2 s2 s3 t3 t4 s4 2 1 s1 t1 t2 s2 s3 t3 t4 s4 Figure 5: Separators of I and T . Here p = 5. For example, the elements from It1 and Tt1 lay in intersecting ranges. But the elements from Tt1 and Tt2 lay in disjoint ranges. As well as the elements of It1 and Tt2 . tree. Finally, the join phase joins the trees back into a tree. The following theorem summarizes the results of this section. Lemma 8. The lightweight parallel join algorithm joins k trees using expected O(log m + log k) iterations. Theorem 4. A bulk update can be implemented to run in |T | O( |I| p log |I| + log p + log |T |) parallel time on p PEs of a CREW PRAM. i Proof: Consider a tree Tti where r(Tt−1 ) > r(Tti ) and i i r(Tt ) < r(Tt+1 ). Subtree stealing from tree Tti may occur O(log m) times over all iterations. Since the heights of the trees that steal from Tti are in ascending order (according to Lemma 7) and increment by one after each stealing. Consider a sequence of l trees with heights in ascending order. The PE dedicated to the smallest tree joins this sequence performing l iterations, but the total length of such sequences over all iterations is O(log m). Consider the “plains” of subsequent trees with equal height. Let l denote the sum of the plain sizes. A tree t in a plain is joined to its left neighbor with probability at least 1/4 (if its cit is 1 and that of its left neighbor is 0). Hence, the expected number of joins on plains is l/4. This means that, in expectation, the total plain size shrinks by a factor 3/4 in each iteration. Overall, O (log k) iterations suffice to remove all plains in expectation. To see that fringe cases are no problem note that also trees at the border of a plain are joined with probability at least 1/4, possibly higher since a tree at the left border of a plain is joined with probability 1/2. Furthermore, other join operations may merge plain but they never increase the number of trees in plains. Combining the results of Lemma 8 and the fact that we do not need to update pointers to right (left) spines we prove that the running time of this algorithm is O(log m+log k) in expectation. The work of the algorithm is O(k log m k ) in expectation, since the PE t (t = 2, . . . , k − 1) performs the number of 1 1 ), r(Tt+1 )). This iteration that is proportional to max(r(Tt−1 proves Theorem 3. The algorithm needs O(|I| log |T | |I| / log |T | |T | |I| ) work and O(log |T |) time using p = |I| log on a CREW PRAM. Note that our algorithm is optimal, since sequential union of T and | I requires Ω(|I| log |T |I| ) time in the worst case. See [12]. A. Selecting the Separators. The complexity of the algorithm depends on how we choose the separators. Once we have selected the separators we can split sequence I and tree T according to them. Depending on the selection of the separators we will perform either the insert or union phase. In Uniform Selection, we select p − 1 separators that split I into p disjoint equal-sized subsequences I = {I1 , I2 , . . . , Ip } Sp where i=1 Ii = I (we assume that |I| is divisible by p for simplicity). b) Selection with Double Binary Search: We adapt a technique used in parallel merge algorithms [13], [22] for our purpose. First, we select p − 1 separators S = hs1 , . . . , sp−1 i that split I into p equal parts. Next, we select p − 1 separators Tsep = ht1 , . . . , tp−1 i that divide the sequence represented by the tree T into equal parts. We store in each node of T the sizes of its subtrees in order to find these separators in logarithmic time. See the details in [7]. Now consider x ∈ S ∪ Tsep . The subsequence Ix of I includes all elements ≤ x but greater than y, the largest element in S ∪ Tsep that is less than x. Similarly, we define subtree Tx . We implicitly represent the subsequence Ix and subtree Tx by y and x. Each PE uses binary search to find y. For example, PE i calculates the implicit representation of Isi , Tsi , Iti , Tti . These searches take time at most O(log p), since S and Tsep are sorted and we can use binary search. Thus, we split I and T into 2p − 1 parts each: I = {Ix : x ∈ S ∪ Tsep } and T = {Tx : x ∈ S ∪ Tsep } respectively. Note that elements of two arbitrary subsequences from I ∪ T lay in disjoint ranges, except for Ix and Tx for the same x ∈ S ∪ Tsep . Also |Ix | ≤ |I|/p and |Tx | ≤ |T |/p, since the distances between neighboring separators in S and T are at most |I|/p and |T |/p, respectively. See Figure 5. VI. B ULK U PDATES We present a parallel data structure with bulk updates. First, we describe a basic concepts behind our data structure. Suppose we have an (a, b)-tree T and a sorted sequence I for the bulk update of T . Our parallel bulk update algorithm is based on the idea presented in [9] and consists of the three phases: split, insert/union and join. First, we choose a sorted sequence of separators S from I and T . Next, the split phase splits T into p trees using separators S. Afterwards, the insert/union phase inserts/unions elements of each subsequence of I to/with the corresponding 8 c) Split and Insert phases: First, we select p − 1 separators using uniform selection. Next, we split the tree T into p subtrees T1 , . . . , Tp using the parallel split algorithm from Section III. Finally, we insert the subsequence Ii into corresponding subtree Ti , for i = 1 . . . p, in O(|I|/p log |T |) time on a CREW PRAM. d) Split and Union phase: Suppose we selected the separators using selection with double binary search. First, we split the sequence I into subsequences I. Next, we split T into subtrees T . For each subtree Tx ∈ T we split T by the representatives y and x of Tx using the parallel split algorithm from Section III. Now each PE i unions Isi with Tsi and Iti with Tti (si , ti ∈ S ∪Tsep ) using the sequential union algorithm from Section II. x| This algorithm unions Ix ∈ I and Tx in O(|Ix | log |T |Ix | ) time. j) Methodology: We implemented our algorithms using C++. Our implementation uses the C++11 multi-threading library (implemented using the POSIX thread library) and an allocator tbb::scalable_allocator from the Intel Threading-Building Blocks (TBB) library. All binaries are built using g++-4.9.2 with the -O3 flag. We run our experiments on Intel Xeon E5-2650v2 (2 sockets, 8 cores with Hyper-Threading, 32 threads) running at 2.6 GHz with 128GB RAM. To decrease scheduling effects, we pin one thread to each core. Each test can be described by the size of an initial (4, 8)-tree (T ), the size of a bulk update (B), the number of iterations (I) and the number of processors (p). Each key is a 32bit integer. In the beginning of each test we construct an initial tree. During each iteration we perform an incremental bulk update. We use a uniform, skewed uniform, normal and increasing uniform distributions to generate an initial tree and bulk updates in most of the tests. The skewed distribution generates keys in smaller range than a uniform distribution. The increasing uniform distribution generates the keys of a bulk update such that the keys of the current bulk update are greater than the keys of the previous bulk updates. | Hence, the union phase can be done in O(|I|/p log |T |I| ) time, because |Ix | ≤ |I|/p and |Tx | ≤ |T |/p for any x ∈ S ∪ Tsep x| and because for |Tx | ≥ e|Ix |, |Ix | log |T |Ix | is maximized for the largest allowed value of |Ix |. For the remaining cases, we can use that the log term is bounded by a constant anyway. e) Join Phase: We join the trees T1 , . . . , Tk (k = p or 2p − 1) into the tree T in O(log p + log |T |) time on a CREW PRAM using the non-optimal parallel join algorithm from Section IV. We use the non-optimal version, because it maintains subtree sizes in nodes of trees. k) Split algorithms: We present a comparison of the sequential split algorithm and the parallel split algorithm from Section III. We split an initial tree into 31 trees using 30 sorted separators. The sequential algorithm splits the preconstructed tree into two trees using the first separator and the split operation from Section II-0b. Next, it continues to split using the second separator, and so on. Figure 6 shows the running times of the tests with a uniform distribution (other distributions have almost the same running times). The parallel split algorithm outperforms the sequential algorithm by a factor of 8.1. Also we run experiments with p = 16 and split an initial tree into 16 trees. The speed-up of the parallel split is 4.6. VII. O PERATIONS ON T WO T REES Theorem 5. Let U and T denote search trees (|U | ≤ |T |) that we identify with sets of elements. Let k = max{|U |, |T |} and n = max{k, p}. Search trees for U ∪ T (union), U ∩ T (intersection), U \ T (difference), and U 4 T (symmetric difference) can be computed in time O(k/p log nk + log n). Time of split, µs f) Union: Computing the union of two trees U and T can be implemented by viewing the smaller tree as a sorted sequence of insertions. Then we can extract the elements of U in sorted order using work O(k) and span O(log n). Adding the complexity of a bulk insertion from Theorem 4 we get total time O(k/p log nk + log n). g) Intersection: We perform a bulk search for the elements of U in T in time O(k/p log nk + log n) and build a search tree from this sorted sequence in time O(k/p + log n). h) Set Difference T \ U : If |T | ≥ |U | we can interpret U as a sequence of deletions. This yields parallel time O(k/p log nk + log n). If |U | > |T |, we first intersect U and T in time O(k/p log nk + log n) and then compute the set difference T \ U = T \ (T ∩ U ) in time O(k/p log nk + log n). i) Symmetric Difference: We use the results for union and difference and apply the definition U 4T = (U \T )∪(T \U ). 140 120 100 80 60 40 20 0 104 Sequential split Parallel split 105 106 Tree size 107 √ i Figure 6: Comparison of split algorithms. T = 10 , i = 8, . . . , 14, and p = 31 l) Join algorithms: We present a comparison of different join algorithms. We join 31 trees using the following three algorithms: (1) SJ is a sequential join algorithm. It joins the first tree to the second tree using join operation from Section II-0a. Next, it joins the result of previous join and VIII. E XPERIMENTS In this section, we evaluate the performance of our parallel (a, b)-trees and compare them to the several number of contestants. We also study our basic operations, join and split, in isolation. 9 Time of join, µs 20 SJ PPJ Visited nodes the third tree, and so on. (2) PPJ is a parallel pairwise join algorithm that joins pairs of trees in parallel from Section IV. (3) PJ is a parallel join algorithm from Section V. Figure 7 shows the running times of the tests with a uniform distribution (other distributions have almost the same running times). The PJ algorithm is worse than the SJ and the PPJ algorithm by a factors of 1.9 and 3.4, respectively. The PPJ algorithm has a speed-up of 1.8 compared to the SJ. This can be explained by the involved synchronization overhead. In the experiments with p = 16 and 16 trees the PPJ and SJ algorithms show the same running times. We explain this by the fact that hyperthreading advantages when there are a lot of dereferences of pointers and the number of trees is nearly doubled. PJ 5 106 Tree size 105 PJ PJ_SU 106 Tree size 107 √ i 10 , i = 4) PRBT is a Parallel Red-Black Tree [9]; 5) PBST is a Parallel Binary Search Tree [1] (we compile it using g++-4.8 compiler with Cilk support). Figure 9 shows the measurements of the tests with a uniform √ i distribution, where T = 100M, B = 16, 10 , i = 4, . . . , 14 (I = 10000 for B = 16, . . . , 100K and I = 4G/B for B = 316227, . . . , 10M ) and p = 16 (we use 16 cores, since the insert phase is cache-efficient and hyper-threading does not improve performance). We achieve relative speedup up to 12 over sequential (a, b)-trees. Even for very small batches of size 100 we observe some speedup. Note that the speed-ups of the join and split phases are less than 12. But they do not affect the total speed-up, since the time of the insertion phase dominates them. On average, our algorithms are 1.8 times faster than a PWBT. We outperform the PWBT since a subtree rebalancing (linear of the subtree size) can occur during an insert operation. Also our data structure is 5.5 times faster than a PRBT, 5.7 times faster than a PBST and 10.7 faster than a Seq. Note that the PRBT and the PBST failed in the last four tests due to the lack of memory space. Hence, we expect even greater speedup of our algorithms compare to them. For small batches, the speedup is larger which we attribute to the startup overhead of using Cilk. Additionally, we run the tests for the PS PPJ and the fastest competitor the PWBT with the same parameters using a normal, skewed uniform and increasing uniform distributions to generate bulk updates. They perform faster in these tests than in the tests with a uniform distribution due to the improved cache locality. Although a subtree rebalancings in PWBT last longer than in the tests with a uniform distributions, they occur less frequently. On average, the PS PPJ is 2.0, 2.6 and 2.1 times faster than the PWBT in tests with a normal, skewed uniform and increasing uniform distributions respectively. Figure 10 shows another comparison of the PS PPJ with the PWBT. This plot shows the worst-case guaranties of the PS PPJ. The spikes on the plot of the PWBT are due to the amortized cost of operations. We conclude that the PS PPJ is preferable in real-time applications where latency is crucial. 10 105 PPJ PPJ_SU Figure 8: Visited nodes of the join algorithms. T = 8, . . . , 14, and p = 31 15 0 104 200 180 160 140 120 100 80 60 40 20 4 10 SJ SJ_SU 107 √ i Figure 7: Comparison of join algorithms. T = 10 , i = 8, . . . , 14, and p = 31 Additionally, we measure the number of visited nodes during the course of the join algorithms to show the theoretical advantage of the the PJ algorithm over the the SJ and the PPJ algorithms. Figure 8 shows the results of the tests with two initial trees, which are built using a uniform and a skewed uniform(suffix ” SU”) distribution. The PJ algorithm visits significantly less nodes than the SJ algorithm (by a factor of 2.8) on the tests with a uniform distributions. But it visits almost the same number of nodes as the PPJ algorithm. The PJ SU algorithm visits less nodes than the SJ SU and the PPJ SU algorithms (by factor of 3.9 and 1.3, respectively). We explain this by the fact that a skewed uniform distribution constructs an initial tree that is split into 31 trees, such that the first tree is significantly higher than other trees. Therefore, the algorithms SJ and PPJ visit more nodes than the algorithm PJ during the access to a spine node by rank. This suggests that the PJ algorithm may outperform its competitors on instances with deeper trees and/or additional work per node (for example, an I/O operation per node in external B-tree). m) Comparison of parallel search trees: Here we compare our sequential and parallel implementations of search trees and four competitors: 1) Seq is a (4, 8)-tree with a sequential bulk updates from Section II-0c; 2) PS PPJ is a (4, 8)-tree with a parallel split phase, a union phase and a parallel pairwise join phase; 3) PWBT is a Parallel Weight-Balanced B-tree [8]; 10 Time per element, ns 105 104 PS_PPJ PWBT PRBT [12] Scott Huddleston and Kurt Mehlhorn, A new data structure for representing sorted lists, Acta Inf. 17 (1982), 157–184. [13] Joseph F. JaJa, An introduction to parallel algorithms, Addison Wesley Longman Publishing Co., Inc., Redwood City, CA, USA, 1992. [14] Haim Kaplan and Robert E. Tarjan, Purely functional representations of catenable sorted lists., 28th ACM Symp. on Theory of Computing (STOC), 1996, pp. 202–211. [15] Jyrki Katajainen, Efficient parallel algorithms for manipulating sorted sets, 17th Annual Computer Science Conf., U. of Canterbury, 1994, pp. 281–288. [16] Philip L Lehman and Bing Yao, Efficient locking for concurrent operations on B-trees, ACM Transactions on Database Systems (TODS) 6 (1981), no. 4, 650–670. [17] Kurt Mehlhorn and Peter Sanders, Algorithms and data structures: The basic toolbox, Springer, 2008. [18] Alistair Moffat, Ola Petersson, and Nicholas C. Wormald, Sorting and/by merging finger trees, Algorithms and Computation, LNCS, vol. 650, Springer, 1992, pp. 499–508. [19] Heejin Park and Kunsoo Park, Parallel algorithms for red-black trees, Theoretical Computer Science 262 (2001), 415 – 435. [20] Wolfgang Paul, Uzi Vishkin, and Hubert Wagener, Parallel dictionaries on 2–3 trees, 10th Interntaional Colloquium on Automata, Languages and Programming (ICALP), vol. 154, Springer, 1983, pp. 597–609. [21] Jason Sewall et al., PALM: Parallel architecture-friendly latch-free modifications to B+ trees on many-core processors, PVLDB 4 (2011), no. 11, 795–806. [22] Yossi Shiloach and Uzi Vishkin, Finding the maximum, merging, and sorting in a parallel computation model., J. Algorithms 2 (1981), 88– 102. Seq PBST 103 102 101 1 10 102 103 104 105 106 107 Bulk size Time of operation, s Figure 9: Bulk updates algorithms. 1.2 PS_PPJ PWBT 1.0 0.8 0.6 0.4 0.2 0.00 50 100 150 200 250 300 350 400 Number of operation Figure 10: Running time of all operations. T = 100M, B = 10M and I = 400 R EFERENCES [1] Guy E. Blelloch, Daniel Ferizovic, and Yihan Sun, Parallel ordered sets using join, CoRR abs/1602.02120 (2016). [2] Guy E. Blelloch and Margaret Reid-Miller, Fast set operations using treaps, 10th ACM Symposium on Parallel Algorithms and Architectures, SPAA, 1998, pp. 16–26. [3] Gerth S. Brodal, Christos Makris, and Kostas Tsichlas, Purely functional worst case constant time catenable sorted lists, ESA, LNCS, vol. 4168, Springer, 2006, pp. 172–183. [4] Nathan G. Bronson, Jared Casper, Hassan Chafi, and Kunle Olukotun, A practical concurrent binary search tree, 15th Symposium on Principles and Practice of Parallel Programming (PPoPP), ACM, 2010, pp. 257– 268. [5] Mark R. Brown and Robert E. Tarjan, A fast merging algorithm, J. ACM 26 (1979), no. 2, 211–226. [6] Mark R. Brown and Robert E. Tarjan, Design and analysis of a data structure for representing sorted lists, SIAM J. Comput. 9 (1980), no. 3, 594–614. [7] Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein, Introduction to algorithms, third edition, 3rd ed., The MIT Press, 2009. [8] Stephan Erb, Moritz Kobitzsch, and Peter Sanders, Parallel bi-objective shortest paths using weight-balanced B-trees with bulk updates, 13th Symposium on Experimental Algorithms (SEA), LNCS, vol. 8504, Springer, 2014, pp. 111–122. [9] Leonor Frias and Johannes Singler, Parallelization of bulk operations for STL dictionaries, Euro-Par Workshops, LNCS, vol. 4854, Springer, 2007, pp. 49–58. [10] Maurice Herlihy, Yossi Lev, Victor Luchangco, and Nir Shavit, A provably correct scalable skiplist, 10th International Conference On Principles Of Distributed Systems (OPODIS), 2006. [11] Lisa Higham and Eric Schenk, Maintaining B-trees on an EREW PRAM, Journal of Parallel and Distributed Computing 22 (1994), no. 2, 329– 335. 11
8cs.DS
A reliability-based approach for influence maximization using the evidence theory Siwar Jendoubi1 and Arnaud Martin2 arXiv:1706.10188v1 [cs.SI] 30 Jun 2017 1 2 LARODEC, University of Tunis, ISG Tunis, Avenue de la Liberté, Cité Bouchoucha, Le Bardo 2000, Tunisia [email protected] DRUID, IRISA, University of Rennes 1, Rue E. Branly, 22300 Lannion, France [email protected] Abstract. The influence maximization is the problem of finding a set of social network users, called influencers, that can trigger a large cascade of propagation. Influencers are very beneficial to make a marketing campaign goes viral through social networks for example. In this paper, we propose an influence measure that combines many influence indicators. Besides, we consider the reliability of each influence indicator and we present a distance-based process that allows to estimate the reliability of each indicator. The proposed measure is defined under the framework of the theory of belief functions. Furthermore, the reliability-based influence measure is used with an influence maximization model to select a set of users that are able to maximize the influence in the network. Finally, we present a set of experiments on a dataset collected from Twitter. These experiments show the performance of the proposed solution in detecting social influencers with good quality. Keywords: Influence measure, influence maximization, theory of belief functions, reliability, social network. 1 Introduction The influence maximization problem has attracted a great attention in these last years. The main purpose of this problem is to find a set of influence users, S, that can trigger a large cascade of propagation. These users are beneficial in many application domains. A well-known application is the viral marketing. Its purpose is to promote a product or a brand through viral propagation through social networks. Then, several research works were introduced in the literature [14,8,1,21] trying to find an optimal set of influence users in a given social network. However, the quality of the detected influence users stills always an issue that must be resolved. The problem of identifying influencers was first modeled as a learning problem by Domingos and Richardson [6] in 2001. Furthermore, they defined the customer’s network value, i.e. “the expected profit from sales to other customers he may influence to buy, the customers those may influence, and so on recursively” [6]. Moreover, they considered the market to be a social network of customers. Later in 2003, Kempe et al. [14] formulated the influence problem as an optimization problem. Indeed, they introduced two influence maximization models: the Independent Cascade Model (ICM) and the Linear Threshold Model (LTM). These models estimate the expected propagation size, σM , of a given node or set of nodes through propagation simulation models. Besides, [14] proved the NPHardness of the maximization of σM . Then, they proposed the greedy algorithm to approximate the set of nodes that maximizes σM . ICM and LTM just need the network structure to select influencers. However, these solutions are shown in [8] to be inefficient to detect good influencers. When studying the state of the art of the influence maximization problem, we found that most of existing works use only the structure of the network to select seeds. However, the position of the user in the network is not sufficient to confirm his influence. For example, he may be a user that was active in a period of time, then, he collected many connections, and now he is no longer active. Hence, the user’s activity is an interesting parameter that must be considered while looking for influencers. Besides to the user’s activity in the network, many other important influence indicators are not considered. Among these indicators, we found the sharing and tagging activities of network users. These activities allow the propagation of social messages from one user to another. Also, the tagging activity is a good indicator of the user’s importance in the network. In fact, more he is tagged in others’ posts, more he is important for them. Therefore, considering such influence behaviors will be very beneficial to improve the quality of selected seeds. To resolve the influencers quality issue, many influence indicators must be used together to characterize the influence that exerts one user on another [10]. An influence indicator may be the number of neighbors, the frequency of posting in the wall, the frequency of neighbor’s likes or shares, etc. Furthermore, a refined influence measure can be obtained through the fusion of two or more indicators. A robust framework of information fusion and conflict management that may be used in such a case is the framework of the theory of belief functions [23]. Indeed, this theory provides many information combination tools that are shown to be efficient [4,24] to combine several pieces of information having different and distinct sources. Other advantages of this theory are about uncertainty, imprecision and conflict management. In this paper, we tackle the problem of influence maximization in a social network. More specifically, our main purpose is to detect social influencers with a good quality. For this goal, we introduce a new influence measure that combines many influence indicators and considers the reliability of each indicator to characterize the user’s influence. The proposed measure is defined through the theory of belief functions. Another important contribution in the paper is that we use the proposed influence measure for influence maximization purposes. This solution allows to detect a set of influencers having a good quality and that can maximize the influence in the social network. Finally, a set of experiments is made on real data collected from Twitter to show the performance of the pro- posed solution against existing ones and to study the properties of the proposed influence measure. This paper is organized as follows: related works are reviewed in section 2. Indeed, we present some data-based works and existing evidential influence measures. Section 3 presents some basic concepts about the theory of belief functions. Section 4 is dedicated to explaining the proposed reliability-based influence measure. Section 5 presents a set of experiments showing the efficiency of the proposed influence measure. Finally, the paper is concluded in Section 6. 2 Related works The influence maximization is a relatively new research problem. Its main purpose is to find a set of k social users that are able to trigger a large cascade of propagation through the word of mouth effect. Since its introduction, many researchers have turned to this problem and several solutions are introduced in the literature [14,15,8,3,9]. In this section, we present some of these works. 2.1 Influence maximization models The work of Kempe et al. [14] is the first to define the problem of finding influencers in a social network as a maximization problem. In fact, they defined the influence of a given user or set of users, S, as the expected number of affected nodes, σM (S), i.e. nodes that received the message. Furthermore, they estimated this influence through propagation simulation models which are the Independent Cascade Model (ICM) and the Linear Threshold Model (LTM). Next, they used a greedy-based solution to approximate the optimal solution. Indeed, they proved the NP-Hardness of the problem. In the literature, many works were conducted to improve the running time when considering ICM and LTM. Leskovec et al. [17] introduced the Cost Effective Lazy Forward (CELF) algorithm that is proved to be 700 times faster than the solution of [14]. Kimura and Saito [16] proposed the Shortest-Path Model (SPM) which is a special case of the ICM. Bozorgi et al. [2] considered the community structure, i.e. a community is a set of social network users that are connected more densely to each other than to other users from other communities [22,26], in the influence maximization problem. The Credit Distribution model (CD) [8] is an interesting solution that investigates past propagation to select influence users. Indeed, it uses past propagation to associate to each user in the network an influence credit value. The influence spread function is defined as the total influence credit given to a set of users S from the whole network. The algorithm scans the data (past propagation) to compute the total influence credit of a user v for influencing its neighbor u. In the next step, the CELF algorithm [17] is run to approximate the set of nodes that maximizes the influence spread in the network. 2.2 Influence and theory of belief functions The theory of belief functions was used to measure the user’s influence in social networks. In fact, this theory allows the combination of many influence indicators together. Besides, it is useful to manage uncertainty and imprecision. This section is dedicated to present a brief description of existing works that use the theory of belief functions for measuring or maximizing the influence. An evidential centrality (EVC) measure was proposed by Wei et al. [25] and it was used to estimate the influence in the network. EVC is obtained through the combination of two BBAs defined on the frame {high, low}. The first BBA defines the evidential degree centrality and the second one defines the evidential strength centrality of a given node. A second interesting, work was also introduced to measure the evidential influence, it is the work of [7]. They proposed a modified EVC measure. It considers the actual node degree instead of following the uniform distribution. Furthermore, they proposed an extended version of the semi-local centrality measure [3] for weighted networks. Their evidential centrality measure is the combined BBA distribution of the modified semi-local centrality measure and the modified EVC. The works of [7] and [25] are similar in that, they defined their measures on the same frame of discernment, they used the network structure to define the influence. Two evidential influence maximization models are recently introduced by Jendoubi et al. [10]. They used the theory of belief functions to estimate the influence that exerts one user on his neighbor. Indeed, their measure fuses several influence indicators in Twitter like the user’s position in the network, the user’s activity, etc. This paper is based on our previous work [10]. However, the novelty of this paper is that we not only combine many influence indicators to estimate the user’s influence, but also we consider the reliability of each influence indicator in characterizing the influence. 3 Theory of belief functions In this section, we present the theory of belief functions, also called evidence theory or Dempster-Shafer theory. It was first introduced by Dempster [4]. Next, the mathematical framework of this theory was detailed by Shafer in his book “A mathematical theory of evidence” [23]. This theory is used in many application domains like pattern clustering [5,19] and classification [18,11,12]. Furthermore, this theory is used for analyzing social networks and measuring the user’s influence [7,25,10]. Let us, first, define the frame of discernment which is the set of all possible decisions: Ω = {d1 , d2 , ..., dn } (1) The mass function, also called basic belief assignment (BBA), mΩ , defines the source’s belief on Ω as follows: 2Ω → [0, 1] A 7→ m (A) (2) such that 2Ω = {∅, {d1 } , {d2 } , {d1 , d2 } , ..., {d1 , d2 , ..., dn }}. The set 2Ω is called power set, i.e. the set of all subsets of Ω. The value assigned to the subset A ⊆ Ω, m (A), is interpreted as the source’s support or belief on A. The BBA distribution, m, must respect the following condition: X m (A) = 1 (3) A⊆Ω We call A focal element of m if we have m(A) > 0. The discounting procedure allows to consider the reliability of the information source. Let α ∈ [0, 1] be our reliability on the source of the BBA m, then the discounted BBA mα is obtained as follows: ( mα (A) = α.m (A) , ∀A ∈ 2Ω \ {Ω} (4) mα (Ω) = 1 − α. (1 − m (Ω)) The information fusion is important when we want to fuse many influence indicators together in order to obtain a refined influence measure. Then, the theory of belief functions presents several combination rules. The Dempster’s rule of combination [4] is one of these rules. It allows to combine two distinct BBA distributions. Let m1 and m2 be two BBAs defined on Ω, Dempster’s rule is defined as follows:  X m1 (B)m2 (C)      B∩C=A X , A ⊆ Ω \ {∅} (5) m1⊕2 (A) = 1− m1 (B)m2 (C)    B∩C=∅   0 if A = ∅ In the next section, we present some relevant existing influence measures and influence maximization models. 4 Reliability-based influence maximization In this paper, we propose an influence measure that fuses many influence indicators. Furthermore, we assume that these indicators may do not have the same reliability in characterizing the influence. Then, some indicators may be more reliable than the others. In this section, we present the proposed reliability-based influence measure, the method we use to estimate the reliability of each indicator and the influence maximization model we use to maximize the influence in the network. 4.1 Influence characterization Let G = (V, E) be a social network, where V is the set of nodes such that u, v ∈ V and E is the set of links such that (u, v) ∈ E. To estimate the amount of influence that exerts one user, u, on his neighbor, v, we start first by defining a set of influence indicators, I = {i1 , i2 , . . . , in } characterizing the influence. These indicators may differ from a social network to another. We note that we are considering quantitative indicators. Let us take Twitter as example, we can define the following three indicators: 1) the number of common neighbors between u and v, 2) the number of times v mentions u in a tweet, 3) the number of times v retweets from u. In the next step, we compute the value of each defined indicator for each link (u, v) in the network. Then, (u, v) will be associated with a vector of values. In a third step, we need to normalize each computed value to the range [0, 1]. This step is important as it puts all influence indicators in the same range. In this stage, we have a vector of values of the selected influence indicators:  W(u,v) = i(u,v)1 = w1 , i(u,v)2 = w2 , . . . , i(u,v)n = wn (6) The elements of W(u,v) are in the range [0, 1], i.e. w1 , w2 , . . . wn ∈ [0, 1], and we define a vector W(u,v) for each link (u, v) in the network. Next, we estimate a BBA for each indicator value and for each link. Then, if we have n influence indicators, we will obtain n BBA to model each of these indicators for a given link. Let us first, define Ω = {I, P } to be the frame of discernment, where I models the influence and P models the passivity of a given user. For a given link (u, v) and a given influence indicator i(u,v)j = wj , we estimate its BBA on the fame Ω as follows:   wj − min(u,v)∈E i(u,v)j     m(u,v)j (I) = max(u,v)∈E i(u,v)j − min(u,v)∈E i(u,v)j   max(u,v)∈E i(u,v)j − wj     m(u,v)j (P ) = max(u,v)∈E i(u,v)j − min(u,v)∈E i(u,v)j (7) (8) After this step, the influence that exerts a user u on his neighbor v is characterized by a set of n influence BBAs. In the next section, we present the method we use to estimate the reliability of each defined BBA. 4.2 Estimating reliability The selected influence indicators may do not have the same reliability in characterizing the user’s influence. Then, we estimate the reliability, αj , of each influence indicator. We assume that “the farthest from the others the indicator is, the less reliable it is”. For that purpose, we follow the approach introduced by Martin et al. [20] to estimate reliability. Besides, we note that this operator considers our assumption. In this section we detail the steps of [20] operator we used to estimate the reliability of each influence indicator in this paper. Let us consider the link (u, v), we have a set of n BBAs  to characterize the chosen influence indicators, m(u,v)1 , m(u,v)2 , . . . , m(u,v)n . Our purpose is to estimate the reliability of each indicator against the others. To estimate the reliability, αj , of the BBA m(u,v)j , we start by computing the distance between m(u,v)j and each BBA from the rest of n−1 BBAs that characterizes the influence   of u on v, i.e. m(u,v)1 , m(u,v)2 , . . . , m(u,v)j−1 , m(u,v)j+1 , . . . , m(u,v)n : δij = δ(mj , mi ) (9) To estimate these distances, we can use the Jousselme distance [13] as follows: r 1 T δ (mj , mi ) = (mj − mi ) D (mj − mi ) (10) = 2 |A∩B| such that D is an 2N × 2N matrix, N = |Ω| and D (A, B) = |A∪B| . = Next, we compute the average of all obtained distance values as follows: δj1 + δj2 + . . . + δjn (11) n−1 such that (δ1 , δ2 , . . . , δn ) are the distance values between m(u,v)j  and m(u,v)1 , m(u,v)2 , . . . , m(u,v)n , (δ (mj , mj ) = 0). We use the average distance Cj to estimate the reliability, αj , of the j th influence indicator in characterizing the influence of u on v as follows: Cj = αj = f (Cj ) (12) where f is a decreasing function. The function f can be defined as [20]:  1/λ λ αj = 1 − (Cj ) (13) where λ > 0. After applying all these steps, we obtain the estimated value of the BBA reliability, αj . To consider this reliability, we apply the discounting procedure described in equation (4). Then, we apply these steps for all defined BBAs on every link in the network. 4.3 Influence estimation After discounting all BBAs of each link in the network, we use them to estimate the influence that exerts one user on his neighbor. For this purpose, let us con α2 αn 1 sider the link (u, v) and its discounted set of BBAs mα , m , . . . , m (u,v)1 (u,v)2 (u,v)n . We define the global influence BBA that exerts u on v to be the BBA that fuses all discounted BBAs defined on (u, v). For this aim, we use the Dempster’s rule of combination (see equation (5)) to combine all these BBAs as follows: α2 αn 1 m(u,v) = mα (u,v) ⊕ m(u,v) ⊕ . . . ⊕ m(u,v) 1 2 n The BBA distribution m(u,v) is the result of this combination. (14) Consequently, we define the influence that exerts u on v to be the amount of belief given to {I} as: Inf (u, v) = m(u,v) (I) (15) The novelty of this evidential influence measure is that it considers several influence indicators in a social network and it takes into account the reliability of each defined indicator against the others. Our evidential influence measure can be considered as a generalization of the evidential influence measure introduced in the work of Jendoubi et al. [10]. To maximize the influence in the network, we need to define the amount of influence that exerts a set of nodes, S, on the hole network. It is the total influence given to S for influencing all users in the network. Then, we estimate the influence of S on a user v as follows [10]:   if v ∈ S 1X X (16) Inf (S, v) = Inf (u, x) .Inf (x, v) Otherwise  u∈S x∈IN (v)∪v where Inf (v, v) = 1 and IN (v) is the set of in-neighbors of v, i.e. if (u, v) is a link in the network then u is an in-neighbor of v. Next, we define the influence spread function that computes the amount of influence of S on the network as follows: σ (S) = X Inf (S, v) (17) v∈V To maximize the influence that exerts a set of users S on the network, we need to maximize σ (S), i.e. argmax σ (S). The influence maximization under the eviS dential model is demonstrated to be NP-Hard. Furthermore, the function, σ (S), is monotone and submodular. Proof details can be found in [10]. Consequently, a greedy-based solution can perform a good approximation of the optimal influence users set S. In such cases, the cost effective lazy-forward algorithm (CELF) [17] is an adaptable maximization algorithm. Besides, it needs only two passes of the network nodes and it is about 700 times faster than the greedy algorithm. More details about CELF-based solution used in this paper can be found in [10]. After the definition of the reliability-based evidential influence measure and the influence spread function, we move to the experiments. Indeed, we made a set of experiments on real data to show the performance of our solution. 5 Results and discussion This section is dedicated to the experiments. In fact, we crawled Twitter data for the period between the 08-09-2014 and 03-11-2014. Table 1 presents some statistics of the dataset. Table 1. Statistics of the data set [10] Nbr of users Nbr of tweets Nbr of follows Nbr of retweets Nbr of mentions 36274 251329 71027 9789 20300 To characterize the influence users on Twitter, we choose the following three influence indicators: 1) the number of common neighbors between u and v, 2) the number of times v mentions u in a tweet, 3) the number of times v retweets from u. Next, we apply the process described above in order to estimate the amount of influence that exerts each user u on his neighbor v in the network. To evaluate the proposed reliability-based solution, we compare the proposed solution to the evidential model of Jendoubi et al. [10]. Furthermore, we choose four comparison criteria to compare the quality of the detected influence users by each experimented model. Those criteria are the following: 1) number of accumulated follow, 2) number of accumulated mention, 3) number of accumulated retweet, 4) number of accumulated tweet. Indeed, we assume that an influence user with a good quality is a highly followed user, mentioned and retweeted several times and active in terms of tweets. In a first experiment, we compare the behavior of the proposed measure with fixed values of indicator reliability. Figure 1 presents the obtained results for two fixed values of αj = α, which are αj = α = 0 and αj = α = 0.2. In Figure 1 we have a comparison according to the four criteria, i.e. #Follow, #Mention, #Retweet and #Tweet shown in the y-axis of the sub-figures. We comapre the experimented measure using the set of selected seed for each value of αj . Besides, we fixe the size of the set S of selected influence users to 50 influencers, i.e. shown in the x-axis of each sub-figure. According to Figure 1, we notice that when α = 0 (red scatter plots), the proposed reliability-based model does not detect good influencers according to the four comparison criteria. In fact, the red scatter plot (α = 0) is very near to the x-axis in the case of the four criteria, which means that the detected influencer are neither followed, nor mentioned, nor retweeted. Besides, they are not very active in terms of tweets. However, we see a significant improvement especially when α = 0.2 (blue scatter plots). Indeed, the detected influencers are highly followed as they have about 14k accumulated followers in total. Besides, the model detected some highly mentioned and retweeted influencers, especially starting from the 25th detected influencer. Finally, the influence users selected when α = 0.2 are more active in terms of tweets than those selected when α = 0. This first experiment shows the importance of the reliability parameter, α, in detecting influencers with good quality. In fact, we see that when we consider that all indicators are totally reliable in characterizing the influence (the case when α = 0), we notice that the proposed model detects influencers with very bad quality. However, when we reduce this reliability (α = 0.2) we notice some quality improvement. In a second experiment, we used the process described in section 4.2 to estimate the reliability of each BBA in the network. Then, each BBA in our network Fig. 1. Comparison of the reliability-based evidential model with three α fixed value is discounted using its own estimated reliability parameter. We note that the parameter λ in equation (13) was fixed to λ = 5. To fix this value, we made a set of experiments with different values of λ and the best results are given with λ = 5. Furthermore, we compare our reliability-based evidential model (also called evidential model with discounting) to the evidential model proposed by [10]. In fact, this last model is the nearest in its principle to the proposed solution in this paper. Besides, we fixe the size of the set S of selected influence users to 50 influencers. Figure 2 presents a comparison between the two experimented models in terms of #Follow, #Mention, #Retweet and #Tweet (shown in the y-axis of the sub-figures). According to Figure 2, we note that the two experimented models detect good influencers (shown in the x-axis). However, we see that the best compromise between the four criteria is given by the proposed reliability-based evidential model. In terms of accumulated #Follow, we notice that the most followed influencers are detected by the evidential model, also, our reliability-based model detected highly followed influencers. In terms of #Mention, we see that the evidential model starts detecting some mentioned influencers after detecting about 10 users that are not mentioned. However, the proposed reliability-based model starts detecting highly mentioned users from the first detected influencer. Furthermore, we see a similar behavior in the sub-figure showing the accumulated #Retweet. Indeed, the proposed solution detects highly retweeted influencers from the first user. In the last sub-figure that presents the comparison according to the accumulated #Tweet, the best results are those of the proposed reliabilitybased model. This second experiment shows the effectiveness of the proposed reliabilitybased influence measure against the evidential influence measure of [10]. In fact, the best influence maximization model is always the model that detects the best influencers at first. Indeed, in an influence maximization problem we need generally to minimize the number of selected influencers in order to minimize the cost. For example, this is important in a viral marketing campaign as it helps the marketer to minimize the cost of his campaign and to maximize his benefits. Furthermore, our influence maximization solution gives the best compromise between the four criteria, i.e. #Follow, #Mention, #Retweet and #Tweet. From these experiments we can conclude that the reliability parameter is important if we want to measure the influence in a social network through the consideration of several influence indicators. Indeed, we may have some influence indicators that are more reliable in characterizing the influence of the others. Furthermore, the proposed solution is efficient in detecting influencers with a good compromise between all chosen influence indicators. 6 Conclusion To conclude, this paper introduces a new reliability-based influence measure. The proposed measure fuses many influence indicators in the social network. Furthermore, it can be adapted for several social networks. Another important Fig. 2. Comparison between the proposed reliability-based solution and the evidential model of [10] contribution of the paper is that we consider the reliability of each chosen influence indicator to characterize the influence. Indeed, we propose to apply a distance-based operator that estimates the reliability of each indicator against to the others and considers the assumption that “the farthest from the others the indicator is, the less reliable it is”. Besides, we use the proposed reliability-based measure with an existing influence maximization model. Finally, we present two experiments that show the importance of the reliability parameter and the effectiveness of the reliability-based influence maximization model against the evidential model of Jendoubi et al. [10]. Indeed, we obtained a good compromise in the quality of detected influencers and we had good results according to the four influence criteria, i.e. #Follow, #Mention, #Retweet and #Tweet. For future works, we will search to test our influence maximization solution on other social networks. Then, we will collect more data from Facebook and Google Plus and we will prove the performance of the proposed reliability-based influence maximization model. A second important perspective is about the influence maximization within communities. In fact, social networks are generally characterized by a community structure. Then, the main idea is to take profit from this characteristic and to search to select a minimum number of influence users and to minimize the time spent to detect them. References 1. Aslay, C., Barbieri, N., Bonchi, F., Baeza-Yates, R.: Online topic-aware influence maximization queries. In: Proceedings of the 17th International Conference on Extending Database Technology (EDBT). pp. 24–28 (March 2014) 2. Bozorgi, A., Haghighi, H., Zahedi, M.S., Rezvani, M.: Incim: A community-based algorithm for influence maximization problem under the linear threshold model. Information Processing and Management 000, 1–12 (2016) 3. Chen, D., Lü, L., Shang, M.S., Zhang, Y.C., Zhou, T.: Identifying influential nodes in complex networks. Physica A: Statistical mechanics and its applications 391(4), 1777–1787 (2012) 4. Dempster, A.P.: Upper and Lower probabilities induced by a multivalued mapping. Annals of Mathematical Statistics 38, 325–339 (1967) 5. Denœux, T., Sriboonchitta, S., Kanjanatarakul, O.: Evidential clustering of large dissimilarity data. Knowledge-Based Systems 106, 179–195 (2016) 6. Domingos, P., Richardson, M.: Mining the network value of customers. In: Proceedings of KDD’01. pp. 57–66 (2001) 7. Gao, C., Wei, D., Hu, Y., Mahadevan, S., Deng, Y.: A modified evidential methodology of identifying influential nodes in weighted networks. Physica A 392(21), 5490–5500 (November 2013) 8. Goyal, A., Bonchi, F., Lakshmanan, L.V.S.: A data-based approach to social influence maximization. In: Proceedings of VLDB Endowment. pp. 73–84 (August 2012) 9. Jendoubi, S., Martin, A., Liétard, L., Ben Hadj, H., Ben Yaghlane, B.: Maximizing positive opinion influence using an evidential approach. In: Poceeding of the 12th international FLINS conference (August 2016) 10. Jendoubi, S., Martin, A., Liétard, L., Ben Hadj, H., Ben Yaghlane, B.: Two evidential data based models for influence maximization in twitter. Knowledge-Based Systems 121, 58–70 (2017) 11. Jendoubi, S., Martin, A., Liétard, L., Ben Yaghlane, B.: Classification of message spreading in a heterogeneous social network. In: Proceeding of IPMU. pp. 66–75 (July 2014) 12. Jendoubi, S., Martin, A., Liétard, L., Ben Yaghlane, B., Ben Hadj, H.: Dynamic time warping distance for message propagation classification in twitter. In: Proceeding of ECSQARU. pp. 419–428 (July 2015) 13. Jousselme, A.L., Grenier, D., Bossé, E.: A new distance between two bodies of evidence. Information Fusion 2, 91–101 (2001) 14. Kempe, D., Kleinberg, J., Tardos, E.: Maximizing the spread of influence through a social network. In: Proceedings of KDD’03. pp. 137–146 (August 2003) 15. Kempe, D., Kleinberg, J., Tardos, E.: Influential nodes in a diffusion model for social networks. In: Prceedings of the 32th International Colloquium on Automata, Languages and Programming. pp. 1127–1138 (2005) 16. Kimura, M., Saito, K.: Tractable models for information diffusion in social networks. In: Proceedings of the 10th european conference on Principles and Practice of Knowledge Discovery in Databases: PKDD. pp. 259–271 (2006) 17. Leskovec, J., Krause, A., Guestrin, C., Faloutsos, C., VanBriesen, J., Glance, N.: Cost-effective outbreak detection in networks. In: Proceedings of KDD’07. pp. 420– 429 (August 2007) 18. Liu, Z.g., Pan, Q., Dezert, J., Martin, A.: Adaptive imputation of missing values for incomplete pattern classification. Pattern Recognition 52, 85–95 (2016) 19. Liu, Z.g., Pan, Q., Dezert, J., Mercier, G.: Credal c-means clustering method based on belief functions. Knowledge-Based Systems 74, 119–132 (2015) 20. Martin, A., Jousselme, A.L., Osswald, C.: Conflict measure for the discounting operation on belief functions. In: International Conference on Information Fusion. pp. 1003–1010. Cologne, Germany (juillet 2008) 21. Mohamadi-Baghmolaei, R., Mozafari, N., Hamzeh, A.: Trust based latency aware influence maximization in social networks. Engineering Applications of Artificial Intelligence 41, 195–206 (March 2015) 22. Mumu, T.S., Ezeife, C.I.: Discovering community preference influence network by social network opinion posts mining. In: Procedings of DaWaK. pp. 136–145 (2014) 23. Shafer, G.: A mathematical theory of evidence. Princeton University Press (1976) 24. Smets, P., Kennes, R.: The Transferable Belief Model. Artificial Intelligent 66, 191–234 (1994) 25. Wei, D., Deng, X., Zhang, X., Deng, Y., Mahadeven, S.: Identifying influential nodes in weighted networks based on evidence theory. Physica A 392(10), 2564– 2575 (Mai 2013) 26. Zhou, K., Martin, A., Pan, Q., Liu, Z.g.: Median evidential c-means algorithm and its application to community detection. Knowledge-Based Systems 74, 69–88 (2015)
2cs.AI
arXiv:1503.07423v5 [math.ST] 26 Aug 2016 The cylindrical K -function and Poisson line cluster point processes B Y J ESPER M ØLLER Department of Mathematical Sciences, Aalborg University, 9220 Aalborg, Denmark [email protected] FARZANEH S AFAVIMANESH Department of Statistics, Faculty of Mathematical Sciences, Shahid Beheshti University, 19834 Tehran, Iran [email protected] AND JAKOB G ULDDAHL R ASMUSSEN Department of Mathematical Sciences, Aalborg University, 9220 Aalborg, Denmark [email protected] S UMMARY The analysis of point patterns with linear structures is of interest in many applications. To detect anisotropy in such cases, in particular in case of a columnar structure, we introduce a functional summary statistic, the cylindrical K-function, which is a directional K-function whose structuring element is a cylinder. Further we introduce a class of anisotropic Cox point processes, called Poisson line cluster point processes. The points of such a process are random displacements of Poisson point processes defined on the lines of a Poisson line process. Parameter estimation based on moment methods or Bayesian inference for this model is discussed when the underlying Poisson line process is latent. To illustrate the methodologies, we analyze twoand three-dimensional point pattern data sets. The three-dimensional data set is of particular interest as it relates to the minicolumn hypothesis in neuroscience, claiming that pyramidal and other brain cells have a columnar arrangement perpendicular to the surface of the brain. Some key words: Anisotropy; Bayesian inference; Directional K-function; Minicolumn hypothesis; Poisson line process; Three-dimensional point pattern analysis. 1. I NTRODUCTION Frequently in the spatial point process literature, isotropy, i.e., distributional invariance under rotations about a fixed location in space, is assumed, though it is often unrealistic. Anisotropy of spatial point processes has usually been studied by summarizing the information of observed pairs of points, including the use of directional K-functions or related densities (Ohser & Stoyan, 1981; Stoyan & Beneš, 1991; Stoyan, 1991; Stoyan & Stoyan, 1995; Guan et al., 2006; Illian et al., 2008; Redenbach et al., 2009), spectral and wavelet methods (Mugglestone & Renshaw, 1996; Rosenberg, 2004; Nicolis, Mateu & D’Ercole, 2010), and geometric anisotropic pair correlation functions (Møller & Toftaker, 2014). The applications considered in these references 2 J. M ØLLER , F. S AFAVIMANESH , AND J. G. R ASMUSSEN Figure 1. Poisson line cluster process: Left panel: A simulated realization of a Poisson line cluster point process within a three-dimensional box. The realizations of the Poisson line process (solid lines) and the Poisson point processes on the lines (circles) are also shown. The dotted lines indicate how the points on the lines have been displaced to new positions (filled circles) and they specify the clusters. Right panel: The same simulated realization of a Poisson line cluster point process and different choices of cylinders centered at different points of the process. except Redenbach et al. (2009) and Illian et al. (2008) are for two-dimensional but not threedimensional point patterns. There are point patterns where points lie approximately along straight lines, cf. the examples of applications and references in Møller & Waagepetersen (2016), called point patterns with linear structures. This paper focuses on detecting and modelling such point patterns observed within a bounded subset of Rd , d ≥ 2, where the cases d = 2 and d = 3 are of main interest. In particular we study columnar structures. Section 2 introduces the cylindrical K-function, a directional K-function whose structuring element is a cylinder which is suitable for detecting anisotropy caused by columnar or other linear structures in spatial point patterns. This is an adapted version of the space-time K-function (Diggle et al., 1995; Gabriel & Diggle, 2009). Section 3 concerns a new class of point processes, Poisson line cluster point processes, whose points cluster around a Poisson line process. The left panel in Figure 1 illustrates how such a process is constructed: lines are generated from an anisotropic Poisson line process, independent stationary Poisson point processes are generated on the lines, and their points are randomly displaced, resulting in the Poisson line cluster point process. We consider the Poisson lines and the points on the lines as latent, so the clusters of the Poisson line cluster point process are also hidden. Section 3 also discusses a moment based approach and a simulation-based Bayesian approach for inference, where in the latter case we estimate both the parameters of the model and the missing lines. Sections 2-3 apply our methodology to the data sets in Figure 2. The left panel shows a twodimensional point pattern data set recorded by Mugglestone & Renshaw (1996), namely the locations of 110 chapels in the Welsh Valleys, United Kingdom, where the clear linear orientation is caused by four more or less parallel valleys. For a three-dimensional point pattern data set it is often difficult to detect anisotropy by eye, but the cylindrical K-function will be useful, as illustrated later in connection to the right panel, which shows the locations of 623 pyramidal cells from the Brodmann area 4 of the grey matter of the human brain collected by the neuroscientists The cylindrical K -function and Poisson line cluster point processes 3 ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● x(2) ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● x(3) ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●● ●● ● ● ● ●● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ●● ●● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ●● ● ●● ●● ● ● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ●● ●●● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ●●●● ● ●● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ● ●● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ●●● ● ● ● ● ●● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●● ● ● ●●● ●● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● x(2) ● x(1) x(1) Figure 2. Data sets: Left panel: Locations of 110 chapels in Wales, United Kingdom, observed in a square window (normalized to a unit square). Right panel: Nucleolus of 623 pyramidal cells in an observation window of size 508 × 138 × 320 µm3 . at the Center for Stochastic Geometry and Bioimaging, Denmark. According to the minicolumn hypothesis (Mountcastle, 1957), brain cells, mainly pyramidal cells, should have a columnar arrangement perpendicular to the pial surface of the brain, i.e., a columnar arrangement parallel to the x(3) -axis indicated in Figure 2, and this should be highly pronounced in Brodmann area 4. However, this hypothesis has been much debated, see Rafati et al. (2016) and the references therein. We use the chapel data set mainly for illustrative purposes and for comparison with previous work. Investigations of the minicolumn hypothesis have so far only been done in two dimensions except for the three-dimensional analysis in Rafati et al. (2016). The present paper details the methodology and provides a more thorough analysis of the pyramidal cell data set, shedding further light on the validity of the minicolumn hypothesis. Throughout Sections 2–3 we assume stationarity. Section 4 discusses the choice of a cylinder as the structuring element of the K-function and extensions of this function and the Poisson line cluster point process in a non-stationary setting. T HE CYLINDRICAL K - FUNCTION 2·1. Setting Throughout this paper we make the following assumptions and use the following notation. Unless otherwise stated, we consider a stationary point process X defined on Rd , with finite and positive intensity ρ, and where we view X as a locally finite random subset of Rd . Here stationarity means that the distribution of X is invariant under translations in Rd , and ρ|B| is the mean number of points from X falling in any Borel set B ⊆ Rd of volume |B|. We assume that X has a pair correlation function g(x) defined for all x ∈ Rd . Intuitively, if x1 , x2 ∈ Rd are distinct locations and B1 , B2 are infinitesimally small sets of volumes dx1 , dx2 and containing x1 , x2 , respectively, then ρ2 g(x1 − x2 ) dx1 dx2 is the probability for X having a point in each 2. 4 J. M ØLLER , F. S AFAVIMANESH , AND J. G. R ASMUSSEN of B1 and B2 . For further details on spatial point processes, see Møller & Waagepetersen (2004) and the references therein. We view any vector x = (x(1) , . . . , x(d) ) ∈ Rd as a column vector, and kxk = {(x(1) )2 + . . . + (x(d) )2 }1/2 as its length. For ease of presentation, we assume that no pair of distinct points {x1 , x2 } ⊂ X is such that u = (x1 − x2 )/kx1 − x2 k is perpendicular to the x(d) -axis. This will happen with probability one for the models considered later in this paper. Let Sd−1 = {u = (u(1) , . . . , u(d) ) ∈ Rd : kuk = 1} be the unit sphere in Rd and ed = (0, . . . , 0, 1) its top point. Denote o = (0, . . . , 0) the origin of Rd . Consider the d-dimensional cylinder with midpoint o, radius r > 0, height 2t > 0, and direction ed : n o C(r, t) = x = (x(1) , . . . , x(d) ) ∈ Rd : (x(1) )2 + · · · + (x(d−1) )2 ≤ r2 , |x(d) | ≤ t . For u ∈ Sd−1 , denoting Ou an arbitrary d × d rotation matrix such that u = Ou ed , then Cu (r, t) = Ou C(r, t) is the d-dimensional cylinder with midpoint o, radius r, height 2t, and direction u. 2·2. The cylindrical K-function Recall that the second order reduced moment measure K with structuring element B ⊂ Rd , a bounded Borel set, is given by Z K(B) = g(x) dx B (Møller & Waagepetersen, 2004, Section 4.1.2). Ripley’s K-function (Ripley, 1976, 1977) is obtained when B is a ball and it is not informative about any kind of anisotropy in a spatial point pattern. To detect preferred directions of linear structures in a spatial point pattern, in particular a columnar structure, we propose a cylinder as the structuring element and define the cylindrical K-function in the direction u by Z Ku (r, t) = g(x) dx, u ∈ Sd−1 , r > 0, t > 0. (1) Cu (r,t) Intuitively, ρKu (r, t) is the mean number of further points in X within the cylinder with midpoint at the typical point of X, radius r, and height 2t in the direction u. For example, a stationary Poisson process is isotropic, has g = 1, and Ku (r, t) = 2ωd−1 rd−1 t, where ωd−1 = π (d−1)/2 /Γ{(d + 1)/2} is the volume of the (d − 1)-dimensional unit ball. For d = 3, K(0,0,1) is similar to the space-time K-function in Diggle et al. (1995) and Gabriel & Diggle (2009), when considering the x(3) -axis as time and the (x(1) , x(2) )-plane as space. If W ⊂ Rd is an arbitrary Borel set with 0 < |W | < ∞, then by standard methods (Møller & Waagepetersen, 2004, Section 4.1.2)   X 1 E 1{x1 ∈ W, x2 − x1 ∈ Cu (r, t)} , r > 0, t > 0, (2) Ku (r, t) = 2 ρ |W | x1 ,x2 ∈X: x1 6=x2 where 1 denotes the indicator function, and by stationarity the right-hand side does not depend on the choice of W . This provides a more general definition of Ku , since (2) does not require The cylindrical K -function and Poisson line cluster point processes 5 the existence of the pair correlation function. Equation (2) becomes useful when deriving nonparametric estimates in Section 2·3. 2·3. Non-parametric estimation Given a bounded observation window W ⊂ Rd and an observed point pattern {x1 , . . . , xn } ⊂ W with n ≥ 2 points, we consider non-parametric estimates of the form X b u (r, t) = 1 wu (xi , xj )1{xj − xi ∈ Cu (r, t)}. K ρb2 i6=j (3) Here ρb2 is a non-parametric estimate of ρ2 and wu is an edge correction factor. If X is isotropic, b u (r, t). On the other hand, Ku (r, t) does not depend on u and this should affect the choice of K as illustrated in the right panel of Figure 1 and in Section 2·4, to detect a preferred direction of linearity in a spatial point pattern, we suggest using an elongated cylinder with t > r and b u (r, t) to indicate the considering different directions u. Then we expect a largest value of K preferred direction, but a careful choice of r and t may be crucial, cf. Section 4. Furthermore, since Ku = K−u , we need only to consider the case where u = (u(1) , . . . , u(d) ) is on the upper unit-sphere, i.e., u(d) ≥ 0. Specifically, we use ρb2 = n(n − 1)/|W |2 , see e.g. Illian et al. (2008), and the translation correction factor (Ohser & Stoyan, 1981) wu (x1 , x2 ) = 1/|W ∩ Wx2 −x1 | (4) where Wx denotes translation of the set W by a vector x ∈ Rd . Then, by Lemma 4.2 in Møller & Waagepetersen (2004), if ρb2 is replaced by ρ2 in (3), we have an unbiased estimate of Ku . As in Figures 1–2, if W is rectangular with sides parallel to the axes and of lengths a1 , . . . , ad > 0, |W ∩ Wx2 −x1 | = d Y (i) (i) {ai − |x2 − x1 |}, x1 , x2 ∈ W, i=1 (i) where xj denotes the i’th coordinate of xj (j = 1, 2). For d = 3, W = [0, a1 ] × [0, a2 ] × [0, a3 ], and u = (0, 0, 1), another choice is a combined correction factor   (3) (3) 1 + 1 2x1 − x2 6∈ [0, a3 ]    w(0,0,1) (x1 , x2 ) = (1) (1) (2) (2) a3 a1 − x2 − x1 a2 − x2 − x1 where the numerator is a temporal correction factor and the denominator is the reciprocal of a spatial correction factor; similarly we construct combined correction factors when u = (1, 0, 0) or u = (0, 1, 0). Instead of this spatial correction factor, which is of a form similar to (4), Diggle et al. (1995) used an isotropic correction factor, but this is only appropriate if X is isotropic in the (x1 , x2 )-plane. The temporal correction factor is the same as that used in Diggle et al. (1995). We prefer the translation correction factor (4), since this does not restrict the shape of W and the choice of u. In a simulation study with d = 3, W = [0, 1]3 , and X a Poisson line cluster point process as defined in Section 3, we obtained similar results when using the translation and the combined correction factors. 6 J. M ØLLER , F. S AFAVIMANESH , AND J. G. R ASMUSSEN 120 105 90 75 60 135 45 150 30 165 15 180 0 195 345 210 330 225 315 240 255 270 285 300 Figure 3. Chapel data set: The left panel shows the b (cos ϕ,sin ϕ) (r, t) versus ϕ for non-parametric estimate K four different combinations of r and t with the curves from the top to the bottom corresponding to (r, t) = (0.2, 0.4), (0.2, 0.3), (0.1, 0.3), (0.1, 0.2) and the two vertical lines corresponding to 113◦ and 124◦ . The middle b (cos ϕ,sin ϕ) (r, t) versus r for different valpanel shows K ues of ϕ and with t = 0.3 with the solid curves from the top to the bottom corresponding to 20◦ , 45◦ , 170◦ , and the dotted curve corresponding to ϕ = 117◦ . The right panel shows a non-parametric estimate of the point pair orientation distribution function with r1 = 0.05 and r2 = 0.15. For more details, see Section 2·4. 2·4. Examples Non-parametric estimates of the cylindrical K-function for the two-dimensional chapel data set and the three-dimensional pyramidal cell data set are shown in Figures 3 and 4, respectively. Below we comment on these plots. Further examples are given in Rafati et al. (2016). To detect the main direction in the chapel point pattern, the left panel in Figure 3 shows, for four different combinations of r and t, i.e., (0.1, 0.2), (0.1, 0.3), (0.2, 0.3) and (0.2, 0.4), b u (r, t) versus ϕ, where u = (cos(ϕ), sin(ϕ)). These four curves are approxiplots of K mately parallel, and a similar behaviour for other choices of r = 0.05, 0.1, 0.15, 0.2 and t = 0.15, 0.2, 0.25, 0.3, 0.35, 0.4 with t > 2r was observed. In a previous analysis, Møller & Toftaker (2014) estimated the orientation of the chapel point pattern to be between 113◦ and 124◦ . This interval, which is specified by the vertical lines in the left panel of Figure 3, is in close b u (r, t)-curves. The middle panel in Figure 3 shows plots agreement with the maximum of the K b u (r, t) versus r when t = 0.3. For the dotted curve in the middle panel, ϕ = 117◦ is the avof K erage of the four maximum points of ϕ corresponding to the four curves in the left panel, while for the three other curves in the middle panel, values of ϕ not included in the interval [113◦ , 124◦ ] have been chosen. The clear difference between the dotted curve and the other curves indicates a preferred direction in the point pattern which is about 117◦ . This is also confirmed by the right panel in Figure 3, which shows a non-parametric estimate of the point pair orientation distribution function given by equation (14.53) in Stoyan & Stoyan (1995) and implemented in spatstat (Baddeley & Turner, 2005). This is a kernel estimate which considers the direction for each pair of observed points that lie more than r1 = 0.05 and less than r2 = 0.15 units apart. For other values of r2 ≤ 0.27 we reached similar conclusions, but for higher values of r2 the pair orientation distribution function did not show a clear preferred direction in the data. 7 0 −10000 −20000 K Data −K CSR 10000 20000 The cylindrical K -function and Poisson line cluster point processes 0 5 10 15 20 r Figure 4. Pyramidal cell data set: Non-parametric estimates b u (r, 80) − 160πr2 versus r when t = 80 and the cylinK der is along the x(1) -axis (dotted line), the x(2) -axis (dotted line), or the x(3) -axis (solid line). The grey region specifies a 95% simultaneous rank envelope computed from 999 simulations under complete spatial randomness. For more details, see Section 2·4. By the minicolumn hypothesis, the pyramidal cell data set has a columnar arrangement in the direction of the x(3) -axis indicated in Figure 2 (Rafati et al., 2016). Figure 4 shows that the cylindrical K-function is able to detect this kind of anisotropy: The three curves are b u (r, 80) − 160πr2 for 0 < r ≤ 20 and u parallel to one of the three main axes, where 160πr2 K is the value of Ku (r, 80) under complete spatial randomness, i.e. a stationary Poisson point process model; we only make this comparison in order to see any deviations from complete spatial randomness. The solid curve corresponding to u = (0, 0, 1), i.e., when the direction of the cylinder is along the x(3) -axis, is clearly different from the two other cases where u = (1, 0, 0) or u = (0, 1, 0). The grey region is a so-called 95% simultaneous rank envelope (Myllymäki et al., 2016) obtained from 999 simulated realizations under complete spatial randomness; Myllymäki et al. (2016) recommended 2499 simulations, however, for the cylindrical K-function considered in Figure 4, 999 simulations seemed sufficient since results were produced that were similar to those using 2499 simulations. Roughly speaking, under complete spatial randomness, each of the estimated cylindrical K-functions is expected to be within the grey region with estimated probability 95%. While the curves for u = (1, 0, 0) and u = (0, 1, 0) are completely within the grey region, the curve for u = (0, 0, 1) is clearly outside for a large range of r-values. In fact, for the null hypothesis of complete spatial randomness, considering the rank envelope test (Myllymäki b u (r, 80) when 0 < r ≤ 20 and u = (0, 0, 1), the p-value is estimated to et al., 2016) based on K be between 0.1% and 0.18%, showing a clear deviation from the null hypothesis of complete spatial randomness. These examples illustrate that the cylindrical K-function is a useful functional summary statistic for detecting preferred directions and columnar structures in a spatial point pattern. Particularly, for the pyramidal cell data set and in accordance to the minicolumn hypothesis, there is a pronounced columnar arrangement in the direction of the x(3) -axis. J. M ØLLER , F. S AFAVIMANESH , AND J. G. R ASMUSSEN 8 3. T HE P OISSON LINE CLUSTER POINT PROCESS 3·1. Definition of Poisson line cluster point processes Motivated by the analysis in Section 2·4, in particular that of the pyramidal cell data set, we now introduce a model for a point process X with columnar structure. It is a hierarchical construction, using various latent processes specified briefly in (A1)–(C1) and later in more detail in (A2)–(C2), while X is given in (D1) and (D2) below; the left panel of Figure 1 is helpful in this connection: It consists of generating: (A1) a Poisson line process L = {l1 , l2 , . . .} of lines li , i.e., infinite, directed, and straight lines; only parts of these lines are shown in Figure 1; (B1) on each line li , a Poisson process Qi illustrated by unfilled points in Figure 1; (C1) a new point process Xi obtained by random displacements in Rd of the points in Qi illustrated by filled points in Figure 1; (D1) finally, X as the superposition of all the Xi . Then we call X a Poisson line cluster point process, since its points cluster around the Poisson lines, and we call each Xi a cluster. In connection to the more detailed conditions (A2)–(D2) we need the following notation. Let · denote the usual inner product on Rd . For u ∈ Sd−1 , let u⊥ = {x ∈ Rd : x · u = 0} be the hyperplane perpendicular to u and containing o, λu⊥ the (d − 1)-dimensional Lebesgue measure on u⊥ , and pu⊥ (x) = x − (x · u)u the orthogonal projection of x ∈ Rd onto u⊥ . Let H = e⊥ d and λ = λe⊥ , i.e., H is the hyperplane perpendicular to the x(d) -axis. Further, let k be a density d function with respect to Lebesgue measure on Rd−1 . As in Section 2·1, suppose we have specified for each u ∈ Sd−1 a d × d rotation matrix Ou such that u = Ou ed . We then define a density with respect to λu⊥ by ku⊥ {Ou (x(1) , . . . , x(d−1) , 0)} = k(x(1) , . . . , x(d−1) ), (x(1) , . . . , x(d−1) ) ∈ Rd−1 . In other words, when considering coordinates with respect to the d − 1 first columns in Ou , the distribution under ku⊥ is the same as under k. Furthermore, for the line process L we use the so-called phase representation (Chiu et al., 2013) and assume that with probability one, L has no line contained in H. Thereby a line l = l(y, u) in L corresponds to its direction u ∈ Sd−1 and its intersection point y in H. Thus L = {l1 , l2 , . . .} can be identified by a point process Φ = {(y1 , u1 ), (y2 , u2 ), . . .} ⊂ H × Sd−1 such that li = l(yi , ui ) (i = 1, 2, . . .) and Φ ⊂ H × (Sd−1 \ H) almost surely. In addition to (A1)–(D1) we assume that: (A2) Φ is a Poisson process with intensity measure βλ(dy)M (du), where β > 0 is a parameter and M is a probability measure on SRd−1 describing the direction of a typical line, where M (Sd−1 ∩ H) = 0; we assume that 1/|u(d) | M (du) < ∞, where u(d) is the last coordinate of u; this assumption will be needed when we later in (7) specify the intensity and rose of directions of the line process; (B2) conditional on Φ, we have that Q1 , Q2 , . . . are independent stationary Poisson processes on l1 , l2 , . . ., respectively, with the same intensity α > 0; (C2) conditional on Φ and Q1 , Q2 , . . ., we have that X1 , X2 , . . . are independent point processes and each Xi is obtained by independent and identically distributed random displacements of the points in Qi following the density ku⊥ ; thus Xi is a Poisson process on Rd with i intensity function Λi (x) = αku⊥ {pu⊥ (x − yi )}, i i x ∈ Rd ; (5) The cylindrical K -function and Poisson line cluster point processes 9 P (D2) hence the superposition X = ∪∞ i=1 Xi is a Cox process driven by Λ = i Λi , i.e. X conditional on Φ is a Poisson process with intensity function Λ(x) = α ∞ X ku⊥ {pu⊥ (x − yi )}, i i x ∈ Rd . (6) i=1 Some comments are in order. The processes L, Λ, and X are stationary, the distribution of L is given by (β, M ), and the distribution of X is determined by (β, M, α, k). By (C2), conditional on L, for each line li ∈ L and each point qij ∈ Qi , there is a corresponding point xij ∈ Xi such that the random shift zij = xij − qij follows the density ku⊥i . We could have defined the Poisson line cluster point process by letting the displacements follow a distribution on Rd rather than a hyperplane, or more precisely by letting zij follow a density ku⊥ {pu⊥ (zij )}fui {zij − pui (zij )}, i i zij ∈ Rd , where fui is a density function with respect to Lebesgue measure on the line li − yi = {tui : t ∈ R}. However, since the part of the displacements running along the line li just corresponds to independent displacements of a stationary Poisson process, this will just result in a new stationary Poisson process with the same intensity, see, e.g., Section 3.3.1 in Møller & Waagepetersen (2004), and so there is essentially no difference. The fact in (D2) that X is a Cox process becomes important for the calculations and the statistical methodology considered later in this paper. 3·2. Intensity and rose of directions for the Poisson line process We have specified the distribution of the Poisson line process L by (β, M ). This is useful for computational reasons, but when interpreting results it is usually more natural to consider the intensity and the rose of directions of L, which we denote by ρL and R, respectively. Formal definitions of these concepts are given in Appendix A, where it is shown that for any Borel set B ⊆ Sd−1 , Z Z Z (d) (d) ρL = β 1/|u | M (du), R(B) = 1/|u | M (du) 1/|u(d) | M (du). (7) B In words, ρL is the mean length of lines in L within any region of unit volume in Rd , and R is the distribution of the direction of a typical line in L, see, e.g., Chiu et al. (2013). Equation (7) establishes a one-to-one correspondence between (ρL , R) and (β, M ), where Z Z Z (d) (d) |u | R(du) |u(d) | R(du). (8) β = ρL |u | R(du), M (B) = B Consequently, we can choose ρL as any positive and finite parameter, and R as any probability measure on Sd−1 . Moreover, β ≤ ρL where the equality only holds when R is concentrated with probability one at ±ed . We call this special case the degenerate Poisson line cluster point process. For the rose of directions, we later use a von Mises–Fisher distribution with concentration parameter κ ≥ 0 and mean direction µ ∈ Sd−1 . This has a density f (· | µ, κ) with respect to the surface measure on Sd−1 : f (u | µ, κ) = cd (κ) exp(κµ · u), cd (κ) = κd/2−1 , (2π)d/2 Id/2−1 (κ) u ∈ Sd−1 , (9) 10 J. M ØLLER , F. S AFAVIMANESH , AND J. G. R ASMUSSEN where Id denotes the modified Bessel function of the first kind and order d. Note that L and X are then isotropic if and only if κ = 0, in which case the choice of µ plays no role. For κ > 0, the directions of the lines in L are concentrated around µ, and so the clusters in X have preferred direction µ. When µ = ±ed , in the limit as κ → ∞, we obtain the degenerate Poisson line cluster point process. 3·3. Finite versions of the Poisson line cluster point process and simulation Suppose we want to simulate the Poisson line cluster point process within a bounded region W ⊂ Rd , i.e. the restriction XW = X ∩ W . Then we need a finite approximation of Φ, which will also be used when we later discuss Bayesian inference, as follows. Consider a bounded region Wext ⊇ W and let S = {(y, u) ∈ H × Sd−1 : l(y, u) ∩ Wext 6= ∅} be the set of all lines hitting Wext . We want to choose Wext as small as possible but so that it is very unlikely that for some line li ∈ L with (yi , ui ) 6∈ S, Xi has a point in W . Then our finite approximation is ΦS = Φ ∩ S, and (i) we simulate ΦS , and (ii) conditional on ΦS we make an approximate simulation of XW as a Poisson process with intensity function X ΛW (x) = α ku⊥ {pu⊥ (x − y)}, x ∈ W, (10) (y,u)∈ΦS cf. (6). We detail (i)–(ii) below. Here (ii) is rather straightforward: Suppose we have simulated ΦS and consider any (yi , ui ) ∈ ΦS . The projection of W onto li is the bounded set lW,i = {x ∈ li : (x + u⊥ i ) ∩ W 6= ∅}. In accordance to (B2), we simulate a Poisson process YW,i with intensity α on lW,i . Displacing the points in YW,i as described in (C2) we obtain a Poisson process XW,i with intensity function (5) but restricted to ∪x∈lW,i (x + u⊥ ). The approximate simulation of XW is then given by ∪(yi ,ui )∈ΦS XW,i ∩ W . In (i) we assume for simplicity and specificity that R follows the von Mises–Fisher density (9). Denote νd−1 the surface measure on Sd−1 . Then (8) implies that βλ(dy)µ(dµ) = ρL f (y | µ, κ)|u(d) |λ(dy)νd−1 (du), i.e., ΦS is a Poisson process on S with intensity function χ(y, u | ρL , µ, κ) = ρL |u(d) |f (u | µ, κ) with respect to the measure λ(dy)νd−1 (du). First, we therefore simulate the Poisson distributed counts #ΦS with mean ρL I(µ, κ) where Z Z I(µ, κ) = |u(d) |f (u | µ, κ)dλ(dy)νd−1 (du) = λ(Ju )f (u | µ, κ)νd−1 (du) where Ju = {y ∈ H : l(y, u) ∩ Wext 6= ∅}. Second, we simulate each (y, u) ∈ ΦS with density proportional to |u(d) |f (u | µ, κ) for y ∈ Ju and zero otherwise. Here we use rejection sampling. For example, if d = 2 and Wext = [−a, a]2 is a square centered at the origin, then for u = (cos ϕ, sin ϕ), we have Ju = Jϕ × {0} with  [−a cot ϕ − a, a cot ϕ + a] , 0 < ϕ ≤ π/2 or π < ϕ ≤ 3π/2, Jϕ = (11) [a cot ϕ − a, a − a cot ϕ] , π/2 ≤ ϕ < π or 3π/2 ≤ ϕ < 2π. The cylindrical K -function and Poisson line cluster point processes 11 Further,  λ(Ju ) = 2a + 2a cot ϕ, 0 < ϕ ≤ π/2 or π < ϕ ≤ 3π/2, 2a − 2a cot ϕ, π/2 ≤ ϕ < π or 3π/2 ≤ ϕ < 2π, (12) and Z π/2 Z π (sin ϕ − cos ϕ)f (u | µ, κ) dϕ (sin ϕ + cos ϕ)f (u | µ, κ) dϕ + 2a I(µ, κ) =2a π/2 0 Z 3π/2 − 2a Z 2π (sin ϕ + cos ϕ)f (u | µ, κ) dϕ − 2a π (sin ϕ − cos ϕ)f (u | µ, κ) dϕ, 3π/2 (13) which can be evaluated by numerical methods. Furthermore, for µ = (cos θ, sin θ) and y = (y (1) , y (2) ), the unnormalized density |u(d) |f (u | µ, κ) = 1(y (1) ∈ Jϕ )| sin ϕ| exp{κ cos(ϕ − θ)} is just with respect to Lebesgue measure dy (1) dϕ on R × [0, 2π). Finally, when doing rejection sampling, we propose ϕ from f (· | µ, κ) and y (1) from the uniform distribution on Jϕ , and accept (ϕ, y (1) ) with probability | sin ϕ|. 3·4. Moments of the Poisson line cluster point process Since X is a Cox process with driving random intensity Λ, moment properties of X are determined by moment properties of Λ. This section focuses on first and second order moments. The Poisson line cluster point process X has intensity ρ and pair correlation function g ρ = E{Λ(o)}, ρ2 g(x) = E{Λ(o)Λ(x)}, x ∈ Rd . (14) Appendix B verifies that ρ = αρL (15) and 1 g(x) = 1 + ρL Z ku⊥ ∗ k̃u⊥ {pu⊥ (x)} R(du), x ∈ Rd , (16) where k̃u⊥ {pu⊥ (x)} = ku⊥ {−pu⊥ (x)} and ∗ denotes convolution, i.e., Z ku⊥ ∗ k̃u⊥ {pu⊥ (x)} = ku⊥ {pu⊥ (x) − y}k̃u⊥ (y) λu⊥ (dy). Thus g > 1, reflecting the clustering of the Poisson line cluster point process. Evaluation of the integral in (16) may require numerical methods. For example, if k(·) = f (· | σ 2 ) is the density of the (d − 1)-dimensional zero-mean isotropic normal distribution with variance σ 2 > 0, then   (d−1)/2 ku⊥ ∗ k̃u⊥ {pu⊥ (x)} = exp −kpu⊥ (x)k2 / 4σ 2 / 4πσ 2 . (17) 3·5. Moment based inference The likelihood for a parametric Poisson line cluster point process model is complicated because of the hidden line process and the hidden point processes on the lines, though it can be approximated using a missing data Markov chain Monte Carlo approach, see, e.g., Møller & Waagepetersen (2004). A Bayesian Markov chain Monte Carlo approach is used in Section 3·6 where the missing data is included into the posterior. Simpler procedures for parameter estimation are composite likelihood (Guan, 2006; Møller & Waagepetersen, 2007) and minimum contrast methods (Diggle & Gratton, 1984) based on (15)-(16). Since g is hard to compute in 12 J. M ØLLER , F. S AFAVIMANESH , AND J. G. R ASMUSSEN general, this section focuses on such simple procedures in the special case of a degenerate Poisson line cluster point process which e.g. is a relevant model for the pyramidal cell data set shown in Figure 2. For specificity we assume as in (17) that k(·) = f (· | σ 2 ). Then the unknown parameters are β = ρL > 0, α > 0, and σ 2 > 0. Suppose a realization of XW is observed within a region of the product form W = D × I, where D ⊂ Rd−1 and I ⊂ R are bounded sets. To estimate the unknown parameters we notice the following. Let XI denote the projection of X ∩ (Rd−1 × I) onto H. Since we consider a degenerate Poisson line cluster point process, the x(d) -coordinates of the points in XW are independent and identically distributed uniform points on I which are independent of XI . Thus XI is a sufficient statistic for (ρL , α, σ 2 ). Note that XI is a Cox process driven by the random intensity function Γ(x) = α|I| ∞ X f (x − yi | σ 2 ), x ∈ H, i=1 where Φ = {(y1 , ed ), (y2 , ed ), . . .} can be identified by the stationary Poisson process {y1 , y2 , . . .} on H with intensity ρL . Therefore XI is a modified Thomas process (Møller & Waagepetersen, 2004) with intensity ρI = ρ|I| and by (16)-(17) pair correlation function   kxk2 1 − , x ∈ H. exp gI (x) = 1 + 4σ 2 (4πσ 2 )(d−1)/2 ρL Parameter estimation based on (ρI , gI ) and using a composite likelihood or a minimum contrast method is straightforward (Møller & Waagepetersen, 2007). Then, when checking a fitted Thomas process, we should not reuse the intensity and the pair correlation function. Below we use instead the functional summary statistics the empty space function F , the nearest-neighbour function G, and the J-function (Møller & Waagepetersen, 2004). As an example, for the three-dimensional pyramidal cell data set in Figure 2 in accordance with the minicolumn hypothesis, we consider a degenerate Poisson line cluster point process. This has a columnar arrangement in the direction of the x(3) -axis and the observation window is of the same form as described above with D = [0, 508] × [0, 138] and I = [0, 320]. The first panel in Figure 5 shows the empirical cumulative distribution function of the x(3) -coordinates of the pyramidal cell point pattern data set; there is no clear indication of a deviation from a uniform distribution, in agreement with our stationarity assumption. When fitting the modified Thomas process for the projected point pattern onto D, for both composite likelihood and minimum contrast estimation, we used the spatstat (Baddeley & Turner, 2005) function kppm. We obtained the minimum contrast estimates ρ̂L = 0.024, α̂ = 0.37/320 = 0.0012, and σ̂ 2 = 15.04, and similar estimates were obtained by a composite likelihood method. The three last panels in Figure 5 show the non-parametricly estimated F , G, and J-functions for the projected pyramidal cell point pattern onto D, together with 95% simultaneous rank envelopes computed from 4999 simulated point patterns under the fitted Thomas process. The p-values for the rank envelope test (Myllymäki et al., 2016) for G, F , and Jfunctions are within the intervals [0.851, 0.852], [0.732, 0.733], and [0.623, 0.625], respectively, providing no evidence against the fitted model. 3·6. Bayesian inference Suppose a non-empty realization XW = {x1 , . . . , xn } is our data, where W ⊂ Rd is a bounded observation window, and we model X as a Poisson line cluster point process with ku⊥ (y) = f (y | σ 2 ) and R following the von Mises–Fisher density f (u | µ, κ) given by (9). As The cylindrical K -function and Poisson line cluster point processes 13 Figure 5. Summary statistics for the pyramidal cell point pattern data set: Empirical cumulative distribution function of the x(3) -coordinates of the pyramidal cell point pattern data set (top left), and non-parametric estimates of G (top right), F (bottom left), and J (bottom right) for the projected pyramidal cell point pattern onto D (solid lines), together with 95% simultaneous rank envelopes (gray regions) computed from 4999 simulated point patterns under the fitted Thomas process. in Section 3·3 we need a finite representation ΦS of Φ which we treat as a latent process. This section considers a Bayesian Markov chain Monte Carlo missing data approach for the missing data ΦS and the unknown parameters ρL > 0, µ ∈ Sd−1 , κ > 0, α > 0, and σ 2 > 0 . Imagining that also a realization ΦS = {(y1 , u1 ), . . . , (yk , uk )} had been observed, we detail below the calculation of the likelihood l[ρL , µ, κ, α, σ 2 | {x1 , . . . , xn }, {(y1 , u1 ), . . . , (yk , uk )}]. For the parameters, we assume independent prior densities p(ρL ), p(µ), p(κ), p(α), p(σ 2 ); further prior specifications are given below. Hence the posterior density is p[ρL , µ, κ, α, σ 2 , {(y1 , u1 ), . . . , (yk , uk )} | {x1 , . . . , xn }] ∝ l[ρL , µ, κ, α, σ 2 | {x1 , . . . , xn }, {(y1 , u1 ), . . . , (yk , uk )}]p(ρL )p(µ)p(κ)p(α)p(σ 2 ). (18) As a first ingredient of the likelihood, using the approximation ΦS of Φ, we also approximate XW by a finite Cox process XW,S with driving random intensity function ΛW given by (10) with 14 J. M ØLLER , F. S AFAVIMANESH , AND J. G. R ASMUSSEN ku⊥ (·) = f (· | σ 2 ). Conditional on ΦS , XW,S is absolutely continuous with respect to the unit rate Poisson process on W , with density Y  Z n 2 2 ΛW (x | ΦS , α, σ ) dx f [{x1 , . . . , xn } | ΦS , α, σ ] = exp |W | − ΛW (xi | ΦS , α, σ 2 ) W i=1 (19) for finite point configurations {x1 , . . . , xn } ⊂ W . For the second ingredient of the likelihood, notice that the distribution of ΦS is absolutely continuous with respect to the distribution of a natural reference process Φ0,S defined as the Poisson process on S with intensity function χ0 (y, u) = |u(d) |Γ(d/2)/(2π d/2 ) with respect to the measure λ(dy)νd−1 (du), cf. Section 3·3. This reference process corresponds to the case of an isotropic Poisson line process with unit intensity. The density of ΦS with respect to the distribution of Φ0,S is f [{(y1 , u1 ), . . . , (yk , uk )} | ρL , µ, κ] Y Z k χ(yj , uj | ρL , µ, κ) {χ0 (y, u) − χ(y, u | ρL , µ, κ)} λ(dy)νd−1 (du) = exp χ0 (yj , uj ) S j=1 for finite point configurations {(y1 , u1 ), . . . , (yk , uk )} ⊂ S. That is, using the notation in Section 3·3, f [{(y1 , u1 ), . . . , (yk , uk )} | ρL , µ, κ] ( ) k Y 2π d/2 ∝ exp {−ρL I(µ, κ)} ρL f (uj | µ, κ)1(yj ∈ Juj ) , Γ(d/2) (20) j=1 where we have omitted a constant not depending on the parameters. Combining (19)–(20) we obtain the approximate likelihood l[ρL ,µ, κ, α, σ 2 | {x1 , . . . , xn }, {(y1 , u1 ), . . . , (yk , uk )}]  Y Z n 2 = exp |W | − ΛW (x | ΦS , α, σ ) dx ΛW (xi | ΦS , α, σ 2 ) W × exp {−ρL I(µ, κ)} i=1 k Y j=1 ( ) 2π d/2 ρL f (uj | µ, κ)1(yj ∈ Juj ) . Γ(d/2) (21) Inserting this into (18), we notice that the posterior density is analytically intractable. A hybrid Markov chain Monte Carlo algorithm or Metropolis within Gibbs algorithm, see e.g. Gilks et al. (1996), for posterior simulations is proposed in Appendix C. Briefly, the algorithm alternates between updating each of the parameters and the line process, using a birth-death-move Metropolis Hastings algorithm for the line process. To illustrate the Bayesian approach we consider the two-dimensional chapel data set in the left panel of Figure 2, using a uniform prior for both µ = (cos ϕ, sin ϕ) and σ 2 , and flat conjugated gamma priors for ρL and α, see Figure 6. Our posterior results for ρL , ϕ, and α were sensitive to the choice of prior distribution for κ. For small values of κ, i.e., values less than 30, meaningless posterior results appeared, since ϕ was approximately uniform, and for ϕ close to zero, ρL tended to zero and hence α tended to infinity. On the other hand, very large values of κ caused a very concentrated posterior distribution for ϕ. As a compromise, after some experimentation, we fixed κ = 40. The cylindrical K -function and Poisson line cluster point processes 15 Figure 6. Prior and posterior distributions: The first four panels show the unnormalized prior density (solid line) and histogram for the posterior distribution of ρL , ϕ, α, and σ 2 , respectively. The final panel shows the histogram for the posterior distribution of ρ. For this model an extension of the observation window W = [−.5, .5]2 to Wext = [−0.55, 0.55]2 seemed large enough to account for edge effects. For the posterior simulations we used 200,000 iterations, where one iteration consists of updating all the parameters and the missing data. We considered trace plots, which have been omitted here, for the parameters and information about the missing data, indicating that a burn-in of 5000 iterations is sufficient. There is a clear distinction between the simulated posterior results for the parameters and the priors, cf. the first four panels in Figure 6. The posterior mean of ϕ (115.02◦ ) is in close agreement with the result of 117◦ found in Section 2·4, and σ is unlikely to be larger than 0.02, indicating that the points are rather close to the lines and that the choice of Wext makes sense. The final panel in Figure 6 shows a good agreement between the number of chapels (110) and the posterior mean of the intensity ρ (103.7), though there is some uncertainty in the posterior distribution of ρ. Moreover, the posterior means of ρL and α are 12.9 and 8.4, respectively, which combined with (15) result in the estimate 108.4 for ρ. To illustrate the usefulness of the Bayesian method in detecting linear structures, Figure 7 shows a posterior kernel estimate of the density of lines within W . The estimate visualizes where the hidden lines could be, i.e., the lighter areas, and overall they agree with the point pattern of chapels, which is superimposed in the figure, though in the upper right corner of the observation window there is some doubt about whether there should be a single or two clusters of points. Specifically, the estimate is obtained from 100 posterior iterations with an equal spacing, and it is the average of binary pixel representations of the line process, where a pixel has value 1 if it is intersected by a line, and value 0 otherwise. 4. D ISCUSSION 4·1. Choice of structuring element Ripley’s K-function has a ball as structuring element but this is not useful for detecting anisotropy. Directional K-functions have been suggested using a sector annulus (Ohser & Stoyan, 1981) or a double cone (Redenbach et al., 2009) as the structuring element, while we have suggested a cylinder. Another suggestion could be an ellipsoid. A detailed comparison of the cylindrical K-function with the K-function in Redenbach et al. (2009) using a double cone as the structuring element is given in a technical report by F. Safavimanesh and C. Redenbach from 2016. They conclude that in situations where the anisotropy is pronounced, a good choice of structuring element may be important and will depend on the application at hand. In case of geometric anisotropy (Møller & Toftaker, 2014), an ellipsoid is 16 J. M ØLLER , F. S AFAVIMANESH , AND J. G. R ASMUSSEN Figure 7. Posterior kernel estimate of the density of lines. For comparison, the chapel point pattern data set is superimposed. appropriate; when there is a columnar structure as under the Poisson line cluster point process model or in the data sets considered in this paper, an elongated cylinder is appropriate; while if regular point process models are compressed, then a double cone is appropriate. F. Safavimanesh and C. Redenbach emphasize the importance of an appropriate choice of the scale and shape parameters used to specify the structuring element, i.e. r and t in case of Ku (r, t). They notice that prior information, e.g., the diameter of the clusters/mini-columns of points in case of the pyramidal cells (Rafati et al., 2016), can be used to determine interesting ranges of r values. 4·2. Non-stationary case In some applications it is relevant to use a non-constant intensity function ρ(x). Suppose we assume second order intensity reweighted stationarity (Baddeley, Møller & Waagepetersen, 2000) and g(x) still denotes the pair correlation function. This means intuitively, that if x1 , x2 ∈ Rd are distinct locations and B1 , B2 are infinitesimally small sets of volumes dx1 , dx2 and containing x1 , x2 , respectively, then ρ(x1 )ρ(x2 )g(x1 − x2 ) dx1 dx2 is the probability for X having a point in each of B1 and B2 . Our definition (1) still applies, while (2) becomes   X 1{x1 ∈ W, x2 − x1 ∈ Cu (r, t)}  1 E , r > 0, t > 0, Ku (r, t) = |W | ρ(x1 )ρ(x2 ) x1 ,x2 ∈X: x1 6=x2 which in turn can be used when deriving non-parametric estimates. Assumption (B2) may be relaxed to obtain a non-stationary Poisson line cluster point process model for X, assuming that for each line li the Poisson process Qi has intensity function αi (x) = α(x) for x ∈ li , where α is a non-negative function which is locally integrable on any line in Rd . Then (6) should be replaced by Λ(x) = ∞ X α{(x · ui )ui + yi }ku⊥ {pu⊥ (x − yi )}, I i x ∈ Rd . (22) i=1 However, this non-stationary extension of the model will be harder to analyze, e.g., moment results as established in Section 3·4 for the stationary case will in general not easily extend, The cylindrical K -function and Poisson line cluster point processes 17 and it turns out that the model is not second order intensity reweighted stationary except in a special case discussed below. Moreover, while our statistical methodology in Section 3·4 can be straightforwardly extended, the Bayesian computations in Section 3·6 become harder. In (22) assume that the intensity function α(yR(1) , . . . , y (d−1) , x(d) ) = α(x(d) ) does not depend on y = (y (d) , . . . , y (d−1) , 0) ∈ H. Let c = I α{x(d) } dx(d) . Then, using a notation as in Section 3·4, it can be shown that X is second order intensity reweighted stationary, XI is still a Neyman–Scott process, while the x(d) -coordinates of the points in XW are independent and identically distributed with density α{x(d) }/c, and they are independent of XW . Therefore statistical inference simply splits into modelling the density α{x(d) }/c based on the x(d) -coordinates of the points in XW and inferring (c, ρL , σ 2 ) by considering XI along similar lines as in Section 3·4 but with α{x(d) }|I| replaced by c. Acknowledgments Supported by the Danish Council for Independent Research | Natural Sciences, and by the Centre for Stochastic Geometry and Advanced Bioimaging, funded by the Villum Foundation. We thank Jens Randel Nyengaard, Karl-Anton Dorph-Petersen, and Ali H. Rafati for collecting the three-dimensional pyramidal cell data set. A PPENDIX A: I NTENSITY AND ROSE OF DIRECTION FOR A P OISSON LINE PROCESS First we give the definition of the intensity ρL and the rose of direction R for a general stationary line process L = {l1 , l2 , . . .} in Rd . Let | · |1 denote one-dimensional Lebesgue measure, dt Lebesgue measure on the real line, A ⊆ Rd an arbitrary Borel set with volume |A| ∈ (0, ∞), and an B ⊆ Sd−1 arbitrary Borel set. Then by definition and since L is stationarity, ! ∞ X ρL = E |li ∩ A|1 /|A| (23) i=1 does not depend on the choice of A, and provided 0 < ρL < ∞, (∞ ) X R(B) = E |li ∩ A|1 1(ui ∈ B)/ (ρL |A|) (24) i=1 does not depend on the choice of A and is seen to be a probability measure. Second we assume that L is a stationary Poisson line process as in Section 3·1. Then ) (∞ ) (∞ Z X X 1(yi + tui ∈ A, ui ∈ B) dt E |li ∩ A|1 1(u ∈ B) = E i=1 (25) i=1 Z Z Z 1(y + tu ∈ A, u ∈ B) dt λ(dy) M (du) =β Z = β|A| 1/|u(d) | M (du). (26) (27) B Here (25) follows from the phase representation of L (see Section 3·1), (26) from the Slivnyak– Mecke theorem for the Poisson process Φ (see e.g. Møller & Waagepetersen (2004)), and (27) since |u(d) | is the Jacobian of the mapping (t, y) 7→ y + tu with (t, y) ∈ R × H. When B = Sd−1Rwe obtain from (23) and (27) the first equation in (7). This together with 0 < β < ∞ and 0 < Sd−1 1/|u(d) | M (du) < ∞ imply that 0 < ρL < ∞. Thereby the second first equation in (7) follows for any Borel set B ⊆ Sd−1 . 18 J. M ØLLER , F. S AFAVIMANESH , AND J. G. R ASMUSSEN A PPENDIX B: M OMENT RESULTS FOR A P OISSON LINE CLUSTER POINT PROCESS For Section 3·4 it remains to verify (15)–(16). Proof of (15): By (6), (14), and the Slivnyak–Mecke theorem for the Poisson process, Z Z ρ = αβ ku {−pu (y)} λ(dy) M (du). (28) Let Id be the d × d identity matrix, and od−1 the origin in Rd−1 . For u ∈ Sd−1 , let A(u) = vv T where v is the subvector consisting of the first d − 1 coordinates of u and T denotes transpose of a vector or matrix. The Jacobian of the linear transformation  pu (y) = Id − uuT y, y ∈ H, is the square root of the determinant of the (d − 1) × (d − 1) matrix n oT   Id − uuT (Id−1 od−1 )T Q = Id − uuT (Id−1 od−1 )T  = (Id−1 od−1 ) Id − uuT (Id−1 od−1 )T = Id−1 − A(u). Since A(u) is symmetric of rank at most one and has trace tr{A(u)} = {u(1) }2 + . . . + {u(d−1) }2 = 1 − {u(d) }2 , the determinant of Q is 1 − tr{A(u)} = {u(d) }2 . Combining this with (28) we obtain Z Z ρ = αβ ku (−y)/|u(d) | λu (dy) M (du). Thereby (15) easily follows from the first identity in (7). Proof of (16): By (6) and (14),   X ρ2 g(x) = α2 E  ku⊥ {pu⊥ (−yi )}ku⊥ {pu⊥ (x − yj )} i i j j i6=j " 2 +α E # X ku⊥ {pu⊥ (−yi )}ku⊥ {pu⊥ (x − yi )} i i i i i = ρ2 + α2 β Z ku⊥ {pu⊥ (−y)}ku⊥ {pu⊥ (x − y)} λ(dy) M (du) (29) using the extended Slivnyak–Mecke theorem for the Poisson process and the proof of (15) to obtain that the first expectation is equal to ρ2 , and the Slivnyak–Mecke theorem for the Poisson process to obtain that the second expectation is equal to the last term. Combining (15) and (29) with the result for the Jacobian considered above, we obtain (16). A PPENDIX C: H YBRID M ARKOV CHAIN M ONTE C ARLO ALGORITHM This appendix details the Markov chain Monte Carlo algorithm for the Bayesian approach considered in Section 3·6, with independent prior densities for the parameters and posterior density given by (18)–(21). As in Section 3·6, we consider conjugated gamma densities p(α) and p(ρL ), and denote their shape parameters by a1 and a2 and their inverse scale parameters by b1 and b2 , respectively. The remaining parameters have no (well-known) conjugate priors, cf. (19) and (20), and thus we consider generic prior densities p(µ), p(κ), and p(σ 2 ). The cylindrical K -function and Poisson line cluster point processes 19 In each iteration of the Markov chain Monte Carlo algorithm we update first each of the parameters and second the missing data. We use a Gibbs update for α respective ρL , noting that the conditional distribution of α given the R rest P is a gamma distribution with shape parameter a1 + n and inverse scale parameter b1 + W kj=1 f {pu⊥ (x − yj ) | σ 2 } dx, and the conditional j distribution of ρL given the rest is a gamma distribution with shape parameter a2 + k and inverse scale parameter b2 + I(µ, κ). Below we describe the individual proposals and Hastings ratios for the remaining parameters and the missing data (in the case of Section 3·6 where the value of κ is fixed, we can of course just ignore the update of κ described below). As usual, for each type of update, the proposal is accepted with probability min{1, R}, where R is the corresponding Hastings ratio. We denote (ρL , µ, κ, α, σ 2 , {(y1 , u1 ), . . . , (yk , uk )}) the current state of the algorithm, where n ≥ 1, k ≥ 1 (since k = 0 implies n = 0, which is not a case of interest), and l(yi , ui ) ∩ Wext 6= ∅, i = 1, . . . , k. For µ, κ, and σ 2 , we use Metropolis random walk updates, with a von Mises–Fisher pro2 ) and σ 02 ∼ N (σ 2 , σ 2 ), where posal µ0 ∼ f (· | µ, κ0 ) and normal proposals κ0 ∼ N (κ, σ0,1 0,2 2 , σ 2 > 0 are tuned so that the mean acceptance probabilities are between 20–45% (as κ0 , σ0,1 0,2 recommended in Roberts, Gelman & Gilks (1997)). The Hastings ratios for the acceptance probabilities are k   Y f (uj | µ0 , κ) p(µ0 ) 0 exp ρL I(µ, κ) − I(µ , κ) , Rµ = p(µ) f (uj | µ, κ) j=1 Rκ = 1(κ0 > 0) k   Y f (uj | µ, κ0 ) p(κ0 ) exp ρL I(µ, κ) − I(µ, κ0 ) , p(κ) f (uj | µ, κ) j=1 and k Rσ2 = 1(σ 02 > 0) X p(σ 02 ) exp α p(σ 2 ) Z j=1 Z − W 02 f {pu⊥ (x − yj ) | σ } dx W f {pu⊥ (x − yj ) | σ 2 } dx j Pk !Y n − yj ) | σ 02 } Pk − yj ) | σ 2 } (xi j=1 f {pu⊥ j j i=1 (xi j=1 f {pu⊥ j . For Rσ2 each integral is calculated by a simple Monte Carlo method after making a change of variables from x to its Cartesian coordinates in a system centered at yj and with axes given by uj and u⊥ j . For the missing data, we adapt the birth-death-move Metropolis-Hastings algorithm in Geyer & Møller (1994) as follows. Each of the birth/death/move proposals happens with probability 1/3 and consists of the following action. A birth proposal is the proposal of adding a new point (y, u), where u ∼ f (· | µ, κ) and y conditional on u is uniformly distributed on Ju . Then, as explained below, the Hastings ratio is Rbirth = ρL λ(Ju )|u(d) | 1{l(y, u) ∩ Wext 6= ∅} k+1    Y Z n 2} f {p (x − y) | σ ⊥ i u 1 + P . × exp −α f {pu⊥ (x − y) | σ 2 }dx k 2 W j=1 f {pu⊥ (xi − yj ) | σ } i=1 j (30) J. M ØLLER , F. S AFAVIMANESH , 20 AND J. G. R ASMUSSEN To stress the dependence on {(y1 , u1 ), . . . , (yk , uk )} and (y, u), write Rbirth = Rbirth (y1 , u1 , . . . , yk , uk ; y, u) (obviously, it also depends on ρL , α, σ 2 , and {x1 , . . . , xn }). A death proposal is the proposal of generating a uniform j ∈ {1, . . . , k} (provided k > 1; if k = 1, we do nothing and keep the current state) and deleting (yj , uj ). Then, as explained below, the Hastings ratio is Rdeath = 1/Rbirth (y1 , u1 , . . . , yj−1 , uj−1 , yj+1 , uj+1 . . . , yk , uk ; yj , uj ). (31) Finally, a move proposal is the proposal of selecting a uniform j ∈ {1, . . . , k} and replacing (yj , uj ) by (yj0 , u0j ), where u0j ∼ f (· | µ, κ) and yj0 conditional on u0j is uniformly distributed on Ju0j . Since this can be considered as first a death proposal and second a birth proposal, the Hastings ratio is Rmove = Rbirth (y1 , u1 , . . . , yj−1 , uj−1 , yj+1 , uj+1 . . . , yk , uk ; yj0 , u0j ) . Rbirth (y1 , u1 , . . . , yj−1 , uj−1 , yj+1 , uj+1 . . . , yk , uk ; yj , uj ) It remains to explain how we obtained the Hastings ratios (30)–(31), where we notice the following facts. The reference Poisson process Φ0,S has intensity measure ζ(dy, du) = |u(d) | Γ(d/2) λ(dy)νd−1 (du). 2π d/2 Further, conditional on the data XW = {x1 , . . . , xn } and the parameters ρL , µ, κ, α, σ 2 , the target process ΦS has density f [{(y1 , u1 ), . . . , (yk , uk )} | {x1 , . . . , xn }, α, σ 2 , ρL , µ, κ] ∝ f [{x1 , . . . , xn } | {(y1 , u1 ), . . . , (yk , uk )}, α, σ 2 ]f [{(y1 , u1 ), . . . , (yk , uk )} | ρL , µ, κ] with respect to the distribution of Φ0,S . Furthermore, if a birth (y, u) is proposed, then it has density f (y, u | µ, κ) = f (u | µ, κ)1(y ∈ Ju )/λ(Ju ) |u(d) |Γ(d/2)/(2π d/2 ) with respect to ζ. Consequently, by Geyer & Møller (1994), the Hastings ratio for the proposed birth is Rbirth = = f [{(y1 , u1 ), . . . , (yk , uk ), (y, u)} | {x1 , . . . , xn }, α, σ 2 , ρL , µ, κ] 1/(k + 1) × f [{(y1 , u1 ), . . . , (yk , uk )} | {x1 , . . . , xn }, α, σ 2 , ρL , µ, κ] f (y, u | µ, κ) 2π d/2 1 ρL f (u | µ, κ)1(y ∈ Ju ) Γ(d/2) (k + 1)f (y, u | µ, κ)    Y Z n 2 1 + P f {pu⊥ (xi − y) | σ }  × exp −α f {pu⊥ (x − y) | σ 2 }dx k 2} (x − y ) | σ f {p ⊥ W i j u j=1 i=1 j which is equal to (30). Thereby, refering again to Geyer & Møller (1994), we obtain (31). B IBLIOGRAPHY BADDELEY, A., M ØLLER , J. & WAAGEPETERSEN , R. (2000). Non- and semi-parametric estimation of interaction in inhomogeneous point patterns. Statistica Neerlandica 54, 329–350. BADDELEY, A. & T URNER , R. (2005). Spatstat: an R package for analyzing spatial point patterns. Journal of Statistical Software 12, 1–42. The cylindrical K -function and Poisson line cluster point processes 21 C HIU , S. N., S TOYAN , D., K ENDALL , W. S. & M ECKE , J. (2013). Stochastic Geometry and Its Applications. John Wiley and Sons, Chichester, 3rd ed. D IGGLE , P. J., C HETWYND , A., H ÄGGKVIST, R. & M ORRIS , S. (1995). Second order analysis of space-time clustering. Statistical Methods in Medical Research 4, 124–136. D IGGLE , P. J. & G RATTON , R. (1984). Monte Carlo methods of inference for implicit statistical models (with discussion). Journal of the Royal Statistical Society: Series B (Statistical Methodology) 46, 193–212. G ABRIEL , E. & D IGGLE , P. J. (2009). Second-order analysis of inhomogeneous spatio-temporal point process data. Statistica Neerlandica 63, 43–51. G EYER , C. & M ØLLER , J. (1994). Simulation procedures and likelihood inference for spatial point processes. Scandinavian Journal of Statistics 21, 359–373. G ILKS , W. R., R ICHARDSON , S. & S PIEGELHALTER , D. J. (1996). Markov Chain Monte Carlo in Practice. Chapman and Hall, London. G UAN , Y. (2006). A composite likelihood approach in fitting spatial point process models. Journal of the American Statistical Association 101, 1502–1512. G UAN , Y., S HERMAN , M. & C ALVIN , J. A. (2006). Assessing isotropy for spatial point processes. Biometrics 62, 119–125. I LLIAN , J., P ENTTINEN , A., S TOYAN , H. & S TOYAN , D. (2008). Statistical Analysis and Modelling of Spatial Point Patterns. John Wiley and Sons, New York. M ØLLER , J. & T OFTAKER , H. (2014). Geometric anisotropic spatial point pattern analysis and Cox processes. Scandinavian Journal of Statistics 41, 414–435. M ØLLER , J. & WAAGEPETERSEN , R. (2004). Statistical Inference and Simulation for Spatial Point Processes. Chapman and Hall/CRC, Boca Raton. M ØLLER , J. & WAAGEPETERSEN , R. (2007). Modern statistics for spatial point processes (with discussion). Scandinavian journal of Statistics 34, 643–711. M ØLLER , J. & WAAGEPETERSEN , R. (2016). Some recent developments in statistics for spatial point pattern analysis. Annual Review of Statistics and Its Application (submitted invited paper). M OUNTCASTLE , V. B. (1957). Modality and topographic properties of single neurons of cat’s somatic sensory cortex. Journal of Neurophysiology 20, 408–434. M UGGLESTONE , M. & R ENSHAW, E. (1996). A practical guide to the spectral analysis of spatial point processes. Computational Statistics & Data Analysis 21, 43–65. M YLLYMÄKI , M., M RKVI ČKA , T., S EIJO , H. & G RABARNIK , P. (2016). Global envelope tests for spatial processes. Journal of the Royal Statistical Society: Series B (Statistical Methodology) (to appear). N ICOLIS , O., M ATEU , J. & D’E RCOLE , R. (2010). Testing for anisotropy in spatial point processes. In Proceedings of the Fifth International Workshop on Spatio-Temporal Modelling (METMA5), G.-M. et al., ed. Unidixital, Santiago de Compostela. O HSER , J. & S TOYAN , D. (1981). On the second-order and orientation analysis of planar stationary point processes. Biometrical Journal 23, 523–533. R AFATI , A., S AFAVIMANESH , F., D ORPH -P ETERSEN , K., R ASMUSSEN , J. G., M ØLLER , J. & N YENGAARD , J. R. (2016). Detection and spatial characterization of minicolumnarity in the human cerebral cortex. Journal of Microscopy 261, 115–126. R EDENBACH , C., S ÄRKKÄ , A., F REITAG , J. & S CHLADITZ , K. (2009). Anisotropy analysis of pressed point processes. Advances in Statistical Analysis 93, 237–261. R IPLEY, B. D. (1976). The second-order analysis of stationary point processes. Journal of Applied Probability 13, 255–266. R IPLEY, B. D. (1977). Modelling spatial patterns (with discussion). Journal of the Royal Statistical Society: Series B (Statistical Methodology) 39, 172–212. ROBERTS , G. O., G ELMAN , A. & G ILKS , W. R. (1997). Weak convergence and optimal scaling of random walk Metropolis algorithms. Annual of Applied Probability 7, 110–120. ROSENBERG , M. S. (2004). Wavelet analysis for detecting anisotropy in point patterns. Journal of Vegetation Science 15, 277–284. S TOYAN , D. (1991). Describing the anisotropy of marked planer point process. Statistics: A Journal of Theoretical and Applied Statistics 22, 449–462. S TOYAN , D. & B ENEŠ , V. (1991). Anisotropy analysis for particle systems. Journal of Microscopy 164, 159–168. S TOYAN , D. & S TOYAN , H. (1995). Fractals, Random Shapes and Point Fields. John Wiley and Sons, Chichester.
10math.ST
arXiv:1302.0312v2 [math.AC] 20 Sep 2013 ON THE INTERSECTION ALGEBRA OF PRINCIPAL IDEALS SARA MALEC Abstract. We study the finite generation of the intersection algebra of two principal ideals I and J in a unique factorization domain R. We provide an algorithm that produces a list of generators of this algebra over R. In the special case that R is a polynomial ring, this algorithm has been implemented in the commutative algebra software system Macaulay2. A new class of algebras, called fan algebras, is introduced. 1. Introduction In this paper, we study the intersection of powers of two ideals in a commutative Noetherian ring. This is achieved by looking at the structure called the intersection algebra, a recent concept, which is associated to the two ideals. The purpose of the paper is to study the finite generation of this algebra, and to show that it holds in the particular important case of principal ideals in a unique factorization domain (UFD). In the general case, not much is known about the intersection algebra, and there are many questions that can be asked. Various aspects of the intersection algebra have been studied by J. B. Fields in [3, 4]. There, he proved several interesting things, including the finite generation of the intersection algebra of two monomial ideals in the power series ring over a field. He also studied the relationship between the finite generation of the intersection algebra and the polynomial behavior of a certain function involving lengths of Tors. It is interesting to note that this algebra is not always finitely generated, as shown by Fields. The finite generation of the intersection algebra has also appeared in the work of Ciupercă, Enescu, and Spiroff in [1] in the context of asymptotic growth powers of ideals. We will start with the definition of the intersection algebra. Throughout this paper, R will be a commutative Noetherian ring. Definition 1.1. Let LR be ar rings with two ideals I and J. Then the intersection algebra of I and J is B = r,s∈N I ∩ J . If we introduce two indexing variables u and v, then P r BR (I, J) = r,s∈N I ∩ J s ur v s ⊆ R[u, v]. When R, I and J are clear from context, we will simply denote this as B. We will often think of B as a subring of R[u, v], where there is a natural N2 -grading on monomials b ∈ B given by deg(b) = (r, s) ∈ N2 . If this algebra is finitely generated over R, we say that I and J have finite intersection algebra. Example 1.2. If R = k[x, y], I = (x2 y) and J = (xy 3 ), then an example of an element in B is 2 + 3x5 y 9 u2 v 3 + x10 y 15 u4 v , since 2 ∈ I 0 ∩ J 0 = k, x5 y 9 u2 v 3 ∈ I 2 ∩ J 3 u2 v 3 = (x4 y 2 ) ∩ (x3 y 9)u2 v 3 = (x4 y 9 )u2 v 3 , and x10 y 15u4 v ∈ I 4 ∩ Ju4 v = (x8 y 4) ∩ (xy 3 )u4 v = (x8 y 4)u4 v. 1 2 SARA MALEC We remark that the intersection algebra has connections to the double Rees algebra R[Iu, Jv], although in practice they can be very different. This relationship is significant due to the importance of the Rees algebra, but the two objects behave differently. The source for the different behaviour lies in the obvious fact that the intersection I r ∩ J s is harder to predict than I r J s as r and s vary. These differences in behavior are of great interest and should be further explored. In this paper, we produce an algorithm that gives a set of generators for the algebra for two principal ideals in a UFD, and we implement the algorithm in Macaulay2 for the case of principal monomial ideals in a polynomial ring over a field. The finite generation of an N2 -graded algebra, such as the intersection algebra, can be rephrased in the following way: L Proposition 1.3. Let B = r,s∈N Br,s be an N2 -graded algebra over a ring R. Then B is finitely generated if and only if there exists an N ∈ N such that for every r, s ∈ N with r, s > N, Br,s = N X Y I j,k=0 i jk , Bj,k where I is the set of all N × N matrices I = (ijk ) such that r= N X jijk and s = N X kijk . j,k=0 j,k=0 Proof. If B is finitely generated over R, there exists an N ∈ N such that all the generators for B come from components Br,s with r, s ≤ N. Let b ∈ Br,s with r, s > N. So b can be written as a polynomial in the generators with coefficients in R, in other words b∈ N X Y finite j,k=0 i jk Bj,k . Also, the right hand side must be in Pthe (r, s)-graded P component of B: i.e. the sum can only run over all j, k such that r = jijk and s = kijk and j and k both go from 0 to N. So b ∈ Br,s must be in the right hand side above as claimed. For the other inclusion, note again that the degrees match up: N Y j,k=0 P i jk ⊂ Br,s Bj,k P as long as r = jijk and s = kijk , so obviously sums of such expressions are also included in Br,s . The other direction is obvious.  2. The UFD Case Theorem 2.1. If R is a UFD and I and J are principal ideals, then B is finitely generated as an algebra over R. ON THE INTERSECTION ALGEBRA OF PRINCIPAL IDEALS 3 The proof for the finite generation of B relies heavily on semigroup theory. The following definitions and theorems provide the necessary framework for the proof. Definition 2.2. A semigroup is a set together with a closed associative binary operation. A semigroup generalizes a monoid in that it need not contain an identity element. We call a semigroup an affine semigroup if it isomorphic to a subgroup of Zd for some d. An affine semigroup is called pointed if it contains the identity, which is the only invertible element of the semigroup. Definition 2.3. A polyhedral cone in Rd is the intersection of finitely many closed linear half-spaces in Rd , each of whose bounding hyperplanes contains the origin. Every polyhedral cone C is finitely generated, i.e. there exist c1 , . . . , cr ∈ Rd with C = {λ1 c1 + · · · + λr cr |λ1 , . . . , λr ∈ R≥0 }. We call the cone C rational if c1 , . . . , cr can be chosen to have rational coordinates, and C is pointed if C ∩ (−C) = {0}. We present the following two important results without proof: the full proofs are contained in [2] as Theorem 7.16 and 7.15, respectively. Theorem 2.4. (Gordan’s Lemma) If C is a rational cone in Rd , then C ∩ A is an affine semigroup for any subgroup A of Zd . Theorem 2.5. Any pointed affine semigroup Q has a unique finite minimal generating set HQ . Definition 2.6. Let C be a rational pointed cone in Rd , and let Q = C ∩ Zd . Then HQ is called the Hilbert Basis of the cone C. We will use these results to provide a list of generators for B. Notice that for any two strings of numbers a = {a1 , . . . , an }, b = {b1 , . . . , bn } with ai , bi ∈ N, we can associate to them a fan of pointed, rational cones in N2 . Definition 2.7. We will call two such strings of numbers fan ordered if ai ai+1 ≥ for all i = 1, . . . , n. bi bi+1 Assume a and b are fan ordered. Additionally, let an+1 = b0 = 0 and a0 = bn+1 = 1. Then for all i = 0, . . . , n, let Ci = {λ1 (bi , ai ) + λ2 (bi+1 , ai+1 )|λ1 , λ2 ∈ R≥0 }. Let Σa,b be the fan formed by these cones and their faces, and call it the fan of a and b in N2 . Hence Σa,b = {Ci |i = 0, . . . , n}. 4 SARA MALEC Then, since each Ci is a pointed rational cone, Qi = Ci ∩ Z2 has a Hilbert Basis, say HQi = {(ri1 , si1 ), . . . , (rini , sini )}. Note that any Σa,b partitions all of the first quadrant of R2 into cones, so the collection {Qi |i = 0, . . . , n + 1} partitions all of N2 as well, so for any (r, s) ∈ N2 , (r, s) ∈ Qi for some i = 0, . . . , n + 1. In this paper, we are studying the intersection algebra when I and J are principal, so the order of the exponents in their exponent vectors does not matter. In general, for any two strings of numbers a and b, there is a unique way to rearrange them so that they are fan ordered. So a unique fan can be associated to any two vectors. For the purposes of this paper, we will assume without loss of generality that the exponent vectors are fan ordered. Theorem 2.8. Let R be a UFD with principal ideals I = (pa11 · · · pann ) and J = (pb11 · · · pbnn ), where pi , i = 0, . . . , n, and let Σa,b be the fan associated to a = (a1 , . . . , an ) and b = (b1 , . . . , bn ). Then B is generated over R by the set a rij {p11 ar b i+1 · · · pi i ij pi+1 sij · · · pbnn sij urij v sij |i = 0, . . . , n, j = 1, . . . , ni }, where (rij , sij ) run over the Hilbert basis for each Qi = Ci ∩ Z2 for every Ci ∈ Σa,b. Proof. Since B has a natural N2 grading, it is enough to consider only homogeneous monomials b ∈ B with deg(b) = (r, s). Then (r, s) ∈ Qi = Ci ∩ Z2 for some Ci ∈ Σa,b . In other words, r, s ∈ N2 and ai s ai+1 ≥ ≥ . bi r bi+1 So ai r ≥ bi s, and by the ordering on the ai and the bi , aj r ≥ bj s for all j < i. Also, ai+1 r ≤ bi+1 s, and again by the ordering, aj r ≤ bj s for all j > i. So b ∈ I r ∩ J s ur v s = (pa11 · · · pann )r ∩ (pb11 · · · pbnn )s ur v s b s i+1 · · · pbnn s )ur v s = (pa11 r · · · piai r · pi+1 ON THE INTERSECTION ALGEBRA OF PRINCIPAL IDEALS b 5 s i+1 So b = f · p1a1 r · · · piai r · pi+1 · pbnn s ur v s for some monomial f ∈ R. Since (r, s) ∈ Qi , P the pair has a decomposition into a sum Hilbert basis Pnelements. Pnof ni i i mj sij . So we have (r, s) = j=1 mj (rij , sij ) with mj ∈ N, and r = j=1 mj rij , s = j=1 Therefore b s i+1 b =f (pa11 r · · · piai r pi+1 · · · pbnn s ur v s ) ni Y m (a r ) m (a r ) mj (bi+1 sij ) =f p1 j 1 ij · · · pi j i ij pi+1 · · · pnmj (bn sij ) umj (rij ) v mj (sij ) =f j=1 ni Y a rij (p11 j=1 ar b i+1 · · · pi i ij pi+1 sij · · · pbnn sij urij v sij )mj So b is generated over R by the given finite set as claimed.  Remark 2.9. This theorem extends and refines the main result in [5] √ Remark 2.10. For any two ideals I and J in R with J ⊂ I, where I is not nilpotent and ∩k I k = (0), define vI (J, m) to be the largest integer n such that J m ⊆ I n and wJ (I, n) to be the smallest m such that J m ⊆ I n . The two sequences {vI (J, m)/m}m and {wJ (I, n), n}n have limits lI (J) and LJ (I), respectively. See [6, 7] for related work. Given two principal ideals I and J in a UFD R whose radicals are equal (i.e. the factorizations of their generators use the same irreducible elements), our procedure to determine generators also shows that the vectors (b1 , a1 ) and (bn , an ) are related to the pairs of points (r, s) where I r ⊆ J s (respectively J s ⊆ I r ): notice that C0 is the cone between the y-axis and the line through the origin with slope a0 /b0 , and for all (r, s) ∈ C0 ∩ N2 , I r ⊆ J s . Therefore lJ (I) = a0 /b0 . Similarly, Cn , the cone between the x-axis and the line through the origin with slope an /bn , contains all (r, s) ∈ N2 where J s ⊆ I r , so lJ (I) = an /bn . Then, since lI (J)LJ (I) = 1, this gives that LJ (I) = a1 /b1 and LI (J) = bn /an as well. This agrees with the observations of Samuel and Nagata as mentioned in [1]. 3. The Polynomial Case In this section, we will show that in the special case where R is a polynomial ring in finitely many variables over a field, then the intersection algebra of two principal monomial ideals is a semigroup ring whose generators can be algorithmically computed. Definition 3.1. Let k be a field. The semigroup ring k[Q] of a semigroup Q is the k-algebra with k-basis {ta |a ∈ Q} and multiplication defined by ta · tb = ta+b . Note that when F = {f1 , . . . , fq } is a collection of monomials in R, k[F ] is equal to the semigroup ring k[Q], where Q = Nlog(f1 ) + · · · + Nlog(fq ) is the subsemigroup of Nq generated by log(F ). It is easy to see that multiplying monomials in the semigroup ring amounts to adding exponent vectors in the semigroup, as in the following example: We can consider B both as an R-algebra and as a k-algebra, and it is important to keep in mind which structure one is considering when proving results. While there are important 6 SARA MALEC distinctions between the two, finite generation as an algebra over R is equivalent to finite generation as an algebra over k. Theorem 3.2. Let R be a ring that is finitely generated as an algebra over a field k. Then B is finitely generated as an algebra over R if and only if it is finitely generated as an algebra over k. Proof. Let B be finitely generated over k. Then since k ⊂ R, B is automatically finitely generated over R. Now let generated over R, say by elements b1 , . . . , bn ∈ B. PqB be finitely αi Then for any b ∈ B, b = i=1 ri bi with ri ∈ R. But R is finitely generated over k, say by P P P β β elements k1 , . . . , km , so ri = pj=1 aij kj ij , with aij ∈ k. So b = qi ( pj aij kj ij )bαi i , and B is finitely generated as an algebra over k by {b1 , . . . , bn , k1 , . . . , km }.  A few definitions are required before stating the main results of this section. Definition 3.3. Let R = k[x] = k[x1 , . . . , xn ] be the polynomial ring over a field k in n variables. Let F = {f1 , . . . , fq } be a finite set of distinct monomials in R such that fi 6= 1 for all i. The monomial subring spanned by F is the k-subalgebra k[F ] = k[f1 , . . . , fq ] ⊂ R. Definition 3.4. For c ∈ Nn , we set xc = xc11 · · · xcnn . Let f be a monomial in R. The exponent vector of f = xα is denoted by log(f ) = α ∈ Nn . If F is a collection of monomials in R, log(F ) denotes the set of exponent vectors of the monomials in F . Theorem 3.5. If R is a polynomial ring in n variables over k, and I and J are ideals generated by monomials (i.e. monic products of variables) in R, then B is a semigroup ring. Proof. Since I and J are monomial ideals, I r ∩ J s is as well for all r and s. So each (r, s) component of B is generated by monomials, therefore B is a subring of k[x1 , . . . , xn , u, v] generated over k by a list of monomials {bi |i ∈ Λ}. Let Q be the semigroup generated by {log(bi )|i ∈ Λ}. Then B = k[Q], and B is a semigroup ring over k.  Theorem 3.6. Let I = (xa11 · · · xann ) and J = (xb11 · · · xbnn ) be principal ideals in R = k[x1 , . . . , xn ], and let Σa,b be the fan associated to a = (a1 , . . . , an ) and b = (b1 , . . . , bn ). Let Qi = Ci ∩ Z2 for every Ci ∈ Σa,b and HQi be its Hilbert basis of cardinality ni for all i = 0, . . . , n. Further, let Q be the subsemigroup in N2 generated by {(a1 rij , . . . , ai rij , bi+1 sij , . . . , bn sij , rij , sij )|i = 0, . . . , n, j = 1, . . . , ni } ∪ log(x1 , . . . , xn ), where (rij , sij ) ∈ HQi for every i = 0, . . . n, j = 1, . . . , ni . Then B = k[Q]. Proof. Since R is a UFD, by Thm 2.8, B is generated over R by a rij {x11 ar b i+1 · · · xi i ij xi+1 sij · · · xbnn sij urij v sij |i = 0, . . . , n, j = 1, . . . , ni }. Then, since R is generated as an algebra over k by x1 , . . . , xn , it follows that B ⊂ k[x1 , . . . , xn , u, v] is generated as an algebra over k by the set a rij P = {x1 , . . . , xn , x11 ar b i+1 · · · xi i ij xi+1 sij · · · xbnn sij urij v sij |i = 0, . . . , n, j = 1, . . . , ni }. ON THE INTERSECTION ALGEBRA OF PRINCIPAL IDEALS 7 This is a set of monomials in k[x1 , . . . , xn , u, v]. Now note that therefore log(P ) ={(a1 rij , . . . , ai rij , bi+1 sij , . . . , bn sij , rij , sij )|i = 0, . . . , n, j = 1, . . . , ni } ∪ log(x1 , . . . , xn ). In conclusion, log(P ) = Q and hence B = k[Q].  Example 3.7. Let I = (x5 y 2 ) and J = (x2 y 3). Then a1 = 5, a2 = 2 and b1 = 2, b2 = 3, and 5/2 ≥ 2/3. Then we have the following cones: C0 = {λ1 (0, 1) + λ2 (2, 5)|λi ∈ R≥0 } C1 = {λ1 (2, 5) + λ2 (3, 2)|λi ∈ R≥0 } C2 = {λ1 (3, 2) + λ2 (1, 0)|λi ∈ R≥0 } C0 is the wedge of the first quadrant between the y-axis and the vector (2, 5), C1 is the wedge between (2, 5) and (3, 2), and C3 is the wedge between (3, 2) and (1, 0). It is easy to see that this fan fills the entire first quadrant. Intersecting these cones with Z2 is equivalent to only considering the integer lattice points in these cones. The Hilbert Basis of Q0 = C0 ∩ Z2 is {(0, 1), (1, 3), (2, 5)}, and their corresponding monomials in B are given by the generators of Br,s for each (r, s): (0, 1) : (I 0 ∩ J 1 )u = (x2 y 3 )v − generator is x2 y 3v (1, 3) : (I 1 ∩ J 3 )uv 3 = ((x5 y 2 ) ∩ (x6 y 9))uv 3 = (x6 y 9)uv 3 − generator is x6 y 9 uv 3 (2, 5) : (I 2 ∩ J 5 )u2 v 5 = ((x10 y 4 ) ∩ (x10 y 15))u2 v 5 = (x10 y 15 )u2v 5 − generator is x10 y 15 u2 v 5 Notice that all the generator monomials are of the form xb1 s y b2 s ur v s , with b1 = 2, b2 = 3, and (r, s) is a Hilbert Basis element, as shown earlier. The Hilbert Basis of Q1 is {(1, 1), (1, 2), (3, 2), (2, 5)}. In the same way as above, their monomials are x5 y 3 uv, x5y 6 uv 2 , x15 y 6u3 v 2 , x10 y 15 u2 v 5 , all of which have the form xa1 r y b2 s ur v s with a1 = 5, b2 = 3 and (r, s) a basis element. Lastly, the Hilbert Basis of Q2 is {(1, 0), (2, 1), (3, 2)}, which gives rise to generators x5 y 2u, x10 y 4u2 , x15 y 6 u3 v 2 , all of which look like xa1 r y a2 r ur v s with a1 = 5, a2 = 2. Notice there are a few redundant generators in this list: those arise from lattice points that lie on the boundaries of the cones. So B is generated over R by {x5 y 2 u, x10 y 4 u2 , x15 y 6u3 v 2 , x5 y 3 uv, x5y 6 uv 2 , x2 y 3 v, x6 y 9 uv 3, x10 y 15 u2 v 5 }. Using this technique, we have written a program in Macaulay2 that will provide the list of generators of B for any I and J. First it fan orders the exponent vectors, then finds 8 SARA MALEC the Hilbert Basis for each cone that arises from those vectors. Finally, it computes the corresponding monomial for each basis element. The code is below: loadPackage "Polyhedra" --function to get a list of exponent vectors from an ideal I expList=(I) ->( flatten exponents first flatten entries gens I ) algGens=(I,J)->( B:=(expList(J))_(positions(expList(J),i->i!=0)); A:=(expList(I))_(positions(expList(J),i->i!=0)); L:=sort apply(A,B,(i,j)->i/j); C:=flatten {0,apply(L,i->numerator i),1}; D:=flatten {1, apply(L,i->denominator i),0}; M:=matrix{C,D}; G:=unique flatten apply (#C-1, i-> hilbertBasis (posHull submatrix(M,{i,i+1}))); S:=ring I[u,v]; flatten apply(#G,i->((first flatten entries gens intersect(I^(G#i_(1,0)),J^(G#i_(0,0)))))*u^(G#i_(1,0))*v^(G#i_(0,0))) ) 4. Fan Algebras The intersection algebra is in fact a specific case of a more general class of algebras that can be naturally associated to a fan of cones. We will call such objects fan algebras, and the first result in this section shows that they are finitely generated. First a definition: Definition 4.1. Given a fan of cones Σa,b , a function f : N2 → N is called fan-linear if it is nonnegative and linear on each subgroup Qi = Ci ∩ Z2 for each Ci ∈ Σa,b , and subadditive on all of N2 , i.e. f (r, s) + f (r ′ , s′ ) ≥ f (r + r ′ , s + s′ ) for all (r, s), (r ′, s′ ) ∈ N2 . In other words, f (r, s) is a piecewise linear function where f (r, s) = gi (r, s) when (r, s) ∈ Ci ∩N2 for each i = 0, . . . n, and each gi is linear on Ci ∩N2 . Note that each piece of f agrees on the faces of the cones, that is gi = gj for every (r, s) ∈ Ci ∩ Cj ∩ N2 . Example 4.2. Let a = {1} = b, so Σa,b is the fan defined by C0 = {λ1 (0, 1) + λ2 (1, 1)|λi ∈ R≥0 } C1 = {λ1 (1, 1) + λ2 (1, 0)|λi ∈ R≥0 }, and set Qi = Ci ∩ Z2 . Also let  g0 (r, s) = r + 2s if (r, s) ∈ Q0 f= g1 (r, s) = 2r + s if (r, s) ∈ Q1 ON THE INTERSECTION ALGEBRA OF PRINCIPAL IDEALS 9 Then f is a fan-linear function. It is clearly nonnegative and linear on both Q0 and Q1 . The function is also subadditive on all of N2 : Let (r, s) ∈ Q0 and (r ′ , s′ ) ∈ Q1 , and say that (r + r ′ , s + s′ ) ∈ Q0 . Then f (r, s) + f (r ′, s′ ) = g0 (r, s) + g1 (r ′, s′ ) = r + 2s + 2r ′ + s f (r + r ′ , s + s′ ) = g0 (r + r ′ , s + s′ ) = r + r ′ + 2(s + s′ ) Comparing the two, we see that f (r, s) + f (r ′, s′ ) ≥ f (r + r ′ , s + s′ ) whenever r + 2s + 2r ′ + s′ ≥ r + r ′ + 2(s + s′ ), or equivalently when r ′ ≥ s′ . But that is true, since (r ′ , s′ ) ∈ Q1 . The proof for (r + r ′ , s + s′ ) ∈ Q1 is similar. The two pieces of f also agree on the boundary between Q0 and Q1 , since the intersection of Q0 and Q1 is the ray in N2 where r = s, and g0 (r, r) = 3r = g1 (r, r). So f is a fan-linear function. Theorem 4.3. Let I1 . . . , In be ideals in a domain R and Σa,b be a fan of cones in N2 . Let f1 , . . . , fn be fan-linear functions. Then the algebra M f (r,s) B= I1 1 · · · Infn (r,s) ur v s r,s is finitely generated. Proof. First notice that the subadditivity of the functions fi guarantees that B is a subalgebra of R[u, v] with the natural grading. Since B has a natural N2 -grading, it is enough to consider only homogeneous monomials b ∈ B with deg(b) = (r, s). Then (r, s) ∈ Qi = Ci ∩ Z2 for some Ci ∈ Σa,b . Since Qi is a pointed rational cone, it has a Hilbert basis HQi = {(ri1 , si1 ), . . . , (rini , sini )}. So we can write ni X (r, s) = mj (rij , sij ). j=1 Then, since each fk is nonnegative and linear on Qi , we have fk (r, s) = ni X mj fk (rij , sij ) j=1 for each k = 1, . . . , n. Since R is Noetherian, for each i, there exists a finite set Λi,j,k ⊂ R such that f (rij ,sij ) Ik k = (xk |xk ∈ Λi,j,k ). 10 SARA MALEC So f (r,s) b ∈ Br,s = I1 1 Pni = I1 j=1 · · · Infn (r,s) ur v s mj f1 (rij ,sij ) m1 f1 (ri1 ,si1 ) Pni · · · In j=1 Pni mj fn (rij ,sij ) Pni m r j ij j=1 j=1 mj sij u v mn f1 (rin ,sin ) mn fn (rin ,sin ) i i i i · · · I1 i · · · Inm1 fn (ri1 ,si1 ) · · · In i um1 ri1 · · · umni rini v m1 si1 · · · v mni sini  m1   f1 (rini ,sini ) fn (rini ,sini ) rin sin mni f1 (ri1 ,si1 ) fn (ri1 ,si1 ) ri1 si1 i i . = I1 · · · In u v · · · I1 · · · In u v = I1 So B is generated as an algebra over R by the set {x1 · · · xn urij v sij |(rij , sij ) ∈ HQi , xk ∈ Λi,j,k }.  This result justifies the following definition. Definition 4.4. Given ideals I1 , . . . , In in a domain R, Σa,b a fan of cones in N2 , and f1 , . . . , fn are fan-linear functions, we define M f (r,s) B(Σa,b , f ) = I1 1 · · · Infn (r,s) ur v s r,s to be the fan algebra of f on Σa,b , where f = (f1 , . . . , fn ). Remark 4.5. The intersection algebra of two principal ideals I = (pa11 · · · pann ) and J = (pb11 · · · pbnn ) in a UFD is a special case of a fan algebra. Let Ii = (pi ) and fi = max(rai , sbi ) for each i = 1, . . . , n, and define the fan Σa,b to be the fan associated to a = (a1 , . . . , an ) and b = (b1 , . . . , bn ). Then M B(I, J) = (p1 )max(ra1 ,sb1 ) · · · (pn )max(ran ,sbn ) ur v s . r,s This is a fan algebra since the max function is fan-linear: it’s subadditive on all of N2 , and linear and nonnegative on each cone, since the faces of each cone in Σa,b are defined by lines through the origin with slopes ai /bi for each i = 0, . . . , n. So, as in the proof of Theorem 2.8, for any pair (r, s) ∈ Qi = Ci ∩ Z2 for every Ci ∈ Σa,b , we have that s ai+1 ai ≥ ≥ . bi r bi+1 So ai r ≥ bi s, and by the ordering on the ai and the bi , aj r ≥ bj s for all j < i. Also, ai+1 r ≤ bi+1 s, and again by the ordering, aj r ≤ bj s for all j > i. Since fk = max(rak , sbk ) for all k = 1, . . . , n, we have that fk = rak for all k ≤ i and fk = sbk for all k > i. So each fk is linear on each cone, and the above theorem applies. It is important to note that the intersection algebra is not always Noetherian. One such example, given in [3], is constructed by taking an ideal P in R such that the algebra R ⊕ P (1) ⊕ P (2) ⊕ · · · ON THE INTERSECTION ALGEBRA OF PRINCIPAL IDEALS 11 is not finitely generated. Then, it is shown that there exists an f ∈ R such that (P a : f a ) = P (a) for all a. It follows that the intersection algebra of P and (f ) is not finitely generated. One important question that should be considered is what conditions on f and P are necessary to ensure that the intersection algebra of f and P is Noetherian. Proposition 4.6. Let R be a standard N2 -graded ring with maximal ideal m and f a homogeneous element in m. Then M (f )r ∩ ms ur v s B = BR (f, m) = r,s∈N2 is finitely generated as an R-algebra. Proof. Say deg f = a, and let x ∈ (f )r ∩ ms . Then x = f r · y ∈ ms , so y ∈ (ms : f r ). Decompose y into its homogeneous pieces, y = y0 + · · · + ym . Then f r (y0 + · · · + ym ) ∈ ms , so ra + deg yi ≥ s for all i = 0, . . . , n, or, equivalently deg yi ≥ s − ra. Therefore y ∈ ms−ra , and so (f )r ∩ (ms ) = f r · ms−ra . Then B= X r,s∈N2 f r · ms−ra ur v s = Let B̃ = X X ms−ra (f u)r v s . r,s∈N2 ms−ra w r v s , r,s∈N2 and ϕ : B̃ → B be the map that sends w to f u and is the identity on R and v. This map is obviously surjective, therefore, if B̃ is finitely generated, so is B. But B̃ is a fan algebra with I1 = m and  s − ra if s/r ≥ a , f1 (r, s) = 0 if s/r < a which is certainly fan-linear on the fan formed by two cones C0 = {λ1 (0, 1) + λ2 (1, a))|λi ∈ R≥0 } and C1 = {λ1 (1, a) + λ2 (1, 0)|λi ∈ R≥0 }, since C0 contains the collection of all (r, s) ∈ N2 where s/r ≥ a and C1 contains all (r, s) ∈ N where s/r < a. So by Theorem 4.3, if we define Λij ⊂ R to be a finite subset where msij −rij a = (x|x ∈ Λij ), then B̃ is generated over R by the set {xur0j v s0j |(r0j , s0j ) ∈ HQ0 , x ∈ Λij } ∪ {ur1j v s1j |(r1j , s1j ) ∈ HQ1 }, and therefore B is finitely generated as an R-algebra.  Remark 4.7. We are grateful to Mel Hochster, who noticed that the above proof works the same in the case where R is regular local by replacing the degree of f with its order. When (R, m) is a regular local ring, the order defines a valuation on R because grm (R) is a polynomial ring over R/m (and hence a domain). Therefore, when (R, m) is a regular local ring and f ∈ R, B(f, m) is a finitely generated R-algebra. 12 SARA MALEC Acknowledgements. The author thanks her advisor, Florian Enescu, for many fruitful discussions, as well as Yongwei Yao for his useful suggestions. References [1] C. Ciupercă, F. Enescu, and S. Spiroff. Asymptotic growth of powers of ideals. Illinois Journal of Mathematics, 51(1):29–39, 2007. [2] B. Sturmfels E. Miller. Combinatorial Commutative Algebra. Springer, 2005. [3] J. B. Fields. Length functions determined by killing powers of several ideals in a local ring. Ph.D. Dissertation, University of Michigan, Ann Arbor, Michigan, 2000. [4] J. B. Fields. Lengths of Tors determined by killing powers of ideals in a local ring. Journal of Algebra, 247(1):104–133, 2002. [5] Sara Malec. Noetherian filtrations and finite intersection algebras. Master’s thesis, Georgia State University, 2008. [6] M. Nagata. Note on a paper of Samuel concerning asymptotic properties of ideals. Mem. College Sci. Univ. Kyoto Ser. A Math, 30(2):165–175, 1957. [7] P. Samuel. Some asymptotic properties of powers of ideals. Annals of Mathematis (2), 56(1):11–21, 1952. Department of Mathematics, University of the Pacific, Stockton, CA 95207 E-mail address: [email protected]
0math.AC
arXiv:cs/0411016v2 [cs.AI] 18 Nov 2004 Under consideration for publication in Theory and Practice of Logic Programming 1 Intelligent search strategies based on adaptive Constraint Handling Rules ARMIN WOLF Fraunhofer-Institut für Rechnerarchitektur and Softwaretechnik FIRST Kekuléstraße 7, D-12489 Berlin, Germany (e-mail: [email protected] http://www.first.fraunhofer.de) submitted 31 August 2002; revised 13 November 2003, 16 June 2004; accepted 9 August 2004 Abstract The most advanced implementation of adaptive constraint processing with Constraint Handling Rules (CHR) allows the application of intelligent search strategies to solve Constraint Satisfaction Problems (CSP). This presentation compares an improved version of conflict-directed backjumping and two variants of dynamic backtracking with respect to chronological backtracking on some of the AIM instances which are a benchmark set of random 3-SAT problems. A CHR implementation of a Boolean constraint solver combined with these different search strategies in Java is thus being compared with a CHR implementation of the same Boolean constraint solver combined with chronological backtracking in SICStus Prolog. This comparison shows that the addition of “intelligence” to the search process may reduce the number of search steps dramatically. Furthermore, the runtime of their Java implementations is in most cases faster than the implementations of chronological backtracking. More specifically, conflict-directed backjumping is even faster than the SICStus Prolog implementation of chronological backtracking, although our Java implementation of CHR lacks the optimisations made in the SICStus Prolog system. KEYWORDS: dynamic backtracking, conflict-directed backjumping, rule-based constraint handling, intelligent search, SAT problems 1 Introduction Constraint Handling Rules (CHR) are multiheaded, guarded rules used to propagate new or simplify given constraints (Frühwirth 1995; Frühwirth 1998). For example, the CHR leq(X,Y), leq(Y,Z) ==> leq(X,Z). reflects the transitivity of the binary relation leq. Thus, for any two constraints leq(A,B) and leq(B,C) an additional constraint leq(A,C) is derived – implicitly given knowledge is made explicit. Another CHR leq(X,Y), leq(Y,X) <=> X=Y. reflects the symmetry of the binary relation leq. Thus, any two constraints leq(A,B) and leq(B,A) are replaced by the syntactical equation A=B. 2 Armin Wolf A detailed formal description of the syntax, the declarative and operational semantics of CHR is omitted in this paper because these topics are addressed in depth in the literature, e.g. in (Frühwirth 1998). There are several CHR implementations, e.g. in ECLiPSe (Frühwirth and Brisset 1995), in SICStus Prolog (Holzbaur and Frühwirth 2000) or even in Java (Schmauss 1999; Wolf 2001a). All but the last (Wolf 2001a) only support constraint deletions implicitly through chronological backtracking. Arbitrary sequences of constraint additions and deletions, which are necessary for intelligent search strategies like conflict-directed backjumping (Prosser 1993; Prosser 1995) or dynamic backtracking (Baker 1994; Ginsberg 1993; Jussien et al. 2000), are not supported. Furthermore, if there is an inconsistency, the “classical” CHR implementations offer users no help in finding out what causes this inconsistency. This paper reviews the first implementation of “adaptive” CHR, cf. (Wolf 1999; Wolf 2001a). In this context, “adaptive” means that constraint additions and deletions in arbitrary order are supported, i.e. after each change of the considered constraints, the derivations based on CHR are adapted accordingly. Thus, deletion of the constraint leq(A,B) or leq(B,C) causes the derived constraint leq(A,C) to be deleted, too. However, this implementation is in Java, which does not support backtracking like Prolog systems; thus depth-first search is not intrinsic, enabling different search strategies to be realized directly and not on top of the underlying chronological backtracking mechanism. Additionally, this implementation returns an explanation for any occurring inconsistency, thus supporting explanation-based constraint programming (Jussien 2001). This allows not only user guidance, e.g. during debugging of incorrect constraint models or in interactive constraint solving, but also automatic constraint relaxation as well as dynamic problem handling in reactive systems. Moreover, explanations can be used to build new “explanationdirected” search algorithms. The aim of the paper is to show that this adaptive CHR implementation is very well suited for implementing not only depth-first search but also intelligent search algorithms like sophisticated conflict-directed backjumping and dynamic backtracking, while maintaining consistency. The given implementations show that • constraint propagation ideally replaces the proposed constraint checks/tests in these intelligent search algorithms • justifications of (derived) constraints, especially of false, properly act as conflict sets in conflict-directed backjumping or as elimination explanations in dynamic backtracking • the possibility of arbitrary constraint deletions directly supports nonchronological backtracking • constraint handling (i.e. propagation) maintains (local) consistency, offering early detection and good avoidance of dead ends during the search To be more precise, the implementation of these algorithms is specialised for Boolean constraint problems where the variables have only two possible values: 0 and 1. However, a generalisation for other (finite) domains is quite simple because Intelligent search based on adaptive CHR 3 the interaction with the Boolean constraint solver written in CHR is opaque. We therefore assume that any other terminating constraint solver realized with CHR will work as well. We cite the soundness and completeness of CHR (Frühwirth 1998) as well as the correctness and termination of the adaptation of CHR derivations (Wolf 1999) based on explanations as evidence for this claim. The paper is organised as follows. The next section briefly looks at the adaptive CHR system. Section 3 presents a CHR-based specification of a Boolean constraint solver to solve SAT(isfiability) problems formulated as propositional logic formulas. The compilation process of these rules into an adaptive constraint solver is explained and the application programming interface (API) for this solver is described. Section 4 introduces the AIM instances, a benchmark set of random 3-SAT problems containing instances with exactly one solution and instances that are inconsistent. Section 5 presents our implementations of different search strategies, from chronological backtracking (Section 5.3) to conflict-directed backjumping (Section 5.4) to dynamic backtracking (Section 5.5). These implementations are built on top of the Boolean constraint solver presented in Section 3. These solvers are applied to all AIM instances with 50 variables, either to solve them or to detect their inconsistency. Section 6 shows and compares the required backtracking/backjumping steps and their runtime. Section 7 attempts to analyse the measured results. Section 8 concludes the paper. 2 The Adaptive CHR System n io A r pp le lic pi at om C Initially, the adaptive CHR system consists of a runtime system and a compiler. They contain the us data structures that are required to generate rulees es us based adaptive constraint solvers and to implement Runtime Java programs that apply these solvers to dynamic uses uses System CSP. The definition of a rule-based constraint solver is quite simple: the CHR that define the solver for us es es us a specific domain are coded by the user in a socalled CHR handler. Here, a CHR handler consists 1111 0000 of Java objects representing CHR which are comgenerates piled to Java programs by the use of the compiler. Compiling and running a CHR handler generates a Fig. 1. The architecture of Java package containing Java code that implements the adaptive CHR system the defined solver and its interface: the addition or deletion of user-defined constraints or syntactical equations, a consistency test and the explanation of inconsistencies. These methods allow dynamic constraint solving as well as explanation-based constraint programming (Jussien 2001) in any application: • Constraints may be added and deleted in arbitrary order. • Constraint handling, i.e. propagation, is performed accordingly. • Whenever an inconsistency is detected, the explanation identifies a subset of constraints causing this inconsistency. er H an dl dl er an H R H C e od C 4 Armin Wolf A user application interacts with the CHR package provided by the user in the CHR handler and the runtime system. Figure 1 shows the components and their interactions. During compilation for each handler, a constraint system class is generated retaining the name of the handler. Furthermore, for each head constraint of a CHR, a method of this class is generated retaining the name and arity of the CHR to add user-defined constraints to the constraint store. In addition to these handler-specific methods each constraint system class has common methods to justify the assignment of an integer to a variable, i.e. to add a syntactical equation justified by an integer to the constraint store; to delete all constraints with a specific justification, i.e. in a set of integers; to test the consistency of the currently valid syntactical equations; and to get an explanation, i.e. a set of justifications (integers) that is responsible for a detected inconsistency: • • • • void equal(Variable var, int i, IntegerSet set) void delete(IntegerSet set) boolean isConsistent() IntegerSet getExplanation() The class Variable implements logical variables that may be bound to logical terms (objects of the class Term), which are either numbers, logical variables or function terms. To simplify matters, integer sets (objects of the class IntegerSet) and operations on it are represented by the use of the usual mathematical set notation, e.g. the set consisting of the integers 2, 3, and 5 is represented by {2, 3, 5} and the union of two sets A and B is represented by A ∪ B. Example 1 Let a CHR handler called trans consist of the CHR leq(X,Y), leq(Y,X) <=> X=Y. specifying the user-defined constraint leq. Furthermore, let the constraints leq(0,A) and leq(B,1) with empty justifications be already added to the constraint store of the constraint system cs, i.e. be an object of the class trans. Assuming that A and B are constraint variables (objects of the class Variable), cs.equal(A, 2, {1}) adds the equation A=2 justified by the set1 {1} to the constraint store of cs. Thus, the value 2 is assigned to the variable A and the store contains A=2, leq(0,2), both justified by {1}, and leq(B,1) justified by the empty set. Then, the call cs.isConsistent() returns true. Further addition of the equation B=2 with the justification {3} is realized by calling cs.equal(B, 2, {3}). The resulting constraint store now contains A=2, leq(0,2), both justified by {1}, and B=2 and leq(2,1), both justified by {3}. This triggers the CHR, which replaces leq(0,2) and leq(2,1) by the equation 0=1, i.e. an inconsistency justified by {1, 3}. Thus, the call cs.isConsistent() returns false and cs.getExplanation() returns {1, 3}. The detected inconsistency is eliminated by calling cs.delete({1}). Afterwards, the constraint store contains leq(A,2) with the empty justification, and B=2 and leq(2,1), both justified by {3}. 1 For a unitised handling, integral identifiers are coded in singleton integer sets. Intelligent search based on adaptive CHR 5 The next section contains a more relevant, practical example, illustrating how constraint solvers, i.e. CHR handlers, are defined and integrated into an application. 3 A Rule-based Boolean Constraint Solver The ECLiPSe and SICStus Prolog distributions of CHR, or even WebCHR at http://www.pms.informatik.uni-muenchen.de/~webchr/, come with a simple but important constraint solver for Boolean constraints. This solver is essential for problems that are formulated as SAT problems, i.e. satisfiability problems of propositional logic formulas. The provided Boolean constraint solver supports the usual unary and binary operations on propositional variables: negation, conjunction, disjunction (non-exclusive and exclusive) as well as implication. If we confine ourselves – without any loss of expressiveness – to problems in conjunctive normal form, only negation and disjunction have to be supported by a Boolean CHR solver as constraints, i.e. the disjunctions, are implicitly conjunctively connected by the separating comma. For instance, the formula in conjunctive normal form (A ∨ ¬B ∨ C) ∧ (¬A ∨ B ∨ D) is equivalent to neg(A,F), neg(B,E), or(A,E,X), or(X,C,1), or(F,B,Y), or(Y,D,1) if the semantics of the user-defined constraint neg(X,Y) is ¬X = Y and the semantics of the user-defined constraint or(X,Y,Z) is X ∨ Y = Z for any arguments X, Y , and Z that are either propositional variables, 0, or 1. Thus, the important class of SAT problems may be modelled as constraint problems and solved by using the CHR handler with the following rules: or(0,X,Y) <=> Y=X. or(X,0,Y) <=> Y=X. or(X,Y,0) <=> X=0,Y=0. or(1,X,Y) <=> Y=1. or(X,1,Y) <=> Y=1. or(X,X,Z) <=> X=Z. neg(0,X) <=> X=1. neg(X,0) <=> X=1. neg(1,X) <=> X=0. neg(X,1) <=> X=0. neg(X,X) <=> fail. or(X,Y,A) \ or(X,Y,B) <=> A=B. or(X,Y,A) \ or(Y,X,B) <=> A=B. neg(X,Y) \ neg(Y,Z) <=> X=Z. neg(X,Y) \ neg(Z,Y) <=> X=Z. neg(Y,X) \ neg(Y,Z) <=> X=Z. neg(X,Y) \ or(X,Y,Z) <=> Z=1. neg(Y,X) \ or(X,Y,Z) <=> Z=1. neg(X,Z) , or(X,Y,Z) <=> X=0,Y=1,Z=1. neg(Z,X) , or(X,Y,Z) <=> X=0,Y=1,Z=1. neg(Y,Z) , or(X,Y,Z) <=> X=1,Y=0,Z=1. neg(Z,Y) , or(X,Y,Z) <=> X=1,Y=0,Z=1. The transformation of the CHR in the Java system (Wolf 2001a) is straightforward: Example 2 The coding of the first rule or(0,X,Y) <=> Y=X. in a CHR handler is quite simple: class boolHandler { (01) public static void main(String[] args) { (02) DJCHR djchr = new DJCHR("bool", new String[]{"or/3","neg/2"}); (03) Variable x = new Variable("X"); 6 Armin Wolf (04) (05) ... (06) ... (07) (08) (09) ... (10) (11) } Variable y = new Variable("Y"); Term zero = new Term(0); Term[] remove, keep, guard, body; remove = new Term[]new Term("or",new Term[]{zero,x,y}); body = new Term[]{DJCHR.eq(y,x)}; djchr.addRule(remove,null,body,null); djchr.compileAll(); } First of all, a new handler object djchr is generated (line 2). It is called bool and supports the ternary user-defined constraint or and the binary user-defined constraint neg. Then, two variables X and Y as well as a constant 0 are generated (lines 3–5). Every rule is split up into four arrays of terms (line 6): the head constraints that are removed, the head constraints that are kept, the guard constraints, and the body constraints according to (Holzbaur and Frühwirth 2000). For the considered rule to be transformed, the keep and guard arrays must be empty. However, the remove array contains the constraint or(0,X,Y), which is generated accordingly (line 7). Furthermore, the body constraint Y=X is generated using of the built-in method eq (line 8). Then the rule is composed and added to the handler (line 9). Finally, all added rules are compiled by calling compileAll() (line 10). During the compilation process, a Boolean constraint solver class called bool is generated. The application interface generated for this solver comprises the methods • void or 3(Term[] args, IntegerSet set) • void neq 2(Term[] args, IntegerSet set) to add the specified user-defined constraints or and neg. Additionally, a class boolVariable of attributed logical variables, which is a subclass of the class Variable, is also generated. It has special attributes to store and access efficiently the Boolean constraints on these variables, cf. (Holzbaur 1990; Wolf 2001b). Thus, the propositional formula in conjunctive normal form (A ∨ ¬B ∨ C) ∧ (¬A ∨ B ∨ D) is modelled as a Boolean constraint problem by the Java code fragment bool cs = new bool(); boolVariable a = new Variable("A"); boolVariable b = new Variable("B"); boolVariable c = new Variable("C"); boolVariable d = new Variable("D"); boolVariable e = new Variable("E"); boolVariable f = new Variable("F"); boolVariable x = new Variable("X"); boolVariable y = new Variable("Y"); Term one = new Term(1); Intelligent search based on adaptive CHR 7 cs.neg 2(new Term[]{a,f}, ∅); cs.neg 2(new Term[]{b,e}, ∅); cs.or 3(new Term[]{a,e,x}, ∅); cs.or 3(new Term[]{x,c,one}, ∅); cs.or 3(new Term[]{f,b,y}, ∅); cs.or 3(new Term[]{y,d,one}, ∅); if it is assumed that the formula is always valid, which means that the justifications are the empty sets. The calls of the methods cs.neg 2 and cs.or 3 add the constraints to the constraint store of the constraint system cs and eventually trigger some of the compiled rules. It should be noted that the presented Boolean CHR solver applies the unit clause rule (Davis and Putnam 1960). Unit clauses are disjunctions of literals, i.e. propositional variables or their negations, where all literals except one are 0. Here, unit clauses are represented by conjunctions of k constraints or(X0 ,X1 ,R1 ), or(R1 ,X2 ,R2 ), . . . , or(Rk ,Xk ,1) , where for a fixed index j ∈ {1, . . . , k} it holds Xi = 0 for all indices i 6= j. These constraints trigger the rule or(X,0,Y) <=> X=Y several times deriving in this order Rk = ... = Rj = 1, and further R1 = ... = Rj−1 if j > 1 holds. In any case, either the rule or(X,0,Y) <=> X=Y or or(0,X,Y) <=> X=Y is finally triggered, which results in Xj = 1 in either case. Other instances of propositional formulas in conjunctive normal form that are processable using the introduced Boolean constraint solver are the AIM instances presented in the next section. 4 The AIM Instances The AIM instances are random 3-SAT problem instances in conjunctive normal form, named after their originators Kazuo Iwama, Eiji Miyano and Yuichi Asahiro. 3-SAT problems are conjunctions of disjunctions of three literals, i.e. propositional variables or negations of them. The AIM instances are all generated with a particular random 3-SAT instance generator (Iwama et al. 1996). The particularity is that the generator generates yes-instances and no-instances independently for wide ranges. Thus its primary role is to provide the sort of instances that conventional random generation has difficulty generating. The generator runs in a randomised fashion, which means that the 3-SAT instances essentially differ from those generated in a deterministic fashion or from those translated from other problems. As a result, the following set of considered AIM instances includes • no-instances with low clause/variable ratios that are inconsistent • yes-instances with low and high clause/variable ratios that have exactly one solution The instances are called aim-xxx-y y-zzzz-j where • xxx shows the number of variables, one of 50, 100 and 200 8 Armin Wolf • y y shows the clause/variable ratio y.y, including 1.6, 2.0 for no-instances and 1.6, 2.0, 3.4, and 6.0 for single-solution yes-instances • zzzz is either “no” or “yes1”, the former denoting a no-instance and the latter a single-solution yes-instance • the last j means simply the j-th instance at that parameter For each parameter, four instances are included in the benchmark set. The whole benchmark set is available online at http://www.satlib.org. For example, aim-50-1 6-no-1 through aim-50-1 6-no-4 are four no-instances with 50 variables and a 1.6 clause/variable ratio. In all, there are 18 sets of instances with 50, 100 and 200 variables. For the yes-instances, clause /variable ratios are taken from 1.6, 2.0, 3.4, and 6.0; for the no-instances, they are taken from 1.6, and 2.0. To find the unique solutions of the yes-instances or to prove the inconsistency of the no-instances, there are several state-of-the-art SAT solvers. A collection of SAT solvers is also available at http://www.satlib.org. Most of these algorithms are (heuristic) local-search algorithms or can be traced back to the Davis-Putnam procedure (Davis and Putnam 1960). However, the presented Boolean constraint solver in the previous section, complemented by a search procedure that assigns the value 0 or 1 to the propositional variables, can obviously be used to solve such SAT problems. Furthermore, SAT problems are often used to compare “intelligent” search procedures with chronological backtracking, cf. (Baker 1994; Ginsberg 1993; Lynce and Marques-Silva 2002; Prosser 1993). The next section therefore considers several search procedures and their interaction with the generated Boolean constraint solver. 5 The Search Procedures Before describing the compared search procedures in detail, we look at some of the assumptions made and programming conventions used. 5.1 Programming Conventions It is assumed that there are Boolean Constraint Satisfaction Problems (CSP), i.e. there are variables V1 , . . . , Vn with Boolean domains {0, 1}. Additionally, there are two types of Boolean constraints over these variables, either negations ¬X = Y or disjunctions X ∨ Y = Z, where X, Y or Z are either variables, 0 or 1. The problem is either to detect that there is no assignment of values to the variables such that the constraints are satisfied, i.e. the problem is inconsistent, or to find such an assignment, i.e. a solution. The Boolean constraints are realized by user-defined constraints handled by the Boolean solver presented in Section 3. The different search procedures to solve Boolean CSP are presented in pseudocode strongly related to Java. The main difference compared to Java is that mathematical set notation is used instead of some methods of the “abstract” class IntegerSet. – Actually, we used our implementation of sparse integer sets, which is described in (Wolf 1999). However, this might be replaced by any other, even more efficient implementation. Intelligent search based on adaptive CHR 9 It is assumed that there is a globally declared array of variables2 var, such that var[i] represents the variable Vi for i = 1, . . . , n where n is the actual number of variables in the considered problem. Variables (of the class Variable) implement attributed logical variables: they may be bound to terms, e.g. integers, or unbound, i.e. free. Thus, there is the method • boolean isBound() which returns true if and only if the variable is bound. If a variable is bound, the method Term value() is defined, which returns the term the variable is bound to. Furthermore, there is an integer field num holding either the next value to be assigned to this variable (see Section 5.3) or an identifier justifying the current assignment (see Section 5.5). A variable also contains an array of integer sets with indices ranging over the Boolean domain from 0 to 1. If defined, i.e. if different from null, this array contains for each value unique identifiers of the variables, i.e. their indices, bound to values that result in an inconsistency, which was detected with respect to the considered Boolean constraint problem. Example 3 Let this set for the value 1 of the variable V17 be {3, 7, 8, 10} where 3,7,8, and 10 are the indices of other labelled variables. Then the assignment V17 = 1 is inconsistent with the current assignments to the variables V3 , V7 , V8 and V10 with respect to the considered Boolean CSP. In conflict-directed backjumping, these sets are called conflict sets, and in dynamic backtracking they are called elimination explanations. Thus, in these search procedures the array is declared as either • IntegerSet[] conflictSet or • IntegerSet[] elimExpl, accordingly. Furthermore, it is assumed that the language supports variable lists, e.g. a “wrapper” VariableList of the Java class ArrayList that supports • access to the size of a list: int size() • addition of a variable at the end of a list: void add(Variable var) • access to a variable at a specific position in a list: Variable get(int i), where the index of the first variable in a list is zero • access to the last variable in a list: Variable getLast(int i) • removal of a variable at a specific position: Variable remove(int i) such that the indices of the variables that come after the removed variable are decremented by one The following data structures are also assumed to be globally declared and thus accessible to all methods: • A unique Boolean constraint system cs of the class bool, where the constraints are stored and processed by use of the Boolean CHR solver (see Section 3). 2 Variables in the sense of constraint processing. 10 Armin Wolf static boolean cssp(int n) { (01) int i = 1; (02) while (1 <= i && i <= n) { (03) int j = xxxLabel(i); (04) if (i == j) (05) i = xxxUnlabel(i); (06) else i = j; (07) } (08) if (i = 0) (09) return false; (10) if (i > n) (11) return true; } Fig. 2. The cssp function for solving constraint satisfaction search problems • Two variable lists unlabelledVars and labelledVars of the class VariableList, where the unlabelled and labelled variables are stored during dynamic backtracking (cf. Figures 10 and 11). • A unique integer cntr, which is initially 0 and incremented by one after an assignment in dynamic backtracking (cf. Figure 10, line 10) serving as its unique justification. In the sequel, the calls to the constraint system using the interface to the adaptive CHR system are underlined. This shows the simple and powerful use of our adaptive CHR system in sophisticated search procedures. 5.2 The Constraint Satisfaction Search Process According to the style presented in (Prosser 1993), the constraint satisfaction search problem (cssp) method in Figure 2 establishes the environment in which the different search methods are called. The cssp method takes the total number of variables to be labelled with values and returns true if a solution is found and false if the given Boolean CSP is inconsistent. The “generic” methods xxxLabel and xxxUnlabel are replaced in the sequel resulting in chronological backtracking (cbtLabel/cbtUnlabel), conflict-directed backjumping (cbjLabel/cbjUnlabel) and two variants of dynamic backtracking (dbtLabel/dbtUnlabel and fbtLabel/fbtUnlabel). In all these instances, the method xxxLabel attempts to find a consistent assignment to the i-th variable.3 For this, the method takes i as its argument. It returns this given integer if no such assignment is found. However, if a consistent assignment to the i-th variable is found, it returns i + 1 after binding this variable to a value that is consistent with the other i − 1 previously bound variables and with respect to the given Boolean constraint problem. If xxxLabel returns i, the method xxxUnlabel is called. When 3 The i-th variable coincides with Vi in chronological backtracking and conflict-directed backjumping but not necessarily in dynamic backtracking, which may dynamically change the variable ordering. Intelligent search based on adaptive CHR 11 i + 1 is returned with 1 < i + 1 ≤ n, xxxLabel is called again, looking for an assignment to the (i + 1)-th variable. Returning n + 1 causes cssp to return true because a consistent assignment for all variables is found. The corresponding instance of xxxUnlabel is called when no consistent assignment to the i-th variable is found (cf. lines 4–5 in Figure 2). It performs backtracking from the i-th variable to an h-th variable (h < i) if another value for the h-th variable might resolve the inconsistency detected at the i-th variable. It takes i as its argument. It either returns 0 or the index of the next variable to be labelled. Zero is returned if the detected inconsistency is not resolvable, i.e. the given Boolean CSP is inconsistent causing cssp to return false ( Figure 2, lines 8–9). 5.3 Chronological Backtracking Chronological backtracking (CBT) is a simple depth-first search (cf. Figure 3) with a fixed tree structure, i.e. variable ordering. If the variables are not already bound by constraint processing (Figure 4, lines 1–2), they are incrementally bound to the values 0 or 1. First, the current variable Vi is labelled with the value 0. Search continues with Vi+1 if no inconsistency is detected (Figure 4, lines 5–6). Otherwise, the value 1 is assigned to the variable Vi . Again, search continues with Vi+1 if no inconsis- Fig. 3. The principle of tency is detected. Otherwise, a dead end is reached chronological backtracking and the search backtracks to the variable Vi−1 (cf. Figures 3 and 5). int cbtLabel(int i) { (01) if (var[i].isBound()) (02) return i+1; (03) while (var[i].num <= 1) { (04) cs.equal(var[i], var[i].num++, {i}); (05) if (cs.isConsistent()) (06) return i+1; (07) else (08) cs.delete({i}); (09) } (10) return i; } Fig. 4. The labelling method of chronological backtracking A generalisation of this search process for arbitrary finite domains is quite simple: the field num in the variable must be replaced by the domain. During labelling, it must be iterated over the values in the current domain (Figure 4, lines 3–9). The iterator for this loop must be reset during unlabelling (Figure 5, line 2). 12 Armin Wolf int cbtUnlabel(int i) { (01) cs.delete({i}); (02) var[i].num=0; (03) return i-1; } Fig. 5. The unlabelling method of chronological backtracking 5.4 Conflict-directed Backjumping Conflict-directed backjumping (CBJ) (Prosser 1993) is a guided depth-first search with a fixed tree structure, i.e. variable ordering, that “jumps back” to the most recent variable assignment that is in conflict with the current variable (cf. Figure 6). Originally, CBJ maintains a conflict set per variable. However, in our refinement it maintains a conflict set for each value of every variable. Initially, these conflict sets are not defined, i.e. null. If the unlabelled variable Vi is not already bound by constraint processing (Figure 7, lines 1–2) the attempt is made to bind it either to the value 0 or 1. The current variable Vi is labelled with the first value that is possibly not in conflict with other already labelled variables (Figure 7, line 4–5). Thus, the index of the variable is chosen as the justification of this assignment because it simply alFig. 6. The principle of lows any subsequent deletion of it and all its conseconflict-directed backjump- quences computed by the underlying Boolean coning straint solver (cf. Figure 7, line 10 and Figure 8, line 6). The search continues with Vi+1 if no inconsistency is detected (Figure 7, lines 6–7). Otherwise, the indices of the already labelled variables that are responsible for the detected inconsistency form the conflict set of the attempted value (Figure 7, lines 8–11), the assignment is deleted (Figure 7, line 10) and the next value for Vi is attempted (Figure 7, lines 3–13). If all assignments lead to an inconsistency, a dead end is reached, i.e. i is returned (Figure 7, line 14), which triggers unlabelling. If the conflict sets of all values of the considered variable Vi are empty, the deletion of all variable assignments will not resolve the detected inconsistency. Thus, 0 is returned, indicating the inconsistency of the given Boolean CSP (Figure 8, lines 1–2). If the union of all conflict sets is not empty, the search “jumps back” to the most recent assignment that is involved in the detected dead end. This means that the assignment to the variable Vh is involved in the reached dead end, where h is the largest index in this union (cf. Figure 8, line 3). Before jumping back, the not yet defined conflict set of the value assigned to the variable Vh (cf. Figure 7, line 4) becomes the union of the conflict sets of the values attempted for the variable Vi without the index h (Figure 8, lines 4–5). This is crucial because without any change in the assignments to the variables indicated in this conflict set, the variables from Vh to Vi will be bound to the same values leading to the same dead end, and Intelligent search based on adaptive CHR 13 thus into a loop. Then the assignments to the variables from Vh to Vi−1 are deleted (Figure 8, line 6) and the conflict sets of all previously labelled variables (Vh to Vn ) are updated, i.e. all defined conflict sets indicating variables that are not deleted are kept because they are still valid (Figure 8, lines 7–15). Finally, h, the index of the next variable to be labelled, is returned (Figure 8, line 16). The method proposed here is in several respects more general than the original CBJ or its extensions with forward checking (FC-CBJ) also presented in (Prosser 1993), or with maintaining arc consistency (MAC-CBJ) presented in (Prosser 1995): Firstly, our algorithm is not restricted to binary constraints; it processes constraints of arbitrary arities. Secondly, instead of checking each assignment of the current variable against the assignments to the already bound variables to determine the conflict sets as in the original CBJ, constraint propagation is used in our approach to detect inconsistencies and their explanations. This is similar to MAC-CBJ (Prosser 1995), where constraint propagation performs arc consistency. However, the underlying CHR solver is able to perform stronger, more “global” propagation because multi-headed rules allow reasoning over combinations of several constraints: Example 4 The single-headed rules of the Boolean CHR solver introduced in Section 3 perform local propagation maintaining local consistency (cf. (Marriott and Stuckey 1998)), which is the canonical extension of arc consistency to non-binary constraint problems. Furthermore, the two-headed rules perform additional propagation: Given: the Boolean variables U, V, X, and Y with domains {0, 1} as well as the constraints or(X,U,V), neg(Y,U), and or(X,Y,V). In the first search step, we label X = 0. The original CBJ is unable to perform at all because all constraints have unbound variables. Neither forward checking in FC-CBJ nor MAC-CBJ will restrict any domains of the not-yet-labelled variables. However, in our approach this labelling triggers the rule or(0,U,V) <=> U=V. This simplifies the constraints to U = V, neg(Y,V) and or(X,Y,U). The equation U=V further triggers the rule neg(Y,V), or(X,Y,V) <=> X=1, Y=0, V=1 resulting in an inconsistency. Thus, in our approach the assignment to the current variable is not only checked against past variable assignments but also against the constraints with future variables, maintaining some kind of consistency that is in general stronger than local consistency. As aforementioned, the conflict sets in our approach are not only stored for each variable, they are stored for all possible values of each variable also proposed by (Bruynooghe 2004). This allows us to avoid already detected conflicts after any back-jumps or re-assignments to variables: Example 5 Let us assume that the value 0 of the variable V7 is in conflict with the assignments to the variables V1 and V3 and the value 1 of the variable V7 is in conflict with the assignments to the variables V2 and V4 . Then, CBJ jumps back to 14 Armin Wolf int cbjLabel(int i) { (01) if (var[i].isBound()) (02) return i+1; (03) for (int k=0; k <= 1; k++) { (04) if (var[i].conflictSet[k] == null) { (05) cs.equal(var[i], k, {i}); (06) if (cs.isConsistent()) (07) return i+1; (08) else { (09) var[i].conflictSet[k] = cs.getExplanation()\{i}; (10) cs.delete({i}); (11) } (12) } (13) } (14) return i; } Fig. 7. The labelling method of conflict-directed backjumping the variable V4 , undoing the assignments to the variables V7 , V6 , V5 and V4 . The value recently assigned to the variable V4 is thus known to be in conflict with the variables V1 , V2 and V3 . If there is any non-conflicting assignment to the variable V4 , we know for future labelling that the value 0 of the variable V7 is still in conflict with the assignments to the variables V1 and V3 . A generalisation of this search process for arbitrary finite domains is quite simple: It must be iterated over the values in the domain (Figure 7, lines 3–13 and Figure 8, lines 9–15), and the tests and calculations must be done for all conflict sets of the domain values ( Figure 8, lines 1 and 3–5). 5.5 Dynamic Backtracking Dynamic backtracking (DBT) (Ginsberg 1993) is a guided depth-first search dynamically changing the tree structure, i.e. the variable ordering, which goes back to the most recent variable assignment that is in conflict with the current variable retaining the intermediate assignments (cf. Figure 9). DBT maintains an elimination explanation for each value of every variable. Initially, these sets are not deFig. 9. The principle of dy- fined, i.e. null. In DBT, two global variable lists namic backtracking are maintained to manage the dynamic changes of the value ordering. The list unlabelledVars contains the not-yet-labelled variables, while the list labelledVars keeps the already labelled variables. If the (last-entered) unlabelled variable is not already bound by constraint processing (Figure 10, lines 1–5) the attempt is made to bind it either to the value 0 or 1. This variable is labelled with the first value that is possibly not in conflict with other already labelled variables (Figure 10, line 7–8). Thus, the value of the Intelligent search based on adaptive CHR 15 int cbjUnlabel(int i) { (01) if (var[i].conflictSet[0] == ∅ && var[i].conflictSet[1] == ∅) (02) return 0; (03) int h = max(var[i].conflictSet[0] ∪ var[i].conflictSet[1]) (04) var[h].conflictSet[var[h].value()] (05) = (var[i].conflictSet[0] ∪ var[i].conflictSet[1])\{h}; (06) cs.delete({h, . . . , i − 1}); (07) for (int j=h; j <= n; j++) { (08) for (int k=0; k <= 1, k++) { (09) if (var[j].conflictSet[k] != null (10) && var[j].conflictSet[k] != ∅ (11) && max(var[j].conflictSet[k]) >= h) { (12) var[j].conflictSet[k] = null; (13) } (14) } (15) } (16) return h; } Fig. 8. The unlabelling method of conflict-directed backjumping keeping formerly detected and still valid conflict sets global counter is chosen as its unique justification and later stored at the variable if no inconsistency arises (Figure 10, lines 8 and 10). This facilitates any subsequent deletion of the assignment and all its consequences computed by the underlying Boolean constraint solver (cf. Figure 10, line 16 and Figure 11, line 15). The search continues with the next unlabelled variable if no inconsistency is detected (Figure 10, lines 10–12). Otherwise, the justifications of the already labelled variables that are responsible for the detected inconsistency form the elimination explanation of the attempted value (Figure 10, line 15), the assignment is deleted (Figure 10, line 16), and the next value for this variable is attempted (Figure 10, lines 6–19). If each assignment leads to an inconsistency, a dead end is reached, i.e. the variable is added to the list of unlabelled variables and i is returned (Figure 10, lines 20–21), which triggers unlabelling. If the elimination explanation of all values of the considered variable are empty, the deletion of all variable assignments will not resolve the detected inconsistency. Thus, 0 is returned, indicating the inconsistency of the given Boolean CSP (Figure 11, lines 1–2). If the union of all elimination explanations is not empty, the search “goes back” to the most recent assignment that is involved in the detected dead end. This means that the assignment to the variable bt justified by the maximum h in this union (cf. Figure 11, lines 5–12) is involved in the reached dead end. Before going back, the elimination explanation of the value assigned to the variable bt becomes the union of the elimination explanations of the values attempted for the most recently tried variable in dbtLabel. This causes the justification h (Figure 11, lines 13–14) to be removed. This is crucial as in CBJ (see Section 5.4) because otherwise bt will be labelled again with the same value leading to the same dead end, and thus into a loop. The assignment to the variable bt is then deleted (Figure 11, line 15) and added to the unlabelled vari- 16 Armin Wolf ables. Additionally, the elimination explanations of all variables are updated, i.e. all defined elimination explanations not containing the justification of the deleted assignment are kept because they are still valid (Figure 11, lines 17–33). Example 6 Let us assume that the elimination explanation of the value 0 of the variable V7 consists of the justifications of the assignments to the variables V2 and V9 and that the elimination explanation of the value 1 of the variable V7 consists of the justifications of the assignments to the variables V3 and V11 . The most recent assignment (with the largest justification) is assumed to be to the variable V3 . Thus, DBT goes back to the variable V3 , undoing its assignment. The value recently assigned to the variable V3 is thus known to be in conflict with the assignments to the variables V2 , V9 and V11 . Thus, the elimination explanation of this value is the union of the justifications of these variables. If there is any non-conflicting assignment to the variable V3 , we know for future labelling that the value 0 of the variable V7 is still in conflict with the assignments to the variables V2 and V9 . Furthermore, any other elimination explanation not containing the justification of the removed assignment is still valid. As a result of the non-chronological constraint deletion, a previously bound variable that is stored in the list of already labelled variables (cf. Figure 10, lines 2–3) may happen to be unbound. Such free variables are filtered out and moved to the variables that still have to be labelled (cf. Figure 11, lines 34–37). Finally, the number of the variable that has to be labelled next is returned (Figure 11, line 39).4 The method proposed here is in several respects more general than the original DBT (Ginsberg 1993) or its extensions with forward checking (FC-DBT) or even with maintaining arc consistency (MAC-DBT) presented in (Jussien et al. 2000): Firstly, our algorithm is not restricted to binary constraints; it processes constraints of arbitrary arities. Secondly, instead of checking each assignment of the current variable against the assignments to the already bound variables to determine the elimination explanation as in the original DBT, constraint propagation is used in our approach to detect inconsistencies and their explanations. This is similar to MAC-DBT (Jussien et al. 2000), where constraint propagation performs arc consistency. However, the underlying CHR solver is able to perform stronger, more “global” propagation because multi-headed rules allow reasoning over combinations of several constraints (cf. Example 4). Unlike other solvers for dynamic CSP (Jussien et al. 2000) our underlying adaptive CHR constraint solver which was primarily constructed to solve dynamic CSP, is adequate to support DBT for dynamic CSP (Verfaillie and Schiex 1994): justifications are not restricted to variable assignments; any other constraint may be justified, too. Thus, the crucial calculation of elimination explanations performed by the method getExplanation() returns the identifiers of the constraints involved in the detected inconsistency. 4 Note that the number is not necessarily the index in the array var because the value ordering may change dynamically. Intelligent search based on adaptive CHR 17 int dbtLabel(int i) { (01) Variable var = unlabelledVars.removeLast(); (02) if (var.isBound()) { (03) labelledVars.add(var); (04) return i+1; (05) } (06) for (int k=0; k <= 1; k++) { (07) if (var.elimExpl[k] == null) { (08) cs.equal(var, k, {cntr}); (09) if (cs.isConsistent()) { (10) var.num = cntr++; (11) labelledVars.add(var); (12) return i+1; (13) } (14) else { (15) var.elimExpl[k] = cs.getExplanation()\{cntr}; (16) cs.delete({cntr}); (17) } (18) } (19) } (20) unlabelledVars.add(var); (21) return i; } Fig. 10. The labelling method of dynamic backtracking A generalisation of this search process for arbitrary finite domains is quite simple: It must be iterated over the values in the domain (Figure 10, lines 6–19 and Figure 11, lines 19–24 and 28–33), and the tests and calculations must be done for all eliminations explanation of the domain values (Figure 8, lines 2 and 6). 5.6 “Fancy” Backtracking The variant of dynamic backtracking presented in (Baker 1994) – we call it “fancy” backtracking – is also implemented and compared to the other search strategies. It differs from the original dynamic backtracking only in the unlabelling procedure: together with the most recent assignment involved in a detected dead end, all assignments that are directly or indirectly determined by this assignment are deleted, too. Example 7 Let us assume that the most recent assignment involved in a dead end is that to the variable V7 . Further, let us assume that its justification is in the elimination explanation of the value 0 of the labelled variable V5 . Then, the assignment of the value 1 to the variable V5 is determined by the assignment to the variable V7 . Furthermore, any elimination explanation, e.g. that of the value 1 to the variable V9 , containing the justification of the assignment to the variable V5 is indirectly determined by the assignment to the variable V7 . 18 Armin Wolf int dbtUnlabel(int i) { (01) Variable var = unlabelledVars.removeLast(); (02) if (var.elimExpl[0] == ∅ && var.elimExpl[1] == ∅) { (03) return 0; (04) } (05) Variable bt; (06) int h = max(var.elimExpl[0] ∪ var.elimExpl[1]); (07) for (int j=labelledVars.size()-1; j >= 0; j--) { (08) bt = labelledVars.get(j); (09) if (bt.num == h) { (10) labelledVars.remove(j); (11) break; (12) } (13) bt.elimExpl[bt.value()] (14) = (var.elimExpl[0] ∪ var.elimExpl[1])\{h}; (15) cs.delete({h}); (16) unlabelledVars.add(bt); (17) for (j=0; j < unlabelledVars.size(); j++) { (18) var = unlabelledVars.get(j); (19) for (int k=0; k <= 1, k++) { (20) if (var.elimExpl[k] != null (21) && h ∈ var.elimExpl[k]) { (22) var.elimExpl[k] = null; (23) } (24) } (25) } (26) for (j=labelledVars.size()-1; j >=0; j--) { (27) var = labelledVars.get(j); (28) for (int k=0; k <= 1, k++) { (29) if (var.elimExpl[k] != null (30) && h ∈ var.elimExpl[k]) { (31) var.elimExpl[k] = null; (32) } (33) } (34) if (!var.isBound()) { (35) labelledVars.remove(j); (36) unlabelledVars.add(var); (37) } (38) } (39) return labelledVars.size()+1; } Fig. 11. The unlabelling method of dynamic backtracking keeping formerly detected and still valid elimination explanations Figure 12 shows our implementation of this proposed extension of dynamic backtracking. The additional loop (Figure 12, lines 18–33) calculates the set of all justifications of the assignments that must be deleted containing at least the justification of the most recent assignment involved in the detected dead end (Figure 12, line 16). Then, all these assignments are deleted (Figure 12, line 34). Additionally, the elimination explanations of all variables are updated, i.e. all defined elimination ex- Intelligent search based on adaptive CHR 19 planations disjoint to the justifications of the deleted assignments are kept because they are still valid (Figure 12, lines 23–25 and 45–47). 6 Performance Comparison We have compared the different search procedures presented in Section 5 together with a SICStus Prolog implementation of chronological backtracking based on the SICStus Prolog compilation of the CHR handler for Boolean constraints presented in Section 3. We applied these procedures, then, to all AIM instances with 50 variables.5 For each instance, the required backtracking or backjumping steps together with their elapsed runtime are listed in Tables 1 and 2. The runtime was measured on a Pentium IV PC with 2.8 GHz running Windows XP Professional, Java 1.4.0 from Sun6 and SICStus Prolog7 3.11.0. In Table 1, CBJ means conflict-directed backjumping introduced by (Prosser 1993) as presented in Section 5.4, DBT means dynamic backtracking introduced in (Ginsberg 1993) while FBT is its “fancy” variant introduced in (Baker 1994), both presented in Section 5.5. In Table 2, both chronological backtracking procedures – the one presented in Section 5.3 and the other implemented in SICStus Prolog – obviously require the same number of search steps; they differ only in their runtime. Based on these results, we compared the number of search steps and runtime in graph form. Figure 13 shows the “qualitative” comparison, and Figure 14 the “quantitative” comparison. In both figures, the last two groups show the summations of the steps/the elapsed runtime for the AIM instances with exactly one solution (yes-instances) and for the inconsistent instances (no-instances). The summations show that conflict-directed backjumping performs very well, confirming the results in (Prosser 1993): in terms of the number of search steps, conflict-directed backjumping (CBJ) requires on average two orders of magnitude less than chronological backtracking for all instances and is on average more than one order of magnitude faster than all other search procedures, even faster than the SICStus Prolog implementation. Furthermore, the performance of the Java and SICStus Prolog implementations of chronological backtracking are comparable. Looking at the required number of search steps, we find that in a few cases dynamic backtracking (DBT) requires marginally more steps than chronological backtracking, which is at odds with the statements made in (Baker 1994). Surprisingly, its extended variant (FBT) proposed in (Baker 1994) often requires more search steps than the original version of dynamic backtracking. 7 Discussion The conflict-directed backjumping algorithms presented in (Prosser 1993; Prosser 1995) compute the conflict sets either from total assignments with respect to 5 6 7 Larger instances tended to take too much time (some over 24 hours). see http://java.sun.org/ see http://www.sics.se/sicstus/ 20 Armin Wolf int fbtUnlabel(int i) { (01) Variable var = unlabelledVars.removeLast(); (02) if (var.elimExpl[0] == ∅ && var.elimExpl[1] == ∅) { (03) return 0; (04) } (05) Variable bt; (06) int h = max(var.elimExpl[0] ∪ var.elimExpl[1]); (07) for (int j=labelledVars.size()-1; j >= 0; j--) { (08) bt = labelledVars.get(j); (09) if (bt.num == h) { (10) labelledVars.remove(j); (11) break; (12) } (13) bt.elimExpl[bt.value()] (14) = (var.elimExpl[0] ∪ var.elimExpl[1])\{h}; (15) unlabelledVars.add(bt); (16) IntegerSet label = {h}; (17) boolean isChanged = true; (18) while (isChanged) { (19) isChanged = false; (20) for (j=0; j < labelledVars.size(); j++) { (21) var = labelledVars.get(j); (22) for (int k=0; k <= 1, k++) { (23) if (var.elimExpl[k] != null (24) && label ∩ var.elimExpl[k] != ∅ { (25) var.elimExpl[k] = null; (26) label = label ∪ {var.num}; (27) labelledVars.remove(j); (28) unlabelledVars.add(var); (29) isChanged = true; (30) } (31) } (32) } (33) } (34) cs.delete(label); (35) for (j=labelledVars.size()-1; j >= 0; j--) { (36) var = labelledVars.get(j); (37) if (!var.isBound()) { (38) labelledVars.remove(j); (39) unlabelledVars.add(var); (40) } (41) } (42) for (j=0; j < unlabelledVars.size(); j++) { (43) var = unlabelledVars.get(j); (44) for (int k=0; k <= 1, k++) { (45) if (var.elimExpl[k] != null (46) && var.elimExpl[k] ∩ label != ∅) { (47) var.elimExpl[k] = null; (48) } (49) } (50) return labelledVars.size()+1; } Fig. 12. The alternative unlabelling method of a variant of dynamic backtracking deleting additional variable assignments also keeping formerly detected and still valid elimination explanations CBJ backjumps DBT backtracks FBT backtracks chronol. backtracks nf nf nf nf nf nf nf cnf nf cnf nf cnf nf cnf nf cnf nf cnf nf nf nf cnf nf cnf es ces 1.c o-1. -2.c o-2. -3.c o-3. -4.c o-4. -1.c o-1. -2.c o-2. -3.c o-3. -4.c o-4. -1.c -2.c -3.c -4.c -1.c -2.c -3.c -4.c tanc tan s1 6-n es1 6-n es1 6-n es1 6-n es1 0-n es1 0-n es1 0-n es1 0-n es1 es1 es1 es1 es1 es1 es1 es1 -ins -ins y y y y y y y y y y y y y y ye y no 6- -1_ _6- -1_ _6- -1_ _6- -1_ _0- -2_ _0- -2_ _0- -2_ _0- -2_ _4- _4- _4- _4- _0- _0- _0- _0- es1 _ -1 -50 0-1 -50 0-1 -50 0-1 -50 0-2 -50 0-2 -50 0-2 -50 0-2 -50 0-3 0-3 0-3 0-3 0-6 0-6 0-6 0-6 m y sum 0 -5 -5 -5 -5 -5 -5 -5 -5 aim -5 aim -5 aim -5 aim -5 aim -5 aim -5 aim -5 aim -5 su aim aim aim aim aim aim aim aim aim aim aim aim aim aim aim aim 1 10 100 1000 10000 100000 1000000 10000000 Intelligent search based on adaptive CHR 21 steps Fig. 13. Comparison of different search strategies on the AIM instances with 50 variables in terms of their number of backjumping/backtracking steps CBJ millisecs. DBT millisecs FBT millisecs. DJCHR millisecs SICStus CHR millisecs nf nf nf nf nf nf nf cnf nf cnf nf cnf nf cnf nf cnf nf cnf nf nf nf cnf nf cnf es ces 1.c o-1. -2.c o-2. -3.c o-3. -4.c o-4. -1.c o-1. -2.c o-2. -3.c o-3. -4.c o-4. -1.c -2.c -3.c -4.c -1.c -2.c -3.c -4.c tanc tan s1 6-n es1 6-n es1 6-n es1 6-n es1 0-n es1 0-n es1 0-n es1 0-n es1 es1 es1 es1 es1 es1 es1 es1 -ins -ins y y y y y y y y y y y y y y ye y no 6- -1_ _6- -1_ _6- -1_ _6- -1_ _0- -2_ _0- -2_ _0- -2_ _0- -2_ _4- _4- _4- _4- _0- _0- _0- _0- es1 _ -1 -50 0-1 -50 0-1 -50 0-1 -50 0-2 -50 0-2 -50 0-2 -50 0-2 -50 0-3 0-3 0-3 0-3 0-6 0-6 0-6 0-6 m y sum 0 -5 -5 -5 -5 -5 -5 -5 -5 aim -5 aim -5 aim -5 aim -5 aim -5 aim -5 aim -5 aim -5 su aim aim aim aim aim aim aim aim aim aim aim aim aim aim aim aim 1 10 100 1000 10000 100000 1000000 10000000 22 Armin Wolf msecs. Fig. 14. Comparison of different search strategies on the AIM instances with 50 variables in terms of their runtime Intelligent search based on adaptive CHR 23 Table 1. Comparison of different search strategies on the AIM instances with 50 variables (Part 1) AIM instance aim-50-1 aim-50-1 aim-50-1 aim-50-1 aim-50-1 aim-50-1 aim-50-1 aim-50-1 aim-50-2 aim-50-2 aim-50-2 aim-50-2 aim-50-2 aim-50-2 aim-50-2 aim-50-2 aim-50-3 aim-50-3 aim-50-3 aim-50-3 aim-50-6 aim-50-6 aim-50-6 aim-50-6 6-yes1-1.cnf 6-no-1.cnf 6-yes1-2.cnf 6-no-2.cnf 6-yes1-3.cnf 6-no-3.cnf 6-yes1-4.cnf 6-no-4.cnf 0-yes1-1.cnf 0-no-1.cnf 0-yes1-2.cnf 0-no-2.cnf 0-yes1-3.cnf 0-no-3.cnf 0-yes1-4.cnf 0-no-4.cnf 4-yes1-1.cnf 4-yes1-2.cnf 4-yes1-3.cnf 4-yes1-4.cnf 0-yes1-1.cnf 0-yes1-2.cnf 0-yes1-3.cnf 0-yes1-4.cnf P P yes1-instances no-instances a b c d e CBJa Intelligent Backtracking DBTb FBTc stepsd msecs.e steps msecs. steps msecs. 2807 1070 772 116 3 1282 287 62 200 23899 98 409 130 28414 88 132 187 2 717 147 28 13 20 7 2859 1219 1031 281 63 1281 484 203 406 27843 266 765 312 30031 281 375 750 94 2953 797 422 250 313 234 60469 1899 308192 456 3 186652 1219 510 3124 28552 83 7083 772 287093 135 3367 259 2 1140 106 28 24 24 7 55250 1266 180172 469 47 95250 1219 531 2734 26421 218 8860 1203 28779 297 3734 907 78 4125 563 437 359 313 250 74883 2343 335314 727 3 2103 1458 87 6292 96102 124 2082 7516 257828 124 4800 403 2 1420 108 28 24 30 7 63062 1609 230983 687 63 1375 1578 218 5094 104983 296 2875 10407 271545 297 6391 1343 78 5297 578 437 343 343 235 5506 55384 11515 61998 375587 515612 248172 165310 427736 366072 320434 389683 Conflict-directed Backjumping as presented in Section 5.4 original version of Dynamic Backtracking (Ginsberg 1993) extended version of Dynamic Backtracking (Baker 1994) backjumping/backtracking steps required to find the solution or detect the inconsistency elapsed runtime on a Pentium IV PC with 2.8 GHz running Windows XP Professional the violated constraints or by using forward checking or maintenance of arc consistency, respectively. The calculation of the elimination explanations in (Baker 1994; Ginsberg 1993; Jussien et al. 2000) during practical experiments was rather similar. Thus, we assume that inconsistencies are detected rather late, after a lot of superfluous, unsuccessful assignments, i.e. search steps. In our approach, the underlying Boolean constraint solver performs local, but also some “global” constraint propagation (cf. Example 4). In general, the search spaces are more restricted. Thus, we expect inconsistencies to be detected earlier in the search tree, resulting in more 24 Armin Wolf Table 2. Comparison of different search strategies on the AIM instances with 50 variables (Part 2) common stepsa aim-50-1 aim-50-1 aim-50-1 aim-50-1 aim-50-1 aim-50-1 aim-50-1 aim-50-1 aim-50-2 aim-50-2 aim-50-2 aim-50-2 aim-50-2 aim-50-2 aim-50-2 aim-50-2 aim-50-3 aim-50-3 aim-50-3 aim-50-3 aim-50-6 aim-50-6 aim-50-6 aim-50-6 86442 1355146 402870 309298 3 6213098 22684 1152796 8936 536726 305 59470 21549 127034 217 45542 352 2 916 281 28 15 47 7 56610 680759 147620 151918 47 2009531 13484 432173 7781 305183 453 55093 20827 106859 469 39657 1156 78 3547 1156 438 265 469 250 56500 571907 129030 155876 10 1461955 14062 316532 9640 262791 296 65421 26406 105455 312 37081 1497 30 5158 1561 672 329 782 236 544654 9799110 254650 3781173 427464 2977018 6-yes1-1.cnf 6-no-1.cnf 6-yes1-2.cnf 6-no-2.cnf 6-yes1-3.cnf 6-no-3.cnf 6-yes1-4.cnf 6-no-4.cnf 0-yes1-1.cnf 0-no-1.cnf 0-yes1-2.cnf 0-no-2.cnf 0-yes1-3.cnf 0-no-3.cnf 0-yes1-4.cnf 0-no-4.cnf 4-yes1-1.cnf 4-yes1-2.cnf 4-yes1-3.cnf 4-yes1-4.cnf 0-yes1-1.cnf 0-yes1-2.cnf 0-yes1-3.cnf 0-yes1-4.cnf P P yes1-instances no-instances a b Chronological Backtracking Adaptive CHR in Java CHR in SICStus Prolog msecs.b msecs. AIM instance backtracking steps required to find the solution or detect the inconsistency elapsed runtime on a Pentium IV PC with 2.8 GHz running Windows XP Professional general conflict sets or elimination explanations and also earlier detection of dead ends. Example 8 Considering the Boolean constraint solver presented in Section 3 and the constraints neg(X,Y), or(X,Y,Z), neg(Z,U) , the application of one of the CHR on the first and second constraint will add the syntactical equation Z=1. Further addition of the assignment, i.e. equation U=1, will result in an inconsistency, i.e. false, by applying one of the CHR to the actualised third constraint, i.e. neg(1,1). Thus, in conflict-directed backjumping and in dynamic backtracking, the assignment U=1 is excluded during any further search: the Intelligent search based on adaptive CHR 25 conflict set and elimination explanation of value 1 of the variable U will be the empty set. Or, if we consider the constraints or(X,Y,Z), neg(Z,1) , the assignment X=1 triggers a CHR that derives the equation Z=1, resulting in the constraint neg(1,1) and eventually in false. Now, the assignment X=1 is excluded during any further search, too. We assume that this kind of “consistency maintenance”, i.e. constraint propagation, is - at least partially - responsible for the absence of the bad performance of dynamic backtracking when applied to 3-SAT problems, as reported in (Baker 1994). 8 Conclusion During our review of the adaptive CHR system, we have emphasised the potential of this system for explanation-based constraint programming (Jussien 2001). One possibility here is the use of explanations in building explanation-guided search algorithms. More specifically, we have demonstrated the simplicity of implementing sophisticated “intelligent” search strategies in conjunction with a CHR-based constraint solver within this system. In this context, • “simplicity” means that the implementations are quite straightforward, using the interface to the underlying adaptive constraint solver in an obvious manner • “sophisticated” means that early inconsistency detection accomplished by constraint propagation within the underlying solver obviously reduces the number of search steps Conflict-directed backjumping and dynamic backtracking based on CHR thus gain a kind of “consistency maintenance” and the poor performance of dynamic backtracking reported in (Baker 1994) does not occur. An empirical comparison of the implemented search procedures on the AIM instances showed that the addition of “intelligence” to the search process may reduce the number of search steps dramatically. Even the rather simple conflict-directed backjumping strategy outperforms on average all the other strategies tested. Furthermore, we have shown that the runtime of the Java implementations of the intelligent search strategies is in most cases better than the implementations of chronological backtracking, even better than the implementation in SICStus Prolog. One of the main conclusions in a recent paper on building state-of-the-art SAT solvers (Lynce and Marques-Silva 2002) “. . . is that applying non-chronological backtracking is most often crucial in solving real-word instances of SAT.” – Our implemented “intelligent” search procedures belong to this set of nonchronological backtracking solvers. A further development of the presented techniques (Müller 2004) shows that their performance is comparable to those of these state-of-the-art SAT solvers. 26 Armin Wolf 9 Future Work Future work will focus on fast implementation techniques, like counter-based or lazy implementations, randomised and heuristic variable selection, and assignment strategies that are commonly used in other state-of-the-art SAT solvers (Lynce and Marques-Silva 2002) as well as the implementation of partial order dynamic backtracking (Ginsberg and McAllester 1994) or its generalisation (Bliek 1998). Furthermore, all these extensions and the presented search strategies will be compared with some local search algorithms that might also be implemented on the basis of our adaptive CHR system (Wolf 2001a). Further future research topics are the implementation of the generalisations proposed during our presentation of the search strategies and their application to and comparison with other finite-domain constraint satisfaction problems like job-shop scheduling. Conflict-directed backjumping performs well for Quantified Boolean Logic Satisfiability (Giunchiglia et al. 2001). The algorithm presented here might therefore be adapted and successfully applied to this problem class, which is strongly related to SAT. References Baker, A. B. 1994. The hazards of fancy backtracking. In Proceedings of the Twelfth National Conference on Artificial Intelligence – AAAI’94. 288–293. Bliek, C. 1998. Generalizing partial order and dynamic backtracking. In Proceedings of the Fifth National Conference on Artificial Intelligence – AAAI’98. 319–325. Bruynooghe, M. 2004. Enhancing a search algorithm to perform intelligent backtracking. Theory and Practice of Logic Programming 4, 3 (March), 371–380. Davis, M. and Putnam, H. 1960. A computing procedure for quantification theory. Journal of the ACM 7, 3, 201–215. Frühwirth, T. 1995. Constraint Handling Rules. In Constraint Programming: Basics and Trends, A. Podelski, Ed. Number 910 in Lecture Notes in Computer Science. Springer Verlag, 90–107. Frühwirth, T. 1998. Theory and practice of Constraint Handling Rules. The Journal of Logic Programming 37, 95–138. Frühwirth, T. and Brisset, P. 1995. High-level implementations of constraint handling rules. technical report ECRC-TR-95-20, ECRC. Ginsberg, M. L. 1993. Dynamic backtracking. Journal of Artificial Intelligence Research 1, 25–46. Ginsberg, M. L. and McAllester, D. A. 1994. GSAT and dynamic backtracking. In Proceedings of the 4th International Conference on Principles of Knowledge Representation and Reasoning, J. Doyle, E. Sandewall, and P. Torasso, Eds. Morgan Kaufmann, San Francisco, California, 226–237. Giunchiglia, E., Narizzano, M., and Tacchella, A. 2001. Backjumping for quantified boolean logic satisfiability. In Proceedings of the 17th International Joint Conference on Artificial Intelligence - IJCAI 2001, B. Nebel, Ed. Vol. 1. Seattle, Washington, USA, 275–281. Holzbaur, C. 1990. Specification of constraint based inference mechanism through extended unification. Ph.D. thesis, Dept. of Medical Cybernetics & AI, University of Vienna. Intelligent search based on adaptive CHR 27 Holzbaur, C. and Frühwirth, T. 2000. A Prolog Constraint Handling Rules compiler and runtime system. Applied Artificial Intelligence 14, 4 (April), 369–388. Iwama, K., Miyano, E., and Asahiro, Y. 1996. Random generation of test instances with controlled attributes. In Cliques, Coloring, and Satisfiability. DIMACS Series in Discrete Mathematics and Theoretical Computer Science, vol. 26. American Mathematical Society, 377–394. Jussien, N. 2001. e-constraints: explanation-based constraint programming. In Proceedings of the CP 2001 Workshop on User Interaction in Constraint Satisfaction. (also available as research report 01-05-INFO, École des Mines de Nantes, 2001). Jussien, N., Debruyne, R., and Boizumault, P. 2000. Maintaining arc-consistency within dynamic backtracking. In Proceedings of the 6th International Conference on Principles and Practice of Constraint Programming - CP 2000, R. Dechter, Ed. Number 1894 in Lecture Notes in Computer Science. Springer Verlag Berlin Heidelberg, Singapore, 249–261. Lynce, I. and Marques-Silva, J. 2002. Building state-of-the-art SAT solvers. In Proceedings of the European Conference on Artificial Intelligence – ECAI’02. 166–170. Marriott, K. and Stuckey, P. J. 1998. Programming with Constraints: An Introduction. The MIT Press. Müller, H. 2004. Analyse und Entwicklung von intelligenten abhängigkeitsgesteuerten Suchverfahren für einen Java-basierten Constraintlöser. M.S. thesis, Technische Universität Berlin. Prosser, P. 1993. Hybrid algorithms for the constraint satisfaction problem. Computational Intelligence 9, 3 (Aug.), 268–299. (also available as technical report AISL-46-91, Stratchclyde, 1991). Prosser, P. 1995. MAC-CBJ: maintaining arc consistency with conflict-directed backjumping. Research report, Department of Computer Science, University of Strathclyde, Glasgow G1 1XH, Scotland. May. Schmauss, M. 1999. An implementation of CHR in Java. M.S. thesis, Ludwig Maximilians Universität München, Institut für Informatik. Verfaillie, G. and Schiex, T. 1994. Dynamic backtracking for dynamic constraint satisfaction problems. In ECAI’94 Workshop on Constraint Satisfaction Issues Raised by Practical Applications, T. Schiex and C. Bessiére, Eds. Amsterdam, The Netherlands, 1–8. Wolf, A. 1999. Adaptive Constraintverarbeitung mit Constraint-Handling-Rules – Ein allgemeiner Ansatz zur Lösung dynamischer Constraint-Probleme. Disserationen zur Künstlichen Intelligenz (DISKI), vol. 219. infix Verlag. Wolf, A. 2001a. Adaptive constraint handling with CHR in Java. In Proceedings of the 7th International Conference on Principles and Practice of Constraint Programming – CP 2001, T. Walsh, Ed. Number 2239 in Lecture Notes in Computer Science. Springer Verlag, 256–270. Wolf, A. 2001b. Attributed variables for dynamic constraint solving. In The Proceedings of the 14th International Conference on Applications of Prolog, INAP‘01, I. O. Commitee, Ed. Prolog Association of Japan, University of Tokyo, Tokyo, Japan, 211–219.
2cs.AI
arXiv:1707.01705v1 [math.ST] 6 Jul 2017 Local Nonparametric Estimation for Second-Order Jump-Diffusion Model Using Gamma Asymmetric Kernels ∗ Yuping Song School of Finance and Business, Shanghai Normal University, Shanghai, 200234, P.R.C. Hanchao Wang† Zhongtai Securities Institute for Financial Studies, Shandong University, Jinan, 250100, P.R.C. Abstract This paper discusses the local linear smoothing to estimate the unknown first and second infinitesimal moments in second-order jump-diffusion model based on Gamma asymmetric kernels. Under the mild conditions, we obtain the weak consistency and the asymptotic normality of these estimators for both interior and boundary design points. Besides the standard properties of the local linear estimation such as simple bias representation and boundary bias correction, the local linear smoothing using Gamma asymmetric kernels possess some extra advantages such as variable bandwidth, variance reduction and resistance to sparse design, which is validated through finite sample simulation study. Finally, we employ the estimators for the return of some high frequency financial data. JEL classification: C13, C14, C22. Keywords: Return model; Variable bandwidth; Variance reduction; Resistance to sparse design; High frequency financial data. 1 Introduction Continuous-time models are widely used in economics and finance, such as interest rate and etc., especially the continuous-time diffusion processes with jumps. ∗ This research work is supported by the National Natural Science Foundation of China (No. 11371317, 11526205, 11626247), the Fundamental Research Fund of Shandong University (No. 2016GN019) and the General Research Fund of Shanghai Normal University (No. SK201720). † Corresponding author, email: [email protected] 1 Jump-diffusion process Xt is represented by the following stochastic differential equation: Z c(Xt− , z)r(ω, dt, dz), (1) dXt = µ(Xt− )dt + σ(Xt− )dWt + E which can accommodate the impact of sudden and large shocks to financial markets. Johannes [26] provided the statistical and economic role of jumps in continuous-time interest rate models. However, in empirical finance or physics the current observation usually behaves as the cumulation of all past perturbation such as stock prices by means of returns and exchange rates in Nicolau [34] and the velocity of the particle on the surface of a liquid in Rogers and Williams [39]. Furthermore, in the research field involved with model (1), the scholars mainly considered it for the price of a asset not for the returns of the price. As mentioned in Campbell, Lo and MacKinlay [5], return series of an asset are a complete and scale-free summary of the investment opportunity for average investors, and are easier to handle than price series due to their more attractive statistical properties. For characterizing this integrated economic phenomenon, moreover, and the return series, Nicolau [33] considered the promising continuous second-order diffusion process (2), which is motivated by unit root processes under the discrete framework of Park and Phillips [36],  dYt = Xt dt, (2) dXt = µ(Xt )dt + σ(Xt )dWt , which may be an alternative model to describe the dynamic of some financial data. Considering empirical properties of return series such as higher peak, fatter tails and etc., here we extend the continuous autoregression of order two (2) to a discontinuous and realistic case with jumps for return series based on model (1), noted as the second-order jump-diffusion process (3) to represent integrated and differentiated processes,  dYt = Xt− dt, R (3) dXt = µ(Xt− )dt + σ(Xt− )dWt + E c(Xt− , z)r(ω, dt, dz), where Wt is a standard Brownian motion, µ(·) and σ(·) are the infinitesimal conditional drift and variance respectively, E = R \ {0}, r(ω, dt, dz) = (p − q)(dt, dz), p(dt, dz) is a time-homogeneous Poisson random measure on R+ × R independent of Wt , and q(dt, dz) is its intensity measure, that is, E[p(dt, dz)] = q(dt, dz) = f (z)dzdt, f (z) is its Lévy density. For empirical financial data, Xt represents the continuously compounded return of underlying assets, Yt denotes the asset price by means of the cumulation of the returns plus initial asset value. Note that model (3) is neither a special case of a twodimensional stochastic differential equation nor a stochastic volatility model without noise in the first coordinate. It is essentially the linear version of the following nonlinear stochastic jump-diffusion equation of order two considered 2 in Özden and Ünal [35] dẊt = f (t, Xt , Ẋt )dt + g(t, Xt , Ẋt )dWt + j(t, Xt , Ẋt )dNt , (4) where dNt denotes the infinitesimal increment of Poisson process and f, g, j are the coefficient functions. Model (3) can be used commonly in empirical financial for at least four reasons. Firstly, in contrary to the usual models for the price of a asset such as model (1), model (3) overcomes the difficulties associated with the nondifferentiability of a Brownian motion, which can model integrated and differentiated diffusion processes for the cumulation of all past perturbations in modern econometric phenomena (similarly as unit root processes in a discrete framework). Furthermore, the model (3) can accommodate nonstationary original process and be made stationary by linear combinations such as differencing, which is a more widely adopted technique used in empirical financial. We have verified this property through the Augmented Dickey-Fuller test statistic for the sampling time series before and after the difference in the empirical analysis part. Secondly, compared with the model (2), model (3) accommodates the impact by macroeconomic announcements and a dramatic interest rate cut by the Federal Reserve in combination with jump component. It has been testified the existence of jumps modeling by (2) or (3) for real financial data through the test statistic proposed in Barndorff-Nielsen and Shephard [3] in empirical analysis part. Thirdly, model (3) can directly characterize the returns with heavy tail (or the log return) of a asset to specify general properties for returns (such as stationarity in the mean and weakness in the autocorrelation et al.) more easily than a diffusion univariate process for the price of a asset (such as stock prices and nominal exchange rates). Fourthly, the integro-differential jump-diffusion model (3) can also be employed in finance for integrated volatility in stochastic volatility models with jumps. For model (3), Özden and Ünal [35] gave the linearization criterion in terms of coefficients for transforming a nonlinear stochastic differential equations into linear ones via invertible stochastic mappings in order to solve exact solutions. However, we do not know beforehand the specific form of the model coefficients to verify these criteria in practical applications, so we should statistically estimate the unknown coefficients in model (3) for modeling the economic and financial phenomena based on the observations. For continuous case (2), Gloter [16] [17] and Ditlevsen and Sørensen [12] presented the parametric and semiparametric estimation from a discretely observed samples. Recently, an inordinate amount of attention has been focused on nonparametric methods in econometrics due to the flexibility for handling the nonlinear conditional moment estimation, not assuming its expression in contrary to parametric estimation. Nicolau [33] and Wang and Lin [47] analyzed the local nonparametric estimations using symmetric kernel and Hanif [22] studied Nadaraya-Watson estimators using Gamma asymmetric kernel. For model (3), Song [43] considered Nadaraya-Watson estimators for the unknown coefficients using Gaussian symmetric kernel in high frequency data. 3 In the context of nonparametric estimator with finite-dimensional auxiliary variables, local polynomial smoothing become an effective smoothing method, which has excellent properties of full asymptotic minimax efficiency achievement and boundary bias correction automatically, one can refer to Fan and Gijbels [14] for better review. In general, the popular choices for kernels in application of local polynomial estimators are symmetric and compact. However, local nonparametric estimation constructed with symmetric kernels for the nonnegative variables or nonnegative part of the underlying variables in economics and finance is not approximate for the region near the origin without a boundary correction. Furthermore, for finite sample size, Seifert and Gasser [41] found the problem of unbounded variance in sparse regions for local polynomial smoothing employing a compact kernel and proposed local increase of bandwidth in sparse regions of the design to add more information to reduce the corresponding variability. Fortunately, local nonparametric smoothing using asymmetric kernels can effectively solve the above two major problems for nonparametric estimation. Besides the usual standard properties of the local linear estimation such as the simple bias representation and boundary bias correction, the local linear smoothing using Gamma asymmetric kernel with unbounded support [0, ∞) have some extra benefits as follows such as variable bandwidth, variance reduction and resistance to sparse design. Firstly, the Gamma asymmetric kernel is a kind of adaptive and flexible smoothing, whose curve shapes can vary with the smoothing parameter and the location of the design point similar as the variable bandwidth methods, which is illustrated in FIG 1 for a fixed smoothing parameter. As mentioned in Gospodinov and Hirukawa [18], unlike the variable bandwidth methods, the smoothing method constructed with Gamma asymmetric kernel is achieved by only a single smoothing parameter. Secondly, when the support of Gamma asymmetric kernel matches the support of the curve of the function to be estimated, and the curve has sparse regions, the finite variance of the curve estimation decreases due to the fact that their variances vary along with the location of the design point x and the increase of the effective sample size for estimation. Thirdly, Gamma asymmetric kernels are free from boundary bias (allowing a larger bandwidth to pool more data) and achieve the optimal rate of convergence in mean square error within the class of nonnegative kernel estimators with order two. In conclusion, asymmetric kernels is a combination of a boundary correction device and a “variable bandwidth” method. For a review of application using asymmetric kernels, one should refer to Chen [7] [8] to estimate densities, Chen [9] to estimate a regression curve with bounded support, Bouezmarni and Scaillet [4] to apply the asymmetric kernel density estimators to income data, Kristensen [29] to consider the realized integrated volatility estimation, Gospodinov and Hirukawa [18] to propose an asymmetric kernel-based method for scalar diffusion models of spot interest rates, compared with Stanton [46], to show that asymmetric kernel smoothing is expected to reduce substantially both the bias near the origin and the bias that occurs for high values in the estimation of the drift coefficient. Hanif [21] addressed local linear estimation using Gamma asymmetric kernels for the infinitesimal moments in 4 model (1). 5 x=0.00 x=0.50 x=1.00 x=2.00 4.5 4 3.5 3 2.5 2 1.5 1 0.5 0 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Figure 1: Shapes of the Gamma function with a fixed smoothing parameter (0.2) at various design points (x = 0.0, 0.5, 1.0, 2.0) For model (3), although Chen and Zhang [11] discussed the local linear estiR mators for the unknown functions µ(x) and σ 2 (x) + E c2 (x, z)f (z)dz based on symmetric kernels. More previous works focused on the simplification for the bias representation of the estimator, while less research was considered deeply for the reduction in variance. Gouriéroux and Monfort [19] and Jones and Henderson [27] argued that unlike the symmetric kernels case, the empirical data Xt point and the design point x in asymmetric kernels case are not exchangeable. Hence, we cannot establish the asymptotic theorems for the Gamma kernel estimators of unknown coefficients in model (3) by the means of the similar approach as that in Bandi and Nguyen [2] and Chen and ZhangR[11]. In this paper, we will propose local linear estimators of µ(x) and σ 2 (x) + E c2 (x, z)f (z)dz in model (3) using Gamma asymmetric kernels for both bias correction, especially for boundary point near the origin, and variance reduction, especially for sparse design point far away from the origin. ei = X ei∆n in the remainder of this For convenience, we note Xi = Xi∆n , X paper which is organized as follows. In Section 2, we propose local linear estimators with asymmetric kernels and some ordinary assumptions for model (3). We present the asymptotic results in Section 3. Section 4 presents the finite sample performance through Monte Carlo simulation study. The estimators are illustrated empirically in Section 5. Section 6 concludes. Some technical lemmas and the main proofs are explicitly shown in Section 7. 5 2 Local Linear Estimators with Asymmetric Kernels and Assumptions According to the asymmetric kernels used in Chen [8], the Gamma kernel function is defined as KG(x/h+1,h) (u) = ux/h exp(−u/h) 0 ≤ u ≤ ∞, hx/h+1 Γ(x/h + 1) (5) R∞ where Γ(m) = 0 y m−1 exp(−y)dy, m > 0 is the Gamma function and h is the smoothing parameter. Note that we use modified Gamma kernel function KG(x/h+1,h) (u) instead of KG(x/h,h)(u) due to the fact KG(x/h,h)(u) is unbounded near at x = 0. As is shown in Figure 1, the Gamma function has shapes varying with the design point x, which changes the amount of smoothing applied by the asymmetric kernels since the variance xh + h2 of KG(x/h+1,h) (u) is increasing as x away from the boundary. Additionally, as discussed in Bouezmarni and Scaillet [4] the consistency of gamma kernel estimator holds even though the true density is unbounded at x = 0. Statistically and theoretically, since the density of Gamma distribution has support [0, ∞), the Gamma kernel function does not generate boundary bias for nonnegative variables or nonnegative part of underlying variables. Furthermore, the asymptotic variance of the nonparametric Gamma kernel estimation depends on the design point x, which yields the optimal rate of convergence in mean integrated squared error of nonnegative kernels. Different from model (1), nonparametric estimations constructed for the coefficients in second-order jump-diffusion model (3) give rise to new challenges for two main reasons. On the one hand, we usually get observations {Yi∆n ; i = 1, 2, · · ·} rather than {Xi∆n ; i = 1, 2, · · ·}. The value of Xti cannot be obtained from Yti = Y0 + R ti Xs ds in a fixed sample intervals. Additionally, nonparametric estimations 0 of the unknown qualities in model (3) cannot in principle be constructed on the observations {Yi∆n ; i = 1, 2, · · ·} due to the unknown conditional distribution of Y . As Nicolau [33] showed, with observations {Yi∆n ; i = 1, 2, · · ·} and given that Z i∆n Yi∆n − Y(i−1)∆n = Xu du, (i−1)∆n we can obtain an approximation value of Xi∆n by ei∆n = Yi∆n − Y(i−1)∆n . X ∆n (6) On the other hand, the Markov properties for statistical inference of unei∆n ; i = 1, 2, · · ·} should known qualities in model (3) based on the samples {X be built, which are infinitesimal conditional expectations characterized by infinitesimal operators. Fortunately, under Lemma 1 we can build the following 6 infinitesimal conditional expectations for model (3) ei∆n e(i+1)∆ − X X n (7) |F(i−1)∆n ] = µ(X(i−1)∆n ) + Op (∆n ), ∆n Z ei∆n )2 e(i+1)∆ − X (X 2 2 n E[ |F(i−1)∆n ] = σ 2 (X(i−1)∆n ) + c2 (X(i−1)∆n , z)f (z)dz + Op (∆n ). ∆n 3 3 E (8) E[ where Ft = σ{Xs , s ≤ t}. One can refer to Appendix A in Song, Lin and Wang [45] for detailed calculations. ei∆n ; i = 0, 1, 2, · · ·}, we construct local linear estimators for the Under {X unknown coefficients in model (3) based on equations (7) and (8). We consider the following weighted local linear regression to estimate µ(x) and M (x) = R σ 2 (x) + E c(x, z)f (z)dz using asymmetric Gamma kernel, respectively: arg min a,b n  e 2 ei∆n X  X(i+1)∆n − X ei∆n −x) KG(x/h+1,h) X e(i−1)∆ , (9) −a−b(X n ∆n i=1 n 3 e 2 2 e X  2 (X(i+1)∆n − Xi∆n ) ei∆n − x) KG(x/h+1,h) X e(i−1)∆ , − a − b(X n a,b ∆ n i=1 (10) where KG(x/h+1,h)(·) is the asymmetric Gamma kernel function. The solutions for a to (9) and (10) as Rfollows are respectively the local linear estimators of µ(x) and M (x) = σ 2 (x) + E c(x, z)f (z)dz, arg min µ̂n (x) = M̂n (x) = where ωi−1 Pn i=1 Pn ωi−1 Pn i=1  i=1 ei+1 −X ei X ∆n ωi−1 e  e ωi−1 23 (Xi+1∆−nXi ) Pn i=1 ωi−1 , (11) 2 (12) n  X ej − x)2 ej−1 (X ei−1 ( KG(x/h+1,h) X = KG(x/h+1,h) X j=1 ei − x) −(X n X j=1  ej − x)). ej−1 (X KG(x/h+1,h) X There are some differences between the estimators given in this paper and the local linear estimators for the coefficients of model (1) in Hanif [21]. In ei − x) and K(X ei−1 ) are different for the (9) and (10) the observations in (X model (3) which is more complex than the one in Hanif [21], because we need to calculate some meaningful conditional expect values of the estimators in the 7 detailed proof by means of the method introduced by Nicolau [33], but cannot ei and X ei−1 can obtain the desired result if they are identical. Fortunately, X both approximate the value of Xi−1 , which guarantees the desired result in the article reasonably from the result in Hanif [21]. However, the local linear smoothing constructed in this paper cannot be extended to the local polynomial cases, which needs more than two values to approximate X(i−1)∆n . We now present some assumptions used in the paper. In what follows, let D = (l, u) with l ≥ −∞ and u ≤ ∞ denote the admissible range of the process Xt , K denotes KG(x/h+1,h). Assumption 1 (i) (Local Lipschitz continuity) R For each n ∈ N, there exist a constant Ln and a function ζn : E → R+ with E ζn2 (z)f (z)dz < ∞ such that, for any |x| ≤ n, |y| ≤ n, z ∈ E , |µ(x) − µ(y)| + |σ(x) − σ(y)| ≤ Ln |x − y|, |c(x, z) − c(y, z)| ≤ ζn (z)|x − y|. (ii) (Linear growthness) For each n ∈ N, there exist ζn as above and C, such that for all x ∈ R, z ∈ E , |µ(x)| + |σ(x)| ≤ C(1 + |x|), |c(x, z)| ≤ ζn (z)(1 + |x|). Remark 1 Assumption 1 guarantees the existence and uniqueness of a solution to Xt in Eq. (1) on the probability space (Ω, F , P ), see Jacod and Shiryayev [25]. Assumption 2 The process Xt is ergodic and stationary with a P finite invariant measure φ(x). Furthermore, The process Xt is ρ−mixing with i≥1 ρ(i∆n ) = O( ∆1α ), n → ∞, where α < 12 . n Remark 2 The hypothesis that Xt is a stationary process is obviously a plausible assumption because for major integrated time series data, a simple differentiation generally assures stationarity. The same condition yielding information on the rate of decay of ρ−mixing coefficients for Xt was mentioned the Assumption 3 in Gugushvili and Spereij [20]. Assumption 3 For any 2 ≤ i ≤ n, g is a differentiable function on R and e(i−1)∆ , 0 ≤ θ ≤ 1, the conditions hold: ξn,i = θX(i−1)∆n + (1 − θ)X n   ′ (i) limh→0 E |hK (ξn,i )g(X(i−1)∆n )| < ∞,   ′ (ii) limh→0 h1/2 E |h2 K 2 (ξn,i )g(X(i−1)∆n )| < ∞ for “interior x”,   2 ′2 (iii) limh→0 hE |h K (ξn,i )g(X(i−1)∆n )| < ∞ for “boundary x”. Remark 3 According to the procedure for assumption 3 in Appendix (7.1), we can easily deduce the following results:  (i) limh→0 E |K(X(i−1)∆n )g(X(i−1)∆n )| < ∞;   (ii) limh→0 h1/2 E |K 2 (X(i−1)∆n )g(X(i−1)∆n )| < ∞ for “interior x”; (iii) limh→0 hE |K 2 (X(i−1)∆n )g(X(i−1)∆n )| < ∞ for “boundary x”. 8 Assumption 4 For all p ≥ 1, supt≥0 E[|Xt |p ] < ∞, and R E |z|p f (z)dz < ∞. Remark 4 This assumption guarantees that Lemma 1 can be used properly throughout the article. If Xt is a Lévy process with bounded jumps (i.e., supt |∆Xt | ≤ C < ∞ almost surely, where C is a nonrandom constant), then E{|Xt |n } < ∞ ∀n, that is, Xt has bounded moments of all orders, see Protter [37]. This condition is widely used in the estimation of an ergodic diffusion or jump-diffusion from discrete observations, see Florens-Zmirou [15], Kessler [28], Shimizu and Yoshida [42]. r   n∆n → ∞, ∆n log ∆1n → 0, hn n∆1+α Assumption 5 ∆n → 0, h → 0, h n as n → ∞. Remark 5 The relationship between hn and ∆n is similar as the stationary case in Hanif [21], (b1) , (b2) of A8 in Nicolau [33] and assumption 7 in Song [43]. Wang and Zhou [48] presented the optimal bandwidth of symmetric kernel nonparametric threshold estimator of diffusion function in jump - diffusion models. We will select the optimal smoothing parameter hn for Gamma asymmetric kernel estimation of second-order jump - diffusion models by means of minimizing the mean square error (MSE) and k−block cross-validation method in Remark 7. 3 Large sample properties Based on the above assumptions and the lemmas in the following proof procedure part, we have the following asymptotic properties. To simplify notations, we define x ∈ D to be a “interior x′′ if “x/hn −→ ∞′′ or “boundary x′′ if “x/hn −→ κ′′ Theorem 1 If Assumptions 1 - 5 hold, then p µ̂n (x) → µ(x), p M̂n (x) → M (x). Theorem 2 (i) Under Assumptions 1 - 5 and for “interior x”, if h = O((n∆n )−2/5 ), then  p  d  M (x) , n∆n h1/2 µ̂n (x) − µ(x) − hBµ̂n (x) → N 0, √ 1/2 2 πx p(x) R p  d  c4 (x, z)f (z)dz  , n∆n h1/2 M̂n (x) − M (x) − hBM̂n (x) → N 0, E √ 1/2 2 πx p(x) ′′ ′′ where Bµ̂n (x) = x2 µ (x), BM̂n (x) = x2 M (x), 9 (ii) Under Assumptions 1 - 5 and for “boundary x”, if h = O((n∆n )−1/5 ), then p  d  ′ M (x)Γ(2κ + 1)  , n∆n h µ̂n (x) − µ(x) − h2 Bµ̂n (x) → N 0, 2κ+1 2 2 Γ (κ + 1)p(x) R 4 p  d  c (x, z)f (z)dzΓ(2κ + 1)  2 ′ , n∆n h M̂n (x) − M (x) − h BM̂ (x) → N 0, E 2κ+1 2 n 2 Γ (κ + 1)p(x) ′ ′′ ′ ′′ where Bµ̂n (x) = 21 (2 + κ)µ (x), BM̂ n (x) = 12 (2 + κ)M (x). Remark 6 In this article, we considered the asymptotic consistency and weak convergence of local linear estimators for the unknown quantities in the secondorder jump-diffusion model which can be directly used to model the returns of a asset, based on Gamma asymmetric kernel in Theorem 1 and Theorem 2. The main method to obtain the asymptotic properties for the estimators of model (3) is to approximate the estimator for model (3) by the similar estimator for model (1) in probability. One can refer to Nicolau [33] for the same idea. Fortunately, lemma 2 in the proofs section builds the bridge, which provides us the desired properties of local linear estimator based on Gamma asymmetric kernel for model (1). We only discussed the stationary jump-diffusion in lemma 2. Actually, the similarly theoretical and numerical results as that in Theorem 1 and Theorem 2 also hold for the univariate case: the jump-diffusion model which can be employed to model the price of a asset, whether it is stationary or not. With the similar procedure as Bandi and Nguyen [2], lemma 2 and some conditions on the local time in Wang and Zhou [48], one can easily deduce their asymptotic consistency and normality of the local linear estimators for the unknown quantities in the univariate nonstationary jump-diffusion model based on Gamma asymmetric kernels. It is not our objective in this paper and thus it is less of a concern here. We will take it into consideration in the future work. Remark 7 Theorems 1 and 2 give the weak consistency and the asymptotic normality of the local linear estimators using Gamma asymmetric kernels. As discussed in Chapman and Pearson [6], the performance of nonparametric kernel estimator depends crucially on the choice of the smoothing parameter hn . Hence, it is very important to consider the choice of the smoothing parameter hn for the nonparametric estimation using asymmetric kernels. Here we will select the optimal smoothing parameter hn based on the mean square error (MSE). Take µ(x) for example, for “interior x”, the optimal smoothing parameter hn is   52  25  4 1 M (x) 1 · = Op · √ hn,opt = n∆n 2 πx1/2 p(x) [xµ′′ (x)]2 n∆n 4  5 1 . and the corresponding MSE is Op n∆ n For “boundary x”, the optimal smoothing parameter hn is    15  15 1 1 M (x)Γ(2κ + 1) 4 hn,opt = = Op · · n∆n 22κ+1 Γ2 (κ + 1)p(x) [(2 + κ)µ′′ (x)]2 n∆n 10  45  1 and the corresponding MSE is also Op n∆ . When h ≤ hn,opt , the bias n term contributes to larger part of the mean square error, while the coverage rate contributes to larger part if h > hn,opt . One can observe that hn,opt for “boundary x” is larger than that for “interior x” as n → ∞ because more sample points are required for boundary bias reduction. In practice, we can take the plug-in method studied in Fan and Gijbels [13] to obtain an optimal smoothing bandwidth hn on behalf of MSE. As mentioned in Gospodinov and Hirukawa [18], the bandwidth hn constructed above relies on the consistent estimators for these unknown quantities and they are difficult to obtain and may give rise to bias. Moreover, Hagmann and Scaillet [23], regarding global properties, discussed the choice of bandwidth to ameliorate the adaptability of Gamma asymmetric kernel estimators since the bandwidth hn constructed above varies with the change of the design point x. Hence we mention two rules of thumb on selecting a global smoothing bandwidth here. For simplicity, we 2 can use bandwidth selector hn = c · Ŝ · T − 5 in Xu and Phillips [50], where Ŝ, T denote the standard deviation of the data and the time span and c represents different constants for different estimators to be estimated by means of minimizing the Mean Square Errors (MSE). Or, we can employ the k−block cross-validation method proposed by Racine [38] to assess the performance of an estimator via estimating its prediction error. The main idea is to minimize the following expresPn−k Xe(i+1)∆n −Xei∆n ei∆n )}2 with − µ̂h ,−(i−k):−(i+k) (X { sion: CV (hn ) = n−1 i=k+1 ∆n n ei∆n ) is k = n1/4 to eliminate the dependence of data, where µ̂hn ,−(i−k):−(i+k) (X the underlying estimator (11) as a function of bandwidth hn , but without using the i − kth to i + kth observations. In practice, the optimal data-dependent choice of block size k should take into consideration the persistence of the empirical data, which one can refer to in the selection of smoothing parameter part in Gospodinov and Hirukawa [18]. These two rules of thumb on selecting the bandwidth are displayed numerically in simulation and empirical analysis part. For the further study of the optimal value of the bandwidth, one can refer to Aı̈t-Sahalia and Park [1]. Remark 8 In addition, the asymptotic normality of local linear estimator using Gamma asymmetric kernel for µ(x) in this paper is different from that in Chen and Zhang [11], where their asymptotic normality was p M (x) 1 ′′ d hn n∆n (µ̂n (x) − µ(x) − h2n µ (x)) → N (0, V ) 2 p(x) (K 2 )2 K 0 +(K 1 )2K 2 −2(K 1 )(K 2 )K 1 with V = 1 2 [K12 −(K21 )2 ]2 1 1 2 which is equal to 2√1 π if the kernel is 1 1 Gaussian kernel. There are two main differences: on one hand, the convergence rate of local linear estimator using Gamma asymmetric kernel is different for the location of the design point x such as “interior x” and “boundary x”; on the other hand, the variance of of local linear estimator using Gamma asymmetric kernel is inversely proportional to the design x, which shows that the variance decreases as the design point x increases. Additionally, the optimal 11 1 1 bandwidth hGaussian is O( n∆ ) 5 for any design point x and the corresponding n,opt n 4 1 MSE is O( n∆n ) 5 . For “interior x”, the optimal smoothing parameter hGamma = n,opt 2 1 ) 5 = O(hGaussian O( n∆ )2 , which means that the asymptotic variance of the n,opt n 1 ) the estimator constructed with Gamma asymmetric kernel is O( hGaussian n∆n n,opt same as that constructed with Gaussian symmetric kernel. Remark 9 For “interior x”, if the smoothing parameter hn = O((n∆n )−2/5 ), the normal confidence interval for µ(x) using Gamma asymmetric kernel and Gaussian symmetric kernel at the significance level 100(1 − α)% are constructed as follows, s " M̂nAsym (x) 1 x ′′ Asym Asym · , (x) − hn · µ̂n (x) − z1−α/2 · q Iµ,α = µ̂n √ 1/2 Asym 2 1/2 2 πx p̂ (x) n n∆n hn s # 1 M̂nAsym (x) x ′′ Asym · , µ̂n (x) − hn · µ̂n (x) + z1−α/2 · q √ 1/2 Asym 2 1/2 2 πx p̂ (x) n n∆n hn s " 1 M̂nSym (x) Sym Sym 2 1 ′′ · Iµ,α = µ̂n (x) − hn · µ̂n (x) − z1−α/2 · √ , √ 2 n∆n hn 2 π p̂Sym (x) n s # 1 M̂nSym (x) Sym 2 1 ′′ . · µ̂n (x) − hn · µ̂n (x) + z1−α/2 · √ √ 2 n∆n hn (x) 2 π p̂Sym n µ̂Asym (x), M̂nAsym (x) , µ̂Sym (x), M̂nSym (x) denote the local linear estimators of n n µ(x), M (x) in (11) and (12) using Gamma asymmetric kernel or Gaussian symmetric kernel, respectively. z1−α/2 is the inverse CDF for the standard normal  Pn e(i−1)∆ , p̂Sym distribution evaluated at 1−α/2. p̂Asym (x) = n1 i=1 KGamma(x/hn+1,h) X (x) = n n n   e(i−1)∆ Pn x−X 1 n . As Fan and Gijbels [14] showed, the derivai=1 KGaussian nhn hn ′′ Asym tive µ̂n (x) in Iµ,α can be estimated by taking the second derivative of the local linear estimators of µ(x) in (11) using Gamma asymmetric kernel. In the similar manner, one can give the normal confidence intervals for µ(x) of “boundary x” using Gamma asymmetric kernel or Gaussian symmetric kernel. As Xu [49] Asym Sym considered, the resultant normal confidence interval Iµ,α or Iµ,α has more correct coverage rate asymptotically as long as a smoothing parameter hn is used and the bias and variance can be consistently estimated. Similarly, the normal confidence interval for M (x) at a spatial point x using Gamma asymmetric kernel and Gaussian symmetric kernel at the significance level 100(1 − α)% can be constructed. The final interval for M (x) should be Asym Sym taken as the intersection of IM,α or IM,α with [0, +∞) to coincide with the nonnegativity of the conditional variance M (x). Remark 10 Here we briefly commented the theoretical comparison for lengths of confidence intervals for “interior x” and “boundary x” using Gamma asym12 metric kernel or Gaussian symmetric kernel. One can refer to the simulation part for the numerical comparison for lengths of confidence intervals. Take µ(x) for example. The dominant factors that affect the length of the confidence interval are the various coverage rate and the different coefficient in the variance. For “interior x”, the coverage rate of the local linear estimator based on Gamma asymmetric kernel is √ 1 1/2 , which is much smaller than √n∆1 h n n∆n hn n of that based on Gaussian symmetric kernel with a given hn . Compared with the ones using Gaussian symmetric kernel, the variance of local linear estimator using Gamma asymmetric kernel is inversely proportional to the design x, which shows that the length of the confidence interval decreases as the design point x increases. For “boundary x”, although the coverage rate of the local linear estimator based on Gamma asymmetric kernel is the same as that based on Gaussian symΓ(2κ+1) metric kernel, the coefficient in their variance differs a little such as 22κ+1 Γ2 (κ+1) for Gamma asymmetric kernel while 2√1 π for Gaussian symmetric kernel. Under numeral calculations, from Table 1 we can conclude that when κ ≤ 0.7, the variance based on Gamma asymmetric kernel is larger while when κ ≥ 0.75, the variance based on Gamma asymmetric kernel is smaller than that based on Gaussian symmetric kernel. This reveals that the closer to the boundary point or the larger bandwidth for fixed “boundary x”, the shorter the length of confidence interval based on Gaussian symmetric kernel, which is shown in the simulation result. Table 1: The difference between κ. Value of κ 0.25 0.3 Γ(2κ+1) 22κ+1 Γ2 (κ+1) and 1 √ 2 π in the variance for various 0.35 0.4 0.45 0.5 0.55 0.6 Difference 0.0993 0.0838 0.0701 0.0577 0.0464 0.0362 0.0269 0.0183 Value of κ 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 Difference 0.0103 0.003 -0.004 -0.01 -0.016 -0.022 -0.027 -0.032 Value of κ 1.25 1.5 1.75 2 2.25 2.5 2.75 3 Difference -0.053 -0.07 -0.083 -0.095 -0.104 -0.112 -0.12 -0.126 Value of κ 3.25 3.5 3.75 4 4.25 4.5 4.75 5 Difference -0.132 -0.137 -0.141 -0.145 -0.149 -0.153 -0.156 -0.159 Remark 11 In contrary to the second-order diffusion model without jumps (Nicolau [33]), the second infinitesimal moment estimator for second-order diffusion model with jumps has a rate of convergence that is the same as the rate of convergence of the first infinitesimal moment estimator. Apparently, this is due to the presence of discontinuous breaks that have an equal impact on all the 13 functional estimates. As Johannes [27] pointed out, for the conditional variance of interest rate changes, not only diffusion play a certain role, but also jumps account for more than half at lower interest level rates, almost two-thirds at higher interest level rates, which dominate the conditional volatility of interest rate changes. Thus, it is extremely important to estimate the conditional variR ance as σ 2 (x) + E c2 (x, z)f (z)dz which reflects the fluctuation of the underlying asset or the return of the underlying asset. Meanwhile, for the special case of model (1) with compound Poisson jump components, there are several methodologies for the nonparametric estimation to identify the diffusion coefficient σ 2 (x), the jump intensity λ(x) and the variance of the jump sizes σz2 . For single-factor model, one can use the fourth and sixth moments to identify the jump components λ(x) and σz2 , then σ 2 (x) can be identified through second moment like Theorem 3.3, see Johannes [27] as following (14) ∼ (16), or one can use the threshold estimation for σ 2 (x) , λ(x) and σz2 , see Mancini and Renò ([32], Theorems 3.2, 3.7). Nonparametric estimation to identify the diffusion coefficient σ 2 (x), the jump intensity λ(x) and the variance of the jump sizes σz2 for model (3) is not our objective in this paper and thus it is less of a concern here. However, we give some procedures here to deal with this identification for the special case of model (3) similarly as Johannes [27] : ( dYt = Xt− dt, P  (13) Nt dXt = µ(Xt− )dt + σ(Xt− )dWt + d Z n=1 tn , where Nt is a doubly stochastic point process with jump intensity λ(Xt− ), and Ztn ∼ N (µz , σz ) with the variance of the jump size σz2 . We have the following infinitesimal conditions (14) ∼ (16) under simple but tedious calculations by virtue of Lemma 1 with d = 2 : h 3 (X i ei∆n )2 e(i+1)∆ − X n 2 |F(i−1)∆n = σ 2 (X(i−1)∆n ) + λ(X(i−1)∆n )σz2 + Op (∆n ), ∆n (14) i h 3(X ei∆n )4 e(i+1)∆ − X n (15) |F(i−1)∆n = 3λ(X(i−1)∆n )(σz2 )2 + Op (∆n ), E ∆n h 3(X i ei∆n )6 e(i+1)∆ − X n E (16) |F(i−1)∆n = 15λ(X(i−1)∆n )(σz2 )3 + Op (∆n ). ∆n E Based on (15) and (16), we can deduce the λ(x) and σz2 using kernel estimations, finally the diffusion coefficient σ 2 (x) can be easily derived from three other kernel estimations for the conditional variance, jump intensity and the jump variance. We will take their asymptotic weak consistency and normality into consideration in the future work based on the result of Bandi and Nguyen [2]. 14 4 Monte Carlo Simulation Study In this section, we conduct a simple Monte Carlo simulation experiment aimed at the finite sample performance of the local linear estimators for both drift and conditional variance functions constructed with Gamma asymmetric kernels and those constructed with Gaussian symmetric kernels. Assessment will be made between them by comparing their mean square error (MSE), coverage rate and length of confidence band. Our experiment is based on the following data generating process: ( dYt = Xt− dt, q (17) 2 dW + dJ , dXt = (1 − 10Xt− )dt + 0.1 + 0.1Xt− t t where the coefficients of continuous part similar as the ones used in Nicolau ([33]) (here we add a constant of 1 in the drift coefficient , which guarantees the nonnegativity of Xt with the initial value of 0.1) and Jt is a compound Poisson PNt jump process, that is, Jt = n=1 Ztn with arrival intensity λ · T = 20 or λ · T = 50 and jump size Zn ∼ N (0, 0.0362) or Zn ∼ N (0, 0.12 ) corresponding to Bandi and Nguyen ([2]), where tn is the nth jump of the Poisson process Nt . The parameters λ, σ 2 for Zn are of particular importance, which represent the intensity and amplitude for the jump component, respectively. For the time series generated, the two values of λ chosen indicate the moderate and intense rate of recurrence for jumps, and the two values of σ 2 for Zn chosen mean the slow and high level of jumps. By taking the integral from 0 to t in the second expression of (17), we obtain Xt = 0.1 + t − 10 Z 0 t Xs− ds + Z tq Nt X 2 dW + Ztn . 0.1 + 0.1Xs− t 0 (18) n=1 Then we have Z t Z tq Nt  X 1 2 dW − Yt = Xs− ds = − 0.1 + 0.1Xs− Ztn . (19) Xt − 0.1 − t − t 10 0 0 n=1 Xt can be sampled by the Euler-Maruyama scheme according to (18), which will be detailed in the following Algorithm 1 (one can refer to Cont and Tankov [10]). One sample trajectory of the differentiated process Xt and integrated process Yt with T = 10, n = 1000, X0 = 0.1 and Y0 = 100 using Algorithm 1 is shown in FIG 2. Through observation on FIG 2(b), we can find the following features of the integrated process Yt : absent mean-reversion, persistent shocks, timedependent mean and variance, nonnormality, etc. x/h Throughout this section, we employ Gamma kernel KG(x/h+1,h) (u) = hux/h+1exp(−u/h) Γ(x/h+1) x2 and Gaussian kernel K(x) = √12π e− 2 . In general, the nonparametric estimation is sensitive to bandwidth choices, hence we select the data-driven band2 2 width via the bandwidth selector h = cŜ(n∆n )− 5 = cŜT − 5 for “interior x” 15 Algorithm 1 Simulation for trajectories of second-order jump-diffusion model Procedures: Step 1: generate a standard normal random variate V and transform it q √ into Di = 0.1 + 0.1Xt2i−1 ∗ ∆ti ∗ V , where ∆ti = ti − ti−1 = Tn is the observation time frequency; Step 2: generate a Poisson random variate N with intensity λ = 2; Step 3: generate N random variables τi uniformly distributed in [0, T ], which correspond the jump times; Step 4: generate N random variables Zτi ∼ N (0, 0.0362), which correspond the jump sizes; One trajectory for Xt is Xti = Xti−1 + (1 − 10Xti−1 ) ∗ ∆ti + Di + 1{ti−1 ≤τi <ti } ∗ Zτi . Step 5: By substitution of Xti in (19), Yti can be sampled. 0.35 101.4 One Path of X t One Path Y t 0.3 101.2 0.25 101 0.2 100.8 0.15 0.1 100.6 0.05 100.4 0 100.2 −0.05 −0.1 0 1 2 3 4 5 Time 6 7 8 9 100 10 (a) The differentiated process Xt 0 1 2 3 4 5 Time 6 7 8 9 10 (b) The integrated process Yt Figure 2: the Sample Paths of Xt and Yt 1 1 or h = cŜ(n∆n )− 5 = cŜT − 5 for “boundary x” similarly as Xu and Phillips [50], where Ŝ denotes the standard deviation of the data and c represents different constants for different cases, or cross-validation method in Racine [38] according to Remark 7. We will compare their mean square error (MSE) under various lengths of observation time interval T (= 50, 100, 500) and sample sizes n (= 500, 1000, 5000) with ∆n = Tn . For comparison of coverage rate and length of confidence band, we will consider three design points such as the boundary point x = 0.05 and interior point x = 0.15, 0.30, which fall in the range of the simulated data. Meanwhile, we will also consider five fixed bandwidth (h1 , h2 , h3 , h4 , hopt ) = (0.01, 0.02, 0.03, 0.05, 0.0441) for estimation of µ(x) and (h1 , h2 , h3 , h4 , hopt ) = (0.01, 0.02, 0.04, 0.05, 0.0294) for estimation of M (x) as that in Xu [49], which cover the bandwidths used in practice. In this section, the normal confidence level is assumed to be 95%. Firstly, we select the data-driven bandwidth by calculating MSE or k−block CV as a function of hn from a sample with T = 10 and n = 1000 under two rules of thumb in Remark 7 for estimation of both µ(x) and M (x), which are shown in Figure 3 and 4. We can get the optimal bandwidths hn for theses two cases on estimating µ(x) by means of minimizing MSE or k−block CV, which 16 −3 1.1 5.2 1 5.15 0.9 x 10 5.1 0.8 5.05 0.7 CV MSE 5 0.6 4.95 0.5 4.9 0.4 4.85 0.3 4.8 0.2 0.1 1 1.5 2 2.5 3 C in Bandwidth h 3.5 4 4.5 4.75 5 0 0.02 0.04 0.06 Bandwidth h 0.08 0.1 0.12 (a) Curve of M SE(h) versus C in h with (b) Curve of CV (h) versus h with hcv = 0.035 Copt = 2.8 Figure 3: Curve for two rules of thumb versus h with T = 10, n = 1000 of µ(x) = 1 − 10 ∗ x −3 2.4 x 10 −5 2.98 x 10 2.2 2.96 2 2.94 1.8 2.92 2.9 1.4 CV MSE 1.6 2.88 1.2 2.86 1 2.84 0.8 2.82 0.6 0.4 1 1.5 2 2.5 3 C in Bandwidth h 3.5 4 4.5 2.8 5 0 0.02 0.04 0.06 Bandwidth h 0.08 0.1 0.12 (a) Curve of M SE(h) versus C in h with (b) Curve of CV (h) versus h with hcv = 0.025 Copt = 1.7 Figure 4: Curve for two rules of thumb versus h with T = 10, n = 1000 of M (x) = 0.1 + 0.1 ∗ x2 + 2 ∗ 0.0362 are hopt = 0.0683 with copt = 2.8 which coincides with that in Xu and Phillips [50] and hcv = 0.035. Although hcv is smaller than hopt , the performance of the estimator with hcv is a little worse than that with hopt , which can be tested and verified in Figures 5 and 6. Figures 5 and 6 represent the local linear estimator and 95% Monte Carlo confidence intervals constructed with Gamma asymmetric kernels and Gaussian symmetric kernels for µ(x) from a sample with T = 10 and n = 1000 under two rules of thumb for hn , which show the local linear estimator constructed with Gamma asymmetric kernels performs a little better and the 95% Monte Carlo confidence intervals constructed with Gamma asymmetric kernels are shorter than that constructed with Gaussian symmetric kernels which reveals smaller variability, especially at the sparse design point. In addition, the local linear estimator constructed with hn = c ∗ Ŝ ∗ T −2/5 performs a little better and the 95% Monte Carlo confidence intervals constructed with hn = c ∗ Ŝ ∗ T −2/5 are shorter than that constructed with hcv . In the subsequent numeral calculations such as MSE, coverage rate and lengths of confidence band, we will calculate the estimators with hn = c ∗ Ŝ ∗ T −2/5 . Additionally, from Figure 5 we can observe that the local linear estimator constructed with Gaussian symmetric kernels exhibits a higher downward bias than that constructed with Gamma asymmetric kernels which is practically unbiased, which coincides with that in 17 5 0 Drift −5 True Drift Gaussian LL Drift Estimator with hopt −10 Gamma LL Drift Estimator with hopt Gaussian LL Drift Estimator with hcv Gamma LL Drift Estimator with hcv −15 −20 0 0.05 0.1 0.15 0.2 0.25 Ordered Xt 0.3 0.35 0.4 0.45 0.5 Figure 5: Local Linear Estimators for µ(x) = 1 − 10 ∗ x based on Gaussian and Gamma kernels with T = 10, n = 1000, hopt = 2.8 ∗ Ŝ ∗ T −2/5 = 0.0683, hcv = 0.035 30 20 Drift 10 0 True Drift Gaussian LL 95% Confidence Band with hopt Gaussian LL 95% Confidence Band with hopt −10 Gamma LL 95% Confidence Band with hopt Gamma LL 95% Confidence Band with hopt Gaussian LL 95% Confidence Band with hcv −20 Gaussian LL 95% Confidence Band with hcv Gamma LL 95% Confidence Band with hcv Gamma LL 95% Confidence Band with hcv −30 0 0.05 0.1 0.15 0.2 0.25 Ordered Xt 0.3 0.35 0.4 0.45 0.5 Figure 6: 95% Monte Carlo confidence intervals for µ(x) = 1 − 10 ∗ x based on Gaussian and Gamma kernels with T = 10, n = 1000, hopt = 2.8 ∗ Ŝ ∗ T −2/5 = 0.0683, hcv = 0.035 Gospodinov and Hirukawa [18]. Similar results for estimation of M (x) can be observed from Figure 4, 7 and 8. Inconsistently, the optimal bandwidths hn on estimating M (x) by means of minimizing MSE or k−block CV are hopt = 0.0441 with copt = 1.7 which coincides with that in Xu and Phillips [50] and hcv = 0.025. Compared with the optimal smoothing parameter for µ(x), it is observed that a narrower one for M (x), as documented in Chapman and Pearson [6]. From Figure 7, we can observe that the local linear estimator constructed with Gaussian symmet- 18 2 1.8 True Volatility Gaussian LL Volatility Estimator with hopt 1.6 Gamma LL Volatility Estimator with hopt 1.4 Gaussian LL Volatility Estimator with hcv Gamma LL Volatility Estimator with hcv Volatility 1.2 1 0.8 0.6 0.4 0.2 0 0 0.05 0.1 0.15 0.2 0.25 Ordered Xt 0.3 0.35 0.4 0.45 0.5 Figure 7: Local Linear Estimators for M (x) = 0.1+0.1∗x2 +2∗0.0362 based on Gaussian and Gamma kernels with T = 10, n = 1000, hopt = 1.7 ∗ Ŝ ∗ T −2/5 = 0.0441, hcv = 0.025 4 3 2 1 Volatility 0 True Volatility Gaussian LL 95% Confidence Band with hopt −1 Gaussian LL 95% Confidence Band with hopt Gamma LL 95% Confidence Band with hopt −2 Gamma LL 95% Confidence Band with hopt Gaussian LL 95% Confidence Band with hcv −3 Gaussian LL 95% Confidence Band with hcv Gamma LL 95% Confidence Band with hcv −4 Gamma LL 95% Confidence Band with hcv −5 −6 0 0.05 0.1 0.15 0.2 0.25 Ordered Xt 0.3 0.35 0.4 0.45 0.5 Figure 8: 95% Monte Carlo confidence intervals for M (x) = 0.1 + 0.1 ∗ x2 + 2 ∗ 0.0362 based on Gaussian and Gamma kernels with T = 10, n = 1000, hopt = 1.7 ∗ Ŝ ∗ T −2/5 = 0.0441, hcv = 0.025 ric kernels exhibits a higher upward bias than that constructed with Gamma asymmetric kernels, which may be caused by the discretization bias similarly as the microstructure noise in empirical market. Remark 12 As proposed in Hirukawa and Sakudo [24], the “rule of thumb” smoothing bandwidth should be under consideration for each cases such as various T and n, which should be determined by the specific financial data. As depicted in Figure 9, contrary to hopt with copt = 2.8 for a sample with T = 10 19 and n = 1000, the estimated parameters copt in hopt based on a sample with T = 50 and n = 5000 or T = 100 and n = 5000 are 3 or 3.7. The copt in hopt get larger as the time span T expands larger, which may be due to the fact that hopt = c · Ŝ · T −2/5 is inversely proportional to T and the fact that the smaller hn , the larger bias from Figure 3, 4 and 9. In order to effectively compare the local linear estimator constructed with Gamma asymmetric kernel with that using Gaussian symmetric kernel in terms of MSE, we should calculate the copt in hopt for various T and n. Here we omit these calculations for copt . 1 0.4 0.9 0.35 0.8 0.3 0.7 0.25 MSE MSE 0.6 0.5 0.2 0.4 0.15 0.3 0.1 0.2 0.05 0.1 0 1 1.5 2 2.5 3 C in Bandwidth h 3.5 4 4.5 0 5 1 1.5 2 2.5 3 C in Bandwidth h 3.5 4 4.5 5 (a) Copt = 3 for T = 50, n = 5000 with (b) Copt = 3.7 for T = 100, n = 5000 with hopt = 0.0441 (0.0412 if C = 2.8) hopt = 0.0435 (0.0329 if C = 2.8) Figure 9: Curve for M SE(h) versus C in h = C ∗ Ŝ ∗ T −2/5 under n = 5000 and various T of µ(x) = 1 − 10 ∗ x We will assess the performance of the local linear estimators constructed with Gamma asymmetric kernels and those constructed with Gaussian symmetric kernels for both drift and conditional variance functions via the Mean Square Errors (MSE) m 1 X 2 {µ̂(xk ) − µ(xk )} , (20) M SE = m k=0 where µ̂(x) is the estimator of µ(x) and {xk }m 1 are chosen uniformly to cover the range of sample path of Xt . Table 2 gives the results on the MSE of local linear estimator constructed with Gamma asymmetric kernels (MSE-LL(Gamma)) and local linear estimator constructed with Gaussian symmetric kernels (MSELL(Gaussian)) for the drift function µ(x) with jump size Zn ∼ N (0, 0.0362) over 500 replicates. Table 3 reports the results on MSE-LL(Gamma) and MSELL(Gaussian) for M (x). From Table 2 and 3, we can make the following remarks. • The local linear estimator for µ(x) and M (x) constructed with Gamma asymmetric kernels performs a little better than that constructed with Gaussian symmetric kernels in terms of MSE; • For the same time interval T , as the sample sizes n tends larger, the performances of the estimators for µ(x) or M (x) are improved due to the fact that more information for estimation procedure is sampled as ∆n → 0; 20 • For the same sample sizes n, as the time interval T expands larger, the performance of the estimator for µ(x) is improved due to the fact that the more information about drift coefficient is obtained as the time span get larger, however, the performance of the estimator for M (x) gets worse, especially when T = 100, due to the fact that more jumps happens in larger time interval T in steps 3 of Algorithm 1; • To some extent, the previous remark confirms that the drift and conditional variance functions cannot be identified in a fixed time span, which corresponds to the results of Theorem 2. Table 2: Simulation results on MSE-LL(Gaussian), MSE-LL(Gamma) for three lengths of time interval (T) and three sample sizes for µ(x) = 1 − 10x with arrival intensity λ · T = 20, jump size Zn ∼ N (0, 0.0362) and hopt over 500 replicates. T n = 500 n = 1000 n = 5000 10 MSE-LL(Gaussian) 0.5818 0.5253 0.0833 MSE-LL(Gamma) 0.3010 0.1511 0.0424 50 MSE-LL(Gaussian) 0.5075 0.7499 0.1596 MSE-LL(Gamma) 0.1373 0.0874 0.0154 100 MSE-LL(Gaussian) 0.0364 0.0351 0.0078 MSE-LL(Gamma) 0.0187 0.0093 0.0022 Table 3: Simulation results on MSE-LL(Gaussian), MSE-LL(Gamma) for three lengths of time interval (T) and three sample sizes for M (x) = 0.1 + 0.1 ∗ x2 + λ ∗ 0.0362 with arrival intensity λ · T = 20, jump size Zn ∼ N (0, 0.0362) and hopt over 500 replicates. T n = 500 n = 1000 n = 5000 10 MSE-LL(Gaussian) 0.1268 0.0337 0.0019 MSE-LL(Gamma) 0.0084 0.0047 3.7014 × 10−4 50 MSE-LL(Gaussian) 0.1153 0.0169 0.0079 MSE-LL(Gamma) 0.0079 5.7058 × 10−4 3.1990 × 10−4 100 MSE-LL(Gaussian) 10.7405 0.0649 0.0089 MSE-LL(Gamma) 27.9961 0.0025 0.0011 Figure 10 and 11 give the QQ plots for the local linear estimators of the drift function µ(x) and conditional variance function M (x) constructed with Gamma asymmetric kernels and those constructed with Gaussian symmetric kernels with T = 50 and ∆n = 0.01. This reveals the normality of the local linear estimators of the drift function µ(x) and conditional variance function M (x) constructed with Gamma asymmetric kernels, which confirms the results in Theorems 2. The computational results about comparison of coverage rate and length of confidence band for drift µ(x) are summarized in Table 4 - 6 and conditional 21 QQ Plot of Sample Data versus Standard Normal QQ Plot of Sample Data versus Standard Normal 1.5 2 1 1.5 1 Quantiles of Input Sample Quantiles of Input Sample 0.5 0 −0.5 −1 0 −0.5 −1.5 −2 −3 0.5 −1 −2 −1 0 Standard Normal Quantiles 1 2 −1.5 −3 3 (a) QQ plot using Gaussian kernels −2 −1 0 Standard Normal Quantiles 1 2 3 (b) QQ plot using Gamma kernels Figure 10: QQ plot of local linear estimators for µ(x) = 1−10∗x using Gaussian and Gamma kernels with T = 50, n = 5000, hopt = 3 ∗ Ŝ ∗ T −2/5 = 0.0441 QQ Plot of Sample Data versus Standard Normal QQ Plot of Sample Data versus Standard Normal 0.1 0.02 0 0.05 Quantiles of Input Sample Quantiles of Input Sample −0.02 0 −0.05 −0.04 −0.06 −0.08 −0.1 −0.1 −0.15 −3 −2 −1 0 Standard Normal Quantiles 1 2 −0.12 −3 3 (a) QQ plot using Gaussian kernels −2 −1 0 Standard Normal Quantiles 1 2 3 (b) QQ plot using Gamma kernels Figure 11: QQ plot of local linear estimators for M (x) = 0.1 + 0.1 ∗ x2 + 20/50 ∗ 0.0362 using Gaussian and Gamma kernels with T = 50, n = 5000, hopt = 1.9 ∗ Ŝ ∗ T −2/5 = 0.0294 variance M (x) in Table 9 for various intensity and amplitude of jumps with T = 50, n = 5000. The confidence intervals are constructed as those in Remark 9. For “boundary x = 0.05” or “interior x = 0.15”, we also calculate the adjusted lengths of confidence band for µ(x) which was argued for in Xu [49]. The adjusted lengths of the calibrated confidence intervals constructed with the actual critical values are presented in Table 7 - 8. The actual critical values marked as 2.5% or 97.5% quantile in Table 7 - 8 are adapt to actual simulation data and no longer 1.96 as that in the standard normal distribution table for asymptotic normality such that the coverage rates are adjusted to 95%. Note that the ratio in tables denotes the ratio of the length of confidence band constructed with Gaussian symmetric kernel (CB-GSK) to that constructed with Gamma asymmetric kernel (CB-GAK). From these six tables, we can obtain the following findings. • From Table 4, for the drift function, according to the coverage rates in percent, CB-GSK or CB-GAK are more under-covered as hn expands larger, especially at the “boundary x = 0.05” or the sparse “interior x = 0.30”. When x = 0.15, CB-GSK or CB-GAK has favorable lengths for the bandwidths hn . The reasons behind the phenomenon may be the following three aspects. Firstly, estimations for asymptotic variance at design points x = 0.05, 0.30 based on the formula in Theorem 2 are more slightly below 22 the sample variance of the randomly generated data, which may be the main reason. Secondly, the process visits the design points x = 0.05, 0.30 less frequently such that there are relatively less sample points near their neighborhood to estimate the unknown quantity. The first two reasons coincide with those observed in Xu [49]. Thirdly, as shown in Remark 9, the bias in the normal confidence interval is estimated by taking the second derivative of the local linear estimators,which may give rise to estimation bias. Also, one can see that at the “boundary point x = 0.05”, the coverage rate with GSK is a little better than that with GAK, which may be due to the facts: CB-GSK can allocate weight to the observations less than zero while CB-GAK can’t. • From Table 4 - 6, the absolute mean of bias and variance for estimator constructed with Gamma asymmetric kernels are less than that constructed with Gaussian symmetric kernels, which indicates that compared with that constructed with Gaussian symmetric kernels, estimator constructed with Gamma asymmetric kernels is practically unbiased and exhibits smaller variability for either the boundary point or the spare design point. This coincides with the discussion of coverage rate in Remark 10, as documented in Gospodinov and Hirukawa [18]. • From Table 4 - 6, it is observed that for the same design point x, the ratio is more than 1 under the condition that the confidence rate is approximate, that is CB-GSK is longer than CB-GAK. Meanwhile, CB-GSK or CB-GAK expands larger and the ratio becomes bigger as x increases, especially at the sparse design point x = 0.30. One can also find that the ratio becomes smaller as the smoothing parameter hn gets larger, especially at the boundary design point x = 0.05, which coincides with the theoretical results discussed in Remark 10. Note that the smaller the smoothing parameter hn , the larger the bias. Hence the choice of smoothing parameter hn is not recommended to be too large or too small and should depend on the need for higher coverage rate or lower bias. As the intensity and amplitude of jump increases, CB-GSK or CB-GAK expands larger to improve coverage rate since it needs more information to cover more and larger jump similarly as that mentioned in Bandi and Nguyen [2]. • Here we discuss the adjusted lengths of confidence intervals constructed with various kernels since the two findings above indicate that the reasonably correct coverage rate depends on the choice of smoothing bandwidth hn and the consistently estimated variance. From Table 7 for “boundary x = 0.05”, after confidence rates are adjusted to 95%, the adjusted lengths of confidence intervals constructed with Gamma asymmetric kernel (ACIGAK) are shorter than that constructed with Gaussian symmetric kernel (ACI-GSK) with the smoothing parameter hn = 0.01, 0.02, 0.03, however, ACI-GAK are longer than ACI-GSK with hn = 0.0441, 0.05, which coincides with the conclusion in Remark 10 that the closer to the boundary point or the larger bandwidth for fixed “boundary x”, the shorter the 23 length of confidence interval based on Gaussian symmetric kernel. In addition, the lengths of ACI-GAK are more robust as the smoothing parameter hn changes. One can also observe that the absolute critical values for ACI-GAK or ACI-GSK are almost larger than 1.96 for adjusted lengths, which provides a reference point for empirical analysis when constructing the confidence intervals. In Table 8, for “interior x = 0.15”, ACI-GAK are shorter than ACI-GSK with all hn mentioned and the absolute critical values for ACI-GAK or ACI-GSK are almost larger than 1.96 for adjusted lengths. Constructed with the Gamma asymmetric kernel, the adjustment for µ(0.15) is milder relative to µ(0.05) for any given bandwidth or intensity and amplitude of jumps, which is because that there are plenty of sample points used to estimate µ(x) near the design point x = 0.15 such that the coverage rate for µ(0.15) is close to 95% in Table 4 - 6. • For simplicity, similar observations for the conditional variance M (x) only at “interior x = 0.15” are shown in Table 9. Similarly as the drift function, the ratio is more than 1 under the condition that the confidence rate is approximate, that is CB-GAK is shorter than CB-GSK. Meanwhile, the ratio becomes smaller as the smoothing parameter hn gets larger and the intensity and amplitude of jump increases. Compared with the mean of bias of the estimator for µ(0.15) in Table 4 - 6, the mean of bias for M (0.15) constructed with Gamma asymmetric kernels is larger than that constructed with Gaussian symmetric kernels. As mentioned in Theorem 2 and Remark 9, for the estimators constructed with Gamma asymmetric kernels at “interior x = 0.15”, the bias for µ(x) in model (17) is hn Bµ̂n (x) = ′′ hn x2 µ (x) ≡ 0, which is equal to the bias of the estimator constructed with Gaussian symmetric kernels, that is also 0. However, the bias for M (x) is ′′ hn BM̂n (x) = hn x2 M (x) = hn · 0.1 · x = O(hn ) which is far greater than the bias of the estimator constructed with Gaussian symmetric kernels, that is O(h2n ). Furthermore, this observation does not contradict with the result on MSE considered previously because the variance of the estimator for M (0.15) constructed with Gamma asymmetric kernels is less than that constructed with Gaussian symmetric kernels and the variance dominates the MSE. 24 Table 4: Estimation for µ(x) with arrival intensity λ · T = 20, jump size Zn ∼ N (0, 0.0362) over 500 replicates. Bandwidth Coverage Rate Mean of Bias Sym Sym Asym Asym Variance Sym Estimation for Variance Asym Length of Confidence Band Sym Std Asym Std Sym Asym Ratio x = 0.05 h1 = 0.01 94.6 92.4 0.0045 0.0028 0.0144 0.0067 0.0136 0.0011 0.0057 0.0004 0.457 0.2954 1.5471 h2 = 0.02 94.6 89.6 0.0032 0.0011 0.007 0.0055 0.0069 0.0005 0.0039 0.0002 0.3262 0.2456 1.3282 h3 = 0.03 94.2 88 0.0022 0.0003 0.0049 0.005 0.0048 0.0003 0.0032 0.0002 0.2701 0.2217 1.2183 h4 = 0.05 93.6 84 0.0018 -0.0002 0.0037 0.0046 0.0031 0.0002 0.0025 0.0001 0.2178 0.1976 1.1022 hopt = 0.0441 93.8 84.6 0.0018 -0.0001 0.0038 0.0047 0.0033 0.0002 0.0026 0.0001 0.2253 0.2012 1.1198 x = 0.15 25 h1 = 0.01 94.4 94.2 -0.0038 -0.004 0.0139 0.0042 0.0142 0.0013 0.0042 0.0003 0.4659 0.2538 1.8357 h2 = 0.02 95.6 94 -0.005 -0.0036 0.0072 0.0035 0.0072 0.0005 0.0033 0.0002 0.332 0.225 1.4756 h3 = 0.03 93.2 94 -0.0045 -0.0035 0.0051 0.0032 0.0049 0.0003 0.0029 0.0001 0.2745 0.212 1.2948 h4 = 0.05 93.6 93.4 -0.0034 -0.0033 0.0036 0.003 0.0032 0.0002 0.0026 0.0001 0.2208 0.1993 1.1079 hopt = 0.0441 93.6 93.2 -0.0036 -0.0033 0.0038 0.003 0.0034 0.0002 0.0026 0.0001 0.2285 0.2012 1.1357 x = 0.30 h1 = 0.01 94.4 95 -0.1856 -0.0913 0.863 0.14 0.7196 0.5996 0.125 0.0538 3.1606 1.3587 2.3262 h2 = 0.02 89.6 89.2 -0.1702 -0.0581 0.4349 0.0853 0.2866 0.1626 0.058 0.0196 2.0382 0.9319 2.1871 h3 = 0.03 86.2 87.2 -0.138 -0.0421 0.2695 0.0644 0.1443 0.0607 0.0369 0.0109 1.4629 0.7458 1.9615 h4 = 0.05 76.6 81 -0.0806 -0.0277 0.125 0.0474 0.0477 0.0119 0.0214 0.0052 0.8498 0.5691 1.4932 hopt = 0.0441 79.6 81.8 -0.0929 -0.0299 0.1486 0.05 0.0596 0.0196 0.0235 0.0064 0.946 0.5962 1.5867 Table 5: Estimation for µ(x) with arrival intensity λ · T = 50, jump size Zn ∼ N (0, 0.0362) over 500 replicates. Bandwidth Coverage Rate Mean of Bias Sym Sym Asym Asym Variance Sym Estimation for Variance Asym Length of Confidence Band Sym Std Asym Std Sym Asym Ratio x = 0.05 h1 = 0.01 95.2 92 0.0027 0.0005 0.0138 0.0069 0.0137 0.0013 0.0057 0.0004 0.4586 0.2965 1.5467 h2 = 0.02 95 90 0.0019 0.0006 0.0068 0.0056 0.007 0.0005 0.004 0.0002 0.3271 0.2465 1.3270 h3 = 0.03 94.6 88.8 0.0018 0.0007 0.0049 0.0051 0.0048 0.0003 0.0032 0.0002 0.2709 0.2226 1.2170 h4 = 0.05 92.6 86.4 0.002 0.0009 0.0036 0.0047 0.0031 0.0002 0.0026 0.0001 0.2185 0.1984 1.1013 hopt = 0.0441 93.8 86.8 0.0019 0.0009 0.0038 0.0047 0.0033 0.0002 0.0027 0.0001 0.2259 0.202 1.1183 x = 0.15 26 h1 = 0.01 95.4 94.2 -0.0029 -0.0091 0.0134 0.0045 0.0143 0.0013 0.0043 0.0003 0.469 0.2556 1.8349 h2 = 0.02 95.8 93.4 -0.0071 -0.0094 0.007 0.0039 0.0073 0.0005 0.0033 0.0002 0.3343 0.2265 1.4759 h3 = 0.03 94.4 92.6 -0.0085 -0.0095 0.0052 0.0036 0.005 0.0003 0.003 0.0001 0.2764 0.2135 1.2946 h4 = 0.05 92.2 91.2 -0.009 -0.0096 0.004 0.0034 0.0032 0.0002 0.0026 0.0001 0.2222 0.2006 1.1077 hopt = 0.0441 92.6 91.2 -0.009 -0.0096 0.0042 0.0035 0.0034 0.0002 0.0027 0.0001 0.2299 0.2025 1.1353 x = 0.30 h1 = 0.01 93.4 94 -0.1792 -0.0942 0.8427 0.1411 0.7276 0.6509 0.1244 0.0672 3.1579 1.3501 2.3390 h2 = 0.02 92.2 87.8 -0.1605 -0.06 0.4074 0.0893 0.2826 0.1555 0.0576 0.0217 2.0249 0.9271 2.1841 h3 = 0.03 89.2 83 -0.1365 -0.0431 0.257 0.0679 0.1429 0.058 0.0367 0.0115 1.4564 0.7426 1.9612 h4 = 0.05 76 77.8 -0.083 -0.0275 0.1272 0.0495 0.0476 0.0114 0.0213 0.0054 0.8491 0.5674 1.4965 hopt = 0.0441 79.2 78.6 -0.0945 -0.0298 0.1483 0.0522 0.0588 0.0187 0.0233 0.0066 0.9396 0.5929 1.5848 Table 6: Estimation for µ(x) with arrival intensity λ · T = 20, jump size Zn ∼ N (0, 0.12 ) over 500 replicates. Bandwidth Coverage Rate Mean of Bias Sym Sym Asym Asym Variance Sym Estimation for Variance Asym Length of Confidence Band Sym Std Asym Std Sym Asym Ratio x = 0.05 h1 = 0.01 94.2 93.6 -0.0114 -0.0074 0.0142 0.0071 0.0142 0.0014 0.0059 0.0004 0.4671 0.3019 1.5472 h2 = 0.02 95.6 88.6 -0.0068 -0.0056 0.0075 0.006 0.0072 0.0006 0.0041 0.0003 0.3333 0.2509 1.3284 h3 = 0.03 94 86 -0.0045 -0.0046 0.0055 0.0055 0.0050 0.0003 0.0033 0.0002 0.2758 0.2264 1.2182 h4 = 0.05 91.2 83.2 -0.0019 -0.0035 0.004 0.0051 0.0032 0.0002 0.0026 0.0001 0.2222 0.2017 1.1016 hopt = 0.0441 91.2 83 -0.0022 -0.0036 0.0042 0.0051 0.0034 0.0002 0.0027 0.0001 0.2283 0.2046 1.1158 x = 0.15 27 h1 = 0.01 95 94.8 -0.0073 -0.005 0.0142 0.0043 0.0147 0.0015 0.0044 0.0003 0.4753 0.2587 1.8373 h2 = 0.02 94.4 94 -0.0062 -0.0045 0.0073 0.0035 0.0075 0.0006 0.0034 0.0002 0.3387 0.2292 1.4777 h3 = 0.03 93.8 94 -0.0055 -0.0043 0.0051 0.0033 0.0051 0.0003 0.003 0.0002 0.2799 0.2159 1.2964 h4 = 0.05 93.4 93.2 -0.0043 -0.004 0.0037 0.0031 0.0033 0.0002 0.0027 0.0001 0.225 0.203 1.1084 hopt = 0.0441 93.4 93.2 -0.0045 -0.0041 0.0038 0.0031 0.0035 0.0002 0.0027 0.0001 0.2314 0.2045 1.1315 x = 0.30 h1 = 0.01 95 94.4 -0.1758 -0.0828 0.764 0.1299 0.6683 0.5664 0.1073 0.0468 3.0489 1.2594 2.4209 h2 = 0.02 90.8 88.4 -0.1562 -0.0542 0.3728 0.0807 0.2704 0.1552 0.051 0.0176 1.9791 0.8742 2.2639 h3 = 0.03 87.6 84.6 -0.1256 -0.0402 0.2393 0.0616 0.1392 0.0619 0.033 0.0099 1.4352 0.7045 2.0372 h4 = 0.05 80.8 79.8 -0.0734 -0.0275 0.1176 0.0461 0.0475 0.0131 0.0194 0.0049 0.8471 0.5425 1.5615 hopt = 0.0441 82.6 79.8 -0.0823 -0.0291 0.1355 0.0481 0.0569 0.0199 0.021 0.0058 0.9234 0.5628 1.6407 Table 7: Adjusted length of confidence band for µ(0.05) over 500 replicates. Coverage Rate Bandwidth Sym Asym Sym Quantile 2.50% 97.50% Asym Quantile 2.50% 97.50% Length of Confidence Band Sym Asym Ratio 2 Arrival intensity λ · T = 20, Jump size Zn ∼ N (0, 0.036 ) h1 = 0.01 95.2 95.2 -2.1465 1.8766 -2.2883 2.2854 0.4703 0.3453 1.362 h2 = 0.02 95.2 95.2 -2.0760 2.0444 -2.3716 2.4169 0.3435 0.3002 1.1442 h3 = 0.03 95.2 95.2 -2.1586 2.1179 -2.5243 2.5791 0.295 0.2888 1.0215 h4 = 0.05 95.2 95.2 -2.1865 2.2459 -2.7060 2.7412 0.2464 0.2746 0.8973 hopt = 0.0441 95.2 95 -2.1899 2.1468 -2.7222 2.6919 0.2493 0.278 0.8968 -2.1515 2.0863 -2.5225 2.5429 0.3209 0.2974 1.0791 mean 28 h1 = 0.01 95.2 h2 = 0.02 Arrival intensity λ · T = 50, Jump size Zn ∼ N (0, 0.0362) 95.2 -1.9490 2.0748 -2.2026 2.2388 0.4721 0.3368 1.4017 95.2 95.2 -2.0882 2.074 -2.4857 2.5502 0.3484 0.3173 1.098 h3 = 0.03 95.2 95.2 -2.0592 2.1506 -2.6234 2.5998 0.2917 0.2883 1.0118 h4 = 0.05 95.2 95.2 -2.3158 2.0811 -2.7272 2.7163 0.2455 0.2758 0.8901 hopt = 0.0441 95.2 94.8 -2.2977 2.0508 -2.7281 2.6843 0.2508 0.279 0.8989 -2.142 2.0863 -2.5534 2.5579 0.3217 0.2994 1.0743 mean h1 = 0.01 95.2 h2 = 0.02 Arrival intensity λ · T = 20, Jump size Zn ∼ N (0, 0.12 ) 95.2 -2.0544 1.8202 -2.1361 2.1092 0.4599 0.3258 1.4116 95.2 95.2 -1.8318 1.8576 -2.4108 2.2472 0.3124 0.2973 1.0508 h3 = 0.03 95.2 95.2 -2.0650 1.9779 -2.5856 2.4245 0.2834 0.2811 1.0081 h4 = 0.05 95.2 95.2 -2.1245 2.086 -2.8735 2.5503 0.2381 0.2786 0.8546 hopt = 0.0441 95.2 95.2 -2.1531 2.0896 -2.8347 2.5017 0.2468 0.2783 0.8868 -2.0458 1.9663 -2.5681 2.3666 0.3081 0.2922 1.0544 mean Table 8: Adjusted length of confidence band for µ(0.15) over 500 replicates. Coverage Rate Bandwidth Sym Asym Sym Quantile 2.50% 97.50% Asym Quantile 2.50% 97.50% Length of Confidence Band Sym Asym Ratio 2 Arrival intensity λ · T = 20, Jump size Zn ∼ N (0, 0.036 ) h1 = 0.01 95.2 95.2 -2.0012 2.0126 -1.9856 2.1802 0.4761 0.2695 1.7666 h2 = 0.02 95.2 95.2 -1.9823 2.0154 -1.9710 2.1613 0.3381 0.237 1.4266 h3 = 0.03 95.2 95.2 -2.0890 2.1366 -1.9350 2.3658 0.2956 0.2325 1.2714 h4 = 0.05 95.2 95.2 -2.0606 2.2294 -1.9769 2.3788 0.2415 0.2214 1.0908 hopt = 0.0441 95.2 94.8 -2.0697 2.2194 -1.9547 2.3841 0.2498 0.2226 1.1222 -2.0406 2.1227 -1.9646 2.294 0.3202 0.2366 1.3534 mean 29 h1 = 0.01 95.2 h2 = 0.02 Arrival intensity λ · T = 50, Jump size Zn ∼ N (0, 0.0362) 95.2 -2.1808 2.0987 -1.9418 2.1174 0.51 0.2638 1.9333 95.2 95.2 -1.9529 2.3189 -2.1120 2.0546 0.363 0.2401 1.5119 h3 = 0.03 95.2 95.2 -1.9840 2.3023 -2.1067 2.0558 0.3013 0.2261 1.3326 h4 = 0.05 95.2 95.2 -2.1573 2.1565 -2.2084 2.101 0.244 0.2201 1.1086 hopt = 0.0441 95.2 95 -2.1034 2.1938 -2.2020 2.1022 0.2511 0.2218 1.1321 -2.0757 2.214 -2.1142 2.0862 0.3339 0.2344 1.4245 mean h1 = 0.01 95.2 h2 = 0.02 Arrival intensity λ · T = 20, Jump size Zn ∼ N (0, 0.12 ) 95.2 -2.0582 2.0251 -2.0616 2.2115 0.494 0.2821 1.7512 95.2 95.2 -2.0097 2.1434 -2.1454 2.2018 0.3585 0.2544 1.4092 h3 = 0.03 95.2 95.2 -2.0967 2.1874 -2.1593 2.2739 0.3059 0.2445 1.2511 h4 = 0.05 95.2 95.2 -2.1265 2.2835 -2.1661 2.3895 0.2534 0.2363 1.0724 hopt = 0.0441 95.2 95.2 -2.0901 2.3064 -2.1598 2.3709 0.2596 0.2367 1.0967 -2.0762 2.1892 -2.1384 2.2895 0.3343 0.2508 1.3329 mean Table 9: Estimation for M (0.15) over 500 replicates. Bandwidth Coverage Rate Mean of Bias Sym Sym Asym Asym Variance (×10−4 ) Sym Asym Estimation for Variance (×10−4 ) Sym Std Asym Arrival intensity λ · T = 20, Jump size Zn ∼ N (0, 0.0362) Length of Confidence Band Std Sym Asym Ratio h1 = 0.01 94.8 94.8 0.004 0.0049 0.3221 0.0991 0.4581 0.0679 0.1369 0.0125 0.0265 0.0145 1.8276 h2 = 0.02 92 90.4 0.0043 0.0053 0.1669 0.0821 0.233 0.0268 0.108 0.0087 0.0189 0.0129 1.4651 h3 = 0.04 76.4 79.2 0.0048 0.0058 0.0985 0.0731 0.1242 0.0108 0.0895 0.0065 0.0138 0.0117 1.1795 h4 = 0.05 68.6 68.6 0.0051 0.0059 0.0867 0.0714 0.1037 0.0082 0.0852 0.006 0.0126 0.0114 1.1053 hopt = 0.0294 85 86.2 0.0045 0.0056 0.1237 0.0766 0.1647 0.0162 0.097 0.0073 0.0159 0.0122 1.3033 Arrival intensity λ · T = 50, Jump size Zn ∼ N (0, 0.0362) 30 h1 = 0.01 94.6 93 0.0034 0.0045 0.329 0.1114 0.4626 0.0692 0.1392 0.0132 0.0266 0.0146 1.8219 h2 = 0.02 91 89.8 0.0038 0.005 0.1807 0.0911 0.2361 0.0276 0.11 0.0094 0.019 0.013 1.4615 h3 = 0.04 79.8 82.6 0.0045 0.0056 0.109 0.0803 0.1263 0.0116 0.0913 0.0071 0.0139 0.0118 1.1780 h4 = 0.05 72.2 72.6 0.0048 0.0057 0.096 0.0784 0.1056 0.0089 0.087 0.0066 0.0127 0.0116 1.0948 hopt = 0.0294 87 85.4 0.0041 0.0053 0.1356 0.0843 0.1662 0.0168 0.0987 0.0079 0.016 0.0123 1.3008 Arrival intensity λ · T = 20, Jump size Zn ∼ N (0, 0.12 ) h1 = 0.01 95 93.8 0.0038 0.0046 0.5407 0.1829 0.6642 0.3883 0.1961 0.0698 0.0311 0.0171 1.8187 h2 = 0.02 93 91.2 0.004 0.0052 0.3149 0.1456 0.3372 0.1509 0.154 0.0487 0.0224 0.0152 1.4737 h3 = 0.04 85.2 85.2 0.0046 0.0057 0.179 0.1276 0.1778 0.0614 0.1272 0.0371 0.0163 0.0139 1.1727 h4 = 0.05 78.2 79.2 0.0049 0.0058 0.1544 0.1246 0.1481 0.0471 0.1211 0.0347 0.0149 0.0135 1.1037 hopt = 0.0294 88.6 87.8 0.0043 0.0055 0.2285 0.1339 0.2323 0.0889 0.1373 0.041 0.0186 0.0144 1.2917 5 Empirical Analysis In this section, we apply the second-order jump-diffusion to model the return of stock index in Shanghai Stock Exchange between July 2014 and Dec 2014 from China under five-minute high frequency data, and then apply the local linear estimators to estimate the unknown coefficients in model (3) based on Gamma asymmetric kernels and Gaussian symmetric kernels. The real-world financial market data set analyzed consists of 6048 observations. We assume that  d log Yt = Xt dt, R (21) dXt = µ(Xt− )dt + σ(Xt− )dWt + E c(Xt− , z)r(ω, dt, dz), where log Yt is the log integrated process for stock index and Xt is the latent process for the log-returns. According to (6), we can get the proxy of the latent process ei∆n = log Yi∆n − log Y(i−1)∆n . (22) X ∆n The plots of the stock index and its proxy (22) from China, i.e. Shanghai Composite Index in high frequency data are shown in Figure 12. Shanghai Composite Index 1 Shanghai Composite Index 3400 3200 0.5 3000 Stock Index Stock Index 0 2800 2600 −0.5 2400 −1 2200 −1.5 2000 (a) Shanghai Composite Index (2014) (b) Proxy of Shanghai Composite Index (2014) Figure 12: Time Series and Proxy of Shanghai Composite Index (2014) from July 01, 2014 to Dec 31, 2014 First, we test the existence of jumps for the proxy Xt through the test statistic proposed in Barndorff-Nielsen and Shephard [3] (denoted by BS Statistic). For five-minute high frequency data, the value of BS Statistic is -3.9955, which exceeds [-1.96, 1.96], so there exists jumps in high frequency data at the 5% significance level, which confirms the validity of model (3) not model (2) for the return of stock index by the second-order process. Based on the Augmented Dickey-Fuller test statistic, we can easily get that the null hypothesis of nonstationarity is accepted at the 5% significance level for the stock index Yt , but is rejected for the proxy of Xt , which confirms the assumption of stationary by differencing. Here we use two alternative smoothing parameters hcv which is selected by 2 the k−block cross-validation method, and hT = c·Ŝ·T − 5 with c = 4 for drift and c = 2 for volatility (chosen only for illustration). Figure 13 depicts the curves 31 of CV(hcv ) versus hcv for Shanghai Composite Index showing that CV(hcv ) is minimized at hcv = 0.095 for drift estimator, hcv = 0.040 for volatility estimator, respectively. −3 1.07 7 x 10 1.06 6.9 1.05 6.8 1.04 6.7 CV CV 1.03 1.02 6.6 1.01 6.5 1 6.4 0.99 6.3 0.98 0.97 0 0.05 0.1 0.15 0.2 6.2 0.25 Bandwidth h 0 0.05 0.1 0.15 0.2 0.25 Bandwidth h n n (a) CV (hn ) for drift estimator (b) CV (hn ) for volatility estimator Figure 13: Curve of CV (hn ) versus hn for Shanghai Composite Index (2014) Then, we will employ the local linear estimators based on Gamma asymmetric kernels (11) and (12) to estimate the unknown coefficients under (22) and 1 for five-minute data (t = 1 meaning one day) with various bandwidth ∆n = 48 such as hcv and hT . The estimation curves for unknown qualities in five-minute high frequency data are displayed in Figure 14. It is observed that the linear shape with negative coefficient for drift estimator in FIG 14 (a) & (b) for various bandwidths which indicates that the higher log-return increments correspond to the lower drift in the latent process (this fact coincides with the economic phenomenon of mean reversion), which reveals a negative correlation. It is also shown the quadratic form with positive coefficient for volatility estimator with a minimum at 0.3 in FIG 14 (c) & (d) which reveals that the higher absolute value of log-return increments correspond to the higher volatility in the latent process (this fact coincides with the economic phenomenon of volatility smile). These findings are consistent with those in Nicolau [34]. Finally, we will construct 95% normal confidence intervals for the unknown coefficients based on Gamma asymmetric kernels and Gaussian symmetric ker1 for five-minute data (t = 1 meaning one day) with nels under (22) and ∆n = 48 various bandwidth such as hcv and hT . The 95% normal confidence bands for the drift and volatility functions are demonstrated in Figure 15. All the quanei∆n from 0.01 tities are computed at 120 equally spaced nonnegative ordered X to 0.601. For a more intuitive comparison of the lengths of normal confidence intervals of the drift and volatility coefficients based on Gaussian kernels and Gamma kernels for Shanghai Composite Index (2014) using various bandwidths, here the ratios of the length of confidence band constructed with Gaussian symmetric kernel (CB-GSK) to that constructed with Gamma asymmetric kernel (CB-GAK) are shown in Figure 16. Note that the blue dotted lines in Figure 16 represent the ratio value of one. From Figures 15 and 16, we can observe the following findings. • As for the quantities close to zero, the ratios are less than one, which coincides with the discussion in Remark 10 that the closer to the boundary 32 Shanghai Composite Index Shanghai Composite Index 0 0 −10 −10 −20 −20 Drift Drift −30 −30 −40 −40 −50 −50 −60 −60 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 −70 0.9 0 0.1 0.2 0.3 0.4 Ordered X 0.5 0.6 0.7 0.8 0.9 Ordered X t t (a) Drift estimator with hcv (b) Drift estimator with hT Shanghai Composite Index Shanghai Composite Index 45 45 40 40 35 35 30 30 Volatility Volatility 25 25 20 20 15 15 10 10 5 5 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 −5 0.1 0.8 Ordered Xt 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Ordered Xt (c) Volatility estimator with hcv (d) Volatility estimator with hT Figure 14: Local linear estimators of the drift and volatility coefficients for Shanghai Composite Index (2014) based on Gamma kernels using various bandwidths point or the larger bandwidth for fixed “boundary x”, the shorter the length of confidence interval based on Gaussian symmetric kernel. • As the points increase, especially at the sparse points, CB-GSK tends to be longer than CB-GAK and the ratios gradually become larger and greater than 1, which effectively verifies the efficiency gains and resistance to sparse points of local linear smoothing using Gamma asymmetric kernel through the real high frequency financial data. • Note that some values for the ratios in Figure 16 are zero, which is due to the fact that the local linear estimators based on Gaussian symmetric kernel for conditional variance and conditional fourth moment are negative. Fortunately, the local linear estimators based on Gamma asymmetric kernel for conditional variance and conditional fourth moment are positive. 6 Conclusion In this paper, the local linear estimators based on Gamma asymmetric kernels for the unknown drift and conditional variance in second-order jump-diffusion model. Besides the standard properties of the local linear estimation constructed with Gaussian symmetric kernels such as simple bias representation and boundary bias correction, the local linear smoothing using Gamma asymmetric kernels possesses some extra advantages such as variable bandwidth, variance reduction and resistance to sparse design, which is validated through finite sample simulation study. Theoretically, under appropriate regularity conditions, we prove 33 Shanghai Composite Index Shanghai Composite Index 40 150 20 100 0 50 −20 0 Drift Drift −40 −50 −60 Gamma LL Drift Estimator Gaussian LL 95% Confidence Band Gaussian LL 95% Confidence Band Gamma LL 95% Confidence Band Gamma LL 95% Confidence Band −80 −100 Gamma LL Drift Estimator Gaussian LL 95% Confidence Band Gaussian LL 95% Confidence Band Gamma LL 95% Confidence Band Gamma LL 95% Confidence Band −150 −100 −200 −120 −140 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 −250 0.9 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Ordered X Ordered X t t (a) Drift confidence band with hcv (b) Drift confidence band with hT Shanghai Composite Index Shanghai Composite Index 150 100 100 50 50 Volatility Volatility 150 0 0 Gamma LL Volatility Estimator Gaussian LL 95% Confidence Band Gaussian LL 95% Confidence Band Gamma LL 95% Confidence Band Gamma LL 95% Confidence Band −50 −100 0 0.1 Gamma LL Volatility Estimator Gaussian LL 95% Confidence Band Gaussian LL 95% Confidence Band Gamma LL 95% Confidence Band Gamma LL 95% Confidence Band −50 0.2 0.3 0.4 0.5 0.6 −100 0.7 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Ordered X Ordered X t t (c) Volatility confidence band with hcv (d) Volatility confidence band with hT Figure 15: 95% normal confidence intervals of the drift and volatility coefficients for Shanghai Composite Index (2014) based on Gamma kernels and Gaussian kernels using various bandwidths Shanghai Composite Index Shanghai Composite Index 4.5 6 4 5 3.5 4 Length Ratios Length Ratios 3 2.5 2 1.5 3 2 1 1 0.5 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.9 0 0.1 0.2 0.3 0.4 Ordered X 0.7 0.8 0.9 (b) Length Ratios for Drift with hT Shanghai Composite Index Shanghai Composite Index 14 14 12 12 10 10 8 8 Length Ratios Length Ratios 0.6 t (a) Length Ratios for Drift with hcv 6 4 6 4 2 0 0.5 Ordered X t 2 0 0.1 0.2 0.3 0.4 0.5 0.6 0 0.7 Ordered X 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Ordered X t t (c) Length Ratios for Volatility with hcv (d) Length Ratios for Volatility with hT Figure 16: The ratios between the lengths of normal confidence intervals of the drift and volatility coefficients based on Gaussian kernels and Gamma kernels for Shanghai Composite Index (2014) using various bandwidths that the estimators constructed with Gamma asymmetric kernels possess the consistency and asymptotic normality for large sample and verify the advantages such as bias reduction, robustness and shorter length of confidence band through simulation experiments for finite sample. 34 Empirically, the estimators are illustrated through stock index in China under five-minute high-frequency data and possess some advantages mentioned above. This means the second-order jump-diffusion model may be an alternative model to describe the dynamic of some financial data, especially to explain integrated economic phenomena that the current observation in empirical finance usually behaves as the cumulation of all past perturbations. References [1] Aı̈t-Sahalia, Y. and Park, J. Bandwidth selection and asymptotic properties of local nonparametric estimators in possibly nonstationary continuous-time models. Journal of Econometrics, (2016), 192, 119-138. [2] Bandi, F. and Nguyen, T. On the functional estimation of jump diffusion models. Journal of Econometrics, (2003), 116, 293-328. [3] Barndorff-Nielsen, O.E. and Shephard, N. Econometrics of testing for jumps in financial economics using bipower variation. Journal of Financial Econometrics, (2006), 4, 1-30. [4] Bouezmarni, T. and Scaillet, O. Consistency of asymmetric kernel density estimators and smoothed histograms with application to income data. Econometric Theory, (2005), 21, 390-412. [5] Campbell, J., Lo, A. and MacKinlay, A. The Econometrics of Financial Markets. Princeton University Press, Princeton, NJ, (1997). [6] Chapman, D. and Pearson, N. Is the short rate drift actually nonlinear ? Journal of Finance, (2000), 55, 355-388. [7] Chen, S. X. Beta kernel estimators for density functions. Computational Statistics and Data Analysis, (1999), 31, 131-145. [8] Chen, S. X. Probability density function estimation using Gamma kernels. Annals of the Institute of Statistical Mathematics, (2000), 52, 471-480. [9] Chen, S. X. Local linear smoothers using asymmetric kernels. Annals of the Institute of Statistical Mathematics, (2002), 54, 312-323. [10] Cont, R. and Tankov, P. Financial modeling with jump processes. Chapman and Hall/CRC (2004). [11] Chen, Y. and Zhang, L. Local linear estimation of second-order jumpdiffusion model. Communications in Statistics - Theory and Methods, (2015), 44, 3903-3920. [12] Ditlevsen, S. and Sørensen, M. Inference for observations of integrated diffusion processes. Scandinavian Journal of Statistics, (2004), 31, 417-429. 35 [13] Fan, J. and Gijbels, I. Data-driven bandwidth selection in local polynomial fitting: Variable bandwidth and spatial adaptation. Journal of the Royal Statistical Society: Series B, (1995), 57, 371-394. [14] Fan, J. and Gijbels, I. Local Polynomial Modeling and its Applications. Chapman and Hall, London, (1996). [15] Florens-Zmirou, D. Approximate discrete time schemes for statistics of diffusion processes. Statistics, (1989), 20, 547-557. [16] Gloter, A. Parameter estimation for a discret sampling of an integrated Ornstein-Uhlenbeck process. Statistics , (2001), 35, 225-243. [17] Gloter, A. Parameter estimation for a discretly observed integrated diffusion process. Scandinavian Journal of Statistics , (2006), 33, 83-104. [18] Gospodinovy, N. and Hirukawa, M. Nonparametric estimation of scalar diffusion processes of interest rates using asymmetric kernels. Journal of Empirical Finance, (2012), 19, 595-609. [19] Gouriéroux, C. and Monfort, A. Non-consistency of the Beta kernel estimator for recovery rate distribution. Journal of Empirical Finance, (2006), CREST. Discussion paper 2006-31. [20] Gugushvili, S. and Spereij, P. Parametric inference for stochastic differential equations: a smooth and match approach. Latin American Journal of Probability & Mathematical Statistics, (2012), 9, 609-635. [21] Hanif, M. Local linear estimation of jump-diffusion models by using asymmetric kernels. Stochastic Analysis and Applications, (2013), 31, 956-974. [22] Hanif, M. Nonparametric estimation of second-order diffusion equation by using asymmetric kernels. Communications in Statistics - Theory and Methods, (2015), 44, 1896-1910. [23] Hagmann, M. and Scaillet, O. Local multiplicative bias correction for asymmetric kernel density estimators. Journal of Econometrics, (2007), 141, 213-249. [24] Hirukawa, M. and Sakudo, M. Nonnegative bias reduction methods for density estimation using asymmetric kernels. Computational Statistics and Data Analysis, (2014), 75, 112-123. [25] Jacod, J. and Shiryaev, A. Limit Theorems for Stochastic Processes, 2nd ed. Grundlehren der Mathematischen Wissenschaften 288. Springer, Berlin, (2003). [26] Johannes, M.S. The economic and statistical role of jumps to interest rates. Journal of Finance, (2004), 59, 227-260. 36 [27] Jones, M. and Henderson, D. Kernel-type density estimation on the unit interval. Biometrika, (2007), 24, 977-984. [28] Kessler, M. Estimation of an ergodic diffusion from discrete observations. Scandinavian Journal of Statistics, (1997), 24, 211-229. [29] Kristensen, D. Nonparametric filtering of the realized spot volatility: a kernel-based approach. Econometric Theory, (2010), 26, 60-93. [30] Lin, Z. and Bai, Z. Probability Inequalities. Science Press, Beijing, (2010). [31] Lin, Z., Song, Y. and Yi, J. Local linear estimator for stochastic differential equations driven by α-stable Lévy motions. Science China Mathematics, (2014), 57, 609 - 626. [32] Mancini, C. and Renò, R. Threshold estimation of Markov models with jumps and interest rate modeling. Journal of Econometrics, (2011), 160, 77-92. [33] Nicolau, J. Nonparametric estimation of second-order stochastic differential equations. Econometric theory, (2007), 23, 880-898. [34] Nicolau, J. Modeling financial time series thriugh second-order stochastic differential equations. Statistics and Probability Letters, (2008), 78, 27002704. [35] Özden, E. and Ünal, G. Linearization of second-order jump-diffusion equations. International Journal of Dynamics and Control, (2013), 1, 6063. [36] Park, J. and Phillips, P. Nonlinear regressions with integrated time series. Econometrica, (2001), 69, 117-161. [37] Protter, P. Stochastic integration and differential equations, 2nd ed. Applications of Mathematics (New York) 21. Springer, Berlin, (2004). [38] Racine, J. Consistent cross-validatory model-selection for dependent data: hv-block cross-validation. Journal of Econometrics, (2000), 99, 39-61. [39] Rogers, L. and Williams, D. Diffusions, Markov processes and Martingales: Volume 2, Itô calculus, Cambridge University Press (2000). [40] Ruppert, D. and Wand, M. Multivariate locally weighted least squares regression. Annals of Statistics , (1994), 22, 1346-1370. [41] Seifert, B and Gasser, T. Finite sample variance of local polynomials: Analysis and solutions. Journal of the American Statistical Association , (1996), 91, 267-275. 37 [42] Shimizu, Y. and Yoshida, N. Estimation of parameters for diffusion processes with jumps from discrete observations. Statistical Inference for Stochastic Processes , (2006), 9, 227-277. [43] Song, Y. Nonparametric estimation for second-order jump-diffusion model in high frequency data. (2017), Accepted by Singapore Economic Reviews. [44] Song, Y. Variance reduction estimation for second-order diffusion model with jump using Gamma asymmetric kernels. (2017), Working Paper. [45] Song, Y., Lin, Z. and Wang, H. Re-weighted Nadaraya-Watson estimation of second-order jump-diffusion model. Journal of Statistical Planning and Inference, (2013), 143, 730-744. [46] Stanton, R. A nonparametric model of term structure dynamics and the market price of interest rate risk. Journal of Finance, (1997), 52, 19732002. [47] Wang, H. and Lin, Z. Local linear estimation of second-order diffusion models Comm. Statist. Theory Methods, (2011), 40, 394-407. [48] Wang H. and Zhou L. Bandwidth selection of nonparametric threshold estimator in jump-diffusion models. Computers & Mathematics with Applications, (2017), 73, 211-219. [49] Xu K. Empirical likelihood based inference for nonparametric recurrent diffusions. Journal of Econometrics, (2009), 153, 65-82. [50] Xu K. and Phillips, P. Tilted nonparametric estimation of volatility functions with empirical applications. Journal of Business & Economic Statistics, (2011), 29, 518-528. 7 Proofs 7.1 Procedure for Assumption 3 Notice that the expectation with respect to the distribution of ξn,i depends en,i because ξn,i is a convex linear on the stationary densities of Xn,i and X e . combination of Xn,i and X   n,i′ For the case (i): E |hK (X(i−1)∆n )| < ∞. For KG(x/h+1,h) (u), its first  x/h−1   x/h ′ exp(−u/h) 1 u order derivative has the form of KG(x/h+1,h) (u) = hx uhx/h+1exp(−u/h) − h hx/h+1 Γ(x/h+1) := Γ(x/h+1) + h1 K2 (u). Then using the well-known properties of the Γ function, the mean of Gamma distribution and the derivative of the function gp(x) := 1 h K1 (u) 38 g(x) · p(x) for stationary process Xt , we have = = = = = =   ′ E |hK (X(i−1)∆n )g(X(i−1)∆n )|     E |K1 (X(i−1)∆n )g(X(i−1)∆n )| + E |K2 (X(i−1)∆n )g(X(i−1)∆n )| Z ∞ x/h−1 hx/h Γ(x/h) y exp(−y/h) x x/h+1 gp(y)dy x/h h Γ(x/h + 1) 0 h Γ(x/h) Z ∞ x/h y exp(−y/h) gp(y)dy + x/h+1 h Γ(x/h + 1) 0 Z ∞ x/h−1 Z ∞ x/h y exp(−y/h) y exp(−y/h) gp(y)dy + gp(y)dy x/h Γ(x/h) x/h+1 Γ(x/h + 1) h h 0 0 E[gp(ξ1 )] + E[gp(ξ2 )] E[gp(E(ξ1 ) + ξ1 − E(ξ1 ))] + E[gp(E(ξ2 ) + ξ2 − E(ξ2 ))] 2gp(x) + O(h) < ∞, D D where ξ1 = G(x/h, h), ξ2 = G(x/h + 1, h) and G denotes the Gamma distribution. For case (ii):     the 2 ′2 )| ≤ 2E |K12 (X(i−1)∆n )g(X(i−1)∆n )| + E |h K (X(i−1)∆n )g(X(i−1)∆ n   2E |K22 (X(i−1)∆n )g(X(i−1)∆n )| . Now we only deal with the first part (the second part can be dealt with in the similar way). Note that K1 (u) = ux/h−1 exp(−u/h) hx/h Γ(x/h) D ξ1 = G(x/h, h). density function for a random variable D Γ function, we have with ηx = G(2x/h − 1, h),   E |K12 (X(i−1)∆n )g(X(i−1)∆n )| = Bb (x)E[gp(ηx )] = ≈ where Bb (x) = can be considered as a By the property of the Bb (x)E[gp(E(ξ1 ) + ξ1 − E(ξ1 ))] = Bb (x)gp(x) n √1 h−1/2 x−1/2 if x/b → ∞ (“interior x′′ ); gp(x) 2 −1π Γ(2κ−1) h 22κ−1 Γ2 (κ) if x/b → κ (“boundary x′′ ), h−1 Γ(2x/h−1) 22x/b−1 Γ2 (x/h+1) and the last equation follows from Chen ([8],   ′ P474). Hence, the results of limh→0 h1/2 E |h2 K 2 (ξn,i )g(ξn,i )| < ∞ for “inte 2 ′2  rior x” and limh→0 hE |h K (ξn,i )g(ξn,i )| < ∞ for “boundary x” hold. 7.2 Some Technical Lemmas with Proofs 2 ∂ ∂ , ∂x2j := ∂x We lay out some notations. For x = (x1 , · · ·, xd ), ∂xj := ∂x 2, j j  2 ∂x2i xj := ∂x∂i ∂xj , ∂x := (∂x1 , · · ·, ∂xd )∗ , and ∂x2 = ∂x2i xj 1≤i,j≤d , where ∗ stands for the transpose. 39 Lemma 1 (Shimizu and Yoshida [42]) Let Z be a d-dimensional solution-process to the stochastic differential equation Z t Z t Z tZ Zt = Z0 + µ(Zs− )ds + σ(Zs− )dWs + c(Zs− , z)r(ω, dt, dz), 0 0 0 E d where Z0 is a random variable, E = R \{0}, µ(x), c(x, z) are d-dimensional vectors defined on Rd , Rd × E respectively, σ(x) is a d × d diagnonal matrix defined on Rd , and Wt is a d-dimensional vector of independent Brownian motions. Let g be a C 2(l+1) -class function whose derivatives up to 2(l + 1)th are of polynomial growth. Assume that the coefficients µ(x), σ(x), and c(x, z) are C 2l class function whose derivatives with respective to x up to 2lth are of polynomial growth. Under Assumption 5, the following expansion holds E[g(Zt )|Fs ] = l X Lj g(Zs ) j=0 ∆jn + R, j! (23) R∆ Ru Ru for t > s and ∆n = t−s, where R = 0 n 0 1 · · · 0 l E[Ll+1 g(Zs+ul+1 )|Fs ]du1 . . . dul+1 1 2 ∗ ∗ ∆l+1 n , Lg(x) = ∂x g(x)µ(x)+ 2 tr[∂x g(x)σ(x)σ (x)]+ Ris a stochastic function of order ∗ {g(x + c(x, z)) − g(x) − ∂ g(x)c(x, z)}f (z)dz. x E Remark 13 Consider a particularly important model:  dYt = Xt− dt, R dXt = µ(Xt− )dt + σ(Xt− )dWt + E c(Xt− , z)r(w, dt, dz). As d = 2, we have Lg(x, y) = x(∂g/∂y) + µ(x)(∂g/∂x) + 21 σ 2 (x)(∂ 2 g/∂x2 ) R ∂g + E {g(x + c(x, z), y) − g(x, y) − ∂x · c(x, z)}f (z)dz. (24) Based on the second-order infinitesimal operator (24), we can calculate many ei∆n , for instance (7) and (8) which promathematical expectations involving X vide the basis for estimators (9) and (10). Lemma 2 Under Assumption 1, 2 and 5, let Pn Xi −Xi−1 ∗ ) i=1 wi−1 ( ∆n ∗ Pn µn (x) = ∗ i=1 wi−1 and Mn∗ (x) = Pn 2 i=1 where wi∗ = ∗ (Xi −Xi−1 ) wi−1 ∆n Pn . ∗ w i=1 i−1 n X KG(x/h+1,h) (Xj−1 )(Xj−1 − x)2 KG(x/h+1,h)(Xi )( j=1 −(Xi − x) n X j=1 KG(x/h+1,h)(Xj−1 )(Xj−1 − x)) 40 then p p µ∗n (x) → µ(x), Mn∗ (x) → M (x). Furthermore, for “interior x”, if h = O((n∆n )−2/5 ), then  p  d  M (x) , n∆n h1/2 µ∗n (x) − µ(x) − hBµ∗n (x) → N 0, √ 1/2 2 πx p(x) R 4 p  d  c (x, z)f (z)dz  , n∆n h1/2 Mn∗ (x) − M (x) − hBMn∗ (x) → N 0, E √ 1/2 2 πx p(x) for “boundary x”, if h = O((n∆n )−1/5 ), then M (x)Γ(2κ + 1)  , 22κ+1 Γ2 (κ + 1)p(x) R 4 p  d  c (x, z)f (z)dzΓ(2κ + 1)  ′ n∆n h Mn∗ (x) − M (x) − h2 BMn∗ (x) → N 0, E 2κ+1 2 , 2 Γ (κ + 1)p(x) p  d  ′ n∆n h µ∗n (x) − µ(x) − h2 Bµ∗n (x) → N 0, ′ ′ where Bµ∗n (x) , Bµ∗ (x) , BMn∗ (x) , BM ∗ (x) denotes the bias of the estimators of n n µ∗n (x), Mn∗ (x), respectively, that is x ′′ µ (x), 2 x ′′ = M (x), 2 Bµ∗n (x) = BMn∗ (x) ′ Bµ∗n (x) = ′ BMn∗ (x) ′′ 1 (2 + κ)µ (x) 2 ′′ 1 = (2 + κ)M (x). 2 Remark 14 This lemma considered the asymptotic properties of the local linear estimation for stationary jump-diffusion model (1) using Gamma asymmetric kernels, which is different from that in Hanif [21]. After carefully sketching the paper of Hanif [21], we found that the part Sn,k LL ∗ of the weight or (2.9) in Hanif P [21] should be Pn ωi (x, b) (that is wi here) in (2.8) Sn,k = i=1 KG(x/b+1,b) (Xi∆n,T )·(Xi∆n,T −x)k , not Sn,k = ni=1 KG(x/b+1,b) (Xi∆n,T )· (Xi∆n,T )k . So in the detailed proof of Lemma 4, Theorem 1 and Theorem 2 in Hanif [21], we should consider KG(x/b+1,b) (Xi∆n,T )·(Xi∆n,T −x)k and KG(x/b+1,b) (Xs− )· (Xs− − x)k , not KG(x/b+1,b) (Xi∆n,T ) · (Xi∆n,T )k or KG(x/b+1,b) (Xs− ) · (Xs− )k . According to the similar approach as Chen [9], we will give a modified proof to the stationary results of Lemma 4, Theorem 1 and Theorem 2 in Hanif [21]. Hence, the central limit theorems of µ∗n (x) and Mn∗ (x) are different from those in Hanif [21] for the stationary case. Proof. For convenience, we still use the same notations as that in Hanif [21]. The LL part or (2.9) in Hanif Pn [21] should be Sn,k = Pn Sn,k of the weight ωi (x, b) in (2.8) k −x) , not S = )·(X K (X n,k i∆ i∆ G(x/b+1,b) n,T n,T i=1 KG(x/b+1,b) (Xi∆n,T )· i=1 (Xi∆n,T )k . So in the detailed proof of Lemma 4, Theorem 1 and Theorem 2 in Hanif [21], we should consider KG(x/b+1,b) (Xi∆n,T ) · (Xi∆n,T − x)k and KG(x/b+1,b) (Xs− )·(Xs− −x)k , not KG(x/b+1,b) (Xi∆n,T )·(Xi∆n,T )k or KG(x/b+1,b) (Xs− )· (Xs− )k . 41 The key point of the detailed proof for stationary case of Lemma 4 in Hanif [21] is = = = Z 1 T d[X]cs KG(x/b+1,b) (Xs− )(Xs− − x)k 2 T 0 σ (Xs− ) Z ∞ 1 LX (T, a) da KG(x/b+1,b) (a)(a − x)k T 0 σ 2 (a) Z ∞ L̄X (T, a) KG(x/b+1,b) (a)(a − x)k da T 0 Z ∞ KG(x/b+1,b) (a)(a − x)k p(a)da 0 = E[(ξ − x)k p(ξ)] := αk (x), D where k = 0, 1, 2, ξ = G(x/h + 1, h) and G denotes the Gamma distribution. According to the result (A.1) and (A.2) in Chen ([9], P321), it can be shown that 2−k X p(j) (x)E(ξ − x)j+k /j! + op {E(ξ − x)2 }. αk (x) = j=0 As ξ is the G(x/h+1, h) random variable, E(ξ −x) = hn , E(ξ −x)2 = xhn +2h2n and E(ξ − x)l = O(h2n ) for 3 ≤ l. Thus, we can deduce p(2) (x) [xhn + 2h2n ] + op (h2n ), 2 α1 (x) = p(x)hn + p(1) (x)[xhn + 2h2n ] + op (h2n ), α0 (x) = p(x) + p(1) (x)hn + α2 (x) = p(x)[xhn + 2h2n ] op (h2n ). + (25) (26) (27) 1 Firstly, we calculate the bias A22 for M̂LL (x, b) − M 1 (x) in Hanif ([21], P966). We write A22 as (4.6) in Hanif ([21], P966) A22 = = = Pn i=1 Pn ∗ wi−1 ( Xi −Xi−1 − µ(x)) Pn ∆n∗ i=1 wi−1 i=1 [Sn,2 1 n2 Pn − Sn,1 · (Xi∆n,T − x)]KG(x/b+1,b) (Xi∆n,T )∆n,T (µ(Xi∆n,T ) − µ(x)) + oa.s. (1) 2 ) ∆n,T (Sn,0 · Sn,2 − Sn,1 i=1 [Sn,2 − Sn,1 · (Xi∆n,T − x)]KG(x/b+1,b) (Xi∆n,T )(µ(Xi∆n,T ) − µ(x)) + oa.s. (1) , 1 2 n2 (Sn,0 · Sn,2 − Sn,1 ) Pn where Sn,k = i=1 KG(x/b+1,b) (Xi∆n,T ) · (Xi∆n,T − x)k . Substituting results (25) - (27) to the denominator of A22 , we may derive ADen = α0 (x) · α2 (x) − α21 (x) = p2 (x)[xhn + 2h2n ] + o(h2n ). 22 42 Taylor expanding µ(Xi∆n,T ) at x for the numerator of A22 , um AN 22 n 1 X [Sn,2 − Sn,1 · (Xi∆n,T − x)]KG(x/b+1,b) (Xi∆n,T )(µ(Xi∆n,T ) − µ(x)) n2 i=1 = n  ′ 1 X ) µ (x)(Xi∆n,T − x) − x)]K (X [S − S · (X i∆n,T n,2 n,1 i∆n,T G(x/b+1,b) n2 i=1  1 ′′ 1 ′′′ + µ (Xi∆n,T )(Xi∆n,T − x)2 + µ (ζn,i )(Xi∆n,T − x)3 2 6 n  1 ′′ X 1 [Sn,2 − Sn,1 · (Xi∆n,T − x)]KG(x/b+1,b) (Xi∆n,T ) µ (Xi∆n,T )(Xi∆n,T − x)2 2 n i=1 2  1 ′′′ + µ (ζn,i )(Xi∆n,T − x)3 6 = = by virtue of the fact that n X i=1 = n X i=1 − = 0, ωi∗ × (Xi − x) n X   KG(x/h+1,h) Xj−1 (Xj−1 − x)2 KG(x/h+1,h) Xi (Xi − x) × j=1 n X KG(x/h+1,h) n X   KG(x/h+1,h) Xj−1 (Xj−1 − x) Xi (Xi − x)2 × j=1 i=1 where ζn,i = θx + (1 − θ)Xi∆n,T . With KG(x/b+1,b) (·)g(·)(· − x)k instead of KG(x/b+1,b) (·)(· − x)k in Lemma 4 of Hanif [21], we can similarly deduce n 1X P KG(x/b+1,b) (Xi∆n,T )g(Xi∆n,T )(Xi∆n,T −x)k → E[g(ξ)(ξ−x)k p(ξ)] := βk (x), n i=1 D where k = 0, 1, 2, ξ = G(x/h + 1, h), G denotes the Gamma distribution and ′′ g(·) = 12 µ (·). According to the result (A.1) and (A.3) in Chen ([9], P321), it can be shown that with r(x) = g(x) · p(x) βk (x) = 2−k X j=0 r(j) (x)E(ξ − x)j+k /j! + op {E(ξ − x)2 }. As ξ is the G(x/h+1, h) random variable, E(ξ −x) = hn , E(ξ −x)2 = xhn +2h2n 43 and E(ξ − x)l = O(h2n ) for 3 ≤ l. Thus, we can deduce r(2) (x) [xhn + 2h2n ] + op (h2n ), 2 β1 (x) = r(x)hn + r(1) (x)[xhn + 2h2n ] + op (h2n ), β0 (x) = r(x) + r(1) (x)hn + β2 (x) = r(x)[xhn + β3 (x) = 2h2n ] + op (h2n ), O(h2n ). (28) (29) (30) (31) Substituting results (28) - (31) to the numerator of A22 , we may derive um AN = α2 (x) · β2 (x) − α1 (x) · β3 (x) = 22 1 ′′ µ (x) · p2 (x)[xhn + 2h2n ]2 + o(h2n ). 2 1 So the bias for M̂LL (x, b) − M 1 (x) in Hanif ([21], P966) is A22 = um AN 22 Den A22 = 1 ′′ 2 2 2 2 2 µ (x) · p (x)[xhn + 2hn ] + o(hn ) p2 (x)[xhn + 2h2n ] + o(h2n ) 1 ′′ µ (x)[xhn + 2h2n ] + o(h2n ) 2 n x ′′ ′′ n + o(hn ) if x/b → ∞ (“interior x ); 2 µ (x)h = 2 1 ′′ hn [ 2 µ (x)(2 + κ)] if x/b → κ (“boundary x′′ ) = Secondly, we calculate two parts [B22 , B22 ] and [C22 , C22 ] related to the vari1 ance of the asymptotic normality for M̂LL (x, b) − M 1 (x) in Hanif ([21], P966). [B22 , B22 ] R (i+1)∆n,T 2 Pn 2 2 σ (Xs− )ds i=1 [∆n,T Sn,2 − ∆n,T Sn,1 · (Xi∆n,T − x)] KG(x/b+1,b) (Xi∆n,T ) i∆n,T = 2  2 ) ∆2n,T (Sn,0 · Sn,2 − Sn,1 Pn 2 2 2 i=1 [∆n,T Sn,2 − ∆n,T Sn,1 · (Xi∆n,T − x)] KG(x/b+1,b) (Xi∆n,T )∆n,T σ (Xi∆n,T ) + oa.s. (1) = .  2 2 ) ∆2n,T (Sn,0 · Sn,2 − Sn,1 Due to ADen 22 , we have [B22 , B22 ]Den = p4 (x)[xhn + 2h2n ]2 + o(h4n ). As for [B22 , B22 ]N um , we have [B22 , B22 ]N um n X 2 [∆2n,T Sn,2 − 2∆2n,T Sn,2 Sn,1 · (Xi∆n,T − x) = i=1 2 2 (Xi∆n,T )∆n,T σ 2 (Xi∆n,T ) · (Xi∆n,T − x)2 ]KG(x/b+1,b) +∆2n,T Sn,1 um um um + [B22 , B22 ]N + [B22 , B22 ]N . = [B22 , B22 ]N 3 1 2 44 According to (25) - (31) with g(·) = σ 2 (·) and Ahn (x) in Chen ([8], P474), it um can be shown that [B22 , B22 ]N is larger than the others (which has the lowest 1 infinitesimal order). Under the similar calculus as β0 (x), the dominant one has the following expression um [B22 , B22 ]N = Ahn (x)σ 2 (x)p3 (x)[xhn + 2h2n ]2 + o(h4n ). 1 Hence, we get [B22 , B22 ] = Ahn (x)σ 2 (x)p3 (x)[xhn + 2h2n ]2 + o(h4n ) σ 2 (x) (x) = A . h n p4 (x)[xhn + 2h2n ]2 + o(h4n ) p(x) Similarly, we can prove [C22 , C22 ] = Ahn (x) R E c2 (x, z)f (z)dz . p(x) 1 So the variance of the asymptotic normality for M̂LL (x, b) − M 1 (x) in Hanif ([21], P966) should be Ahn (x) M(x) p(x) . The modified proof of Theorem 2 in Hanif [21] is similar to that of Theorem 1, so we omit it. One can refer to Song [44] for similar procedure. 7.3 The proof of Theorem 1 Proof. Here we only prove the first result; the second is analogical. By Lemma 2, it suffice to show that : p µ̂n (x) − µ∗n (x) → 0. Firstly, we prove that n n 1 X ∗ 1 X p wi−1 − 2 w → 0. n2 i=1 n i=1 i−1 (32) To this end, we should prove that n n 1X 1X p K(X̃i−1 ) − K(Xi−1 ) → 0, n i=1 n i=1 n n 1X 1X p K(X̃i−1 )(X̃i−1 − x) − K(Xi−1 )(Xi−1 − x) → 0, n i=1 n i=1 n (33) (34) n 1X 1X p K(X̃i−1 )(X̃i − x)2 − K(Xi−1 )(Xi−1 − x)2 → 0. n i=1 n i=1 45 (35) For (33), let ε1,n = 1 n Pn i=1   e(i−1)∆ − 1 Pn KG(x/h+1,h) X(i−1)∆ . KG(x/h+1,h) X n n i=1 n e(i−1)∆ − X(i−1)∆ max X n n 1≤i≤n ≤ ≤ = 1 1≤i≤n ∆n max max Z (i−1)∆n (i−2)∆n (Xs− − X(i−1)∆n )ds sup 1≤i≤n (i−2)∆n ≤s≤(i−1)∆n p Oa.s. ( ∆n log(1/∆n )), Xs− − X(i−1)∆n (36) the last asymptotic equation for the order of magnitude, one can refer Bandi and Nguyen ([2], equations 94 and 95). By the mean-value theorem, stationarity, Assumptions 3, 5 and (36), we obtain n  1X ′ e(i−1)∆ − X(i−1)∆ |] |K (ξn,i ) X n n n i=1  ′ e∆n − X∆n |] = E[|K (ξn,2 ) X p ′ ≤ ∆n log(1/∆n )E[|K (ξn,2 )|] p ′ ∆n log(1/∆n ) E[|hK (ξn,2 )|] → 0, = h E[|ε1,n |] ≤ E[ e ∆n 0 ≤ θ ≤ 1. Hence, (33) follows from Chebyshev’s where ξn,2 = θX∆n +(1−θ)X inequality. For (34) we should prove that n δ1,n = n 1X 1X p K(X̃i−1 )(X̃i − x) − K(Xi−1 )(X̃i − x) → 0, n i=1 n i=1 (37) and n δ2,n = n 1X 1X p K(Xi−1 )(X̃i − x) − K(Xi−1 )(Xi−1 − x) → 0. n i=1 n i=1 Under Assumption 3 and 5, we have n E[δ1,n ] = = 1 X K(X̃i−1 ) − K(Xi−1 ) (X̃i − x)] n i=1  E[ K(X̃i−1 ) − K(Xi−1 ) E[X̃i − x Fi−1 ]] E[ |E[K ′ (ξn,i )(Xi−1 − X̃i−1 )(Xi−1 − x + OP (∆n ))]| p ≤ ∆n log(1/∆n )E[|K ′ (ξn,i )(Xi−1 − x + OP (∆n ))|] p ∆n log(1/∆n ) E[|hn K ′ (ξn,i )(Xi−1 − x + OP (∆n ))|] = hn → 0, = 46 (38) by stationarity, the mean-value theorem and Remark 13. So E[δ1,n ] → 0. If we can prove V ar[δ1,n ] → 0, then (37) holds. Now we calculate V ar[δ1,n ] n V ar[δ1,n ] = ′ 1 1 Xp ei−1 − Xi−1 )(X ei − x)] hn K (ξn,i )(X V ar[ √ nhn n i=1 n =: 1 X 1 fi ]. V ar[ √ nhn n i=1 √ ′ ei−1 − Xi−1 )(X ei − x). where fi := hn K (ξn,i )(X By Remark 13 and Assumption 3 and 5, we get   ′ ei−1 − Xi−1 )2 E[(X ei − x)2 |Fi−1 ] E[fi2 ] = E hn K 2 (ξn,i )(X  ∆n log(1/∆n )  2 ′ 2 E hn K (ξn,i )((Xi − x)2 + Op (∆n )) ≤ hn h i ′ 1/2 1 E h2n K 2 (ξn,i )((Xi − x)2 + Op (∆n )) 1/2 · hn hn  ∆n log(1/∆n ) n if x/bh → ∞ : “interior x′′ ; i = ′ 1 2 2 2 hn hn · hn E hn K (ξn,i )((Xi − x) + Op (∆n )) if x/b → κ : “boundary x′′ ≈ C n ∆n log(1/∆n ) 3/2 hn ∆n log(1/∆n ) h2n < ∞ if x/b → ∞ (“interior x′′ ); if x/b → κ (“boundary x′′ ) We notice that fi is stationary under Assumption 2 and ρ-mixing with the same size as process {X̃i∆n ; i = 1, 2, ...} and {Xi∆n ; i = 1, 2, ...}. So from Lemma 10.1.c with p=q=2 in Lin and Bai([30], p. 132), we have n 1 X fi ] V ar[ √ n i=1 = n−1 n n X X 1 X (Efi fj − Efi Efj )] V ar(fi ) + 2 [ n i=1 j=1 i=j+1 n−1 n 2 X X = V ar(fi ) + (Efi fj − Efi Efj )] n j=1 i=j+1 n−1 n  2X X ≤ V ar(fi ) + Efi fj − Efi Efj n j=1 i=j+1 n−1 n 8X X 1 1 ≤ V ar(fi ) + ρ((i − j)∆n )(Efi2 ) 2 (Efj2 ) 2 n j=1 i=j+1 n−1 n 8X X = V ar(fi ) + ρ((i − j)∆n )Efi2 n j=1 i=j+1 We have proved Efi2 < ∞ above, so the first part in the last equality V ar(fi ) < 47 Pn ∞. Moreover, under Assumption 2, we have j=i+1 ρ((j − i)∆n ) = O( ∆1α ). So n → ∞. V ar(δ1,n ) = nhn1∆α → 0 as nhn ∆1+α n n Similar to the proof of (37), we prove (38) by verifying E[δ2,n ] → 0 and V ar[δ2,n ] → 0. From the stationarity, Remark 13 and Assumptions 3 and 5, we have    ei − Xi−1 |Fi−1 E[δ2,n ] = E K(Xi−1 )E X   = ∆n E K(Xi−1 )µ(Xi−1 ) + O(∆2n ) → 0. and V ar[δ2,n ] = n p  1 X  1 ∆n ei − Xi−1 ) hn K(Xi−1 ) √ (X V ar √ nhn n i=1 ∆n n =: 1 X ∆n gi ], V ar[ √ nhn n i=1 where   E gi2 = = ≈ < ei − Xi−1 )2   (X  E hn K 2 (Xi−1 )E |Fi−1 ∆n Z  1  2 2 E hn K (Xi−1 ) σ (Xi−1 ) + c2 (Xi−1 , z)f (z)dz 3 E n 1/2 O(hn ) if x/b → ∞ (“interior x′′ ); O(1) if x/b → κ (“boundary x′′ ) ∞. by the Remark 13 and Assumption 1, 3. Hence, V ar[δ2,n ] = O( under Assumption 5. The proof of (35) is similar to that of (34), so we omit it. Secondly, we prove δn := ∆1−α n nhn ) n n ei+1 − X ei 1 X X 1 X ∗ Xi − Xi−1 p w w − → 0. i−1 n2 i=1 ∆n n2 i=1 i−1 ∆n → 0 (39) which suffice to prove n n ei+1 − X ei 1 X ∗ Xi − Xi−1 p 1 X ∗ X w w − → 0, n2 i=1 i−1 ∆n n2 i=1 i−1 ∆n and n n ei+1 − X ei p ei+1 − X ei X 1 X ∗ X 1 X w wi−1 − → 0. i−1 2 2 n i=1 ∆n n i=1 ∆n (40) (41) For (40), we need only prove δ3,n = n hX ei+1 − X ei 1X Xi − Xi−1 i p K(Xi−1 ) − → 0, n i=1 ∆n ∆n 48 (42) and δ4,n = n hX ei+1 − X ei Xi − Xi−1 i p 1X K(Xi−1 )(Xi−1 − x) − → 0. n i=1 ∆n ∆n (43) the proof of (42) and (43) are similar, so we just prove (43) By Lemma 13, we can get h (X i ei+1 − X ei ) (Xi − Xi−1 )  E[ε1,n ] := E − Fi−1 ∆n ∆n o i n h (X ei+1 − X ei ) (Xi − Xi−1 )  − Fi Fi−1 = E E ∆n ∆n ′ ′′ ∆n n 1 2 = µ(Xi−1 )µ (Xi−1 ) + σ (Xi−1 )µ (Xi−1 ) 2Z 2 o  ′ µ(Xi−1 + c(Xi−1 , z)) − µ(Xi−1 ) − µ (Xi−1 ) · c(Xi−1 , z) f (z)dz , + E so by stationarity and assumption 3, we have io n h  (X ei+1 − X ei ) (Xi − Xi−1 )  E[δ4,n (x)] = E E K(Xi−1 )(Xi−1 − x) |Fi−1 − ∆n ∆n  ′ ′′ ∆n h 1 = E K(Xi−1 )(Xi−1 − x) µ(Xi−1 )µ (Xi−1 ) + σ 2 (Xi−1 )µ (Xi−1 ) 2Z 2 i  ′ µ(Xi−1 + c(Xi−1 , z)) − µ(Xi−1 ) − µ (Xi−1 ) · c(Xi−1 , z) f (z)dz + E = O(∆n ) and = V ar[δ4,n (x)] n h 1 X  (X ei+1 − X ei ) (Xi∆n − Xi−1 ) i p 1 ∆ h1/2 K(X ) V ar √ − (X − x) i−1 n i−1 nhn ∆n n i=1 n ∆n ∆n h 1 X i 1 gi . V ar √ nhn ∆n n i=1 n =: By the similar analysis as above, we can easily obtains V ar[δ4,n (x)] → 0 under Assumption 2 if E[gi2 ] < ∞. In fact by Assumption 1, 3 and 4, we have  (X h ei+1 − X ei ) (Xi − Xi−1 ) 2 i − E[gi2 ] = E hn K 2 (Xi−1 )∆n (Xi−1 − x)2 ∆n ∆n n h  X̃ 2 io − X̃ X i+1 i i − Xi−1 = E hn K 2 (Xi−1 )(Xi−1 − x)2 E ∆n − |Fi−1 ∆n ∆n Z io h n 2 c2 (Xi−1 , z)f (z)dz + OP (∆n ) = E hn K 2 (Xi−1 )(Xi−1 − x)2 × σ 2 (Xi−1 ) + 3 E n 1/2 O(hn ) if x/b → ∞ (“interior x′′ ); ≈ O(1) if x/b → κ (“boundary x′′ ) < ∞. 49 The proof of (4.10) is similar to that of (41). Combination (32) and (39), the p p relationship µ∗n (x) − µ̂n (x) → 0 holds, so by Lemma 13 we have µ̂n (x) → µ(x). 7.4 The proof of Theorem 2 Proof. Here we only prove the result for µ(x); the other is analogical. By Lemma 2, for “interior x”, if h = O((n∆n )−2/5 ), then Un∗ (x) :=  p  d  M (x) , n∆n h1/2 µ∗n (x) − µ(x) − hBµ∗n (x) → N 0, √ 1/2 2 πx p(x) for “boundary x”, if h = O((n∆n )−1/5 ), then Un∗ (x) := p  d  ′ n∆n h µ∗n (x) − µ(x) − h2 Bµ∗n (x) → N 0, M (x)Γ(2κ + 1)  , + 1)p(x) 22κ+1 Γ2 (κ ′ where Bµ∗n (x) , Bµ∗ (x) denotes the bias of the estimators of µ∗n (x), respectively, n that is ′ ′′ 1 x ′′ Bµ∗n (x) = (2 + κ)µ (x). Bµ∗n (x) = µ (x), 2 2 So by the asymptotic equivalence theorem, it suffices to prove that p p Ûn (x) − Un∗ (x) = hn n∆n (µ̂n,T (x) − µ∗n,T (x)) → 0,  √ √ where Ûn (x) := n∆n h µ̂n (x) − µ(x) − h2 Bµ̂n (x) or n∆n h µ̂n (x) − µ(x) −  ′ h2 Bµ̂n (x) . In fact, from the proof of Theorem 1 such as (32) and (39), we know that Ûn (x) − Un∗ (x) p = hn n∆n (µ̂n,T (x) − µ∗n,T (x)) e e  P   Pn ei ei  n Xi+1 −X Xi+1 −X w w p i−1 i−1 i=1 i=1 ∆n ∆n δn  Pn Pn + hn n∆n  1 Pn − = ∗ ∗ w w w i=1 i−1 i=1 i−1 i=1 i−1 n2 ! p δn = + op (1). hn n∆n 1 Pn ∗ i=1 wi−1 n2 Due to the stationary case of Lemma 3 in Hanif [21], we have n 1X p K(Xi−1 ) → p(x). n i=1 50 (44) We first write n 1X K(Xi−1 )(Xi−1 − x) n i=1 = := n n n  1X  1X  1X  E K(Xi−1 )(Xi−1 − x) + K(Xi−1 )(Xi−1 − x) − E K(Xi−1 )(Xi−1 − x) n i=1 n i=1 n i=1 n n  1X 1X  E K(Xi−1 )(Xi−1 − x) + ηi−1 . n i=1 n i=1 According to the result (A.2) in Chen ([9], P321), it is shown that n  1X  E K(Xi−1 )(Xi−1 − x) n i=1 ′ = p(x)E(ξ − x) + p (x)E(ξ − x)2 + op (E(ξ − x)2 ) ′ = p(x)hn + p (x)hn (x + 2hn ) + op (hn ), D where ξ = G(x/h + 1, h) and G denotes the Gamma distribution. With the same procedure details of Lemma 3.3 in Lin, Song and Pnas the proof a.s. Yi [31], we can prove n1 i=1 ηi−1 → 0. Hence, we get n ′ 1X p K(Xi−1 )(Xi−1 − x) → p(x)hn + p (x)hn (x + 2hn ). n i=1 (45) In the similar procedure, we can obtain n 1X p K(Xi−1 )(Xi−1 − x)2 → p(x)hn (x + 2hn ). n i=1 (46) According the results of (44) - (46), we have n 1 X ∗ w n2 i=1 i−1 = = p   n n n X X 1 X K(Xj−1 )(Xj−1 − x) K(Xj−1 )(Xj−1 − x)2 − (Xi−1 − x) K(Xi−1 )  n2 i=1 j=1 j=1 n n X 1 1 X K(Xj−1 )(Xj−1 − x)2 − 2 K(X ) i−1 2 n i=1 n j=1 ′ → hn p2 (x) · (x + 2hn ) + h2n [p(x) + p (x) · x]2 = hn p2 (x) · x + op (hn ). Hence, Ûn (x) − Un∗ (x) = by assumption 5. n X i=1 K(Xi−1 )(Xi−1 − x) ∆  p p n hn n∆n Op →0 hn 51 !2
10math.ST
Multi-camera Multi-object Tracking arXiv:1709.07065v1 [cs.CV] 20 Sep 2017 Wenqian Liu Northeastern University [email protected] Octavia Camps Northeastern University [email protected] Mario Sznaier Northeastern University [email protected] Abstract In this paper, we propose a pipeline for multi-target visual tracking under multi-camera system. For multi-camera system tracking problem, efficient data association across cameras, and at the same time, across frames becomes more important than single-camera system tracking. However, most of the multi-camera tracking algorithms emphasis on single camera across frame data association. Thus in our work, we model our tracking problem as a global graph, and adopt Generalized Maximum Multi Clique optimization problem as our core algorithm to take both across frame and across camera data correlation into account all together. Furthermore, in order to compute good similarity scores as the input of our graph model, we extract both appearance and dynamic motion similarities. For appearance feature, Local Maximal Occurrence Representation(LOMO) feature extraction algorithm for ReID is conducted. When it comes to capturing the dynamic information, we build Hankel matrix for each tracklet of target and apply rank estimation with Iterative Hankel Total Least Squares(IHTLS) algorithm to it. We evaluate our tracker on the challenging Terrace Sequences from EPFL CVLAB as well as recently published Duke MTMC dataset. Figure 1. Example of how we forming our tracking problem as glabal maximum clique problem. Given the boundingboxes of each target of each frame, our problem is to find cliques that stitch the same target from different frames(from the same camera or different camera) based on their appearance and motion similarities. For example, the three green boundingboxes detected for as a lady in red walking towards left on the very left hand side in the frames, are picked up and stitch together as a final tracklet of that lady. identification. By looking at different detections of the same person maybe from different camera, reID algorithms need to extract representative features of the target and recognize it whenever the same target appears. In our paper, we are cracking a multi-camera scenario multi-target tracking problem by adopting relative algorithms from reID as well as useful control system tools. We aim to solve this problem in a offline first, and later on if possible, extend it into real time tracking system. When given boundingboxes for all the targets within one video sequence, our algorithm forms a maximum clique problem based on graph theory to take all information from input into consideration. A mixed-binary linear optimization program is chosen in computing tracking result. We test our algorithm on two datasets: EPFL Terrace Sequence and Duke MTMC. The reason we choose these two datasets is because the former one represents scenario when overlap exists across cameras, while the latter represents when no overlap or only a little overlap exists. As shown in figure 1, the example is explaining clearer how we relate the global maximum cliques problem to a multi-camera multi-target tracking problem. 1. Introduction Stated back to 2009, after severe terror attack in New York, people decoded to produce more efficient way to detect terrorist. With the introduction of surveillance cameras into daily life, polices are able to monitor society security by looking at a computer screen. Researches aim to propose useful algorithms and tools to support human detecting suspicious target, recognize required target, and even tracking the target. Nowadays, as high quality high frame rate surveillance cameras being widely used, much more efficient methods that yield higher accuracy are needed. Within a decade, plenty of well defined detectors and trackers with competitive performance are proposed. However, most of them are focusing on single camera scenario. Another popular topic for multi-camera scenario is person re1 The rest of the paper will be presented as follows. In the second section, a related literature research will be introduced. Followed by the third section that we will mainly focus on showing our proposed framework. Later in the fourth section, we will show some experiments on our proposed algorithm and discuss a little bit of the result. In the last section, we will conclude the paper and show some possible future works. other. A representative dataset of this kind is video sequences produced by EPFL CVLAB [2] [6]. The second type of dataset is cameras has very little or even non overlap between each other. One newly proposed dataset is called Duke MTMC [8] [11]. Within their paper, they proposed both a new dataset and a new way for multi-camera tracking evaluation. 3. Proposed Framework 2. Related Work In this paper, we adopt a tracking by detection fashion for solving a two-camera system multi-target tracking problem. We start with bounding boxes in each frame given by state-of-art detector. Then form them into short tracklets of each targets within non-overlapping small segments of video, we denote these tracklets as low-level tracklets. Each tracklet has length of 7 to 10 frames long. After this, every few of these small temporal segments are grouped into clusters as picking by a sliding window manner. The sliding window size we choose is 5, and there are a 3-cluster overlap between every two sliding windows. All the lowlevel tracklets within the chosen cluster will become the input of the generalized maximum multi clique optimization problem(GMMCP). This algorithm is finding the maximum possible cliques within the graph based on edge weights between every two low-level tracklets. The edge weights are given by computing a similarity score between the two tracklets. Both appearance similarity and motion similarity are obtained by adopting Local Maximal Occurrence Representation(LOMO) as feature extraction algorithm and Iterative Hankel Total Least Squares(IHTLS) as motion extraction algorithm. Thus the final output from GMMCP will be a much longer tracking result across frames within one cluster, and at the same time hopefully across the whole video. As follows, we will discuss in detail of the algorithms used by our proposed pipeline. As multi-camera system tracking problems becoming more and more popular, new algorithms are generated and new multi-camera datasets proposed. Even new ways of evaluating multi-camera trackers’ performance are interesting topics. There are mainly two types of approaches for multi-camera system tracking. The first one is to do information association inter-camera and then across camera. The second one is to globally consider all input detections. Which is the approach that this paper adopts. There are a few papers that are working on global approach for multi-camera system multi-object tracking. A general way of forming global tracking problem is to regard all input detections as a graph. The edge weights between nodes(detections) in the graph is based on how similar the detections are. In order to compute accurate similarities, superior feature extraction algorithm is required to capture most representative features from detections. In paper [3], the authors adopted re-ID feature extraction method for edge weight and then applied min cut/max flow algorithm for tracking. Another group of researcher from UCF published [4]. In their paper, they presented a global maximum clique optimization algorithm(GMMCP). They compute the edge weights based on both appearance similarity given by comparing histogram and motion similarity given by constant velocity. This paper is proposed based on one of their previous works [10] that proposed the GMCP algorithm. The main difference between the two algorithm is that GMMCP compute the cost function for multiple cliques of tracklets at one shot. Interestingly, [9] is published in a similar manner by researchers from Duke University. Although the global fashion for information association they use is the same as [4], they only use detection’s appearance feature for edge weights computation. Since it is intuitively to combine appearance similarity and motion similarity, in our paper hankel motion IHTLS [5] and re-ID LOMO feature [7] is exploited combined with GMMCP. Multi-camera system tracking problem still remains as very new topic comparing to classical single-camera tracking. As a result, new datasets and evaluation metrics aim at multi-camera scenario are evolving. What’s more, multicamera datasets can capture mainly two types of scenarios. One is that multiple cameras look at the same scene. In other words, cameras are fully overlapping with each 3.1. LOMO Local Maximal Occurrence Representation [7] is a useful and fairly new appearance feature extraction algorithm specifically proposed in 2015 in Person Re-identification field of study. Given a detection image, by analyzing horizontally the occurrence of different local features from small patches, the LOMO feature tries to make one stable representation for each detection in order to maximize the occurrence against viewpoint changes. In our pipeline, we input our detections one by one. Then each detection will be separate into multiple bands horizontally to compute local features. And in the end, only one feature vector is generated by LOMO for each detection. The procedure is explained in figure 2. After obtaining LOMO feature vector for each detection, we will compute the similarity between every two feature vectors of two detections and a score will be assigned. 2 • Cluster - j. The total number of clusters is J. Each cluster is denoted as j. • Node - i. The total number of nodes is I. Each node is denoted as i. • Dummy node: djk denotes the dummy node in cluster j of camera k. 0 0 0 j k • Edge: eiijk denotes the edge between node i in cluster j of camera k and node i0 in cluster j 0 of camera k 0 (k and k 0 are not necessarily different cameras). Figure 2. Each input bounding box is separated into 4 strips, and each strip is used to generate one LOMO feature. The final feature is the concatenation of the four strips. Then, our GMMCP can be formed as a Mixed-Binary Integer Programming in form of: 3.2. IHTLS maximize C T x Iterative Hankel Total Least Squares algorithm is proposed based on Hankel Total Least Squares(HTLS) algorithm [5]. There are mainly two differences between these two algorithms. The first modification that IHTLS makes is that a binary vector is introduced as an ’indicator’ of missing data. If there are any missing data occurs in the middle of a tracklet, or to say that a gap occurs within the tracklet, due to occlusion or bad detection, this ’indicator’ vector will be put to fill in the gap and allow IHTLS perform inpainting to recover the missing data automatically. The second modification is by increasing the estimated rank gradually, the algorithm is ran iteratively to find the optimal rank value for the given tracklet. Given two tracklets, fist compute their rank respectively. Then combine the two tracklet by adding a ’indicator’ vector if there exits a gap between them and estimate the new longer tracklet’s rank. As shown in HTLS, if the three ranks computed are the same, then these two original tracklets should belong to a same and longer trajectory with same motion. If the three ranks are not the same, then they do not belong to a same motion trajectory. Thus in our paper, we adopt this algorithm to compare the ranks of every two low-level tracklets as the input. A similarity score is assigned by IHTLS for every two tracklets. subject to Ax = b and Mx  n (1) Where matrix C stores the edge weights, and x is a mixedbinary column vector with boolean elements response to regular nodes and integer dummy nodes. To be more specific according to the formulation of GMMCP problem, we can expand the cost function into four terms: X DummyEdges X RealEdges z}|{ z}|{ c1 x 1 + c2 x2 + 2 1 odes odes X RealN X DummyN z}|{ z}|{ c3 x3 + c4 x 4 3 (2) 4 Having th object function for our problem, now we need to define the constraints in order to make sure the solution is valid. • Constraint 1 ensures that every three nodes picked up from three different clusters will form a clique. 0 0 0 00 00 00 00 00 00 j k eiijk + eii0 jj0 kk0  eiijkj k +1 (3) • Constraint 2 enforces the total number of outgoing edges from one node in cluster i will enter another cluster j only once or zero time. 3.3. GMMCP In order to form the Generalized maximum Multi Clique Problem, we see our tracker as a undirected graph. The nodes inside the graph represent low-level tracklets. An edge between two nodes represents the two low-level tracklets belong to the same person. The edge weight is using the similarity score computed with LOMO and IHTLS. Now, we would like to introduce some denotations before going into the formation of GMMCP. ∗ I X i0 =1 0 0 0 j k eiijk 1 (4) • Constraint 3 guarantees that given H clusters in total, then N nodes, including dummy nodes, from each clusters should be selected. K X J X K X • Camera - k. The total number of cameras is K. Each camera is denoted as k. i=1 j=1 k=1 3 0 0 0 j k eiijk + dij = (H − 1) × N (5) 4. Experiments In order to test our proposed approach, we found two datasets that fit the best of our multi-camera multi-object problem. One is EPFL terrace sequences, the other is the very new Duke MTMC dataset. The objects for tracking are both human targets in these two datasets. The initial detection bounding boxes are all given by doppia toolbox which implements the proposed detector of paper [1] offline. Moreover, after computing the appearance similarity and motion similarity respectively, we perform a weighted sum over the two similarity score to give the final edge weights and store in cost matrix C as introduced above. We pick different appearance weight given different dataset, and the motion weight is equal to 1 − appearanceweight . Also, the dummy node weight is also picked respect to appearanceweight . Figure 3. The camera topology provided from the website of the dataset. The different eight portions are the campus areas that are watched by different cameras receptively. As shown in the figure, the eight cameras merely share any overlapping. 4.1. Dataset and Evaluation Method Table 1. Evaluation Result on EPFL Terrace Sequence 1 EPFL Terrace Sequence The first dataset that we tested on is from CVLAB of EPFL. The sequences were shot outside a building on a terrace. Up to 7 people evolve in front of 4 DV cameras, for around 3 1/2 minutes. The frame rate is 25 fps. The 4 cameras capture fully overlapped area of the terrace. The ground truth is given every 25 frame. By using the Tsai camera calibration also provided on the website, we can compute a 3D world coordinates for evaluation. For multi-camera scenario, we tested our method with terrace sequence 1 camera 0 and camera 1. We adopt the standard clearMOT evaluation, which will provide MOTA and MOTP score. Duke MTMC Dataset and Evaluation Method DukeMTMC is a new and large dataset mainly for multitarget multi-camera tracking problems which was first proposed in 2016 ECCV. It provides a new large scale 1080p video data set recorded by 8 synchronized cameras under 60 fps for almost 85 minutes. There are more than 7,000 single camera trajectories and over 2,000 unique identities. More than 2,000,000 manually annotated frames are provided within a certain region of interest as groundtruth. Within these 8 cameras, only camera 2 and camera 8 share a small portion of overlapping scene. The rest 6 cameras are watching at different part of Duke campus and a top view is provided on their website. A more clear view of the camera topology can be seen in figure3 In addition to this huge dataset, the group of researchers also proposed a new performance evaluation method that focusing on measuring how often a system is correct about who is where, regardless of how often a target is lost and reacquired. The reason why they propose this new evaluation method, claimed by its authors, is due to the fact that the widely used standard clearMOT method fails to handle and generalize scenarios under multi-camera systems and hence yield reliable and meaningful evaluation scores. Ours [12] rateTP 0.42 - rateFP 0.003 - rateFN 0.53 - IDswitch 60 - MOTA 0.42 0.7 Table 2. Evaluation Result on Duke MTMC Tracker MTMC CDSC Lx b BIPCC dirBIPCC PT BIPCC Ours IDF1 60 58 56.2 52.1 34.9 55.5 IDP 68.3 72.6 67 62 41.6 78.89 IDR 53.5 48.2 48.4 45 30.1 44.6 4.2. Result We fist tested our pipeline on EPFL Terrace Sequence 1 and compare to the state-of-art method proposed by [12]. We are using the groundtruth provided on EPFL website, while [12] hand labled their own groundgruth. For this dataset, we choose appearanceweight = 0.7 and dummyweight = 0.7. The results are shown in table1. Then we tested and evaluated using Duke MTMC new dataset and their evaluation method. We compared our result to state-of-art scoreboard posted on motchallenge website. This time, a dummyweight = 0.6 is chosen, and the result is shown in table2 As we can see from the result, the result yields by proposed algorithm cannot beat state-of-art result. One possible reason could due to our information merging algorithm is not good enough to associate the output from GMMCP and hence project back into each single camera for yielding evaluation score. Another possible reason may be that the mostion of the targets in the video are human. Human motion rank are similar to each other which results in our rank estimation algorithm fails to give meaningful similar4 References ity score to separate targets away. We also estimate on the computational time for the whole pipeline. It takes a little bit more than 1 hour to run the whole pipeline. The most time-consuming part is building the similarity matrix, which takes up to 1 hour already(4138s). The second time-consuming part is Gurobi(289s). The third is forming tracklets every 10 frames(130s). Some more qualitative results will be shown in figure4 and 5. For EPFL dataset, an ID number is assigned on top of each bounding box. The same ID across frame and camera will share the same color bounding boxes. The yellow box with numbers begin with a # represent the frame numbers. Thus the tracking result of the two camera at the same frame are showing horizontally. The tracking consistency is showing vertically instead. The result from DukeMTMC dataset is shown in figure5. As you may see, some of the bounding boxes are not labeled in the frames due to the region of interests(ROI) provided by the original dataset. Furthermore, in order to understand how well dynamic information helps our tracking algorithm, we tune the parameter appearanceweight from 0 to 1 to yield the plots in figure 6. When the appearanceweight = 0, we use only motion similarity for tracking, and we have the highest IDP, IDR, and IDF1 scores using MTMC evaluation method. When calculating the motion similarity, we compared euclidean distance with EMD distance and the plots are shown together in figure 6. [1] R. Benenson, M. Omran, J. Hosang, , and B. Schiele. Ten years of pedestrian detection, what have we learned? In ECCV, CVRSUAD workshop, 2014. [2] J. Berclaz, F. Fleuret, E. Turetken, and P. Fua. Multiple Object Tracking using K-Shortest Paths Optimization. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2011. [3] W. Chen, L. Cao, X. Chen, and K. Huang. An equalized global graph model-based approach for multi-camera object tracking. IEEE Transactions on Circuits and Systems for Video Technology, 2016. [4] A. Dehghan, S. Modiri Assari, and M. Shah. Gmmcp tracker: Globally optimal generalized maximum multi clique problem for multiple object tracking. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4091–4099, 2015. [5] C. Dicle, O. I. Camps, and M. Sznaier. The way they move: Tracking multiple targets with similar appearance. In Proceedings of the IEEE International Conference on Computer Vision, pages 2304–2311, 2013. [6] F. Fleuret, J. Berclaz, R. Lengagne, and P. Fua. MultiCamera People Tracking with a Probabilistic Occupancy Map. IEEE Transactions on Pattern Analysis and Machine Intelligence, 30(2):267–282, February 2008. [7] S. Liao, Y. Hu, X. Zhu, and S. Z. Li. Person re-identification by local maximal occurrence representation and metric learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2197–2206, 2015. [8] E. Ristani, F. Solera, R. Zou, R. Cucchiara, and C. Tomasi. Performance measures and a data set for multi-target, multicamera tracking. In European Conference on Computer Vision workshop on Benchmarking Multi-Target Tracking, 2016. [9] E. Ristani and C. Tomasi. Tracking multiple people online and in real time. In Asian Conference on Computer Vision, pages 444–459. Springer, 2014. [10] A. Roshan Zamir, A. Dehghan, and M. Shah. Gmcp-tracker: Global multi-object tracking using generalized minimum clique graphs. In Proceedings of the European Conference on Computer Vision (ECCV), 2012. [11] F. Solera, S. Calderara, E. Ristani, C. Tomasi, and R. Cucchiara. Tracking social groups within and across cameras. IEEE Transactions on Circuits and Systems for Video Technology, 2016. [12] Y. Xu, X. Liu, Y. Liu, and S.-C. Zhu. Multi-view people tracking via hierarchical trajectory composition. 5. Conclusion In this paper, we adopt a global information association manner for solving a multi-camera multi-target tracking problem. We first obtain our detection with a state-of-art detector based on deep learning. Then we observe our detections as a large graph and compute a globally maximum cliques optimization problem formed by mixed-integer linear program. We adopt re-ID LOMO feature for detection’s appearance feature extraction method and hankel matrix based IHTLS algorithm for motion feature. The two features are combined to provide edge weights for the graph. The algorithm is tested on two dataset: EPFL Terrance Sequence1 and Duke MTMC. The evaluation is given by standard clearMOT metric and Duke MTMC metric respectively. As shown in the result, our algorithm still have space for improvements for tracking accuracy. The possible reasons that our tracker is not working as good as state-of-art are mainly two. First of all, a dataset with more complex motion information may be needed for our tracker to outperform others. Secondly, a better way for stitching final tracklet and merging the information got from GMMCP algorithm may be required. Thus, our future work will mainly focus on improve the two problems. 5 Figure 4. Qualitative result got from EPFL Terrace Sequence 1. The 6 first column(one on the left) is from video sequence captured by camera 0, while the second column(one on the right) is from camera 1. The two cameras are watching at the same area of a terrace on a building. Figure 5. Qualitative result got from Duke MTMC dataset. The first row are frames from video sequence captured by camera 2, while the second row camera 8. Each column represents the same of the two cameras. As shown in the pictures, our algorithm correctly detects and tracks multiple targets. Figure 6. The first plot on the left shows the larger the appearance weight, the less motion information is involved, the smaller the IDP score. The plot in the middle shows a similar situation for IDR score, while the plot on the right for IDF1 score. 7
1cs.CV
EXACT FORMULAS FOR THE NORMALIZING CONSTANTS OF WISHART DISTRIBUTIONS FOR GRAPHICAL MODELS arXiv:1406.4901v2 [math.ST] 22 Jun 2016 By Caroline Uhler∗ , Alex Lenkoski† , and Donald Richards‡ Massachusetts Institute of Technology∗ , Norwegian Computing Center† , and Penn State University‡ Gaussian graphical models have received considerable attention during the past four decades from the statistical and machine learning communities. In Bayesian treatments of this model, the G-Wishart distribution serves as the conjugate prior for inverse covariance matrices satisfying graphical constraints. While it is straightforward to posit the unnormalized densities, the normalizing constants of these distributions have been known only for graphs that are chordal, or decomposable. Up until now, it was unknown whether the normalizing constant for a general graph could be represented explicitly, and a considerable body of computational literature emerged that attempted to avoid this apparent intractability. We close this question by providing an explicit representation of the G-Wishart normalizing constant for general graphs. 1. Introduction. Let G = (V, E) be an undirected graph with vertex set V = {1, . . . , p} and edge set E. Let Sp be the set of symmetric p × p matrices and Sp0 the cone of positive definite matrices in Sp . Let (1.1) Sp0 (G) = {M = (Mij ) ∈ Sp0 | Mij = 0 for all (i, j) ∈ / E} denote the cone in Sp of positive definite matrices with zeros in all entries not corresponding to edges in the graph. Note that the positivity of all diagonal entries Mii follows from the positive-definiteness of the matrices M . A random vector X ∈ Rp is said to satisfy the Gaussian graphical model (GGM) with graph G if X has a multivariate normal distribution with mean µ and covariance matrix Σ, denoted X ∼ Np (µ, Σ), where Σ−1 ∈ Sp0 (G). The inverse covariance matrix Σ−1 is called the concentration matrix and, throughout this paper, we denote Σ−1 by K. MSC 2010 subject classifications: Primary 62H05, 60E05; secondary 62E15 Keywords and phrases: Bartlett decomposition; Bipartite graph; Cholesky decomposition; Chordal graph; Directed acyclic graph; G-Wishart distribution; Gaussian graphical model; Generalized hypergeometric function of matrix argument; Moral graph; Normalizing constant; Wishart distribution. 1 2 C. UHLER, A. LENKOSKI, D. RICHARDS Statistical inference for the concentration matrix K constrained to Sp0 (G) goes back to Dempster [6], who proposed an algorithm for determining the maximum likelihood estimator [cf., 31]. A Bayesian framework for this problem was introduced by Dawid and Lauritzen [5], who proposed the HyperInverse Wishart (HIW) prior distribution for chordal (also known as decomposable or triangulated ) graphs G. Chordal graphs enjoy a rich set of properties that led the HIW distribution to be particularly amenable to Bayesian analysis. Indeed, for nearly a decade after the introduction of GGMs, focus on the Bayesian use of GGMs was placed primarily on chordal graphs [see, e.g., 11]. This tractability stems from two causes: the ability to sample directly from HIWs [28], and the ability to calculate their normalizing constants, which are critical quantities when comparing graphs or nesting GGMs in hierarchical structures. Roverato [29] extended the HIW to general G. Focusing on K, AtayKayis and Massam [2] further studied this prior distribution. Following Letac and Massam [22], Lenkoski and Dobra [21] termed this distribution the GWishart. For D ∈ Sp0 (G) and δ ∈ R, the G-Wishart density has the form 1 fG (K | δ, D) ∝ |K| 2 (δ−2) exp(− 12 tr(KD)) 1K∈Sp0 (G) . This distribution is conjugate [29] and proper for δ > 1 [24]. Early work on the G-Wishart distribution was largely computational in nature [4, 7, 8, 17, 21, 32, 33] and was predicated on two assumptions: first, that a direct sampler was unavailable for this class of models and, second, that the normalizing constant could not be explicitly calculated. Lenkoski [20] developed a direct sampler for G-Wishart variates, mimicking the algorithm of Dempster [6], thereby resolving the first open question. In this paper, we close the second question by deriving for general graphs G an explicit formula for the G-Wishart normalizing constant, Z 1 CG (δ, D) = |K| 2 (δ−2) exp(− 12 tr(KD)) dK, Sp0 (G) Qp Q where dK = i=1 dkii · i<j, (i,j)∈E dkij denotes the product of differentials corresponding to all distinct non-zero entries in K. For notational simplicity, we will consider the integral Z IG (δ, D) = |K|δ exp(−tr(KD)) dK, Sp0 (G) which can be expressed in terms of CG (δ, D) as follows: Denote by |E| the cardinality of the edge set E; by changing variables, K → 2K, one obtains  1 CG (δ, D) = 2 2 pδ+|E| IG 21 (δ − 2), D . NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS 3 The normalizing constant IG (δ, D) is well-known for complete graphs, in which every pair of vertices is connected by an edge. In such cases,  1 (1.2) Icomplete (δ, D) = |D|−(δ+ 2 (p+1)) Γp δ + 12 (p + 1) , where (1.3) Γp (α) = π p(p−1)/4 p Y  Γ α − 12 (i − 1) , i=1 Re(α) > 12 (p − 1), is the multivariate gamma function. The formula (1.2) has a long history, dating back to Wishart [34], Wishart and Bartlett [35], Ingham [15], Siegel [30, Hilfssatz 37], Maass [23], and many derivations of a statistical nature; see Olkin [27] and Giri [10, p. 224]. As noted above, IG (δ, D) is also known for chordal graphs. Let G be chordal, and let (T1 , . . . , Td ) denote a perfect sequence of cliques (i.e., complete subgraphs) of V . Further, let Si = (T1 ∪· · ·∪Ti )∩Ti+1 , i = 1, . . . , d−1; then, S1 , . . . , Sd−1 are called the separators of G. Note that the separators Si are cliques as well. We denote the cardinalities by ti = |Ti | and si = |Si |. For S ⊆ {1, . . . , p}, let DSS denote the submatrix of D corresponding to the rows and columns in S. Then, Qd i=1 ITi (δ, DTi Ti ) IG (δ, D) = Qd−1 j=1 ISj (δ, DSj Sj )   Qd  − δ+ 12 (ti +1) 1 |D | Γ δ + (t + 1) t i T T i i i i=1 2  = Q (1.4)   . 1 d−1 − δ+ 2 (sj +1) 1 |D | Γ δ + (s + 1) s j S S j j j j=1 2 This result follows because, for a chordal graph G, the G-Wishart density function can be factored into a product of density functions [5]. For non-chordal graphs the problem of calculating IG (δ, D) has been open for over 20 years, and much of the computational methodology mentioned above was developed with the objective of either approximating IG (δ, D) or avoiding its calculation. Our result shows that an explicit representation of this quantity is indeed possible. In deriving the explicit formula for the normalizing constant IG (δ), we utilize methods that are familiar to researchers in this area. These methods include the Cholesky decomposition or the Bartlett decomposition of a positive definite matrix, Schur complements for factorizing determinants, and the chordal cover of a graph. Furthermore, we make crucial use of certain formulas from the theory of generalized hypergeometric functions of matrix 4 C. UHLER, A. LENKOSKI, D. RICHARDS argument [13, 16], and analytic continuation of differential operators on the cone of positive definite matrices [9]. The article proceeds as follows. In Section 2 we treat the case in which D = Ip , the p×p identity matrix, deriving a closed-form product formula for the normalizing constant IG (δ, Ip ) for various classes of non-chordal graphs. In Section 3 we consider the case of general matrices D; in our main result in Theorem 3.3 we derive an explicit representation of IG (δ, D) for general graphs as a closed-form product formula involving differentials of principal minors of D. We end with a brief discussion in Section 4. 2. Computing the normalizing constant IG (δ, Ip ). In this section, we compute IG (δ, Ip ) for two classes of non-chordal graphs. We begin in Section 2.1 with the class of complete bipartite graphs and use an approach based on Schur complements to attain a closed-form formula. In Section 2.2 we introduce directed Gaussian graphical models and show how these models relate to a Cholesky factor approach to computing IG (δ, Ip ). This leads to a formula for computing normalizing constants of graphs with minimum fill-in equal to 1, namely graphs that become chordal after the addition of one edge. However, these approaches do not lead to a general formula for the normalizing constant in the case D = Ip . To obtain a formula for any graph G, we found it necessary to calculate the more general case IG (δ, D) and then specialize D = Ip , as is done for moment generating functions or Laplace transforms. This is explained in Section 3. 2.1. Bipartite graphs. A complete bipartite graph on m + n vertices, denoted by Hm,n , is an undirected graph whose vertices can be divided into disjoint sets U = {1, . . . , m} and V = {m + 1, . . . , m + n}, such that each vertex in U is connected to every vertex in V , but there are no edges within U or V . For the graph Hm,n , the corresponding matrix K is a block matrix,   KAA KAB K= , T KAB KBB where KAA , KBB are diagonal matrices of sizes m×m and n×n, respectively, and KAB is unconstrained, i.e., no entry of KAB is constrained to be zero. Proposition 2.1. all δ > −1, and The integral IHm,n (δ, Im+n ) converges absolutely for  m  n (2.1) IHm,n (δ, Im+n ) = Γ δ + 21 n + 1 Γ(δ + 12 m + 1) × Γm  Γm+n δ + 12 (m + n + 1)  . δ + 12 (m + n + 1) Γn δ + 12 (m + n + 1) NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS 5 Proof. Applying the Schur complement formula for block matrices, we obtain Z |K|δ exp(−tr(K)) dK IHm,n (δ, Im+n ) = Sm+n 0 (G) Z = Sm+n 0 (G) T |KAA |δ |KBB − KAB (KAA )−1 KAB |δ · exp(−tr(KAA ) − tr(KBB )) dKAA dKAB dKBB . Since KAB is unconstrained, we can change variables by replacing KAB by 1/2 1/2 KAA KAB KBB ; then the corresponding Jacobian is |KAA |n/2 |KBB |m/2 . Since 1/2 1/2 T T |KBB − KBB KAB KAB KBB | = |KBB | · |In − KAB KAB |, we obtain Z IHm,n (δ, Im+n ) = Sm+n 0 (G) 1 1 T |KAA |δ+ 2 n |KBB |δ+ 2 m |In − KAB KAB |δ · exp(−tr(KAA ) − tr(KBB )) dKAA dKAB dKBB , where the range of integration is such that each diagonal entry of KAA T K and KBB is positive, KAB is unconstrained, and In − KAB AB is positive definite. Integrating over each diagonal entry of KAA and KBB , we obtain  m  n IHm,n (δ, Im+n ) = Γ δ + 12 n + 1 Γ δ + 12 m + 1 Z T × |In − KAB KAB |δ dKAB . KAB Finally, since KAB is unconstrained, we deduce from (3.4) the value of the latter integral. In this computation, we used the special structure of the graph to decompose the inverse covariance matrix K into a special block matrix. In Section 3 we use a similar approach to show how the normalizing constant changes when removing a clique (i.e. a completely connected subgraph) from a graph. This leads to an algorithm for computing the normalizing constant IG (δ, D) for any graph G. In the reminder of this section, we show how an approach based on the Cholesky factorization of K can be used to easily compute the normalizing constant for graphs that have minimum fill-in equal to 1. This requires introducing directed Gaussian graphical models. 6 C. UHLER, A. LENKOSKI, D. RICHARDS 2.2. Directed Gaussian graphical models. Let G = (V, E) be a directed acyclic graph (DAG) consisting of vertices V = {1, . . . , p} and directed edges E. We assume, without loss of generality, that the vertices in G are topologically ordered, meaning that i < j for all (i, j) ∈ E. We associate to G a strictly upper-triangular matrix B of edge weights. So B = (bij ) with bij 6= 0 if and only if (i, j) ∈ E. Then a directed Gaussian graphical model on G for a random variable X ∈ Rp is defined by X ∼ Np (0, Σ) with Σ = [(I − B)D(I − B)T ]−1 , where D is a diagonal matrix. p To simplify notation, let aii = dii and aij = −bij djj , and let A = (Aij ) √ with Aii = aii and Aij = −aij for all i 6= j. Then Σ−1 = AAT , and aij 6= 0 for i 6= j if and only if (i, j) ∈ E. Note that AAT is the upper Cholesky decomposition of Σ−1 . Such a decomposition exists for any positive definite matrix and is unique. We will associate to a DAG, G = (V, E), and its corresponding directed Gaussian graphical model two undirected graphs. We denote by G s = (V, E s ) the skeleton of G obtained by replacing all directed edges in G by undirected edges. We denote by G m = (V, E m ) the moral graph of G, which reflects the conditional independencies in Np (0, Σ), i.e., (i, j) ∈ / Em if and only if Xi ⊥ ⊥ Xj | XV \{i,j} . Since Σ−1 also encodes the conditional independence relations of the form Xi ⊥ ⊥ Xj | XV \{i,j} , this is equivalent to the criterion, (i, j) ∈ / Em if and only if Σ−1  ij = 0. So, the moral graph G m reflects the zero pattern of Σ−1 . The moral graph of G can also be defined graph-theoretically: It is formed by connecting all nodes i, j ∈ V that have a common child in G, i.e., for which there exists a node k ∈ V \ {i, j} such that (i, k), (j, k) ∈ E, and then making all edges in the graph undirected. The name stems from the fact that the moral graph is obtained by ‘marrying’ the parents. For a review of basic graph-theoretic concepts see e.g. [19, Chapter 2]. The moral graph is an important concept for our application. Let G = (V, E) be an undirected graph, with V = {1, . . . , p}, for which we want to compute IG (δ, Ip ). Let G0 = (V, E0 ) with G0 = G. Given a labeling of the vertices V we associate a DAG, G0 = (V, E0 ), to G0 by orienting the edges in E0 according to the topological ordering, i.e., for all (i, j) ∈ E0 let (i, j) ∈ E0 if i < j. Note that the skeleton of G0 is the original undirected graph G0 . Let G1 = (V, E1 ) be the moral graph of G0 , i.e., G1 = G0m , and let G1 = (V, E1 ) be the corresponding DAG obtained by orienting the edges in E1 according 7 NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS to the ordering of the vertices V . So G0 is a subgraph of G1 . We repeat this procedure until Gq+1 = Gq . This results in a sequence of DAGs, G0 ( G1 ( · · · ( Gq . In the following, we denote by G = (V, E) the DAG associated to G = (V, E) obtained by orienting the edges in E according to the ordering of the vertices V . We denote by Ḡ = (V, Ē) the DAG associated to G = (V, E) obtained by repeatedly marrying parents in G, i.e. Ḡ = Gq . We call Ḡ the moral DAG of G. Note that Ḡ s , the skeleton of Ḡ, is a chordal graph with G ⊂ Ḡ s (Lauritzen [19, Chapter 2]), so Ḡ s is a chordal cover of G. A chordal cover in general is not unique; however, Ḡ s is the unique chordal cover obtained by repeatedly marrying parents according to the vertex labeling V . We call this chordal cover the moral chordal graph of G and denote it by Ḡ = (V, Ē). We now show how to deduce from the undirected graph G = (V, E) the normalizing constant IG (δ, Ip ) as an integral in terms of the Cholesky factor A. Since the proof is the same for general correlation matrices D ∈ Sp0 , we give the result directly for IG (δ, D). In the following, we use the standard graph-theoretic notation indeg(i) for the indegree of node i, representing the number of edges “arriving at” (or “pointing to”) node i in a DAG G. Theorem 2.2. Let G = (V, E) be an undirected graph with vertices V = {1, . . . , p}. Let G = (V, E) be the DAG associated to G = (V, E) obtained by orienting the edges in E according to the ordering of the vertices in V . Let Ḡ = (V, Ē) denote the moral DAG of G and Ḡ = (V, Ē) its skeleton, the moral chordal graph of G. Let A be an upper-triangular p × p matrix √ with diagonal entries Aii = aii and off-diagonal entries Aij = −aij for all i < j. Then   X  Z Y p p  X δ+ 21 indeg(i) 2 aii IG (δ, D) = exp − aii + aij A∗ i=1 i=1  · exp − 2 X  dij (i,j)∈E Sp0 √ − aij ajj + j: (i,j)∈Ē X  ail ajl dA∗ , l: (i,l),(j,l)∈Ē where D ∈ is a correlation matrix, A∗ = {aij : i = j or (i, j) ∈ E}, the range of aii is (0, ∞), the range of aij for (i, j) ∈ E is (−∞, ∞), indeg(i) denotes the indegree of node i in G, and for aij ∈ / A∗   if (i, j) ∈ / Ē,   0, X 1 aij = √ ail ajl , if (i, j) ∈ Ē \ E.   ajj  l∈V (i,l),(j,l)∈Ē 8 C. UHLER, A. LENKOSKI, D. RICHARDS Proof. Let K ∈ Sp0 (G). Since G ⊂ Ḡ, then K ∈ Sp0 (Ḡ) and we can view K as an inverse covariance matrix of a directed Gaussian graphical model on Ḡ. Because the Cholesky decomposition is unique, A is a weighted adjacency matrix of Ḡ and hence aij = 0 for all (i, j) ∈ / Ē. Let (i, j) be an edge that is present in the moral chordal graph Ḡ but not in G. We can assume that i < j. Hence (i, j) ∈ Ē \ E and therefore X √ 0 = Kij = (AAT )ij = −aij ajj + ail ajl . l>max(i,j) Thus, for each edge (i, j) ∈ Ē \ E, we obtain an equation, 1 aij = √ ajj X ail ajl . l∈V (i,l),(j,l)∈Ē To complete the proof, we need to compute the Jacobian J of the change of variables from K to A. We list the aij ’s column-wise, meaning that aij precedes alm if j < m or if j = m and i < l, omitting aij for (i, j) ∈ / E, corresponding to the zeros in K. We list the kij ’s in the same ordering. Let the aij ’s correspond to the columns of the Jacobian, while the kij ’s correspond to the rows. In order to form J, we calculate the partial derivative of each kij with respect to each alm . Since K = AAT and A is uppertriangular then J also is upper-triangular; therefore, |J| = |diag(J)|. Since X X √ a2ij and kij = −aij ajj + kii = aii + ail ajl , l∈V (i,l),(j,l)∈Ē (i,j)∈Ē for all (i, j) ∈ E, then |J| = p Y indeg(i)/2 aii . i=1 Collecting together these formulas completes the proof. The number of edges in Ē \ E depend on the ordering of the vertices. It is well-known (see e.g. Lauritzen [19, Chapter 2]) that one can find an ordering of the vertices such that Ḡ = G if and only if G is chordal. Hence when G is chordal we can directly derive the normalizing constant of IG (δ, Ip ) from Theorem 2.2 by evaluating Gaussian and Gamma integrals. One could also prove the following corollary using Equation (1.4). 14 AUTHORS ’ SURNAMES NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS 9 5 5 1 4 1 4 2 3 2 3 Fig 1. Undirected graph G5 (left) discussed in Example 2.4 and its moral DAG G¯5 (right). Corollary 2.3. Let G = (V, E) be a chordal graph, where the vertices V = {1, . . . , p} are labelled according to a perfect ordering. Then IG (δ, Ip ) = π |E|/2 p Y Γ δ+ 1 2  indeg(i) + 1 . i=1 where indeg(i) denotes the indegree of node i in the corresponding DAG G. Example 2.4. We illustrate Theorem 2.2 by studying the non-chordal graph G5 , shown in Figure 1 (left). We wish to calculate Z  (2.2) IG5 (δ, I5 ) = |K|δ exp − tr(K) dK K∈S50 (G5 ) through the change of variables, K = AAT . The moral DAG of G5 is denoted by G¯5 and depicted in Figure 1 (right). Since the edges (2, 4) and (2, 5) are missing in G¯5 , we immediately deduce that a24 = a25 = 0. In this example, we chose an ordering where only one edge needed to be added in the process of marrying parents, namely the edge (1,3). This results in one equation for a13 , which can be deduced from the colliders over the additional edge, i.e., nodes l ∈ V with (1, l), (3, l) ∈ Ḡ, and results in a13 = √ 1 (a14 a34 + a15 a35 ). a33 Finally, the Jacobian can be deduced from the indegrees of the nodes in G5 , which corresponds to the moral DAG G¯5 after omitting the red edge. Therefore, the determinant of the Jacobian is 0/2 1/2 1/2 2/2 3/2 a11 a22 a33 a44 a55 , 10 C. UHLER, A. LENKOSKI, D. RICHARDS and we find that the integral (2.2) equals Z δ+1/2 δ+1/2 δ+3/2 aδ11 a22 a33 aδ+1 44 a55 A h   a a + a a 2 14 34 15 35 × exp − a11 + a212 + + a214 + a215 √ a33 + a22 + a223 + a33 + a234 + a235 + a44 + a245 + a55 i dA, where aii > 0; aij ∈ R, i < j; and dA denotes the product of all differentials. As seen in Example 2.4, the equations corresponding to the additional edges (i, j) ∈ Ē \ E complicate the integral significantly. Therefore, given a non-chordal graph G, it is desirable to find an ordering such that |Ē \ E| is minimized. This ordering is given by a perfect ordering of a minimal chordal cover of G, where minimality is with respect to the number of edges that need to be added in order to make G chordal. Using Corollary 2.3, we can compute the normalizing constant corresponding to a minimal chordal cover of G. The question arises: How can one compute the normalizing constant of G from the normalizing constant of a minimal chordal cover of G? In the following theorem, we show how one can compute the normalizing constant of a graph G that results from removing one edge from a chordal graph. Such graphs are said to have minimum fill-in equal to 1. Theorem 2.5. Let G = (V, E) be an undirected graph with minimum fill-in 1 and with vertices V = {1, . . . , p}. Let Ge = (V, E e ) denote the graph G with one additional edge e, i.e., E e = E ∪ {e}, such that Ge is chordal. Let d denote the number of triangles formed by the edge e and two other edges in Ge . Then  1 −1/2 Γ δ + 2 (d + 2) IG (δ, Ip ) = π IGe (δ, Ip ). Γ δ + 12 (d + 3) Proof. We begin by defining an ordering of the vertices in such a way that one can directly integrate out the variables corresponding to the end points of e and the variable corresponding to e itself. Let one of the end points of e be labelled as ‘1’, the other end point as ‘d + 2’ and label the d vertices involved in triangles over the edge e by 2, . . . , d + 1. Label all remaining vertices by d + 3, . . . , p. Let Ḡ e denote the moral DAG to Ge with edge set Ē e . Then the chosen ordering of the vertices guarantees that Ē e = Ē ∪ {e}, and e ∈ / Ē. NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS 11 Also, since all vertices 2, . . . , d + 1 are connected to vertex d + 2, no added edge in Ē \ E points to vertex d + 2 and hence ad+2,d+2 does not appear in any equation for the edges in Ē \ E. Similar arguments hold for vertex 1, since due to the ordering there can be no edge pointing to node 1. Let A and Ae denote the Cholesky factors of G and Ge , respectively. Then ( Aeij for all (i, j) 6= (1, d + 2) Aij = 0 if (i, j) = (1, d + 2) Let indeg denote the indegree with respect to the DAG G and indege the indegree with respect to the DAG G e . Let A∗ = ((aii )i∈{1,d+2} , (aij )(i,j)∈E ). / Note that (2.3) indege (1) = 0 = indeg(1), indege (d + 2) = d + 1 = indeg(d + 2) + 1. Then by Theorem 2.2, IGe (δ, Ip ) = Z Y p  δ+ 1 indege (i) aii 2 exp(−aii )  exp − i=1 X a2ij  (i,j)∈Ē e da11 dad+2,d+2 da1,d+2 dA∗ Z ∞ = −∞ Z ∞ · Z0 · exp(−a21,d+2 ) da1,d+2 · Z 0 δ+ 21 indege (1) a11 exp(−a11 ) da11 δ+ 1 indege (d+2) 2 ad+2,d+2  Y A∗ ∞ δ+ 21 aii exp(−ad+2,d+2 ) dad+2,d+2    X indege (i) 2 exp(−aii ) exp − aij dA∗ . i∈{1,d+2} / (i,j)∈Ē √ The integral with respect to a1,d+2 is a Gaussian integral, with value π. Also, by (2.3), Z ∞ Z ∞ δ+ 1 indege (1) δ+ 1 indeg(1) a11 2 exp(−a11 ) da11 = a11 2 exp(−a11 ) da11 . 0 0 Again by (2.3), we have Z 0 ∞ δ+ 1 indege (d+2) 2 ad+2,d+2 exp(−ad+2,d+2 ) dad+2,d+2 Z ∞ Γ δ + 21 (d + 1) + 1 δ+ 12 indeg(d+2) a exp(−ad+2,d+2 ) dad+2,d+2 . = d+2,d+2 Γ(δ + 21 d + 1) 0 12 C. UHLER, A. LENKOSKI, D. RICHARDS Finally, since indege (i) = indeg(i) for all i ∈ / {1, d + 2}, we obtain  Z ∞ √ Γ δ + 21 (d + 1) + 1 δ+indeg(1)/2 e IG (δ, Ip ) = π a11 exp(−a11 ) da11 1 Γ(δ + 2 d + 1) 0 Z ∞ δ+ 12 indeg(d+2) ad+2,d+2 · exp(−ad+2,d+2 ) dad+2,d+2    Z0  Y X δ+ 21 indeg(i) 2 · aii exp(−aii ) exp − aij dA∗ A∗ = √ π i∈{1,d+2} / Γ δ+ Γ δ+ 1 2 (d 1 2 (d (i,j)∈Ē  + 3)  IG (δ, Ip ). + 2) The proof now is complete. Example 2.6. Since the graph G5 discussed in Example 2.4 has minimum fill-in equal to 1, we can apply Theorem 2.5 to compute its normalizing constant. The skeleton of the graph shown in Figure 1 (right) is a chordal cover of G5 and the given vertex labeling is a perfect labeling. By applying Proposition 2.3, we deduce the normalizing constant for the graph G5 with the additional edge e = (1, 3):  2  IGe5 (δ, Ip ) = π 4 Γ(δ + 1) Γ δ + 32 Γ(δ + 2) Γ δ + 52 . Since the number of triangles over the red edge (1, 3) is d = 3, we find by Theorem 2.5 that IG5 (δ, Ip ) = π −1/2 (2.4) = π 7/2 Γ(δ + Γ(δ + 3 2 4 2 + 1) IGe (δ, Ip ) + 1) 5   2  Γ δ + 25 Γ(δ + 1) Γ δ + 32 Γ(δ + 2) Γ δ + 52 . Γ(δ + 3) 3. Computing IG (δ, D) for general non-chordal graphs. In this section, we study IG (δ, D) for general D. In Theorem 3.3 we show how the normalizing constant changes when removing not only an edge, but an entire clique (i.e., a completely connected subgraph) from a graph. This leads to an algorithm for computing the normalizing constant IG (δ, D) for any graph G, which can then be specialized to the case which D = Ip . For general graphs, we found it necessary to calculate first the general case IG (δ, D) and then to specialize to D = Ip , as is done for moment-generating functions or Laplace transforms. NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS 13 3.1. Some results on a generalized hypergeometric function of matrix argument. We list in this subsection some results, involving a generalized hypergeometric function of matrix argument, that we will apply repeatedly in this section. For a ∈ C and k ∈ {0, 1, 2, . . .}, we denote the rising factorial by (a)k = Γ(a + k) = a(a + 1)(a + 2) · · · (a + k − 1). Γ(a) For t ∈ C and ρ 6∈ {0, −1, −2, . . .} the classical generalized hypergeometric function, 0 F1 (ρ, t), may be defined by the series expansion, (3.1) 0 F1 (ρ; t) = ∞ X l=0 tl . l! (ρ)l We refer to Andrews, et al. [1] for many other properties of this function. The generalized hypergeometric function of matrix argument, 0 F1 (ρ; Y ), Y ∈ Sp0 , is defined by the Laplace transform, Z 1 1 |Y |ρ− 2 (p+1) exp(−tr(Y D)) 0 F1 (ρ; Y ) dY = |D|−ρ exp(tr(D−1 )), Γp (ρ) Sp0 valid for Re(ρ) > 12 (p − 1) and D ∈ Sp0 . Herz [13] provided an extensive theory of the analytic properties of the function 0 F1 . In particular, 0 F1 (ρ; Y ) is simultaneously analytic in ρ for Re(ρ) > 21 (p − 1) and entire in Y ; so, as a function of Y , its domain of definition extends to the set Sp and to the set of of complex symmetric matrices. Other properties of the function 0 F1 , such as zonal polynomial expansions which generalize (3.1), are given by James [16], Muirhead [26], and Gross and Richards [12]. Herz [13, p. 497] proved that the function 0 F1 (ρ; Y ) depends only on the eigenvalues of Y , and moreover that if Re(ρ) > 12 (p − 1), D ∈ Sp0 , and C ∈ Sp , then there holds the Laplace transform formula, Z (3.2) Sp0 1 |Y |ρ− 2 (p+1) exp(−tr(Y D)) 0 F1 (ρ; Y C) dY = Γp (ρ) |D|−ρ exp(tr(D−1 C)), where, by convention, 0 F1 (ρ; Y C) is an abbreviation for 0 F1 (ρ; Y 1/2 CY 1/2 ) and Y 1/2 ∈ Sp0 is the unique square-root of Y . Setting C = 0 (the zero matrix) in (3.2) we deduce from the uniqueness of the Laplace transform and (1.2) that 0 F1 (ρ; 0) = 1. 14 C. UHLER, A. LENKOSKI, D. RICHARDS We will apply repeatedly a generalization of the Poisson integral to matrix spaces (see [13, pp. 495–496] and [16, Equation (151)]): If A is a k × p matrix such that k ≤ p, and Re(ρ) > 12 (k + p − 1), then Z 1 |Ik − XX T |ρ− 2 (k+p+1) exp(tr(AX T )) dX (3.3) 0<XX T <Ik  π kp/2 Γk ρ − 12 p = 0 F1 ρ; Γk (ρ) T 1 4 AA  , where the region of integration is the set of all k × p matrices X such that XX T ∈ Sk0 and I − XX T ∈ Sk0 . In particular, on setting A = 0 we obtain Z T ρ− 12 (k+p+1) |Ik − XX | (3.4) 0<XX T <Ik  π kp/2 Γk ρ − 12 p , dX = Γk (ρ) a result which was used in Proposition 2.1. For the case in which Y is a 2 × 2 matrix, Muirhead [25] proved that (3.5) 0 F1 (ρ; Y) = ∞ X q=0 1 q! (ρ)2q ρ −  |Y |q 0 F1 (ρ + 2q; tr(Y )), 1 2 q where the 0 F1 functions on the right-hand side are the classical generalized hypergeometric functions given in (3.1). In the special case in which Y is of rank 1, it follows from Herz [13, p. 497], or directly from (3.5), that (3.6) 0 F1 (ρ; Y ) = 0 F1 (ρ; tr(Y )). 3.2. The normalizing constant for non-chordal graphs. We want to calculate Z IG (δ, D) = |K|δ exp(−tr(KD)) dK, Sp0 (G) the normalizing constant for G, a general non-chordal graph. By making the change of variables K → diag(D)−1/2 K diag(D)−1/2 we can assume, without loss of generality, that D has ones on the diagonal and therefore is a correlation matrix; this assumption will be maintained explicitly for the remainder of the paper. In the sequel, we will encounter a 2 × m matrix C = (Cij ), and then we use the notation |C{1,2},{i,j} | for the minor corresponding to rows 1 and 2 and to columns i and j, where i, j ∈ {1, . . . , m}. We will need L = (Lij ), a NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS 15 P P 2 × m matrix of non-negative integers such that 2i=1 m j=1 Lij = l, and we adopt the notation   m 2 X X l l! = Q2 Qm , Li+ = Lij , and L+j = Lij . L i=1 j=1 Lij ! j=1 i=1 We will P also have Q = (Qij )1≤i<j≤m , a vector of non-negative integers such that 1≤i<j≤m Qij = q, and we set   q q! =Q , Q 1≤i<j≤m Qij ! Qi+ = m X Qij , j=i+1 and Q+j = j−1 X Qij . i=1 In the following result, we obtain the normalizing constant for H2,m , a complete bipartite graph on 2 + m vertices. Proposition 3.1. The integral IH2,m (δ, D) converges absolutely for all δ > −1 and D ∈ S2+m 0 . Let C = (Cij ) denote the 2 × m submatrix of D corresponding to the edges in G; then IH2,m (δ, D) equals IH2,m (δ, Im+2 ) ∞ [(δ + 2)q ]m X 1   · 1 q! δ + 2 (m + 3) 2q l! δ + 2q + 12 (m + 3) l q=0 l=0  Y   Y m 2 Y m 2 X  l  Y  Lij 1 · (δ + 2)L+j Cij δ + q + 2 (m + 2) L i+ L j=1 i=1 j=1 i=1 L  Y  m X  q  Y  2Qij · |C{1,2},{i,j} | δ + L+j + 2 Q +Q , j+ +j Q ∞ X Q δ + 12 (m + 2) 1≤i<jm  q j=1 with   m 2 π m Γ2 δ + 23  Γ(δ + 2) Γ δ + 12 (m + 2) . (3.7) IH2,m (δ, Im+2 ) = 1 Γ2 δ + 2 (m + 3) Proof. We order the vertices such that   KAA KAB K= , KBA KBB where KAA = diag(κ1 , κ2 ), KBB = diag(k1 , . . . , km ), and KAB is unconstrained. We partition D in a similar way,   DAA DAB , D= DBA DBB 16 C. UHLER, A. LENKOSKI, D. RICHARDS where diag(D) = (1, . . . , 1) and DAB = C. By applying the determinant formula for block matrices and making a change of variables to replace KAB 1/2 1/2 by KAA KAB KBB , we obtain similarly as in the proof of Proposition 2.1: Z |K|δ exp(−tr(KD)) dK IH2,m (δ, D) = S2+m 0 (G) Z 1 = S2+m 0 (G) T |KAA |δ+ 2 m |KBB |δ+1 |Im − KAB KAB |δ · exp(−tr(KAA ) − tr(KBB )) h  i 1/2 1/2 · exp −2tr KAA KAB KBB C T dKAA dKAB dKBB . Applying (3.3) to integrate over KAB , we obtain  π m Γ2 δ + 32  IH2,m (δ, D) = Γ2 δ + 21 (m + 3) Z 1 · |KAA |δ+ 2 m |KBB |δ+1 exp(−tr(KAA ) − tr(KBB ))  · 0 F1 δ + 12 (m + 3); KAA CKBB C T dKAA dKBB . Applying (3.5) to expand this 0 F1 function of matrix argument in terms of a classical 0 F1 function of tr(KAA CKBB C T ), and applying (3.1), we get  T 1 0 F1 δ + 2 (m + 3); KAA CKBB C ∞ X 1   |KAA CKBB C T |q = 1 1 q! δ + (m + 3) δ + (m + 2) 2 2 2q q q=0  1 · 0 F1 δ + 2q + 2 (m + 3); tr(KAA CKBB C T ) ∞ X 1   |KAA CKBB C T |q = 1 1 q! δ + (m + 3) δ + (m + 2) 2 2 2q q q=0 · ∞ X l=0 l 1  tr(KAA CKBB C T ) . 1 l! δ + 2q + 2 (m + 3) l By the Binet-Cauchy formula (see Karlin [18, p. 1]), |KAA CKBB C T | = |KAA | · |CKBB C T | X = |KAA | ki kj |C{1,2},{i,j} |2 . 1≤i<j≤m 17 NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS Hence, by the Multinomial Theorem, |KAA CKBB C T |q = |KAA | q Xq Q = |KAA |q Q Y Qij 1≤i<j≤m m Xq Y Q ki kj |C{1,2},{i,j} |2 Q ! Qi+ +Q+i ki  Y  i=1 |C{1,2},{i,j} |2Qij  , 1≤i<j≤m where Q = (Qij )1≤i<j≤m is a vector of non-negative integers, as defined earlier. Also, 2 X m X T tr(KAA CKBB C ) = κi kj Cij , i=1 j=1 and hence, by the Multinomial Theorem, X l 2 X m (tr(KAA CKBB C T ))l = κi kj Cij i=1 j=1 = 2 Y m XlY L L (κi kj Cij )Lij i=1 j=1   ! m 2 2 Y m Y L+j Y Xl Y = (κi )Li+  kj  (Cij )Lij , L L i=1 j=1 i=1 j=1 where L = (Lij ) is a 2×m non-negative integer matrix defined earlier. Hence  ∞ X π m Γ2 δ + 32 1    IH2,m (δ, D) = 1 1 Γ2 δ + 2 (m + 3) q=0 q! δ + 2 (m + 3) 2q δ + 12 (m + 2) q ∞ X 1  l! δ + 2q + 12 (m + 3) l l=0   ! 2 Y m 2 Z ∞ Xl Y Y 1 δ+q+L + m i+ 2  e−κi dκi · Cij Lij  κi L i=1 j=1 i=1 0 L   Xq Y  · |C{1,2},{i,j} |2Qij  Q 1≤i<j≤m Q   m Z ∞ Y δ+Q +Q +L +1 · kj j+ +j +j e−kj dkj  . · j=1 0 18 C. UHLER, A. LENKOSKI, D. RICHARDS Evaluating each gamma integral and simplifying the outcomes, we obtain   2  m  π m Γ2 δ + 32  Γ(δ + 2) IH2,m (δ, D) = Γ δ + 21 (m + 2) 1 Γ2 δ + 2 (m + 3)  ∞ ∞ X δ + 12 (m + 2) q ((δ + 2)q )m X 1   · 1 q! δ + 2 (m + 3) 2q l! δ + 2q + 12 (m + 3) l q=0 l=0  Y  Y 2 Y m m 2 X l Y  Lij 1 · (δ + 2)L+j (Cij ) δ + q + 2 (m + 2) L i+ L i=1 j=1 j=1 i=1 L  Y  m X  q  Y 2Qij · |C{1,2},{i,j} | (δ + L+j + 2)Qj+ +Q+j . Q Q 1≤i<j≤m j=1 Finally, the value of IH2,m (δ, Im+2 ) is obtained by applying Theorem 2.1 or Theorem 2.5, so the proof now is complete. Note that if we set D = Im+2 in the proof of Proposition 3.1 then |C{1,2},{i,j} | = Cij = 0. Hence, in the infinite series, the only non-zero terms are those for which l = q = 0, so the series reduces identically to 1. The special structure of K was crucial for the proof of Proposition 3.1. We now combine Proposition 3.1 with the approach developed in Theorem 2.2, of representing K by its upper Cholesky decomposition, to describe how the normalizing constant changes when removing an edge from a chordal graph with maximal clique size at most 3. Similarly as in the proof of Theorem 2.5, the main difficulty lies in defining a good ordering of the nodes. For simplifying notation we denote the quotient of the normalizing constants for general D and the identity matrix by I¯G (δ, D), i.e., IG (δ, D) I¯G (δ, D) = . IG (δ, Ip ) As an example, note that I¯H2,m (δ, D) is given in Proposition 3.1. Corollary 3.2. Let G = (V, E) be an undirected graph of minimum fill-in 1 with vertices V = {1, . . . , p} and maximal clique size at most 3. Let Ge = (V, E e ) denote the graph G with one additional edge e, i.e., E e = E ∪ {e}, such that Ge is chordal and its maximal clique size is also at most 3. Let d denote the number of triangles formed by the edge e and two other edges in Ge . Then  1 |D{1,d+2} |d−1 −1/2 Γ δ + 2 (d + 2) I¯H2,d (δ, D) IGe (δ, D), IG (δ, D) = π Q d+1 Γ δ + 12 (d + 3) |D | {1,j,d+2} j=2 NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS 19 where D{i1 ,...,ik } denotes the principal submatrix of D corresponding to the rows and columns i1 , . . . , ik . Proof. We define an ordering of the vertices in such a way that the integral for the normalizing constant IG (δ, D) decomposes into an integral over a bipartite graph and an integral over the remaining variables. Similarly as in the proof of Theorem 2.5, label one of the end points of e as ‘1’, label the other end point as ‘d + 2’, and label the d vertices involved in triangles over the edge e by 2, . . . , d + 1. Label all remaining vertices by d + 3, . . . , p. Let Ḡ denote the moral DAG to G with edge set Ē and similarly for Ge . By Theorem 2.2, the normalizing constant for G decomposes into an integral over the variables A = {aij | (i, j) ∈ Ē, i, j ≤ d + 2} and an integral over the variables B = {aij | (i, j) ∈ Ē, aij ∈ / A}. The equivalent statement holds for the graph Ge with Ae = A ∪ {e} and B e = B. Note that the integral over B is the same for G as for Ge . The integral over A is the normalizing constant for the complete bipartite graph H2,d with U = {1, d + 2} and V = {2, . . . , d + 1} where every vertex in U is connected to all vertices in V , but there are no edges within U nor within V . The integral over Ae = A ∪ {e} is the normalizing constant for the complete bipartite graph H2,d with one additional edge connecting the two nodes in U . We denote e . So this graph by H2,d IG (δ, D) = IGe (δ, D) = IGe (δ, D) IH2,d (δ, D) e (δ, D) IH2,d IH2,d (δ, Id+2 )I¯H2,d (δ, D) , e (δ, D) IH2,d where I¯H2,d (δ, D) is given by Proposition 3.1. e The additional edge e makes the graph H2,m chordal and hence the normalizing constant is computed using (1.4): Qd+1 e (δ, D) = IH e (δ, Id+2 ) IH2,d 2,d j=2 |D{1,j,d+2} | |D{1,d+2} |d−1 By Theorem 2.5,  1 IH2,d (δ, Id+2 ) Γ δ + (d + 2) 2 . = π −1/2 e (δ, Id+2 ) IH2,d Γ δ + 12 (d + 3) . 20 C. UHLER, A. LENKOSKI, D. RICHARDS By collecting all terms we find IH2,d (δ, Id+2 )I¯H2,d (δ, D) |D1,d+2 |d−1 Qd+1 e (δ, Id+2 ) IH2,d j=2 |D1,j,d+2 |  |D{1,d+2} |d−1 Γ δ + 21 (d + 2)  I¯H2,d (δ, D) IGe (δ, D). Q d+1 Γ δ + 21 (d + 3) |D | {1,j,d+2} j=2 IG (δ, D) = IGe (δ, D) = π −1/2 The proof now is complete. Corollary 3.2 can be generalized to graphs of minimum fill-in 1 and arbitrary treewidth to obtain an extension of Theorem 2.5 to general D. This involves decomposing the normalizing constant for G into a normalizing constant for the chordal graph Ge and the quotient of the normalizing constants for the subgraph induced by the triangles over the edge e. This technical result is given in Theorem (S.3) in the Supplementary Material. We now prove our main result which can be applied to compute the normalizing constant for any graph. It involves showing how the normalizing constant changes when removing a whole clique from a graph. However, for graphs of minimum fill-in 1 it is advisable for computational reasons to use the specialized result given in Theorem 4 in the Appendix. In the following, we denote by GA the subgraph of G induced by the vertices A ⊂ V . In the following theorem, we will encounter a symmetric matrix TAA = (Tij )i,j∈A . Denoting Kronecker’s delta by δij , we define the matrix of differential operators,  ∂ ∂  = 12 (1 + δij ) , ∂TAA ∂Tij i,j∈A as in [9, 23]. The corresponding determinant, det(∂/∂TAA ), and the (r, s)th cofactor, Cof rs (∂/∂TAA ), are defined in the usual way. We will also make use of fractional powers of differential operators, a concept which is widely used in some areas of probability theory and mathematical analysis [3, 14] but which is new to the study of Wishart distributions for graphical models. In its simplest formulation, suppose a function f : R → R is such that its nth derivative, (d/dx)n f (x), can be analytically continued as a function of n to a domain in C; this allows us to define the αth derivative, (d/dx)α f (x) where α belongs to the domain α of analyticity. Gårding [9] defined fractional powers, det(∂/∂TAA ) , of the determinant det(∂/∂TAA ) by means of analytic continuation in α. We will apply Gårding’s fractional powers of operators to calculate the normalizing constant IG (δ, D), and we provide in Example 3.5 an explicit calculation for a case in which the fractional power of the determinant det(∂/∂TAA ) is −1/2. 21 NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS The following theorem is the main result of the paper. In this result, we express IG (δ, D) in terms of a series in which derivatives with respect to the UAA are calculated, then the outcome is evaluated at UAA = TAA , then derivatives with respect to the TAA are calculated, and then the resulting expression is evaluated at TAA = DAA . Theorem 3.3. Let G = (V, E) be an undirected graph and partition V = A ∪ B such that the induced subgraph GB is a clique. Let I = {(i, j) ∈ A × B | (i, j) ∈ E} denote the edges connecting A and B, and let I1 denote the end points in A and I2 the end points in B (i.e. the projection of I onto the first and second coordinate). Define  (3.8) ∂I1 ,I2 (D, TAA ) = − DI2 (r),I2 (s) Cof I1 (r),I1 (s)  ∂  ∂TAA |I| , r,s=1 a |I| × |I| matrix of differential operators. Then  1 IG (δ, D) = π |I|/2 Γ|B| δ + 21 (|B| + 1) |DBB |−(δ+ 2 (|B|+1)) −1/2 · det ∂I1 ,I2 (D, TAA ) X X −j · ··· det ∂I1 ,I2 (D, UAA ) .. 0≤jrs <∞ 1≤r≤s≤|I|  · (1 + δrs )jrs jrs DI1 (r),I2 (r) DIj1rs(s),I2 (s) jrs ! 1≤r≤s≤|I|  jrs · Cof rs ∂I1 ,I2 (D, UAA ) Y · IGA (δ + 21 |I| + j.. , UAA ) . UAA =TAA TAA =DAA As a corollary of this theorem, we obtain an analogous formula for the case in which D = Ip . Corollary 3.4. Let G = (V, E) be an undirected graph with vertices V = {1, . . . , p}. Let V be partitioned such that V = A ∪ B and the induced subgraph GB is a clique. Let I = {(i, j) ∈ A × B | (i, j) ∈ E} denote the edges connecting A, B and let I1 denote the end points in A and I2 the end 22 C. UHLER, A. LENKOSKI, D. RICHARDS points in B. Then IG (δ, Ip ) = π |I|/2 Γ|B| δ + 21 (|B| + 1)  · ∂I1 ,I2 (D, TAA )IGA (δ + |I|/2, TAA ) . TAA =I|A| Theorem 3.3 and Corollary 3.4 enable calculation of the normalizing constant of the G-Wishart distribution for any graph by removing cliques sequentially until the resulting graph is chordal, in which case the normalizing constant is known. In the following example we show how to apply Theorem 3.3 in order to compute the normalizing constant for general D for the graph G5 given in Figure 1. Example 3.5. We wish to calculate Z IG5 (δ, D) = |K|δ exp(−tr(KD)) dK. K∈S50 (G5 ) We partition the matrix K into blocks,   KAA KAB K= , T KAB KBB where KAA       k33 k34 k35 k11 k12 0 k14 k15 = , KAB = , KBB = k34 k44 k45  . k12 k22 k23 0 0 k35 k45 k55 Noting that KBB is unconstrained, we now apply Theorem 3.3. In the following, we provide all the ingredients of the calculation, viz.,   d23 I  I1 = (2, 1, 1), I2 = (3, 4, 5), vec(DAB ) = d14  , d15  Λ−1  d33 k11 −d34 k12 −d35 k12 d45 k22  . = |KAA |−1 −d34 k12 d44 k22 −d35 k12 d45 k22 d55 k22 NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS 23 Further, the matrix of differential operators is  ∂I1 ,I2 (D, TAA ) = − DI2 (r),I2 (s) Cof I1 (r),I1 (s)  −d33 ∂T∂11   =  12 d34 ∂T∂12  1 ∂ 2 d35 ∂T12 1 ∂ 2 d34 ∂T12 −d44 ∂T∂22 − 12 d45 ∂T∂22  ∂  ∂TAA 1 ∂ 2 d35 ∂T12 3 r,s=1    − 12 d45 ∂T∂22   ∂ −d55 ∂T22 and similarly for ∂I1 ,I2 (D, UAA ). Since KAA is unconstrained, the integral IGA (δ, UAA ) is a standard Wishart normalizing constant, so we have IGA (δ, UAA ) = Γ2 δ + 3 2  3 |UAA |−(δ+ 2 ) . Then from Theorem 3.3 we obtain IG5 (δ, D) = π 3/2 Γ3 (δ + 2) |DBB |−(δ+2) (det ∂I1 ,I2 (D, TAA ))−1/2 X X · ··· Γ2 (δ + 3 + j.. ) (det ∂I1 ,I2 (D, UAA ))−j.. 0≤jrs <∞ 1≤r≤s≤3  (3.9) · (1 + δrs )jrs jrs DI1 (r),I2 (r) DIj1rs(s),I2 (s) jrs ! 1≤r≤s≤3  jrs (Cof rs ∂I1 ,I2 (D, UAA )) · |UAA |−(δ+3+j.. ) Y . UAA =TAA TAA =DAA For the case in which D = I5 , we have DI1 (r),I2 (r) = 0 for all r = 1, 2, 3 and hence we deduce the result given in Corollary 3.4, viz., IG5 (δ, I5 ) = π 3/2 Γ3 (δ + 2) Γ2 (δ + 3) · (det ∂I1 ,I2 (D, TAA ))−1/2 |TAA |−(δ+3) . TAA =I|A| 24 C. UHLER, A. LENKOSKI, D. RICHARDS By (3.8), (det ∂I1 ,I2 (D,TAA ))n |TAA |−(δ+3) TAA =I|A|  ∂ n  ∂ 2n (T11 T22 )−(δ+3) = (−1)n ∂T11 ∂T22 T11 =T22 =1 = (δ + 3)(δ + 4) · · · (δ + 2 + n)(δ + 3)(δ + 4) · · · (δ + 2 + 2n) Γ(δ + 3 + n) Γ(δ + 3 + 2n) = . Γ(δ + 3) Γ(δ + 3) The latter expression, considered as a function of a complex variable n, is analytic in the complex plane on a region containing the point n = − 12 . Therefore, in accordance with Gårding’s fractional calculus, (det ∂I1 ,I2 (D, TAA ))−1/2 |TAA |−(δ+3) TAA =I|A| = = Γ(δ + 3 + n) Γ(δ + 3 + 2n) Γ(δ + 3) Γ(δ + 3) n=− 12 Γ(δ + 25 ) Γ(δ + 2) , Γ(δ + 3) Γ(δ + 3) so we obtain the same result for IG5 (δ, I5 ) as in (2.4). To complete this section, we now provide the proofs of Theorem 3.3 and Corollary 3.4. Proof of Theorem 3.3. The matrix K is of the form   KAA KAB K= ∈ Sp0 , T KBB KAB where KBB has no zero constraints. By applying the determinant formula for block matrices, T |K| = |KAA | · |KBB − KAB (KAA )−1 KAB |, NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS 25 T (K −1 and changing variables, KBB → KBB + KAB AA ) KAB , we obtain Z IG (δ, D) = |KBB |δ exp(−tr(KBB DBB )) dKBB Z · |KAA |δ exp(−tr(KAA DAA )) Z · exp(−2tr(KAB DAB )) T · exp(−tr(DBB KAB (KAA )−1 KAB )) dKAB dKAA and hence  1 IG (δ, D) = Γ|B| δ + 21 (|B| + 1) |DBB |−(δ+ 2 (|B|+1)) Z · |KAA |δ exp(−tr(KAA DAA )) Z · exp(−2tr(KAB DAB )) T · exp(−tr(DBB KAB (KAA )−1 KAB )) dKAB dKAA , where we applied (1.2) to compute the integral over KBB . Denote by vec(KAB ) the vectorized matrix KAB , written column-bycolumn. We apply a formula for the Kronecker product of matrices (see Muirhead [26, p. 76]) to obtain T tr(DBB KAB (KAA )−1 KAB ) = vec(KAB ) T  DBB ⊗ (KAA )−1 vec(KAB ). Let I = {(i, j) ∈ A × B | (KAB )ij 6= 0} and let I1 denote the projection of I onto the first index and I2 the projection of I onto the second index. I ) denote the column vector containing the non-zero entries of Let vec(KAB vec(KAB ) and let Λ−1 be a matrix containing the entries of DBB ⊗ (KAA )−1 I ), i.e., corresponding to the components of vec(KAB (3.10) −1 (Λ−1 )rs = DI2 (r),I2 (s) (KAA )I1 (r),I1 (s) 1 = DI2 (r),I2 (s) Cof I1 (r),I1 (s) (KAA ), |KAA | where Cof ij (KAA ) denotes the (i, j)-th entry of the cofactor matrix of KAA . Then I I tr(KAB DAB ) = vec(KAB )T vec(DAB ), T I I tr(DBB KAB (KAA )−1 KAB )) = vec(KAB )T Λ−1 vec(KAB ), 26 C. UHLER, A. LENKOSKI, D. RICHARDS and hence we obtain the integral over KAB in the form of a Gaussian integral: Z T exp(−2tr(KAB DAB )) exp(−tr(DBB KAB (KAA )−1 KAB )) dKAB Z I I = exp(−2 vec(KAB )T vec(DAB )) I I I · exp(−vec(KAB )T Λ−1 vec(KAB )) dKAB I I = π |I|/2 |Λ|1/2 exp(vec(DAB )T Λ vec(DAB )). Therefore,  1 IG (δ, D) = π |I|/2 Γ|B| δ + 21 (|B| + 1) |DBB |−(δ+ 2 (|B|+1)) Z · |KAA |δ+|I|/2 exp(−tr(KAA DAA )) · det  |I| −1/2 DI2 (r),I2 (s) Cof I1 (r),I1 (s) (KAA ) r,s=1 I I · exp(vec(DAB )T Λ vec(DAB )) dKAA . Now note that  |I|  (3.11) det DI2 (r),I2 (s) Cof I1 (r),I1 (s) (KAA ) r,s=1 exp(−tr(KAA DAA )) = det(∂I1 ,I2 (D, TAA )) exp(−tr(KAA TAA )) . TAA =DAA By analytic continuation [9], we obtain  1 IG (δ, D) = π |I|/2 Γ|B| δ + 21 (|B| + 1) |DBB |−(δ+ 2 (|B|+1)) (3.12) · det(∂I1 ,I2 (D, TAA ))−1/2 Z · |KAA |δ+|I|/2 exp(−tr(KAA TAA )) I I · exp(vec(DAB )T Λ vec(DAB )) dKAA . TAA =DAA Now we write the exponential function as an infinite series and apply the NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS 27 cofactor formula to express Λ in terms of the entries of Λ−1 : I I exp(vec(DAB )T Λ vec(DAB )) X X Y = ··· 0≤jrs <∞ 1≤r≤s≤|I| (1 + δrs )jrs jrs DI1 (r),I2 (r) DIj1rs(s),I2 (s) Λjrsrs jrs ! (1 + δrs )jrs jrs DI1 (r),I2 (r) DIj1rs(s),I2 (s) jrs ! 0≤jrs <∞ 1≤r≤s≤|I|  jrs |I| · |KAA |jrs Cof rs [DI2 (a),I2 (b) Cof I1 (a),I1 (b) (KAA )]a,b=1  −jrs |I| · det [DI2 (a),I2 (b) Cof I1 (a),I1 (b) (KAA )]a,b=1 . PP Denoting 0≤r<s≤|I| jrs by j.. , and introducing the differentials  ∂ ∂  1 = 2 (1 + δij ) ∂UAA ∂Uij i,j∈A = X ··· X Y similar to (3.11), we obtain  1 IG (δ, D) = π |I|/2 Γ|B| δ + 12 (|B| + 1) |DBB |−(δ+ 2 (|B|+1))   |I| −1/2  ∂ · det − DI2 (r),I2 (s) Cof I1 (r),I1 (s) ∂TAA r,s=1  |I| −j..   X X ∂ · ··· det − DI2 (a),I2 (b) Cof I1 (a),I1 (b) ∂UAA a,b=1 0≤jrs <∞ · Y 1≤r≤s≤|I| (1 + δrs )jrs jrs DI1 (r),I2 (r) DIj1rs(s),I2 (s) jrs !  · Cof rs  − DI2 (a),I2 (b) Cof I1 (a),I1 (b) ∂ ∂UAA · IGA (δ + |I|/2 + j.. , UAA )  |I| jrs ! a,b=1 , UAA =TAA TAA =DAA where in the last line we used the fact that Z IGA (δ, UAA ) = |KAA |δ exp(−tr(KAA UAA )) dKAA . This completes the proof. Proof of Corollary 3.4. This follows from Theorem 3.3 by setting D = Ip in (3.12). 28 C. UHLER, A. LENKOSKI, D. RICHARDS 4. Discussion. In this paper we provided an explicit representation of the G-Wishart normalizing constant for general graphs. Theorem 3.3 is our main result and it can be applied to compute the normalizing constant of any graph. However, for particular classes of graphs one might be able to obtain simpler formulas using a more specialized approach as can be seen by comparing the two formulas (3.9) and (4.1) for G5 . In Proposition 3.1 we provided a simpler formula for bipartite graphs H2,m , and in Corollary 3.2 and in Theorem 4 for graphs with minimum fill-in 1. Note that Corollary 3.2 and Theorem 4 can be applied to graphs of minimum fill-in 1 and also to graphs which are clique sums of graphs of minimum fill-in 1. Even in modest dimensions the size of the graph space necessitates iterative methods to address model uncertainty, as exhaustive enumeration is infeasible. Since the graphical model may be just one part of a larger hierarchy, Markov chain Monte Carlo methods are naturally used to perform posterior inference. In such scenarios the chain moves between graphs in each scan of the parameter set and the transition probability reduces to the evaluation of ratios of G-Wishart normalizing constants. Since direct evaluation of these constants has appeared infeasible, previous work used computationally intensive sampling-based methods to approximate this ratio. Our paper shows that computing the exact normalizing constant of the G-Wishart distribution is possible in principle. The various examples in this paper also make it clear that one can hope to find more computationally efficient procedures than Theorem 3.3 for computing the normalizing constant of the G-Wishart distribution for particular classes of graphs. Important future work is the development of specialized methods for computing the normalizing constants of different classes of graphs that are important for applications, one example being grids, which are widely used in spatial applications. Acknowledgments. C.U.’s research was supported by the Austrian Science Fund (FWF) Y 903-N35. A.L.’s research was supported by Statistics for Innovation sf i2 in Oslo. D.R.’s research was partially supported by the U.S. National Science Foundation grant DMS-1309808; and by a Romberg Guest Professorship at the Heidelberg University Graduate School for Mathematical and Computational Methods in the Sciences, funded by German Universities Excellence Initiative grant GSC 220/2. References. [1] Andrews, G. E., Askey, R. and Roy, R. (2000). Special Functions. Cambridge University Press, New York. MR1688958 NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS 29 [2] Atay-Kayis, A. and Massam, H. (2005). A Monte Carlo method for computing the marginal likelihood in nondecomposable Gaussian graphical models. Biometrika 92 317–335. MR2201362 [3] Bojdecki, T. and Gorostiza, L. G. (1999). Fractional Brownian motion via fractional Laplacian. Statist. & Probab. Letters 44 107–108. [4] Cheng, Y. and Lenkoski, A. (2012). Hierarchical Gaussian graphical models: Beyond reversible jump. Electron. J. Statist. 6 2309–2331. [5] Dawid, A. P. and Lauritzen, S. L. (1993). Hyper Markov laws in the statistical analysis of decomposable graphical models. Ann. Statist. 21 1272-1317. [6] Dempster, A. P. (1972). Covariance selection. Biometrics 28 157-175. [7] Dobra, A. and Lenkoski, A. (2011). Copula Gaussian graphical models and their application to modeling functional disability data. Ann. Appl. Statist. 5 969-993. [8] Dobra, A., Lenkoski, A. and Rodriguez, A. (2011). Bayesian inference for general Gaussian graphical models with application to multivariate lattice data. J. Amer. Statist. Assoc. 106 1418–1433. [9] Gårding, L. (1947). The solution of Cauchy’s problem for two totally hyperbolic linear differential equations by means of Riesz integrals. Ann. Math. 48 785-826. [10] Giri, N. C. (2004). Multivariate Statistical Analysis. Marcel Dekker, New York. MR0468025 [11] Giudici, P. and Green, P. J. (1999). Decomposable graphical Gaussian model determination. Biometrika 86 785–801. [12] Gross, K. I. and Richards, D. St. P. (1987). Special functions of matrix argument. I. Algebraic induction, zonal polynomials, and hypergeometric functions. Trans. Amer. Math. Soc. 301 781–811. MR0882715 [13] Herz, C. S. (1955). Bessel functions of matrix argument. Ann. Math. 61 474–523. MR0069960 [14] Hille, E. and Phillips, R. S. (1957). Functional Analysis and Semigroups. Amer. Math. Soc. Colloq. Publ., vol. 31, Providence, R.I. [15] Ingham, A. E. (1933). An integral which occurs in statistics. Math. Proc. Camb. Phil. Soc. 29 271–276. [16] James, A. T. (1964). Distributions of matrix variates and latent roots derived from normal samples. Ann. Math. Statist. 35 475–501. MR0181057 [17] Jones, B., Carvalho, C., Dobra, A., Hans, C., Carter, C. and West, M. (2005). Experiments in stochastic computation for high-dimensional graphical models. Statist. Sci. 20 388-400. [18] Karlin, S. (1968). Total Positivity 1. Stanford University Press, Stanford, CA. MR0230102 [19] Lauritzen, S. L. (1996). Graphical Models. Oxford University Press, New York. MR1419991 [20] Lenkoski, A. (2013). A direct sampler for G-Wishart variates. Stat 2 119–128. [21] Lenkoski, A. and Dobra, A. (2011). Computational aspects related to inference in Gaussian graphical models with the G-Wishart prior. J. Comput. Graph. Statist. 20 140–157. MR2816542 [22] Letac, G. and Massam, H. (2007). Wishart distributions for decomposable graphs. Ann. Statist. 35 1278–323. [23] Maass, H. (1971). Siegel’s Modular Forms and Dirichlet Series. Lecture Notes in Mathematics 216. Springer, Heidelberg. [24] Mitsakakis, N., Massam, H. and Escobar, M. D. (2011). A Metropolis-Hastings based method for sampling from the G-Wishart distribution in Gaussian graphical models. Electron. J. Statist. 5 18–30. 30 C. UHLER, A. LENKOSKI, D. RICHARDS [25] Muirhead, R. J. (1975). Expressions for some hypergeometric functions of matrix argument with applications. J. Multivariate Anal. 5 283–293. MR0381137 [26] Muirhead, R. J. (1982). Aspects of Multivariate Statistical Theory. Wiley, Hoboken, NJ. MR0652932 [27] Olkin, I. (2002). The 70th anniversary of the distribution of random matrices: A survey. Linear Algebra Appl. 354 231–243. MR1927659 [28] Piccioni, M. (2000). Independence structure of natural conjugate densities to exponential families and the Gibbs sampler. Scand. J. Statist. 27 111–27. [29] Roverato, A. (2002). Hyper inverse Wishart distribution for non-decomposable graphs and its application to Bayesian inference for Gaussian graphical models. Scand. J. Statist. 29 391–411. MR1925566 [30] Siegel, C. L. (1935). Über die analytische Theorie der quadratischen Formen. Ann. Math. 36 527–606. MR1503238 [31] Speed, T. P. and Kiiveri, H. (1986). Gaussian Markov distributions over finite graphs. Ann. Statistics 14 138–150. [32] Wang, H. and Carvalho, C. M. (2010). Simulation of hyper-inverse Wishart distributions for non-decomposable graphs. Electron. J. Statist. 4 1470–1475. [33] Wang, H. and Li, S. Z. (2012). Efficient Gaussian graphical model determination under G-Wishart prior distributions. Electron. J. Statist. 6 168–198. [34] Wishart, J. (1928). The generalised product moment distribution in samples from a normal multivariate population. Biometrika 20A 32–52. [35] Wishart, J. and Bartlett, M. S. (1933). The generalised product moment distribution in a normal system. Math. Proc. Camb. Phil. Soc. 29 260–270. Supplementary Material. Exact Formulas for the Normalizing Constants of Wishart Distributions for Graphical Models with Minimum Fill-In 1. In the following, we prove an extension of Corollary 3.2 to obtain a generalization of Theorem 2.5 for arbitrary D. This requires generalizing Proposition 3.1 to block matrices of the form   KAA KAB K= ∈ Sp0 T KAB KBB where KAA is arbitrary of size 2 × 2, KAB is complete of size 2 × m and KBB is arbitrary of size m × m. In Lemma (S.1) we analyze the case in which KAA is complete and in Lemma (S.2) the case in which KAA is diagonal. Lemma (S.1). Let G be a graph on 2 + m vertices with two nodes that are connected to each other and to all other nodes, i.e. K is of the form   KAA KAB K= ∈ S2+m T 0 , KAB KBB where KAA is a complete 2 × 2 matrix, KAB is a complete 2 × m matrix and KBB is an arbitrary m × m matrix. Then the integral IG (δ, D) converges NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS 31 absolutely for all δ > −1 and D ∈ S2+m 0 . Further, IG (δ, D) = π m Γ2 δ + 3 2  1 |DAA |−(δ+ 2 (m+3))  −1 T · IGB δ + 1, DBB − DAB DAA DAB . Proof. By applying the determinant formula for block matrices, making 1/2 1/2 a change of variables to replace KAB by KAA KAB KBB and applying (3.3) as in the proof of Proposition 3.1 we find that  π m Γ2 δ + 32  IG (δ, D) = Γ2 δ + 12 (m + 3) Z 1 · |KAA |δ+ 2 m |KBB |δ+1 exp(−tr(KAA DAA ) − tr(KBB DBB ))  T dKAA dKBB . · 0 F1 δ + 12 (m + 3); KAA DAB KBB DAB Since KAA is complete, we can apply (3.2):   1 IG (δ, D) = π m Γ2 δ + 32 |DAA |− δ+ 2 (m+3) Z −1 T · |KBB |δ+1 exp(−tr(KBB (DBB − DAB DAA DAB )) dKBB = π m Γ2 δ + 3 2  1 |DAA |−(δ+ 2 (m+3)) −1 T DAB ). · IGB (δ + 1, DBB − DAB DAA This completes the proof. In the following lemma, we will encounter a symmetric matrix EBB = (Eij )i,j∈B . Denoting Kronecker’s delta by δij , we define the matrix of differential operators,  ∂ ∂  = 21 (1 + δij ) ∂EBB ∂Eij i,j∈B and denote its minor corresponding to the rows {α1 , α2 } and the columns {β1 , β2 } by  ∂  . ∂EBB {α1 α2 },{β1 β2 } Lemma (S.2). Let G be a graph on 2 + m vertices with two nodes that are connected to all other nodes but not to each other, i.e. K is of the form   KAA KAB K= ∈ Sm+2 T 0 , KAB KBB 32 C. UHLER, A. LENKOSKI, D. RICHARDS where KAA = diag(κ1 , κ2 ), KAB is a complete 2 × m matrix, and KBB is an arbitrary m × m matrix. Then the integral IG (δ, D) converges absolutely for all δ > −1 and D ∈ S2+m 0 , and IG (δ, D) is given by   ∞ X δ + 12 (m + 2) q    π m Γ2 δ + 32 2  Γ δ + 12 (m + 2)  Γ2 δ + 12 (m + 3) q! δ + 12 (m + 3) 2q q=0  2 ∞ X  l  Y X  1 1  δ + q + 2 (m + 2) l · i l! δ + 2q + 12 (m + 3) l l +l =l l1 i=1 l=0 1 2    Y Xq Y  2 |DA,{α1 ,α2 } |Qα1 α2 ++ |DA,{β1 ,β2 } |Q++β1 β · Q 3≤α1 <α2 ≤m+2 Q 3≤β1 <β2 ≤m+2   Qα1 α2 β1 β2       Y  ∂ l1 ∂ l2  ∂   ·   ∂t1 ∂t2 ∂EBB {α1 α2 },{β1 β2 } 3≤α1 <α2 ≤m+2 3≤β1 <β2 ≤m+2 · IGB (δ + 1, EBB ) , P T EBB =DBB − 2j=1 tj D{j},B D{j},B t1 =t2 =0 where Q = (Qα1 α2 β1 β2 : 3 ≤ α1 < α2 ≤ m + 2, 3 ≤ β1 < β2 ≤ m + 2) is a vector of non-negative integers such that Q++++ = q. Proof. By applying the determinant formula for block matrices, making 1/2 1/2 a change of variables to replace KAB by KAA KAB KBB and applying (3.3) as in the proof of Proposition 3.1 we find that  π m Γ2 δ + 23  IG (δ, D) = Γ2 δ + 12 (m + 3) Z 1 · |KAA |δ+ 2 m |KBB |δ+1 exp(−tr(KAA DAA ) − tr(KBB DBB ))  T · 0 F1 δ + 12 (m + 3); KAA DAB KBB DAB dKAA dKBB . Applying (3.5) and (3.1) as in the proof of Proposition 3.1 we obtain  T 1 0 F1 δ + 2 (m + 3); KAA DAB KBB DAB ∞ X 1 T q   |KAA DAB KBB DAB = | 1 1 q! δ + (m + 3) δ + (m + 2) 2 2 2q q q=0 · ∞ X l=0 l 1 T  tr(KAA DAB KBB DAB ) . 1 l! δ + 2q + 2 (m + 3) l 33 NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS Since KAA = diag(κ1 , κ2 ), T tr(KAA DAB KBB DAB ) T T D{2},B ) D{1},B ) + κ2 tr(KBB D{2},B = κ1 tr(KBB D{1},B and hence by the Multinomial Theorem X l l l T T D{1},B ) 1 κl11 κl22 tr(KBB D{1},B tr(KAA KAB KBB KAB ) = l1 l1 +l2 =l l T · tr(KBB D{2},B D{2},B ) 2 . By the Binet-Cauchy formula ([18, p. 1]), T |KAA DAB KBB DAB | T = |KAA | · |DAB KBB DAB | X = κ1 κ2 |DA,{α1 ,α2 } | |K{α1 ,α2 },{β1 ,β2 } ||DA,{β1 ,β2 } |. 3≤α1 <α2 ≤m+2 3≤β1 <β2 ≤m+2 Hence by the Multinomial Theorem, T q |KAA DAB KBB DAB | = κq1 κ2 q Xq Q Q = κq1 κ2 q Y |DA,{α1 ,α2 } |Qα1 α2 β1 β2 3≤α1 <α2 ≤m+2 3≤β1 <β2 ≤m+2 · |K{α1 ,α2 },{β1 ,β2 } |Qα1 α2 β1 β2 |DA,{β1 ,β2 } |Qα1 α2 β1 β2  Y X  q  |DA,{α1 ,α2 } |Qα1 α2 ++ Q 3≤α1 <α2 ≤m+2 Q   Y |DA,{β1 ,β2 } |Q++β1 β2 · 3≤α1 <α2 ≤m+2  · Y 3≤α1 <α2 ≤m+2 3≤β1 <β2 ≤m+2 Qα1 α2 β1 β2 |K{α1 ,α2 },{β1 ,β2 } |  . 34 C. UHLER, A. LENKOSKI, D. RICHARDS Collecting all terms, we find that IG (δ,D)  ∞ X π m Γ2 δ + 23 1    = 1 1 Γ2 δ + 2 (m + 3) q=0 q! δ + 2 (m + 3) 2q δ + 12 (m + 2) q  ∞ 2 Z ∞ X X  l  Y 1 δ+q+li + 21 m −κi  · κi e dκi l! δ + 2q + 21 (m + 3) l l +l =l l1 0 i=1 l=0 1 2  X  q  Y Qα1 α2 ++ · |DA,{α1 ,α2 } | Q 3≤α1 <α2 ≤m+2 Q   Y Q++β1 β2 · |DA,{β1 ,β2 } | 3≤β1 <β2 ≤m+2 Z · δ+1 |KBB | Y  2 l j T exp(−tr(KBB DBB )) tr(KBB D{j},B D{j},B ) j=1 ! · Y Qα1 α2 β1 β2 |K{α1 ,α2 },{β1 ,β2 } | dKBB . 3≤α1 <α2 ≤m+2 3≤β1 <β2 ≤m+2 The gamma integrals over κ1 and κ2 are computed readily, so only the integral over the variables KBB remains to be evaluated, and we shall evaluate that integral in terms of a normalizing constant for the graph GB . First, note that 2  l j Y T tr(KBB D{j},B D{j},B ) exp − tr(KBB DBB ) j=1  = ∂ ∂t1 l1  where EBB = DBB − ∂ ∂t2 l2 2 X   exp − tr(KBB EBB ) , t1 =t2 =0 T tj D{j},B D{j},B . j=1 Let Eij denote the entry of EBB corresponding to nodes i and j in B. Then Z |KBB |δ+1 exp(−tr(KBB EBB )) |K{α1 ,α2 },{β1 ,β2 } |Qα1 α2 β1 β2 dKBB Z  ∂  Qα1 α2 β1 β2 = |KBB |δ+1 exp(−tr(KBB EBB )) dKBB . ∂EBB {α1 α2 },{β1 β2 } By collecting all terms, we obtain the desired result. NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS 35 With these two lemmas, we now have the tools to generalize Corollary 3.2 to graphs of treewidth larger than 2. In the following theorem, we show how the normalizing constant changes when removing one edge from an arbitrary chordal graph G. Theorem (S.3). Let G = (V, E) be an undirected graph with minimum fill-in 1 on p vertices. Let Ge = (V, E e ) denote the graph G with one additional edge e, i.e., E e = E ∪ {e} such that Ge is chordal. Let d denote the number of triangles formed by the edge e and two other edges in Ge . Let V be partitioned such that V = A ∪ B ∪ C with |A| = 2, |B| = d, |C| = p − d − 2, and where A contains the two vertices adjacent to the edge e in Ge , B contains all vertices in Ge that span a triangle with the edge e, and C contains all remaining nodes. Then IG (δ, D) is given by   ∞ 1 X δ + 12 (d + 2) q 1 −1/2 Γ δ + 2 (d + 2) (d+3) δ+  π IGe (δ, D) |DAA | 2 1 (d + 3) Γ δ + 12 (d + 3) q! δ + 2 2q q=0   ∞ 2 X X  1 l Y  · δ + q + 21 (d + 2) l 1 i l! δ + 2q + 2 (d + 3) l l +l =l l1 i=1 l=0 1 2    Xq Y Y  · |DA,{α1 ,α2 } |Qα1 α2 ++ |DA,{β1 ,β2 } |Q++β1 β2 Q 3≤α1 <α2 ≤d+2 Q  · · ∂ ∂t1 IGB l1  ∂ ∂t2 l2 3≤β1 <β2 ≤d+2  Y 3≤α1 <α2 ≤d+2 3≤β1 <β2 ≤d+2 ∂  ∂EBB {α1 α2 },{β1 β2 } IGB (δ + 1, EBB )  T D −1 D δ + 1, DBB − DAB AA AB Qα1 α2 β1 β2 ! . EBB =DBB − P2 T j=1 tj D{j},B D{j},B t1 =t2 =0 Proof. Let GAB be the graph induced by the vertices A ∪ B. By Theorem 2.2 and as in the proof of Corollary 3.2, the normalizing constants for G and Ge decompose into the normalizing constants for GAB and GeAB , respectively, and an integral over the variables involving C. Moreover, the integral over the variables involving C is the same for G and for Ge . Hence, IG (δ, D) IGe (δ, D) = IGAB (δ, D{A,B},{A,B} ) , IGeAB (δ, D{A,B},{A,B} ) where D{A,B},{A,B} denotes the principle submatrix of D corresponding to the rows and columns in A ∪ B. Since GAB is of the form needed for 36 C. UHLER, A. LENKOSKI, D. RICHARDS Lemma (S.2) and GeAB is of the form needed for Lemma (S.1), the claim follows by applying Lemma (S.1) and Lemma (S.2). Note that since Ge is chordal, the induced graph GB is also chordal. Hence its normalizing constant is given by (1.4). For the case in which D is the identity matrix, EBB ≡ DBB and hence for l1 > 0 or l2 > 0 we get  ∂ l1  ∂ l2 ∂t1 ∂t2  Y 3≤α1 <α2 ≤d+2 3≤β1 <β2 ≤d+2 · ∂  ∂EBB {α1 α2 },{β1 β2 } IGB Qα1 α2 β1 β2 ! IGB (δ + 1, EBB )  = 0. T D −1 D δ + 1, DBB − DAB AA AB In addition, |DA,{α1 ,α2 } | = |DA,{β1 ,β2 } | = 0. Hence, in the infinite sums only the terms for q = 0 and l = 0 are non-zero, and the infinite series reduce to 1. Since |DAA | = 1, we see that if D = Ip then Theorem (S.3) reduces to Theorem 2.5. We revisit the graph G5 discussed in Example 2.6 and show how to apply Theorem (S.3) to obtain the normalizing constant, IG5 (δ, D), explicitly. Example (S.4). A minimal chordal cover of G5 is given in Figure 1 (right). Only one edge is in the chordal cover of G5 but not in G5 itself, namely the edge e = (1, 3). We denote the chordal cover of G5 by Ge5 . There are d = 3 triangles formed by the edge e in Ge5 . The vertices adjacent to the edge e are A = {1, 3} and all remaining vertices span a triangle with the edge e, i.e. B = {2, 4, 5}. The induced graph GB consists of one edge only, namely (4, 5), so its normalizing constant is 3 IGB (δ, DB ) = |D{4,5} |−(δ+ 2 ) Γ2 δ + 3 2  Γ(δ + 1), where, in order to abbreviate notation, we denoted by DB and D{4,5} , respectively, the principle submatrix of D corresponding to the rows and columns in B and in {4, 5}, respectively. Hence by applying Theorem (S.3), we obtain NORMALIZING CONSTANTS FOR G-WISHART DISTRIBUTIONS 37 the following formula for IG5 (δ, D):   ∞ X δ + 52 q Γ δ + 52 δ+3  π IGe5 (δ, D) |DAA | Γ(δ + 3) q! δ + 3 2q q=0   ∞ 2 X X  l Y 1  δ + q + 52 l · i l! δ + 2q + 3 l l +l =l l1 i=1 l=0 1 2      Y X q Y |DA,{α1 ,α2 } |Qα1 α2 ++ · Q −1/2 Q |DA,{β1 ,β2 } | {β1 ,β2 }⊂{2,4,5} {α1 ,α2 }⊂{2,4,5}  ∂ l1  ∂ l2 · ∂t1 ∂t2  Q++β1 β2  Y {α1 ,α2 }⊂{2,4,5} {β1 ,β2 }⊂{2,4,5} ∂  ∂EBB {α1 α2 },{β1 β2 } Qα1 α2 β1 β2 ! 3 · −1 T |D{4,5} − DA,{4,5} DAA DA,{4,5} |δ+ 2 . 3 |E{4,5} |δ+ 2 EBB =DBB − P2 T j=1 tj D{j},B D{j},B t1 =t2 =0 Note that when 2 ∈ {α1 , α2 } or 2 ∈ {β1 , β2 } and Qα1 α2 β1 β2 > 0, then  ∂  ∂EBB {α1 α2 },{β1 β2 } Qα1 α2 β1 β2 3 |E{4,5} |−(δ+ 2 ) = 0. As a consequence, the normalizing constant for IG5 (δ, D) is given by   ∞ 5 X δ + 25 q Γ δ + 2  |DA,{4,5} |2q π −1/2 IGe5 (δ, D) |DAA |δ+3 Γ (δ + 3) q! δ + 3 2q q=0       ∞ 2 X X l Y  1 ∂ l1 ∂ l2 ∂ 5  · δ+q+ 2 l i ∂t1 ∂t2 ∂E{4,5} l1 l! δ + 2q + 3 l l=0 l1 +l2 =l i=1 3 · −1 T |D{4,5} − DA,{4,5} DAA DA,{4,5} |δ+ 2 , 3 |E{4,5} |δ+ 2 E{4,5} =D{4,5} − P2 T j=1 tj D{j},{4,5} D{j},{4,5} t1 =t2 =0 P T the evaluation being done first at E{4,5} = D{4,5} − 2j=1 tj D{j},{4,5} D{j},{4,5} e and last at t1 = t2 = 0. Since G5 is chordal, the corresponding normalizing constant is obtained from (1.4): 5 IGe5 (δ, D) = Γ3 (δ + 2) Γ4  |D{1,2,3} |−(δ+2) |D{1,3,4,5} |−(δ+ 2 ) . δ+  3 |D |−(δ+ 2 ) Γ δ + 3 5 2 {1,3} 2 2 q 38 C. UHLER, A. LENKOSKI, D. RICHARDS Note also that ∂ ∂E{4,5} q |E{4,5} | −(δ+ 23 ) 2q = (−1)  Γ2 δ + 32 + q 3  |E{4,5} |−(δ+ 2 +q) ; 3 Γ2 δ + 2 this can be obtained by writing Icomplete (δ, D) as an integral in Equation (1.2) and applying the differential operator ∂/∂E{4,5} to both sides of the equation Maass [23, p. 81]. Hence, by collecting all terms, noting that A = {1, 3} and simplifying the formula for IG5 (δ, D) above, we obtain the normalizing constant for G5 for general D: IG5 (δ, D) = IG5 (δ, I5 ) 9 · ∞ X |D{1,3} |2δ+ 2 |D{1,2,3} |δ+2 |D δ+ 52 {1,3,4,5} | q=0 δ + 32  q! δ + 3 2q δ+ 5 2 q   q (4.1) 2q · |D{1,3}{4,5} | ∞ X l=0 1 l! (δ + 2q + 3)l 2 X l Y  δ + q + 52 l i l1 l1 +l2 =l i=1 3 −1 δ+ 2  ∂ l1  ∂ l2 |D{4,5} − DT {1,3},{4,5} D{1,3} D{1,3},{4,5} | · P 3 ∂t1 ∂t2 |D{4,5} − 2 tj DT D{j},{4,5} |δ+q+ 2 j=1 {j},{4,5} . t1 =t2 =0 T If D = I5 then D{j},{4,5} D{j},{4,5} = 0 and hence for l1 > 0 or l2 > 0 we get 3 δ+ 2 −1  ∂ l1  ∂ l2 D{4,5} − DT {1,3},{4,5} D{1,3} D{1,3},{4,5} = 0. P δ+q+ 32 ∂t1 ∂t2 T D{4,5} − 2j=1 tj D{j},{4,5} D{j},{4,5} In addition, |D{1,3},{4,5} | = 0. Hence in the infinite sums only the terms for q = 0 and l = 0 are non-zero, and the infinite sums reduce to 1. Since |D{1,3} | = |D{1,2,3} | = |D{1,3,4,5} | = 1, we see that the formula for IG5 (δ, D) indeed reduces to IG5 (δ, I5 ). C. Uhler Laboratory for Information and Decision Systems and Institute for Data, Systems and Society Massachusetts Institute of Technology Cambridge, MA 02139, U.S.A. E-mail: [email protected] A. Lenkoski Norwegian Computing Center Oslo, Norway E-mail: [email protected] D. Richards Department of Statistics Penn State University University Park, PA 16802, U.S.A. E-mail: [email protected]
10math.ST
Texture Synthesis Using Convolutional Neural Networks arXiv:1505.07376v3 [cs.CV] 6 Nov 2015 Leon A. Gatys Centre for Integrative Neuroscience, University of Tübingen, Germany Bernstein Center for Computational Neuroscience, Tübingen, Germany Graduate School of Neural Information Processing, University of Tübingen, Germany [email protected] Alexander S. Ecker Centre for Integrative Neuroscience, University of Tübingen, Germany Bernstein Center for Computational Neuroscience, Tübingen, Germany Max Planck Institute for Biological Cybernetics, Tübingen, Germany Baylor College of Medicine, Houston, TX, USA Matthias Bethge Centre for Integrative Neuroscience, University of Tübingen, Germany Bernstein Center for Computational Neuroscience, Tübingen, Germany Max Planck Institute for Biological Cybernetics, Tübingen, Germany Abstract Here we introduce a new model of natural textures based on the feature spaces of convolutional neural networks optimised for object recognition. Samples from the model are of high perceptual quality demonstrating the generative power of neural networks trained in a purely discriminative fashion. Within the model, textures are represented by the correlations between feature maps in several layers of the network. We show that across layers the texture representations increasingly capture the statistical properties of natural images while making object information more and more explicit. The model provides a new tool to generate stimuli for neuroscience and might offer insights into the deep representations learned by convolutional neural networks. 1 Introduction The goal of visual texture synthesis is to infer a generating process from an example texture, which then allows to produce arbitrarily many new samples of that texture. The evaluation criterion for the quality of the synthesised texture is usually human inspection and textures are successfully synthesised if a human observer cannot tell the original texture from a synthesised one. In general, there are two main approaches to find a texture generating process. The first approach is to generate a new texture by resampling either pixels [5, 28] or whole patches [6, 16] of the original texture. These non-parametric resampling techniques and their numerous extensions and improvements (see [27] for review) are capable of producing high quality natural textures very efficiently. However, they do not define an actual model for natural textures but rather give a mechanistic procedure for how one can randomise a source texture without changing its perceptual properties. In contrast, the second approach to texture synthesis is to explicitly define a parametric texture model. The model usually consists of a set of statistical measurements that are taken over the 1 1 512 ... 4 conv5_ 3 2 1 1 pool4 512 ... 4 conv4_ 3 2 1 1 256 ... pool3 4 conv3_ 3 2 1 pool2 1 1 128 ... 64 ... # feature maps conv2_ 1 2 pool1 conv1_ 2 1 Gradient descent input Figure 1: Synthesis method. Texture analysis (left). The original texture is passed through the CNN and the Gram matrices Gl on the feature responses of a number of layers are computed. Texture ˆ is passed through the CNN and a loss function El is synthesis (right). A white noise image ~x computed on every layer included in the texture model. The total loss function L is a weighted sum of the contributions El from each layer. Using gradient descent on the total loss with respect to the pixel values, a new image is found that produces the same Gram matrices Ĝl as the original texture. spatial extent of the image. In the model a texture is uniquely defined by the outcome of those measurements and every image that produces the same outcome should be perceived as the same texture. Therefore new samples of a texture can be generated by finding an image that produces the same measurement outcomes as the original texture. Conceptually this idea was first proposed by Julesz [13] who conjectured that a visual texture can be uniquely described by the Nth-order joint histograms of its pixels. Later on, texture models were inspired by the linear response properties of the mammalian early visual system, which resemble those of oriented band-pass (Gabor) filters [10, 21]. These texture models are based on statistical measurements taken on the filter responses rather than directly on the image pixels. So far the best parametric model for texture synthesis is probably that proposed by Portilla and Simoncelli [21], which is based on a set of carefully handcrafted summary statistics computed on the responses of a linear filter bank called Steerable Pyramid [24]. However, although their model shows very good performance in synthesising a wide range of textures, it still fails to capture the full scope of natural textures. In this work, we propose a new parametric texture model to tackle this problem (Fig. 1). Instead of describing textures on the basis of a model for the early visual system [21, 10], we use a convolutional neural network – a functional model for the entire ventral stream – as the foundation for our texture model. We combine the conceptual framework of spatial summary statistics on feature responses with the powerful feature space of a convolutional neural network that has been trained on object recognition. In that way we obtain a texture model that is parameterised by spatially invariant representations built on the hierarchical processing architecture of the convolutional neural network. 2 2 Convolutional neural network We use the VGG-19 network, a convolutional neural network trained on object recognition that was introduced and extensively described previously [25]. Here we give only a brief summary of its architecture. We used the feature space provided by the 16 convolutional and 5 pooling layers of the VGG-19 network. We did not use any of the fully connected layers. The network’s architecture is based on two fundamental computations: 1. Linearly rectified convolution with filters of size 3 × 3 × k where k is the number of input feature maps. Stride and padding of the convolution is equal to one such that the output feature map has the same spatial dimensions as the input feature maps. 2. Maximum pooling in non-overlapping 2×2 regions, which down-samples the feature maps by a factor of two. These two computations are applied in an alternating manner (see Fig. 1). A number of convolutional layers is followed by a max-pooling layer. After each of the first three pooling layers the number of feature maps is doubled. Together with the spatial down-sampling, this transformation results in a reduction of the total number of feature responses by a factor of two. Fig. 1 provides a schematic overview over the network architecture and the number of feature maps in each layer. Since we use only the convolutional layers, the input images can be arbitrarily large. The first convolutional layer has the same size as the image and for the following layers the ratio between the feature map sizes remains fixed. Generally each layer in the network defines a non-linear filter bank, whose complexity increases with the position of the layer in the network. The trained convolutional network is publicly available and its usability for new applications is supported by the caffe-framework [12]. For texture generation we found that replacing the maxpooling operation by average pooling improved the gradient flow and one obtains slightly cleaner results, which is why the images shown below were generated with average pooling. Finally, for practical reasons, we rescaled the weights in the network such that the mean activation of each filter over images and positions is equal to one. Such re-scaling can always be done without changing the output of a neural network if the non-linearities in the network are rectifying linear 1 . 3 Texture model The texture model we describe in the following is much in the spirit of that proposed by Portilla and Simoncelli [21]. To generate a texture from a given source image, we first extract features of different sizes homogeneously from this image. Next we compute a spatial summary statistic on the feature responses to obtain a stationary description of the source image (Fig. 1A). Finally we find a new image with the same stationary description by performing gradient descent on a random image that has been initialised with white noise (Fig. 1B). The main difference to Portilla and Simoncelli’s work is that instead of using a linear filter bank and a set of carefully chosen summary statistics, we use the feature space provided by a highperforming deep neural network and only one spatial summary statistic: the correlations between feature responses in each layer of the network. To characterise a given vectorised texture ~x in our model, we first pass ~x through the convolutional neural network and compute the activations for each layer l in the network. Since each layer in the network can be understood as a non-linear filter bank, its activations in response to an image form a set of filtered images (so-called feature maps). A layer with Nl distinct filters has Nl feature maps each of size Ml when vectorised. These feature maps can be stored in a matrix F l ∈ RNl ×Ml , where l Fjk is the activation of the j th filter at position k in layer l. Textures are per definition stationary, so a texture model needs to be agnostic to spatial information. A summary statistic that discards the spatial information in the feature maps is given by the correlations between the responses of 1 Source code to generate textures with CNNs as well as the rescaled VGG-19 network can be found at http://github.com/leongatys/DeepTextures 3 different features. These feature correlations are, up to a constant of proportionality, given by the Gram matrix Gl ∈ RNl ×Nl , where Glij is the inner product between feature map i and j in layer l: X l l Glij = Fik Fjk . (1) k 1 2 L A set of Gram matrices {G , G , ..., G } from some layers 1, . . . , L in the network in response to a given texture provides a stationary description of the texture, which fully specifies a texture in our model (Fig. 1A). 4 Texture generation To generate a new texture on the basis of a given image, we use gradient descent from a white noise image to find another image that matches the Gram-matrix representation of the original image. This optimisation is done by minimising the mean-squared distance between the entries of the Gram matrix of the original image and the Gram matrix of the image being generated (Fig. 1B). ˆ be the original image and the image that is generated, and Gl and Ĝl their respective Let ~x and ~x Gram-matrix representations in layer l (Eq. 1). The contribution of layer l to the total loss is then 2 X 1 El = Glij − Ĝlij (2) 2 2 4Nl Ml i,j and the total loss is ˆ) = L(~x, ~x L X wl El (3) l=0 where wl are weighting factors of the contribution of each layer to the total loss. The derivative of El with respect to the activations in layer l can be computed analytically:    ( 1 l T l l ( F̂ ) G − Ĝ if F̂ijl > 0 ∂El 2 2 Nl Ml ji = (4) ∂ F̂ijl 0 if F̂ijl < 0 . ˆ), with respect to the pixels ~x ˆ can be readily The gradients of El , and thus the gradient of L(~x, ~x ∂L computed using standard error back-propagation [18]. The gradient ∂ ~xˆ can be used as input for some numerical optimisation strategy. In our work we use L-BFGS [30], which seemed a reasonable choice for the high-dimensional optimisation problem at hand. The entire procedure relies mainly on the standard forward-backward pass that is used to train the convolutional network. Therefore, in spite of the large complexity of the model, texture generation can be done in reasonable time using GPUs and performance-optimised toolboxes for training deep neural networks [12]. 5 Results We show textures generated by our model from four different source images (Fig. 2). Each row of images was generated using an increasing number of layers in the texture model to constrain the gradient descent (the labels in the figure indicate the top-most layer included). In other words, for the loss terms above a certain layer we set the weights wl = 0, while for the loss terms below and including that layer, we set wl = 1. For example the images in the first row (‘conv1 1’) were generated only from the texture representation of the first layer (‘conv1 1’) of the VGG network. The images in the second row (‘pool1’) where generated by jointly matching the texture representations on top of layer ‘conv1 1’, ‘conv1 2’ and ‘pool1’. In this way we obtain textures that show what structure of natural textures are captured by certain computational processing stages of the texture model. The first three columns show images generated from natural textures. We find that constraining all layers up to layer ‘pool4’ generates complex natural textures that are almost indistinguishable from the original texture (Fig. 2, fifth row). In contrast, when constraining only the feature correlations on the lowest layer, the textures contain little structure and are not far from spectrally matched noise 4 conv1_1 pool1 pool2 pool3 pool4 original Portilla & Simoncelli Figure 2: Generated stimuli. Each row corresponds to a different processing stage in the network. When only constraining the texture representation on the lowest layer, the synthesised textures have little structure, similarly to spectrally matched noise (first row). With increasing number of layers on which we match the texture representation we find that we generate images with increasing degree of naturalness (rows 2–5; labels on the left indicate the top-most layer included). The source textures in the first three columns were previously used by Portilla and Simoncelli [21]. For better comparison we also show their results (last row). The last column shows textures generated from a non-texture image to give a better intuition about how the texture model represents image information. 5 A ~1k parameters ~10k parameters ~177k parameters ~852k parameters original B conv1 conv2 conv3 conv4 conv5 C conv1_1 pool1 pool2 pool3 pool4 Figure 3: A, Number of parameters in the texture model. We explore several ways to reduce the number of parameters in the texture model (see main text) and compare the results. B, Textures generated from the different layers of the caffe reference network [12, 15]. The textures are of lesser quality than those generated with the VGG network. C, Textures generated with the VGG architecture but random weights. Texture synthesis fails in this case, indicating that learned filters are crucial for texture generation. (Fig. 2, first row). We can interpolate between these two extremes by using only the constraints from all layers up to some intermediate layer. We find that the statistical structure of natural images is matched on an increasing scale as the number of layers we use for texture generation increases. We did not include any layers above layer ‘pool4’ since this did not improve the quality of the synthesised textures. For comparability we used source textures that were previously used by Portilla and Simoncelli [21] and also show the results of their texture model (Fig. 2, last row). 2 To give a better intuition for how the texture synthesis works, we also show textures generated from a non-texture image taken from the ImageNet validation set [23] (Fig. 2, last column). Our algorithm produces a texturised version of the image that preserves local spatial information but discards the global spatial arrangement of the image. The size of the regions in which spatial information is preserved increases with the number of layers used for texture generation. This property can be explained by the increasing receptive field sizes of the units over the layers of the deep convolutional neural network. When using summary statistics from all layers of the convolutional neural network, the number of parameters of the model is very large. For each layer with Nl feature maps, we match Nl × (Nl + 1)/2 parameters, so if we use all layers up to and including ‘pool4’, our model has ∼ 852k parameters (Fig. 3A, fourth column). However, we find that this texture model is heavily overparameterised. In fact, when using only one layer on each scale in the network (i.e. ‘conv1 1’, 2 A curious finding is that the yellow box, which indicates the source of the original texture, is also placed towards the bottom left corner in the textures generated by our model. As our texture model does not store any spatial information about the feature responses, the only possible explanation for such behaviour is that some features in the network explicitly encode the information at the image boundaries. This is exactly what we find when inspecting feature maps in the VGG network: Some feature maps, at least from layer ‘conv3 1’ onwards, only show high activations along their edges. This might originate from the zero-padding that is used for the convolutions in the VGG network and it could be interesting to investigate the effect of such padding on learning and object recognition performance. 6 Classification performance 1.0 0.8 0.6 0.4 top1 Gram top5 Gram top1 VGG top5 VGG 0.2 0 pool1 pool2 pool3 pool4 Decoding layer pool5 Figure 4: Performance of a linear classifier on top of the texture representations in different layers in classifying objects from the ImageNet dataset. High-level information is made increasingly explicit along the hierarchy of our texture model. and ‘pool1-4’), the model contains ∼ 177k parameters while hardly loosing any quality (Fig. 3A, third column). We can further reduce the number of parameters by doing PCA of the feature vector in the different layers of the network and then constructing the Gram matrix only for the first k principal components. By using the first 64 principal components for layers ‘conv1 1’, and ‘pool14’ we can further reduce the model to ∼ 10k parameters (Fig. 3A, second column). Interestingly, constraining only the feature map averages in layers ‘conv1 1’, and ‘pool1-4’, (1024 parameters), already produces interesting textures (Fig. 3A, first column). These ad hoc methods for parameter reduction show that the texture representation can be compressed greatly with little effect on the perceptual quality of the synthesised textures. Finding minimal set of parameters that reproduces the quality of the full model is an interesting topic of ongoing research and beyond the scope of the present paper. A larger number of natural textures synthesised with the ≈ 177k parameter model can be found in the Supplementary Material as well as on our website3 . There one can also observe some failures of the model in case of very regular, man-made structures (e.g. brick walls). In general, we find that the very deep architecture of the VGG network with small convolutional filters seems to be particularly well suited for texture generation purposes. When performing the same experiment with the caffe reference network [12], which is very similar to the AlexNet [15], the quality of the generated textures decreases in two ways. First, the statistical structure of the source texture is not fully matched even when using all constraints (Fig 3B, ‘conv5’). Second, we observe an artifactual grid that overlays the generated textures (Fig 3B). We believe that the artifactual grid originates from the larger receptive field sizes and strides in the caffe reference network. While the results from the caffe reference network show that the architecture of the network is important, the learned feature spaces are equally crucial for texture generation. When synthesising a texture with a network with the VGG architecture but random weights, texture generation fails (Fig. 3C), underscoring the importance of using a trained network. To understand our texture features better in the context of the original object recognition task of the network, we evaluated how well object identity can be linearly decoded from the texture features in different layers of the network. For each layer we computed the Gram-matrix representation of each image in the ImageNet training set [23] and trained a linear soft-max classifier to predict object identity. As we were not interested in optimising prediction performance, we did not use any data augmentation and trained and tested only on the 224 × 224 centre crop of the images. We computed the accuracy of these linear classifiers on the ImageNet validation set and compared them to the performance of the original VGG-19 network also evaluated on the 224 × 224 centre crops of the validation images. The analysis suggests that our texture representation continuously disentangles object identity information (Fig. 4). Object identity can be decoded increasingly well over the layers. In fact, linear decoding from the final pooling layer performs almost as well as the original network, suggesting that our texture representation preserves almost all high-level information. At first sight this might appear surprising since the texture representation does not necessarily preserve the global structure of objects in non-texture images (Fig. 2, last column). However, we believe that this “inconsis3 www.bethgelab.org/deeptextures 7 tency” is in fact to be expected and might provide an insight into how CNNs encode object identity. The convolutional representations in the network are shift-equivariant and the network’s task (object recognition) is agnostic to spatial information, thus we expect that object information can be read out independently from the spatial information in the feature maps. We show that this is indeed the case: a linear classifier on the Gram matrix of layer ‘pool5’ comes close to the performance of the full network (87.7% vs. 88.6% top 5 accuracy, Fig. 4). 6 Discussion We introduced a new parametric texture model based on a high-performing convolutional neural network. Our texture model exceeds previous work as the quality of the textures synthesised using our model shows a substantial improvement compared to the current state of the art in parametric texture synthesis (Fig. 2, fourth row compared to last row). While our model is capable of producing natural textures of comparable quality to non-parametric texture synthesis methods, our synthesis procedure is computationally more expensive. Nevertheless, both in industry and academia, there is currently much effort taken in order to make the evaluation of deep neural networks more efficient [11, 4, 17]. Since our texture synthesis procedure builds exactly on the same operations, any progress made in the general field of deep convolutional networks is likely to be transferable to our texture synthesis method. Thus we expect considerable improvements in the practical applicability of our texture model in the near future. By computing the Gram matrices on feature maps, our texture model transforms the representations from the convolutional neural network into a stationary feature space. This general strategy has recently been employed to improve performance in object recognition and detection [9] or texture recognition and segmentation [3]. In particular Cimpoi et al. report impressive performance in material recognition and scene segmentation by using a stationary Fisher-Vector representation built on the highest convolutional layer of readily trained neural networks [3]. In agreement with our results, they show that performance in natural texture recognition continuously improves when using higher convolutional layers as the input to their Fisher-Vector representation. As our main aim is to synthesise textures, we have not evaluated the Gram matrix representation on texture recognition benchmarks, but would expect that it also provides a good feature space for those tasks. In recent years, texture models inspired by biological vision have provided a fruitful new analysis tool for studying visual perception. In particular the parametric texture model proposed by Portilla and Simoncelli [21] has sparked a great number of studies in neuroscience and psychophysics [8, 7, 1, 22, 20]. Our texture model is based on deep convolutional neural networks that are the first artificial systems that rival biology in terms of difficult perceptual inference tasks such as object recognition [15, 25, 26]. At the same time, their hierarchical architecture and basic computational properties admit a fundamental similarity to real neural systems. Together with the increasing amount of evidence for the similarity of the representations in convolutional networks and those in the ventral visual pathway [29, 2, 14], these properties make them compelling candidate models for studying visual information processing in the brain. In fact, it was recently suggested that textures generated from the representations of performance-optimised convolutional networks “may therefore prove useful as stimuli in perceptual or physiological investigations” [19]. We feel that our texture model is the first step in that direction and envision it to provide an exciting new tool in the study of visual information processing in biological systems. Acknowledgments This work was funded by the German National Academic Foundation (L.A.G.), the Bernstein Center for Computational Neuroscience (FKZ 01GQ1002) and the German Excellency Initiative through the Centre for Integrative Neuroscience Tübingen (EXC307)(M.B., A.S.E, L.A.G.) References [1] B. Balas, L. Nakano, and R. Rosenholtz. A summary-statistic representation in peripheral vision explains visual crowding. Journal of vision, 9(12):13, 2009. 8 [2] C. F. Cadieu, H. Hong, D. L. K. Yamins, N. Pinto, D. Ardila, E. A. Solomon, N. J. Majaj, and J. J. DiCarlo. Deep Neural Networks Rival the Representation of Primate IT Cortex for Core Visual Object Recognition. PLoS Comput Biol, 10(12):e1003963, December 2014. [3] M. Cimpoi, S. Maji, and A. Vedaldi. Deep convolutional filter banks for texture recognition and segmentation. arXiv:1411.6836 [cs], November 2014. arXiv: 1411.6836. [4] E. L. Denton, W. Zaremba, J. Bruna, Y. LeCun, and R. Fergus. Exploiting Linear Structure Within Convolutional Networks for Efficient Evaluation. In NIPS, 2014. [5] A. Efros and T. K. Leung. Texture synthesis by non-parametric sampling. In Computer Vision, 1999. The Proceedings of the Seventh IEEE International Conference on, volume 2, pages 1033–1038. IEEE, 1999. [6] A. A. Efros and W. T. Freeman. Image quilting for texture synthesis and transfer. In Proceedings of the 28th annual conference on Computer graphics and interactive techniques, pages 341–346. ACM, 2001. [7] J. Freeman and E. P. Simoncelli. Metamers of the ventral stream. Nature Neuroscience, 14(9):1195–1201, September 2011. [8] J. Freeman, C. M. Ziemba, D. J. Heeger, E. P. Simoncelli, and A. J. Movshon. A functional and perceptual signature of the second visual area in primates. Nature Neuroscience, 16(7):974–981, July 2013. [9] K. He, X. Zhang, S. Ren, and J. Sun. Spatial pyramid pooling in deep convolutional networks for visual recognition. arXiv preprint arXiv:1406.4729, 2014. [10] D. J. Heeger and J. R. Bergen. Pyramid-based Texture Analysis/Synthesis. In Proceedings of the 22Nd Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH ’95, pages 229–238, New York, NY, USA, 1995. ACM. [11] M. Jaderberg, A. Vedaldi, and A. Zisserman. Speeding up Convolutional Neural Networks with Low Rank Expansions. In BMVC 2014, 2014. [12] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. In Proceedings of the ACM International Conference on Multimedia, pages 675–678. ACM, 2014. [13] B. Julesz. Visual Pattern Discrimination. IRE Transactions on Information Theory, 8(2), February 1962. [14] S. Khaligh-Razavi and N. Kriegeskorte. Deep Supervised, but Not Unsupervised, Models May Explain IT Cortical Representation. PLoS Comput Biol, 10(11):e1003915, November 2014. [15] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 27, pages 1097–1105, 2012. [16] V. Kwatra, A. Schödl, I. Essa, G. Turk, and A. Bobick. Graphcut textures: image and video synthesis using graph cuts. In ACM Transactions on Graphics (ToG), volume 22, pages 277–286. ACM, 2003. [17] V. Lebedev, Y. Ganin, M. Rakhuba, I. Oseledets, and V. Lempitsky. Speeding-up Convolutional Neural Networks Using Fine-tuned CP-Decomposition. arXiv preprint arXiv:1412.6553, 2014. [18] Y. A. LeCun, L. Bottou, G. B. Orr, and K. R. Müller. Efficient backprop. In Neural networks: Tricks of the trade, pages 9–48. Springer, 2012. [19] A. J. Movshon and E. P. Simoncelli. Representation of naturalistic image structure in the primate visual cortex. Cold Spring Harbor Symposia on Quantitative Biology: Cognition, 2015. [20] G. Okazawa, S. Tajima, and H. Komatsu. Image statistics underlying natural texture selectivity of neurons in macaque V4. PNAS, 112(4):E351–E360, January 2015. [21] J. Portilla and E. P. Simoncelli. A Parametric Texture Model Based on Joint Statistics of Complex Wavelet Coefficients. International Journal of Computer Vision, 40(1):49–70, October 2000. [22] R. Rosenholtz, J. Huang, A. Raj, B. J. Balas, and L. Ilie. A summary statistic representation in peripheral vision explains visual search. Journal of vision, 12(4):14, 2012. [23] 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. arXiv:1409.0575 [cs], September 2014. arXiv: 1409.0575. [24] E. P. Simoncelli and W. T. Freeman. The steerable pyramid: A flexible architecture for multi-scale derivative computation. In Image Processing, International Conference on, volume 3, pages 3444–3444. IEEE Computer Society, 1995. [25] K. Simonyan and A. Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. arXiv:1409.1556 [cs], September 2014. arXiv: 1409.1556. [26] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going Deeper with Convolutions. arXiv:1409.4842 [cs], September 2014. arXiv: 1409.4842. 9 [27] L. Wei, S. Lefebvre, V. Kwatra, and G. Turk. State of the art in example-based texture synthesis. In Eurographics 2009, State of the Art Report, EG-STAR, pages 93–117. Eurographics Association, 2009. [28] L. Wei and M. Levoy. Fast texture synthesis using tree-structured vector quantization. In Proceedings of the 27th annual conference on Computer graphics and interactive techniques, pages 479–488. ACM Press/Addison-Wesley Publishing Co., 2000. [29] D. L. K. Yamins, H. Hong, C. F. Cadieu, E. A. Solomon, D. Seibert, and J. J. DiCarlo. Performanceoptimized hierarchical models predict neural responses in higher visual cortex. PNAS, page 201403112, May 2014. [30] C. Zhu, R. H. Byrd, P. Lu, and J. Nocedal. Algorithm 778: L-BFGS-B: Fortran subroutines for large-scale bound-constrained optimization. ACM Transactions on Mathematical Software (TOMS), 23(4):550–560, 1997. 10
9cs.NE
(IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 3, No. 5, 2012 Defect Diagnosis in Rotors Systems by Vibrations Data Collectors Using Trending Software Hisham A. H. Al-Khazali1 Mohamad R. Askari2 Institute School of Mechanical & Automotive Engineering, Kingston University, London, SW15 3DW, UK. Institute School of Aerospace & Aircraft Engineering, Kingston University, London, SW15 3DW, UK. Abstract-Vibration measurements have been used to reliably diagnose performance problems in machinery and related mechanical products. A vibration data collector can be used effectively to measure and analyze the machinery vibration content in gearboxes, engines, turbines, fans, compressors, pumps and bearings. Ideally, a machine will have little or no vibration, indicating that the rotating components are appropriately balanced, aligned, and well maintained. Quick analysis and assessment of the vibration content can lead to fault diagnosis and prognosis of a machine’s ability to continue running. The aim of this research used vibration measurements to pinpoint mechanical defects such as (unbalance, misalignment, resonance, and part loosening), consequently diagnosis all necessary process for engineers and technicians who desire to understand the vibration that exists in structures and machines. Vibration analysis software is an essential tool for professionals who are analyzing the vibratory behaviour of structures and machines. There are two types of vibration analysis investigations that are commonly done today [4, 18]. The first involves analyzing the mechanical vibration of new products that are being designed or tested. The second involves analyzing the vibration that exists in rotating machinery such as compressors, turbines, and motors [19, 20]. Advances in computing power and software have greatly enhanced the vibration analysis process for both new and existing products. The most common software package for analyzing new products is finite element analysis software. Vibration in existing machinery is analyzed with integrated software that enhances the vibration analysis equipment [14, 21]. Keywords- vibration data collectors; analysis software; rotating components. B. Vibration Testing Vibration testing is used to determine how well a product will withstand its expected service and transportation environments. Equipment that must withstand vibration testing includes automotive, aerospace, machinery, electrical, medical and power [22]. I. INTRODUCTION A. Vibration Analysis Software In the past, diagnosis of equipment problems using vibration analysis was mostly dependent on the ability of the maintenance technician or the plant engineer [1, 2]. However, today’s vibration analysis equipment utilizes software that has greatly enhanced the analysis of vibration measurements and the prediction of equipment performance [3, 4]. Before computer-based data collectors, most vibration programs consisted of recording overall velocity, displacement, and acceleration measurements on a clipboard [5, 6]. Those with IRD instruments had a mysterious measurement available called Spike Energy [7, 8]. The measurements were transferred to charts for trending. Obviously, this was very labour intensive, but it was successful [9, 10]. Those fortunate enough to have spectrum analyzers with plotters, would take spectra and paste them to a notebook with the overall trends [11,12& 13]. This whole process of manual storage and trending of overall and spectral data was not very cost effective, but many of those programs were successful [3]. The advent of computer-based data collectors and trending software made this whole trending process much more cost-effective. The first system only recorded overall measurements [14,15& 16]. Spectral data still had to be taken with a spectrum analyzer. Those programs based only on overall measurements were usually successful in identifying a machine developing a problem [3, 17]. Performing a vibration test reproduces one of the most severe real-world environmental conditions that equipment will encounter. Since vibration testing is crucial during product development, selecting and using vibration testing equipment is an important step for engineers and product managers [23, 24]. II. METHODS AND EXPERIMENTAL PROCEDURES A. Vibration Testing Equipment Vibration testing equipment includes accelerometers, controllers, analyzers, amplifiers, shakers, and vibration test fixtures. While each industry utilizes vibration testing in a unique manner, the most important components of a vibration test system are basically the same [25,26& 27]. Vibration is measured and controlled using displacement transducers or accelerometers. Then, do the experimental testing using the electromagnetic shaker test, installed two accelerometers (model 339A32, SN 4851, sensitivity 96.5 & 99.6 mV/g) in Y& Z direction see picture (1), it was attached to the test structure with creating a computer when taking readings in file that was dimensions and introducing it with the data within the program (smart office). Vibration monitoring equipment includes PC-based controllers and analyzers. Vibration is transmitted to the test product using stiff, lightweight test fixtures. Vibration shakers are available in electrodynamics or hydraulic versions. Electrodynamics’ shakers are used for smaller products that require smaller 33 | P a g e www.ijacsa.thesai.org (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 3, No. 5, 2012 displacements and a larger frequency range. It was powered by amplifiers that may rival a radio station for electrical power output [26, 28]. Computer Load cell Accelerometers Exciter shaker Disc Acquisition Bearing A. Rotor Rig setup for the modal testing. B. Different types of accelerometers, 2012. Picture 1. Arrangement of the experiment; Rotating shaft Shaker Computer Compact (IDAQ) Power A . The conceptual design show method of the outcome results using electromagnetic Shaker test. Accelerometer1 Accelerometer2 B. Block diagram of test processing controller. Scheme 1. Test setup; B. Mathematical Models (i) Equation of motion in rotor system for (passive) structures [23, 29], (no self-excitation). [M ]{q&&(t )} + [(C ]{q&(t )} + [K ]{q(t )} = {F (t )} (1) All the above matrices are normally symmetric, after solved it we get: α n jk (ω ) = ∑ r =1 [ φ jr φk r M r ω r2 − ω 2 + 2 i ω ξ r ω r ] (2) (ii) For (active) rotating structures [17,23& 30], includes the gyroscopic effect [G], however in machinery where there are rotating parts as well as the supporting structure, the matrices are generally nonsymmetric, and therefore need to be treated differently. [M ]{q&&(t )} + [(C + G)(Ω)]{q& (t )} + [K (Ω)]{q(t )} = {F (t )} (3) The non-homogeneous part of the above equation 3, may be solved for free vibration analysis, we obtain 34 | P a g e www.ijacsa.thesai.org (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 3, No. 5, 2012 ( ) ( ( )) ( (    2 n  2ωr ζ r Re r G jk − 1 − ζ r Im r G jk  + i 2ω Re r G jk    α jk (ω) =  2 2 ω ω 2 i ωω ζ − + r r r r =1   ∑ ( ) )) III. RESULTS       (4) Equation 4, represents the receptance between two coordinates j and k for a system with n degree of freedom. The denominator is identical to the denominator of the receptance expression for an n degree of freedom system with symmetric system matrices (equation 2), but the numerator is very different. A. The Orbit Analysis Postprocessing Wizard This orbit analysis tool has been designed for bearing and shaft analysis. It post-processes time history file that must include a once-per-rev key-phasor signal to provide a speed and reference for top dead centre (TDC). Various filters are available to smooth the data over a number of revolutions [4, 10]. A. Real versus time (sec.) 200m 200m 100m 100m -200m 0 Real V Real V 0 -100m 0 -100m -200m 100m 270m Time - s B- y, axis measurement. 0 0 100m 270m 100m Time - s270m C- z, axis measurement. Figure 1. Signal detection in (y & z) axis measurement direction; 116.1m 100m 169.5m 150m 100m 50m 0 Real V Real V 50m 0 -50m -50m -100m -116.1m -116.079m -50m 0 Voltage - V 116.079m -169.5m -169.536m A- -50m 0 50m Voltage - V 169.536m B- 35 | P a g e www.ijacsa.thesai.org (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 3, No. 5, 2012 149.7m 215.5m 100m 100m 50m 0 Real V Real V 0 -50m -100m -100m -149.7m -149.737m -50m 0 50m Voltage - V 149.737m -215.5m -215.527m -100m C- 215.527m D- 169.5m 150m 178.4m 150m 100m 100m 50m 50m 0 Real V Real V 0 Voltage - V -50m 0 -50m -100m -100m -150m -169.5m -169.536m -50m 0 50m V oltage - V 169.536m -178.4m -178.418m -50m 0 50m Voltage - V E- 178.418m FFigure 2. Experimental orbit analysis direction in rotor dynamics; 162.5m 100m 100m 50m 50m 0 Real V Real V 162.5m -50m -100m -162.5m -162.473m 0 -50m -100m -50m 0 50m Voltage - V 162.473m -162.5m -162.473m A- -50m 0 50m Voltage - V 162.473m B- 36 | P a g e www.ijacsa.thesai.org (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 3, No. 5, 2012 155.6m 114.2m 100m 100m 50m 50m 0 Real V Real V 0 -50m -50m -100m -155.6m -155.644m -50m 0 50m Voltage - V 155.644m -114.2m -114.225m -50m C- 0 Voltage - V 114.225m D- 169.1m 150m 100m Real V 50m 0 -50m -100m -169.1m -169.142m -50m 0 50m Voltage - V 169.142m E- Without filter (HP filter). 169.1m 150m 105m 100m 50m 0 0 Real V Real V 50m -50m -50m -100m -169.1m -169.142m -50m 0 50m V oltage - V 169.142m -105m -104.975m F- Without filter. -50m 0 Voltage - V 104.975m G- Without show row data filter. 37 | P a g e www.ijacsa.thesai.org (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 3, No. 5, 2012 169.5m 150m 100m Real V 50m 0 -50m -100m -169.5m -169.536m -50m 0 50m Voltage - V 169.536m H- Plot to trigger. Figure 3. Experimental orbit analysis fundamentals behaviour for key-phasor; 155.5m 127.6m 100m 100m 50m 0 Real V Real V 50m -50m 0 -50m -100m -100m -127.6m -127.595m -50m 0 Voltage - V 127.595m -155.5m -155.458m -50m 0 50m Voltage - V A- 155.458m B- 125m 155.5m 100m 100m 50m 0 0 Real V Real V 50m -50m -50m -100m -100m -155.5m -155.458m -50m 0 50m Voltage - V 155.458m -125m -125.03m C- -50m 0 50m Voltage - V 125.03m D- Without filter (HP filter). 38 | P a g e www.ijacsa.thesai.org (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 3, No. 5, 2012 86.9m 125m 100m 60m 40m 50m 20m Real V Real V 0 -50m 0 -20m -40m -60m -100m -125m -125.03m -50m 0 50m Voltage - V -86.9m -86.9039m 125.03m E- Without filter. -20m 0 20m Voltage - V 86.9039m F- Without show row data filter. 169.1m 150m 100m Real V 50m 0 -50m -100m -169.1m -169.142m -50m 0 50m V oltage - V 169.142m G- Plot to trigger. Figure 4. Experimental orbits analysis fundamentals behaviour of the rotor at the different measured planes in first critical speed for channel one; 129.8m 155.6m 100m 100m 50m 50m Real V Real V 0 -50m 0 -50m -100m -100m -129.8m -129.756m -50m 0 V oltage - V 129.756m -155.6m -155.644m -50m 0 50m V oltage - V A- 155.644m B- 114.2m 100m 126.4m 100m 50m 0 Real V Real V 50m -50m 0 -50m -100m -114.2m -114.225m -50m 0 V oltage - V 114.225m -126.4m -126.402m C- -50m 0 V oltage - V 126.402m D- Without filter (HP filter). 39 | P a g e www.ijacsa.thesai.org (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 3, No. 5, 2012 126.4m 86.77m 100m 60m 40m 50m 0 Real V Real V 20m -50m 0 -20m -40m -60m -100m -126.4m -126.402m -50m 0 Voltage - V -86.77m -86.7652m 126.402m E- Without filter. -20m 0 20m V oltage - V 86.7652m F - Without show row data filter. 125m 100m Real V 50m 0 -50m -100m -125m -125.03m -50m 0 50m V oltage - V 125.03m G- Plot to trigger. Figure 5. Experimental orbits analysis fundamentals behaviour of the rotor at the different measured planes in first critical speed for channel two; B. The Shock Capture Module The shock capture module provides shock capture, data validation and reporting. It allows you to use (m + p) library of standard test limit overlays, capture data from any number of channels, including triax’s, filter the data, automatically adjust overlays for best fit [31, 32]. You will see in the display that you get an immediate readout of key pulse parameters and the whole test is controlled from one simple window for fast and efficient use even by user less familiar with the SO Analyzer and details of the application, we can see that clear in Fig.,(6). A-Tacho signal. 40 | P a g e www.ijacsa.thesai.org (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 3, No. 5, 2012 B- Before use filter. C- After used window filter with increasing the speed. D- Improved or decay shock capture after used window filter. Figure 6. Shock capture module; www.ijacsa.thesai.org (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 3, No. 5, 2012 [6] IV. DISCUSSION AND CONCLUSIONS This research presented a test rig dedicated to the study of rotating machinery with the advent of computer-based data collectors and trending software. From Fig.,(2) we notes orbit analysis direction lean to left and then to the right during rotation machine because transfer the excitation harmonic force around each point in the orbit during the test, we can see that clear in Fig.,(3) demonstration accurate diagnosis of machine vibration conditions, including bearing vibration simplifies the task and increases the speed of collecting vibration monitoring data. We note From Fig.,(4) description experimental orbits in first critical speed for channel one and Fig.,(5) show orbits analysis fundamentals behaviour of the rotor system at the different measured planes in first critical speed for channel two; without filter (HP filter) see Fig.,(5-D) and without show row data filter Fig.,(5-F) shows change of performance for each point in the orbit, plot to trigger see Fig.,(5-G). From Fig.,(6) we can note shock capture module is happened at beginning when the motor turn on ( initial rotation ) this effect is very high at this region, and you can improved or decay this effect by using windowing filter that clear in Fig.,(6-D). [7] [8] [9] [10] [11] [12] [13] [14] [15] From the research we can conclude the vibration analysis software is an essential tool for analyzing and evaluating the mechanical vibration that occurs in rotating machinery. Vibration condition monitoring involves transmitting large quantities of data from a transducer to a separate data collector for subsequent processing and analysis. The software is then used in analysis of multiple machine vibration parameters to assess operating performance. Maintenance personnel then use the data to determine if unscheduled maintenance is necessary, or if shutdown is required. Compact portable vibration data collectors are easy to use with a portable computer, such as a laptop or note book multiple channel models are available, usually do not require any special training. [16] [17] [18] [19] [20] V. ACKNOWLEDGMENT The authors are deeply appreciative to (SEC) Faculty of Science, Engineering and Computing in Kingston University London that provides technical support for the research, and the Iraqi Ministry of Higher Education, Iraqi Cultural Attaché in London for that provides funding for the research. REFERENCES [1] [2] [3] [4] [5] [21] [22] [23] B. John., Jr. Catlin, “The Use of Ultrasonic Techniques to Detect Rolling Element Bearing Defects,” Annual Vibration Institute Meeting, Houston, TX, 1983. J. M. Vance, “Rotor-dynamics of Turbo-machinery,” John Wiley & Sons, New York, NY, USA, 1988. A. Cass, C. Völcker, P. Panaroni, A. Dorling, L. Winzer. 2000. SPiCE for SPACE: A method of process assessment for space software projects. SPICE 2000 Conference Proceedings, Ireland. June 10–11, 2000. C. Völcker, A. Cass. PASCON/WO6-CCN5/TN8: Guidelines for Space Software Process Improvement, Technical Note 8, Issue 1.0, December 19, 2001. K. J. Bathe and S. Gracewski, “On nonlinear dynamic analysis using sub-structuring and mode superposition,” Computers and Structures, vol. 13, no. 5-6, pp. 699–707, 1981. [24] [25] [26] [27] [28] D. C. Zhu, “Development of hierarchical finite element method at BIAA,” in Proceedings of the International Conference on Computational Mechanics, pp. 123–128, Tokyo, Japan, May 1986. Joe, Strader, “Critical Evaluation of IRD Spike Energy Signatures,” Annual Vibration Institute Meeting, St. Louis, Missouri, 1993. C. John, Johnson, “Spike Energy Spectrum –Where’s The Spike Energy,” Enter-act, Cincinnati, Ohio, 1997. "Vibrations: Analytical and Experimental Modal Analysis," Course Number UC-SDRL-CN-20-263-662, Revision: February, 1999. F. Fredric Ehrich, ; Handbook of Rotor-dynamics; ISBN 0-07019330-4; Mc Graw-Hill, Inc., 1992. L. Ronald Eshleman, “Basic Machinery Vibrations, an Introduction to Machine Testing, Analysis and Monitoring,” VI Press, Incorporated, Clarendon Hills, Illinois. H. Vold, T. Rocklin, "The numerical implementation of a multiinput modal estimation algorithm for mini-computers," Proceedings of the International Modal Analysis Conference, pp. 542-548, 1982. H. Hyungsuk, ”Robot Optimal Design of Multi–Body Systems,” Multi-body System Dynamics, vol.11, publishing, Taiwan, 2004. S. M. Hamza Cherif, “Free vibration analysis of rotating flexible beams by using the Fourier p-version of the finite element,” International Journal of Computational Methods, vol. 2, no. 2, pp. 255–269, 2005. Choi. Gyunghyun, ”A goal programming mixed module line balancing for processing time and physical work load, ”Journal of Computer & Industrial Engineering, Journal Homepage, www.elsevier,republic of Korea, 5 January, 2009. C. R. Fuller, S.J. Elliott, and P.A. Nelson, “Active Control of Vibration,” Vibration and Acoustic Labourites, Department of Mechanical Eng., Virgie University, 1996. G. Genta,” Dynamics of Rotating Systems,” Springer, New York, NY, USA, 2005. A. Vanish. Kumar “A modified method for solving the unbalanced assignment problems,” Applied Mathematics and Computation vol. 176, pp.76-82, Band eland university, India 2006. J. M. Leuridan, D.L.Brown, R.J. Allemang, "Time domain parameter identification methods for linear modal analysis: a unifying approach," ASME Paper Number 85-DET-90, 1985. G. Rocklin, J. Crowley, H. Vold, "A Comparison of H1, H2 and Hv frequency response functions," 3rd International Modal Analysis Conference, 1985. E. V. Karpenko, M. Wiercigroch, E. E. Pavlovskaia, and R. D. Neilson, “Experimental verification of Jeffcott rotor model with preloaded snubber ring,” Journal of Sound and Vibration, vol. 298, no. 4-5, pp. 907–917, 2006. Haym. Benaroya, “Mechanical Vibration, Analysis, Uncertainties, and Control,” Second edition, pp. 641, USA, 2004. D. J. EWINS, “Modal Testing: Theory and Practice,” John Wily, Exeter, England, 1995. L. H. Chiang, E. L. Russell, and R.D. Braatz,” Fault Detection and Diagnosis in Industrial Systems,” (Springer-velar), Berlin, 2001. P. L. Walter, “Accelerometer selection for and application to modal analysis,” in Proceedings of the 17the International Modal Analysis Conference, Kissimmee, pp. 566, FL, U.S.A, 1999. S. Edwards, A. W. Lees, and M. I. Friswell, “Experimental identification of excitation and support parameters of a flexible rotor-bearings-foundation system from a single rundown,” Journal of Sound and Vibration, vol. 232, no. 5, pp. 963–992, 2000. Hillary, & D.J. Ewins,” The use of strain gauge in forces determination and frequency response function measurements,” in Proceedings, IMAC vol. 2, 1984. http://www.mpihome.com/ 42 | P a g e www.ijacsa.thesai.org (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 3, No. 5, 2012 [29] S. Braun, ” Application of computer–algebra simulation (CALS) in industry,” Journal of Mathematics and Computer in Simulation, vol.53, pp. 249-257, Munchen, Germany,D-81673, 28 July, 2000. [30] H. J. Holl and H. Irschik, “A Substructure method for the transient analysis of nonlinear rotor-dynamic systems using modal analysis,” in Proceedings of the 12th International Modal Analysis Conference, (IMAC '94), pp. 1638–1643, Honolulu, Hawaii, USA, 1994. [31] Shock and Vibration Handbook, Editor Cyril M. Harris, "Chapter 21: Experimental Modal Analysis," by R.J. Allemang, and D.L. Brown, Fourth Edition, Mc Graw-Hill, 1995. [32] Shock and vibration, Hand book, Editor cyrill. M. Harris” Chapter 15: Measurement Techniques,” by C.M. Harris, Fourth Edition, Mc Graw-Hill, 1995. NOMENCLATURE [M] Mass matrix, speed dependent [C] Damping matrix, speed dependent [K] Stiffness matrix, speed dependent [G] Gyroscopic matrix of rotating system {F} Force vector Ω Rotating speed φjr Normalised Eigen vector φkr Normalised Eigen vector α jk Imaginary Re Reynolds number ω, ωr q,r t n Dr. Mohamad R. Askari2, BSc (Eng), MSc, PhD, CEng, MIMechE, MRAeS. He has (Principal Lecturer, Blended Learning Coordinator), Member teaching staff in Kingston University London, His Teaching Area: Applied Mechanics, Aerospace Dynamics, Dynamics and Control, Structural and Flight Dynamics, Engineering Design, Software Engineering to BEng Mechanical and Aerospace second and final years. He was Year Tutor for BEng, Mechanical Engineering Course and School Safety Advisor. E-mail, [email protected] The receptance for one measurement between two coordinates j and k Im ζr AUTHOR’S INFORMATION Mr. Hisham A. H. Al-Khazali1, He has PhD Student in Kingston University London, and (SEM) member, Society for Experimental Mechanics. Inc., in USA. He was born in 28 Aug 1973 Baghdad/Iraq. He received his BSc (Eng.), in Mechanical Engineering (1996), University of Technology, Baghdad. MSc in Applied Mechanics, University of Technology, Baghdad (2000). E-mail, [email protected] Damping ratio of the rth mode Excitation, Natural frequency of the rth mode (modal parameters) Are generally two different modes Time variable Degree of freedom/coordinates 43 | P a g e www.ijacsa.thesai.org
5cs.CE
1 Entropy of Overcomplete Kernel Dictionaries arXiv:1411.0161v1 [cs.IT] 1 Nov 2014 Paul Honeine, Member IEEE Abstract—In signal analysis and synthesis, linear approximation theory considers a linear decomposition of any given signal in a set of atoms, collected into a so-called dictionary. Relevant sparse representations are obtained by relaxing the orthogonality condition of the atoms, yielding overcomplete dictionaries with an extended number of atoms. More generally than the linear decomposition, overcomplete kernel dictionaries provide an elegant nonlinear extension by defining the atoms through a mapping kernel function (e.g., the gaussian kernel). Models based on such kernel dictionaries are used in neural networks, gaussian processes and online learning with kernels. The quality of an overcomplete dictionary is evaluated with a diversity measure the distance, the approximation, the coherence and the Babel measures. In this paper, we develop a framework to examine overcomplete kernel dictionaries with the entropy from information theory. Indeed, a higher value of the entropy is associated to a further uniform spread of the atoms over the space. For each of the aforementioned diversity measures, we derive lower bounds on the entropy. Several definitions of the entropy are examined, with an extensive analysis in both the input space and the mapped feature space. Index Terms—Generalized Rényi entropy, Shannon entropy, sparse approximation, dictionary learning, kernel-based methods, Gram matrix, machine learning, pattern recognition. I. I NTRODUCTION PARSITY in representation has gained increasing popularity in signal and image processing, for pattern recognition, denoising and compression [1]. A sparse representation of a given signal consists in decomposing it on a set of elementary signals, called atoms and collected in a so-called dictionary. In the linear formalism, the signal is written as a linear combination of the dictionary atoms. This decomposition is unique when the latter defines a basis, and in particular with orthogonal dictionaries such as with the Fourier basis. Since the 1960’s, there has been much interest in this direction with the use of predefined dictionaries, based on some analytical form, such as with the wavelets [2]. Predefined dictionaries have been widely investigated in the literature for years, owing to the mathematical simplicity of such structured dictionaries when dealing with orthogonality (as well as bi-orthogonality). When dealing with sparsity, analytical dictionaries perform poorly in general, due to their rigide structure imposed by the orthogonality. Within the last 15 years, a new class of dictionaries has emerged with dictionaries learned from data, thus with the ability to adapt to the signal under scrutiny. While the Karhunen-Loève transform — also called principal component analysis in advanced statistics [3] — falls in this class, the relaxation of the orthogonality condition delivers an increased flexibility with overcomplete dictionaries, i.e., when S P. Honeine is with the Institut Charles Delaunay (CNRS), Université de technologie de Troyes, 10000, Troyes, France. Phone: +33(0)325715625; Fax: +33(0)325715699; E-mail: [email protected] the number of atoms (largely) exceeds the signal dimension. Several methods have been proposed to construct oversomplete dictionaries by solving a highly non-convex optimization problem, such as the method of optimal directions [4], its singular-value-decomposition (SVD) counterpart [5], and the “convexification” method [6]. Overcomplete dictionaries are more versatile to provide relevant representations, owing to an increased diversity. Several measures have been proposed to “quantify” the diversity of a given dictionary. The simplest measure of diversity is certainly the cardinality of the dictionary, i.e., the number of atoms. While this measure is too simplistic, several diversity measures have been proposed by examining relations between atoms, either in a pairwise fashion or in a more thorough way. The most used measure to characterize a dictionary is the coherence, which is the largest pairwise correlation between its atoms [7]. By using the largest cumulative correlation between an atom and all the other atoms of the dictionary, this yields the more exhaustive Babel measure [8]. Over the last twenty years or so, the coherence and its variants (such as the Babel measure) have been used for the matching pursuit algorithm [9] and the basis pursuit with arbitrary dictionaries [10], with theoretical results on the approximation quality studied in [11], [8]; see also the extensive literature on compressed sensing [1]. Beyond the literature on linear approximation, several diversity measures for overcomplete dictionary analysis have been investigated separately in the literature, within different frameworks. This is the case of the distance measure, which corresponds to the smallest pairwise distance between all atoms, as often considered in neural networks. Indeed, in resource-allocating networks for function interpolation, the network of gaussian units is assigned a new unit if this unit is distant enough to any other unit already in the network [12], [13]. It turns out that these units operate as atoms in the approximation model, with the corresponding dictionary having a small distance measure. While the distance measure of a given dictionary relies only on its nearest pair of atoms, a more thorough measure is the approximation measure, which corresponds to the least error of approximating any atom of the dictionary with a linear combination of its other atoms. This measure of diversity has been investigated in machine learning with gaussian processes [14], online learning with kernels for nonlinear adaptive filtering [15], and more recently kernel principal component analysis [16]. In order to provide a framework that encloses all the aforementioned methods, we consider the reproducing kernel Hilbert space formalism. This allows to generalize the wellknown linear model used in sparse approximation to a nonlinear one, where each atom is substituted by a nonlinear one given with a kernel function. This yields the so-called kernel dictionaries, where each atom lives in a feature space, the latter 2 being defined with some nonlinear transformation of the input space. While the linear kernel yields the conventional linear model, as given in the literature of linear sparse approximation, the use of nonlinear kernels such as the gaussian kernel, allows to include in our study neural networks with ressourceallocating networks, nonlinear adaptive filtering with kernels and gaussian processes. All the aforementioned diversity measures allow to quantify the heterogeneity within the dictionary under scrutiny. In this paper, we derive connections between these measures and the entropy in information theory (which is also related to the definition of entropy in other fields, such as thermodynamics and statistical mechanics) [17]. Indeed, the entropy measures the disorder or randomness within a given system. By considering the generalized Rényi entropy, which englobes the definitions given by Shannon, Hartley, as well as the quadratic formulation, we show that any overcomplete kernel dictionary with a given diversity measure has a lower-bounded entropy. These results on the high values of the entropy illustrate that the atoms are favorably spread uniformly over the space. We provide a comprehensive analysis, for any kernel type and any entropy definition, within the Rényi entropy framework as well as the more recent nonadditive entropy proposed by Tsallis [18], [19]. Finally, we provide an entropy analysis in the feature space by deriving lower bounds depending on the diversity measures. As a consequence, we connect the diversity measures between both input and feature spaces. The remained of this paper is organized as follows. Next section introduces the sparse approximation problem, in its conventional linear model as well as its nonlinear extension with the kernel formalism. Section III presents the most used diversity measures for quantifying overcomplete dictionaries, while Section IV provides a preliminary exploration with results that will be used throughout this paper. Section V is the core of this work, where we define the entropy and examine it in the input space, while Section VI extends this analysis to the feature space. Section VII concludes this paper. Related work In [20], Girolami considered the estimation of the quadratic entropy with a set of samples, by using the Parzen estimator based on a normalized kernel function. This formulation was investigated in regularization networks, and in particular leastsquares support vector machines (LS-SVM), in order to reduce the computational complexity by pruning samples that do not contribute sufficiently to the entropy [21]. More recently, an online learning scheme was proposed in [22] for LS-SVM by using the approximation measure as a sparsification criterion. In our paper, we derive the missing connections between this criterion and the entropy maximization. Richard, Bermudez and Honeine considered in [23] the analysis of the quadratic entropy of a kernel dictionary in terms of its coherence. We provide in our paper a framework to analyse overcomplete dictionaries with a more extensive examination, in both input and feature spaces, and generalizing to other entropy definitions and all types of kernels. The conducted analysis examines several diversity measures, including, but not limited to, the coherence measure. II. A PRIMER ON OVERCOMPLETE ( KERNEL ) APPROXIMATION In this section, we introduce the sparse approximation problem, in its conventional linear model as well as the kernelbased formulation. We conclude this section with an outline of the issues addressed in this paper. A. A primer on sparse approximation Consider a Banach space X of Rd , denoted input space. The approximation theory studies the representation of a given signal x of X with a dictionary of atoms (i.e., set of elementary signals), x1 , x2 , . . . , xn ∈ X, and estimating their fractions in the signal under scrutiny. In linear approximation, the decomposition takes the form: n X αi xi . (1) x≈ i=1 This representation is unique when the atoms form a basis, by approximating the signal with its projection onto the span of the atoms, namely αi = x⊤ i x. Examples that involve orthonormal bases include the Fourier transform and the discrete cosine transform, as well as the data-dependent KarhunenLoève transform (i.e., the PCA). Beyond these orthogonal bases, the relaxation of the orthogonality provides more flexibility with the use of overcomplete dictionaries, which allows to investigate different constraints more properly, such as the sparsity of the representation. In this case, the coefficients αi in (1) are obtained by promoting the sparsity of the representation. This optimization problem is often called sparse coding, assuming that the dictionary is known. In view of the vector [α1 α2 · · · αn ]⊤ , sparsity can be promoted by minimizing its ℓ0 pseudo-norm, which counts the number of non-zero entries, or its ℓ1 norm, which is the closest convex norm to the ℓ0 pseudo-norm [24]. Since the seminal work [25] where Olshausen and Field considered learning the atoms from a set of available data, data-driven dictionaries have been widely investigated. A large class of approaches have been proposed to solve iteratively the optimization problem by alternating between the dictionary learning (i.e., estimating the atoms xi ) and the sparse coding (i.e., estimating the coefficients αi ). The former problem is essentially tackled with the maximum likelihood principle of the data or the maximum a posteriori probability of the dictionary. The latter corresponds to the sparse coding problem. The best known methods for solving the optimization problem1 n X 2 αi xi , (2) arg min x − αi ,xi i=1···n i=1 subject to some sparsity promoting constraint, are the method of optimal directions [4] and the K-SVD algorithm [5], where the dictionary is determined respectively with the MoorePenrose pseudo-inverse and the SVD scheme. For more details, see [1] and references therein. It is worth noting that the sparsity constraint yields a difficult optimization problem, even when the model is linear in both coefficients and atoms. 1 In practice, one has several signals x in order to construct the dictionary, resulting in a Frobenius norm minimization. HONEINE: ENTROPY OF OVERCOMPLETE KERNEL DICTIONARIES X → 7 H xi → κ(xi , ·) Here, κ : X × X → R is a positive definite kernel and the feature space H is the so-called reproducing kernel Hilbert space. Let h·, ·iH and k·kH denote respectively the inner product and norm in the induced space H. This space has some interesting properties, such as the reproducing property which states that any function ψ(·) of H can be evaluated at any xi of X using ψ(xi ) = hψ(·), κ(xi , ·)iH . Moreover, we have the kernel trick, that is hκ(xi , ·), κ(xj , ·)iH = κ(xi , xj ) for any xi , xj ∈ X. In particular, kκ(·, xi )k2H = κ(xi , xi ). Kernels can be roughly divided in two categories, projective kernels as functions of the data inner product (i.e., hxi , xj i), and radial kernels as functions of their distance (i.e., kxi − xj k). The most used kernels and there expressions are given in TABLE I. From these kernels, only the gaussian and the radialbased exponential kernels are unit-norm, that is kκ(x, ·)kH = 1 for any x ∈ X. In this paper, we do not restrict ourselves to a particular kernel. We denote r2 = inf κ(x, x) x∈X R2 = sup κ(x, x), and x∈X where κ(x, x) = kκ(x, ·)k2H . For unit-norm kernels, we get R = r = 1. While the linear kernel yields the conventional model given in (1), nonlinear kernels such as the gaussian kernel provide the models investigated in RBF neural networks, gaussian processes [26] and kernel-based machine learning [27], including the celebrated support vector machines [28]. For a set of data x1 , x2 , . . . , xn ∈ X and a given kernel κ(·, ·), the induced RKHS H is defined such as any element ψ(·) of H takes the form n X αi κ(xi , ·). (3) ψ(·) = i=1 When dealing with an approximation problem in the same spirit of (1)-(2), the element ψ(·) is approximated by κ(x, ·). Compared to the linear case given in (1), it is easy to see that the above model is still linear in the coefficients αi , as well as the “atoms” κ(xi , ·), while it is nonlinear with respect to xi . Indeed, the resulting optimization problem consists in minimizing the residual in the RKHS, with arg min αi ,xi i=1···n κ(x, ·) − n X i=1 αi κ(xi , ·) 2 H . On the one hand, the estimation of the coefficients is similar to the one given in the linear case with (2); the classical (linear) sparse coders can be investigated for this purpose. On the other hand, the dictionary determination is more difficult, since the model is nonlinear in the xi ; thus, conventional techniques Kernel projective Nonlinear models provide a more challenging issue. The formalism of reproducing kernel Hilbert spaces (RKHS) provides an elegant and efficient framework to tackle nonlinearities. To this end, the signals x1 , x2 , . . . , xn are mapped with a nonlinear function into some feature space H, as follows: TABLE I T HE MOST USED KERNELS WITH THEIR EXPRESSIONS , INCLUDING TUNABLE PARAMETERS p, σ > 0 AND c ≥ 0. T HESE KERNELS ARE GROUPED IN TWO CATEGORIES : PROJECTIVE KERNELS AS FUNCTIONS OF hxi , xj i, AND RADIAL KERNELS AS FUNCTIONS OF kxi − xj k. radial B. Kernel-based approximation 3 Linear Polynomial Exponential Inverse multiquadratic Exponential Gaussian κ(xi , xj ) hxi , xj i (hxi , xj i + c)p exp (hxi , xj i) −p kxi − xj k2 + σ  exp −1 kxi − xj k  σ  −1 2 exp 2σ 2 kxi − xj k such as the K-SVD algorithm can no longer be used. It turns out that the estimation of the elements in the input space is a tough optimization problem, known in the literature as the pre-image problem [29]. More recently, the authors of [30], [31] adjusted the elements xi in the input space for nonlinear adaptive filtering with kernels. In another context, the authors of [32], [33] estimated these elements for the kernel nonnegative matrix factorization. C. Addressed issues In either analysis or synthesis of overcomplete (kernel) dictionaries, with the grow in the number of atoms, an increase in the heterogeneity of the atoms is needed. Such diversification requires that the atoms are not too “close” to each other. Depending on the definition of closeness, several diversity measures have been proposed in the literature. This is the case when the closeness is given in terms of the metric, as given with the distance measure for a pairwise measure between atoms, or the approximation measure for a more thorough measure. This is also the case when the collinearity of the atoms is considered, such as with the coherence and the Babel measures. These diversity measures are described in detail in Section III, within the formalism for a kernel dictionary {κ(x1 , ·), κ(x2 , ·), . . . , κ(xn , ·)}. In this paper, we connect these diversity measures to the entropy from information theory [17]. Indeed, from the viewpoint of information theory, the set {x1 , x2 , . . . , xn } can be viewed as a finite source alphabet. A fundamental measure of information is the entropy, which quantifies the disorder or randomness of a given system or set. It is also associated to the number of bits needed, in average, to store or communicate the set under investigation. A detailed definition of the entropy is given in Section V, with connections between the entropy of the set {x1 , x2 , . . . , xn } and the aforementioned diversity measures of the associated kernel dictionary {κ(x1 , ·), κ(x2 , ·), . . . , κ(xn , ·)}. Several entropy definitions are also investigated, including the generalized Rényi entropy and the Tsallis entropy. Finally, Section VI extends this analysis to the RKHS, by studying the entropy of set of atoms {κ(x1 , ·), κ(x2 , ·), . . . , κ(xn , ·)}. 4 III. D IVERSITY MEASURES In this section, we present measures that quantify the diversity of a given dictionary {κ(x1 , ·), κ(x2 , ·), . . . , κ(xn , ·)}. Each diversity measure is associated to a sparsification criterion for online learning, in order to construct dictionaries with large diversity measures. A. Cardinality The cardinality of the dictionary, namely the number n of atoms, is the simplest measure. However, such measure does not take into account that some atoms can be close to each others, e.g., duplicata. B. Distance measure A simple measure to characterize a dictionary is the smallest distance between all pairs of its atoms, namely min kκ(xi , ·) − κ(xj , ·)kH , i,j=1···n i6=j where kκ(xi , ·) − κ(xj , ·)k2H = κ(xi , xi ) − 2 κ(xi , xj ) + κ(xj , xj ). (4) In the following, we consider a tighter measure by using the distance between any two atoms, up to a scaling factor, which is a tighter measure since we have kκ(xi , ·) − κ(xj , ·)kH ≥ min kκ(xi , ·) − ξκ(xj , ·)kH . (5) ξ A dictionary is said to be δ-distant when δ = min min kκ(xi , ·) − ξ κ(xj , ·)kH . i,j=1···n i6=j ξ Since the above distance is equivalent to the residual error of approximating any atom by its projection onto another atom, the optimal scaling factor ξ takes the value κ(xi , xj )/κ(xj , xj ), yielding ! 2 κ(x , x ) i j . κ(xi , xi ) − δ 2 = min i,j=1···n κ(xj , xj ) i6=j When dealing with unit-norm atoms, this expression boils down to δ 2 = 1 − κ(xi , xj )2 . A sparsification criterion for online learning is studied in ressource-allocating networks [12], [34] with the “novelty criterion”, by imposing a lower bound on the distance measure of the dictionary. Thus, any candidate atom is included in the dictionary if the distance measure of the latter does not fall below a given threshold that controls the level of sparseness. C. Approximation measure While the distance measure relies only on the nearest two atoms, the approximation measure provides a more exhaustive analysis by quantifying the capacity of approximating any atom with a linear combination of the other atoms of the dictionary. A dictionary is said to be δ-approximate if the following is satisfied: n X δ = min min κ(xi , ·) − ξj κ(xj , ·) . (6) i=1···n ξ1 ···ξn j=1 j6=i H This expression corresponds to the residual error of projecting any atom onto the subspace spanned by the others atoms. By nullifying the derivative of the above cost function with respect to each coefficient ξj , we get the optimal vector of coefficients ξ = K\−1 κ (xi ), {i} \{i} (7) Here, K\{i} and κ\{i}(xi ) are obtained by removing the entries associated to xi from K and κ(xi ), respectively, where K is the Gram matrix of entries κ(xi , xj ) and κ(·) is the column vector of entries κ(xj , ·), for i, j = 1, . . . , n. By plugging the above expression in (6), we obtain: δ 2 = min κ(xi , xi ) − κ\{i}(xi )⊤ K\−1 κ (xi ). {i} \{i} i=1···n (8) The sparsification criterion associated to the approximation measure is studied in [35], [36] and more recently in [37] for system identification and [16] for kernel principal component analysis. This criterion constructs dictionaries with a high approximation measure, thus including any candidate atom in the dictionary if it cannot be well approximated by a linear combination of atoms already in the dictionary, for a given approximation threshold. D. Coherence measure In the literature of sparse linear approximation, the coherence is a fundamental quantity to characterize dictionaries. It corresponds to the largest correlation between atoms of a given dictionary, or mutually between atoms of two dictionaries. While initially introduced for linear matching pursuit in [9], it has been studied for the union of two bases [38], for basis pursuit with arbitrary dictionaries [10], for the analysis of the approximation quality [11], [8]. While most work consider the use of a linear measure, we explore in the following the coherence of a kernel dictionary, as initially studied in [39]. For a given dictionary, the coherence is defined by the largest correlation between all pairs of atoms, namely |hκ(xi , ·), κ(xj , ·)iH | . max i,j=1···n kκ(xi , ·)kH kκ(xj , ·)kH i6=j It is easy to see that this definition can be written, for a socalled γ-coherent dictionary, as follows: |κ(xi , xj )| , (9) γ = max p i,j=1···n κ(xi , xi ) κ(xj , xj ) i6=j For unit-norm atoms, we get max |κ(xi , xj )|. i,j=1···n i6=j The coherence criterion for sparsification constructs a “lowcoherent” dictionary, thus enforcing an upper bound on the cosine angle between each pair of atoms [23]. In this case, any candidate atom is included in the dictionary if the coherence of the latter does not exceed a given threshold.This threshold controls the level of sparseness of the dictionary, where a null value yields an orthogonal basis. HONEINE: ENTROPY OF OVERCOMPLETE KERNEL DICTIONARIES 5 E. Babel measure While the coherence relies only on the most correlated atoms in the dictionary, a more thorough measure is the Babel measure which considers the largest cumulative correlation between an atom and all the other atoms of the dictionary. The Babel measure can be defined in two ways. The first one is by connecting it to the coherence measure, with a definition related to the cumulative coherence, namely max i=1···n n X j=1 j6=i |κ(xi , xj )| p . κ(xi , xi ) κ(xj , xj ) i=1···n n X j=1 j6=i |κ(xi , xj )|. (11) n X |κ(xi , xj )| γ γ p ≤ max ≤ 2. R2 i=1···n j=1 κ(xi , xi ) κ(xj , xj ) r For this reason and for the sake of simplicity, we consider the definition (11) in this paper. The sparsification criterion associated to the Babel measure constructs dictionaries with a low cumulative coherence [41]. To this end, any candidate atom κ(xt , ·) is included in the dictionary if (and only if) |κ(xt , xj )| (12) does not exceed a given positive threshold. IV. S OME j=1 j6=i |κ(xi , xj )| ≤ (n − 1) max |κ(xi , xj )| i,j=1···n i6=j ≤ (n − 1)γ max i,j=1···n i6=j 2 q κ(xi , xi ) κ(xj , xj ) ≤ (n − 1)γR . Furthermore, it is also easy to provide an upper bound on the coherence of a dictionary with a given Babel measure, as given in the following theorem. Theorem 2: A γ-Babel dictionary has a coherence that does not exceed γ/r2 . Proof: The proof follows from the relation max p |κ(xi , xj )| |κ(xi , xj )| , ≤ max i,j=1···n r2 κ(xi , xi ) κ(xj , xj ) i6=j and the inequality between matrix norms: k · kmax ≤ k · k∞ . B. Analysis of a δ-approximate dictionary j6=i j=1 i=1···n n X i,j=1···n i6=j Connecting this definition with (10) — for not necessary unitnorm atoms — is straightforward, since the latter can be boxbounded for any γ-Babel dictionary defined by (11), with n X max (10) The second (and most conventional) way to define the Babel measure is by investigating an analogy with the norm operator [40], [8]. Indeed, while the coherence is the ∞-norm of the Gram matrix when dealing with unit-norm atoms, the BabelP measure explores the ℓ1 matrix-norm, where kKk1 = maxi j |κ(xi , xj )|. As a consequence, a dictionary is said to be γ-Babel when γ = max Proof: Following the definition (11), the Babel of a γcoherent dictionary is upper-bounded as follows: FUNDAMENTAL RESULTS Before proceeding throughout this paper with a rigorous analysis of any overcomplete dictionary in terms of its diversity measure, we provide in the following some results that are essential to our study. These results provide an attempt to bridge the gap between the different diversity measures. The following theorem is fundamental in the analysis of a dictionary resulting from the approximation criterion. Theorem 3: A δ-approximate dictionary has a Babel measure that does not exceed R2 − δ 2 , and a coherence measure that does not exceed R2 − δ 2 . r2 Proof: For a δ-approximate dictionary, we have from (7): K\{i}ξ = κ\{i}(xi ), for any i = 1, 2, . . . , n. By plugging this relation in (8), we obtain min κ(xi , xi ) − κ\{i}(xi )⊤ ξ ≥ δ 2 . ξ By considering the special case of the vector ξ with ξj = sign(κ(xi , xj )), for any j = 1, 2, . . . , n and j 6= i, we get n X j=1 j6=i for all i = 1, 2, . . . , n. As a consequence, max A. Coherence versus Babel measure The following theorems connect the coherence of a dictionary to its Babel measure by quantifying the Babel measure of a γ-coherent dictionary, and vice-versa. The following theorem has been known for a while in the case of unit-norm atoms. Theorem 1: A γ-coherent dictionary has a Babel measure that does not exceed (n − 1)γR2 . |κ(xi , xj )| ≤ κ(xi , xi ) − δ 2 , i=1···n n X j=1 j6=i |κ(xi , xj )| ≤ max κ(xi , xi ) − δ 2 ≤ R2 − δ 2 . i=1···n This concludes the proof for the Babel measure, since it is the left-hand-side in the above expression, while the upper bound on the coherence measure is obtained from the aforementioned connection between the coherence and the Babel measures as given in Theorem 2. 6 V. E NTROPY ANALYSIS IN THE INPUT SPACE The entropy measures the disorder or randomness within a given system. The Rényi entropy provides a generalization of well-known entropy definitions, such as Shannon and Harley entropies as well as the quadratic entropy (see TABLE II). It is defined for a given order α by Z α 1 Hα = P (x) dx, (13) log 1−α X for the probability distribution P that governs all elements x of X. When dealing with discrete random variables as in source coding, this definition is restricted to the set {x1 , x2 , . . . , xn } drawn from the probability distribution P , yielding the expression n X α 1 P (xj ) . (14) log Hα = 1−α j=1 Large values of the entropy correspond to a more uniform spread of the data2 . Since this probability distribution is unknown in practice, it is often approximated with a Parzen window estimator (also called kernel density estimator). The estimator takes the form n 1X w(kx − xj k), (15) Pb (x) = n j=1 for a given window function w centered at each xj . For more details, see for instance [42]. In the following, we provide lower bounds on the entropy of an overcomplete dictionary, in terms of its diversity measure. To this end, we initially restrict ourselves to the case of the quadratic entropy (i.e., α = 2), first with the gaussian kernel then with any type of kernel, before generalizing these results to any order α of the Rényi entropy as well as the Tsallis entropy. A. The quadratic entropy with the gaussian kernel Before generalizing to any window function in Section V-B and any order in Section V-C, we restrict ourselves first to the case of the gaussian window function with the quadratic entropy. The 2 quadratic entropy is defined by H2 = Pn − log j=1 P (xj ) . Considering the normalized gaussian window  1 w(kx − xj k) = √ exp −kx − xj k2 /σ 2 , d ( πσ) for some bandwidth parameter σ, the Parzen estimator becomes n  1X 1 √ exp −kx − xj k2 /σ 2 . Pb (x) = d n j=1 ( πσ) Since the convolution of two gaussian distributions leads to an2 Pn other gaussian distribution, then H2 ≈ − log j=1 Pb (xj ) 2 It is well-known for the Shannon entropy (i.e., where α → 1) that the uniform distribution yields the largest entropy. This property seems to extend to the case of any non-zero order, including α → ∞ where we get the minentropy. See TABLE II for the expressions of well-known entropies. becomes H2 ≈ − log n 1 X κ(xi , xj ) n2 i,j=1 (2πσ 2 )d/2  d = log 2πσ 2 − log 2 ! ! n 1 X κ(xi , xj ) , n2 i,j=1 (16)  −1 2 is the gaussian where κ(xi , xj ) = exp 2σ 2 kxi − xj k kernel. This expression shows that the sum of the entries in the Gram matrix describes the diversity of the dictionary elements, a result corroborated in [20] and more recently in [42]. This property was investigated in [21] for pruning the LS-SVM, by removing samples with the smallest entries in the Gram matrix. Each diversity measure studied in Section III yields a lower bound on the entropy of the dictionary under scrutiny. To shown this, we consider first the Babel measure with a γBabel dictionary. Following the Babel definition in (11), the entropy given in (16) is lower-bounded as follows: H2 ≥  d log 2πσ 2 + log n − log(1 + γ), 2 where we have used the following upper bound on the summation: n X κ(xi , xj ) = n X κ(xi , xi ) + i=1 i,j=1 n X n X κ(xi , xj ) i=1 j=1 j6=i ≤ n(1 + γ). This result provides the core of the proof. Indeed, Theorem 2 shows that this result holds also for a γ-coherent dictionary. Furthermore, wePcan P improve this bound for the coherence n n measure, since i=1 j=1,j6=i κ(xi , xj ) ≤ n(n − 1)γ, thus yielding the following lower bound on the entropy H2 ≥   d log 2πσ 2 + log n − log 1 + (n − 1)γ . 2 This result is also√ shared with a δ-distant dictionary, by substituting γ with 1 − δ 2 , since the distance is equivalent to the coherence when dealing with normalized kernels. Finally, Theorem 3 establishes the connection with a δ-approximate dictionary, where the above upper bound becomes H2 ≥   d log 2πσ 2 + log n − log 2 − δ 2 . 2 All these results provide lower bounds on the entropy, with the following observations. These bounds increase with the number of elements in the dictionary, i.e., n, which is obvious as the diversity grows. They decrease when the coherence and the Babel measures increase, while they increase when the distance and the approximation measures increase. These results provide quantitative details that confront the fact that, when using a sparsification criterion for online learning, low values of the coherence and Babel thresholds provide less “correlated” atoms and thus more diversity within the dictionary, as opposed to high values of the distance and approximation thresholds. HONEINE: ENTROPY OF OVERCOMPLETE KERNEL DICTIONARIES TABLE II T HE MOST KNOWN ENTROPIES AS SPECIAL CASES OF THE GENERALIZED R ÉNYI ENTROPY. Entropy order α Harley entropy α=0 Shannon entropy Hα 7 and for the latter the following relation H2 ≥ − log log n α→1 − n X P (xj ) log P (xj ) j=1 Quadratic entropy α=2 − log n X j=1 α→∞ Min-entropy j6=i 2 P (xj ) n 1X κ(xi , ·), Pb (·) = n i=1 where the norm is given in the subspace spanned by the kernel functions κ(x1 , ·), κ(x2 , ·), . . . , κ(xn , ·). Therefore, we have   n X 1 = − log  2 κ(xi , xj ) . n i,j=1 By following the same steps as in Section V-A, we can derive the following lower bounds on the quadratic entropy: √  2 • log n − log R + (n − 1)R R2 − δ 2 for a δ-distant dictionary.  2 2 • log n − log 2R − δ for a δ-approximate dictionary. 2 2 • log n−log R +(n−1)γR for a γ-coherent dictionary. 2 • log n − log(R + γ) for a γ-Babel dictionary. Before providing the proof of these results, it is worth noting that the conclusion and discussion conducted in the case of the gaussian kernel are still satisfied in the general case of any kernel type. Proof: The bounds for the δ-approximate and γ-Babel dictionaries are straightforward from Theorem 3 and the definition in (11). The lower bounds for γ-coherent and δdistant dictionaries are a bit trickier to prove. To show this, we use for the former the following relation n 1 X κ(xi , xi ) n2 i=1 ! n n q γ XX + 2 κ(xi , xi ) κ(xj , xj ) n i=1 j=1 j6=i ≥ log n − log R + (n − 1)R j=1···n The results presented so far can be extended to any kernel, even non-unit-norm kernels. To see this, we define the Parzen R estimator in a RKHS, by writing the integral X Pb (x)2 dx as the quadratic norm kPbk2H of H2 ≥ − log 2 min − log P (xj ) B. The quadratic entropy with any kernel H2 ≈ − log kPb k2H n 1 X κ(xi , xi ) n2 i=1 ! n n q  1 XX + 2 κ(xi , xi ) − δ 2 κ(xj , xj ) n i=1 j=1  ≥ log n − log R2 + (n − 1)γR2 , p  R2 − δ 2 . C. Generalization to Rényi and Tsallis entropies So far, we have investigated the quadratic entropy and derived lower bounds for each diversity measure. It turns out that these results can be extended to the general Rényi entropy and Tsallis entropy, as shown next. Special cases of the former are listed in TABLE II, including the Harley or maximum entropy which is associated to the cardinality of the set, the Shannon entropy which is essentially the Gibbs entropy in statistical thermodynamics, the quadratic entropy also called collision entropy, as well as the min-entropy which is the smallest measure in the family of Rényi entropies. Corollary 4: Any lower bound ζ on the quadratic entropy provides lower bounds on the Hartley entropy H0 , the Shannon H1 , and the min-entropy H∞ , with ζ ≤ H 1 ≤ H0 and 1 2ζ ≤ H∞ . Proof: The proof is due to the Jensen’s inequality and the concavity of the Rényi entropy for nonnegative orders. First, the relation of the Shannon entropy is given by exploring the following inequality: n n X X 2 P (xj ) . P (xj ) log P (xj ) ≤ log j=1 j=1 The connection to the Hartley entropy is straightforward, with H0 = log n. Finally, it is more trickier to study the minentropy, since it is the smallest entropy measure in the family of Rényi entropies, as a consequence it is the strongest way to measure the information content. To provide a lower bound on the min-entropy, we use the relations n X 2 2 P (xj ) ≥ log max P (xj ) = 2 log max P (xj ), log j=1 j=1···n j=1···n which yields the following inequality: H2 ≤ 2H∞ . Furthermore, one can easily extend these results to the class of the Tsallis entropy, also called nonadditive entropy, defined by the following expression for a given parameter q (called entropic-index) [18], [19]: n X q  1  P (xj ) 1− . q−1 j=1 To this end, the aforementioned lower bounds on the Rényi entropy can be extended to the Tsallis entropy by using for instance the well-known relation log u ≤ u − 1 for any u ≥ 0. As a consequence, the lower bounds on the quadratic entropy given in Sections V-A and V-B can be explored to other orders of Rényi entropy and Tsallis entropy. 8 VI. E NTROPY Finally, for any γ-Babel dictionary, we have IN THE FEATURE SPACE By analogy with the entropy analysis in the input space conducted in Section V, we propose to revisit it in the feature space, as given in this section. By examining the pairwise distance between any two atoms of the investigated dictionary, we first establish in Section VI-A a topological analysis of overcomplete dictionaries. This analysis is explored in Section VI-B with the study of the entropy of the atoms in the feature space. By providing lower bounds in terms of the diversity measures, these results provide connections to the entropy analysis conducted in the previous section. min kκ(xi , ·) − κ(xj , ·)k2H i,j=1···n i6=j = min κ(xi , xi ) − 2κ(xi , xj ) + κ(xj , xj ) i,j=1···n i6=j 2 ≥ 2r − 2 max |κ(xi , xj )|, i,j=1···n i6=j ≥ 2r2 − 2 γ, which is strictly positive when γ < r2 . B. Entropy in the RKHS A. Fundamental analysis The following theorem is used in the following section for the analysis of the atoms of a kernel dictionary. Theorem 5: For any dictionary with a non-zero approximation measure, or a non-unit coherence measure, or a Babel measure below r2 , we have a low-bounded distance measure. Proof: The proof is straightforward for a δ-approximate dictionary, since kκ(xi , ·) − κ(xj , ·)kH ≥ min ξ1 ···ξn κ(xi , ·) − n X j=1 j6=i ξj κ(xj , ·) H ≥ δ. For the coherence measure, we consider the pairwise distance in terms of kernels as given in (4). Since a γ-coherent dictionary satisfies |κ(xi , xj )| ≤ γ, max p i,j=1···n κ(xi , xi ) κ(xj , xj ) i6=j then we have max |κ(xi , xj )| ≤ γ max i,j=1···n i6=j i,j=1···n i6=j q κ(xi , xi ) κ(xj , xj ). Thus, kκ(xi , ·) − κ(xj , ·)k2H from the right-hand-side of equation (4) is lower-bounded by κ(xi , xi ) − 2 γ q κ(xi , xi ) κ(xj , xj ) + κ(xj , xj ). Therefore, to complete the proof, it is sufficient to show that this expression is always strictly positive. Indeed, it is 2 2 a quadratic polynomial of the p p form u − 2γuv + v where u = κ(xi , xi ) and v = κ(xj , xj ) (this form is valid since κ(x, x) = kκ(x, ·)k2H > 0 for any x ∈ X). Considering the roots of this quadratic polynomial with respect to u, its discriminant is 4 κ(xj , xj )(γ 2 − 1), which is strictly negative since γ ∈ [ 0 ; 1 [ and κ(xj , xj ) cannot be zero. Therefore, the polynomial has no real roots, and it is strictly positive. The entropy in the feature space provides a measure of diversity of the atoms distribution. In the following, we show that the entropy estimated in the feature space is lowerbounded, with a bound expressed in terms of a diversity measure. We denote by PH (x) the distribution associated to the kernel functions in the feature space, namely by definition PH (x) = P (κ(x, ·)). The entropy in the RKHS is given by expression (13) where P (x) is substituted with PH (x), yielding3 Z α 1 PH (x) dx. (17) log 1−α X By approximating the integral in this expression with the set {x1 , x2 , . . . , xn }, we get n X α 1 PH (xj ) . log 1−α j=1 The distribution PH (·) is estimated with the Parzen window estimator. The use of a radial function w(·) defined in the feature space H yields n 1X w(kκ(x, ·) − κ(xj , ·)kH ). PbH (x) = n j=1 Examples of radial functions are — up to a scaling factor to ensure the integration to one — the gaussian, the radialbased exponential and the inverse mutliquadratic kernels, given in TABLE I and applied here in the feature space. Radial kernels are monotonically decreasing in the distance, namely κ(xi , xj ) grows when kxi −xj k is decreasing. This statement results from the following lemma; See also [45, Proposition 5]. Lemma 6: Any kernel κ, of the form κ(xi , xj ) = g(kxi − xj k2 ) with g : (0, ∞) → R, is positive definite if g(·) is completely monotonic, namely its k-th derivative g (k) satisfies (−1)k g (k) (r) ≥ 0 for any r, k ≥ 0. Theorem 7: Consider an overcomplete kernel dictionary with a lower bound ǫ on its distance measure, or any bounded diversity measure as given in Theorem 5. A Parzen window estimator, estimated over the dictionary atoms in the feature space, is upper-bounded by w(ǫ), where w(·) is the used window function. 3 The expectation in a RKHS, as in (17), was previously investigated in the literature. The notion of embedding a Borel probability measure P , defined on the topological space X, into a RKHS H was studied in detail in [43], with R κ(x, ·) dP (x). For an algorithmic use, see [44] for a one-class classifier. X HONEINE: ENTROPY OF OVERCOMPLETE KERNEL DICTIONARIES Proof: The proof is follows from n 1X PbH (x) = w(kκ(x, ·) − κ(xj , ·)kH ) n j=1 n < 1X w(ǫ) n j=1 = w(ǫ), where the inequality is due to the monotonically decreasing property of the window function w and Theorem 5. This theorem is the main building block of the following corollary that provides lower bounds on the entropy, with the Shannon entropy and generalizing to the Rényi entropy for any order α > 1. Corollary 8: Consider an overcomplete kernel dictionary with a lower bound ǫ on its distance measure, or any bounded diversity measure as given in Theorem 5. The Shannon entropy and the generalized Rényi entropy for any order α > 1 are α 1 log n w(ǫ) , lower bounded by −n w(ǫ) log w(ǫ) and 1−α respectively, where w(·) is the used window function. Proof: From Theorem 7, we have PbH (x) < w(ǫ) for any window function w(·). This yields for the Shannon entropy: − n X j=1 PbH (xj ) log PbH (xj ) > −n w(ǫ) log w(ǫ). More generally, the Rényi entropy for any order α is estimated by n  X α α  1 1 PbH (xj ) > , log log n w(ǫ) 1−α 1−α j=1 where we have used Theorem 7 and α > 1. These results illustrate how the atoms of an overcomplete dictionary are uniformly spread in the feature space. VII. F INAL REMARKS This paper provided a framework to examine linear and kernel dictionaries with the notion of entropy from information theory. By examining different diversity measures, we showed that overcomplete dictionaries have lower bounds on the entropy. While various definitions were explored here, these results open the door to bridging the gap between information theory and diversity measures for the analysis and synthesis of overcomplete dictionaries, in both input and feature spaces. As of futur works, we are studying connections to the entropy component analysis [42], in order to provide a thorough examination and develop an online learning approach. The conducted analysis, illustrated here within the framework of kernel-based learning algorithms, can be easily extended to other machines such as gaussian processes and neural networks. It is worth noting that this work does not devise any particular diversity measure for quantifying overcomplete dictionaries, in the same spirit as our recent work [46], [47]. 9 R EFERENCES [1] M. Elad, Sparse and Redundant Representations: From Theory to Applications in Signal and Image Processing. Springer, 2010. [2] S. Mallat, A wavelet tour of signal processing. Academic Press, 1998. [3] I. Jolliffe, Principal Component Analysis. New York, NY, USA: Springer-Verlag, 1986. [4] K. Engan, S. Aase, and J. Hakon Husoy, “Method of optimal directions for frame design,” in Acoustics, Speech, and Signal Processing, 1999. Proceedings., 1999 IEEE International Conference on, vol. 5, pp. 2443– 2446 vol.5, 1999. [5] M. Aharon, M. Elad, and A. Bruckstein, “K-SVD: An algorithm for designing overcomplete dictionaries for sparse representation,” Signal Processing, IEEE Transactions on, vol. 54, no. 11, pp. 4311–4322, 2006. [6] J. Mairal, F. Bach, J. Ponce, and G. Sapiro, “Online dictionary learning for sparse coding,” in Proceedings of the 26th Annual International Conference on Machine Learning, ICML ’09, (New York, NY, USA), pp. 689–696, ACM, 2009. [7] J. Tropp, “Just relax: convex programming methods for identifying sparse signals in noise,” Information Theory, IEEE Transactions on, vol. 52, pp. 1030–1051, March 2006. [8] J. A. Tropp, “Greed is good: algorithmic results for sparse approximation,” IEEE Trans. Information Theory, vol. 50, pp. 2231–2242, 2004. [9] S. Mallat and Z. Zhang, “Matching pursuit with time-frequency dictionaries,” IEEE Transactions on Signal Processing, vol. 41, pp. 3397– 3415, 1993. [10] D. L. Donoho and M. Elad, “Optimally sparse representation in general (nonorthogonal) dictionaries via ℓ1 minimization,” Proceedings - National Academy of Sciences (PNAS), vol. 100, pp. 2197–2202, March 2003. [11] A. C. Gilbert, S. Muthukrishnan, and M. J. Strauss, “Approximation of functions over redundant dictionaries using coherence,” in Proc. 14-th annual ACM-SIAM symposium on Discrete algorithms (SODA), (Philadelphia, PA, USA), pp. 243–252, Society for Industrial and Applied Mathematics, 2003. [12] J. Platt, “A resource-allocating network for function interpolation,” Neural Comput., vol. 3, pp. 213–225, June 1991. [13] N. Vuković and Z. Miljković, “A growing and pruning sequential learning algorithm of hyper basis function neural network for function approximation,” Neural Netw., vol. 46, pp. 210–226, Oct. 2013. [14] L. Csató and M. Opper, “Sparse online gaussian processes,” Neural Computation, vol. 14, pp. 641–668, 2002. [15] P. P. Pokharel, W. Liu, and J. C. Principe, “Kernel least mean square algorithm with constrained growth,” Signal Processing, vol. 89, no. 3, pp. 257 – 265, 2009. [16] P. Honeine, “Online kernel principal component analysis: a reducedorder model,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 34, pp. 1814–1826, September 2012. [17] T. M. Cover and J. A. Thomas, Elements of information theory. Wiley Series in Telecommunications and Signal Processing, WileyInterscience, 2nd edition ed., 2006. [18] C. Tsallis, “Nonadditive entropy: The concept and its use,” European Physical Journal A, vol. 40, pp. 257–266, June 2009. [19] J. Cartwright, “Roll over, boltzmann,” Physics World, May 2014. [20] M. Girolami, “Orthogonal series density estimation and the kernel eigenvalue problem,” Neural Computation, vol. 14, pp. 669–688, 2002. [21] J. A. K. Suykens, T. V. Gestel, J. D. Brabanter, B. D. Moor, and J. Vandewalle, Least Squares Support Vector Machines. Singapore: World Scientific Pub. Co., 2002. [22] T. Jung and D. Polani, “Sequential learning with ls-svm for largescale data sets,” in Proceedings of the 16th International Conference on Artificial Neural Networks - Volume Part II, ICANN’06, (Berlin, Heidelberg), pp. 381–390, Springer-Verlag, 2006. [23] C. Richard, J. C. M. Bermudez, and P. Honeine, “Online prediction of time series data with kernels,” IEEE Transactions on Signal Processing, vol. 57, pp. 1058–1067, March 2009. [24] T. Hastie, R. Tibshirani, and J. Friedman, The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Springer Series in Statistics, Springer, second edition ed., 2009. [25] B. A. Olshausen and D. J. Field, “Emergence of simple-cell receptive field properties by learning a sparse code for natural images,” Nature, vol. 381, no. 6583, pp. 607–609, 1996. [26] C. E. Rasmussen and C. Williams, Gaussian Processes for Machine Learning. MIT Press, 2006. [27] J. Shawe-Taylor and N. Cristianini, Kernel Methods for Pattern Analysis. Cambridge, UK: Cambridge University Press, 2004. 10 [28] V. Vapnik, The Nature of Statistical Learning Theory. New York, NY, USA: Springer-Verlag, 1995. [29] P. Honeine and C. Richard, “Preimage problem in kernel-based machine learning,” IEEE Signal Processing Magazine, vol. 28, pp. 77–88, March 2011. [30] C. Saidé, R. Lengellé, P. Honeine, and R. Achkar, “Online kernel adaptive algorithms with dictionary adaptation for mimo models,” IEEE Signal Processing Letters, vol. 20, pp. 535–538, May 2013. [31] C. Saidé, R. Lengellé, P. Honeine, C. Richard, and R. Achkar, “Nonlinear adaptive filtering using kernel-based algorithms with dictionary adaptation,” International Journal of Adaptive Control and Signal Processing, 2014 submitted. [32] F. Zhu, P. Honeine, and M. Kallas, “Kernel non-negative matrix factorization without the pre-image problem,” in Proc. 24th IEEE workshop on Machine Learning for Signal Processing, (Reims, France), 21–24 September 2014. [33] F. Zhu, P. Honeine, and M. Kallas, “Kernel nonnegative matrix factorization without the curse of the pre-image,” IEEE Transactions on Pattern Analysis and Machine Intelligence, 2014 submitted. [34] G. bin Huang, P. Saratch, S. Member, and N. Sundararajan, “A generalized growing and pruning rbf (ggap-rbf) neural network for function approximation,” IEEE Transactions on Neural Networks, vol. 16, pp. 57– 67, 2005. [35] G. Baudat and F. Anouar, “Kernel-based methods and function approximation,” in In International Joint Conference on Neural Networks (IJCNN), vol. 5, (Washington, DC, USA), pp. 1244–1249, July 2001. [36] L. Csató and M. Opper, “Sparse representation for gaussian process models,” in Advances in Neural Information Processing Systems 13, pp. 444–450, MIT Press, 2001. [37] Y. Engel, S. Mannor, and R. Meir, “The kernel recursive least squares algorithm,” IEEE Trans. Signal Processing, vol. 52, no. 8, pp. 2275– 2285, 2004. [38] D. L. Donoho and X. Huo, “Uncertainty principles and ideal atomic decomposition,” IEEE Trans. Information Theory, vol. 47, pp. 2845– 2862, March 2001. [39] P. Honeine, C. Richard, and J. C. M. Bermudez, “On-line nonlinear sparse approximation of functions,” in Proc. IEEE International Symposium on Information Theory, (Nice, France), pp. 956–960, June 2007. [40] A. C. Gilbert, S. Muthukrishnan, M. J. Strauss, and J. Tropp, “Improved sparse approximation over quasi-incoherent dictionaries,” in International Conference on Image Processing (ICIP), vol. 1, (Barcelona, Spain), pp. 37–40, Sept. 2003. [41] H. Fan, Q. Song, and S. B. Shrestha, “Online learning with kernel regularized least mean square algorithms,” Knowledge-Based Systems, vol. 59, no. 0, pp. 21 – 32, 2014. [42] R. Jenssen, “Kernel entropy component analysis,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 32, no. 5, pp. 847–860, 2010. [43] B. K. Sriperumbudur Vangeepuram, Reproducing Kernel Space Embeddings and Metrics on Probability Measures. PhD thesis, Electrical Engineering (Signal and Image Processing), University of California at San Diego, La Jolla, CA, USA, 2010. AAI3432386. [44] Z. Noumir, P. Honeine, and C. Richard, “On simple one-class classification methods,” in Proc. IEEE International Symposium on Information Theory, (MIT, Cambridge (MA), USA), pp. 2022–2026, 1–6 July 2012. [45] F. Cucker and S. Smale, “On the mathematical foundations of learning,” Bulletin of the American Mathematical Society, vol. 39, pp. 1–49, 2002. [46] P. Honeine, “Approximation errors of online sparsification criteria,” IEEE Transactions on Signal Processing, 2014 submitted. [47] P. Honeine, “Analyzing sparse dictionaries for online learning with kernels,” IEEE Transactions on Signal Processing, 2014 submitted. Paul Honeine (M’07) was born in Beirut, Lebanon, on October 2, 1977. He received the Dipl.-Ing. degree in mechanical engineering in 2002 and the M.Sc. degree in industrial control in 2003, both from PLACE the Faculty of Engineering, the Lebanese University, PHOTO Lebanon. In 2007, he received the Ph.D. degree in HERE Systems Optimisation and Security from the University of Technology of Troyes, France, and was a Postdoctoral Research associate with the Systems Modeling and Dependability Laboratory, from 2007 to 2008. Since September 2008, he has been an assistant Professor at the University of Technology of Troyes, France. His research interests include nonstationary signal analysis and classification, nonlinear and statistical signal processing, sparse representations, machine learning. Of particular interest are applications to (wireless) sensor networks, biomedical signal processing, hyperspectral imagery and nonlinear adaptive system identification. He is the co-author (with C. Richard) of the 2009 Best Paper Award at the IEEE Workshop on Machine Learning for Signal Processing. Over the past 5 years, he has published more than 100 peerreviewed papers.
9cs.NE
Learning without Recall: A Case for Log-Linear Learning ⋆ Mohammad Amin Rahimian & Ali Jadbabaie ∗ arXiv:1509.08990v1 [cs.SI] 30 Sep 2015 ∗ Department of Electrical and Systems Engineering, University of Pennsylvania, Philadelphia, PA 19104-6228 USA (e-mail: [email protected]) Abstract: We analyze a model of learning and belief formation in networks in which agents follow Bayes rule yet they do not recall their history of past observations and cannot reason about how other agents’ beliefs are formed. They do so by making rational inferences about their observations which include a sequence of independent and identically distributed private signals as well as the beliefs of their neighboring agents at each time. Fully rational agents would successively apply Bayes rule to the entire history of observations. This leads to forebodingly complex inferences due to lack of knowledge about the global network structure that causes those observations. To address these complexities, we consider a “Learning without Recall ” model, which in addition to providing a tractable framework for analyzing the behavior of rational agents in social networks, can also provide a behavioral foundation for the variety of non-Bayesian update rules in the literature. We present the implications of various choices for time-varying priors of such agents and how this choice affects learning and its rate. 1. INTRODUCTION & BACKGROUND Agents exchange beliefs in social networks to benefit from each other’s opinions and private information in trying to learn an unknown state of the world. Rational agents in a social network would apply Bayes rule successively to their observations at each step, which include not only their private signals but also the beliefs communicated by their neighbors. However, such repeated applications of Bayes rule in networks become very complex, especially if the agents are unaware of the global network structure. This is due to the fact that the agents at each step should use their local data that is increasing with time, and make very complex inferences about possible signal structures leading to their observations. Indeed, tractable modeling and analysis of rational behavior in networks is an important problem in network economics and have attracted much attention, Acemoglu et al. (2011); MuellerFrank (2013); Mossel et al. (2014). To avoid the complexities of fully rational inference, a variety of non-Bayesian update rules have been proposed that rely on the seminal work of DeGroot (1974) in linear opinion pooling, where agents update their opinions to a convex combination of their neighbors’ beliefs and the coefficients correspond to the level of confidence that each agent puts in each of her neighbors. More recently, Jadbabaie et al. (2012, 2013) consider a variation of this model for streaming observations, where in addition to the neighboring beliefs the agents also receive private signals. Other forms of non-Bayesian rules were studied by Bala and Goyal (1998) who consider a variation of observational learning in which agents observe the action and pay-offs of their neighbors and make rational inferences about these action/pay-off correspondence together with the ⋆ This work was supported by ARO MURI W911NF-12-1-0509. choices made by their neighbors, but ignore the fact that their neighbors are themselves learning from their own observations. More recently, Eyster and Rabin (2010) consider models of autarkic play where players at each generation observe their predecessor but naı̈vely think that any predecessor’s action relies solely on that player’s private information, thus ignoring the possibility that successive generations are learning from each other. A chief contribution of this paper is establishing a behavioral foundation for the existing non-Bayesian updates in the literature where the belief update rule has a log-linear structure. This paper addresses the question of how one can limit the information requirement of a Bayesian update and still ensure consensus or learning for the agents. Some of the non-Bayesian update rules have the property that they resemble the replication of a first step of a Bayesian update from a common prior, and the aim here is to formalize such a setup. For instance DeMarzo et al. (2003) interpret the weights in the DeGroot model as those assigned initially by rational agents to the noisy opinions of their neighbors based on their perceived precision. However, by repeatedly applying the same weights over and over again, the agents ignore the need to update these weights with the increasing information. To this end, we propose the so-called Learning without Recall model as a belief formation and update rule for Rational but Memoryless agents. We show how such a scheme can provide convergence and learning for all agents in a strongly connected social network so long as the truth is identifiable through the aggregate observations of the agents across entire network. This is of particular interest, when the agents cannot distinguish the truth based solely on their private observations, and yet together they learn. 2. THE LEARNING WITHOUT RECALL MODEL Notation. Throughout the paper, N0 = {0} ∪ N is the set of positive integers and zero. Boldface letters denote random variables, the identity matrix is denoted by I, and k·k is a vector norm. We use Greek letters to denote certain variables of interest such as: agents beliefs (µ), log-ratio of beliefs (φ), log-likelihood ratio of signals (λ), and logratio of initial prior beliefs (ψ). We consider a network of n agents labeled by [n] := {1, 2, . . . , n}, that interact according to a directed graph G = ([n], E), where E ⊂ [n]× [n] is the set of directed edges. Each agent is labeled by a unique element of the set [n]. N (i) = {j ∈ [n]; (j, i) ∈ E} is the neighborhood of agent i, which is the set of all agents whose beliefs can be observed by agent i. We let deg(i) =| N (i) | be the degree of node i corresponding to the number of agent i’s neighbors. Signals and Environment. We denote by Θ the finite set of states of the world. Also, ∆Θ represents the space of all probability measures on the set Θ. Each agent’s goal is to decide amongst the finitely many possibilities in the state space Θ. A random variable θ is chosen randomly from Θ by nature and according to the probability measure ν(·) ∈ ∆Θ, which satisfies ν(θ̌) > 0, ∀θ̌ ∈ Θ. For each agent i, there exists a finite signal space denoted by Si , and given θ, ℓi (· | θ) is a probability measure on Si , which is referred to as the signal structure or likelihood function of agent i. The private signals for agent i are generated according to ℓi (· | θ). Let Ω be an infinite product space encompassing the state θ and the private signals {si,t , i ∈ [n], t ∈ N0 }. Let P{·} be the probability measure on Ω with the corresponding expectation operator E{·}, assigning probabilities consistently with the distribution ν(·) and the likelihood functions ℓi (· | θ), i ∈ [n]. Conditioned on θ, the random variables {si,t , i ∈ [n], t ∈ W} are independent. Consequently, the privately observed signals are independent and identically distributed over time and independent across the agents. Beliefs. We let µi,t (·) be a probability distribution on the set Θ representing the opinion or belief at time t of agent i about the realized value of θ. The goal is to study asymptotic learning, i.e. for each agent to learn the true realized value of θ asymptotically; we denote this truth by θ ∈ Θ. Hence, learning amounts to having µi,t (·) converge to a point mass centered at θ, where the convergence could be in probability or in the stronger almost sure sense that we use in this work. At t = 0 the value θ = θ is selected by nature. Followed by that, si,0 for each i ∈ [n] is realized and observed by agent i. Then the agent forms an initial Bayesian opinion µi,0 (·) about the value of θ. Given si,0 , and using Bayes rule for each agent i ∈ [n], the initial belief in terms of the observed signal si,0 is given by: νi (θ̌)ℓi (si,0 | θ̌) µi,0 (θ̌) = X , νi (θ̂)ℓi (si,0 | θ̂) (1) θ̂∈Θ where νi (·) ∈ ∆Θ is an initial full-support (νi (θ̂) > 0, ∀θ̂ ∈ Θ) prior belief associated with agent i; it represents the subjective biases of agnet i even before making any observations. In particular, for an unbiased agent we have that ν(θ̂) = 1/|Θ|, ∀θ̂ ∈ Θ. If we assume that each agent i knows the initial priors of her neighbors: νj (·), j ∈ N (i), 1 then Bayes rule can be exploited to derive the refined opinion µi,1 (·) after agent i observes her neighbors’ initial beliefs {µj,0 (·); j ∈ N (i)} given by (1). Following Rahimian et al. (2014) this leads to Q  µj,0 (θ̌) νi (θ̌)li (si,0 | θ̌) j∈N (i) νj (θ̌)   . (2) µi,1 (θ̌) = P Q µj,0 (θ̂) j∈N (i) ν (θ̂) θ̂∈Θ νi (θ̂)li (si,0 | θ̂) j How should the belief be updated in the next time steps? A Bayesian agent who cannot recall how the neighbors’ beliefs are updated might instead imitate the preceding structure for all the following time steps t > 1. Indeed, in (2) we can substitute si,t , µi,t (·), and µj,t−1 (·) for si,0 , µi,1 (·), µj,0 (·). How should the agent update the priors? We study various choices for νj (·), ∀j . To proceed, for each agent i we also replace νj (·), ∀j with a time-varying distribution ξi,j (·, t), and argue that a Rational but Memoryless agent i would make her rational inference about the opinion µj,t−1 (·) that agent j reports to her at time t according to some time-varying prior ξ i,j (·, t), j ∈ [n]. Here, any choice of distributions ξ i,j (·, t), j ∈ [n] should satisfy the information constraints of a Rational but Memoryless agent, so long as such a choice does not require an agent to recall any information other than what she has just observed si,t and what her neighbors have just reported to her µj,t−1 (·), j ∈ N (i). A memoryless yet rational agent of this type can process the beliefs of her neighbors, but cannot recall how these beliefs were formed. Accordingly, (2) becomes µi,t (θ̌) = ξ i,i (θ̌, t)li (si,t | θ̌) P (3) Q θ̂∈Θ ξ i,i (θ̂, t)li (si,t | θ̂) µj,t−1 (θ̌) j∈N (i) ξi,j (θ̌,t)  Q  µj,t−1 (θ̂) j∈N (i) ξ (θ̂,t) i,j , for all θ̌ ∈ Θ and at any t > 1. In writing (3), the time one update is regarded as a function that maps the priors, the private signal, and the neighbors’ beliefs to the agent’s posterior belief; and in using the time one update in the subsequent steps as in (3), every time agent i regards each of her neighbors j ∈ N (i) as having started from some prior belief ξ i,j (·, t) and arrived at their currently reported belief µj,t−1 (·) directly after observing a private signal, hence rejecting any possibility of a past history. Such a rule is of course not the optimum Bayesian update of agent i’s belief at any step t > 1, because the agent is not taking into account the complete observed history of her private signals and neighboring beliefs and is instead, basing her inference entirely on the immediately observed signal and 1 The assumption of (common) knowledge of priors in the case of rational (Bayesian) agents can be justified as follows: given the same observations of an agent j and in the absence of any past observations or additional data, any agent i should make the same (rational) inference; in the sense that starting form the same belief about the unknown, their updated beliefs given the same observations would be the same, or in Aumann’s words, rational agents cannot agree to disagree, Aumann (1976). neighboring beliefs; hence, the name memoryless. In the next section, we address the choice of random and timevarying priors ξ i,j (·, t), j ∈ N (i) while examining the properties of convergence and learning under the update rules in (3). 3. ASYMPTOTIC ANALYSIS OF CONVERGENCE & LEARNING WITH LOG-LINEAR UPDATES We begin by forming the log-ratios of beliefs, signals, and priors under the true and false states as φi,t (θ̌) :=  log(µi,t (θ̌)/µi,t (θ)), λi,t (θ̌) := log ℓi (si,t |θ̌)/ℓi (si,t |θ) , and γ i,j (θ̌, t) := log(ξ i,j (θ̌, t)/ξi,j (θ, t)) for all i, j and t. Consequently, (3) can be linearized as follows: φi,t (θ̌) = γ i,i (θ̌, t) + λi,t (θ̌) X (φj,t−1 (θ̌) − γ i,j (θ̌, t)). + (4) j∈N (i) The network graph structure is encoded by its adjacency matrix A defined as [A]ij = 1 ⇐⇒ (j, i) ∈ E, and [A]ij = 0 otherwise. For a strongly connected G the PerronFrobenius theory, cf. (Seneta, 2006, Theorem 1.5), implies that A has a simple positive real eigenvalue, denoted by ρ > 0, which is equal to its spectral radius. Moreover, the left eigenspace associated with ρ is one-dimensional with the corresponding eigenvector α = (α1 , . . . , αn )T , uniquely Pn T T satisfying i=1 αi = 1, αi > 0, ∀i ∈ [n], and α A = ρα . The quantity αi is also known as the eigenvector centrality of vertex i in the network, cf. (Newman, 2010, Section 7.2). Multiplying both sides of (4) by αi and summing over all i we obtain that Φt (θ̌) = tr{Ξt (θ̌)} + Λt (θ̌) (5) + ρΦt−1 (θ̌) − tr{Ξt (θ̌)AT } t X  = ρτ Λt−τ + tr{(I − AT )Ξt−τ (θ̌)} τ =0 Pn Pn where Φt (θ̌) := i=1 αi φi,t (θ̌) and Λt (θ̌) := i=1 αi λi,t (θ̌) are global (network-wide) random variables, and Ξt (θ̌) is a random n × n matrix whose i, j-th entry is given by [Ξt (θ̌)]i,j = αi γ i,j (θ̌, t). At each epoch of time, Φt (θ̌) characterizes how biased (away from the truth and towards θ̌) the network beliefs are, and Λt (θ̌) measures the information content of the received signal across all the agents in the network. Note that in writing (5), we use the fact that n X X T φj,t−1 (θ̌) = α Aφt−1 (θ̌) αi i=1 j∈N (i) T = ρα φt−1 (θ̌) = ρΦt−1 (θ̌), where φt (θ̌) := (φ1,t (θ̌), . . . , φn,t (θ̌))T . On the other hand, since the received signal vectors {si,t , i ∈ [n], t ∈ N0 } are i.i.d. over time, {Λt (θ̌), t ∈ N0 } constitutes a sequence of i.i.d. random variables satisfying n n X X  αi λi (θ̌) 6 0, (6) αi E{λi,t (θ̌)} = E Λt (θ̌) = i=1 i=1 T where λ(θ̌) := (λ1 (θ̌), . . . , λn (θ̌)) := T  , − DKL ℓ1 (·|θ)||ℓ1 (·|θ̌) , . . . , DKL ℓn (·|θ)||ℓn (·|θ̌) and the non-positivity of (6) follows from the information inequality for the Kullback-Leibler divergence: DKL (·||·) ≥ 0, and is strict whenever ℓi (·|θ̌) 6≡ ℓi (·|θ) for some i, i.e. ∃s ∈ Si , i ∈ [n] such that ℓi (s|θ̌) 6= ℓi (s|θ), cf. (Cover and Thomas, 2006, Theorem 2.6.3). In particular, if for all  θ̌ 6= θ there exists an agent i with λi (θ̌) < 0, then E Λt (θ̌) < 0 and we say that the truth θ is globally identifiable. Indeed, if any agent is to learn the truth, then we need that Φt (θ̌) → −∞ as t → ∞ for all the false states θ̌ 6= θ. However, in a strongly connected graph every node has a degree greater than or equal to one so that ρ ≥ 1, (Brualdi, 2011, Chapter 2). If ρ > 1, then the term ρt Λ0 (θ̌) increases in variance as t → ∞, and unless Λ0 (θ̌) < ǫ with P-probability one for some ǫ < 0, almost sure convergence to −∞ for Φt (θ̌) in (5) cannot hold true. In a directed circle where ρ = 1, one may take ξ i,j (·, t) ≡ νj (·) ≡ ν(·) for all i, j and t. Consequently, at each epoch of time each agent i assumes that all her neighbors have started from the initial common prior belief ν(·) and have arrived at their current beliefs directly, thus forgetting any history of observed signals and exchanged opinions. The geometric progression in (5) then reduces to sum of i.i.d. variables in L1 ; and by the strong law of large numbers, cf. (Feller, 1968, Section X.1), it converges almost surely to the mean value;  hence, P Φt (θ̌) = β(θ̌) + tτ =0 Λτ (θ̌) → β(θ̌) + (t + 1)E Λ0 (θ̌)  → −∞, as t → ∞, provided that E Λ0 (θ̌) < 0, i.e. the T truth is globally identifiable. Here β(θ̌) := α ψ(θ̌), where T ψ(θ̌) := ψ1 (θ̌), . . . , ψn (θ̌) is the stacked vector of initial prior log-ratios with ψi (θ̌) := log(νi (θ̌)/νi (θ)), ∀i ∈ [n]. Thus as defined, β(θ̌) measures the network-wide bias in the agents’ initial priors toward the state θ̌. Accordingly, (3) for a circular network with common priors becomes µj,t−1 (θ̂)ℓi (si,t | θ̂) , ∀θ̂ ∈ Θ, µi,t (θ̂) = X µj,t−1 (θ̂)ℓi (si,t | θ̂) (7) θ̂∈Θ where j ∈ [n] is the unique vertex j ∈ N (i). The above is the same as Bayesian update of a single agent (with no neighbors to communicate with), except that the self belief µi,t−1 (·) in the right-hand side is replaced by the belief µj,t−1 (·) of the unique neighbor {j} = N (i) in the circle. Rahimian and Jadbabaie (2015) show that under (7) the agents in a directed circle learn the truth asympototically exponentially fast and at the rate minθ̌6=θ Pn (−1/n) i=1 λi (θ̌), so that limt→∞ 1t φi,t (θ̌) = (1/n) Pn i=1 λi (θ̌), almost surely, for all θ̌ 6= θ. Rahimian et al. (2015) show the application of the update rule in (7) to general strongly connected topologies (no necessarily circular), where agents have more than just a single neighbor in their neighborhoods. Accordingly, at every step of time agent i chooses a neighbor j ∈ N (i) independently at random and applies (7) with the reported belief of the chosen neighbor. The probabilities for the choice of neighbors at every point in time are given by a row stochastic matrix P , with entries [P ]ij > 0 for every j ∈ N (i). Each entry [P ]ij is the probability for neighbor j being chosen by agent i at any point in time. Subsequently, we can show that the belief ratio for agent i at every time t is given as the sum of log-likelihood ratios of private signals of various agents across the network and at times 0 to t. The choice of agent at every time is given by a random walk iτ , τ ∈ [t] that starts from node i0 = i at time t and proceeds in the reversed time direction, eventually terminating at some node it . Accordingly, the log-belief ratio of agent i at any time t can be expressed as φi,t (θ̌) = ψit (θ̌) Pt + τ =0 λiτ ,t−τ (θ̌). Next note from the ergodic theorem, cf. (Norris, 1999, Theorem 1.10.2), that the average time spent in any state m ∈ [n] converges almost surely to its stationary probability πm associated with the probability transition matrix P , and thisP together with the strong law n yields limt→∞ 1t φi,t (θ̌) = i=1 πi λi (θ̌), almost surely for all θ̌ 6= θ. Hence if the truth is globally identifiable, then in a strongly connected network every agent learns the truth at an asymptotic rate that is exponentially fast and is expressed above, as the sum of the relative entropies between the signal structures of every agent weighted by the stationary distribution of the random walk, which recovers the same asymptotic rate for the update proposed by Jadbabaie et al. (2013). Fixing the priors over time will not result in convergence of beliefs, except in very specific cases as discussed above. In the sequel, we investigate the properties of convergence and learning under the update rules in (3), where the parameterizing priors ξi,j (·, t) are chosen to be random and time-varying variables, leading to the log-linear updating of the agents’ beliefs over time. We distinguish two cases depending on whether the agents do not recall their own self-beliefs or they do, leading respectively to timeinvariant or time-varying log-linear update rules. 3.1 Priors Set to a Geometric Average It is notable that the memoryless Bayesian update in (3) has a log-linear structure similar to the Non-Bayesian update rules studied by Rahnama Rad and Tahbaz-Salehi (2010); Shahrampour and Jadbabaie (2013); Nedić et al. (2014); Lalitha et al. (2014); Bandyopadhyay and Chung (2014); and the roots for such a geometric averaging of the neighboring beliefs can be traced to logarithmic opinion pools as studied by Gilardoni and Clayton (1993) and Rufo et al. (2012). Motivated by this analogy, we propose setting the time-varying priors ξi,j (·, t), j ∈ N (i) of each agent i and at every time t, proportionally to the geometric average of the beliefs reported to her by all her neighbors Q 1/d(i) at every time t: . Therefore, (3) j∈N (i) µj,t−1 (·) Q 1/d(i) becomes li (si,t | θ̌) µ ( θ̌) j∈N (i) j,t−1 µi,t (θ̌) = Q 1/d(i) . P l (s | θ̂) µ ( θ̂) i i,t j∈N (i) j,t−1 θ̂∈Θ To analyze the evolution of beliefs with this choice of priors, let λt (θ̌) := (λ1,t (θ̌), . . . , λn,t (θ̌))T be the stacked vector of log-likelihood ratios of received signals for all agents at time t. Hence, we can write the vectorized update φt (θ̌) = T φt−1 (θ̌) + λt (θ̌), where T is the normalized 1 [A]ij for adjacency of the graph defined by [T ]ij = d(i) all i and j. We can now iterate the vectorized update to Pt τ t get φt (θ̌) = T λ ( θ̌) + T ψ( θ̌). Next note from t−τ τ =0 the analysis of convergence for DeGroot model, cf. (Golub and Jackson, 2010, Proporition 1), that for a strongly connected network G if it is aperiodic (meaning that one is the greatest common divisor of the lengths of all its T circles), then limτ →∞ T τ = 1s , where s := (s1 , . . . , sn )T is the unique left eigenvector associated with the unit Pn eigenvalue of T and satisfying s = 1, si > 0, i i=1 ∀i. Hence, the Cesàro mean together with Pnthe strong law implies that limt→∞ 1t φi,t (θ̌) = − i=1 si λi (θ̌), almost surely for all θ̌ 6= θ, and the agents learn the truth asymptotically exponentially fast, at the rate minθ̌6=θ Pn i=1 −si λi (θ̌). 3.2 Agents who Recall Their Self Beliefs If the agents i ∈ [n] recall their self-beliefs µi,t−1 (·), i ∈ [n] when making decisions or performing inferences at time t, then we set ξ i,i (·, t) ≡ µi,t−1 (·) for all i and t. Furthermore, we set ξi,j (·, t) ≡ µj,t−1 (·)ηt /ζ j (t) for all i, j ∈ N (i) and P ηt t, where ζ j (t) := is the normalization θ̂∈Θ µj,t−1 (θ̂) constant to make the exponentiated probabilities sum to one. The choice of 0 < ηt < 1 as time-varying exponents to be determined shortly, is motivated by the requirements of convergence under (3). Subsequently, we investigate the following log-linear update rule with time-varying coefficients X φj,t−1 (θ̌), φi,t (θ̌) = φi,t−1 (θ̌) + λi,t (θ̌) + (1 − ηt ) j∈N (i) where 1 − ηt is the weight that the agent puts on her neighboring beliefs (relative to her own) at any time t. Using xt := ρ(1 − ηt ) and B := (1/ρ)A, the previous equation can be written in vectorized format as follows φt (θ̌) =(I + xt B)φt−1 (θ̌) + λt (θ̌) t X = P (t,τ ) λτ (θ̌) + P (t,0) ψ(θ̌), (8) τ =0 Qt where P := I, and P (t,τ ) := u=τ +1 (I + xu B) for τ < t. Next note that P (t,τ ) can be expanded as follows t−τ X (t,τ ) Mj B j , P (t,τ ) = (t,t) j=0 where (t,τ ) M0 (t,τ ) Mj = = 1, τ ≤ t and t−j+1 X t−j+2 X u1 =τ +1 u2 =u1 +1 ... t X xu1 xu2 . . . xuj . uj =uj−1 +1 Consequently, (8) can be rewritten as φt (θ̌) = t X t−τ X τ =0 j=0 (9) (t,τ ) Mj B j λτ (θ̌) + t X (t,0) Mj B j ψ(θ̌), j=0 (τ ) (t,τ ) To proceed, for fixed τ and j let Mj := limt→∞ Mj . Next consider the summands in (9) for each τ , 0 ≤ τ ≤ t. Note that for j fixed, {B j λτ (θ̌), τ ∈ N0 } is a sequence of independent and identically distributed random vectors. On the other hand, since B has unit (0) spectral radius and given that xu > 0, having M1 := P∞ u=1 xu < ∞ is sufficient to ensure that the random (t,τ ) vectors Mj B j λτ (θ̌) are all in L2 and have variances that are bounded uniformly in the choice of t, τ . This is because for any t, τ , and j we have that 1  (0) j , M1 j! all as a consequence of positivity, xu > 0. In particular, (0) with M1 < ∞ we can bound (t,τ ) Mj ∞ X (τ ) ≤ Mj (0) ≤ Mj (0) Mj B j ψ(θ̌) ≤ ≤ ∞ X (0) Mj B j ψ(θ̌) j=0 j=0 ≤ ψ(θ̌) exp(M10 ), (10) so that the contribution made by the initial bias of the network is asymptotically bounded and therefore subdominant when t X t−τ X (t,τ ) Mj B j λτ (θ̌) = (−∞)n , lim t→∞ τ =0 j=0 almost surely; here, by (−∞)n we mean the entry-wise convergence of the column vector to −∞ for the each of the n entries, corresponding to the n agents. In the sequel we investigate conditions under which this almost sure convergence would hold true. (0) We begin by noting that the condition M1 < ∞ is indeed (0) necessary for convergence, because if M1 = ∞, then the (t,0) term M1 Bλ0 (θ̌) appearing in (9) for j = 1 and τ = 0 increases unbounded in its variance as t → ∞, so that (9) cannot converge in an almost sure sense. (0) M1 Next note that with < ∞ we can invoke Kolmogorov’s criterion, (Feller, 1968, Section X.7), to get that as t → ∞ the summation in (9) converges almost surely to its expected value, i.e. the following almost sure limit holds true lim φi,t (θ̌) = t→∞ ∞ X ∞ X  (τ )  Mj B j λ(θ̌) i τ =0 j=0 (11) + ∞ X j=0 (0)  Mj  B j ψ(θ̌) i , the second term being bounded per (10). Moreover, for a strongly connected social network G, if it is aperiodic, then the matrix B is a primitive matrix; and in particular for all j ≥ d := diam(G) + 1, every entry of B j is strictly greater than zero, and if the truth is globally identifiable then  j one can take an absolute constant ǫ j> 0 such that B λ(θ̌) i < −ǫ whenever j ≥ d, while B λ(θ̌) i ≤ 0 for any j. Subsequently, we get that ∞ X ∞ ∞ X ∞ X X  (τ )  (τ ) Mj B j λ(θ̌) i ≤ −ǫ (12) Mj . τ =0 j=0 τ =0 j=d Combining the results of (10), (11) and (12) leads to the following characterization: all agents will learn the truth (that is limt→∞ φi,t (θ̌) = −∞, almost surely for all i and P∞ P∞ (0) (τ ) any θ̌ 6= θ), if M1 < ∞ and = ∞. τ =0 j=d Mj Notice the preceding conditions are indeed not far from (0) necessity. Firstly, we need M1 < ∞ to bound the growth of variance for convergence, as noted above. Moreover, with B having a unit spectral radius we can bound  j  B λ(θ̌) i ≤ B j λ(θ̌) ≤ λ(θ̌) , so that we can lower-bound limt→∞ φi,t (θ̌) in (11) as follows − λ(θ̌) ∞ X ∞ X (τ ) Mj − ψ(θ̌) exp(M10 ) ≤ lim φi,t (θ̌). t→∞ τ =0 j=0 P P∞ (τ ) Consequently, if ∞ < ∞, then lim φi,t (θ̌) τ =0 j=0 Mj t→∞ is almost surely bounded away from −∞ and agents do not learn the truth. For a strongly connected and aperiodic social network G, matrix B has a single eigenvalue at one (corresponding to the largest eigenvalue of the adjacency A) and all of the other eigenvalues of B have magnitudes strictly less than one. Therefore, by the iterations of the power method,  j  (Newman, 2010, Pn Section 11.1), we know that B λ(θ̌) i converges to k=1 αk λk (θ̌) for every i, and the convergence is geometrically fast in the magnitude-ratio of the first and second largest eigenvalues of the adjacency matrix A. Subsequently, for a strongly connected and aperiodic social P network G, we can replace −ǫ and d in (12) by ǫ + ni=1 αi λi (θ̌) < 0 and some constant D(ǫ). Here, ǫ > 0 is a small but arbitrary and D(ǫ) is chosen  large enough  rate Pnin accordance with the geometric of B j λ(θ̌) i → αk λk (θ̌), such that | B j λ(θ̌) i − k=1 Pn k=1 αk λk (θ̌)| < ǫ for all j ≥ D(ǫ), and the analysis of convergence and its rate can thus be refined. Furthermore, having t K1 < lim inf t→∞ ≤ lim sup t→∞ t−τ 1 X X (t,τ ) Mj t τ =0 j=d t t−τ 1 XX t (t,τ ) Mj < K2 τ =0 j=d for some positive constants 0 < K1 < K2 implies that the learning rate is asymptotically exponentially fast, as was the case for all the other update rules that we discussed in this paper. However, depending on how slow or fast Pt Pt−τ (t,τ ) → (compared to t) is the convergence τ =0 j=d Mj ∞ as t → ∞, the almost sure asymptotic rate at which for some θ̌ 6= θ and i ∈ [n], µi,t (θ̌) → 0 as t → ∞ could be slower or faster than an exponential. Time-Invariant Log-Linear Updates with Weighted Self-Beliefs. For such agents as in Subsection 3.2 who recall their immediate self-beliefs µi,t (·), if we relax the requirement that ξ i,i (·, t) ≡ µi,t−1 (·) then it is possible to achieve asymptotic almost sure exponentially fast learning using time-invariant updates just as in Subsection 3.1. In particular, for any 0 < η < 1 fixed, we can set ξ i,i (·, t) proportional to µi,t−1 (·)η for all i, and we can further set ξ i,j (·, t) at every time t, for any i, and all j ∈ N (i) proportional to µj,t−1 (·)1−(1−η)/d(i) . Subsequently, (3) becomes Q  1−η d(i) li (si,t | θ̌)µi,t−1 (θ̌)η µ ( θ̌) j∈N (i) j,t−1 µi,t (θ̌) = . Q  1−η P d(i) µ ( θ̂) li (si,t | θ̂)µi,t−1 (θ̂)η j∈N (i) j,t−1 θ̂∈Θ (13) To analyze (13), we form the log-belief and likelihood ratios and set B = (ηI + (1 − η)T ), where T is the same normalized adjacency as in Subsection 3.1. Hence, we recover the vectorized iterations φt (θ̌) = Bφt−1 (θ̌)+λt (θ̌) = Pt t τ τ =0 B λt−τ (θ̌) + B ψ(θ̌) and it follows from (Kemeny and Snell, 1960, Theorems 5.1.1 and 5.1.2) that for a T strongly connected network G, limτ →∞ B τ = 1s , where T s := (s1 , . . . , sn ) is the unique stationary distribution associated with the Markov chain whose probability transition matrix is T (or equivalently B); whence it follows from the Cesàro mean and the strong law that the agents learn the truthPasymptotically exponentially fast, at the rate n minθ̌6=θ i=1 −si λi (θ̌), similar to Subsection 3.1. Note that here, unlike Subsection 3.1 but similarly to Rahimian et al. (2015), we only use properties of ergodic chains and existence and uniqueness of their stationary distributions; hence, relaxing the requirement for the social network to be aperiodic. Concluding Remarks. Learning without recall is a model of belief aggregation in networks by replicating the rule that maps the initial priors, neighboring beliefs, and private signal to Bayesian posterior at one time step for all future time steps; this way the complexities of a fully rational inference at the forthcoming epochs are avoided, while some essential features of Bayesian inference are preserved. We showed how appropriate choice of priors for the so-called rational but memoryless agents in this model can provide a behavioral foundation for the loglinear structure of some of the non-Bayesian update rules that are studied in the literature. We further investigated the rate and requirements of asymptotic and almost sure learning with P∞ these choices of priors. In particular, we identified u=1 xu < ∞ as a necessary condition for convergence of beliefs with log-linear time-varying updates, in the case of agents who have no recollection of the past, excepting their own immediate beliefs. With xt representing the relative weight on the neighboring beliefs, such agents facing individual identification problems can still learn the truth in a strongly connected and aperiodic network by relying on each other’s observations; provided that as time evolves they put less and less weight on the neighboring beliefs and rely more on their private observations: xt → 0 as t → ∞. REFERENCES Acemoglu, D., Dahleh, M.A., Lobel, I., and Ozdaglar, A. (2011). Bayesian learning in social networks. The Review of Economic Studies, 78(4), 1201–1236. Aumann, R.J. (1976). Agreeing to disagree. The annals of statistics, 1236–1239. Bala, V. and Goyal, S. (1998). Learning from neighbours. The Review of Economic Studies, 65(3), 595–621. Bandyopadhyay, S. and Chung, S.J. (2014). Distributed estimation using bayesian consensus filtering. In American Control Conference (ACC), 2014, 634–641. Brualdi, R.A. (2011). The mutually beneficial relationship of graphs and matrices. 115. American Mathematical Soc. Cover, T. and Thomas, J. (2006). Elements of Information Theory. A Wiley-Interscience publication. Wiley. DeGroot, M.H. (1974). Reaching a consensus. Journal of American Statistical Association, 69, 118 – 121. DeMarzo, P.M., Vayanos, D., and Zwiebel, J. (2003). Persuasion bias, social influence, and unidimensional opinions. The Quarterly Journal of Economics, 118, 909–968. Eyster, E. and Rabin, M. (2010). Naive herding in rich-information settings. American economic journal: microeconomics, 2(4), 221–243. Feller, W. (1968). An Introduction to Probability Theory and Its Applications, volume 1. Wiley, 3rd edition. Gilardoni, G.L. and Clayton, M.K. (1993). On reaching a consensus using DeGroot’s iterative pooling. The Annals of Statistics, 391–401. Golub, B. and Jackson, M.O. (2010). Naı̈ve Learning in Social Networks and the Wisdom of Crowds. American Economic Journal: Microeconomics, 2(1), 112–149. Jadbabaie, A., Molavi, P., Sandroni, A., and TahbazSalehi, A. (2012). Non-bayesian social learning. Games and Economic Behavior, 76(1), 210 – 225. Jadbabaie, A., Molavi, P., and Tahbaz-Salehi, A. (2013). Information heterogeneity and the speed of learning in social networks. Revise and Resubmit, Review of Economic Studies. Kemeny, J. and Snell, J. (1960). Finite Markov Chains. Van Nostrand, New York. Lalitha, A., Sarwate, A., and Javidi, T. (2014). Social learning and distributed hypothesis testing. In 2014 IEEE International Symposium on Information Theory (ISIT), 551–555. Mossel, E., Sly, A., and Tamuz, O. (2014). Asymptotic learning on bayesian social networks. Probability Theory and Related Fields, 158(1-2), 127–157. Mueller-Frank, M. (2013). A general framework for rational learning in social networks. Theoretical Economics, 8(1), 1–40. Nedić, A., Olshevsky, A., and Uribe, C.A. (2014). Nonasymptotic convergence rates for cooperative learning over time-varying directed graphs. arXiv preprint arXiv:1410.1977. Newman, M. (2010). Networks: An Introduction. Oxford University Press. Norris, J.R. (1999). Markov Chains. Cambridge University Press. Rahimian, M.A. and Jadbabaie, A. (2015). Learning without recall in directed circles and rooted trees. In American Control Conference, 4222–4227. Rahimian, M.A., Shahrampour, S., and Jadbabaie, A. (2015). Learning without recall by random walks on directed graphs. In IEEE Conference on Decision and Control (CDC). Rahimian, M.A., Molavi, P., and Jadbabaie, A. (2014). (Non-) bayesian learning without recall. In IEEE Conference on Decision and Control (CDC), 5730–5735. Rahnama Rad, K. and Tahbaz-Salehi, A. (2010). Distributed parameter estimation in networks. In 49th IEEE Conference on Decision and Control (CDC), 5050–5055. IEEE. Rufo, M., Martin, J., Pérez, C., et al. (2012). Log-linear pool to combine prior distributions: A suggestion for a calibration-based approach. Bayesian Analysis, 7(2), 411–438. Seneta, E. (2006). Non-negative matrices and Markov chains. Springer. Shahrampour, S. and Jadbabaie, A. (2013). Exponentially fast parameter estimation in networks using distributed dual averaging. In 52nd IEEE Conference on Decision and Control (CDC), 6196–6201.
3cs.SY
Approaching near-perfect state discrimination of photonic Bell states through the use of unentangled ancilla photons Jake A. Smith1 and Lev Kaplan1 arXiv:1802.10527v1 [quant-ph] 28 Feb 2018 1 Tulane University, Department of Physics, New Orleans, Louisiana 70118, USA (Dated: March 1, 2018) Despite well-established no-go theorems on a perfect linear optical Bell state analyzer, we find a numerical trend that appears to approach a near -perfect measurement if we incorporate eight or more un-entangled ancilla photons into our device. Following this trend, we begin a promising inductive approach to building an ideal optical Bell measurement device. In the process, we determine that any Bell state analyzer that (even occasionally) bunches all photons into only two of the output modes cannot perform an ideal measurement and we find a set of conditions on our linear optical circuit that prevent this outcome. I. INTRODUCTION Reliable Bell measurements are an essential component of quantum information processing. Still, implementing a deterministic linear optical Bell measurement on photonic states has been a longstanding unsolved problem in linear optical quantum computing. This is unfortunate because Bell state discrimination plays a critical role in quantum teleportation [1–6], which can be used as a universal primitive for building a scalable fault-tolerant quantum computer [7]. In our work here, we investigate a linear trend in the improvement of a photonic Bell state analyzer constructed from only deterministic linear optical components (i.e. beam splitters and phase shifters) and un-entangled ancilla resources. In the standard dual-rail encoding [8], a qubit is represented by the polarization or spatial states of a single photon. Then, the Bell states are represented by a maximally entangled Einstein–Podolsky–Rosen (EPR) pair of photons. If all four Bell states are equiprobable, this ensemble is written 1 |φ1 i = √ (â†1 â†3 + â†2 â†4 ) |0i 2 1 † † |φ2 i = √ (â1 â3 − â†2 â†4 ) |0i 2 1 † † |φ3 i = √ (â1 â4 + â†2 â†3 ) |0i 2 1 † † |φ4 i = √ (â1 â4 − â†2 â†3 ) |0i 2 4 1X ρ= |φx ihφx | . 4 x=1 (1) (2) (3) (4) (5) The action of a linear optical quantum circuit on an optical state can generally be described by the transformation of creation operators [8, 9]: â†α → M X Uα,β â†β (6) β=1 where Uα,β are the elements of some unitary complex matrix U and M is the total number of optical modes. As it turns out, we cannot implement a perfect von Neumann measurement by applying Eq. (6) to Eqs. (1)-(4). There exists no unitary matrix U such that using perfect photon-number resolving detectors at each of the four circuit output modes allows a perfectly unambiguous measurement; at least two of the Bell states will always be indistinguishable. The crux of the problem is that linearly accessible entangling operations between photons allowed by Eq. (6) are restricted to bosonic interference [8, 10] and we are thus unable to rotate the Bell states into non-overlapping Fock spaces for a photocounting measurement. In 2001, the Knill-LaflammeMilburn (KLM) [11, 12] scheme for implementing a CNOT gate between two qubits encoded in the dual rail demonstrated that incorporating probabilistic [13– 15] partial measurements and ancilla resources into linear optical circuits allows a new profitable set of transformations beyond those of Eq. (6). A series of “no-go” theorems on optical state discrimination seemed to limit the benefit of using these extra tools in a Bell state analyzer. First, it was demonstrated by Lütkenhaus, Calsamiglia, and Suominen that a completely perfect measurement on an ensemble of Bell states using only linear components, multistage partial measurements, and ancilla resources cannot exist [16]. This theorem was later extended by Carollo and Palma [17]; we apparently cannot implement a perfect measurement using these tools on any set of indistinguishable orthonormal photonic states. Further, it has been shown that an analyzer limited to using only vacuum ancilla modes cannot perfectly distinguish equi-probable Bell states (the ensemble in Eq. (5)) more than half of the time [18]. However, it was shown in Refs. [19, 20] that this upper bound is lifted if we do not restrict our ancilla modes to be in the vacuum state. These no-go theorems do not provide a precise upper bound on distinguishability. A “perfect” measurement is in any case a mathematical ideal that can never be attained in the real world, and an arbitrarily closeto-perfect measurement would be equally valuable for practical applications in quantum information processing. In 2011, Ref. [21] presented a scheme for near-perfect Bell state discrimination, though this paper was later re- 2 tracted. This is clearly a difficult problem with no easy solutions. Here, we use computational techniques to find a clear linear trend showing improvement in Bell state measurements as the number of ancilla photons is increased. Extrapolating these results, we learn about effective linear optical analyzers. We determine that if a device bunches all photons into two or fewer modes under any circumstances, then such a device cannot perform a perfect measurement. Finally, we present a set of conditions on the mode transformation matrix U that prevent this outcome. With enough patience, this construction could be extended to develop an optimal linear optical Bell state analyzer and determine an exact upper bound on measurability. II. TRANSFORMING THE BELL STATES E.g. the first Bell state is 1 |ψ1 i = √ |1, 1, . . . , 1Na , 1, 0, 1, 0i 2 1 + √ |1, 1, . . . , 1Na , 0, 1, 0, 1i . 2 (13) The total number of photons and modes are now N = Na + 2 M = Na + 4 . (14) (15) We allow a standard von Neumann measurement. Alice chooses one of the Bell states |φx i and sends it to Bob who attaches the ancilla modes, runs the state through his analyzer U , and performs a photon-counting measurement at every output mode. If Alice sends Bell state |φx i, the probability that Bob measures state |~ny i is 2 p(y|x) = h~ny | Â(U ) |ψx i . An optical quantum state can be written as a complex vector X |ψi = c~n |~ni , (7) III. (16) THE CLASSICAL MUTUAL INFORMATION ~ n where |~ni = |n1 , n2 , . . . , nM i (8) are the Fock states. A general linear optical transformation described by Eq. (6) can also be written in the form of a linear operator Â(U ) acting on the many-photon state, |ψ 0 i = Â(U ) |ψi . (9) We can write a Fock state as |mi ~ = |m1 , m2 , . . . , mN i H(X : Y ) ≤ S(ρ) ≤ H(X) A(U )~n0 ,~n = (11)  p 0  M Y n ! X √ k  Um1 ,m01 Um2 ,m02 . . . UmN ,m0N  , n ! k 0 k=1 perm(m ~ ) where the summation is over all distinct permutations of integer entries in the vector m ~ 0 . For a proof of Eq. (11), see Ref. [22]. Here, we allow the use of Na ancilla photons and define our Bell states in the Fock basis, (12) (17) where S(ρ) is the von Neumann entropy of a quantum ensemble and H(X) is the classical Shannon entropy of Alice’s encoding variable. For the ensemble defined in Eq. (5), these quantities are both fixed: (10) where mα is the mode-location of photon number α and N is the total number of photons in the system. Of course the choice of vector |mi ~ for a given |~ni is not unique, since photons are indistinguishable and labeling them is an arbitrary process. We simply need to choose some labeling and pick a valid |mi ~ for each |~ni. Then the elements of the matrix representation of Â(U ) in the basis |~n0 ih~n| are given by |ψx i = |1, 1, . . . , 1Na i ⊗ |φx i . To gauge the success of Bob’s measurement device, we choose the classical mutual information, H(X : Y ). This quantity is bounded above by Holevo’s theorem [23–25], given by S(ρ) = H(X) = 2 bits. (18) The higher the mutual information, the better Bob can distinguish the Bell states. We say that a Bell analyzer is near-perfect if H(X : Y ) → 2 bits (19) in some limit. In general, we may write H(X : Y ) = H(X) − H(X|Y ) , (20) where H(X|Y ) is the conditional information, H(X|Y ) = IV. 1XX p(y|x) log2 4 y∈Y x∈X P p(y|x0 ) . p(y|x) x0 (21) NUMERICAL MINIMIZATION OF THE CONDITIONAL INFORMATION To optimize the capability of a linear optical Bell state analyzer, we can numerically minimize the conditional 3 information in Eq. (21) over the circuit design U . In general, U is constrained to be unitary. Here, however, we find that optimization convergence is improved if we allow U to be sub-unitary, meaning that U can be any complex matrix with singular values less than or equal to one. This is equivalent to allowing photons to leak into vacuum modes on which U does not act, and on which we do not perform any measurement. We call these modes the garbage modes and need to add a term to Eq. (21) to accommodate them: H̃(X|Y ) = H(X|Y ) + 1 X p̃(x) log2 4 x∈X P p̃(x0 ) , p̃(x) x0 p̃(x) = 1 − p(y|x). (23) y∈Y In other words, all measurement outcomes in which any photons have leaked into the garbage modes are consolidated into one outcome with probability p̃(x). An optimal U thus tends to be unitary as photon leakage into the garbage modes should be avoided. Still, convergence is improved because the optimization trajectory is allowed to pass through the interior of a unitary hypersurface in parameter space, rather than be restricted to move along the hypersurface. We write U using a general singular value decomposition, U = V DW , 1.75 1.625 1.5 (22) where X H(X:Y) ■ ■ 0 1 ■ 2 3 ■ 4 5 Na FIG. 1: Maximized mutual information H(X : Y ) in bits as a function of ancilla photons, Na . With every additional pair of un-entangled ancilla photons through Na = 4, we observe a gain in the mutual information of 0.125 bits. A mutual information of H(X : Y ) = 2 bits corresponds to a perfect measurement. Global numerical convergence was not attained for Na ≥ 6. In the case Na = 6, the highest local maximum we observe is H(X : Y ) = 1.76364 bits. Nelder-Meade, and principal axis minimization. With all of these methods, convergence still proved difficult for Na ≥ 6. (24) V. where V = eiṼ (25) iW̃ W =e  −(λ1 )2 e 0 0  −(λ2 )2 0 e 0  2  0 0 e−(λ3 ) D=  .. ..  ..  . . . 0 0 0 ■ ■ (26) ... ... ... .. .  0 0 0 .. . 2 . . . e−(λM )     (27)    and minimize Eq. (22) over all hermitian matrices Ṽ , W̃ , and real numbers {λk } using a quasi-Newton method without any constraints; results are presented in Fig. 1. We note that as additional pairs of ancilla photons are added in going from Na = 0 to Na = 2 to Na = 4, the mutual information grows linearly from 1.5 to 1.625 to 1.75. If the linear trend continues, we expect a minimum ancilla resource of Na ≥ 8 should be needed to attain a near-perfect measurement. Unfortunately, for Na ≥ 6, the optimization routine becomes overwhelmed by local minima, preventing convergence to a globally optimal solution. We have parallelized the construction of Â(U ) over hundreds of processors, employed Intel Xeon Phi coprocessors, and have also utilized various optimization algorithms, including BFGS, Levenberg-Marquardt, ANALYSIS OF U The numerical results in Sec. IV seem to indicate a discrete improvement in state distinguishability as we incorporate un-entangled pairs of ancilla photons into our Bell state analyzer. Extrapolating this trend, we can try to solve for a unitary U assuming a perfect measurement is possible. We first define for each possible output state y containing N = Na + 2 photons in M = Na + 4 modes the complex numbers A1 (y) = X U1,my1 . . . UNa ,myN UNa +1,myN a a +1 UNa +3,myN a +2 perm(m ~ y) A2 (y) = X U1,my1 . . . UNa ,myN UNa +2,myN a a +1 UNa +4,myN a +2 perm(m ~ y) A3 (y) = X U1,my1 . . . UNa ,myN UNa +1,myN a a +1 UNa +4,myN a +2 perm(m ~ y) A4 (y) = X U1,my1 . . . UNa ,myN UNa +2,myN a a +1 UNa +3,myN a +2 perm(m ~ y) where m ~ y is a vector representing the output mode location of each photon as defined in Eq. (10) and the sum is over all distinct permutations. Then the probability of measurement outcome y for each of the four input Bell , 4 states x is given by Thus, we find that conditions (b) and (c) cannot be satisfied for the measurement state |~nyP =0 i. (a) is satisfied if and only if at least one of the following conditions holds: 2 p(y|1) = C(y)|A1 (y) + A2 (y)| 2 p(y|2) = C(y)|A1 (y) − A2 (y)| (28) 2 p(y|3) = C(y)|A3 (y) + A4 (y)| (i) USj ,L = 0 for at least one Sj ∈ {1, . . . , Na } 2 p(y|4) = C(y)|A3 (y) − A4 (y)| , (ii) UNa +1,L = UNa +2,L = 0 (iii) UNa +3,L = UNa +4,L = 0. and the measurement probability summed over input states is X (37) p(y|x0 ) = 2C(y)(|A1 (y)|2 +|A2 (y)|2 +|A3 (y)|2 +|A4 (y)|2 ) , x0 ∈X (29) where C(y) is a combinatoric bosonic factor C(y) = M 1Y y nk ! . 2 Of course, we need condition (a) to be satisfied for each choice of mode number L in the measurement state |~nyP =0 i. Thus, (i) or (ii) or (iii) in Eq. (37) must be satisfied for each column L of U . (30) We next look at the measurement states y where P = 1: k=1 Because 0 ≤ p(y|x) ≤ 1 (31) and P log2 p(y|x0 ) ≥ 0, p(y|x) x0 (32) according to Eq. (21) we need to find unitary U such that P 0 0 p(y|x ) p(y|x) log2 x = 0 ∀ x, y (33) p(y|x) in order to implement a perfect measurement. With some algebra, we find Eq. (33) to be satisfied if and only if: for each y, one of these conditions holds: (a) A1 (y) = A2 (y) = A3 (y) = A4 (y) = 0 (b) A1 (y) = ±A2 (y) 6= 0 and A3 (y) = A4 (y) = 0 (34) (c) A3 (y) = ±A4 (y) 6= 0 and A1 (y) = A2 (y) = 0 . Now we can manually analyze the output measurement states y for Na ≥ 8, and find constraints on U such that either (a), (b), or (c) is satisfied for each y. We start with output states where photons are bunched into two modes, i.e., states of the form y |~n i = |0, . . . , 0, (N − P )L , 0, . . . , Pl , . . . , 0i . (35) Beginning with the case of P = 0 and N photons in mode L, our measurement state is |~nyP =0 i = |0, . . . , NL , . . . , 0i |m ~ yP =0 i = |L, . . . , LN i . In this case A1 A2 A3 A4 = = = = U1,L U2,L . . . UNa ,L UNa +1,L UNa +3,L U1,L U2,L . . . UNa ,L UNa +2,L UNa +4,L U1,L U2,L . . . UNa ,L UNa +1,L UNa +4,L U1,L U2,L . . . UNa ,L UNa +2,L UNa +3,L . (36) |~nyP =1 i = |0, . . . , (N − 1)L , . . . , 0, 1l , 0, . . . , 0i (38) |m ~ yP =1 i = |L, L, . . . , LN −1 , li . For each column L of U , we assume (i), (ii), or (iii) in Eq. (37) is true, and determine any additional constraints that make (a), (b), or (c) in Eq. (34) true for outcome state |~nyP =1 i. Through some algebra, we determine that the conditions (i), (ii), and (iii) must be revised; for each column L of U , (a) is satisfied if and only if at least one condition holds: (i) USj ,L = 0 for at least two distinct Sj ∈ {1, . . . , Na } (ii) USj ,L = 0 for at least one Sj ∈ {1, . . . , Na } and UNa +1,L = UNa +2,L = 0 (iii) USj ,L = 0 for at least one Sj ∈ {1, . . . , Na } (39) and UNa +3,L = UNa +4,L = 0 (iv) UNa +1,L = UNa +2,L = UNa +3,L = UNa +4,L = 0 , while conditions (b) and (c) cannot be satisfied for |~nyP =1 i. We repeat this process in a proof by induction, revising the conditions (i), (ii), . . . as we increase P in Eq. (35) from 0 to N/2. In all cases we find that (b) and (c) can never be satisfied. Thus, a measurement outcome in the form of Eq. (35) is guaranteed to be ambiguous. (a) is satisfied for all states 0 ≤ P ≤ N/2 if and only if at least one condition holds for each column L of U : (I) USj ,L = 0 for at least three distinct Sj ∈ {1, . . . , Na } and ∀ l 6= L, Usl ,l = 0 for at least one sl ∈ {S1 , . . . } 5 (II) USj ,L = 0 for at least two distinct Sj ∈ {1, . . . , Na } 1.0 and UNa +1,L = UNa +2,L = 0 0.8 UNa +1,l = UNa +2,l = 0 or Usl ,l = 0 for at least one sl ∈ {S1 , . . . } (III) USj ,L = 0 for at least two distinct Sj ∈ {1, . . . , Na } H(X:Y) and ∀ l 6= L, either 0.6 0.4 0.2 and UNa +3,L = UNa +4,L = 0 0.0 and ∀ l 6= L, either UNa +3,l = UNa +4,l = 0 0 or Usl ,l = 0 for at least one sl ∈ {S1 , . . . } (IV ) USj ,L = 0 for at least one Sj ∈ {1, . . . , Na } ⨯⨯ ⨯ ⨯⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯⨯⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯⨯⨯ ⨯ ⨯⨯ ⨯⨯⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯⨯⨯ ⨯ ⨯⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ++⨯+⨯+⨯+ ⨯+⨯+ ⨯+++++ ⨯ ⨯ + ⨯ ⨯+ ⨯ ⨯+⨯ + ++ ⨯ ++ ⨯ ⨯ ⨯+ + ++ ⨯ ⨯ + + + + + ++ ++ +++ +⨯ ++ + + +⨯ + ++ ++ +++ + ++ + ++ ++⨯ ++++ ++ +++ + ⨯ ⨯ ++ + +++ +⨯ + +++ +⨯ +++ +⨯ + ++++ + ⨯+ ++ + ⨯ ++++ ++ ++ ++ +⨯ ⨯ + ++ ++ + + ⨯+ ++ + ⨯+ ++ + +++ ++ ⨯ ++ +⨯ + + + ++ ⨯ ++⨯ + +++ ⨯+ +++ ⨯+ ++ ⨯ ++ ++ ⨯ + ++⨯ ⨯++ + + ⨯ ⨯+ ++ ⨯ ⨯ +++ +++ + ⨯ +⨯ ++ ++ ++ + ++ +⨯ ⨯+ ++ +⨯ +++ + ⨯ + +++ + ++ +⨯ + ⨯ ++⨯ +++ ++ ⨯ + + + ++ ++ ++ ++++ +++ + ++ ⨯ + + ++ ++ + + ++++ ⨯+ + ⨯++ + ++ +⨯ + ⨯ ⨯+ ++ + + ⨯ + + ⨯ +⨯ ++ ++⨯ + + +++ ++ + + ⨯+ + + +++ ++ ++ + + + ⨯++⨯ + ⨯ ⨯ + + + ++ ⨯ + ⨯ + ⨯+ ⨯ +++ + ⨯ + + + ⨯ ⨯ + + + +++⨯ + + + + ⨯ + + + ⨯ + + ⨯ + ⨯ ⨯ ⨯ + + ⨯+ ⨯ ⨯ + ⨯ + + + + + ⨯ ⨯ + ⨯+ ⨯+ + ⨯ ++ + ⨯+⨯ + ⨯ ⨯ +⨯ ⨯ ⨯⨯ ⨯ +++ +++ + ⨯ ⨯ ⨯ + + ++++ + ⨯+ ⨯+ ⨯⨯ ⨯ ++ + ⨯+ ⨯+ ⨯+ ⨯ + ⨯ ⨯ ⨯ ⨯ ⨯ ⨯+ ⨯ ⨯ + ⨯ + ⨯ ⨯ ⨯ ⨯⨯⨯+ ⨯ ⨯⨯⨯+ ⨯ ⨯ ⨯⨯ ⨯⨯ ⨯ ⨯ ⨯⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯+ ⨯ ⨯+ ⨯ ⨯⨯ ⨯⨯ ⨯⨯+ ⨯ ⨯+ ⨯ ⨯ ⨯ ⨯ ⨯++⨯ ⨯⨯ ⨯⨯⨯ ⨯⨯⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯+⨯ ⨯++ ⨯ ⨯ ⨯ ⨯ ⨯ + ⨯+⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯⨯⨯ ⨯ ⨯⨯⨯⨯+ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯⨯⨯ ⨯⨯ ⨯⨯⨯⨯⨯⨯⨯⨯ ⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯ ⨯ ⨯⨯ ⨯⨯⨯⨯⨯⨯⨯⨯⨯ ⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯ ⨯ ⨯ ⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯⨯⨯⨯⨯⨯ ⨯⨯⨯⨯⨯⨯⨯⨯ ⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯ ⨯⨯ ⨯ ⨯⨯⨯⨯⨯⨯ ⨯⨯⨯⨯⨯ ⨯ ⨯⨯ ⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯ ⨯⨯⨯⨯⨯⨯⨯ ⨯⨯⨯ ⨯⨯⨯⨯⨯⨯⨯⨯ ⨯ ⨯⨯⨯⨯ ⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯ ⨯ ⨯⨯⨯⨯⨯⨯⨯⨯ ⨯⨯ ⨯⨯⨯⨯⨯⨯⨯⨯⨯ ⨯⨯⨯⨯⨯⨯ ⨯⨯⨯⨯⨯⨯ ⨯⨯⨯ ⨯⨯ ⨯⨯ ⨯⨯⨯ ⨯ ⨯⨯⨯⨯ ⨯ ⨯⨯⨯⨯⨯⨯⨯⨯ ⨯⨯ ⨯⨯⨯⨯⨯ ⨯⨯⨯⨯⨯⨯ ⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯⨯ ⨯⨯⨯⨯ ⨯⨯ ⨯⨯⨯⨯ ⨯⨯ ⨯⨯ ⨯⨯⨯⨯⨯⨯⨯ ⨯ ⨯ ⨯ ⨯ ⨯⨯⨯⨯⨯⨯⨯⨯⨯ ⨯⨯ ⨯⨯⨯⨯⨯ ⨯⨯⨯⨯ ⨯ ⨯ ⨯⨯⨯ ⨯⨯ ⨯⨯⨯ U⨯⨯⨯⨯ ⨯⨯ ⨯⨯⨯ Random ⨯⨯⨯⨯⨯⨯⨯ ⨯⨯ ⨯⨯⨯⨯ ⨯ ⨯⨯with ⨯⨯⨯⨯⨯⨯⨯ ⨯⨯⨯ ⨯ ⨯ unitary constrained (I-IV) ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯⨯⨯ ⨯ ⨯⨯ ⨯⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯⨯⨯ ⨯ ⨯⨯ ⨯⨯ ⨯⨯⨯⨯ ⨯ ⨯⨯ ⨯⨯ ⨯ ⨯⨯⨯⨯⨯ ⨯⨯ ⨯ ⨯ ⨯⨯ ⨯⨯⨯⨯⨯⨯ ⨯ ⨯ ⨯ ⨯ ⨯⨯⨯⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ unitary ⨯⨯U⨯ ⨯⨯ general ⨯ ⨯+ ⨯⨯Random ⨯ ⨯ ⨯⨯ ⨯ ⨯⨯⨯⨯⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ 200 ⨯ ⨯⨯ ⨯ ⨯ ⨯ 400 600 800 Trial Number 1000 1200 (40) and UNa +1,L = UNa +2,L = UNa +3,L = UNa +4,L = 0 and ∀ l 6= L, either UNa +1,l = UNa +2,l = 0 FIG. 2: Mutual information H(X : Y ) of a linear optical measurement (an application of Eq. (6) followed by photo-counting measurement) on the Bell states as defined in Eq. (12) in the case Na , Ma = 6. We compare general (unconditioned) random unitary U to random unitary U satisfying conditions (I − IV ). or UNa +3,l = UNa +4,l = 0 or Usl ,l = 0 for at least one sl ∈ {S1 , . . . }. Since these conditions hold for any pair of modes L, l, increasing P to N/2 is sufficient for all measurement states of the form in Eq. (35). As a simple numerical check, we compare the mutual information of a Bell state analyzer with general random unitary U to random unitary U satisfying conditions (I) − (IV ) for ∼ 1000 trials. Results are presented in Fig. 2. VI. CONCLUSION We are now ready to present a key result: A perfect linear optical Bell state analyzer cannot produce a photo-counting measurement in which all N photons are bunched into just two modes. If we measure a state of the form in Eq. (35), then we have not perfectly distinguished the Bell states and our analyzer is flawed. The next step is to examine measurement states in which all N photons are bunched into three modes, i.e., states of the form |~ny i = |0, . . . , (N − P )L , . . . , (P − Q)l1 , . . . , Ql2 , . . .i . (41) Again, this can be done inductively by imposing and then revising conditions (I) − (IV ) at each step. With enough patience, one could carry this procedure through all measurement output states |~ny i and find the true upper bound on the measurement ability of a linear Bell state analyzer. This is a difficult project that we leave for future work. Our numerical results in Fig. 1 seem to suggest that a near-perfect Bell state measurement could be possible in the regime Na ≥ 8. Acknowledgments To prevent these measurement outcomes, we can impose one of the conditions (I, II, III, IV ) on each column of the matrix U . We allow some small numerical leniency for a near-perfect measurement. We are thankful for helpful discussions with M. Levenstien, R. Budin, and F. Christian. This research was supported in part using high performance computing (HPC) resources and services provided by Technology Services at Tulane University, New Orleans, LA. This work was supported by the NSF under Grant No. PHY-1005709. [1] C. H. Bennett, G. Brassard, C. Crépeau, R. Jozsa, A. Peres, and W. K. Wootters, Phys. Rev. Lett. 70, 1895 (1993). [2] D. Boschi, S. Branca, F. De Martini, L. Hardy, and S. 6 Popescu, Phys. Rev. Lett. 80, 1121 (1998). [3] M. Pavičić and J. Summhammer, Phys. Rev. Lett. 73, 3191 (1994). [4] D. Bouwmeester, J.-W. Pan, K. Mattle, M. Eibl, H. Weinfurter, and A. Zeilinger, Nature 390, 575-579 (1997). [5] M. Pavičić, Quantum Computation and Quantum Communication (Springer, New York, 2005). [6] M. Nielsen and I. Chuang, Quantum Computation and Quantum Information (Cambridge University Press, Cambridge, 2000). [7] D. Gottesman and I. Chuang, Nature 402, 390-393 (1999). [8] P. Kok, W. J. Munro, K. Nemoto, T. C. Ralph, J. P. Dowling, and G. J. Milburn, Rev. Mod. Phys. 79, 135 (2007). [9] M. Reck, A. Zeilinger, H. J. Bernstein, and P. Bertani, Phys. Rev. Lett. 73, 58 (1994). [10] C. K. Hong, Z. Y. Ou, and L. Mandel, Phys. Rev. Lett. 59 2044 (1987). [11] E. Knill, R. Laflamme, G. J. Milburn, Nature (London) 409, 46 (2001). [12] C. R. Myers and R. Laflamme, arXiv:quant-ph/0512104 (2005). [13] D. B. Uskov, L. Kaplan, A. M. Smith, S. D. Huver, and J. P. Dowling, Phys. Rev. A 79, 042326 (2009). [14] E. Knill, Phys. Rev. A 68, 064303 (2003). [15] E. Knill, Phys. Rev. A 66, 052306 (2002). [16] N. Lütkenhaus, J. Calsamiglia, and K.-A. Suominen, Phys. Rev. A 59, 3295 (1999). [17] A. Carollo and G. M. Palma, J. Mod. Opt. 49, 1147 (2002). [18] J. Calsamiglia and N. Lütkenhaus, Appl. Phys. B 72, 67 (2001). [19] F. Ewert and P. Loock, Phys. Rev. Lett. 113, 140403 (2014). [20] W. P. Grice, Phys. Rev. A 84, 042331 (2011). [21] M. Pavičić, Phys. Rev. Lett. 107, 080403 (2011) (retracted). [22] J. A. Smith and L. Kaplan, Phys. Rev. A 97, 012320 (2018). [23] A. S. Holevo, Probl. Peredachi Inf. 9, 110 (1973). [24] P. Hausladen, R. Jozsa, B. Schumacher, M. Westmoreland, and W. K. Wootters, Phys. Rev. A. 54, 1869, (1996). [25] J. A. Smith, D. B. Uskov, and L. Kaplan, Phys. Rev. A 92, 022324 (2015).
7cs.IT
Complexity Theory for Discrete Black-Box Optimization Heuristics Carola Doerr CNRS and Sorbonne Universités, UPMC Univ Paris 06, LIP6, Paris, France January 9, 2018. arXiv:1801.02037v1 [cs.NE] 6 Jan 2018 Abstract A predominant topic in the theory of evolutionary algorithms and, more generally, theory of randomized black-box optimization techniques is running time analysis. Running time analysis aims at understanding the performance of a given heuristic on a given problem by bounding the number of function evaluations that are needed by the heuristic to identify a solution of a desired quality. As in general algorithms theory, this running time perspective is most useful when it is complemented by a meaningful complexity theory that studies the limits of algorithmic solutions. In the context of discrete black-box optimization, several black-box complexity models have been developed to analyze the best possible performance that a black-box optimization algorithm can achieve on a given problem. The models differ in the classes of algorithms to which these lower bounds apply. This way, black-box complexity contributes to a better understanding of how certain algorithmic choices (such as the amount of memory used by a heuristic, its selective pressure, or properties of the strategies that it uses to create new solution candidates) influences performance. In this chapter we review the different black-box complexity models that have been proposed in the literature, survey the bounds that have been obtained for these models, and discuss how the interplay of running time analysis and black-box complexity can inspire new algorithmic solutions to well-researched problems in evolutionary computation. We also discuss in this chapter several interesting open questions for future work. Reference: This survey article is to appear (in a slightly modified form) in the book “Theory of Randomized Search Heuristics in Discrete Search Spaces”, which will be published by Springer in 2018. The book is edited by Benjamin Doerr and Frank Neumann. Missing numbers in the pointers to other chapters of this book will be added as soon as possible. 1 C. Doerr Survey Article Black-Box Complexity Contents 1 Introduction and Historical Remarks 1.1 Black-Box vs. White-Box Complexity . . . . . 1.2 Motivation and Objectives . . . . . . . . . . . . 1.3 Relationship to Query Complexity . . . . . . . 1.4 Scope of this Book Chapter . . . . . . . . . . . 1.5 Target Audience and Complementary Material 1.6 Overview of the Content . . . . . . . . . . . . . 2 The 2.1 2.2 2.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4 5 5 6 6 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 8 9 11 12 12 13 3 Known Black-Box Complexities in the Unrestricted Model 3.1 Needle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 OneMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 BinaryValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 Linear Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 Monotone and Unimodal Functions . . . . . . . . . . . . . . . . . . 3.6 LeadingOnes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.7 Jump Function Classes . . . . . . . . . . . . . . . . . . . . . . . . . 3.7.1 Known Running Time Bounds for Jump Functions . . . . . 3.7.2 The Unrestricted Black-Box Complexity of Jump Functions 3.7.3 Alternative Definitions of Jump . . . . . . . . . . . . . . . . 3.8 Combinatorial Problems . . . . . . . . . . . . . . . . . . . . . . . . 3.8.1 Minimum Spanning Trees . . . . . . . . . . . . . . . . . . . 3.8.2 Single-Source Shortest Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 13 14 15 16 17 17 18 18 19 19 20 21 21 4 Memory-Restricted Black-Box Complexity 4.1 OneMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Difference to the Unrestricted Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 23 24 5 Comparison- and Ranking-Based Black-Box Complexity 5.1 The Ranking-Based Black-Box Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 The Comparison-Based Black-Box Model . . . . . . . . . . . . . . . . . . . . . . . . . 24 25 27 6 Unbiased Black-Box Complexity 6.1 Unbiased Variation Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 The Unbiased Black-Box Model for Pseudo-Boolean Optimization . . . . . . . . . . . 6.3 Existing Results for Pseudo-Boolean Problems . . . . . . . . . . . . . . . . . . . . . . 6.3.1 Functions with Unique Global Optimum . . . . . . . . . . . . . . . . . . . . . . 6.3.2 OneMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3.3 LeadingOnes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3.4 Jump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3.5 Number Partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3.6 Minimum Spanning Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3.7 Other Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4 Beyond Pseudo-Boolean Optimization: Unbiased Black-Box Models for Other Search Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.1 Alternative Extensions of the Unbiased Black-Box Model for the SSSP problem 28 28 30 31 31 31 33 34 36 36 37 2.4 Unrestricted Black-Box Model Formal Definition of Black-Box Complexity . . . Tools for Proving Lower Bounds . . . . . . . . . Tools to Prove Upper Bounds . . . . . . . . . . . 2.3.1 Function Classes vs. Individual Instances 2.3.2 Upper Bounds via Restarts . . . . . . . . Polynomial Bounds for NP-Hard Problems . . . . . . . . . . 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 38 C. Doerr Survey Article 7 Combined Black-Box Complexity Models 7.1 Unbiased Ranking-Based Black-Box Complexity . . . . . . 7.2 Parallel Black-Box Complexity . . . . . . . . . . . . . . . . 7.3 Distributed Black-Box Complexity . . . . . . . . . . . . . . 7.4 Elitist Black-Box Complexity . . . . . . . . . . . . . . . . . 7.4.1 (Non-)Applicability of Yao’s Minimax Principle . . . 7.4.2 Exponential Gaps to Previous Models . . . . . . . . 7.4.3 The Elitist Black-Box Complexity of OneMax . . . . 7.4.4 The Elitist Black-Box Complexity of LeadingOnes . 7.4.5 The Unbiased Elitist Black-Box Complexity of Jump Black-Box Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 39 39 40 41 43 43 43 44 44 8 Summary of Known Black-Box Complexities for OneMax and LeadingOnes 44 9 From Black-Box Complexity to Algorithm Design 9.1 The (1 + (λ, λ)) Genetic Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.2 Randomized Local Search with Self-Adjusting Mutation Strengths . . . . . . . . . . . 45 45 47 10 From Black-Box Complexity to Mastermind 48 11 Conclusion and Selected Open Problems 49 3 C. Doerr 1 Survey Article Black-Box Complexity Introduction and Historical Remarks One of the driving forces in theoretical computer science is the fruitful interplay between complexity theory, which measures the minimal computational effort that is needed to solve a given problem, and theory of algorithms, which, via the design and analysis of efficient algorithmic solutions, aims at showing that a problem can be solved with a certain computational effort. When for a problem the lower bound for the resources needed to solve it are identical to (or not much smaller than) the upper bounds attained by some specific algorithms, we can be certain to have an (almost) optimal algorithmic solution for this problem. Big gaps between lower and upper bounds, in contrast, indicate that more research effort is needed to understand the problem: it may be that more efficient algorithms for the problem exist, or that the problem is indeed “harder” than what the known lower bound suggests. Many different complexity models co-exist in the theory of computer science literature. The arguably most classical one measures the number of arithmetic operations an algorithm needs to perform on the problem data until it obtains a solution for the problem. A solution can be a “yes/no” answer (decision problem), a classification of a problem instance according to some criteria (classification problem), a vector of decision variables that maximize or minimize some objective function (optimization problem), etc. In the optimization context, we are typically only interested in algorithms that satisfy some minimal quality requirements such as a guarantee that the suggested solutions (“the output” of the algorithm) are always optimal, optimal with some large enough probability, or that they are not worse than an optimal solution by more than some additive or multiplicative factor C, etc. In the white-box setting, in which the algorithms have full access to the data describing the problem instance, complexity theory is a well-established and very intensively studied research objective. In black-box optimization, where the algorithms do not have access to the problem data and can learn about the problem at hand only through the evaluation of potential solution candidates, complexitytheory is a much less present topic, with a rather big fluctuation in the number of publications. In the context of heuristic solutions to black-box optimization problems, which is the topic of this book, complexity-theory has been systematically studied only after 2010, under the notion of black-box complexity. Luckily, black-box complexity theory can build on results in related research domains such as information theory, discrete mathematics, cryptography, and others. In this book chapter we review the state of the art in this currently very active area of research, which is concerned with bounding the best possible performance that an optimization algorithm can achieve in a black-box setting. 1.1 Black-Box vs. White-Box Complexity Most of the traditional complexity measures assume that the algorithms have access to the problem data and count the number of steps that are needed until they output a solution. In the black-box setting, these complexity measures are not very meaningful, as the algorithms are asked to optimize a problem without having direct access to it. As a consequence, the performance of a black-box optimization algorithm is therefore traditionally measured by the number of function evaluations that the algorithm does until it queries for the first time a solution that satisfies some specific performance criteria. In this book, we are mostly interested in the expected number of evaluations needed until an optimal solution is evaluated for the first time. It is therefore natural to define black-box complexity as the minimal number of function evaluations that any black-box algorithm needs to perform, on average, until it queries for the first time an optimal solution. We typically regard classes of problems, e.g., the set of traveling salesperson instances of planar graphs with integer edge weights. For such a class F ⊆ {f : S → R} of problem instances, we take a worst-case view and measure the expected number of function evaluations that an algorithm needs to optimize any instance f ∈ F. That is, the black-box complexity of a problem F is inf A supf ∈F E[T (A, f )], the best (among all algorithms A) worst-case (among all problem instances f ) expected number E[T (A, f )] of function evaluations that are needed to optimize any f ∈ F. A formal definition will be given in Section 2. 4 C. Doerr Survey Article Black-Box Complexity The black-box complexity of a problem can be much different from its white-box counterparts. We will discuss, for example, in Sections 2.4 and 6.3.5 that there are a number of NP-hard problems whose black-box complexity is of small polynomial order. 1.2 Motivation and Objectives The ultimate objective of black-box complexity is to support the investigation and the design of efficient black-box optimization techniques. This is achieved in several complementing ways. A first benefit of black-box complexity is that it enables the above-mentioned evaluation of how well we have understood a black-box optimization problem, and how suitable the stateof-the-art heuristics are. Where large gaps between lower and upper bounds exist, we may want to explore alternative algorithmic solutions, in the hope to identify more efficient solvers. Where lower and upper bounds match or are close, we can stop striving for more efficient algorithms. Another advantage of black-box complexity studies is that they allow to investigate how certain algorithmic choices influence the performance: By restricting the class of algorithms under consideration, we can judge how these restrictions increase the complexity of a black-box optimization problem. In the context of evolutionary computation, interesting restrictions include the amount of memory that is available to the algorithms, the number of solutions that are sampled in every iteration, the way new solution candidates are generated, the selection principles according to which it is decided which search points to keep for future reference, etc. Comparing the unrestricted with the restricted black-box complexity of a problem (i.e., its black-box complexity with respect to all vs. with respect to a subclass of all algorithms) quantifies the performance loss caused by these restrictions. This way, we can understand, for example, the effects of not storing the set of all previously evaluated solution candidates, but only a small subset thereof. As we shall see below, the black-box complexity of a problem can be significantly smaller than the performance of a best known “standard” heuristic. In such cases, the small complexity is often attained by a very problem-tailored black-box algorithm, which is not representative for common black-box heuristics. Interestingly, it turns out that we can nevertheless learn from such highly specific algorithms, as they often incorporate some ideas that could be beneficial much beyond the particular problem at hand. As we shall demonstrate in Section 9, even for very well-researched optimization problems, such ideas can give rise to the design of novel heuristics which are provably more efficient than standard solutions. This way, black-box complexity serves as a source of inspiration for the development of novel algorithmic ideas that lead to the design of better search heuristics. 1.3 Relationship to Query Complexity As indicated above, black-box complexity is studied in several different contexts, which reach far beyond evolutionary computation. In the sixties and seventies of the twentieth century, for example, this complexity measure was very popular in the context of combinatorial games, such as coin-weighing problems of the type “given n coins of two different types, what is the minimal number of weighing that is needed to classify the coins according to their weight?”. Interpreting a weighing as a function evaluation, we see that such questions can be formulated as black-box optimization problems. Black-box complexity also plays an important role in cryptography, where a common research question concerns the minimal amount of information that suffices to break a secret code. Quantum computing, communication complexity, and information-theory are other research areas where blackbox complexity and variants thereof is an intensively studied performance measure. While in these settings the precise model is often not exactly identical to one faced in the black-box optimization, some of the tools developed in these related areas can be quite useful in our context. A significant part of the literature studies the performance of deterministic algorithms. Randomized black-box complexities are much less understood. They can be much smaller than their deterministic counterparts. Since deterministic algorithms form a subclass of randomized ones, any lower bound proven for the randomized black-box complexity of a problem also applies to any deterministic algorithm. In some cases, a strict separation between deterministic and randomized black-box complexities can be proven. This is the case for the LeadingOnes function, as we shall briefly discuss 5 C. Doerr Survey Article Black-Box Complexity in Section 3.6. For other problems, the deterministic and randomized black-box complexity coincide. Characterizing those problems for which the access to random bits can provably decrease the complexity is a widely open research question. In several context, in particular the research domains mentioned above, black-box complexity is typically referred to as query or oracle complexity, with the idea that the algorithms do not evaluate the function values of the solution candidates themselves but rather query them from an oracle. This interpretation is mostly identical to the black-box scenario classically regarded in evolutionary computation. 1.4 Scope of this Book Chapter In the description above, we have tacitly assumed that the search space S is finite. Only then it makes sense to discuss optimization time, as in continuous spaces we cannot expect to ever sample an optimal solution. Black-box complexity can nevertheless also be defined for continuous optimization problems, with the aim to bound the best possible convergence rates that a derivative-free black-box optimization algorithm can achieve, cf. [TG06, FT11] for examples. Here in this chapter, as in the remainder of this book, we restrict our attention to discrete optimization problems, i.e., the maximization or minimization of functions f : S → R that are defined over finite search spaces S. As in the previous chapters, we will mostly deal with the optimization pseudoBoolean functions f : {0, 1}n → R, permutation problems f : Sn → R, and functions f : [0..r−1]n → R defined for strings over an alphabet of bounded size, where we abbreviate here and in the following by [0..r − 1] := {0, 1, . . . , r − 1} the set of non-negative integers smaller than r, [n] := {1, 2, . . . , n}, and by Sn the set of all permutations (one-to-one maps) σ : [n] → [n]. 1.5 Target Audience and Complementary Material This book chapter is written with a person in mind who is familiar with black-box optimization, and who brings some background in theoretical running time analysis. We will give an exhaustive survey of existing results. Where appropriate, we provide proof ideas and discuss some historical developments. Readers interested in a more gentle introduction to the basic concepts of black-box complexity are referred to [Jan14]. A slide presentation on selected aspects of black-box complexity, along with a summary of complexity bounds known back in spring 2014, can be found in the tutorial [DD14]. 1.6 Overview of the Content Black-box complexity is formally defined in Section 2. We also provide there a summary of useful tools. In Section 2.4 we discuss why classical complexity statements like NP-hardness do not necessarily imply hardness in the black-box complexity model. In Sections 3 to 7 we review the different black-box complexity models that have been proposed in the literature and discuss the main results that have been achieved for these models. As we shall see, for several benchmark problems, including most notably OneMax, LeadingOnes, and jump, but also combinatorial problems like the minimum spanning tree problem and shortest paths problems, bounds have been derived for various complexity models. For OneMax and LeadingOnes we compare these different bounds in Section 8, to summarize where gaps between upper and lower bounds exist. Black-box complexity has unveiled interesting aspects on some previously unquestioned state-ofthe-art choices that are made in evolutionary computation and neighboring disciplines. As we shall demonstrate in Section 9, such considerations have the potential to significantly change our perception of these design choices. More precisely, we will discuss in Section 9 how the complexity-theoretic view on black-box optimization can inspire the design of more efficient optimization heuristics. We finally show in Section 10 that research efforts originally motivated by the study of the complexity of black-box optimization heuristics has yield improved bounds for long-standing open problems in classical computer science. In Section 11 we conclude this chapter with a summary of open questions and problems in discrete black-box complexity and directions for future work. 6 C. Doerr 2 Survey Article Black-Box Complexity The Unrestricted Black-Box Model In this section we introduce the most basic black-box model, which is the unrestricted one. This model contains all black-box optimization algorithms. Any lower bound in this model therefore immediately applies to any of the restricted models which we discuss in Sections 4 to 7. We also discuss in this section some useful tools for the analysis of black-box complexities and demonstrate that the black-box complexity of a problem can be much different from its classical white-box complexity. The unrestricted black-box model has been introduced by Droste, Jansen, Wegener in [DJW06]. The only assumption that it makes that the algorithms do not have any information about the problem at hand other than the fact that it stems from some function class F ⊆ {f : S → R}. The only way an unrestricted black-box algorithm can learn about the instance, which it is asked to find an optimal solution for, is by querying potential solution candidates x ∈ S and evaluating the function value f (x). We can assume that the evaluation is done by some oracle, from which f (x) is queried. In the unrestricted model, the algorithms can update after any such query the strategy by which the next search point(s) are generated. In this book, we are mostly interested in the performance of randomized black-box heuristics, so that these strategies are often probability distributions over the search space from which the next solution candidates are sampled. This process continues until an optimal search point x ∈ arg max f is queried for the first time. The algorithms that we are interested in are thus those that maintain a probability distribution D over the search space S. In every iteration, a new solution candidate x is sampled from this distribution and the function value f (x) of this search point is evaluated. After this evaluation, the probability distribution D is updated according to the information gathered through the sample (x, f (x)). The next iteration starts again by sampling a search point from this updated distribution D, and so on. This structure is summarized in Algorithm 1, which models unrestricted randomized black-box algorithms. A visualization is provided in Figure 2.1. Algorithm 1: Blueprint of an unrestricted randomized black-box algorithm. 1 2 3 4 Initialization: Sample x(0) according to some probability distribution D(0) over S and query f (x(0) ); Optimization: for t = 1, 2, 3, . . . do  Depending on (x(0) , f (x(0) )), . . . , (x(t−1) , f (x(t−1) )) choose a probability distribution D(t) over S and sample x(t) according to D(t) ; Query f (x(t) ); Note that in Algorithm 1 in every iteration only one new solution candidate is sampled. In contrast, many evolutionary algorithms and other black-box optimization techniques generate and evaluate several search points in parallel. It is not difficult to see that lower bounds obtained for the here-described unrestricted black-box complexity immediately apply to such population-based heuristics, since an unrestricted algorithm is free to ignore information obtained through the most recent iterations. As will be commented in Section 7.2, the parallel black-box complexity of a function can be (much) larger than its sequential variant. Taking this idea to the extreme, i.e., requiring the algorithm to neglect information obtained through previous queries yields so-called non-adaptive black-box algorithms. A prime example for a non-adaptive black-box algorithm is random sampling (with and without repetitions). Non-adaptive algorithms play only a marginal role in evolutionary computation. From a complexity point of view, however, it can be interesting to study how much adaptation is needed for an efficient optimization, cf. also the discussions in Sections 3.2 and 10. For most problems, the adaptive and non-adaptive complexity differ by large factors. For other problems, however, the two complexity notions coincide, see Section 3.1 for an example. Note also that unrestricted black-box algorithms have access to the full history of previously evaluated solutions. The effects of restricting the available memory to a population of a certain size will be the focus of the memory-restricted black-box models discussed in Section 4. In line 2 we do not specify how the probability distribution D(t) is chosen. Thus, in principle, the algorithm can spend significant time to choose this distribution. This can result in small polynomial 7 C. Doerr Survey Article Black-Box Complexity black-box complexities for NP-hard problems, cf. Section 2.4. Droste, Jansen, and Wegener [DJW06] suggested to restrict the set of algorithms to those that execute the choice of the distributions D(t) in a polynomial number of algebraic steps (i.e., polynomial time in the input length, where “time” refers to the classically regarded complexity measure). They call this model the time-restricted model. In this book chapter we will not study this time-restricted model, but we allow the algorithms to spend arbitrary time on the choice of the distributions D(t) . This way, we obtain very general lower bounds. Almost all upper bounds stated in this book chapter nevertheless apply also to the time-restricted model. The polynomial bounds for NP-hard problems, of course, form an exception. We finally comment on the fact that Algorithm 1 runs forever. As we have seen in previous chapters of this book, the pseudocode in Algorithm 1 is a common representation of black-box algorithms in the theory of heuristic optimization. The non-specification of the termination criterion is justified by our performance measure, which is the expected number of function evaluations that an algorithm performs until (and including) the first iteration in which an optimal solution is evaluated, cf. Definition 1 below. Other performance measures for black-box heuristics have been discussed in the literature, cf. [PD17, JZ14, DJWZ13], but in the realm of black-box complexity, the average optimization time is still the predominant performance indicator. Confer Section 11 for a discussion of extending existing results to other, possibly more complex performance measures. 2.1 Formal Definition of Black-Box Complexity In this section, we give a very general definition of black-box complexity. More precisely, we formally define the the black-box complexity of a class F of functions with respect to some class A of algorithms. The unrestricted black-box complexity will be the complexity of F with respect to all black-box algorithms that follow the blueprint provided in Algorithm 1. For a black-box optimization algorithm A and a function f : S → R, let T (A, f ) ∈ R ∪ {∞} be the number of function evaluations that algorithm A does until and including the evaluation in which it evaluates for the first time an optimal search point x ∈ arg max f . As in previous chapters, we call T (A, f ) the running time of A for f or, synonymously, the optimization time of A for f . When A is a randomized algorithm, T (A, f ) is a random variable that depends on the random decisions made by A. We are, as mentioned above, mostly interested in its expected value E[T (A, f )]. With this performance measure in place, the definition of the black-box complexity of a class F of functions S → R with respect to some class A of algorithms now follows the usual approach in complexity theory. Definition 1. For a given black-box algorithm A, the A-black-box complexity of F is E[T (A, F)] := sup E[T (A, f )], f ∈F the worst-case expected running time of A on F. The A-black-box complexity of F is E[T (A, F)] := inf E[T (A, F)], A∈A the minimum (“best”) complexity among all A ∈ A for F. Thus, formally, the unrestricted black-box complexity of a problem class F is E[T (A, F)] for A being the collection of all unrestricted black-box algorithms; i.e., all algorithms that can be expressed in the framework of Algorithm 1. In the remainder of this section, we summarize the most important tools to bound the black-box complexity of a function class F. Known bounds for the unrestricted black-box complexity of some selected problem classes F will be summarized in Section 3. In Sections 4 to 7 we will then restrict the class A of algorithms and study how these different restrictions increase the black-box complexity of some selected function classes. The following lemma formalizes the intuition that every lower bound for the unrestricted black-box model also applies to any of these restricted models. 8 C. Doerr Survey Article Black-Box Complexity Figure 1: In the unrestricted black-box model, the algorithms can store the full history of previously queried search points. For each of these already evaluated candidate solutions x the algorithm has access to its absolute function value f (x) ∈ R. There are no restrictions on the structure of the distributions D from which new solution candidates are sampled. Lemma 2. Let F ⊆ {f : S → R}. For every collection A0 of black-box optimization algorithms for F, the A0 -black-box complexity of F is at least as large as its unrestricted one. Formally, this lemma holds because A0 is a subclass of the set A of all unrestricted black-box algorithms. The infimum in the definition of E[T (A0 , F)] is therefore taken over a smaller class, thus giving values that are at least as large as E[T (A, F)]. 2.2 Tools for Proving Lower Bounds From Definition 1 we easily see that the unrestricted black-box complexity of a class F of functions is a lower bound for the performance of any black-box algorithm on F. In other words, no blackbox algorithm can optimize F more efficiently than what the unrestricted black-box complexity of F indicates. We are therefore particularly interested in proving lower bounds for the black-box complexity of a problem. In this section we describe the most important tools to derive such lower bounds. To date, the most powerful tool to prove lower bounds for randomized query complexity models like our unrestricted black-box model is the so-called minimiax principle of Yao [Yao77]. In order to discuss this principle, we first need to recall that we can interpret every randomized unrestricted black-box algorithm as a probability distribution over deterministic ones. In fact, randomized blackbox algorithms are often defined this way. Deterministic black-box algorithms are those for which the probability distribution in line 2 of Algorithm 1 are one-point distributions. I.e., for every t and for every sequence  (x(0) , f (x(0) )), . . . , (x(t−1) , f (x(t−1) )) of previous queries, there exists a search point s ∈ S such   that D(t) (x(0) , f (x(0) )), . . . , (x(t−1) , f (x(t−1) )) = s. In other words, we can interpret deterministic black-box algorithms as decision trees. A decision tree for a class F of functions is a rooted tree in which the nodes are labeled by the search points that the algorithm queries. The first query is the label of the root note, say x(0) . The edges from the root node to its neighbors are labeled with the possible objective values {g(x(0) ) | g ∈ F}. After evaluating f (x(0) ), the algorithm follows the (unique) edge {x(0) , x(1) } which is labeled with this value f (x(0) ). The next query is the label of the endpoint x(1) of this edge. We call x(1) a level-1 node. The level-2 neighbors of x(0) (i.e., all neighbors of x(1) except the root node x(0) ) are the potential search points to be queried in the next iteration. As before, the algorithm chooses as next query the neighbor x(2) of x(1) to which the unique edge labeled f (x(1) ) leads. This process continues until an optimal search point has been queried. The optimization time T (A, f ) of the algorithm A on function f equals one plus the depth of this node. We easily see that, in this model, it does not make sense to query the same search point twice, as such a query would not reveal any new information about the objective function f . For this reason, on every rooted path in the decision tree every search point appears at most once. This shows that the depth of the decision tree is bounded by |S| − 1. The width of the tree, however, can be as large as the size of the set F(S) := {g(s) | g ∈ F, s ∈ S}, which can be infinite or even uncountable; e.g., 9 C. Doerr Survey Article Black-Box Complexity if F equals the set of all linear or monotone functions f : {0, 1}n → R. As we shall see below, Yao’s minimax principle can only be applied to problems for which F(S) is finite. Luckily, it is often possible to identify subclasses F 0 of F for which F 0 (S) is finite and whose complexity is identical or not much smaller than that of the whole class F. When S and F(S) are finite, the number of (non-repetitive) deterministic decision trees, and hence the number of deterministic black-box algorithms for F is finite. In this case, we can apply Yao’s minimax principle. This theorem, intuitively speaking, allows to restrict our attention to bounding the expected running time E[T (A, f )] of a best-possible deterministic algorithm A on a random instance f taken from F according to some probability distribution p. By Yao’s minimax principle, this best possible expected running time is a lower bound for the expected performance of a best possible randomized algorithm on an arbitrary input. In our words, it is thus a lower bound for the unrestricted black-box complexity of the class F. Analyzing deterministic black-box algorithms is often considerably easier than directly bounding the performance of any possible randomized algorithm. An a priori challenge in applying this theorem is the identification of a probability distribution p on F for which the expected optimization time of a best-possible deterministic algorithm is large. Luckily, for many applications some rather simple distributions on the inputs suffice; for example the uniform one, which assigns to each problem instance f ∈ F equal probability. Another difficulty in the application is the above-mentioned identification of subclasses F 0 of F for which F 0 (S) is finite. Formally, Yao’s minimax principle reads as follows. Theorem 3 (Yao’s minimax principle). Let Π be a problem with a finite set I of input instances (of a fixed size) permitting a finite set A of deterministic algorithms. Let p be a probability distribution over I and q be a probability distribution over A. Then, min E[T (Ip , A)] ≤ max E[T (I, Aq )] , A∈A I∈I where Ip denotes a random input chosen from I according to p, Aq a random algorithm chosen from A according to q, and T (I, A) denotes the running time of algorithm A on input I. The formulation of Theorem 3 is taken from the book by Motwani and Raghavan [MR95], where an extended discussion of this principle can be found. A straightforward, but still quite handy application of Yao’s minimax principle gives the following lower bound. Theorem 4 (Simple information-theoretic lower bound, Theorem 2 in [DJW06]). Let S be finite. Let F be a set of functions {f : S → R} such that for every s ∈ S there exists a function fs ∈ F for which the size of fs (S) := {fs (x) | x ∈ S} is bounded by k and for which s is a unique optimum; i.e., arg max fs = {s} and |fs (S)| ≤ k. The unrestricted black-box complexity of F is at least dlogk (|S|)e−1. To prove Theorem 4 it suffices to select for every s ∈ S one function fs as in the statement and to regard the uniform distribution over the set {fs | s ∈ S}. Every deterministic black-box algorithm that eventually solves any instance fs has to have at least one node labeled s. We therefore need to distribute all |S| potential optima on the decision tree that corresponds to this deterministic black-box algorithm. Since the outdegree of every node is bounded from above by k, the average distance of a node to the root is at least dlogk (|S|)e − 2. An informal interpretation of Theorem 4, which in addition ignores the rounding of the logarithms, is as follows. In the setting of Theorem 4, optimizing a function fs corresponds to learning s. A binary encoding of the optimum s requires log2 (|S|) bits. With every query, we obtain at most log2 (k) bits of information; namely the amount of bits needed to encode which of the at most k possible objective value is assigned to the queried search point. We therefore need to query at least log2 (|S|)/ log2 (k) = logk (|S|) search points to obtain the information that is required to decode s. This hand-wavy interpretation often gives a good first idea of the lower bounds that can be proven by Theorem 4. A closer inspection of the statement in Theorem 4 shows that it works best if at every search point exactly k answers are possible, and each of them is equally likely. This is unfortunately not the typical 10 C. Doerr Survey Article Black-Box Complexity situation faced in black-box optimization processes, where usually only a (possibly small) subset of function values are likely to appear next. As a rule of thumb, the larger the difference in function value, the less likely we are to sample it in the next iteration. Such transition probabilities are not taken into account in Theorem 4. The theorem does also not cover very well the situation in which at a certain step less than k answers are possible. Even for fully symmetric problem classes this situation is likely to appear in the later parts of the optimization process, where those problem instances that are still align with all previously evaluated function values all map the next query to one out of less than k possible function values. Covering these two shortcomings of Theorem 4 is one of the main challenges in black-box complexity. One step into this direction is the matrix lower bound theorem presented in [BDK16] and the subsequent work [Buz16]. As also acknowledged there, however, the verification of the conditions under which these two generalizations apply is often quite tedious, so that the two methods are unfortunately not yet easily and very generally applicable. So far, they have been used to derive lower bounds for the black-box complexity of the OneMax and the jump benchmark functions, cf. Sections 3.2 and 3.7. Another tool that will be very useful in the subsequent sections is the following theorem, which allows to transfer lower bounds proven for a simpler problem to a problem that is derived from it by a composition with another function. This way, we can bound, for example, the complexity of functions of unitation, i.e., those functions for which the function value depends only on the number of ones in the string, by the black-box complexity of OneMax. More precisely, we shall use this theorem to show that the black-box complexity of the jump functions is at least as large as that of OneMax, cf. Section 3.7. Theorem 5 (Generalization of Theorem 2 in [DDK15b]). For all problem classes F, all classes of algorithms A, and all maps g : R → R that are such that for all f ∈ F it holds that {x | g(f (x)) optimal } = {x | f (x) optimal } the A-black-box complexity of g(F) := {g ◦ f | f ∈ F} is at least as large as that of F. The intuition behind Theorem 5 is that with the knowledge of f (x), we can compute g(f (x)), so that every algorithm optimizing g(F) can also be used to optimize F, by evaluating the f (x)-values, feeding g(f (x)) to the algorithm, and querying the solution candidates that this algorithm suggests. 2.3 Tools to Prove Upper Bounds While a lower bound L for the black-box complexity of a problem proves that it cannot be solved more efficiently, in our classical worst-case average complexity view described above, than with L function evaluations, a small upper bound for its black-box complexity shows that it can be solved efficiently in the black-box sense. When these upper bounds are smaller than the performance of well-understood search heuristics, the question whether these state-of-the-art heuristics can be improved arises quite naturally. This way, small black-box complexity upper bounds have indeed inspired the design and the investigation of new or long-time neglected algorithmic designs, cf. Section 9. At the same time, small upper bounds have also given rise to the development of more restricted black-box models, which contain only subclasses of the class of all unrestricted black-box algorithms, cf. Sections 4 to 7. We present here in this section some very general upper bounds for the black-box complexity of a problem. In the subsequent sections, we will observe that most upper bounds are either attained by very problem-specific algorithms, or by (often quite broad classes of) standard black-box optimization heuristics like evolutionary algorithms, local search variants, random search, etc. The simplest upper bound for the black-box complexity of a class F of functions is the expected performance of random sampling without repetitions. Lemma 6. For every finite set S and every class F ⊂ {f : S → R} of real-valued functions over S, the unrestricted black-box complexity of F is at most (|S| + 1)/2. This simple bound can be tight, as we shall discuss in Section 3.1. A similarly simple upper bound is presented in the next subsection. 11 C. Doerr 2.3.1 Survey Article Black-Box Complexity Function Classes vs. Individual Instances The attentive reader will have noticed that in all of the above we have discussed the black-box complexity of a class of functions, and not of individual problem instances. This is easily justified by the following observation, which also explains why in the following we will usually regard generalizations of the benchmark problems typically studied in the theory of randomized black-box optimization. Lemma 7. For every function f : S → R, the unrestricted black-box complexity of the class {f } that consists only of f is one. The same holds for any class F of functions that all have their optimum in the same point, i.e., for which there exists a search point x ∈ S such that, for all f ∈ F, x ∈ arg max f holds. More generally, if F is a collection of functions f : S → R and X ⊆ S is such that for all f ∈ F there exists at least one point x ∈ X such that x ∈ arg max f , the unrestricted black-box complexity of F is at most |X|. For every finite set F of functions, the unrestricted black-box complexity is bounded from above by (|F| + 1)/2. The proof of this lemma is quite straightforward. For the first statement, the algorithm which queries any point in arg max f in the first query certifies this bound. Similarly, the second statement is certified by the algorithm that queries x in the first iteration. Finally, the algorithm which queries the points in X in some arbitrary order proves the third statement. Note that the third statement implies in particular that the unrestricted black-box complexity of any finite set F of problem instances is at most |F|, since in order to create a set X as in the lemma, we can just collect for each function f ∈ F one optimal solution xf ∈ arg max f . This upper bound can be improved to (|F| + 1)/2 by querying the points in X in random order. Lemma 7 indicates that function classes F for which ∪f ∈F arg max f , or, more precisely for which a small set X as in the third statement of Lemma 7 exists, are not very interesting research objects in the unrestricted black-box model. We therefore typically choose the generalizations of the benchmark problems in a way that any set X which contains for each objective function f ∈ F at least one optimal search point has to be large. We shall often even have |X| = |F|; i.e., the optima of any two functions in F are pairwise different. We will see in Section 6 that Lemma 7 does not apply to all of the restricted black-box models. In fact, in the unary unbiased black-box model regarded there, the black-box complexity of a single function can be of order n log n. That is, even if the algorithm “knows” where the optimum is, it still needs Ω(n log n) steps to generate it. This running time is enforced by the way algorithms are allowed to create new solution candidates. 2.3.2 Upper Bounds via Restarts In several situations, rather than bounding the expected optimization time of a black-box heuristic, it can be easier to show that it solves a given problem with some probability at least p within some number s of iterations. If p is large enough (for an asymptotic bound it suffices that this success probability is constant), then a restarting strategy can be used to obtain upper bounds on the blackbox complexity of the problem. Either the algorithm is done after at most s steps, or it is initialized from scratch, independently of all previous runs. This way, we obtain the following lemma. Lemma 8 (Remark 7 in [DKLW13]). Suppose for a problem F there exists an unrestricted black-box algorithm A that, with constant success probability, solves any instance f ∈ F in s iterations (that is, it queries an optimal solution within s queries). Then the unrestricted black-box complexity of F is at most O(s). Lemma 8 also applies to almost all of the restricted black-box models that we will discuss in Sections 4 to 7. In general, it applies to all black-box models in which restarts are allowed. It does not apply to the (strict version of the) elitist black-box model, which we discuss in Section 7.4. 12 C. Doerr 2.4 Survey Article Black-Box Complexity Polynomial Bounds for NP-Hard Problems Our discussion in Section 1.1 indicates that the classical complexity notions developed for whitebox optimization and decision problems are not very meaningful in the black-box setting. This is impressively demonstrated by a number of NP-hard problems that have a small polynomial black-box complexity. We present such an example. One of the best-known NP-complete problems is MaxClique. For a given graph G = (V, E) of |V | = n nodes and for a given parameter k, it asks whether there exists a complete subgraph G0 = (V 0 ⊆ V, E 0 := E ∩ {{u, v} ∈ E | u, v ∈ V 0 }) of size |V 0 | at least k. A complete graph is the graph in which every two vertices are connected by a direct edge between them. The optimization version of MaxClique asks to find a complete subgraph of largest possible size. A polynomial-time optimization algorithm for this problem implies P=NP. The unrestricted black-box complexity of MaxClique is, however, only of order n2 . This was observed already in [DJW06, Section 3]. This bound can be achieved as follows. In the first n2 queries, the algorithm queries the presence of individual edges. This way, it learns the structure of the problem instance. From this information, all future solution candidates can be evaluated without any oracle queries. That is, a black-box algorithm can now compute an optimal solution offline; i.e., without the need for further function evaluations. This offline computation may take exponential time, but in the black-box complexity model, we do not charge the algorithm for the time needed between two queries.  n The optimal solution of the MaxClique instance can be queried in the 2 + 1 -st query. Theorem 9 (Section 3 in [DJW06]). The unrestricted black-box complexity of MaxClique is at most n 2 2 + 1 and thus O(n ). Several similar results can be obtained. For most of the restricted black-box complexity models this has been explicitly done, cf. also Section 6.3.5. One way to avoid such small complexities would be to restrict the time that an algorithm can spend between any two queries. This suggestion was made in [DJW06]. In our opinion, this requirement would, however, carry a few disadvantages such as a mixture of different complexity measures. We will therefore, here in this book chapter, not explicitly verify that the algorithms run in polynomial time. Most upper bounds are nevertheless easily seen to be obtained by polynomial-time algorithms. Where polynomial bounds are proven for NP-hard problems, there must be at least one iteration for which the respective algorithm, by today’s knowledge, needs excessive time. 3 Known Black-Box Complexities in the Unrestricted Model We survey existing results for the unrestricted black-box model, and proceed by problem type. For each considered benchmark problem we first introduce its generalizations to a class of similar problem instances. We discuss which of the original problem characteristics are maintained in these generalizations. We will see that for some classical benchmark problems, different generalizations have been proposed in the literature. 3.1 Needle Our first benchmark problem is an example that shows that the simple upper bound given in Lemma 6 can be tight. The function that we generalize is the Needle function, which assigns 0 to all search points s ∈ S except for one distinguished optimum, which has a function value of one. In order to obtain the above-mentioned property that every function in the generalize class has a different optimum than any other function (cf. discussion after Lemma 7), while at the same time maintaining the problem characteristics, the following generalization is imposes itself. For every s ∈ S we let fs : S → R be the function which assign function value 1 to the unique optimum s ∈ S and 0 to all other search points x 6= s. We let Needle(S) := {fs | s ∈ S} be the set of all such functions. Confronted with such a function fs we do not learn anything about the target string s until we have found it. It seems quite intuitive that the best we can do in such a case is to query search points at random, without repetitions. That this is indeed optimal is the statement of the following 13 C. Doerr Survey Article Black-Box Complexity theorem, which can be easily proven by Yao’s minimax principle applied to Needle(S) with the uniform distribution. Theorem 10 (Theorem 1 in [DJW06]). For every finite set S, the unrestricted black-box complexity of Needle(S) is (|S| + 1)/2. 3.2 OneMax The certainly best-studied benchmark function in the theory of randomized black-box optimization is P OneMax. OneMax assigns to each bit string x of length n the number ni=1 xi of ones in it. The natural generalization of this particular function to a non-trivial class of functions is as follows. Definition 11 (OneMax). For all n ∈ N and all z ∈ {0, 1}n let OMz : {0, 1}n → [0..n], x 7→ OMz (x) = |{i ∈ [n] | xi = zi }|, the function that assigns to each length-n bit string x the number of bits in which x and z agree. Being the unique optimum of OMz , the string z is called its target string. We refer to OneMaxn := {OMz | z ∈ {0, 1}n } as the set of all (generalized) OneMax functions. We often omit the subscript n. We easily observe that for every n the original OneMax function OM counting the number of ones corresponds to OM(1,...,1) . It is furthermore not difficult to prove that for every z ∈ {0, 1}n the fitness landscape of OMz is isomorphic to that of OM. This can be seen by observing that OMz (x) = OM(x ⊕ z ⊕ (1, . . . , 1)) for all x, z ∈ {0, 1}n , which shows that OMz = OM ◦ αz for the Hamming automorphism αz : {0, 1}n → {0, 1}n , x 7→ x⊕z ⊕(1, . . . , 1). As we shall discuss in Section 6, a Hamming automorphism is a one-to-one map α : {0, 1}n → {0, 1}n such that for all x and all z the Hamming distance of x and z is identical to that of α(x) and α(z). This shows that the generalization of OM to functions OMz preserves its problem characteristics. In essence, the generalization is just a “re-labeling” of the search points. The unrestricted black-box complexity of OneMax. With Definition 11 at hand, we can study the unrestricted black-box complexity of this important class of benchmark functions. Interestingly, it turns out that the black-box complexity of OneMaxn has been studied in several different contexts; much before Droste, Jansen, and Wegener introduced black-box complexity. In fact, already Erdős and Rényi [ER63] as well as several other authors studied it in the early 60s of the last century, inspired by a question about so-called coin-weighing problems. In our terminology, Erdős and Rényi [ER63] showed that the unrestricted black-box complexity of OneMax is at least (1 − o(1))n/ log2 (n) and at most (1 + o(1)) log2 (9)n/ log2 (n). The upper bound was improved to (1 + o(1))2n/ log2 (n) in [Lin64, Lin65, CM66]. Identical or weaker bounds have been proven several times in the literature. Some works appeared at the same time as the work of Erdős and Rényi (cf. the discussion in [Bsh09]), some much later [DJW06, AW09, Bsh09]. Theorem 12 ([ER63, Lin64, Lin65, CM66]). The unrestricted black-box complexity of OneMax is at least (1 − o(1))n/ log2 (n) and at most (1 + o(1))2n/ log2 (n). It is thus Θ(n/ log n). The lower bound of Theorem 12 follows from Yao’s minimax principle, applied to OneMaxn with the uniform distribution. Informally, we can use the arguments given after Theorem 4: since the optimum can be anywhere in {0, 1}n , we need to learn the n bits of the target string z. With each function evaluation, we receive at most log2 (n + 1) bits of information, namely the objective value, which is an integer between 0 and n. We therefore need at least (roughly) n/ log2 (n + 1) iterations. Using Theorem 4, this reasoning can be turned into a formal proof. The upper bound given in Theorem 4 is quite interesting because it is obtained by a very simple strategy. Erdős and Rényi showed that O(n/ log n) bit strings sampled independently and uniformly at random from the hypercube {0, 1}n have a high probability of revealing the target string. That is, an asymptotically optimal unrestricted black-box algorithm for OneMax can just sample O(n/ log n) random samples. From these samples and the corresponding objective values, the target string can 14 C. Doerr Survey Article Black-Box Complexity be identified without further queries. Its computation, however, may not be possibly in polynomial time. That OneMaxn can be optimized in O(n/ log n) queries also in polynomial time was proven in [Bsh09].1 The reader interested in a formal analysis of the strategy by Erdős and Rényi may confer Section 3 of [DJK+ 11], where a detailed proof of the O(n/ log n) random sampling strategy is presented. In the context of learning, it is interesting to note that the random sampling strategy by Erdős and Rényi is non-adaptive; i.e., the t-th search point does not depend on the previous t − 1 evaluations. In the black-box context, a last query, in which the optimal solution is evaluated, is needed. This query certainly depends on the previous O(n/ log n) evaluations, but note that here we know the answer to this evaluation already (with high probability). For non-adaptive strategies, learning z with (1 + o(1))2n/ log n queries is optimal [ER63]. The intuitive reason for this lower bound is that a random guess typically has an objective value close to n/2. More precisely, instead of using the whole √ range of n + 1 possible answers, almost all function values are in an O( n) range around n/2, giving, √ very informally, the lower bound log2 (n)/ log2 (O( n)) = Ω(2n/ log n). Using the probabilistic method (or the constructive result by Bshouty [Bsh09]), the random sampling strategy can be derandomized. This derandomization says that for every n, there is a sequence of t = Θ(n/ log n) strings x(1) , . . . , x(t) such that the objective values OMz (x(1) ), . . . , OMz (x(t) ) uniquely determine the target string z. Such a derandomized version will be used in later parts of this chapter, e.g., in the context of the k-ary unbiased black-box complexity of OneMax studied in Section 6.3.2. Theorem 13 (from [ER63] and others). For every n there is a sequence x(1) , . . . , x(t) of t = Θ(n/ log n) bit strings such that for every two length-n bit strings y 6= z there exists an index i with OMz (x(i) ) 6= OMy (x(i) ). For very concrete OneMax instances, i.e., for instances of bounded dimension n, very precise bounds for the black-box complexity are known, cf. [Buz16] and the pointers in [DDST16, Section 1.4] for details. Here in this chapter we are only concerned with the asymptotic complexity of OneMaxn with respect to the problem dimension n. Non-surprisingly, this benchmark problem will also be studied in almost all of the restricted black-box models that we describe in the subsequent sections. A summary of known results can be found in Section 8. 3.3 BinaryValue Another intensively studied benchmark function is the binary-value function BV(x) := ni=1 2i−1 xi , P which assigns to each bit string the value of the binary number it represents. As 2i > ij=1 2j−1 , the bit value of the bit i + 1 dominates the effect of all bits 1, . . . , i on the function value. Two straightforward generalizations of BV to function classes exist. The first one is the collection of all functions n P BVz : {0, 1}n → [0..2n ], x 7→ X 2i−1 1(xi , zi ), i=1 where 1(a, b) := 1 if and only if a = b and 1(a, b) := 0 otherwise. In light of Definition 11, this may seem like a natural extension of BV to a class of functions. It also satisfies our sought condition that for any two functions BVz 6= BVz 0 the respective optima z and z 0 differ, so that the smallest set containing for each function its optimum is the full n-dimensional hypercube {0, 1}n . However, we easily see that the unrestricted black-box complexity of the so-defined set BinaryValue∗n := {BVz | z ∈ {0, 1}n } is very small. Theorem 14 (Theorem 4 in [DJW06]). The unrestricted black-box complexity of BinaryValue∗n is 2 − 2−n . Proof. The lower bound follows from observing that for an instance BVz for which z is chosen uniformly at random, the probability to query the optimum z in the first query is 2−n . In all other cases at least two queries are needed. 1 Bshouty mentions that also the constructions of Lindström and Cantor and Mills can be done in polynomial time. But this was not explicitly mentioned in their works. The work of Bshouty also has the advantage that it generalizes to OneMax functions over alphabets larger than {0, 1}, cf. also Section 10. 15 C. Doerr Survey Article Black-Box Complexity For the upper bound, we only need to observe that for any two target strings z 6= z 0 and for every search point x ∈ {0, 1}n we have BVz (x) 6= BVz 0 (x). More precisely, it is easy to see that from BVz (x) we can easily determine for which bits i ∈ [n] the bit value of xi is identical to zi . This shows that from querying the objective value of a random string in the first query we can compute the optimum z, which we query in the second iteration, if the first one was not optimal already. Theorem 14 is possible because the objective values disclose a lot of information about the target string. A second generalization of BV has therefore been suggested in the literature. In light of the typical behavior of black-box heuristics, which do not discriminate between the bit positions, and in particular with respect to the unbiased black-box model defined in Section 6, this variant seems to be the more “natural” choice in the context of evolutionary algorithms. This second generalization of BV collects all functions BVz,σ defined as BVz,σ : {0, 1}n → N0 , x 7→ n X 2i−1 δ(xσ(i) , zσ(i) ) . i=1  Denting by σ(x) the string (xσ(1) . . . xσ(n) ), we easily see that BVz,σ (x) = BV σ(x ⊕ z ⊕ (1, . . . , 1)) , thus showing that the class {BVz,σ | z ∈ {0, 1}n , σ ∈ Sn } can be obtained from BV by composing it with an ⊕-shift of the bit values and a permutation of the indices i ∈ [n]. Since z = arg max BVz,σ , we call z the target string of BVz,σ . Similarly, we call σ the target permutation of BVz,σ . Going through the bit string one by one, i.e., flipping one bit at a time, shows that at most n + 1 function evaluations are needed to optimize any BVz,σ instance. This simple upper bound can be improved by observing that for each query x and for each i ∈ [n] we can derive from BVz,σ (x) whether or not xσ(i) = zσ(i) , even if we cannot yet locate σ(i). Hence, all we need to do is to identify the target permutation σ. This can be done by a binary search, which gives the following result. Theorem 15 (Theorem 16 in [DW14b]). The unrestricted black-box complexity of BinaryValuen := {BVz,σ | z ∈ {0, 1}n , σ ∈ Sn } is at most dlog2 ne + 2. In a learning sense, in which we want to learn both z and σ, the bound of Theorem 15 is tight, as, informally, the identification of σ requires to learn Θ(log(n!)) = Θ(n log n) bits, while with every query we obtain log2 (2n ) = n bits of information. In our optimization context, however, we do not necessarily need to learn σ in order to optimize BVz,σ . A similar situation will be discussed in Section 3.6, where we study the unrestricted black-box complexity of LeadingOnes. For LeadingOnes, it could be formally proven that the complexity of optimization and learning are identical (up to at most n queries). We are not aware of any formal statement showing whether or not a similar argument holds for the class BinaryValuen . 3.4 Linear Functions OM and BV are representatives of the class of linear functions f : {0, 1}n → R, x 7→ can generalize this class in the same way as above to obtain the collection n Linearn := fz : {0, 1}n → R, x 7→ n X fi 1(xi , zi ) | z ∈ {0, 1}n Pn i=1 fi xi . We o i=1 of generalized linear functions. OneMaxn and BinaryValuen are both contained in this class. Not much is known about the black-box complexity of this class. The only known bounds are summarized by the following theorem. Theorem 16 (Theorem 12 above and Theorem 4 in [DJW06]). The unrestricted black-box complexity of the class Linearn is at most n + 1 and at least (1 − o(1))n/ log2 n. The upper bound is attained by the algorithm that starts with a random or a fixed bit string x and flips one bit at a time, using the better of parent and offspring as starting point for the next iteration. A linear lower bound seems likely, but has not been formally proven. 16 C. Doerr 3.5 Survey Article Black-Box Complexity Monotone and Unimodal Functions For the sake of completeness, we mention that the class Linearn is a subclass of the class of generalized monotone functions. Definition 17 (Monotone functions). Let n ∈ N and let z ∈ {0, 1}n . A function f : {0, 1}n → R is said to be monotone with respect to z if for all y, y 0 ∈ {0, 1}n with {i ∈ [n] | yi = zi } ( {i ∈ [n] | yi0 = zi } it holds that f (y) < f (y 0 ). The class Monotonen contains all such functions that are monotone with respect to some z ∈ {0, 1}n . The above-mentioned algorithm which flips one bit at a time (cf. discussion after Theorem 16) solves any of these instances in at most n + 1 queries, giving the following theorem. Theorem 18. The unrestricted black-box complexity of the class Monotonen is at most n + 1 and at least (1 − o(1))n/ log2 n. Monotone functions are instances of so-called unimodal functions. A function f is unimodal if and only if for every non-optimal search point x there exists a direct neighbor y of x with f (y) > f (x). The unrestricted black-box complexity of this class of unimodal functions is studied in [DJW06, Section 8], where a lower bound that depends on the number of different function values that the objective functions can map to is presented. 3.6 LeadingOnes After OneMax, the probably second-most investigated function in the theory of discrete black-box optimization is the leading-ones function LO : {0, 1}n → [0..n], which assigns to each bit string x the length of the longest prefix of ones; i.e., LO(x) := max{i ∈ [0..n] | ∀j ∈ [i] : xj = 1}. Like for BinaryValue, two generalizations have been studied, an ⊕-invariant version and an ⊕- and permutation-invariant version. In view of the unbiased black-box complexity model which we will discuss in Section 6, the latter is the more frequently studied. Definition 19 (LeadingOnes function classes). Let n ∈ N. For any z ∈ {0, 1}n let LOz : {0, 1}n → N, x 7→ max{i ∈ [0..n] | ∀j ∈ [i] : xj = zj } , the length of the maximal joint prefix of x and z. Let LeadingOnes∗n := {LOz | z ∈ {0, 1}n } . For z ∈ {0, 1}n and σ ∈ Sn let LOz,σ : {0, 1}n → N, x 7→ max{i ∈ [0..n] | ∀j ∈ [i] : xσ(j) = zσ(j) } , the maximal joint prefix of x and z with respect to σ. The set LeadingOnesn is the collection of all such functions; i.e., LeadingOnesn := {LOz,σ | z ∈ {0, 1}n , σ ∈ Sn } . The unrestricted black-box complexity of the set LeadingOnes∗n is easily seen to be around n/2. This is the complexity of the algorithm which starts with a random string x and, given an objective value of LOz (x), replaces x by the string that is obtained from x by flipping the LOz (x) + 1-st bit in x. The lower bound is a simple application of Yao’s minimax principle applied to the uniform distribution over all possible problem instances. It is crucial here to note that the algorithms do not have any information about the “tail” (zj . . . zn ) until it has seen for the first time a search point of function value at least j − 1. Theorem 20 (Theorem 6 in [DJW06]). The unrestricted black-box complexity of the set LeadingOnes∗n is n/2 ± o(n). The same holds for the set {LOz,σ | z ∈ {0, 1}n }, for any fixed permutation σ ∈ Sn . The unrestricted black-box complexity of LeadingOnesn is also quite well understood. Theorem 21 (Theorem 4 in [AAD+ 13]). The unrestricted black-box complexity of LeadingOnesn is Θ(n log log n). 17 C. Doerr Survey Article Black-Box Complexity Both the upper and the lower bounds of Theorem 21 are quite involved. For the lower bound, Yao’s minimax principle is applied to the uniform distribution over the instances LOz,σ with zσ(i) := (i mod 2), i = 1, . . . , n. Informally, this choice indicates that the complexity of the LeadingOnes problem originates in the difficulty of identifying the target permutation. Indeed, as soon as we know the permutation, we need at most n + 1 queries to identify the target string z (and only around n/2 on average, by Theorem 20). To measure the amount of information that an algorithm can have about the target permutation σ, a potential function is designed that maps each search point x to a real number. To prove the lower bound in Theorem 21 it is shown that, for every query x, the expected increase in this potential, for a uniform problem instance LOz,σ , is not very large. Using drift analysis, this can be used to bound the expected time needed to accumulate the amount of information needed to uniquely determine the target permutation. The proof of the upper bound will be sketched in Section 6.3.3, in the context of the unbiased black-box complexity of LeadingOnesn . It may be interesting to note that the O(n log log n) bound of Theorem 21 cannot be achieved by deterministic algorithms. In fact, Theorem 3 in [AAD+ 13] states that the deterministic unrestricted black-box complexity of LeadingOnesn is Θ(n log n). 3.7 Jump Function Classes Another class of popular pseudo-Boolean benchmark functions are so-called “jump” functions. In black-box complexity, this class is currently one of the most intensively studied problems, with a number of surprising results, which in addition carry some interesting ideas for potential refinements of state-of-the-art heuristics. For this reason, we discuss this class in more detail, and compare the known complexity bounds to running time bounds for some standard and recently developed heuristics. For a non-negative integer `, the function Jump`,z is derived from the OneMax function OMz with target string z ∈ {0, 1}n by “blanking out” any useful information within the strict `-neighborhood of the optimum z and its bit-wise complement z̄; by giving all these search points a fitness value of 0. In other words,    n, if OMz (x) = n, Jump`,z (x) := OMz (x), if ` < OMz (x) < n − `,   0, otherwise. (1) This definition is mostly similar to the two, also not fully agreeing, definitions used in [DJW02] and [LW10] that we shall discuss below. 3.7.1 Known Running Time Bounds for Jump Functions We summarize known running time results for the optimization of jump functions via randomized optimization heuristics. The reader only interested in black-box complexity results can skip this section. [DJW02] analyzed the optimization time of the (1+1) EA on Jump functions. From their work, it is not difficult to see that the expected run time of the (1+1) EA on Jump`,z is Θ(n`+1 ), for all ` ∈ {1, . . . , bn/2c − 1} and all z ∈ {0, 1}n . This running time is dominated by the time needed to “jump” from a local optimum x with function value OMz (x) = n − ` − 1 to the unique global optimum z. The fast genetic algorithm proposed in [DLMN17] significantly reduces this running time by using a generalized variant of standard bit mutation, which goes through its input and flips each bit independently with probability c/n. Choosing in every iteration the expected step size c in this mutation rate c/n from a power-law distribution with exponent β (more precisely, in every iteration, c is chosen independently from all previous iterations, and independently of the current state of the optimization process), an expected running time of O(`β−0.5 ((1 + o(1)) e` )` n` ) on Jump`,z is achieved, uniformly for all jump sizes ` > β − 1. This is only a polynomial factor worse than the ((1 + o(1))e/`)` n` expected running time of the (1+1) EA which for every jump size ` uses a bit flip probability of `/n, which is the optimal static choice. 18 C. Doerr Survey Article Black-Box Complexity [DL16a] showed an expected running time of O((n/c)`+1 ) for a large class of non-elitist populationbased evolutionary algorithms with mutation rate c/n, where c is supposed to be a constant. Jump had originally been studied to investigate the usefulness of crossover; i.e., the recombination of two or more search points into a new solution candidate. In [JW02] a (µ+1) genetic algorithm using crossover is shown to optimize any Jump`,z function in an expected O(µn2 (` − 1)3 + 4`−1 /pc ) number of function evaluations, where pc < 1/(c(` − 1)n) denotes the (artificially small) probability of doing a crossover. In [DFK+ 17] it was shown that for more “natural” parameter settings, most notably a non-vanishing probability of crossover, a standard (µ + 1) genetic algorithm which uses crossover followed by mutation has an expected O(n` log n) optimization time on any Jump`,z function, which is an O(n/ log n) factor gain over the above-mentioned bound for the standard (1+1) EA. In [DFK+ 16] it is shown that significant performance gains can be achieved by the usage of diversity mechanisms. We refer the interested reader to Chapter ?? [link to the chapter on diversity will be added] of this book for a more detailed description of these mechanisms and running time statements, cf. in particular Sections ?? and ?? there. 3.7.2 The Unrestricted Black-Box Complexity of Jump Functions From the definition in (1), we easily see that for every n ∈ N and for all ` ∈ [0..n/2] there exists a function f : [0..n] → [0..n] such that Jump`,z (x) = f (OMz (x)) for all z, x ∈ {0, 1}n . By Theorem 5, we therefore obtain that for every class A of algorithms and for all `, the A-black-box complexity of Jump`,n := {Jump`,z | z ∈ {0, 1}n } is at least as large as that of OneMaxn . Quite surprisingly, it turns out that this bound can be met for a broad range of jump sizes `. Building on the work [DDK15b] on the unbiased black-box complexity of jump (cf. Section 6.3.4 for a detailed description of the results proven in [DDK15a]), in [BDK16] the following bounds are obtained. √ Theorem 22 ([BDK16]). For ` < n/2− n log2 , the unrestricted black-box complexity of Jump`,n is at √ most (1+o(1))2n/ log2 n, while for n/2− n log2 ≤ ` < bn/2c−ω(1) it is at most (1+o(1))n/ log2 (n− 2`) (where in this latter bound ω(1) and o(1) refer to n − 2` → ∞). √ For the extreme case of ` = bn/2c−1, the unrestricted black-box complexity of Jump`,n is n+Θ( n). For all ` and every odd n, the unrestricted black-box complexity of Jump`,n is at least  (n−2`)2  2 2 blog n−2`+1 2n−2 (n−2`−1)+1 c− n−2`−1 . For even n, it is at least blog n−2`+2 1+2n−1 n−2`−1 c− n−2` . 2 2 The proofs of the results in Theorem 22 are build to a large extend on the techniques used in [DDK15b], which we shall discuss in Section 6.3.4. In addition to these techniques, [BDK16] introduces a matrix lower bound method, which allows to prove stronger lower bounds than the simple information-theoretic result presented in Theorem 4 by taking into account that the “typical” information obtained through a function evaluation can be much smaller than what the whole range {f (s) | s ∈ S} of possible f -values suggests. √ Note that even for the case of “small” ` < n/2 − n log2 , the region around the optimum in which the function values are zero is actually quite large. This plateau contains 2(1−o(1))n points and has a diameter that is linear in n. For the case of the extreme jump functions also note that, apart from the optimum, only the points x with OMz (x) = bn/2c and OMz (x) = dn/2e have a non-zero function value. It is thus quite surprising that these functions can nevertheless be optimized so efficiently. We shall see in Section 6.3.4 how this is possible. One may wonder why in the definition of Jump`,n we have fixed the jump size `, as this way it is “known” to the algorithm. It has been argued in [DKW11] that the algorithms can learn ` efficiently, if this is needed; in some cases, including those of small `-values, knowing ` may not be needed to achieve the above-mentioned optimization times. Whether or not knowledge of ` is needed can be decided adaptively. 3.7.3 Alternative Definitions of Jump Following up on results for the so-called unbiased black-box complexity of jump functions [DDK15b], cf. Section 6.3.4, Jansen [Jan15] proposed an alternative generalization of the classical jump function 19 C. Doerr Survey Article Black-Box Complexity regarded in [DJW02]. To discuss this extension, we recall that the jump function analyzed by [DJW02, Definition 24] is (1, . . . , 1)-version of the maps f`,z that assign to every length-n bit string x the function value   if OMz (x) = n;  ` + n, f`,z (x) := ` + OMz (x), if OMz (x) ≤ n − `;   n − OM (x), otherwise. z We first motivate the extension considered in Definition (1). To this end, we first note that in the unrestricted black-box complexity model, f`,z can be very efficiently optimized by searching for the bit-wise complement z̄ of z and then inverting this string to the optimal search point z. Note also that in this definition the region around the optimum z provides more information than the functions Jump`,z defined via (1). When we are interested in bounding the expected optimization time of classical black-box heuristics, this additional information does most often not pose any problems. But for our sought black-box complexity studies this information can make a crucial difference. [LW10] therefore designed a different set of jump functions consisting of maps g`,z that assign to each x the function value   if OMz (x) = n;  n, g`,z (x) := OMz (x), if ` < OMz (x) ≤ n − `;   0, otherwise. Definition (1) is mostly similar to this definition, with the only difference being the function values for bit strings x with OMz (x) = n − `. Note that in (1) the sizes of the “blanked out areas” around the optimum and its complement are equal, while for g`,z the area around the complement is larger than that around the optimum. As mentioned, Jansen [Jan15] introduced yet another version of the jump function. His motivation is that the spirit of the jump function is to “[locate] an unknown target string that is hidden in some distance to points a search heuristic can find easily”. Jansen’s definition also has black-box complexity analysis in mind. For a given z ∈ {0, 1}n and a search point x∗ with OMz (x∗ ) > n − ` his jump function h`,z,x∗ assigns to every bit string x the function value h`,z,x∗ (x) :=    n + 1, n − OM (x), z   ` + OM (x), z if x = x∗ ; if n − ` < OMz (x) ≤ n and x 6= x∗ ; otherwise. Since these functions do not reveal information about the optimum other than its `-neighborhood, n ∗ ∗ the P unrestricted  black-box complexity of the class {h`,z,x | z ∈ {0, 1} , OMz (x ) > n − `} is  `−1 n i=0 i + 1 /2 [Jan15, Theorem 4]. This bound also holds if z is fixed to be the all-ones string, i.e., if we regard the unrestricted black-box complexity of the class {h`,(1,...,1),x∗ | OMz (x∗ ) > n − `}. For constant `, the black-box complexity of this class of jump functions is thus Θ(n`−1 ), very different from the results on the unrestricted black-box complexity of the Jump`,z functions regarded above. In difference to the latter, the expected optimization times stated for crossover-based algorithms in Section 3.7.1 above do not necessarily apply to the functions h`,z,x∗ , as for these functions the optimum x∗ is not located in the middle of the `-neighborhood of z. 3.8 Combinatorial Problems The above-described results are mostly concerned with benchmark functions that have been introduced to study some particular features of typical black-box optimization techniques; e.g., their hill-climbing capabilities (via the OneMax function), or their ability to jump a plateau of a certain size (this is the focus of the jump functions). Running time analysis, of course, also studies more “natural” combinatorial problems, like satisfiability problems, partition problems, scheduling, and graph-based problems like routing, vertex cover, max cut etc., cf. [NW10] for a survey of running time results for combinatorial optimization problems. 20 C. Doerr Survey Article Black-Box Complexity Apart from a few results for combinatorial problems derived in [DJW06],2 the first work to undertake a systematic investigation of the black-box complexities of combinatorial optimization problems is [DKLW13]. In this work, the two well-known problems of finding a minimum spanning tree (MST) in a graph as well as the single-source shortest path problem (SSSP) are considered. The work revealed that for combinatorial optimization problems the precise formulation of the problem can make a decisive difference. Modeling such problems needs therefore be executed with care. We will not be able to summarize all results proven in [DKLW13], but the following summarizes the most relevant ones for the unrestricted black-box model. [DKLW13] also studies the MST and the SSSP problem in various restricted black-box models; more precisely in the unbiased black-box model (cf. Section 6), the ranking-based model (Section 5) and combinations thereof. We will briefly discuss results for the unbiased case in Sections 6.3.6 and 6.4.1. 3.8.1 Minimum Spanning Trees For a given graph G = (V, E) with edge weights w : E → R, the minimum spanning tree problem asks P to find a connected subgraph G0 = (V, E 0 ) of G such that the sum e∈E 0 w(e) of the edge weights in G0 is minimized. This problem has a natural bit string representation. Letting m := |E|, we can fix an enumeration ν : [m] → E. This way, we can identify a length-m bit string x = (x1 , . . . , xm ) with the subgraph Gx := (V, Ex ), where Ex := {ν(i) | i ∈ [m] with xi = 1} is the set of edges i for which xi = 1. Using this interpretation, the MST problem can be modeled as a pseudo-Boolean optimization problem f : {0, 1}m → R, cf. [NW10] for details. This formulation, together with a bi-objective one evaluating the number of connected components and the total weight of the edges in the subgraph Gx are the two most common formulations of the MST problem in the evolutionary computation literature. In the unrestricted black-box model, both formulations are almost equivalent.3 Theorem 23 (Theorems 10 and 12 in [DKLW13]). For the bi-objective as well as the single-objective formulation of the MST problem in an arbitrary connected graph of n nodes and m edges, the unrestricted black-box complexity is strictly larger than n − 2 and at most 2m + 1. These bounds also apply if instead of absolute function values f (x) only their rankings are revealed; in other words, also the ranking-based black-box complexity (which will be introduced in Section 5) of the MST problem is at most 2m + 1. The upper bound is shown by first learning the order of the edge weights and then testing in increasing order of the edge weights whether the inclusion of the corresponding edge forms a cycle or not. This way, the algorithm imitates the well-known MST algorithm by Kruskal. The lower bound of Theorem 23 is obtained by applying Yao’s minimax principle with a probability distribution on the problem instances that samples uniformly at random a spanning tree, gives weight 1 to all of its edges, and weight 2 to all other edges. By Cayley’s formula, the number of spanning trees on n vertices is nn−2 . In intuitive terms, a black-box algorithm solving the MST problem therefore needs to learn (n − 2) log2 n bits. Since each query reveals a number between 2k − n + 1 and 2k (k being the number of edges included in the corresponding graph), it provides at most log2 n bits of information. Hence, in the worst case, we get a running time of at least n − 2 iterations. To turn this intuition into a formal proof, a drift theorem is used to show that in each iteration the number of consistent possible trees decreases by factor of at most 1/n. 3.8.2 Single-Source Shortest Paths For SSSP, which asks to connect all vertices of an edge-weighted graph to a distinguished source node through a path of smallest total weight, several formulations co-exist. The first one, which was also regarded in [DJW06], uses the following multi-criteria objective function. An algorithm can query 2 More precisely, in [DJW06] the following combinatorial problems are studied: MaxClique (Section 3), Sorting (Section 4), and the single-source shortest paths problem (Sections 4 and 9). 3 Note that this is not the case for the ranking-based model discussed in Section 5, since here it can make a decisive difference whether two rankings for the two components of the bi-objective function are reported or if this information is further condensed to one single ranking. 21 C. Doerr Survey Article Black-Box Complexity arbitrary trees on [n] and the objective value of any such tree is an n − 1 tuple of the distances of the n − 1 non-source vertices to the source s = 1 (if an edge is traversed which does not exist in the input graph, the entry of the tuple is ∞). Theorem 24 (Theorems 16 and 17 in [DKLW13]). For arbitrary connected graphs with n vertices and m edges, the unrestricted black-box complexity of the multi-objective formulation of the SSSP problem is n − 1. For complete graphs, it is at least n/4 and at most b(n + 1)/2c + 1. Theorem 24 improves the previous n/2 lower and the 2n − 3 upper bound given in [DJW06, Theorem 9]. For the general case, the proof of the upper bound imitates Dijkstra’s algorithm by first connecting all vertices to the source, then all but one vertices to the vertex of lowest distance to the source, then all but the two of lowest distance to the vertex of second lowest distance and so on, fixing one vertex with each query. The lower bound is an application of Yao’s minimax principle to a bound on deterministic algorithms, which is obtained trough an additive drift analysis. For complete graphs, it is essentially shown that the problem instance can be learned with b(n + 1)/2c queries, while the lower bound is again a consequence of Yao’s minimax principle. The bound in Theorem 24 is not very satisfactory as already the size of the input is Ω(m). The discrepancy is due to the large amount of information that the objective function reveal about the problem instance. To avoid such low black-box complexities, and to shed a better light on the complexity of the SSSP problem, [DKLW13] considers also an alternative model for the SSSP problem, in which a representation of a candidate solution is a vector (ρ(2), . . . , ρ(n)) ∈ [n]n−1 . Such a vector is interpreted such that the predecessor of node i is ρ(i) (the indices run from 2 to n to match the index with the label of the nodes—node 1 is the source node to which a shortest path is sought). With this interpretation, the search space becomes the set S[2..n] of permutations of [2..n]; i.e., S[2..n] is the set all one-to-one maps σ : [2..n] → [2..n]. For a given graph G, the single-criterion objective function fG P is defined by assigning to each candidate solution (ρ(2), . . . , ρ(n)) the function value ni=2 di , where di is the distance of the i-th node to the source node. If an edge—including loops—is traversed which does not exist in the input graph, di is set to n times the maximum weight wmax of any edge in the graph). Theorem 25 (Theorem 18 in [DKLW13]). The unrestricted black-box complexity of the SSSP problem P with the single-criterion objective function is at most n−1 i=1 i = n(n − 1)/2. As in the multi-objective case, the bound of Theorem 25 is obtained by imitating Dijkstra’s algorithm. In the single-objective setting, adding the i-th node to the shortest path tree comes at a cost of at most n − i function evaluations. 4 Memory-Restricted Black-Box Complexity As mentioned in the previous section, already in the first work on black-box complexity [DJW06] it was noted that the unrestricted model can be too generous in the sense that it includes blackbox algorithms that are highly problem-tailored and whose expected running time is much smaller than that of typical black-box algorithms. One potential reason for such a discrepancy is the fact that unrestricted algorithms are allowed to store and to access the full search history, while typical heuristics only store a subset (“population” in evolutionary computation) of these previously evaluated samples and their corresponding objective values. Droste, Jansen, and Wegener therefore suggested to adjust the unrestricted black-box model to reflect this behavior. In their memory-restricted model of size µ,4 the algorithms can store up to µ pairs (x, f (x)) of previous samples. Based only on this information, they decide on the probability distribution D from which the next solution candidate is sampled. Note that this also implies that the algorithm does not have any iteration counter or any other information about the time elapsed so far. Regardless of how many samples have been evaluated already, the  sampling distribution D depends only on the µ pairs x(1) , f (x(1) ) , . . . , x(µ) , f (x(µ) ) stored in the memory. 4 In the original work [DJW06] a memory-restricted algorithm of size µ was called black-box algorithm with size bound µ. 22 C. Doerr Survey Article Black-Box Complexity Figure 2: In the (µ + λ) memory-restricted black-box model, the algorithms can store up to µ previously evaluated search points and their absolute function values. In each iteration, it queries the function values of λ new solution candidates. It then has to decide which of the µ + λ search points to keep in the memory for the next iteration. We extend this model to a (µ+λ) memory-restricted black-box model, in which the algorithms have to query λ solution candidates in every round, cf. Algorithm 2. Following Definition 1, the (µ + λ) memory-restricted black-box complexity of a function class F is the black-box complexity with respect to the class A of all (µ + λ) memory-restricted black-box algorithms. Algorithm 2: The (µ + λ) memory-restricted black-box algorithm for optimizing an unknown function f : S → R 1 2 3 4 5 6 7 8 Initialization: X ← ∅; Choose a probability distribution D(0) over S µ , sample from it x(1) , . . . , x(µ) ∈ S, and query f (x(1) ), . . . , f (x(µ) );    X ← x(1) , f (x(1) ) , . . . , x(µ) , f (x(µ) ) ; Optimization: for t = 1, 2, 3, . . . do Depending only on the multiset X choose a probability distribution D(t) over S λ , sample from it y (1) , . . . , y (λ) ∈ S, and query f (y (1) ), . . . , f (y (µ) );    Set X ← X ∪ y (1) , f (y (1) ) , . . . , y (µ) , f (y (λ) ) ; for i = 1, . . . , λ do Select (x, f (x)) ∈ X and update X ← X \ {(x, f (x))}; The memory-restricted model of size µ corresponds to the (µ + 1) memory-restricted one, in which only one search point needs to be evaluated per round. Since this variant with λ = 1 allows the highest degree of adaptation, it is not difficult to verify that for all µ ∈ N and for all λ > 1 the (µ + λ) memory-restricted black-box complexity of a problem F is at least as large as its (µ + 1) black-box complexity. The effects of larger λ have been studied in a parallel black-box complexity model, which we will discuss in Section 7.2. While it seems intuitive that larger memory sizes yield to smaller optimization times, this in not necessarily true for all functions. Indeed, the following discussion shows that memory is not needed for the efficient optimization of OneMax. 4.1 OneMax Droste, Jansen, and Wegener conjectured in [DJW06, Section 6] that the (1 + 1) memory-restricted black-box complexity of OneMax is O(n log n), in the belief that Randomized Local Search and the (1+1) EA are asymptotically optimal representatives of this class. This conjecture was refuted in [DW12b], where a linear upper bound was presented. This bound was further reduced to O(n/ log n) in [DW14a], showing that even the most restrictive version of the memory-restricted black-box model does not increase the asymptotic complexity of OneMax. By the lower bound presented in Theorem 12, the O(n/ log n) bound is asymptotically best possible. 23 C. Doerr Survey Article Black-Box Complexity Theorem 26 (Theorem 1 in [DW14a]). The (1 + 1) memory-restricted black-box complexity of OneMax is Θ(n/ log n). The proof of Theorem 26 makes use of the O(n/ log n) unrestricted strategy by Erdős and Rényi. To respect the memory-restriction, the algorithm achieving the O(n/ log n) expected optimization time √ works in rounds. In every round, a substring of size s := n of the target string z is identified, using O(s/ log s) queries. The algorithm alternates between querying a string to obtain new information and queries which are used only to store the function value of the last query in the current memory. This works only if sufficiently many bits are available in the guessing string to store this information. It is shown that O(n/ log n) bits suffice. These last remaining O(n/ log n) bits of z are then identified with a constant number of guesses per position, giving an overall expected optimization time of O(n/s)O(s/ log s) + O(n/ log n) = O(n/ log n). 4.2 Difference to the Unrestricted Model In light of Theorem 26 it is interesting to find examples for which the (µ + 1) memory-restricted black-box complexity is strictly (and potentially much) larger than its ((µ + 1) + 1) memory-restricted one. This question was addressed in [Sto16]. In a first step, it is shown that having a memory of one can make a decisive difference over not being able to store any information at all. In fact, it is easily seen that without any memory, every function class F that for every s ∈ S contains a function fs such that s is the only optimal solution of fs , then without any memory, the best one can do is random sampling, resulting in an expected optimization time of |S|. Assume now that there is a (fixed) search point h ∈ S where a hint is given, in the sense that for all s ∈ S the objective value fs (h) uniquely determines where the optimum s is located. Then clearly the (1 + 1) memory-restricted algorithm which first queries h and then based on (h, fs (h)) queries s solves any problem instance fs in at most 2 queries. This idea can be generalized to a function class of functions with two hints hided in two different distinguished search points h1 and h2 . Only the combination of (h1 , fs (h1 )) with (h2 , fs (h2 )) defines where to locate the optimum s. This way, the (2 + 1) memory-restricted black-box complexity of this class F(h1 , h2 ) is at most three, while its (1 + 1) memory-restricted one is at least (S + 1)/2. For, say, S = {0, 1}n we thus see that the discrepancies between the (0 + 1) memory-restricted blackbox complexity of a problem F and its (1 + 1) memory-restricted one can be exponential, and so can be the difference between the (1 + 1) memory-restricted black-box complexity and the (2 + 1) memory-restricted one. We are not aware of any generalization of this result to arbitrary values of µ. Theorem 27 ([Sto16]). There are classes of functions F(h) ⊂ {f | f : {0, 1}n → R} and F(h1 , h2 ) ⊂ {f | f : {0, 1}n → R} such that • the (0 + 1) memory-restricted black-box complexity of F(h) is exponential in n, while its (1 + 1) memory-restricted one is at most two, and • the (1 + 1) memory-restricted black-box complexity of F(h1 , h2 ) is exponential in n, while its (2 + 1) memory-restricted one is at most three. Storch [Sto16] also presents a class of functions that is efficiently optimized by a standard (2+1) genetic algorithm, which is a (2 + 1) memory-restricted black-box algorithm, in O(n2 ) queries, on average, while its (1 + 1) memory-restricted black-box complexity is exponential in n. This function class is build around so-called royal road functions; the main idea being that the genetic algorithm is guided towards the two “hints”, between which the unique global optimum is located. 5 Comparison- and Ranking-Based Black-Box Complexity In [TG06, FT11, DW14b] the observation that many standard black-box heuristics do not take advantage of knowing exact objective values but use instead only comparisons of these function values to decide where or how to continue their search inspired the formulation of comparison-based and a ranking-based black-box models. 24 C. Doerr Survey Article Black-Box Complexity Figure 3: A ranking-based black-box algorithm without memory restriction can store all previously evaluated search points. Instead of knowing their function values, it only has access to the ranking of the search points induced by the objective function f . Based on this, it decides upon a distribution D from which the next search point is sampled. 5.1 The Ranking-Based Black-Box Model In the ranking-based black-box model, the algorithms receive a ranking of the search points currently stored in the memory of the population. This ranking is defined by the objective values of these points. Definition 28. Let S be a finite set, let f : S → R be a function, and let C be a subset of S. The ranking ρ of C with respect to f assigns to each element c ∈ C the number of elements in C with a smaller f -value plus 1, formally, ρ(c) := 1 + |{c0 ∈ C | f (c0 ) < f (c)}|. Note that two elements with the same f -value are assigned the same ranking. In the ranking-based black-box model without memory restriction, an algorithm receives thus with every query a ranking of all previously evaluated solution candidates, while in the memory-restricted case, naturally, only the ranking of those search points currently stored in the memory is revealed. To be more precise, the ranking-based black-box model without memory restriction subsumes all algorithms that can be described via the scheme of Algorithm 3. Figure 6 illustrates these rankingbased black-box algorithms. Algorithm 3: Blueprint of a ranking-based black-box algorithm without memory restriction. Initialization: Sample x(0) according to some probability distribution D(0) over S; X ← {x(0) }; Optimization: for t = 1, 2, 3, . . . do Depending on {x(0) , . . . , x(t−1) } and its ranking ρ(X, f ) with respect to f , choose a probability distribution D(t) on S and sample from it x(t) ; X ← X ∪ {x(t) }; Query the ranking ρ(X, f ) of X induced by f ; 1 2 3 4 5 6 Likewise, the (µ + λ) memory-restricted ranking-based model contains those (µ + λ) memoryrestricted algorithms that follow the blueprint in Algorithm 4; Figure 8 illustrates this pseudo-code. These ranking-based black-box models capture many common search heuristics, such as (µ + λ) evolutionary algorithms, some ant colony optimization algorithms (for example simple versions of Max-Min Ant Systems as analyzed in [NW09, KNSW11]), and Randomized Local Search. They do not include algorithms with fitness-dependent parameter choices, such as fitness-proportional mutation rates or fitness-dependent selection schemes. Surprisingly, the unrestricted and the non-memory-restricted ranking-based black-box complexity of OneMax coincide in asymptotic terms; the leading constants may be different. Theorem 29 (Theorem 6 in [DW14b]). The ranking-based black-box complexity of OneMax without memory-restriction is Θ(n/ log n). 25 C. Doerr Survey Article Black-Box Complexity Algorithm 4: The (µ+λ) memory-restricted ranking-based black-box algorithm for maximizing an unknown function f : {0, 1}n → R 1 2 3 4 5 6 7 8 Initialization: X ← ∅; Choose a probability distribution D(0) over S µ and sample from it X = {x(1) , . . . , x(µ) } ⊆ S; Query the ranking ρ(X, f ) of X induced by f ; Optimization: for t = 1, 2, 3, . . . do Depending only on the multiset X and the ranking ρ(X, f ) of X induced by f choose a probability distribution D(t) on S λ and sample from it y (1) , . . . , y (λ) ; Set X ← X ∪ {y (1) , . . . , y (λ) } and query the ranking ρ(X, f ) of X induced by f ; for i = 1, . . . , λ do Based on X and ρ(X, f ) select a (multi-)subset Y of X of size µ and update X ← Y ; Figure 4: A (µ + λ) memory-restricted ranking-based black-box algorithm can store up to µ previously evaluated search points and the ranking of this population induced by the objective function f . Using only this information, λ new solution candidates are sampled in each iteration and the ranking of the (µ + λ) points is revealed. Based on this ranking, the algorithm needs to select which µ points to keep in the memory. 26 C. Doerr Survey Article Black-Box Complexity The upper bound for OneMax is obtained by showing that, for a sufficiently large sample base, a median search point x (i.e., a search point for which half of the search points have a ranking that is at most as large as that of x and the other half of the the search points have rankings that are at least as large as that of x) is very likely to have n/2 correct bits. It is furthermore shown that with O(n/ log n) √ √ random queries each of the function values in the interval [n/2 − κ n, n/2 + κ n] appears at least once. This information is used to translate the ranking of the random queries into absolute function √ √ values, for those solution candidates y for which OMz (y) lies in the interval [n/2 − κ n, n/2 + κ n]. The proof is then concluded by showing that it suffices to regard only these samples in prder to identify the target string z of the problem instance OMz . For BinaryValue, in contrast, it makes a substantial difference whether absolute or relative objective values are available. Theorem 30 (Theorem 17 in [DW14b]). The ranking-based black-box complexity of BinaryValuen and BinaryValue∗n is strictly larger than n − 1, even when the memory is not bounded. This lower bound of n − 1 is almost tight. In fact, an n + 1 ranking-based algorithm is easily obtained by starting with a random initial search point and then, from left to right, flipping in each iteration exactly one bit. The ranking uniquely determines the permutation σ and the string z of the problem instance BVz,σ . Theorem 30 is shown with Yao’s minimax principle applied to the uniform distribution over the problem instances. The crucial observation is that when optimizing BVz,σ with a ranking-based algorithm, then from t samples we can learn at most t − 1 bits of the hidden bit string z, and not Θ(t log t) bits as one might guess from the fact that there are t! permutations of the set [t]. This last intuition, however, gives a very general lower bound. Intuitively, if F is such that every z ∈ {0, 1}n is the unique optimum for a function fz ∈ F, and we only learn the ranking of the search points evaluated so far, then for the t-th query, we learn at most log2 (t!) = Θ(t log t) bits of information. Since we need to learn n bits in total, the ranking-based black-box complexity of F is of order at least n/ log n. Theorem 31 (Theorem 21 in [DW14b]). Let F be a class of functions such that each f ∈ F has a unique global optimum and such that for all z ∈ {0, 1}n there exists a function fz ∈ F with {z} = arg max fz . Then the unrestricted ranking-based black-box complexity of F is Ω(n/ log n). Results for the ranking-based black-box complexity of the two combinatorial problems MST and SSSP have been derived in [DKLW13]. Some of these bounds were mentioned in Section 3.8. 5.2 The Comparison-Based Black-Box Model In the ranking-based model, the algorithms receive for every query quite a lot of information, namely the full ranking of the current population and its offspring. One may argue that some evolutionary algorithms use even less information. Instead of regarding the full ranking, they base their decisions on a few selected points only. This idea is captured in the comparison-based black-box model. In contrast to the ranking-based model, here only the ranking of the queried points is revealed. In this model it can therefore make sense to query a search point more than once; to compare it with a different offspring, for example. Figure 5.2 illustrates the (µ + λ) memory-restricted comparison-based black-box model. A comparison-based model without memory-restriction is obtained by setting µ = ∞. We do not further detail this model, as it has received only marginal attention so far in the black-box complexity literature. We note, however, that Teytaud and co-authors [TG06, FT11] have presented some very general lower bounds for the convergence rate of comparison-based and rankingbased evolutionary strategies in continuous domains. From these works results for the comparisonbased black-box complexity of problems defined over discrete domains can be obtained. These bounds, however, seem to coincide with the information-theoretic ones that can be obtained through Theorem 4. 27 C. Doerr Survey Article Black-Box Complexity Figure 5: A (µ + λ) memory-restricted comparison-based black-box algorithm can store up to µ previously evaluated search points and the comparison of these points that have been learned through previous queries. In the next iteration, λ solution candidates are queried, possibly containing some of the current population. Only the ranking of the µ queried points is revealed. Based on this ranking and the previous information about the relative fitness values, the algorithm needs to select which µ points to keep in the memory. 6 Unbiased Black-Box Complexity As previously commented, the quest to develop a meaningful complexity theory for evolutionary algorithms and other black-box optimization heuristics seemed to have come to an early end after 2006; the only work who picked up on this topic being the work of Anil and Wiegand on the unrestricted black-box complexity of OneMax [AW09] (cf. Section 3.2). In 2010, the situation has changed drastically. Black-box complexity was revived by Lehre and Witt in [LW10] (journal version appeared as [LW12]). To overcome the drawbacks of the previous unrestricted black-box model, they restrict the class of black-box optimization algorithms in a natural way that still covers a large class of classically used algorithms. In their unbiased black-box complexity model, Lehre and Witt regard pseudo-Boolean optimization problems F ⊆ {f : {0, 1}n → R}. The unbiased black-box model requires that all solution candidates must be sampled from distributions that are unbiased. In the context of pseudo-Boolean optimization, unbiasedness means that the distribution can not discriminate between bit positions 1, 2, . . . , n nor between the bit entries 0 and 1; a formal definition will be given in Sections 6.1 and 6.2. The unbiased black-box model also admits a notion of arity. A k-ary unbiased black-box algorithm is one that employs only such variation operators that take up to k arguments. This allows, for example, to talk about mutation-only algorithms (unary unbiased algorithms) and to study the potential benefits of recombining previously samples search points through distributions of higher arity. In crucial difference to the memory-restricted model, in the pure version of the unbiased black-box model, the memory is not restricted. That is, the k search points that form the input for the k-ary variation operator can be any random or previously evaluated solution candidate. As in the case of the comparison- and the ranking-based black-box model, combined unbiased memory-restricted models have also been studied, cf. Section 7. Before we formally introduce the unbiased black-box models for pseudo-Boolean optimization problems in Section 6.2, we define and discuss in Section 6.1 the concept of unbiased variation operators. Known black-box complexities in the unbiased black-box models are surveyed in Section 6.3. In Section 6.4 we present extensions of the unbiased black-box models to search spaces different from {0, 1}n . 6.1 Unbiased Variation Operators In order to formally define the unbiased black-box model, we first introduce the notion of k-ary unbiased variation operators. Informally, a k-ary unbiased variation operator takes as input up to k search points. It samples a new point z ∈ {0, 1}n by applying some procedure to these previously evaluated solution candidates that treats all bit positions and the two bit values in an equal way. 28 C. Doerr Survey Article Black-Box Complexity Definition 32 (k-ary unbiased variation operator). Let k ∈ N. A k-ary unbiased distribution (D(. | y (1) , . . . , y (k) ))y(1) ,...,y(k) ∈{0,1}n is a family of probability distributions over {0, 1}n such that for all inputs y (1) , . . . , y (k) ∈ {0, 1}n the following two conditions hold. (i) ∀x, z ∈ {0, 1}n : D(x | y (1) , . . . , y (k) ) = D(x ⊕ z | y (1) ⊕ z, . . . , y (k) ⊕ z) , (ii) ∀x ∈ {0, 1}n ∀σ ∈ Sn : D(x | y (1) , . . . , y (k) ) = D(σ(x) | σ(y (1) ), . . . , σ(y (k) )) . We refer to the first condition as ⊕-invariance and we refer to the second as permutation invariance. A variation operator creating an offspring by sampling from a k-ary unbiased distribution is called a k-ary unbiased variation operator. To get some intuition for unbiased variation operators, we summarize a few characterizations and consequences of Definition 32. We first note that the combination of ⊕- and permutation invariance can be characterized as invariance under Hamming-automorphisms. A Hamming-automorphism is a one-to-one map α : {0, 1}n → {0, 1}n that satisfies that for any two points x, y ∈ {0, 1}n their Hamming distance H(x, y) is equal to the Hamming distance H(α(x), α(y)) of their images. A formal proof for the following lemma can be found in [DKLW13, Lemma 3]. Lemma 33. A distribution D(· | x1 , . . . , xk ) is unbiased if and only if, for all Hamming automorphisms α : {0, 1}n → {0, 1}n and for all bit strings y ∈ {0, 1}n , the probability D(y | x1 , . . . , xk ) to sample y from (x1 , . . . , xk ) equals the probability D(α(y) | α(x1 ), . . . , α(xk )) to sample α(y) from (α(x1 ), . . . , α(xk )). It is not difficult to see that the only 0-ary unbiased distribution over {0, 1}n is the uniform one. 1-ary operators, also called unary operators, are sometimes referred to as mutation operators, in particular in the field of evolutionary computation. Standard bit mutation, as used in several (µ + λ) EAs and (µ + λ) EAs, is a unary unbiased variation operator. The random bit flip operation used by RLS, which chooses at random a bit position i ∈ [n] and replaces the entry xi by the value 1 − xi , is also unbiased. In fact, all unary unbiased variation operators are of a very similar type, as the following definition and lemma, taken from [DDY16b] but known in a much more general form already in [DKLW13], shows. Definition 34. Let n ∈ N and r ∈ [0..n]. For every x ∈ {0, 1}n let flipr be the variation operator that creates an offspring y from x by selecting r positions i1 , . . . , ir in [n] uniformly at random (without replacement), setting yi := 1 − xi for i ∈ {i1 , . . . , ir }, and copying yi := xi for all other bit positions i ∈ [n] \ {i1 , . . . , ir }. Using this definition, unary unbiased variation operators can be characterized as follows. Lemma 35 (Lemma 1 in [DDY16b]). For every unary unbiased variation operator (p(·|x))x∈{0,1}n there exists a family of probability distributions (rp,x )x∈{0,1}n on [0..n] such that for all x, y ∈ {0, 1}n the probability p(y|x) that (p(·|x))x∈{0,1}n samples y from x equals the probability that the routine first samples a random number r from rp,x and then obtains y by applying flipr to x. On the other hand, each such family of distributions (rp,x )x∈{0,1}n on [0..n] induces a unary unbiased variation operator. From this characterization, we easily see that neither the contiguous hyper-mutation operator used in artificial immune systems, nor the asymmetric nor the position-dependent mutation operators regarded in [JS10] and [CLY11, DDK15a], respectively, are unbiased. 2-ary operators, also called binary operators, are often referred to as crossover operators. A prime example for a binary unbiased variation operator is uniform crossover. Given two search points x and y, the uniform crossover operator creates an offspring z from x and y by choosing independently for each index i ∈ [n] the entry zi ∈ {xi , yi } uniformly at random. In contrast, the standard one-point crossover operator—which, given two search points x, y ∈ {0, 1}n picks uniformly at random an index k ∈ [n] and outputs from x and y one or both of the two offspring x0 := x1 . . . xk yk+1 . . . yn and y 0 := y1 . . . yk xk+1 . . . xn —is not permutation-invariant, and therefore not an unbiased operator. 29 C. Doerr Survey Article Black-Box Complexity Figure 6: In the k-ary unbiased black-box model, the algorithms can store the full query history. For every already evaluated search point x the algorithm has access to the absolute function value f (x) ∈ R. The distributions D from which new solution candidates are sampled have to be unbiased. They can depend on up to k previously evaluated solution candidates. Some works refer to the unbiased black-box model allowing variation operators of arbitrary arity as the ∗-ary unbiased black-box model. Black-box complexities in the ∗-ary unbiased black-box model are of the same asymptotic order as those in the unrestricted model, cf. [RV11] for a detailed discussion. The ∗-ary unbiased black-box model plays therefore only a marginal role in the black-box complexity literature. We therefore ignore it here in this chapter. 6.2 The Unbiased Black-Box Model for Pseudo-Boolean Optimization With Definition 32 and its characterizations at hand, we can now introduce the unbiased blackbox models. The k-ary unbiased black-box model covers all algorithms that follow the blueprint of Algorithm 5. Figure 6.2 illustrates these algorithms. As in previous sections, the k-ary unbiased blackbox complexity of some class of functions F is the complexity of F with respect to all k-ary unbiased black-box algorithms. Algorithm 5: Scheme of a k-ary unbiased black-box algorithm 1 2 3 4 Initialization: Sample x(0) ∈ {0, 1}n uniformly at random and query f (x(0) ); Optimization: for t = 1, 2, 3, . . . do  Depending on f (x(0) ), . . . , f (x(t−1) ) choose up to k indices i1 , . . . , ik ∈ [0..t − 1] and a k-ary unbiased distribution (D(· | y (1) , . . . , y (k) ))y(1) ,...,y(k) ∈{0,1}n ; Sample x(t) according to D(· | x(i1 ) , . . . , x(ik ) ) and query f (x(t) ); As Figure 6.2 indicates, it is important to note, that in line 3 of Algorithm 5, the k selected previously evaluated search points x(i1 ) , . . . , x(ik ) do not necessarily have to be the k immediately previously queried ones. That is, the algorithm can store and is allowed to choose from all previously sampled search points. Note further that for all k ≤ `, each k-ary unbiased black-box algorithm is contained in the `-ary unbiased black-box model. This is due to the fact that we do not require the indices to be pairwise distinct. The unary unbiased black-box model captures most of the commonly used mutation-based algorithms like (µ + λ) and (µ, λ) EAs, Simulated Annealing, the Metropolis algorithm, and Randomized Local Search. The binary unbiased model subsumes many traditional genetic algorithms, such as (µ + λ) and (µ, λ) GAs using uniform crossover. As we shall discuss in Section 9, the (1 + (λ, λ)) GA introduced in [DDE15] is also binary unbiased. As a word of warning, we note that in [Sud13] and [Wit13] lower bounds are proven for what the authors call mutation-based algorithms. Their definitions are more restrictive than what Algorithm 5 proposes. The lower bounds proven in [Sud13, Wit13] do therefore not (immediately) apply to the unary unbiased black-box model. A comparison of Theorem 12 from [Sud13] and Theorem 3.1(5) 30 C. Doerr Survey Article Black-Box Complexity in [Wit13] with Theorem 9 from [DDY16b] shows that there can be substantial differences (in this case, a multiplicative factor ≈ e in the lower bound for the complexity of OneMax with respect to all mutation-based and all unary unbiased black-box algorithms, respectively). One of the main differences between the different models is that in [Sud13, Wit13] only algorithms using standard bit mutation are considered. This definition excludes algorithms like RLS for which the radius r fed into the flipr variation operator is one deterministically and thus not sampled from a binomial distribution Bin(n, p). When using the term “mutation-based algorithms”, we should therefore always make precise which algorithmic framework we refer to. Here in this chapter, we will exclusively refer to the unary unbiased black-box algorithms defined via Algorithm 5. 6.3 Existing Results for Pseudo-Boolean Problems We survey existing bounds for the unbiased black-box complexity of several classical benchmark functions. As in previous sections, we proceed by function class, and not in historical order. 6.3.1 Functions with Unique Global Optimum As discussed in Section 2.3.1, the unrestricted black-box complexity of every function class F = {f } containing only one function f is one, certified by the algorithm that simply queries a point x ∈ arg max f in the first step. The situation is different in the unbiased black-box model, as the following theorem reveals. Theorem 36 (Theorem 6 in [LW10]). Let f : {0, 1}n → R be a function that has a single global optimum (i.e., in the case of maximization, the size of the set arg max f is one). The unary unbiased black-box complexity of f is of order at least n log n. Theorem 36 gives a Ω(n log n) lower bound for the unary unbiased black-box complexity of several standard benchmark functions, such as OneMax, LeadingOnes, etc. We shall see below that for some of these classes, including OneMax, this bound is tight, since it is met by different unary unbiased heuristics, such as the (1 + 1) EA or RLS. For other classes, including LeadingOnes, the lower bound can be improved through problem-specific arguments. The proof of Theorem 36 uses multiplicative drift analysis. To this end, the potential P (t) of an algorithm at time t is defined as the smallest Hamming distance of any of the previously queried search points x(1) , . . . , x(t) to the unique global optimum z or its bit-wise complement z̄. The algorithm has identified z (or its complement) if and only if P (t) = 0. The distance to z̄ needs to be regarded as the algorithm that first identifies z̄ and then flips all bits obtains z from z̄ in only one additional query. As we have discussed for jump in Section 3.7, for some functions it can be substantially easier to identify z̄ than to identify z itself. This is true in particular if there are paths leading to z̄ such as in the original jump functions f`,z discussed in Section 3.7.3. The key step in the proof of Theorem 36 is to show that in one iteration P (t) decreases by at most 200P (t)/n, in expectation, provided that P (t) is between c log log n (for some positive constant c > 0) and n/5. Put differently, in this case, E[P (t) − P (t + 1) | P (t)] ≤ δP (t) for δ := 200/n. It is furthermore shown that the probability to make very large gains in potential is very small. These two statements allow the application of a multiplicative drift theorem, which bounds the total expected optimization time by Ω((log(n/10) − log log(n))/δ) = Ω(n log n), provided that the algorithm reaches a state t with P (t) ∈ (n/10, n/5]. A short proof that every unary unbiased black-box algorithm reaches such a state with probability 1 − e−Ω(n) then concludes the proof of Theorem 36. 6.3.2 OneMax The unary unbiased black-box complexity of OneMax. Being a unimodal function, the lower bound of Theorem 36 certainly applies to OneMax, thus showing that no unary unbiased black-box optimization can optimize OneMax faster than in expected time Ω(n log n). This bound is attained by several classical heuristics such as Randomized Local Search (RLS), the (1+1) Evolutionary Algorithm (EA), and others. While the (1+1) EA has an expected optimization time of (1±o(1))en ln(n) [DFW10, 31 C. Doerr Survey Article Black-Box Complexity Sud13], that of RLS is only (1 ± o(1))n ln(n). More precisely, it is n ln(n/2) + γn ± o(1) [DD16], where γ ≈ 0.5772156649 . . . is the Euler-Mascheroni constant. The unary unbiased black-box complexity of √ OneMax is just slightly smaller than this term. It had been slightly improved by an additive n log n term in [dPdLDD15] through iterated initial sampling. In [DDY16b] the following very precise bound for the unary unbiased black-box complexity of OneMax is shown. It is smaller than the expected running time of RLS by an additive term that is between 0.138n ± o(n) and 0.151n ± o(n). It is also proven in [DDY16b] that a variant of RLS that uses fitness-dependent neighborhood structures attains this optimal bound, up to additive o(n) lower order terms. Theorem 37 (Theorem 9 in [DDY16b]). The unary unbiased black-box complexity of OneMax is n ln(n) − cn ± o(n) for a constant c between 0.2539 and 0.2665. The binary unbiased black-box complexity of OneMax. When Lehre and Witt initially defined the unbiased black-box model, they conjectured that also the binary black-box complexity of OneMax was Ω(n log n) [personal communication of Lehre in 2010]. In light of understanding the role and the usefulness of crossover in black-box optimization, such a bound would have indicated that crossover cannot be beneficial for simple hill climbing tasks. Given that in 2010 all results seemed to indicate that it is at least very difficult, if not impossible, to rigorously prove advantages of crossover for problems with smooth fitness landscapes, this conjecture came along very naturally. It was, however, soon refuted. In [DJK+ 11], a binary unbiased algorithm is presented that achieves linear expected running time on OneMax. Theorem 38 (Theorem 9 in [DJK+ 11]). The binary unbiased black-box complexity of OneMax and that of any other monotone function is at most linear in the problem dimension n. This bound is attained by the algorithm that keeps in the memory two strings x and y that agree in those positions for which the optimal entry has been identified already, and which differ in all other positions. In every iteration, the algorithm flips a fair random coin and, depending on the outcome of this coin flip, flips exactly one bit in x or one bit in y. The bit to be flipped is chosen uniformly at random from those bits in which x and y disagree. The so-created offspring replaces its parent if and only if its function value is larger. In this case, the Hamming distance of x and y reduces by one. Since the probability to choose the right parent equals 1/2, it is not difficult to show that, with high probability, for all constants ε > 0, this algorithm has optimized OneMax after at most (2 + ε)n iterations. Together with Lemma 8, this proves Theorem 38. A drawback of this algorithm is that it is very problem-specific, and it has been an open question whether or not a “natural” binary evolutionary algorithm can achieve an o(n log n) (or better) expected running time on OneMax. This question was affirmatively answered in [DDE15] and [DD15a], as we shall discuss in Section 9. Whether or not the linear bound of Theorem 38 is tight remains an open problem. In general, proving lower bounds for the unbiased black-box models of arities larger than one remains one of the biggest challenges in black-box complexity theory. Due to the greatly enlarged computational power of black-box algorithms using higher arity operators, proving lower bounds in these models seems to be significantly harder than in the unary unbiased model. As a matter of fact, the best lower bound that we have for the binary unbiased black-box complexity of OneMax is the Ω(n/ log n) one stated in Theorem 12, and not even constant-factor improvements of this bound exist. The k-ary unbiased black-box complexity of OneMax. In [DJK+ 11], a general bound for the k-ary unbiased black-box complexity of OneMax of order n/ log k had been presented (cf. Theorem 9 in [DJK+ 11]). This bound has been improved in [DW14c]. Theorem 39 (Theorem 3 in [DW14c]). For every 2 ≤ k ≤ log n, the k-ary unbiased black-box complexity of OneMax is of order at most n/k. For k ≥ log n, it is Θ(n/ log n). Note that for k ≥ log n, the lower bound in Theorem 39 follows from the Ω(n/ log n) unrestricted black-box complexity of OneMax discussed in Theorem 12. The main idea to achieve the results of Theorem 39 can be easily described. For a given k, the bit string is split into blocks of size k − 2. This has to be done in an unbiased way, so that the “blocks” 32 C. Doerr Survey Article Black-Box Complexity are not consecutive bit positions, but some random k − 2 not previously optimized ones. Similarly to the binary case, two reference strings x and y are used to encode which k − 2 bit positions are currently under investigation; namely the k − 2 bits in which x and y disagree. By the same encoding, two other strings x0 and y 0 store which bits have been optimized already, and which ones have not been investigated so far. To optimize the k − 2 bits in which x and y differ, the derandomized version of the result of Erdős and Rényi (Theorem 13) is used. Applied to our context, this result states that there exists a sequence of Θ(k/ log k) queries which uniquely determines the entries in the k − 2 positions. Since Θ(n/k) such blocks need to be optimized, the claimed total expected optimization time of Θ(n/ log k) follows. Some technical difficulties need to be overcome to implement this strategy in an unbiased way. To this end, in [DW14c] a generally applicable encoding strategy is presented that with k-ary unbiased variation operators simulates a memory of 2k−2 bits that can be accessed in an unrestricted fashion. 6.3.3 LeadingOnes The unary unbiased black-box complexity of LeadingOnes. Being a classic benchmark problem, non-surprisingly, Lehre and Witt presented already in [LW12] a first bound for the unbiased back-box complexity of LeadingOnes. Theorem 40 (Theorem 2 in [LW12]). The unary unbiased black-box complexity of LeadingOnes is Θ(n2 ). Theorem 40 can be proven by drift analysis. To this end, in [LW12] a potential function is defined   that maps the state of the search process at time t (i.e., the sequence { x(1) , f (x(1) ) , . . . , x(t) , f (x(t) ) } of the pairs of search points evaluated so far and their respective function values) to the largest number of initial ones and initial zeros in any of the t + 1 strings x(1) , . . . , x(t) . It is then shown that a given a potential k cannot increase in one iteration by more than an additive 4/(k + 1) term, in expectation, provided that k is at least n/2. Since with probability at least 1 − e−Ω(n) any unary unbiased black-box algorithm reaches a state in which the potential is between n/2 and 3n/4, and since from this state a total potential of at least n/4 must be gained, the claimed Ω(n2 ) bound follows from a variant of the additive drift theorem. More precisely, using these bounds, the additive drift theorem allows shows that the total optimization time of any unary unbiased black-box algorithm is  at least (n/4)/ 4/(n/2)) = Ω(n2 ). The binary unbiased black-box complexity of LeadingOnes. Similarly to the case of OneMax, the binary unbiased black-box complexity of LeadingOnes is much smaller than its unary one. Theorem 41 (Theorem 14 in [DJK+ 11]). The binary unbiased black-box complexity of LeadingOnes is O(n log n). The algorithm achieving this bound borrows its main idea from the binary unbiased one used to optimize OneMax in linear time, which we have described after Theorem 38. We recall that the key strategy was to use two strings to encode those bits that have been optimized already. In the O(n log n) algorithm for LeadingOnes this approach is combined with a binary search for the (unique) bit position that needs to be flipped next. Such a binary search step requires O(log n) steps in expectation. Iterating it n times gives the claimed O(n log n) bound. As in the case of OneMax, it is not known whether the bound of Theorem 41 is tight. The best known lower bound is the Ω(n log log n) one of the unrestricted black-box model discussed in Theorem 21. The complexity of LeadingOnes in the unbiased black-box models of higher arity. The O(n log n) bound presented in Theorem 41 further reduces to at most O(n log(n)/ log log n) in the ternary unbiased black-box model. Theorem 42 (Theorems 2 and 3 in [DW12a]). For every k ≥ 3, the k-ary unbiased black-box complexity of LeadingOnes is of order at most n log(n)/ log log n. This bound also holds in the combined 33 C. Doerr Survey Article Black-Box Complexity k-ary unbiased ranking-based black-box model, in which instead of absolute function values the algorithm can make use only of the ranking of the search points induced by the optimization problem instance f . The algorithm that certifies the upper bound of Theorem 42 uses the additional power gained through the larger arity to parallelize the binary search of the binary unbiased algorithm described after Theorem 41. More precisely, the optimization √ process is split into phases. In each phase, the algorithm identifies the entries of up to k := O( log n) positions. It is shown that each phase takes O(k 3 / log k 2 ) steps in expectation. Since there are n/k phases, a total expected optimization time of O(nk 2 / log k 2 ) = O(n log(n)/ log log n) follows. The idea to parallelize the search for several indices was later taken up and further developed in [AAD+ 13]; where an iterative procedure with overlapping phases is used to derive the asymptotically optimal Θ(n log log n) unrestricted black-box algorithm that proves Theorem 21. It seems plausible that higher arities allow a larger degree of parallelization, but no formal proof of this intuition exists. In the context of LeadingOnes, it would be interesting to derive a lower bound for the smallest value of k such that an asymptotically optimal k-ary unbiased Θ(n log log n) blackbox algorithm for LeadingOnes exists. As a first step towards answering this question, the abovesketched encoding and sampling strategies could be applied to the algorithm presented in [AAD+ 13], to understand the smallest arity needed to implement this algorithm in an unbiased way. 6.3.4 Jump Jump functions are benchmark functions, which are observed as difficult for evolutionary approaches because of their large plateaus of constant and low fitness around the global optimum. One would expect that this is reflected in its unbiased back-box complexity, at least in the unary model. Surprisingly, this is not the case. In [DDK15b] it is shown that even extreme jump functions that reveal only the three different fitness values 0, n/2, and n have a small polynomial unary unbiased black-box complexity. That is, they can be optimized quite efficiently by unary unbiased approaches. This result indicates that efficient optimization is not necessarily restricted to problems for which the function values reveal a lot of information about the instance at hand. As discussed in Section 3.7, the literature is unanimous with respect to how to generalize the jump function defined in [DJW02] to a problem class. The results stated in the following apply to the jump function defined in (1). In the unbiased black-box model, we can assume without loss of generality that the underlying target string is the all-ones string (1, . . . , 1). That is, to simplify our notation, we drop the subscript z and assume that for every ` < n/2 we regard the function that assigns to every x ∈ {0, 1}n the function value    n, if |x|1 = n, Jump` (x) := |x|1 , if ` < |x|1 < n − `,   0, otherwise. The results in [DDK15b] cover a broad range of different combinations of jump sizes ` and arities k. Theorem 43 ([DDK15b]). The following table summarizes the known bounds for the unbiased blackbox complexity of Jump` in the different models Arity k=1 k=2 3 ≤ k ≤ log n Short Jump ` = O(n1/2−ε ) Θ(n log n) O(n) O(n/k) Long Jump ` = (1/2 − ε)n O(n2 ) O(n log n) O(n/k) Extreme Jump ` = n/2 − 1 O(n9/2 ) O(n log n) Θ(n) To discuss the bounds of Theorem 43, we proceed by problem type. Almost all proofs are rather involved, so that we sketch here only the main ideas. 34 C. Doerr Survey Article Black-Box Complexity Short jumps, i.e., ` = O(n1/2−ε ). A comparison with the bounds discussed in Section 6.3.2 shows that the above-stated bounds for the k-ary unbiased black-box complexities of short jump functions are of the same order as those for OneMax (which can be seen as a jump function with parameter ` = 0). In fact, it is shown in [DDK15b, Lemma 3] that a black-box algorithm having access to a jump function with ` = O(n1/2−ε ) can retrieve (with high probability) the true OneMax value of a search point using only a constant number of queries. The other direction is of course also true, since from the OneMax value we can compute the Jump` value without further queries. This implies that the black-box complexities of short jump functions are of the same asymptotic order as those of OneMax. Any improved bound for the k-ary unbiased black-box complexity OneMax therefore immediately carries over to short jump functions. Long jumps, i.e., ` = (1/2 − ε)n. Despite the fact that the above-mentioned Lemma 3 from [DDK15b] can probably not be directly extended to long jump functions, the bounds for arities k ≥ 3 nevertheless coincides with those of OneMax. In fact, it is shown in [DDK15b, Theorem 6] that for all ` < (1/2 − ε)n and for all k ≥ 3 the k-ary unbiased black-box complexity of Jump` is at most of the same asymptotic order than the (k − 2)-ary one of OneMax. For k > 3 this proves the bounds stated in Theorem 43. The linear bound for k = 3 follows from the case of extreme jumps. A key ingredient for the bound on the unary unbiased black-box complexity of long jump functions is a procedure that samples a number of neighbors at some fixed distance d and that studies the empirical expected function values of these neighbors to decide upon the direction in which the search for the global optimum is continued. More precisely, it uses the samples to estimate the OneMax value of the currently investigated search point. Strong concentration bounds are used to bound the probability that this approach gives an accurate estimation of the correct OneMax values. The O(n log n) bound for the binary unbiased black-box complexity of long jump functions follows from its extreme analog. Extreme jump, i.e., ` = n/2 − 1. [DDK15b] first regards the ternary unbiased black-box complexity of the extreme jump function. A strategy allowing to test individual bits is derived. Testing each bit individually in an efficient way (using the encoding strategies originally developed in [DJK+ 11] and described in Section 6.3.2 above) gives the linear bound. In the binary case, the bits cannot be tested as efficiently any more. The main idea is nevertheless to flip individual bits and to test if the flip was in a “good” or a “bad” direction. This test is done by estimating the distance to a reference string with n/2 ones. Implementing this strategy in O(n log n) queries requires to overcome a few technical difficulties imposed by the restriction to sample only from binary unbiased distributions, resulting in a rather complex bookkeeping procedure, and a rather technical 4.5 pages long proof. Finally, the polynomial unary unbiased black-box complexity of extreme jump is proven as follows. Similarly to the cases discussed above, individual bits are flipped in a current “best” solution candidate x. A sampling routine is used to estimate if the bit flip was in a “good” or a “bad” direction, i.e., if it created a string that is closer to the global optimum or its bit-wise complement than the previous one. The sampling strategy works as follows. Depending on the estimated parity of |x|1 , exactly n/2 or n/2 − 1 bits are flipped in x. The fraction of so-created offspring with function value n/2 (the only value that is “visible” apart from that of the global optimum) is recorded. This fraction depends on the distance of x to the global optimum (1, . . . , 1) or its complement (0, . . . , 0) and is slightly different for different distances. A key step in the analysis of the unary unbiased black-box complexity of extreme jump is therefore a proof that shows that a polynomial number of such samples are sufficient to determine the OneMax-value of x with sufficiently large probability. Comments on the upper bounds Theorem 43. Note that already for long jump functions, the search points having a function value of 0 form plateaus around the optimum (1, . . . , 1) and its complement (0, . . . , 0) of exponential size. For the extreme jump function, even all but a Θ(n−1/2 ) fraction of the search points form one single fitness plateau. Problem-unspecific black-box optimization techniques will therefore typically not find the optimum of long and extreme jump functions in subexponential time. Lower bound. The Ω(n log n) lower bound in Theorem 43 follows from the more general result discussed in Theorem 5 and the Ω(n log n) bound for OneMax in the unary unbiased black-box model, 35 C. Doerr Survey Article Black-Box Complexity which we have discussed in Section 6.3.2. Note also that Theorem 5, together with the Ω(n/ log n) unrestricted black-box complexity of OneMax implies a lower bound for Jump` of the same asymptotic order (for all values of `). The linear lower bound for extreme jump can be easily proven by the information-theoretic arguments presented in Theorem 4. Intuitively, the algorithm needs to learn a linear number of bits, while it receives only a constant number per function evaluation. Insights from these bounds and open questions. The proof sketches provided above highlight that one of the key novelties presented in [DDK15b] are the sampling strategies that are used to estimate the OneMax-values of a current string of interest. The idea to accumulate some statistical information about the fitness landscape could be an interesting concept for the design of novel heuristics; in particular for optimization in the presence of noisy function evaluations or for dynamic problems, which change over time. 6.3.5 Number Partition Number partition is one of the best-known NP-hard problems. Given a set S ⊂ Nn of n positive integers, this partition problem asks to decide whether or not it is possible to split S in two disjoint subsets such that the sum of the integers in these two subsets is identical, i.e., whether or not two P P disjoint subsets S1 and S2 of S with S1 ∪S2 = S and s∈S1 s = s∈S2 s exist. The optimization version P of partition asks to split S into two disjoint subsets such that the absolute discrepancy s∈S1 s = P is as small as possible. s s∈S2 In [DDK14] a subclass of partition is studied in which the integers in S are pairwise different. The problem remains NP-hard under this assumption. It is thus unlikely that it can be solved efficiently. For two different formulations of this problem (using a signed and an unsigned function assigning to P P each partition S1 , S2 of S the discrepancy s∈S1 s = s∈S2 s or the absolute value of this expression, respectively) it is shown that the unary unbiased black-box complexity of this subclass is nevertheless of a small polynomial order. More precisely, it is shown that there are unary unbiased black-box algorithms that need only O(n log n) function evaluations to optimize any Partition6= instance. The proof techniques are very similar to the ones presented in Section 2.4: the algorithm achieving the O(n log n) expected optimization time first uses O(n log n) steps to learn the problem instance at hand. After some (possibly—and probably—non-polynomial-time) offline computation of an optimal solution for this instance, this optimum is then created via an additional O(n log n) function evaluations, needed to move the integers of the partition instance to the right subset. Learning and moving the bits can be done in linear time in the unrestricted model. The log n factor stems from the fact that here in this unary unbiased model, in every iteration a random bit is moved, so that a coupon collector process results in the logarithmic overhead. This result and those for the different jump versions described in Section 6.3.4 show that the unary unbiased black-box complexity can be much smaller than the typical performance of mutation-only black-box heuristics. This indicates that the unary unbiased black-box model does not always give a good estimation for the difficulty of a problem when optimized by mutation-based algorithms. As we shall discuss in Section 7, a possible direction to obtain more meaningful results can be to restrict the class of algorithms even further, e.g., through bounds on the memory size or the selection operators. 6.3.6 Minimum Spanning Trees Having a formulation over the search space {0, 1}m , the minimum spanning tree problem regarded in Section 3.8.1 can be directly studied in the unbiased black-box model proposed by Lehre and Witt. The following theorem summarizes the bounds proven in [DKLW13] for this problem. We see here that [DKLW13] also studied the black-box complexity of a model that combines the restrictions imposed by the ranking-based and the unbiased black-box models. We will discuss this model in Section 7 but, for the sake of brevity, state the bounds already for this combined model. Theorem 44 (Theorem 10 in [DKLW13]). The unary unbiased black-box complexity of the MST problem is O(mn log(m/n)) if there are no duplicate weights and O(mn log n) if there are. The rankingbased unary unbiased of the MST problem black-box complexity is O(mn log n). Its ranking-based 36 C. Doerr Survey Article Black-Box Complexity binary unbiased black box-complexity is O(m log n) and its ranking-based 3-ary unbiased black-box complexity is O(m). For every k, the k-ary unbiased black-box complexity of MST for m edges is at least as large as the k-ary unbiased black-box complexity of OneMaxm . As in the unrestricted case of Theorem 23, the upper bounds in Theorem 44 are obtained by modifying Kruskal’s algorithm to fit the black-box setting at hand. For the lower bound, the path P on m + 1 vertices and unit edge weights shows that OneMaxm is a sub-problem of the MST problem. More precisely, for all bit strings x ∈ {0, 1}m , the function value f (x) = (OneMaxm (x), m + 1 − OneMaxm (x)) of the associated MST fitness function reveals the OneMax-value of x. 6.3.7 Other Results Motivated to introduce a class of functions for which the unary unbiased black-box complexity is Θ(2m ), for some parameter m that can be scaled between 1 and n, Lehre and Witt introduced in [LW12] the following function. OM-Needle : {0, 1}n → [0..n], x 7→ n−m X i=1 xi + n Y xi . (2) i=1 It is easily seen that this function has its unique global optimum in the all-ones string (1, . . . , 1). All other search points whose first n − m entries are equal to one are located on a plateau of function value n − m. In the unbiased model, this part is thus similar to the Needle functions discussed in Section 3.1. Lehre and Witt show that for 0 ≤ m ≤ n the unary unbiased black-box complexity of this function is at least 2m−2 [LW12, Theorem 3]. Note that this function is similar in flavor to the jump version proposed in [Jan15] (cf. Section 3.7.3). The points in 6.4 Beyond Pseudo-Boolean Optimization: Unbiased Black-Box Models for Other Search Spaces In this section we discuss an extension of the pseudo-Boolean unbiased black-box model by Lehre and Witt [LW12] to more general search spaces. To this end, we first recall from Definition 32 that the unbiased model was defined through a set of invariances that must be satisfied by the probability distributions from which unbiased algorithms sample their solution candidates. It is therefore quite natural to first generalize the notion of an unbiased operator in the following way. Definition 45 (Definition 1 in [DKLW13]). Let k ∈ N, let S be some arbitrary set, and let G be a set of bijections on S that forms a group, i.e., a set of one-to-one maps g : S → S that is closed under composition (· ◦ ·) and under inversion (·)−1 . We call G the set of invariances. A k-ary  G-unbiased distribution is a family of probability distributions D(· | y 1 , . . . , y k ) y1 ,...,yk ∈S over S such that for all inputs y 1 , . . . , y k ∈ S the condition ∀x ∈ S ∀g ∈ G : D(x | y 1 , . . . , y k ) = D(g(x) | g(y 1 ), . . . , g(y k )) holds. An operator sampling from a k-ary G-unbiased distribution is called a k-ary G-unbiased variation operator. For S := {0, 1}n and for G being the set of Hamming-automorphisms, it is not difficult to verify that Definition 45 extends Definition 32. A k-ary G-unbiased black-box algorithm is one that samples all search points from k-ary G-unbiased variation operators. In [RV11], Rowe and Vose give the following very general, but rather indirect, definition of unbiased distributions. Definition 46 (Definition 2 in [RV11]). Let F be a class of functions from search space S to some set Y . We say that a one-to-one map α : S → S preserves F if for all f ∈ F it holds that f ◦ α ∈ F. Let Π(F) be the class of all such F-preserving bijections α. A k-ary generalized unbiased distribution (for F) is a k-ary Π(F)-unbiased distribution. 37 C. Doerr Survey Article Black-Box Complexity It is argued in [RV11] that Π(F) indeed forms a group, so that Definition 46 satisfies the requirements of Definition 45. To apply the framework of Definition 46, one has to make precise the set of invariances covered by the class Π(F). This can be quite straightforward in some cases [RV11] but may require some more effort in others [DKLW13]. In particular, it is often inconvenient to define the whole family of unbiased distributions from which a given variation operator originates. Luckily, in many cases this effort can be considerably reduced to proving only the unbiasedness of the variation operator itself. The following theorem demonstrates this for the case S = [n]n−1 , which is used, for example in the single-source shortest path problem regarded in the next subsection. In this case, condition (ii) states that it suffices to show the k-ary G-unbiasedness of the distribution D~z , without making precise the whole family of distributions associated to it. Theorem 47. Let G be a set of invariances, i.e., a set of permutations of the search space S = [n]n−1 that form a group. Let k ∈ N, and ~z = (z 1 , . . . , z k ) ∈ S k be a k-tuple of search points. Let G0 := {g ∈ G | g(z i ) = z i for all i ∈ [k]} be the set of all invariances that leave z 1 , . . . , z k fixed. Then for any probability distribution D~z on [n]n−1 , the following two statements are equivalent. (i) There exists a k-ary G-unbiased distribution (D(· | ~y ))~y∈S k on S such that D~z = D(· | ~z). (ii) For every g ∈ G0 and for all x ∈ S it holds that D~z (x) = D~z (g(x)). 6.4.1 Alternative Extensions of the Unbiased Black-Box Model for the SSSP problem As discussed in Section 3.8.2, several formulation of the single-source shortest path problem (SSSP) coexist. In the unbiased black-box setting, the multi-criteria formulation is not very meaningful, as the function values explicitly distinguish between the vertices, so that treating them in an unbiased fashion seems ill-natured. For this reason, in [DKLW13] only the single-objective formulation is investigated in the unbiased black-box model. Note that for this formulation, the unbiased black-box model for pseudo-Boolean functions needs to be extended to the search space S[2..n] . [DKLW13] discusses three different extensions: (a) a structure preserving unbiased model in which, intuitively speaking, the operators do not regard the labels of different nodes, but only their local structure (e.g., the size of their neighborhoods), (b) the generalized unbiased model proposed in [RV11] (this model follows the approach presented in Section 6.4 above), and (c) a redirecting unbiased black-box model in which, intuitively, a node may choose to change its predecessor in the shortest path tree but if it decides to do so, then all possible predecessors must be equally likely to be chosen. Whereas all three notions a priori seem to capture different aspects of what unbiasedness in the SSSP problem could mean, two of them are shown to be too powerful. More precisely, it is shown that already the unary structure preserving unbiased black-box complexity of SSSP as well as its unary generalized unbiased black-box complexity are almost identical to the unrestricted one. The three models are proven to differ by at most one query in [DKLW13, Theorem 25 and Corollary 32]. It is then shown that the redirecting unbiased black-box model yields more meaningful black-box complexities. Theorem 48 (Corollary 28, Theorem 29 and Theorem 30 in [DKLW13]). The unary ranking-based redirecting unbiased black-box complexity of SSSP is O(n3 ). Its binary ranking-based redirecting unbiased black-box complexity is O(n2 log n). For all k ∈ N, the k-ary redirecting unbiased black-box complexity of SSSP is Ω(n2 ). 38 C. Doerr Survey Article Black-Box Complexity The unary bound is obtained by a variant of RLS which redirects in every step one randomly chosen node to a random predecessor. For the binary bound, the problem instance is learned in a 2-phase step. An optimal solution is then created by an imitation of Dijkstra’s algorithm. For the lower bound, drift analysis is used to prove that every redirecting unbiased algorithm needs Ω(n2 ) function evaluations to reconstruct a given path on n vertices. 7 Combined Black-Box Complexity Models The black-box models discussed in previous sections study either the complexity of a problem with respect to all black-box algorithms (in the unrestricted model) or they restrict the class of algorithms with respect to one particular feature of common optimization heuristics, such as the size of their memory, their selection behavior, or their sampling strategies. As we have seen, many classical blackbox optimization algorithms are members of several of these classes. At the same time, a non-negligible number of the upper bounds stated in the previous sections can, to date, only be certified by algorithms that satisfy an individual restriction, but clearly violate other requirements that are not controlled by the respective model. In the unbiased black-box model, for example, several of the upper bounds are obtained by algorithms that make use of a rather large memory size. It is therefore natural to ask if and how the black-box complexity of a problem increases if two or more of the different restrictions proposed in the previous sections are combined into a new black-box model. This is the focus of this section, which surveys results obtained in such combined black-box complexity models. 7.1 Unbiased Ranking-Based Black-Box Complexity Already some of the very early works on the unbiased black-box model regarded a combination with the ranking-based model. In fact, the binary unbiased algorithm from [DJK+ 11], which solves OneMax with Θ(n) queries on average, only uses comparisons, and does not make use of knowing absolute fitness values. It was shown in [DW14b] that also the other upper bounds for the k-ary black-box complexity of OneMax proven in [DJK+ 11] hold also in the ranking-based version of the k-ary unbiased black-box model. Theorem 49 (Theorem 6 and Lemma 7 in [DW14b]). The unary unbiased ranking-based black-box complexity of OneMaxn is Θ(n log n). For constant k, the k-ary unbiased ranking-based black-box complexity of OneMaxn and that of every strictly monotone function is at most 4n−5. For 2 ≤ k ≤ n, the k-ary unbiased ranking-based black-box complexity of OneMaxn is O(n/ log k). In light of Theorem 39, it seems plausible that the upper bounds for the case 2 ≤ k ≤ n can be reduced to O(n/k) but we are not aware of any result proving such a claim. Also the binary unbiased algorithm achieving an expected O(n log n) optimization time on LeadingOnes uses only comparisons. Theorem 50 (follows from the proof of Theorem 14 in [DJK+ 11], cf. Theorem 41). The binary unbiased ranking-based black-box complexity of LeadingOnes is O(n log n). For the ternary black-box complexity we have mentioned already in Theorem 42 that the O(n log(n)/ log log n) bound also holds in the ranking-based version of the ternary unbiased blackbox model. Also for the two combinatorial problems MST and SSSP it has been mentioned already in Theorems 44 and 48 that the bounds hold also in the models in which we require the algorithms to base all decisions only on the ranking of previously evaluated search points, and not on absolute function values. 7.2 Parallel Black-Box Complexity The (unary) unbiased black-box model was also the starting point for the authors of [BLS14], who introduce a black-box model to investigate the effects of a parallel optimization. Their model can be 39 C. Doerr Survey Article Black-Box Complexity seen as a unary unbiased (∞ + λ) memory-restricted black-box model. More precisely, their model covers all algorithms following the scheme of Algorithm 6. The model covers (µ + λ) and (µ, λ) EAs, cellular EAs and unary unbiased EAs working in the island model. The restriction to unary unbiased variation operators can of course be relaxed to obtain general models for λ-parallel k-ary unbiased black-box algorithms. We see that Algorithm 6 forces the algorithms to query λ new solution candidates in every iteration. Thus, intuitively, for every two positive integers k and ` with k/` ∈ N and for all problem classes F, the `-parallel unary unbiased black-box complexity of F is at most as large as its k-parallel unary unbiased one. Algorithm 6: A blueprint for λ-parallel unary unbiased black-box algorithms for the optimization of an unknown function f : S → R 1 2 3 4 5 6 7 Initialization:  for i = 1, . . . , µ do Sample x(i,0) uniformly at random from S and query f x(i,0) ;   I ← {f x(1,0) , . . . , f x(λ,0) }; Optimization: for t = 1, 2, 3, . . . do for i = 1, . . . , λ do Depending only on the multiset I choose a pair of indices (j, `) ∈ [λ] × [0..t − 1]; Depending only on the multiset I choose a unary unbiased probability distribution  D(i,t) (·) on S, sample x(i,t) ← D(i,t) (x(j,`) ) and query f x(i,t) ; I ← I ∪ {f x(1,t) , . . . , f x(λ,t) };  8  The following bounds for the λ-parallel unary unbiased black-box complexity are known. Theorem 51 (Theorems 1, 3 and 4 in [BLS14]). The λ-parallel unary unbiased black-box complexity  λn + n2 . It is of order at most λn + n2 . of LeadingOnes is Ω max{1,log(λ/n)} √ For any λ ≤ e n , the λ-parallel unary unbiased black-box complexity of any function having a λn + n log n . This bound is asymptotically tight for OneMax. unique global optimum is Ω log(λ) For LeadingOnes, the upper bound is attained by a (1 + λ) EA investigated in [LS14]. The lower bound is shown by means of drift analysis, building upon the arguments used in [LW12] to prove Theorem 40. λn For OneMax, a (1+λ) EA with fitness-dependent mutation rates is shown to achieve the O log(λ) +  n log n expected optimization time in [BLS14, Theorem 4], confer Chapter ?? [link to the chapter on non-static parameter choices will be added] for details. The lower bound for the λ-parallel unary unbiased black-box complexity of functions having a unique global optimum uses additive drift analysis. The proof is similar to the proof of Theorem 36 in [LW12], but requires a very precise tail bound for hypergeometric variables (Lemma 2 in [BLS14]). 7.3 Distributed Black-Box Complexity To study the effects of the migration topology on the efficiency of distributed evolutionary algorithms, the λ-parallel unary unbiased black-box model was extended in [BLS15] to a distributed version, in which the islands exchange their accumulated information along a given graph topology. Commonly employed topologies are the complete graph (in which all nodes exchange information with each other), the ring topology, the grid of equal side lengths, and the torus. [BLS15] presents an unrestricted and a unary unbiased version of the distributed black-box model. In this context, it is interesting to study how the black-box complexity of a problem increases with sparser migration topologies or with the infrequency of migration. The model of [BLS15] allows all nodes to share all the information that they have accumulated so far. Another interesting extension of the distributed model would be to study the effects of bounding the amount of information that can be shared in any migration phase. We do not present the model nor all results obtained in [BLS15] in detail. The main result which 40 C. Doerr Survey Article Black-Box Complexity is interpretable and comparable to the others presented in this book chapter is summarized by the following theorem. Theorem 52 (Table 1 in [BLS15]). The λ-distributed unary unbiased black-box complexity of the class of all unimodal functions with Θ(n) different function values satisfies the following bounds: Upper Bound Lower Bound Ring Topology O(λn3/2 + n2 ) Ω(λn + λ2/3 n5/3 + n2 ) Grid/Torus O(λn4/3 + n2 ) Ω(λn + λ3/4 n3/2 + n2 ) Complete Topology Θ(λn + n2 ) The lower bound for the grid applies to arbitrary side lengths, while the upper bound holds for the grid √ with λ islands in each of the two dimensions. The upper bounds in Theorem 52 are achieved by a parallel (1+1) EA, in which every node migrates its complete information after every round. The lower bounds are shown to hold already for a sub-problem called “random short path”, which is a collection of problems which all have a global optimum in some point with exactly n/2 ones. A short path of Hamming-1 neighbors leads to this optimum. The paths start at the all-ones string. Search points that do not lie on the path lead the optimization process towards the all-ones string; their objective values equal the number of ones in the string. 7.4 Elitist Black-Box Complexity One of the most relevant questions in black-box optimization is how to avoid getting stuck in local optima. Essentially, two strategies have been developed. Non-elitist selection. The first idea is to allow the heuristics to direct their search towards search points that are, a priori, less favorable than the current-best solutions in the memory. This can be achieved, for example, by accepting into the memory (“population”) search points of function values that are smaller than the current best solutions. We refer to such selection procedures as non-elitist selection. Non-elitist selection is used, for example, in the Metropolis algorithm [MRR+ 53], Simulated Annealing [KGV83], and, more recently, in the biology-inspired “Strong Selection, Weak Mutation” framework [PPHST17]. Global Sampling. A different strategy to overcome local optima is global sampling. This approach is used, most notably, by evolutionary and genetic algorithms, but also by swarm optimizers like ant colony optimization techniques [DS04] and estimation-of-distribution algorithms (EDAs, cf. Chapter ?? of this book [link to the chapter on EDAs will be added]). The underlying idea of global sampling is to select new solution candidates not only locally in some pre-defined neighborhood of the current population, but to reserve some positive probability to sample far away from these solutions. Very often, a truly global sampling operation is used, in which every point x ∈ S has a positive probability of being sampled. This probability typically decreases with increasing distance to the current-best solutions. Standard bit mutation with bit flip probabilities p < 1/2 is such a global sampling strategy. Global sampling and non-elitist selection can certainly be combined, and several attempts in this direction have been made. The predominant selection strategy used in combination with global sampling, however, is truncation selection. Truncation selection is a natural implementation of Darwin’s “survival of the fittest” paradigm in an optimization context: given a collection P of search points, and a population size µ, truncation selection chooses from P the µ search points of largest function values and discards the other, breaking ties arbitrarily or according to some rule such as favoring offspring over parents or favoring geno- or phenotypic diversity. To understand the influence that this elitist selection behavior has on the performance of blackbox heuristics, the elitist black-box model has been introduced in [DL15a] (the journal version is to appear as [DL17b]). The elitist black-box model combines features of the memory-restricted and the ranking-based black-box models with an enforced truncation selection. More precisely, the (µ + λ) elitist black-box model covers all algorithms that follow the pseudo-code in Algorithm 7. We use here an adaptive initialization phase. A non-adaptive version as in the (µ + λ) memory-restricted black-box model can also be considered. This and other subtleties like the tie-breaking rules for search points of 41 C. Doerr Survey Article Black-Box Complexity Figure 7: A (µ + λ) elitist black-box algorithm stores the µ previously evaluated search points of largest function values (ties broken arbitrarily or according to some specified rule) and the ranking of these points induced by f . Based on this information, it decides upon a strategy from which the next λ search points are sampled. From the µ + λ parent and offspring solutions, those µ search points that have the largest function values form the population for the next iteration. equal function values can result in different black-box complexities. It is therefore important to make very precise the model with respect to which a bound is claimed or shown to hold. Algorithm 7: The (µ + λ) elitist black-box algorithm for maximizing an unknown function f :S→R 1 2 3 4 5 6 7 8 9 Initialization: X ← ∅; for i = 1, . . . , µ do Depending only on the multiset X and the ranking ρ(X, f ) of X induced by f , choose a probability distribution D(i) over S and sample from it x(i) ; Set X ← X ∪ {x(i) } and query the ranking ρ(X, f ) of X induced by f ; Optimization: for t = 1, 2, 3, . . . do Depending only on the multiset X and the ranking ρ(X, f ) of X induced by f choose a probability distribution D(t) on S λ and sample from it y (1) , . . . , y (λ) ∈ S; Set X ← X ∪ {y (1) , . . . , y (λ) } and query the ranking ρ(X, f ) of X induced by f ; for i = 1, . . . , λ do Select x ∈ arg min X and update X ← X \ {x}; The elitist black-box model models in particular all (µ + λ) EAs, RLS, and other hill climbers. It does not cover algorithms using non-elitist selection rules like Boltzmann selection, tournament selection, or fitness-proportional selection. Figure 7.4 illustrates the (µ+λ) elitist black-box model. As a seemingly subtle, but possible influential difference to the parallel black-box complexities introduced in Section 7.2, note that in the elitist black-box model the offspring sampled in the optimization phase do not need to be independent of each other. If, for example, an offspring x is created by crossover, in the (µ+λ) elitist black-box model with λ ≥ 2 we allow to also create another offspring y from the same parents whose entries yi in those positions i in which the parents do not agree equals 1 − xi . These two offspring are obviously not independent of each other. It is nevertheless required in the (µ + λ) elitist black-box model that the λ offspring are created before any evaluation of the offspring happens. That is, the k-th offspring may not depend on the ranking or fitness of the first k − 1 offspring. Combining already several features of previous black-box model, the elitist black-box model can be further restricted to cover only those elitist black-box algorithms that sample from unbiased distributions. For this unbiased elitist black-box model, we require that the distribution p(t) in line 7 of Algorithm 7 is unbiased (in the sense of Section 6). Some of the results mentioned below also hold for this more restrictive class. 42 C. Doerr 7.4.1 Survey Article Black-Box Complexity (Non-)Applicability of Yao’s Minimax Principle An important difficulty in the analysis of elitist black-box complexities is the fact that Yao’s minimax principle (Theorem 3) cannot be directly applied to the elitist black-box model, since in this model the previously exploited fact that randomized algorithms are convex combinations of deterministic ones does not apply, cf. [DL17b, Section 2.2] for an illustrated discussion. As discussed in the previous sections, Yao’s minimax principle is the most important tool for proving lower bounds in the black-box complexity context, and we can hardly do without. A natural workaround that allows to nevertheless employ this technique is to extend the collection A of elitist black-box algorithms to some superset A0 in which every randomized algorithm can be expressed as a probability distribution over deterministic ones. A lower bound shown for this broader class A0 trivially applies to all elitist black-box algorithms. Finding extensions A0 that do not decrease the lower bounds by too much is the main difficulty to overcome in this strategy. 7.4.2 Exponential Gaps to Previous Models In [DL17b, Section 3] it is shown that already for quite simple function classes there can be an exponential gap between the efficiency of elitist and non-elitist black-box algorithms; and this even in the very restrictive (1+1) unary unbiased elitist black-box complexity model. This shows that heuristics can sometimes benefit quite crucially from eventually giving preference to search points of fitness inferior to that of the current best search points. The underlying intuition for these results is that elitist algorithms do not work very well if there are several local optima that the algorithm needs to explore in order to determine the best one of them. 7.4.3 The Elitist Black-Box Complexity of OneMax As we have discussed in Sections 4 and 5, respectively, the (1+1) memory-restricted and the rankingbased black-box complexity of OneMax is only of order n/ log n. In contrast, it is easy to see that the combined (1+1) memory-restricted ranking-based black-box model does not allow for algorithms that are faster than linear in n, as can easily be seen by standard information-theoretic considerations. In [DL15b] (journal version is to appear as [DL17c]) it is shown that this linear bound is tight. Whether or not it applies to the (1+1) elitist model remains unsolved, but it is shown in [DL17c] that the expected time needed to optimize OneMax with probability at least 1 − ε is linear for every constant ε > 0. This is the so-called Monte Carlos black-box complexity that we shall briefly discuss in Section 11. The following theorem summarizes the bounds presented in [DL17c]. Without detailing this further, we note that [DL17c, Section 9] also introduces and studies a comma-variant of the elitist black-box model. Theorem 53 ([DL17c]). The (1+1) memory-restricted ranking-based black-box complexity of OneMax is Θ(n). 1−ε For 1 < λ < 2n , ε > 0 being an arbitrary constant, the (1 + λ) memory-restricted rankingbased black-box complexity of OneMax is Θ(n/log λ) (in terms of generations), while for µ = ω(log2 (n)/ log log n) its (µ + 1) memory-restricted ranking-based black-box complexity is Θ(n/log µ). For every constant 0 < ε < 1 there exists a (1+1) elitist black-box algorithm that finds the optimum of any OneMax instance in time O(n) with probability at least 1 − ε, and this running time is asymptotically optimal. For constant µ, the (µ + 1) elitist black-box complexity of OneMax is at most n + 1. 1−δ For δ > 0, C > 0, 2 ≤ λ < 2n , and suitable chosen ε = O(log2 (n) log log(n) log(λ)/n) there exists a (1 + λ) elitist black-box algorithm that needs at most O(n/log λ) generations to optimize OneMax with probability at least 1 − ε. For µ = ω(log2 (n)/log log n) ∩ O(n/log n) and every constant ε > 0, there is a (µ + 1) elitist black-box algorithm optimizing OneMax in time Θ(n/log µ) with probability at least 1 − ε. There exists a constant C > 1 such that for µ ≥ Cn/log n, the (µ + 1) elitist black-box complexity is Θ(n/log n). 43 C. Doerr 7.4.4 Survey Article Black-Box Complexity The Elitist Black-Box Complexity of LeadingOnes The (1+1) elitist black-box complexity of LeadingOnes is studied in [DL16b] (journal version is to appear as [DL17a]). Using the approach sketched in Section 7.4.1, the following result is derived. Theorem 54 (Theorem 1 in [DL17a]). The (1+1) elitist black-box complexity of LeadingOnes is Θ(n2 ). This bound holds also in the case that the algorithms have access to (and can make use of) the absolute fitness values of the search points in the population, and not only their rankings, i.e., in the (1+1) memory-restricted black-box model with enforced truncation selection. The (1 + 1) elitist complexity of LeadingOnes is thus considerably larger than its unrestricted one, which is known to be of order n log log n, as discussed in Theorem 21. It is well known that the quadratic bound of Theorem 54 is matched by classical (1 + 1)-type algorithms such as the (1+1) EA, RLS, and others. 7.4.5 The Unbiased Elitist Black-Box Complexity of Jump Some shortcomings of previous models can be eliminated when they are combined with an elitist selection requirement. This is shown in [DL17b] for the already discussed Jumpk function. Theorem 55 (Theorem 9 in [DL17b]). For k = 0 the unary unbiased (1+1) elitist black-box complexity n  n of Jumpk is Θ(n log n). For 1 ≤ k ≤ 2 − 1 it is of order k+1 . The bound in Theorem 55 is non-polynomial for k = ω(1). This is in contrast to the unary unbiased black-box complexity of Jumpk , which, according to Theorem 43, is polynomial even for extreme values of k. 8 Summary of Known Black-Box Complexities for OneMax and LeadingOnes For a better identification of open problems concerning the black-box complexity of the two benchmark functions OneMax and LeadingOnes, we summarize the bounds that have been presented in previous sections. The first table summarizes known black-box complexities√ of OneMaxn in the different models. The bound for the λ-parallel black-box model assumes λ ≤ e n . The bounds for the (1 + λ) and the 1−ε (1, λ) elitist model assume 1 < λ < 2n for some ε > 0. Finally, the bound for the (µ + 1) model 2 assumes that µ = ω(log n/log log n) and µ ≤ n. Model unrestricted unbiased, arity 1 unbiased, arity 2 ≤ k ≤ log n ranking-based (unrestricted) ranking-based unbiased, arity 1 ranking-based unbiased, arity 2 ≤ k ≤ n (1+1) comparison-based (1+1) memory-restricted λ-parallel unbiased, arity 1 (1+1) elitist Las Vegas (1+1) elitist log n/n-Monte Carlo (2+1) elitist Monte Carlo/Las Vegas (1+λ) elitist Monte Carlo (# generations) (µ+1) elitist Monte Carlo (1, λ) elitist Monte Carlo/Las Vegas (# generations) 44 Lower Bound Upper Bound Θ(n/log n) Θ(n log n) Ω(n/log n) O(n/k) Θ(n/log n) Θ(n log n) Ω(n/log n) O(n/ log k) Θ(n) Θ(n/log n)  λn Θ log(λ) + n log n Ω(n) O(n log n) Θ(n) Θ(n) Θ(n/log λ) Θ(n/log µ) Θ(n/log λ) C. Doerr Survey Article Black-Box Complexity The next table summarizes known black-box complexities of LeadingOnesn . The upper bounds for the unbiased black-box models also hold in the ranking-based variants. Model unrestricted unbiased, arity 1 unbiased, arity 2 unbiased, arity ≥ 3 λ-parallel unbiased, arity 1 (1+1) elitist 9 Lower Bound Upper Bound Θ(n log log n) Θ(n2 ) Ω(n log log n) O(n log n) Ω(n log log n) O(n log(n)/ log log n)  λn + n2 Ω log(λ/n) O(λn + n2 ) Ω(n2 ) O(n2 ) From Black-Box Complexity to Algorithm Design In the previous sections, the focus of our attention has been on computing performance limits for black-box optimization heuristics. In some cases, e.g., for OneMax in the unary unbiased black-box model and for LeadingOnes in the (1+1) elitist black-box model, we have obtained lower bounds that are matched by the performance of well-known standard heuristics like RLS or the (1+1) EA. For several other models and problems, however, we have obtained black-box complexities that are much smaller than the expected running times of typical black-box optimization techniques. As discussed in the introduction, two possible reasons for this discrepancy exist. Either the respective black-box models do not capture very well the complexity of the problems for heuristics approaches, or there are ways to improve classical heuristics by novel design principles. In the restrictive models discussed in Sections 4 to 7, we have seen that there is some truth in the first possibility. For several optimization problems, we have seen that their complexity increases if the class of black-box algorithms is restricted to subclasses of heuristics that all share some properties that are commonly found in state-of-the-art optimization heuristics. Here in this section we shall demonstrate that this is nevertheless not the end of the story. We discuss two examples where a discrepancy between black-box complexity and the performance of classical heuristics can be observed, and we show how the analysis of the typically rather artificial problem-tailored algorithms can inspire the design of new heuristics. 9.1 The (1 + (λ, λ)) Genetic Algorithm Our first example is a binary unbiased algorithm, which optimizes OneMax more efficiently than any classical unbiased heuristic, and provably faster than any unary unbiased black-box optimizer. We recall from Theorems 37, and 38 that the unary unbiased black-box complexity of OneMaxn is Θ(n log n), while its binary unbiased one is only O(n). The linear-time algorithm flips one bit at a time, and uses a simple, but clever encoding to store which bits have been flipped already. This way, it is a rather problem-specific algorithm, since it “knows” that a bit that has been tested already does not need to be tested again. The algorithm is therefore not very suitable for non-separable problems, where the influence of an individual bit depends on the value of several or all other bits. Until recently, all existing running time results indicated that general-purpose unbiased heuristics need Ω(n log n) function evaluations to optimize OneMax, so that the question if the binary unbiased black-box model is too “generous” imposed itself. In [DDE15, DD15a] this question was answered negatively; through the presentation of a novel binary unbiased black-box heuristic that optimizes OneMax in expected linear time. This algorithm is the (1 + (λ, λ)) GA. Since the algorithm itself will be discussed in more detailed in Chapter ?? [link to the chapter on non-static parameter choices will be added], we present here only the main ideas behind it. Disregarding some technical subtleties, one observation that we can make when regarding the linear-time binary unbiased algorithm for OneMax is that when it test the value of a bit, the amount of information that it obtains is the same whether or not the offspring has a better function value. In other words, the algorithm equally benefits from offspring that are better or worse than the previously best. A similar observation applies to all O(n/ log n) algorithms for OneMax discussed in Sections 3 45 C. Doerr Survey Article Black-Box Complexity to 7. All these algorithms do not strive to sample search points of large objective value, but rather aim at maximizing the amount of information that they can learn about the problem instance at hand. This way, they substantially benefit also from those search points that are (much) worse than other already evaluated ones. Most classical black-box heuristics are different. They store only the best so far solutions, or use inferior search points only to create diversity in the population. Thus, in general, they are not very efficient in learning from “bad” samples (where we consider a search point to be “bad” if it has small function value). When a heuristic is close to a local or a global optimum (in the sense that it has identified search points that are not far from these optima) it samples, in expectation, a fairly large number of search points that are wore than the current-best solutions. Not learning from these offspring results in a significant number of “wasted” iterations from which the heuristics do not benefit. This observation was the starting point for the development of the (1 + (λ, λ)) GA. Since the unary unbiased black-box complexity of OneMax is Ω(n log n), it was clear for the development of the (1 + (λ, λ)) GA that a o(n log n) unbiased algorithm must be at least binary. This has led to the question how recombination can be used to learn from inferior search points. The following idea emerged. For illustration purposes, assume that we have identified a search point x of function value OMz (x) = n − 1. From the function value, we know that there exists exactly one bit that we need to flip in order to obtain the global optimum z. Since we want to be unbiased, the best mutation seems to be a random 1-bit flip. This has probability 1/n of returning z. If we did this until we identified z, the expected number of samples would be n, and even if we stored which bits have been flipped already, we would need n/2 samples on average. Assume now that in the same situation we flip ` > 1 bits of x. Then, with a probability that depends on `, we have only flipped already optimized bits (i.e., bits in positions i for which xi = zi ) to 1 − zi , thus resulting in an offspring of function value n − 1 − `. However, the probability that the position j in which x and z differ is among the ` positions is `/n. If we repeat this experiment some λ times, independently of each other and always starting with x as “parent”, then the probability that j has been flipped in at least one of the offspring is 1 − (1 − `/n)λ . For moderately large ` and λ this probability is sufficiently large for us to assume that among the λ offspring there is at least one in which j has been flipped. Such an offspring distinguishes itself from the others by a function value of n − 1 − (` − 1) + 1 = n − ` + 1 instead of n − ` − 1. Assume that there is one such offspring x0 among the λ independent samples crated from x. When we compare x0 with x, they differ in exactly ` positions. In ` − 1 of these, the entry of x equals that of z. Only in the j-th position the situation is reversed: x0j = zj 6= xj . We would therefore like to identify this position j, and to incorporate the bit value x0j into x. So far we have only used mutation, which is a unary unbiased operation. At this point, we want to compare and merge two search points, which is one of the driving motivations behind crossover. Since x clearly has more “good” bits than x0 , a uniform crossover, which takes for each position i its entry uniformly at random from any of its two parents, does not seem to be a good choice. We would like to add some bias to the decision making process, in favor of choosing the entries of x. This yields to a biased crossover, which takes for each position i its entry yi from x0 with some probability p < 1/2 and from x otherwise. The hope is to choose p in a way that in the end only good bits are chosen. Where x and x0 are identical, there is nothing to worry, as these positions are correct already (and, in general, we have no indication to flip the entry in this position). So we only need to look at those ` positions in which x and x0 differ. The probability to make only good choices; i.e., to select ` − 1 times the entry from x and only for the j-th position the entry from x0 equals p(1 − p)`−1 . This probability may not be very large, but when we do again λ independent trials, then the probability to have created z in at least one of the trials equals 1 − (1 − p(1 − p)`−1 )λ . As we shall see, for suitable parameter values p, λ, and `, this expression is sufficiently large to gain over the O(n) strategies discussed above. Since we want to sample exactly one out of the ` bits in which x and x0 differ, it seems intuitive to set p = 1/`, cf. the discussion in [DDE15, Section 2.1]. Before we summarize the main findings, let us briefly reflect on the structure of the algorithm. In the mutation step we have created λ offspring from x, by a mutation operator that flips some ` random bits in x. This is a unary unbiased operation. From these λ offspring, we have selected one offspring 46 C. Doerr Survey Article Black-Box Complexity x0 with largest function value among all offspring (ties broken at random). In the crossover phase, we have then created again λ offspring, by recombining x and x0 with a biased crossover. This biased crossover is a binary unbiased variation operator. The algorithm now chooses from these λ recombined offspring one that has largest function vales (For OneMax ties can again be broken at random, but for other problems it can be better to favor individuals that are different from x, cf. [DDE15, Section 4.3]). This selected offspring y replaces x if it is at least as good as x, i.e., if f (y) ≥ f (x). We see that we have only employed unbiased operations, and that the largest arity in use is two. Both variation operators, mutation and biased crossover, are standard operators in the evolutionary computation literature. What is novel is that crossover is used as a repair mechanism, and after the mutation step. We also see that this algorithm is ranking-based, and even comparison-based in the sense that it can be implemented in a way in which instead of querying absolute function values only a comparison of the function values of two search points is asked for. Using information-theoretic arguments as described in Section 2.2 it is then not difficult to show that for any (adaptive or non-adaptive) parameter setting the best expected performance of the (1 + (λ, λ)) GA on OneMaxn is at least linear in the problem dimension n. The following theorem summarizes some of the results on the expected running time of the (1 + (λ, λ)) GA on OneMax. An exhaustive discussion of these results can be found in [DD17]. In particular the fitness-dependent and the self-adjusting choice of the parameters will also be discussed in Section ?? of this book [link to the chapter on non-static parameter choices will be added]. Theorem 56 (from [DDE15, DD15a, DD15b, Doe16]). The (1 + (λ, λ)) GA is a binary unbiased black-box algorithm. For mutation strength ` sampled from the binomial distribution Bin(n, k/n) and a crossover bias p = 1/k the following holds: p • For k = λ = Θ( log(n) log log(n)/ p log log log(n)) the expected optimization time of the (1 + (λ, λ)) GA on OneMaxn is O(n log(n) log log log(n)/ log log(n)). • No static parameter choice of λ ∈ [n], k ∈ [0..n], and p ∈ [0, 1] can give a better expected running time. • There exists a fitness-dependent choice of λ and k = λ such that the (1 + (λ, λ)) GA has a linear expected running time on OneMax. • A linear expectec running time can also be achieved by a self-adjusting choice of k = λ. Note that these results answer one of the most prominent long-standing open problems in evolutionary computation: the usefulness of crossover in an optimization context. Previous and other recent examples exist where crossover has been shown to be beneficial [JW02, FW04, Sud05, DT09, DHK12, Sud12, DJK+ 13, DFK+ 16, DFK+ 17], but in all of these works, either non-standard problems or operators are regarded or the results hold only for uncommon parameter settings, or substantial additional mechanisms like diversity-preserving selection schemes are needed to make crossover really work. To our knowledge, Theorem 56 is thus the first example that proves advantages of crossover in a natural algorithmic setting for a simple hill climbing problem. Without going into detail, we mention that the (1+(λ, λ)) GA has also been analyzed on a number of other benchmark problems, both by theoretical [BD17] and by empirical [DDE15, MB15, GP15] means. These results indicate that the concept of using crossover as a repair mechanism can be useful far beyond OneMax. 9.2 Randomized Local Search with Self-Adjusting Mutation Strengths Another example highlighting the impact that black-box complexity studies can have on the design of heuristic optimization techniques was presented in [DDY16a]. This works build on [DDY16b], where the tight bound for the unary unbiased black-box complexity of OneMax stated in Theorem 37 was presented. This bound is attained, up to an additive difference that is sublinear in n, by a variant of Randomized Local Search that in each iterations chooses a value r that depends on the function value 47 C. Doerr Survey Article Black-Box Complexity OMz (x) of the current-best search point x and then uses the flipr variation operator introduced in Definition 34 to create an offspring y. The offspring y replaces x if and only if OMz (y) ≥ OMz (x). The dependence of r on the function value OMz is rather complex and difficult to compute directly, cf. the discussion in [DDY16b]. Quite surprisingly, a self-adjusting choice of r is capable of identifying the optimal mutation strengths r in all but a small fraction of the iterations. This way, RLS with this self-adjusting parameter choice achieves an expected running time on OneMax that is only by an additive o(n) term worse than that that of the theoretically optimal unary unbiased black-box algorithm. The algorithm from [DDY16a] will be discussed in Chapter ?? of this book [link to the chapter on non-static parameter choices will be added]. For the context of black-box optimization, it is interesting to note that the idea to take a closer look into self-adjusting parameter choices, as well as our ability to investigate the optimality of such non-static parameter choices are deeply rooted in the study of black-box complexities. 10 From Black-Box Complexity to Mastermind In [DDST16] the black-box complexity studies for OneMax were extended to the following generalization of OneMax to functions over an alphabet of size k. For a given string z ∈ [0..k − 1]n , the Mastermind function fz assigns to each search point x ∈ [0..k − 1]n the number of positions in which x and z agree. Thus, formally, fz : [0..k − 1]n → R, x 7→ |{i ∈ [n] | xi = zi }|. The collection {fz | z ∈ [0..k − 1]n } of all such Mastermind functions forms the Mastermind problem of n positions and k colors. The Mastermind problem models the homonymous board game, which had been very popular in North America and in the Western parts of Europe in the seventies and eighties of the last century. More precisely, it models a variant of this game, as in the original Mastermind game information is provided also about colors xi that appear in z but not in the same position i; cf. [DDST16] for details and results about this Mastermind variant using black and white pegs. Mastermind and similar guessing games have been studied in the Computer Science literature much before the release of Mastermind as a commercial board game. As we have discussed in Section 3, the case of k = 2 colors (this is the OneMax problem) has already been regarded by Erdős and Rényi and several other authors in the early 1960s. These authors were mostly interested in the complexity- and information-theoretic aspects of this problem, and/or its cryptographic nature. The playful character of the problem, in turn, was the motivation of Knuth [Knu77], who computed an optimal strategy that solves any Mastermind instance with n = 4 positions and k = 6 colors in at most five guesses. The first to study the general case with arbitrary values of k was Chvátal [Chv83]. Theorem 57 (Theorem 1 in [Chv83]). For every k ≥ 2 the unrestricted black-box complexity of the Mastermind game with n positions and k colors is Ω(n log k/ log n). For ε > 0 and k ≤ n1−ε , it is at most (2 + ε)n(1 + 2 log k)/ log(n/k). Note that for k ≤ n1−ε , ε > 0 being a constant, Theorem 57 gives an asymptotically tight bound of Θ(n log k/ log n) for the k-color, n-position Mastermind game. Similarly to the random guessing strategy by Erdős and Rényi, it is sufficient to query this many random queries, chosen independently and uniformly at random from [0..k − 1]n . That is, no adaptation is needed for such combinations of n and k to learn the secret target vector z. This situation changes for the regime around k = n, which had been the focus of several subsequent works [CCH96, Goo09, JP11]. These works all show bounds of order n log n for the k = n Mastermind problem. Originally motivated by the study of black-box complexities for randomized black-box heuristics, in [DDST16] these bounds were improved to O(n log log n). Theorem 58 (Theorems 2.1 and in [DDST16]). For Mastermind with n positions and k = Ω(n) colors, the unrestricted black-box complexity   of the n-position, k-color Mastermind game is O(n log log n + k). log n For k = o(n) it is O n log log(n/k) . 48 C. Doerr Survey Article Black-Box Complexity Like the O(n/ log n) bound for the case k = 2, the bounds in Theorem 58 can be achieved by deterministic black-box algorithms [DDST16, Theorem 2.3]. On the other hand, and unlike the situation regarded in Theorem 57, it can be shown that any (deterministic or randomized) o(n log n) algorithm for the Mastermind game with k = Θ(n) colors has to be adaptive, showing that in this regime adaptive strategies are indeed more powerful than non-adaptive ones. Theorem 59 (Theorem 4.1 and Lemma 4.2 in [DDST16]). The non-adaptive unrestricted   black-box n log k complexity of the Mastermind problem with n positions and k colors is Ω max{log(n/k),1} . For k = n this bound is tight, i.e., the non-adaptive unrestricted black-box complexity of the Mastermind problem with n positions and n colors is Θ(n log n). Whether or not the O(n log log n) upper bound of Theorem 58 can be further improved remains a—seemingly quite challenging—open problem. To date, the best known lower bound is the linear one reported in [Chv83]. Some numerical results for different values of k = n can be found in [Buz16], but extending these numbers to asymptotic results may require a substantially new idea or technique for proving lower bounds in the unrestricted black-box complexity model. 11 Conclusion and Selected Open Problems In this chapter we have surveyed theory-driven approaches that shed light on the performance limits of black-box optimization techniques such as local search strategies, nature-inspired heuristics, and pure random search. We have presented a detailed discussion of existing results for these black-box complexity measures. We now highlight a few avenues for future work in this young research discipline. Extension to other optimization problems. In line with the existing literature, our focus has been on classes of classical benchmark problems such as OneMax, LeadingOnes, jump, MST, and SSSP problems, since for these problems we can compare the black-box complexity results with known running time results for well-understood heuristics. As in running time analysis, it would be highly desirable to extend these results to other problem classes. Systematic investigation of combined black-box models. In the years before around 2013 most research on black-box complexity was centered around the question how individual characteristics of state-of-the-art heuristics influence their performance. With this aim in mind, various black-box models have been developed that each restrict the algorithms with respect to some specific property; e.g., their memory-sizes, properties of their variation operators or of the selection mechanisms in use. Since 2013 we observe an increasing interest in combining two or more of such restrictions to obtain a better picture of what is needed to design algorithms that significantly excel over existing approaches. A systematic investigation of such combined black-box models constitutes one of the most promising avenues for future research. Tools to derive lower bounds. To date, the most powerful technique to prove lower bounds for the black-box complexity of a problem is the information-theoretic approach, most notably in the form of Yao’s minimax principle, and the simple information-theoretic lower bound presented in Theorem 4. Refined variants of this theorem, designed to capture the situation in which the number of possible function values depend on the state of the optimization process, or where the probabilities for different objective values are non-homogeneous. Unfortunately, either the verification that the conditions under which these theorems apply, or the computation of a closed expression that summarizes the resulting bounds, are often very tedious, making these extension rather difficult to apply. Alternative tools for the derivation of lower bounds in black-box complexity contexts form another of the most desirable directions for future work. In particular for the k-ary unbiased black-box complexity of arities k ≥ 2 we do not have any model-specific lower bounds. We therefore do not know, for example, if the linear bound for the binary unbiased black-box complexity of OneMaxn or the O(n log n) bound for the binary unbiased black-box complexity of LeadingOnesn are tight, or whether the power of recombination is even larger than what these bounds, in comparison to the unary unbiased black-box complexities, indicate. Another specifically interesting problem is raised by the Ω(n2 ) lower bound for the (1+1) elitist black-box complexity of LeadingOnesn presented in Theorem 54. It is conjectured in [DL17a, Sec49 C. Doerr Survey Article Black-Box Complexity tion 4] that this bound holds already for the (1+1) memory-restricted setting. A more systematic investigation of lower bounds in the memory-restricted black-box models would help to understand better the role of large populations in evolutionary computation, a question that is not very well understood to date. Beyond worst-case expected optimization time as unique performance measure. Blackbox complexity as introduced in this chapter takes worst-case expected optimization time as performance measure. This measure reduces the whole optimization procedure to one single number. This, naturally, carries several disadvantages. The same critique applies to running time analysis in general, which is very much centered around this single performance measure. Complementing performance indicators like fixed-budget (cf. [JZ14]) and fixed-target (cf. [PD17]) results have been proposed in the literature, but unfortunately have not yet been able to attract significant resonance. Since these measure give a better picture on the anytime behavior of black-box optimization techniques, we believe that an extension of existing black-box complexity results to such anytime statements would make it easier to communicate and to discuss the results with practitioners, for whom the anytime performance is often at least as important as expected optimization time. In the same context, one may ask if the expected optimization time should be the only measure regarded. Clearly, when the optimization time T (A, f ) of an algorithm A on a function f is highly concentrated, its expectation is often much similar, and in particular of the same or a very similar asymptotic order than its median. Such concentration can be observed for the running time of classical heuristics on most of the benchmark problems regarded here in this chapter. At the same time, it is also not very difficult to construct problems for which such a concentration does provably not hold. In particular for multimodal problems, in which two or more local optima exist, the running time is often not concentrated. In [DL17b, Section 3] examples are presented for which the probability to find a solution within a small polynomial given bound is rather large, but where—due to excessive running times in the remaining cases—the expected optimization time is very large. This motivated the authors to introduce the concept of p-Monte Carlo black-box complexity. The p-Monte Carlo blackbox complexity of a class F of functions measures the time it takes to optimize any problem f ∈ F with failure probability at most p. It is shown that even for small p, the p-Monte Carlo black-box complexity of a function class F can be smaller by an exponential factor than its traditional (expected) black-box complexity, which is referred to as Las Vegas black-box complexity in [DL17b]. Acknowledgments This work was supported by a public grant as part of the Investissement d’avenir project, reference ANR-11-LABX-0056-LMH, LabEx LMH, in a joint call with the Gaspard Monge Program for optimization, operations research, and their interactions with data sciences. References [AAD+ 13] Peyman Afshani, Manindra Agrawal, Benjamin Doerr, Carola Doerr, Kasper Green Larsen, and Kurt Mehlhorn. The query complexity of finding a hidden permutation. In Space-Efficient Data Structures, Streams, and Algorithms - Papers in Honor of J. Ian Munro on the Occasion of His 66th Birthday, volume 8066 of Lecture Notes in Computer Science, pages 1–11. Springer, 2013. [AW09] Gautham Anil and R. Paul Wiegand. Black-box search by elimination of fitness functions. In Proc. of Foundations of Genetic Algorithms (FOGA’09), pages 67–78. ACM, 2009. [BD17] Maxim Buzdalov and Benjamin Doerr. Runtime analysis of the (1 + (λ, λ)) Genetic Algorithm on random satisfiable 3-CNF formulas. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’17), pages 1343–1350. ACM, 2017. [BDK16] Maxim Buzdalov, Benjamin Doerr, and Mikhail Kever. The unrestricted black-box complexity of jump functions. Evolutionary Computation, 24(4):719–744, 2016. 50 C. Doerr Survey Article Black-Box Complexity [BLS14] Golnaz Badkobeh, Per Kristian Lehre, and Dirk Sudholt. Unbiased black-box complexity of parallel search. In Proc. of Parallel Problem Solving from Nature (PPSN’14), volume 8672 of Lecture Notes in Computer Science, pages 892–901. Springer, 2014. [BLS15] Golnaz Badkobeh, Per Kristian Lehre, and Dirk Sudholt. Black-box complexity of parallel search with distributed populations. In Proceedings of Foundations of Genetic Algorithms (FOGA’15), pages 3–15. ACM, 2015. [Bsh09] Nader H. Bshouty. Optimal algorithms for the coin weighing problem with a spring scale. In Proc. of the 22nd Conference on Learning Theory (COLT’09). Omnipress, 2009. [Buz16] Maxim Buzdalov. An algorithm for computing lower bounds for unrestricted black-box complexities. In Companion Material for Proc. of Genetic and Evolutionary Computation Conference (GECCO’16), pages 147–148. ACM, 2016. [CCH96] Zhixiang Chen, Carlos Cunha, and Steven Homer. Finding a hidden code by asking questions. In Proc. of the 2nd Annual International Conference on Computing and Combinatorics (COCOON’96), pages 50–55. Springer, 1996. [Chv83] Vasek Chvátal. Mastermind. Combinatorica, 3:325–329, 1983. [CLY11] Stephan Cathabard, Per Kristian Lehre, and Xin Yao. Non-uniform mutation rates for problems with unknown solution lengths. In Proc. of Foundations of Genetic Algorithms (FOGA’11), pages 173–180. ACM, 2011. [CM66] David G. Cantor and W. H. Mills. Determining a subset from certain combinatorial properties. Canadian Journal of Mathematics, 18:42–48, 1966. [DD14] Benjamin Doerr and Carola Doerr. Black-box complexity: from complexity theory to playing Mastermind. In Companion Material for Proc. of Genetic and Evolutionary Computation Conference (GECCO’14), pages 623–646. ACM, 2014. [DD15a] Benjamin Doerr and Carola Doerr. Optimal parameter choices through self-adjustment: Applying the 1/5-th rule in discrete settings. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’15), pages 1335–1342. ACM, 2015. [DD15b] Benjamin Doerr and Carola Doerr. A tight runtime analysis of the (1+(λ,λ)) genetic algorithm on OneMax. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’15), pages 1423–1430. ACM, 2015. [DD16] Benjamin Doerr and Carola Doerr. The impact of random initialization on the runtime of randomized search heuristics. Algorithmica, 75:529–553, 2016. [DD17] Benjamin Doerr and Carola Doerr. Optimal static and self-adjusting parameter choices for the (1 + (λ, λ)) genetic algorithm. Algorithmica, 2017. To appear. Available online at https://doi.org/10.1007/s00453-017-0354-9. [DDE15] Benjamin Doerr, Carola Doerr, and Franziska Ebel. From black-box complexity to designing new genetic algorithms. Theoretical Computer Science, 567:87–104, 2015. [DDK14] Benjamin Doerr, Carola Doerr, and Timo Kötzing. The unbiased black-box complexity of partition is polynomial. Artificial Intelligence, 216:275–286, 2014. [DDK15a] Benjamin Doerr, Carola Doerr, and Timo Kötzing. Solving problems with unknown solution length at (almost) no extra cost. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’15), pages 831–838. ACM, 2015. [DDK15b] Benjamin Doerr, Carola Doerr, and Timo Kötzing. Unbiased black-box complexities of jump functions. Evolutionary Computation, 23:641–670, 2015. 51 C. Doerr Survey Article Black-Box Complexity [DDST16] Benjamin Doerr, Carola Doerr, Reto Spöhel, and Henning Thomas. Playing Mastermind with many colors. Journal of the ACM, 63:42:1–42:23, 2016. [DDY16a] Benjamin Doerr, Carola Doerr, and Jing Yang. k-bit mutation with self-adjusting k outperforms standard bit mutation. In Proc. of Parallel Problem Solving from Nature (PPSN’16), volume 9921 of Lecture Notes in Computer Science, pages 824–834. Springer, 2016. [DDY16b] Benjamin Doerr, Carola Doerr, and Jing Yang. Optimal parameter choices via precise black-box analysis. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’16), pages 1123–1130. ACM, 2016. [DFK+ 16] Duc-Cuong Dang, Tobias Friedrich, Timo Kötzing, Martin S. Krejca, Per Kristian Lehre, Pietro Simone Oliveto, Dirk Sudholt, and Andrew M. Sutton. Escaping local optima with diversity mechanisms and crossover. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’16), pages 645–652. ACM, 2016. [DFK+ 17] Duc-Cuong Dang, Tobias Friedrich, Timo Kötzing, Martin S. Krejca, , Per Kristian Lehre, Pietro S. Oliveto, Dirk Sudholt, and Andrew M. Sutton. Escaping local optima using crossover with emergent diversity. IEEE Transactions on Evolutionary Computation, 2017. To appear. [DFW10] Benjamin Doerr, Mahmoud Fouz, and Carsten Witt. Quasirandom evolutionary algorithms. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’10), pages 1457–1464. ACM, 2010. [DHK12] Benjamin Doerr, Edda Happ, and Christian Klein. Crossover can provably be useful in evolutionary computation. Theoretical Computer Science, 425:17–33, 2012. [DJK+ 11] Benjamin Doerr, Daniel Johannsen, Timo Kötzing, Per Kristian Lehre, Markus Wagner, and Carola Winzen. Faster black-box algorithms through higher arity operators. In Proc. of Foundations of Genetic Algorithms (FOGA’11), pages 163–172. ACM, 2011. [DJK+ 13] Benjamin Doerr, Daniel Johannsen, Timo Kötzing, Frank Neumann, and Madeleine Theile. More effective crossover operators for the all-pairs shortest path problem. Theoretical Computer Science, 471:12–26, 2013. [DJW02] Stefan Droste, Thomas Jansen, and Ingo Wegener. On the analysis of the (1+1) evolutionary algorithm. Theoretical Computer Science, 276:51–81, 2002. [DJW06] Stefan Droste, Thomas Jansen, and Ingo Wegener. Upper and lower bounds for randomized search heuristics in black-box optimization. Theory of Computing Systems, 39:525–544, 2006. [DJWZ13] Benjamin Doerr, Thomas Jansen, Carsten Witt, and Christine Zarges. A method to derive fixed budget results from expected optimisation times. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’13), pages 1581–1588. ACM, 2013. [DKLW13] Benjamin Doerr, Timo Kötzing, Johannes Lengler, and Carola Winzen. Black-box complexities of combinatorial problems. Theoretical Computer Science, 471:84–106, 2013. [DKW11] Benjamin Doerr, Timo Kötzing, and Carola Winzen. Too fast unbiased black-box algorithms. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’11), pages 2043–2050. ACM, 2011. [DL15a] Carola Doerr and Johannes Lengler. Elitist black-box models: Analyzing the impact of elitist selection on the performance of evolutionary algorithms. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’15), pages 839–846. ACM, 2015. 52 C. Doerr Survey Article Black-Box Complexity [DL15b] Carola Doerr and Johannes Lengler. OneMax in black-box models with several restrictions. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’15), pages 1431–1438. ACM, 2015. [DL16a] Duc-Cuong Dang and Per Kristian Lehre. Runtime analysis of non-elitist populations: From classical optimisation to partial information. Algorithmica, 75:428–461, 2016. [DL16b] Carola Doerr and Johannes Lengler. The (1+1) elitist black-box complexity of LeadingOnes. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’16), pages 1131–1138. ACM, 2016. [DL17a] Carola Doerr and Johannes Lengler. The (1+1) elitist black-box complexity of LeadingOnes. Algorithmica, 2017. To appear. Available online at https://doi.org/ 10.1007/s00453-017-0304-6. [DL17b] Carola Doerr and Johannes Lengler. Introducing elitist black-box models: When does elitist behavior weaken the performance of evolutionary algorithms? Evolutionary Computation, 2017. To appear. Available online at https://doi.org/10.1162/EVCO_a_00195. [DL17c] Carola Doerr and Johannes Lengler. OneMax in black-box models with several restrictions. Algorithmica, 78:610–640, 2017. [DLMN17] Benjamin Doerr, Huu Phuoc Le, Régis Makhmara, and Ta Duy Nguyen. Fast genetic algorithms. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’17), pages 777–784. ACM, 2017. [Doe16] Benjamin Doerr. Optimal parameter settings for the (1 + (λ, λ)) genetic algorithm. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’16), pages 1107– 1114. ACM, 2016. [dPdLDD15] Axel de Perthuis de Laillevault, Benjamin Doerr, and Carola Doerr. Money for nothing: Speeding up evolutionary algorithms through better initialization. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’15), pages 815–822. ACM, 2015. [DS04] Marco Dorigo and Thomas Stützle. Ant colony optimization. MIT Press, 2004. [DT09] Benjamin Doerr and Madeleine Theile. Improved analysis methods for crossoverbased algorithms. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’09), pages 247–254. ACM, 2009. [DW12a] Benjamin Doerr and Carola Winzen. Black-box complexity: Breaking the O(n log n) barrier of LeadingOnes. In Artificial Evolution (EA’11), Revised Selected Papers, volume 7401 of Lecture Notes in Computer Science, pages 205–216. Springer, 2012. [DW12b] Benjamin Doerr and Carola Winzen. Memory-restricted black-box complexity of OneMax. Information Processing Letters, 112(1-2):32–34, 2012. [DW14a] Benjamin Doerr and Carola Winzen. Playing Mastermind with constant-size memory. Theory of Computing Systems, 55:658–684, 2014. [DW14b] Benjamin Doerr and Carola Winzen. Ranking-based black-box complexity. Algorithmica, 68:571–609, 2014. [DW14c] Benjamin Doerr and Carola Winzen. Reducing the arity in unbiased black-box complexity. Theoretical Computer Science, 545:108–121, 2014. [ER63] Paul Erdős and Alfréd Rényi. On two problems of information theory. Magyar Tudományos Akadémia Matematikai Kutató Intézet Közleményei, 8:229–243, 1963. 53 C. Doerr Survey Article Black-Box Complexity [FT11] Hervé Fournier and Olivier Teytaud. Lower bounds for comparison based evolution strategies using VC-dimension and sign patterns. Algorithmica, 59:387–408, 2011. [FW04] Simon Fischer and Ingo Wegener. The Ising model on the ring: Mutation versus recombination. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’04), volume 3102 of Lecture Notes in Computer Science, pages 1113–1124. Springer, 2004. [Goo09] Michael T. Goodrich. On the algorithmic complexity of the Mastermind game with black-peg results. Information Processing Letters, 109:675–678, 2009. [GP15] Brian W. Goldman and William F. Punch. Fast and efficient black box optimization using the parameter-less population pyramid. Evolutionary Computation, 23:451–479, 2015. [Jan14] Thomas Jansen. Black-box complexity for bounding the performance of randomized search heuristics. In Yossi Borenstein and Alberto Moraglio, editors, Theory and Principled Methods for the Design of Metaheuristics, Natural Computing Series, pages 85–110. Springer, 2014. [Jan15] Thomas Jansen. On the black-box complexity of example functions: The real jump function. In Proc. of Foundations of Genetic Algorithms (FOGA’15), pages 16–24. ACM, 2015. [JP11] Gerold Jäger and Marcin Peczarski. The number of pessimistic guesses in generalized black-peg Mastermind. Information Processing Letters, 111:933–940, 2011. [JS10] Thomas Jansen and Dirk Sudholt. Analysis of an asymmetric mutation operator. Evolutionary Computation, 18:1–26, 2010. [JW02] Thomas Jansen and Ingo Wegener. The analysis of evolutionary algorithms - a proof that crossover really can help. Algorithmica, 34:47–66, 2002. [JZ14] Thomas Jansen and Christine Zarges. Performance analysis of randomised search heuristics operating with a fixed budget. Theoretical Computer Science, 545:39–58, 2014. [KGV83] Scott Kirkpatrick, C. D. Gelatt, and Mario P. Vecchi. Optimization by simulated annealing. Science, 220(4598):671–680, 1983. [KNSW11] Timo Kötzing, Frank Neumann, Dirk Sudholt, and Markus Wagner. Simple max-min ant systems and the optimization of linear pseudo-boolean functions. In Proc. of Foundations of Genetic Algorithms (FOGA’11), pages 209–218. ACM, 2011. [Knu77] Donald E. Knuth. The computer as a master mind. Journal of Recreational Mathematics, 9:1–5, 1977. [Lin64] Bernt Lindström. On a combinatory detection problem i. Mathematical Institute of the Hungarian Academy of Science, 9:195–207, 1964. [Lin65] Bernt Lindström. On a combinatorial problem in number theory. Canadian Mathematical Bulletin, 8:477–490, 1965. [LS14] Jörg Lässig and Dirk Sudholt. Analysis of speedups in parallel evolutionary algorithms and (1+λ) EAs for combinatorial optimization. Theoretical Computer Science, 551:66– 83, 2014. [LW10] Per Kristian Lehre and Carsten Witt. Black-box search by unbiased variation. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’10), pages 1441–1448. ACM, 2010. 54 C. Doerr Survey Article Black-Box Complexity [LW12] Per Kristian Lehre and Carsten Witt. Black-box search by unbiased variation. Algorithmica, 64:623–642, 2012. [MB15] Vladimir Mironovich and Maxim Buzdalov. Hard test generation for maximum flow algorithms with the fast crossover-based evolutionary algorithm. In Companion Material for Proc. of Genetic and Evolutionary Computation Conference (GECCO’15), pages 1229–1232. ACM, 2015. [MR95] Rajeev Motwani and Prabhakar Raghavan. Randomized Algorithms. Cambridge University Press, 1995. [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:1087–1092, 1953. [NW09] Frank Neumann and Carsten Witt. Runtime analysis of a simple ant colony optimization algorithm. Algorithmica, 54:243–255, 2009. [NW10] Frank Neumann and Carsten Witt. Bioinspired Computation in Combinatorial Optimization – Algorithms and Their Computational Complexity. Springer, 2010. [PD17] Eduardo Carvalho Pinto and Carola Doerr. Discussion of a more practice-aware runtime analysis for evolutionary algorithms. In Proc. of Artificial Evolution (EA’17), pages 298– 305, 2017. [PPHST17] Tiago Paixão, Jorge Pérez Heredia, Dirk Sudholt, and Barbora Trubenová. Towards a runtime comparison of natural and artificial evolution. Algorithmica, 78:681–713, 2017. [RV11] Jonathan Rowe and Michael Vose. Unbiased black box search algorithms. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’11), pages 2035–2042. ACM, 2011. [Sto16] Tobias Storch. Black-box complexity: Advantages of memory usage. Information Processing Letters, 116(6):428–432, 2016. [Sud05] Dirk Sudholt. Crossover is provably essential for the Ising model on trees. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’05), pages 1161–1167. ACM Press, 2005. [Sud12] Dirk Sudholt. Crossover speeds up building-block assembly. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’12), pages 689–702. ACM, 2012. [Sud13] Dirk Sudholt. A new method for lower bounds on the running time of evolutionary algorithms. IEEE Transactions on Evolutionary Computation, 17:418–435, 2013. [TG06] Olivier Teytaud and Sylvain Gelly. General lower bounds for evolutionary algorithms. In Proc. of Parallel Problem Solving from Nature (PPSN 2006), volume 4193 of Lecture Notes in Computer Science, pages 21–31. Springer, 2006. [Wit13] Carsten Witt. Tight bounds on the optimization time of a randomized search heuristic on linear functions. Combinatorics, Probability & Computing, 22:294–318, 2013. [Yao77] Andrew Chi-Chin Yao. Probabilistic computations: Toward a unified measure of complexity. In Proc. of Foundations of Computer Science (FOCS’77), pages 222–227. IEEE, 1977. 55
9cs.NE
Accelerating Deep Learning with Memcomputing Haik Manukian1 , Fabio L. Traversa2 , Massimiliano Di Ventra1 arXiv:1801.00512v2 [cs.LG] 24 Jan 2018 Abstract Restricted Boltzmann machines (RBMs) and their extensions, called “deep-belief networks”, are powerful neural networks that have found applications in the fields of machine learning and big data. The standard way to train these models resorts to an iterative unsupervised procedure based on Gibbs sampling, called “contrastive divergence” (CD), and additional supervised tuning via back-propagation. However, this procedure has been shown not to follow any gradient and can lead to suboptimal solutions. In this paper, we show an efficient alternative to CD by means of simulations of digital memcomputing machines (DMMs). We test our approach on pattern recognition using a modified version of the MNIST data set. DMMs sample effectively the vast phase space given by the model distribution of the RBM, and provide a very good approximation close to the optimum. This efficient search significantly reduces the number of pretraining iterations necessary to achieve a given level of accuracy, as well as a total performance gain over CD. In fact, the acceleration of pretraining achieved by simulating DMMs is comparable to, in number of iterations, the recently reported hardware application of the quantum annealing method on the same network and data set. Notably, however, DMMs perform far better than the reported quantum annealing results in terms of quality of the training. We also compare our method to advances in supervised training, like batch-normalization and rectifiers, that work to reduce the advantage of pretraining. We find that the memcomputing method still maintains a quality advantage (> 1% in accuracy, and a 20% reduction in error rate) over these approaches. Furthermore, our method is agnostic about the connectivity of the network. Therefore, it can be extended to train full Boltzmann machines, and even deep networks at once. Keywords: Deep Learning, Restricted Boltzmann Machines, Memcomputing 1. Introduction The progress in machine learning and big data driven by successes in deep learning is difficult to overstate. Deep learning models (a subset of which are called “deep-belief networks”) are artificial neural networks with a certain amount of layers, n, with n > 2 [1]. They have proven themselves to be very useful in a variety of applications, from computer vision [2] and speech recognition [3] to super-human performance in complex games[4], to name just a few. While some of these models have existed for some time [5], the dramatic increases in computational power combined with advances in effective training methods have pushed forward these fields considerably [6]. Successful training of deep-belief models relies heavily on some variant of an iterative gradient-descent procedure, called back-propagation, through the layers of the network [7]. Since this optimization method uses only gradient information, and the error landscapes of deep networks are highly non-convex [8], one would at best hope to find an appropriate local minimum. However, there is evidence that in these highdimensional non-convex settings, the issue is not getting 1 Department of Physics, University of California, San Diego, La Jolla, CA 92093 2 MemComputing, Inc., San Diego, CA, 92130 CA stuck in some local minima but rather at saddle points, where the gradient also vanishes [9], hence making the gradient-descent procedure of limited use. A takeaway from this is that a “good” initialization procedure for assigning the weights of the network, known as pretraining, can then be highly advantageous. One such deep-learning framework that can utilize this pretraining procedure is the Restricted Boltzmann Machine (RBM) [5], and its extension, the Deep Belief Network (DBN) [10]. These machines are a class of neural network models capable of unsupervised learning of a parametrized probability distribution over inputs. They can also be easily extended to the supervised learning case by training an output layer using back-propagation or other standard methods [1]. Training RBMs usually distinguishes between an unsupervised pretraining, whose purpose is to initialize a good set of weights, and the supervised procedure. The current most effective technique for pretraining RBMs utilizes an iterative sampling technique called contrastive divergence (CD) [11]. Computing the exact gradient of the log-likelihood is exponentially hard in the size of the RBM, and so CD approximates it with a computationally friendly sampling procedure. While this procedure has brought RBMs most of their success, CD suffers from the slow mixing of Gibbs sampling, and is known not to follow the gradient of any function [12]. Partly due to these shortcomings of pretraining with CD, much research has gone into making the backpropagation procedure more robust and less sensitive to the initialization of weights and biases in the network. This includes research into different non-linear activation functions (e.g., “rectifiers”) [13] to combat the vanishing gradient problem and normalization techniques (such as “batch-normalization”) [14] that make back-propagation in deep networks more stable and less dependent on initial conditions. In sum, these techniques make training deep networks an easier (e.g., more convex) optimization problem for a gradient-based approach like back-propagation. This, in turn, relegates the standard CD pretraining procedure’s usefulness to cases where the training set is sparse [1], which is becoming an increasingly rare occurrence. In parallel with this research into back-propagation, sizable effort has been expended toward improving the power of the pretraining procedure, including extensions of CD [15, 16], CD done on memristive hardware [17], and more recently, approaches based on quantum annealing that try to recover the exact gradient [18] involved in pretraining. Some of these methods are classical algorithms simulating quantum sampling [19], and still others attempt to use a hardware quantum device in contact with an environment to take independent samples from its Boltzmann distribution for a more accurate gradient computation. For instance, in a recent work, the state of the RBM has been mapped onto a commercial quantum annealing processor (a D-Wave machine), the latter used as a sampler of the model distribution [20]. The results reported on a reduced version of the well-known MNIST data set look promising as compared to CD [20]. However, these approaches require expensive hardware, and cannot be scaled to larger problems as of yet. In the present paper, inspired by the theoretical underpinnings [21, 22] and recent empirical demonstrations [23, 24] of the advantages of a new computing paradigm –memcomputing [25]– on a variety of combinatorial/optimization problems, we seek to test its power toward the computationally demanding problems in deep learning. Memcomputing [25] is a novel computing paradigm that solves complex computational problems using processing embedded in memory. It has been formalized by two of us (FLT and MD) by introducing the concept of universal memcomputing machines[21]. In short, to perform a computation, the task at hand is mapped to a continuous dynamical system that employs highly-correlated states [26] (in both space and time) of the machine to navigate the phase space efficiently and find the solution of a given problem as mapped into the equilibrium states of the dynamical system. In this paper, we employ a subset of these machines called digital memcomputing machines (DMMs) and, more specifically, their self-organizing circuit realizations [22]. The distinctive feature of DMMs is their ability to read and write the initial and final states of the machine digitally, namely requiring only finite precision. This feature makes them easily scalable as our modern computers. From a practical point of view DMMs can be built with standard circuit elements with and without memory [22]. These elements, however, are non-quantum. Therefore, the ordinary differential equations of the corresponding circuits can be efficiently simulated on our present computers. Here, we will indeed employ only simulations of DMMs on a single Xeon processor to train RBMs. These simulations show already substantial advantages with respect to CD and even quantum annealing, despite the latter is executed on hardware. Of course, the hardware implementation of DMMs applied to these problems would offer even more advantages since the simulation times will be replaced by the actual physical time of the circuits to reach equilibrium. This would then offer a realistic path to real-time pretraining of deep-belief networks. In order to compare directly with quantum annealing results recently reported[20], we demonstrate the advantage of our memcomputing approach by first training on a reduced MNIST data set as that used in Ref [20]. We show that our method requires far less pretraining iterations to achieve the same accuracy as CD, as well as an overall accuracy gain over both CD and quantum annealing. We also train the RBMs on the reduced MNIST data set without mini-batching, where the quantum annealing results are not available. Also in this case, we find both a substantial reduction in pretraining iterations needed as well a higher level of accuracy of the memcomputing approach over the traditional CD. Our approach then seems to offer many of the advantages of quantum approaches. However, since it is based on a completely classical system, it can be efficiently deployed in software (as we demonstrate in this paper) as well as easily implemented in hardware, and can be scaled to full-size problems. Finally, we investigate the role of recent advances in supervised training by comparing accuracy obtained using only back-propagation with batch-normalization and rectifiers starting from a random initial condition versus the back-propagation procedure initiated from a network pretrained with memcomputing, with sigmoidal activations and without batch-normalization. Even without these advantages, namely operating on a more non-convex landscape, we find the network pretrained with memcomputing maintains an accuracy gain over state-of-the-art backpropagation by more than 1% and a 20% reduction in error rate. This gives further evidence to the fact that memcomputing pretraining navigates to an advantageous initial point in the non-convex loss surface of the deep network. 2. RBMs and Contrastive Divergence An RBM consists of m visible units, vj , j = 1 . . . m, each fully connected to a layer of n hidden units, hi , i = 1 . . . n, 2 updates from the n-th to the (n + 1)-th iteration: Output layer o2 o1 n+1 n wij = αwij + [hvi hj iDATA − hvi hj iMODEL ], o3 (4) where α is called the “momentum” and  is the “learning rate”. A similar update procedure is applied to the biases: h1 h2 h3 bn+1 = αbni + [hvi iDATA − hvi iMODEL ], i (5) cn+1 = αcnj + [hhj iDATA − hhj iMODEL ]. j (6) RBM v2 v1 v3 v4 This form of the weight updates is referred to as “stochastic gradient optimization with momentum”. Here α is the momentum parameter and  the learning rate. The first expectation value on the rhs of Eqs. (4), (5), and (6) is taken with respect to the conditional probability distribution with the data fixed at the visible layer. This is relatively easy to compute. Evaluation of the second expectation on the rhs of Eqs. (4), (5), and (6) is exponentially hard in the size of the network, since obtaining independent samples from a high-dimensional model distribution easily becomes prohibitive with increasing size [11]. This is the term that CD attempts to approximate. The CD approach attempts to reconstruct the difficult expectation term with iterative Gibbs sampling. This works by sequentially sampling each layer given the sigmoidal conditional probabilities, namely   X p(hi = 1|v) = σ  wij vj + ci  , (7) Figure 1: A sketch of an RBM with four visible nodes, three hidden nodes, and an output layer with three nodes. The value of each stochastic binary node is represented by vi , hi ∈ {0, 1}, which are sampled from the probabilities in Eqs. (7), (8). The connections between the layers represent the weights, wij ∈ R (biases not shown). Note the lack of connections between nodes in the same layer, which distinguishes the RBM from a Boltzmann machine. The RBM weights are trained separately from the output layer with generative pretraining, then tuned together via back-propogation (just as in a feed-forward neural network). both usually taken to be binary variables. In the restricted model, no intra-layer connection are allowed, see Fig. 1. The connectivity structure of the RBM implies that, given the hidden variables, each input node is conditionally independent of all the others: p(vi , vj |h) = p(vi |h)p(vj |h). j (1) for the visible layer, and similarly for the hidden layer ! X p(vj = 1|h) = σ wij hi + bj , (8) The joint probability is given by the Gibbs distribution, p(v, h) = 1 −E(v,h) e , Z with an energy function XX X X E(v, h) = − wij hi vj − bj v j − ci hi , i j j i (2) with σ(x) = (1 + e−x )−1 . The required expectation values are calculated with the resulting samples. In the limit of infinite sampling iterations, the expectation value is recovered. However, this convergence is slow and in practice usually only one iteration, referred to CD-1, is used [27]. (3) i where wij is the weight between the i-th hidden neuron and the j-th visible neuron, and bj , ci are real numbers indicating the “biases” of the neurons. The value, Z, is a normalization constant, and is known in statistical mechanics as the partition function. Training an RBM then amounts to finding a set of weights and biases that maximizes the likelihood (or equivalently minimizes the energy) of the observed data. A common approach to training RBMs for a supervised task is to first perform generative unsupervised learning (pretraining) to initialize the weights and biases, then run back-propagation over input-label pairs to fine tune the parameters of the network. The pretraining is framed as a gradient ascent over the log-likelihood of the observed data, which gives a particularly tidy form for the weight 3. Efficient Sampling with Memcomputing We replace the CD reconstruction with our approach that utilizes memcomputing to compute a much better approximation to the model expectation than CD. More specifically, we map the RBM pretraining problem onto DMMs realized by self-organizing logic circuits (SOLCs) [22]. These electrical circuits define a set of coupled differential equations which are set to random initial conditions and integrated forward toward the global solution of the given problem[22, 23, 24]. The ordinary differential equations we solve can be found in Ref. [22] appropriately adapted to deal with the particular problem discussed in this paper. 3 (a) 100 back-propagation iterations 20 20 10 16 Mem-QUBO CD-1 1 15 0 10 20 30 0.8 40 Accuracy Total Weight 18 14 0.6 0.4 12 0.2 10 35.5 36 36.5 37 37.5 38 38.5 39 39.5 0 40 Simulation Time (arbitrary units) 0 5 10 15 20 25 30 35 40 45 50 45 50 45 50 Pretraining Iterations Figure 2: Plot of the total weight of a MAX-SAT clause as a function of simulation time (in arbitrary units) of a DMM. A lower weight variable assignment corresponds directly to a higher probability assignment of the nodes of an RBM. If the simulation has not changed assignments in some time, we restart with another random (independent) initial condition. The inset shows the full simulation, with all restarts. The main figure focuses on the last three restarts, signified by the black box in the inset. (b) 200 back-propagation iterations Accuracy 0.8 Within this memcomputing context, we construct a reinterpretation of the RBM pretraining that explicitly shows how it corresponds to an NP-hard optimization problem, which we then tackle using DMMs. We first observe that to obtain a sample near most of the probability mass of the joint distribution, p(v, h) ∝ e−E(v,h) , one must find the minimum of the energy of the form Eq. 3, which constitutes a quadratic unconstrained binary optimization (QUBO) problem [28]. We can see this directly by considering the visible and hidden nodes as one vector x = (v, h) and re-writing the energy of an RBM configuration as  B 0  W , C 0.4 0 0 5 10 15 20 25 30 35 40 Pretraining Iterations (c) 400 back-propagation iterations Mem-QUBO CD-1 1 0.8 (9) where Q is the matrix Q= 0.6 0.2 Accuracy E = −xT Qx, Mem-QUBO CD-1 1 0.6 0.4 0.2 (10) 0 0 with B and C being the diagonal matrices representing the biases bj and ci , respectively, while the matrix W contains the weights. We then employ a mapping from a general QUBO problem to a weighted maximum satisfiability (weighted MAXSAT) problem, similar to [29], which is directly solved by the DMM. The weighted MAX-SAT problem is to find an assignment of boolean variables that minimizes the total weight of a given boolean expression written in conjunctive normal form [28]. This problem is a well-known problem in the NP-hard complexity class [28]. However, it was recently shown in Ref. [23], that simulations of DMMs show dramatic (exponential) speed-up over the state-of-the-art solvers [23], when attempting to find better approximations to hard MAX-SAT instances beyond the inapproximability gap [30]. 5 10 15 20 25 30 35 40 Pretraining Iterations Figure 3: Memcomputing (Mem-QUBO) accuracy on the test set of the reduced MNIST problem versus contrastive divergence for n = 100(a), 200(b), 400(c) iterations of back-propagation with √ minibatches of 100. The plots show average accuracy with ±σ/ N error bars calculated across 10 DBNs trained on N = 10 different partitions of the training set. One can see a dramatic acceleration with the memcomputing approach needing far less iterations to achieve the same accuracy, as well as an overall performance gap (indicated by a black arrow) that back-propagation cannot seem to overcome. Note that some of the error bars for both Mem-QUBO and CD1 are very small on the reported scale for a number of pretraining iterations larger than about 20. The approximation to the global optimum of the weighted MAX-SAT problem given by memcomputing is then mapped back to the original variables that represent 4 (a) 100 back-propagation iterations the states of the RBM nodes. Finally, we obtain an approximation to the “ground state” (lowest energy state) of the RBM as a variable assignment, x∗ , close to the peak of the probability distribution, where ∇P (x∗ ) = 0. This assignment is obtained by integration of the ordinary differential equations that define the SOLCs dynamics. In doing so we collect an entire trajectory, x(t), that begins at a random initial condition in the phase space of the problem, and ends at the lowest energy configuration of the variables (see Fig. 2). Since the problem we are tackling here is an optimization one, we do not have any guarantee of finding the global optimum. (This is in contract to a SAT problem where we can guarantee DMMs do find the solutions of the problem corresponding to equilibrium points, if these exist [22, 31, 32].) Therefore, there is an ambiguity about what exactly constitutes the stopping time of the simulation, since a priori, one cannot know that the simulation has reached the global minimum. We then perform a few “restarts” of the simulation (that effectively correspond to a change of the initial conditions) and stop the simulation when the machine has not found any better configuration within that number of restarts. The restarts are clearly seen in Fig. 2 as spikes in the total weight of the boolean expression. In this work we have employed 28 restarts, which is an over-kill since a much smaller number would have given similar results. The full trajectory, x(t), together with the above “restarts” is plotted in Fig. 2. It is seen that this trajectory, in between restarts, spends most of its time in “low-energy regions,” or equivalently areas of high probability. A time average, hx(t)i, gives a good approximation to the required expectations in the gradient calculation in Eqs. (4), (5), and (6). In practice, even using the best assignment found, x∗ , shows a great improvement over CD in our experience. This is what we report in this paper. Note also that a full trajectory, as the one shown in Fig. 2, takes about 0.5 seconds on a single Xeon processor. As a testbed for the memcomputing advantage in deep learning, and as a direct comparison to the quantum annealing hardware approaches, we first looked to the reduced MNIST data set as reported in [20] for quantum annealing using a D-wave machine. Therefore, we have first applied the same reduction to the full MNIST problem as given in that work, which consists of removing two pixels around all 28 × 28 grayscale values in both the test and training sets. Then each 4 × 4 block of pixels is replaced by their average values to give a 6×6 reduced image. Finally, the four corner pixels are discarded resulting in a total of 32 pixels representing each image. We also trained the same-size DBN consisting of two stacked RBMs each with 32 visible and hidden nodes, training each RBM one at a time. We put both the CD1 and our Memcomputing-QUBO (Mem-Qubo) approach through N = 1, · · · , 50 generative pretraining iterations using no mini-batching. For the memcomputing approach, we solve one QUBO 1 Mem-QUBO CD-1 Accuracy 0.8 0.6 0.4 0.2 0 0 5 10 15 20 25 30 35 40 45 50 45 50 45 50 Pretraining iterations (b) 500 back-propagation iterations 1 Mem-QUBO CD-1 Accuracy 0.8 0.6 0.4 0.2 0 0 5 10 15 20 25 30 35 40 Pretraining iterations (c) 800 back-propagation iterations 1 Mem-QUBO CD-1 Accuracy 0.8 0.6 0.4 0.2 0 0 5 10 15 20 25 30 35 40 Pretraining iterations Figure 4: Mem-QUBO accuracy on the reduced MNIST test set vs. CD-1 after n = 100(a), 500(b), 800(c) iterations of back-propagation with no mini-batching. The resulting pretraining acceleration shown by the memcomputing approach is denoted by the horizontal arrow. A performance gap also appears, emphasized by the vertical arrow, with Mem-QUBO obtaining a higher level of accuracy than CD-1, even for the highest number of back-propagation iterations. No error bars appear here since we have trained the full test set. problem per pretraining iteration to compute the model expectation value in Eqs. (4), (5), and (6). We pick out the best variable assignment, x∗ , which gives the ground state of Eq. (3) as an effective approximation of the required expectation. After generative training, an output classification layer with 10 nodes was added to the net5 work (see Fig. 1) and 1000 back-propagation iterations were applied in both approaches using mini-batches of 100 samples to generate Fig. 3. For both pretraining and backpropagation, our learning rate was set to  = 0.1 and momentum parameters were α = 0.1 for the first 5 iterations, and α = 0.5 for the rest, same as in [20]. Accuracy on the test set versus CD-1 as a function of the number of pretraining iterations is seen in Fig. 3. The memcomputing method reaches a far better solution faster, and maintains an advantage over CD even after hundreds of back-propagation iterations. Interestingly, our software approach is even competitive with the quantum annealing method done in hardware [20] (cf. Fig. 3 with Figs. 7, 8, and 9 in Ref. [20]). This is quite a remarkable result, since we integrate a set of differential equations of a classical system, in a scalable way, with comparable sampling power to a physically-realized system that takes advantage of quantum effects to improve on CD. Finally, we also trained the RBM on the reduced MNIST data set without mini-batches. We are not aware of quantum-annealing results for the full data set, but we can still compare with the CD approach. We follow a similar procedure as discussed above. In this case, however, no mini-batching was used for a more direct comparison between the Gibbs sampling of CD and our memcomputing approach. The results are shown in Fig. 4 for different numbers of back-propagation iterations. Even on the full modified MNIST set, our memcomputing approach requires a substantially lower number of pretraining iterations to achieve a high accuracy and, additionally, shows a higher level of accuracy over the traditional CD, even after 800 back-propagation iterations. 1 Mem-QUBO+Sig BN+ReLU 0.975 0.95 Accuracy 0.925 0.9 0.875 0.96 0.85 0.95 0.825 0.94 0.8 0.93 0.775 0.75 0.92 800 0 100 200 300 400 500 600 900 700 1000 800 900 1000 Backpropagation Iterations Figure 5: Accuracy on the reduced MNIST test set obtained on a network pretrained with (blue curve) Mem-QUBO and sigmoidal activation functions (Sig) versus the same size network with (red curve) no pretraining but with batch normalization (BN) and rectified linear units (ReLU). Both networks were trained with stochastic gradient descent with momentum and mini-batches of 100. The inset clearly shows an accuracy advantage of Mem-QUBO greater than 1% and an error rate reduction of 20% throughout the training. we employ the batch-normalization procedure [14] coupled with rectified linear units (ReLUs) [13]. As anticipated, batch-normalization smooths out the role of initial conditions, while rectifiers should render the energy landscape defined by Eq. (3) more convex. Therefore, combined they indeed seem to provide an advantage compared to the network trained with CD using sigmoidal functions [13]. However, they are not enough to overcome the advantages of our memcomputing approach. In fact, it is obvious from Fig. 5 that the network pretrained with memcomputing maintains an accuracy advantage (of more than 1% and a 20% reduction in error rate) on the test set out to more than a thousand back-propagation iterations. It is key to note that the network pretrained with memcomputing contains sigmoidal activations compared to the rectifiers in the network with no pretraining. Also, the pretrained network was trained without any batch normalization procedure. Therefore, considering all this, the pretrained network should pose a more difficult optimization problem for stochastic gradient descent. Instead, we found an accuracy advantage of memcomputing throughout the course of training. This points to the fact that with memcomputing, the pretraining procedure is able to operate close to the “true gradient” (Eqs. (4), (5), and (6)) during training, and in doing so, initializes the weights and biases of the network in a advantageous way. 4. The Role of Supervised Training The computational difficulty of computing the exact gradient update in pretraining, combined with the inaccuracies of CD, has inspired research into methods which reduce (or outright eliminate) the role of pretraining deep models. These techniques include changes to the numerical gradient procedure itself, like adaptive gradient estimation [33], changes to the activation functions (e.g., the introduction of rectifiers) to reduce gradient decay and enforce sparsity [13], and techniques like batch normalization to make back-propagation less sensitive to initial conditions [14]. With these new updates, in many contexts, deep networks initialized from a random initial condition are found to compete with networks pretrained with CD [13]. To complete our analysis we have then compared a network pretrained with our memcomputing approach to these back-propagation methods with no pretraining. Both networks were trained with stochastic gradient descent with momentum and the same learning rates and momentum parameter we used in Section 3. In Fig. 5, we see how these techniques fair against a network pretrained with the memcomputing approach on the reduced MNIST set. In the randomly initialized network, 5. Conclusions In this paper we have demonstrated how the memcomputing paradigm (and, in particular, its digital realization [22]) can be applied toward the chief bottlenecks in deep learning today. In this paper, we directly assisted a popular algorithm to pretrain RBMs and DBNs, which 6 consists of gradient ascent on the log-likelihood. We have shown that memcomputing can accelerate considerably the pretraining of these networks far better than what is currently done. In fact, simulations of digital memcomputing machines achieve accelerations of pretraining comparable to, in number of iterations, the hardware application of the quantum annealing method, but with better quality. In addition, unlike quantum computers, our approach can be easily scaled on classical hardware to full size problems. In addition, our memcomputing method retains an advantage also with respect to advances in supervised training, like batch-norming and rectifiers, that have been introduced to eliminate the need of pretraining. We find indeed, that despite our pretraining done with sigmoidal functions, hence on a more non-convex landscape than that provided by rectifiers, we maintain an accuracy advantage greater than 1% (and a 20% reduction in error rate) throughout the training. Finally, the form of the energy in Eq. 3 is quite general and encompasses full DBNs. In this way, our method can also be applied to pretraining entire deep-learning models at once, potentially exploring parameter spaces that are inaccessible by any other classical or quantum methods. We leave this interesting line of research for future studies. Acknowledgments – We thank Forrest Sheldon for useful discussions and Yoshua Bengio for pointing out the role of supervised training techniques. H.M. acknowledges support from a DoD-SMART fellowship. M.D. acknowledges partial support from the Center for Memory and Recording Research at UCSD. [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] References [22] [1] Y. LeCun, Y. Bengio, G. Hinton, Deep learning, Nature 521 (7553) (2015) 436–444. [2] A. Krizhevsky, I. Sutskever, G. E. Hinton, Imagenet classification with deep convolutional neural networks, in: Advances in neural information processing systems, 2012, pp. 1097–1105. [3] G. Hinton, L. Deng, D. Yu, G. E. Dahl, A.-r. Mohamed, N. Jaitly, A. Senior, V. Vanhoucke, P. Nguyen, T. N. Sainath, et al., Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups, IEEE Signal Processing Magazine 29 (6) (2012) 82–97. [4] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, et al., Human-level control through deep reinforcement learning, Nature 518 (7540) (2015) 529–533. [5] P. Smolensky, Information processing in dynamical systems: foundations of harmony theory, in: Parallel distributed processing: explorations in the microstructure of cognition, vol. 1, MIT Press, 1986, pp. 194–281. [6] Y. Bengio, et al., Learning deep architectures for ai, Foundations and trends R in Machine Learning 2 (1) (2009) 1–127. [7] D. E. Rumelhart, G. E. Hinton, R. J. Williams, Learning representations by back-propagating errors, nature 323 (6088) (1986) 533–536. [8] A. Choromanska, M. Henaff, M. Mathieu, G. B. Arous, Y. LeCun, The loss surfaces of multilayer networks, in: Artificial Intelligence and Statistics, 2015, pp. 192–204. [9] Y. N. Dauphin, R. Pascanu, C. Gulcehre, K. Cho, S. Ganguli, Y. Bengio, Identifying and attacking the saddle point problem [23] [24] [25] [26] [27] [28] [29] [30] [31] 7 in high-dimensional non-convex optimization, in: Advances in neural information processing systems, 2014, pp. 2933–2941. G. E. Hinton, S. Osindero, Y.-W. Teh, A fast learning algorithm for deep belief nets, Neural computation 18 (7) (2006) 1527– 1554. G. E. Hinton, Training products of experts by minimizing contrastive divergence, Training 14 (8). I. Sutskever, T. Tieleman, On the convergence properties of contrastive divergence, in: Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, 2010, pp. 789–795. X. Glorot, A. Bordes, Y. Bengio, Deep sparse rectifier neural networks, in: Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, 2011, pp. 315– 323. S. Ioffe, C. Szegedy, Batch normalization: Accelerating deep network training by reducing internal covariate shift, in: F. Bach, D. Blei (Eds.), Proceedings of the 32nd International Conference on Machine Learning, Vol. 37 of Proceedings of Machine Learning Research, PMLR, Lille, France, 2015, pp. 448– 456. URL http://proceedings.mlr.press/v37/ioffe15.html T. Tieleman, G. Hinton, Using fast weights to improve persistent contrastive divergence, in: Proceedings of the 26th Annual International Conference on Machine Learning, ACM, 2009, pp. 1033–1040. E. Romero Merino, F. Mazzanti Castrillejo, J. Delgado Pin, D. Buchaca Prats, Weighted Contrastive Divergence, ArXiv eprintsarXiv:1801.02567. A. M. Sheri, A. Rafique, W. Pedrycz, M. Jeon, Contrastive divergence for memristor-based restricted boltzmann machine, Engineering Applications of Artificial Intelligence 37 (2015) 336–342. J. Biamonte, P. Wittek, N. Pancotti, P. Rebentrost, N. Wiebe, S. Lloyd, Quantum machine learning, Nature 549 (7671) (2017) 195–202. N. Wiebe, A. Kapoor, K. M. Svore, Quantum deep learning, arXiv preprint arXiv:1412.3489. S. H. Adachi, M. P. Henderson, Application of quantum annealing to training of deep neural networks, arXiv preprint arXiv:1510.06356. F. L. Traversa, M. Di Ventra, Universal memcomputing machines, IEEE Trans. on Neural Networks 26 (2015) 2702–2715. F. L. Traversa, M. Di Ventra, Polynomial-time solution of prime factorization and np-complete problems with digital memcomputing machines, Chaos: An Interdisciplinary Journal of Nonlinear Science 27 (2) (2017) 023107. arXiv:http://dx.doi.org/ 10.1063/1.4975761, doi:10.1063/1.4975761. URL http://dx.doi.org/10.1063/1.4975761 F. L. Traversa, P. Cicotti, F. Sheldon, M. Di Ventra, Evidence of an exponential speed-up in the solution of hard optimization problems, ArXiv e-printsarXiv:1710.09278. H. Manukian, F. L. Traversa, M. Di Ventra, Memcomputing numerical inversion with self-organizing logic gates, IEEE Transactions on Neural Networks and Learning Systems PP (99) (2017) 1–6. doi:10.1109/TNNLS.2017.2697386. M. Di Ventra, Y. V. Pershin, The parallel approach, Nature Physics 9 (2013) 200–202. M. Di Ventra, F. L. Traversa, I. V. Ovchinnikov, Topological field theory and computing with instantons, Annalen der Physik (2017) 1700123doi:10.1002/andp.201700123. G. Hinton, A practical guide to training restricted boltzmann machines, Momentum 9 (1) (2010) 926. S. Arora, B. Barak, Computational Complexity: A Modern Approach, Cambridge University Press, 2009. Z. Bian, F. Chudak, W. G. Macready, G. Rose, The ising model: teaching an old problem new tricks, D-wave systems (2010) 1– 32. J. Håstad, Some optimal inapproximability results, Journal of the ACM (JACM) 48 (4) (2001) 798–859. M. Di Ventra, F. L. Traversa, Absence of periodic orbits in digital memcomputing machines with solutions, Chaos: An Interdisciplinary Journal of Nonlinear Science 27 (2017) 101101. [32] M. Di Ventra, F. L. Traversa, Absence of chaos in digital memcomputing machines with solutions, Phys. Lett. A 381 (2017) 3255. [33] D. Kingma, J. Ba, Adam: A method for stochastic optimization, arXiv preprint arXiv:1412.6980. 8
2cs.AI
Confluence and Convergence in Probabilistically Terminating Reduction Systems arXiv:1709.05123v2 [cs.PL] 3 Oct 2017 Maja H. Kirkeby and Henning Christiansen Computer Science, Roskilde University, Denmark [email protected] and [email protected] Abstract. Convergence of an abstract reduction system (ARS) is the property that any derivation from an initial state will end in the same final state, a.k.a. normal form. We generalize this for probabilistic ARS as almost-sure convergence, meaning that the normal form is reached with probability one, even if diverging derivations may exist. We show and exemplify properties that can be used for proving almost-sure convergence of probabilistic ARS, generalizing known results from ARS. 1 Introduction Probabilistic abstract reduction systems, PARS, are general models of systems that develop over time in discrete steps [7]. In each non-final state, the choice of successor state is governed by a probability distribution, which in turn induces a global, probabilistic behaviour of the system. Probabilities make termination more than a simple yes-no question, and the following criteria have been proposed: probabilistic termination – a derivation terminates with some probability > 0 – and almost-sure termination – a derivation terminates with probability = 1, even if infinite derivations may exist (and whose total probability thus amounts to 0). When considering a PARS as a computational system, almostsure termination may be the most interesting, and there exist well-established methods for proving this property [6,10]. PARS cover a variety of probabilistic algorithms and programs, scheduling strategies and protocols [5,7,23], and PARS is a well-suited abstraction level for better understanding their termination and correctness properties. Randomized or probabilistic algorithms (e.g., [4,20,21]) come in two groups: Monte Carlo Algorithms that allow a set of alternative outputs (typically only correct with a certain probability or within a certain accuracy), e.g., Karger-Stein’s Minimum Cut [18], Monte Carlo integration and Simulated Annealing [19]; and Las Vegas Algorithms, that provide one (correct) output and that may be simpler and on average more efficient than their deterministic counterparts, e.g., Randomized Quicksort [11], checking equivalence of circular lists [17], probabilistic modular GCD [30]. We focus on results that are relevant for the latter kind of systems, and here the property of convergence is interesting, as it may be a necessary condition for correctness: a system is convergent if it is guaranteed to terminate with a unique result. We introduce the notion of almost-sure convergence for Preliminary proceedings of LOPSTR 2017. October 10–12, 2017, Namur, Belgium The research leading to this paper is supported by The Danish Council for Independent Research, Natural Sciences, grant no. DFF 4181-00442. PARS, meaning that a unique result is found with probability = 1, although there may be diverging computations; this property is a necessary condition for partial correctness, more precisely a strengthened version of partial correctness where the probability of not getting a result is zero. The related notion of confluence has been extensively studied for ARS, e.g., [3,16], and especially for terminating ones for which confluence implies convergence: a system is confluent if, whenever alternative paths (i.e., repeated reductions; computations) are possible from some state, these paths can be extended to join in a common state. Newman’s lemma [22] from 1942 is one of the most central results: in a terminating system, confluence (and thus convergence) can be shown from a simpler property called local confluence. In, e.g., term rewriting [3] and (a subset of) the programming language CHR [1,2], proving local confluence may be reduced to a finite number of cases, described by critical pairs (for a definition, see these references), which in some cases may be checked automatically. It is well-known that Newman’s lemma does not generalize to non-terminating systems (and thus neither to almost-sure terminating ones); see, e.g., [16]. Probabilistic and almost-sure versions of confluence were introduced concurrently by Frühwirth et al. [12] – in the context of a probabilistic version of CHR – and by Bournez and Kirchner [7] in more generality for PARS. However, the definitions in the latter reference were given indirectly, assuming a deep insight into Homogeneous Markov Chain Theory, and a number of central properties were listed without hints of proofs. In the present paper, we consider the important property of almost-sure convergence for PARS and state properties that are relevant for proving it. In contrast to [7], our definitions are self-contained, based on elementary math, and proofs are included. One of our main and novel results is that almost-sure termination together with confluence (in the classical sense) gives almost-sure convergence. Almost-sure convergence and almost-sure termination were introduced in an early 1983 paper [13] for a specific class of probabilistic programs with finite state space, but our generalization to PARS’ appears to be new. In 1991, Curien and Ghelli [9] described a powerful method for proving confluence of non-probabilistic systems, using suitable transformations from the original system into one, known to be confluent. We can show how this result applies to probabilistic systems, and we develop an analogous method for also proving non-confluence. In section 2, we review definitions for abstract reduction systems and introduce and motivate our choices of definitions for their probabilistic counterparts; a proof that the defined probabilities actually constitute a probability distribution is found in the Appendix. Section 3 formulates and proves important properties, relevant for showing almost-sure convergence of particular systems. Section 4 goes in detail with applications of the transformational approach [9] to (dis-) proving almost-sure convergence, and in Section 5 we demonstrate the use of this for a random walk system and Hermans’ Ring. We add a few more comments on selected, related work in section 6, and section 7 provides a summary and suggestions for future work. 2 2 Basic definitions The definitions for non-probabilistic systems are standard; see, e.g., [16,3]. Definition 1 (ARS). An Abstract Reduction System is a pair R = (A, →) where the reduction → is a binary relation on a countable set A. Instead of (s, t) ∈ → we write s → t (or t ← s when convenient), and s →∗ t denotes the transitive reflexive closure of →. In the literature, an ARS is often required to have only finite branching. i.e., for any element s, the set {t | s → t} is finite. We do not require this, as the implicit restriction to countable branching is sufficient for our purposes. The set of normal forms RNF are those s ∈ A for which there is no t ∈ A such that s → t. For given element s, the normal forms of s, are defined as the set RNF (s) = {t ∈ RNF | s →∗ t}. An element which is not a normal form is said to be reducible; i.e., an element s is reducible if and only if {s′ | s → s′ } = 6 ∅. A path from an element s is a (finite or infinite) sequence of reductions s → s1 → s2 → · · · ; a finite path s → s1 → s2 → · · · → sn has length n (n ≥ 0); in particular, we recognize an empty path (of length 0) from a given state to itself. For given elements s and t ∈ RNF (s), ∆(s, t) denotes the set of finite paths s → · · · → t (including the empty path); ∆∞ (s) denotes the set of infinite paths from s. A system is – – – – – confluent if for all s1 ←∗ s →∗ s2 there is a t such that s1 →∗ t ←∗ s2 , locally confluent if for all s1 ← s → s2 there is a t such that s1 →∗ t ←∗ s2 , terminating 1 iff it has no infinite path, convergent iff it is terminating and confluent, and normalizing 2 iff every element s has a normal form, i.e., there is an element t ∈ RNF such that s →∗ t. Notice that a normalizing system may not be terminating. A fundamental result for ARS is Newman’s Lemma: a terminating system is confluent if and only if it is locally confluent. The following property indicates the complexity of the probability measures that are needed in order to cope with paths in probabilistic abstract reduction systems defined over countable sets. Proposition 1. Given an ARS as above and given elements s and t ∈ RNF (s), it holds that ∆(s, t) is countable, and ∆∞ (s) may or may not be countable. S Proof. For the first part, ∆(s, t) is isomorphic to a subset of n=1,2,... An . A countable union of countable sets is countable, so ∆(s, t) is countable. For the second part, consider the ARS h{0, 1}, {i → j | i, j ∈ {0, 1}}i. Each infinite path can be read as a real number in the unit interval, and any such real number can be described by an infinite path. The real numbers are not countable. 1 2 A terminating system is also called strongly normalizing elsewhere, e.g., [9]. A normalizing system is also called weakly normalizing or weakly terminating elsewhere, e.g., [9]. 3 This means that we can define discrete and summable probabilities over ∆(s, t), and – which we will avoid – considering probabilities over the space ∆∞ (s) requires a more advanced measure. In the next definition, a path is considered a Markov process/chain, i.e., each reduction step is independent of the previous ones, and thus the probability of a path is defined as a product in the usual way. PARS can be seen as a special case of Homogenous Markov Chains, cf. [7], but for practical reasons it is relevant to introduce them as generalizations of ARS. Definition 2 (PARS). A Probabilistic Abstract Reduction System is a pair RP = (R, P ) where R = (A, →) is an ARS, and for each reducible element s∈A P\ RNF , P (s → ·) is a probability distribution over the reductions from s, i.e., s→t P (s → t) = 1; it is assumed, that for all s and t, P (s → t) > 0 if and only if s → t. The probability of a finite path s0 → s1 → . . . → sn with n ≥ 0 is given as P (s0 → s1 → . . . → sn ) = n Y P (si−1 → si ). i=1 For any element s and normal form t ∈ RNF (s), the probability of s reaching t, written P (s →∗ t), is defined as X P (δ); P (s →∗ t) = δ∈∆(s,t) the probability of s not reaching a normal form (or diverging) is defined as X P (s →∗ t). P (s →∞ ) = 1 − t∈RNF (s) When referring to confluence, local confluence, termination, and normalization of a PARS, we refer to these properties for the underlying ARS. Notice that when s is a normal form then P (s →∗ s) = 1 since ∆(s, t) contains Q0 only the empty path with probability i=1 P (si−1 → si ) = 1. It is important that P (s →∗ t) is defined only when t is a normal form of s since otherwise, the defining sum may be ≥ 1, as demonstrated by the following example. Example 1. Consider the PARS RP given in Figure 1(a); formally, RP = (({0, 1}, {0  1, 1  1}), P ) with P (0  1) = 1 and P (1  1) = 1. An attempt to define P (0 →∗ 1) as in Def. 2, for the reducible element 1, does not lead to a probability, i.e., P (0 →∗ 1) 6≤ 1: P (0 →∗ 1) = P (0 1) + P (0 11) + P (0  111) + . . . = ∞. The following proposition justifies that we refer to P as a probability function. Proposition 2. For an arbitrary finite path π, 1 ≥ P (π) > 0. For every element s, P (s →∗ ·) and P (s →∞ ) comprise a probabilityPdistribution, i.e., ∀t ∈ RNF (s) : 0 ≤ P (s →∗ t) ≤ 1; 0 ≤ P (s →∞ ) ≤ 1; and t∈RNF (s) P (s →∗ t) + P (s →∞ ) = 1. 4 0 1/2 1/2 1 0 1 1 (a) a 0 1 1 1/2 a (b) 1/2 0 1 1/2 b 1−1/4 1/42 1/4 1 1−1/42 2 1−1/43 1/43 1/44 1−1/44 3 ... ... a 1/2 (d) (c) Fig. 1. PARS with different properties, see Table 1. Proof. The proofs are simple but lengthy and are given in the Appendix. Proposition 3 justifies that we refer to P (s →∞ ) as a probability of divergence. ∞ Proposition 3. Consider a PARS which has an element Q s for which ∆ (s) is countable (finite or infinite). Let P (s1 → s2 → · · · )P= i=1,2,...P (si → si+1 ) be the probability of an infinite path then P (s →∞ ) = δ∈∆∞ (s) P (δ) holds. Proof. See Appendix. We can now define probabilistic and almost-surely (abbreviated “a-s.”) versions of important notions for derivation systems. A system is – almost-surely convergent if for all s1 ←∗ s →∗ s2 there is a normal form t ∈ RNF such that s1 →∗ t ←∗ s2 and P (s1 →∗ t) = P (s2 →∗ t) = 1, – locally almost-surely convergent if for all s1 ← s → s2 there is a t ∈ RNF such that s1 →∗ t ←∗ s2 and P (s1 →∗ t) = P (s2 →∗ t) = 1, – almost-surely terminating 3 iff every element s has P (s →∞ ) = 0, and – probabilistically normalizing iff every element s has a normal form t such that P (s →∗ t) > 0. We have deliberately omitted almost-sure confluence and local confluence [7], since these require a more advanced measure in order to define the probability of visiting a perhaps reducible element. Loc. confl. Confl. Term. A-s. loc. conv. A-s. conv. A-s. term. (a) (b) (c) (d) (d′ ) + + + + + + + – + + – – – – – – + – – + – + – – + – + + – + Table 1. A property overview of the systems (a)–(d) in Figure 1 and (d′ ) with same ARS as (d), but with all probabilities replaced by 1/2. 3 Almost-sure termination is named probabilistic termination elsewhere, e.g., [28,12]. 5 Example 2. The four probabilistic systems in Figure 1 demonstrate these properties. We notice that (b)–(d) are normalizing in {a}, {a, b} and {a}, respectively. Furthermore, they are all non-terminating: system (b) and (c) are a-s. terminating, which is neither Q∞the case for (a) nor (d); for element 0 in system (d) we have P (0 →∞ ) = i=1 (1 − (1/4)i ) ≈ 0.6885 > 0.4 Table 1 summarizes their properties of (almost-sure) (local) confluence; (d′ ) refers to a PARS with the same underlying ARS as (d) and with all probabilities = 1/2. System (c) is a probabilistic version of a classical example [15,16] which demonstrates that termination (and not only a-s. termination) is required in order for local confluence to imply confluence. The difference between system (d) and (d′ ) emphasizes that the choice of probabilities do matter for whether or not different probabilistic properties hold. For any element s in (d′ ), the probability of reaching the normal form a is 1/2 + 1/22 + 1/23 + · · · = 1. 3 Properties of Probabilistic Abstract Reduction Systems With a focus on almost-sure convergence, we consider now relevant relationships between the properties of probabilistic and their underlying non-probabilistic systems. Lemmas 1 and 3, below, have previously been suggested by [7] without proofs, and we have chosen to include them as well as their proofs to provide a better understanding of the nature of almost-sure convergence. The most important properties are summarized as follows. For any PARS RP : – – – – RP is normalizing if and only if it is probabilistically normalizing (Lemma 1), if RP is almost-surely terminating then it is normalizing (Lemma 2), if RP is terminating then it is almost-surely terminating (Lemma 3), RP is almost-surely terminating and confluent, if and only if it is almostsurely convergent (Theorem 1). The following inductive characterization of the probabilities for reaching a given normal form is useful for the proofs that follow. Proposition 4. For any reducible element s, the following holds.  X X X ∗ ′ ′ ∗ P (s → t) = P (s → s ) × P (s → t) t∈RNF s→s′ t∈RNF Proof. Any path from s to a normal form t will have the form s → s′ → · · · → t, for some direct successor s′ of s. The other way round, any normal form for a direct successor s′ of s will also be a normal form of s. With this observation, the proposition follows directly from Definition 2 (prob. of path). Lemma 1 ([7]). A PARS is normalizing if and only if it is probabilistically normalizing. 4 Verified by Mathematica. The exact result is this notation. 6 1 1 ; ; 4 4 ∞  see [29] for the definition of Proof. Every element s in a normalizing PARS has a normal form t such that s →∗ t and by definition of PARS, P (s →∗ t) > 0, which makes it probabilistically normalizing. The other way round, the definition of probabilistic normalizing includes normalization. Prob. normalization differs from the other properties in nature (requiring probability > 0 instead of = 1), and is the only one which is equivalent to its nonprobabilistic counterpart. Thus, the existing results on proving and disproving normalization can be used directly to determine probabilistic normalization. The following lemma is also a consequence of Proposition 7, parts 3 and 5, of [7]. Lemma 2. If a PARS is almost-surely terminating then it is normalizing. Proof. For P every element s in a almost-surely terminating system, Proposition 2 gives that t∈RNF P (s →∗ t) = 1, and hence s has at least one normal form t such that P (s →∗ t) > 0. By Lemma 1, the system is also normalizing. The opposite is not the case, as demonstrated by system (d) in Figure 1; every element has a normal form, but the system is not almost-surely terminating. Lemma 3 ([7]). If a PARS is terminating then it is almost-surely terminating. Proof. In a terminating PARS, ∆∞ (s) = ∅ for any element s. By Proposition 3 we have P (s →∞ ) = 0. The opposite is not the case, as demonstrated by systems (b)–(d) in Figure 1. The following theorem is a central tool for proving almost-sure convergence. Theorem 1. A PARS is almost-surely terminating and confluent if and only if it is almost-surely convergent. Thus, to prove almost-sure convergence of a given PARS, one may use the methods of [10,6] to prove almost-sure termination and prove classical confluence – referring to Newman’s lemma (cf. our discussion in the Introduction), or using the method of mapping the system into another system, already known to be confluent, as described in Section 4, below. Proof (Theorem 1). We split the proof into smaller parts, referring to properties that are shown below: “if”: by Prop. 5 and Lemma 6. “only if”: by Lemma 5. Lemma 4. A PARS is almost-surely terminating if it is locally almost-surely convergent. Proof. Let RP be a PARS which is locally almost-surely convergent, and consider element s. We must show P (s →∞ ) = 0 or, equivalently, P an arbitrary ∗ t∈RNF P (s → t) = 1. When s is a normal form, we have P (s →∗ s) = 1 and thus the desired property. Assume, now, s is not a normal form. This means that s has at least 7 one direct successor; for any two (perhaps identical) direct successors s′ , s′′ , local almost-sure convergence implies a unique normal form ts′ ,s′′ of s′ as well as of s′′ with P (s′ →∗ ts′ ,s′′ ) = P (s′′ →∗ ts′ ,s′′ ) = 1. Obviously, this normal form is the same for all such successors and thus a unique normal form of s, so let us call it ts . We can now use Proposition 4 as follows.  X X X P (s  s′ ) = 1. P (s  s′ )·P (s′ ∗ ts ) = P (s ∗ t) = P (s ∗ ts ) = t∈RNF s→s′ s→s′ This finishes the proof. Since almost-sure convergence implies local almost-sure convergence, we obtain the weaker version of the above lemma. Proposition 5. A PARS is almost-surely terminating if it is almost-surely convergent. The following property for (P)ARS, is used in the proof of Lemma 5, below. Proposition 6. A normalizing system is confluent if and only if every element has a unique normal form. Proof. “If”: By contradiction: Let RP be a normalizing (P)ARS; assume that every element has a unique normal form and that RP is not confluent. By nonconfluence, there exist s1 ←∗ s →∗ s2 for which there does not exists a t such that s1 →∗ t ←∗ s2 . However, s has one unique normal form t′ , i.e., {t′ } = RNF (s). By definition of normal forms of s, we have that ∀s′ : s →∗ s′ ⇒ RNF (s) ⊇ RNF (s′ ). This holds specifically for s1 and s2 , i.e., {t′ } = RNF (s) ⊇ RNF (s1 ) and {t′ } = RNF (s) ⊇ RNF (s2 ). Since R is normalizing, every element has at least one normal form, i.e., RNF (s1 ) 6= ∅ and RNF (s2 ) 6= ∅, leaving one possibility: RNF (s1 ) = RNF (s2 ) = {t′ }. From this result we obtain s →∗ s1 →∗ t′ and s →∗ s2 →∗ t′ ; contradiction. “Only if”: This is a known result; see, e.g., [3]. Lemma 5. If a PARS is almost-surely terminating and confluent then it is almost-surely convergent. Proof. Lemma 2 and Prop. 6 ensure that an a-s. terminating system has a unique normal form. A-s. termination also ensures that this unique normal form is reached with probability = 1, and thus the system is almost-surely convergent. Lemma 6. A PARS is confluent if it is almost-surely convergent. Proof. Assume almost-sure convergence, then for each s1 ←∗ s →∗ s2 there exists a t (a normal form) such that s1 →∗ t ←∗ s2 . 4 Showing Probabilistic Confluence by Transformation The following proposition is a weaker formulation and consequence of Theorem 1; it shows that (dis)proving confluence for almost-surely terminating systems is very relevant when (dis)proving almost-sure convergence. 8 Proposition 7. An almost-surely terminating PARS is almost-surely convergent if and only if it is confluent. Proof. This is a direct consequence of Theorem 1 (or using Lemma 5 and 6). Curien and Ghelli [9] presented a general method for proving confluence by transforming5 the system of interest (under some restrictions) to a new system which is known to be confluent. We start by repeating their relevant result. Lemma 7 ([9]). Given two ARS R = (A, →R ) and R′ = (A, →R′ ) and a mapping G : A → A′ , then R is confluent if the following holds. (C1) (C2) (C3) (C4) (C5) R′ is confluent, R is normalizing, if s →R t then G(s) ↔∗R′ G(t), ′ ∀t ∈ RNF , G(t) ∈ RNF , and ∀t, u ∈ RNF , G(t) = G(u) ⇒ t = u We present a version which permits also non-confluence of the transformed system to imply non-confluence of the original system. Notice that (C2)–(C5) is a part of (C2′ )–(C5′ ), and in particular (C4′ ) requires additionally that only normal forms are mapped to normal forms. Lemma 8. Given two ARS R = (A, →R ) and R′ = (A, →R′ ) and a mapping G : A → A′ , satisfying (C1 ′ ) (surjective) ∀s′ ∈ A′ , ∃s ∈ A, G(s) = s′ , (C2 ′ ) R and R′ are normalizing, (C3 ′ ) if s →R t then G(s) ↔∗R′ G(t), and if G(s) ↔∗R′ G(t) then s ↔∗R t, ′ ′ ′ (C4 ) ∀t ∈ RNF , G(t) ∈ RNF , and ∀t′ ∈ RNF , G−1 (t′ ) ⊆ RNF , ′ (C5 ) (injective on normal forms) ∀t, u ∈ RNF , G(t) = G(u) ⇒ t = u, then R is confluent iff R′ is confluent. Proof. “⇒”: follows from Lemma 7. “⇐”: Assume that R is confluent and R′ is not confluent, i.e., there exist s′1 ←∗R′ s′ →∗R′ s′2 for which ∄t′ ∈ R′ : s′1 →∗R′ t′ ←∗R′ s′2 . ′ By (C2′ ): ∃t′1 , t′2 ∈ RNF : t′1 ←∗R′ s′1 ←∗R′ s′ →∗R′ s′2 →∗R′ t′2 where t′1 6= t′2 . ′ ′ By (C1 ) and (C4 ): ∃t1 , t2 ∈ RNF : G(t1 ) = t′1 ∧ G(t2 ) = t′2 By (C5′ ): t1 6= t2 By (C3′ ): t′1 ↔∗R′ t′2 ⇒ t1 ↔∗R t2 By confluence of R: t1 = t2 (contradicts t1 6= t2 ). We summarize the application of the above to probabilistic systems in Theorems 2 and 3. 5 This is also referred to as interpreting a system elsewhere, e.g., [9]. 9 Theorem 2. An almost-surely terminating PARS RP = ((A, →R ), P ) is almostsurely convergent if there exists an ARS R′ = (A′ , →R′ ) and a mapping G : A → A′ which together with (A, →R ) satisfy (C1)–(C5). Proof. Since RP is a-s. terminating, R is normalizing (Lemma 2). So, given an ARS R′ and G be a mapping from R to R′ satisfying (C1), (C3)–(C5), we can apply Lemma 7 and obtain that R and thereby RP is confluent. A-s. convergence of RP follows from Prop. 7 since RP is confluent and a-s. terminating Example 3. We consider the nonterminating, almost-surely terminating system RP (below to the left) with the underlying normalizing system R (below, middle), the confluent system R′ (below to the right) and the mapping G(0) = 0, G(a) = a. p RP : 0 1-p a R: 0 a R′ : 0 a The systems R, R′ and the mapping G satisfy (C1)–(C5), and therefore we can conclude that RP is almost-surely convergent. Theorem 3. Given an almost-surely terminating PARS RP = (R, P ) with R = (A, →R ), an ARS R′ = (A, →R′ ) and a mapping G from A to A′ which together with R satisfy (C1′ )–(C5′ ), then system RP is almost-surely convergent if and only R′ is confluent. Proof. Assume notation as above. Since RP is a-s. terminating, R is normalizing (Lemma 2), thus satisfying the first part of (C2′ ). So, given an ARS R′ and G be a mapping from A to A′ which together with R satisfy (C1′ )–(C5′ ), we can apply Lemma 7 obtaining that R is confluent iff R′ is confluent. Prop. 7 gives that the a-s. terminating RP is a-s. convergent iff R′ is confluent. 5 Examples In the following we show almost-sure convergence in two different cases that examplifies Theorem 3. We use the existing method for showing almost-sure termination [10,6]: To prove that a PARS RP = ((A, →), P ) is a-s. terminating, it suffices to show existence of a Lyapunov ranking function, i.e., a measure + V ∀s ∈ A there exists an ǫ > 0 so the inequality of s, V(s) ≥ P: A → R where ′ ′ P (s → s ) · V(s ) + ǫ holds. s→s′ 5.1 A Simple, Antisymmetric Random Walk We consider RP = (R, P ), depicted in Figure 2(a), a simple positive antisymmetric 1-dimensional random walk. In each step the value n can either increase to n + 1, P (n → n + 1) = 1/3, or decrease to n − 1 (or if at 0 we “decrease” to the normal form a instead), P (n → n − 1) = P (0 → a) = 2/3. 10 Formally, the underlying system R = (A, →) is defined by A = N ⊎ {a} and → = {0 → a} ⊎ {n → n′ | n, n′ ∈ N, n′ = n + 1 ∨ n′ = n − 1}. We start by showing RP a-s. terminating, i.e., that a Lyapunov ranking function exists: let the measure V be defined as follows. ( s + 2, if s ∈ N V(s) = 1, if s = a This function is a Lyapunov ranking since the inequality (see above) holds for all elements s ∈ A; we divide into three cases s > 0, s = 0, and s = a: V(s) > 13 · V(s + 1) + 32 · V(s − 1) ⇔ s + 2 > 31 · (s + 3) + 23 · (s + 1) (= s + 35 ) V(0) > 13 · V(1) + 23 · V(a) ⇔ 2 > 31 · 3 + 23 · 1 , and V(a) > 0 ⇔ 1 > 0. Since RP is a-s. terminating, it suffice to define R′ = ({number, a}, number → a), see Figure 2(c), and the mapping G : N ⊎ {a} → {number, a}. ( number, if s ∈ N G(s) = a, otherwise. Because RP is a-s. terminating, R′ is (trivially) a confluent system, and the mapping G satisfies (C1′ )–(C5′ ) then RP is a-s. convergent (by Theorem 3). 5.2 Herman’s self-stabilizing Ring Herman’s Ring [14] is an algorithm for self-stabilizing n identical processors connected in an uni-directed ring, indexed 1 to n. Each process can hold one or zero tokens, and for each time-step, each process either keeps its token or passes it to its left neighbour (-1) with probability 1/2 of each event. When a process keeps its token and receives another, both tokens are eliminated. Herman showed that for an initial state with an odd number of tokens, the system will reach a stable state with one token with probability =1. This system is not almost-sure convergent, but proving it for a similar system can be a part of showing that Herman’s Ring with 3 processes either will stabilize with 1 token with probability = 1 or 0 tokens with probability = 1. We use a boolean array to 1/3 0 2/3 2/3 1/3 1 1/3 1/3 2 2/3 ... 3 2/3 0 1 2 3 ... number 2/3 a a a P (b) Underlying R. (a) Original R . Fig. 2. Random Walk (1 Dimension) 11 (c) Confluent R′ . 1/4 1/2 [001] 1/4 1/4 [111] 1/2 1/4 [101] 1/2 [010] 1/4 1/4 1/4 1/2 1/2 1/4 1/4 1/4 1/4 [100] 1/2 [000] 1/4 1/2 [011] 1/4 odd even [100] [000] 1/4 [110] 1/4 P (a) Original R (both dashed and solid edges) and the almost-surely terminating R′P (without the dashed edges). (b) Confluent R′′ . Fig. 3. Herman’s self-stabilizing Ring represent whether each process holds a token (1 indicates a token) and is defined as in Figure 3(a), where both dashed and solid edges indicate reductions. Since [000] is a normal form and {[100], [010], [001]} is the set of successorstates of each of [100],[010] and [001], then we can prove stabilization of RP by showing almost-sure convergence for a slightly altered system R′P , i.e., the system in Figure 3(a) consisting of the solid edges only. To show almost-sure convergence of R′P , we prove almost-sure termination by showing the existence of a Lyapunov ranking function, namely V([b1 b2 b3 ]) = 22 · (b1 + b2 + b3 ) + b1 · 20 + b2 · 21 + b3 · 22 , which decreases, firstly, with the reduction of tokens and, secondly, by position of the tokens. The only two states where V increases in a direct successor are [110] and [101] where the inequality of [110] reduces to 11 > 9 + 12 and that of [101] to 14 > 9 + 12 showing RP to be a-s. terminating. We provide, now, a mapping G from the elements of the underlying system into the elements of a trivially confluent system, i.e., R′′ in Figure 3(b): G([100]) = [100] G([000]) = [000] G([111]) = G([001]) = G([010]) = odd G([011]) = G([101]) = G([110]) = even The RP is a-s. term., R′′ is confluent and G satisfy (C1’)–(C5’), then (by Thm. 3) RP is a-s. convergent. 6 Related Work We see our work as a succession of the earlier work by Bournez and Kirchner [7], with explicit and simple definitions (instead of referring to Homogeneous Markov Chain theory) and proofs of central properties, and showing novel properties that are important for showing (non-) convergence. Our work borrows inspirations from the result of [12,27,28], given specifically for probabilistic extensions of the programming languages CHR. A notion of so-called nondeterministic PARS have been introduced, e.g., [6,10], in which the choice of probability distribution for next reduction is nondeterministic; these are not covered by our results. 12 PARS can be implemented directly in Sato’s PRISM System [24,25], which is a probabilistic version of Prolog, and recent progress for nonterminating programs [26] may be useful convergence considerations. 7 Conclusion We have considered almost-sure convergence – and how to prove it – for probabilistic abstract reduction systems. Our motivation is the application of such systems as computational systems having a deterministic input-output relationship, and therefore almost-sure termination is of special importance. We have provided properties that are useful when showing almost-sure (non-) convergence by consequence of other probabilistic and “classic” properties and by transformation. We plan to generalize these results to almost-sure convergence modulo equivalence relevant for some Monte-Carlo Algorithms, that produces several correct answers (e.g. Simulated Annealing), and thereby continuing the work we have started for (non-probabilistic) CHR [8]. References 1. Slim Abdennadher. Operational semantics and confluence of constraint propagation rules. In CP97, volume 1330 of LNCS, pages 252–266. Springer, 1997. 2. Slim Abdennadher, Thom W. Frühwirth, and Holger Meuss. On confluence of Constraint Handling Rules. In CP96, volume 1118 of LNCS, pages 1–15. Springer, 1996. 3. Franz Baader and Tobias Nipkow. Term rewriting and all that. Cambridge University Press, 1999. 4. Laszlo Babai. Monte-Carlo algorithms in graph isomorphism testing. Université de Montréal Technical Report, DMS, (79):1–33, 1979. 5. Christel Baier and Joost-Pieter Katoen. Principles Of Model Checking, volume 950. 2008. 6. Olivier Bournez and Florent Garnier. Proving positive almost sure termination under strategies. In Frank Pfenning, editor, RTA 2006, volume 4098 of LNCS, pages 357–371. Springer, 2006. 7. Olivier Bournez and Claude Kirchner. Probabilistic rewrite strategies. Applications to ELAN. In Sophie Tison, editor, RTA 2002, volume 2378 of LNCS, pages 252– 266. Springer, 2002. 8. Henning Christiansen and Maja H Kirkeby. On proving confluence modulo equivalence for Constraint Handling Rules. Formal Aspects of Computing, 29(1):57–95, jan 2017. 9. Pierre-Louis Curien and Giorgio Ghelli. On confluence for weakly normalizing systems. In RTA-91, pages 215–225, 1991. 10. Luis Marı́a Ferrer Fioriti and Holger Hermanns. Probabilistic termination: Soundness, completeness, and compositionality. In POPL 2015, pages 489–501, 2015. 11. W. Donald Frazer and A. C. McKellar. Samplesort: A sampling approach to minimal storage tree sorting. J. ACM, 17(3):496–507, 1970. 12. Thom W. Frühwirth, Alessandra Di Pierro, and Herbert Wiklicky. Probabilistic Constraint Handling Rules. Electr. Notes Theor. Comput. Sci., 76:115–130, 2002. 13 13. Serglu Hart, Micha Sharir, and A Pnueli. Termination of probabilistic concurrent program. ACM Trans. Program. Lang. Syst., 5(3):356–380, 1983. 14. Ted Herman. Probabilistic self-stabilization. Information Processing Letters, 35(2):63–67, jun 1990. 15. J. Roger Hindley. An abstract Church-Rosser theorem. II: applications. J. Symb. Log., 39(1):1–21, 1974. 16. Gérard P. Huet. Confluent reductions: Abstract properties and applications to term rewriting systems: Abstract properties and applications to term rewriting systems. J. ACM, 27(4):797–821, 1980. 17. Alon Itai. A randomized algorithm for checking equivalence of circular lists. Inf. Process. Lett., 9(3):118–121, 1979. 18. David R. Karger and Clifford Stein. A new approach to the minimum cut problem. J. ACM, 43(4):601–640, 1996. 19. Scott Kirkpatrick, D. Gelatt Jr., and Mario P. Vecchi. Optimization by simmulated annealing. Science, 220(4598):671–680, 1983. 20. E. Maffioli, M. G. Speranza, and C. Vercellis. Randomized algorithms: An annotated bibliography. Annals of Operations Research, 1(3):331–345, 1984. 21. Rajeev Motwani and Prabhakar Raghavan. Randomized Algorithms. Cambridge University Press, 1995. 22. M. H. A. Newman. On theories with a combinatorial definition of “equivalence”. Annals of Mathematics, 43(2):223–243, 1942. 23. Michael O. Rabin. The choice coordination problem. Acta Informatica, 17(2):121– 134, 1982. 24. Taisuke Sato. A statistical learning method for logic programs with distribution semantics. In ICLP 1995, pages 715–729, 1995. 25. Taisuke Sato. A glimpse of symbolic-statistical modeling by PRISM. Journal of Intelligent Information Systems, 31(2):161–176, 2008. 26. Taisuke Sato and Philipp J. Meyer. Infinite probability computation by cyclic explanation graphs. TPLP, 14(6):909–937, 2014. 27. Jon Sneyers, Wannes Meert, Joost Vennekens, Yoshitaka Kameya, and Taisuke Sato. CHR(PRISM)-based Probabilistic Logic Learning. TPLP, 10(4–6), 2010. 28. Jon Sneyers and Danny De Schreye. Probabilistic termination of CHRiSM programs. In LOPSTR 2011, pages 221–236, 2011. 29. Eric W. Weisstein. q-Pochhammer Symbol. MathWorld – A Wolfram Web Resource, 2017. 30. Richard Zippel. Probabilistic algorithms for sparse polynomials. In EUROSAM 1979, pages 216–226, 1979. 14 A Selected proofs Proposition 2. For an arbitrary finite path π, 1 ≥ P (π) > 0. For every element s, P (s →∗ ·) and P (s →∞ ) comprise a probabilityPdistribution, i.e., ∀t ∈ RNF (s) : 0 ≤ P (s →∗ t) ≤ 1; 0 ≤ P (s →∞ ) ≤ 1; and t∈RNF (s) P (s →∗ t) + P (s →∞ ) = 1. Proof. Part one follows by Definition 2. Part two is shown by defining a sequence of distributions P (n) , n ∈ N, only containing paths up to length n, and show that it converges to P . Let∆(n) (s, t) be the subset of ∆(s, t) with paths of length n or less, and ∆(n) (s, ♯) be the set of paths of length n, starting in s and ending in a reducible element. We can now define P (n) over {∆(n) (s, t) | t ∈ RNF (s)} ⊎ {∆(n) (s, ♯)} as follows: P (1) P (n) (s →∗ t) = δ∈∆(n) (s,t) P (δ), and P (n) ∞ (2) P (s → ) = π∈∆(n) (s,♯) P (π). First, we prove by induction that P (n) is a distribution for all n. The P (0) is a distribution because: (i) If s is irreducible, P (0) (s →∗ s) = 1 (the emptypath); and P (0) (s →∞ ) = 0 (a sumP of zero elements). (ii) If s is reducible, P (0) (s →∗ s) = 0; and P (0) (s →∞ ) = s→t P (s → t) = 1 by Definition 2. The inductive step: The sets ∆(n+1) (s, t), t ∈ RNF (s), and ∆(n+1) (s, ♯) can be constructed by, for each path in ∆(n) (s, ♯), create its possible extensions by one reduction. When an extension leads to a normal form t, it is added to ∆(n) (s, t). Otherwise, i.e., if the new path leads to a reducible, it is included in ∆(n+1) (s, ♯). Formally, for any normal form t of s, we write: ∆(n+1) (s, t) = {(s  · · ·  u  t) | (s  · · ·  u) ∈ ∆(n) (s, ♯), u → t} ⊎ ∆(n) (s, t) ∆(n+1) (s, ♯) = {(s  · · ·  u  v) | (s  · · ·  u) ∈ ∆(n) (s, ♯), u  v, u 6∈ RNF (s)} We show that for a given s, the probability mass added to the ∆( · ) (s, t) sets is equal to the probability mass removed from ∆( · ) (s, ♯) as follows (where δsu = (s  · · ·  u)). X X P (n+1) (s →∗ t) + P (n+1) (s →∞ ) = t∈RNF (s) δ∈∆(n+1) (s,t) t∈RNF (s) = X P (n) (δ) + t∈RNF (s) δst ∈∆(n)(s,t) = X t∈RNF (s) = X P (n) (δ)P (u → v) + (n) δsu ∈∆ (s,♯), u→v,v∈RNF (s) P (n)(s →∗ t) + X P (n+1) (δ) + P (n+1) (s →∞ ) X P (n)(δ)P (u → v) (n) δsu ∈∆ (s,♯), u→v,v6∈RNF (s) P (n)(δ)P (u → v) = δsu ∈∆(n)(s,♯), u→v X X P (n)(s →∗ t) + t∈RNF (s) P (n) (s →∗ t) + P (n) (s →∞ ) = 1 t∈RNF (s) 15 X P (n) (δ) δsu ∈∆(n)(s,♯) X u→v ! P (u → v) Thus, for given s, P (n+1) defines a probability distribution. Notice also that the equations above indicate that P (n+1) (s →∗ t) ≥ P (n) (s →∗ t), for all t ∈ RNF (s). Finally, for any s and t ∈ RNF (s), limn→∞ ∆(n) (s, t) = ∆(s, t), we get (as we consider increasing sequences of real numbers in a closed interval) limn→∞ P (n) (s →∗ t) = P (s →∗ t), and as a consequence of this, limn→∞ P (n) (s →∞ ) = P (s →∞ ). This finishes the proof. ∞ Proposition 3. Consider a PARS which has an element Q s for which ∆ (s) is countable (finite or infinite). Let P (s1 → s2 → · · · )P= i=1,2,...P (si → si+1 ) be the probability of an infinite path then P (s →∞ ) = δ∈∆∞ (s) P (δ) holds. Proof. We assume the characterization in the proof of Proposition 2 above, of P by the limits of the functions P (n) (s →∗ t) and P (n) (s →∞ ) given P by equations (1) and (2). When ∆∞ (s) is countable, limn→∞ P (n) (s →∞ ) = δ∈∆∞ (s) P (δ). 16
6cs.PL
Recovery guarantee of weighted low-rank approximation via alternating minimization arXiv:1602.02262v2 [cs.LG] 8 Dec 2016 Yuanzhi Li∗, Yingyu Liang†, Andrej Risteski‡ Abstract Many applications require recovering a ground truth low-rank matrix from noisy observations of the entries, which in practice is typically formulated as a weighted low-rank approximation problem and solved by non-convex optimization heuristics such as alternating minimization. In this paper, we provide provable recovery guarantee of weighted low-rank via a simple alternating minimization algorithm. In particular, for a natural class of matrices and weights and without any assumption on the noise, we bound the spectral norm of the difference between the recovered matrix and the ground truth, by the spectral norm of the weighted noise plus an additive error that decreases exponentially with the number of rounds of alternating minimization, from either initialization by SVD or, more importantly, random initialization. These provide the first theoretical results for weighted low-rank via alternating minimization with non-binary deterministic weights, significantly generalizing those for matrix completion, the special case with binary weights, since our assumptions are similar or weaker than those made in existing works. Furthermore, this is achieved by a very simple algorithm that improves the vanilla alternating minimization with a simple clipping step. The key technical challenge is that under non-binary deterministic weights, naı̈ve alternating steps will destroy the incoherence and spectral properties of the intermediate solutions, which are needed for making progress towards the ground truth. We show that the properties only need to hold in an average sense and can be achieved by the clipping step. We further provide an alternating algorithm that uses a whitening step that keeps the properties via SDP and Rademacher rounding and thus requires weaker assumptions. This technique can potentially be applied in some other applications and is of independent interest. 1 Introduction Recovery of low-rank matrices has been a recurring theme in recent years in machine learning, signal processing, and numerical linear algebra, since in many applications, the data is a noisy observation of a low-rank ground truth matrix. Typically, the noise on different entries is not identically distributed, which naturally leads to a weighted low-rank approximation problem: given the noisy observation M, one tries to recover the ground truth by finding f i,j )2 where the weight matrix W is chosen according to f that minimizes kM − Mk f 2 = P Wi,j (Mi,j − M M W ij prior knowledge about the noise. For example, the co-occurrence matrix for words in natural language processing applications [Pennington et al., 2014, Arora et al., 2016] is such that the noise is larger when the co-occurrence of two words is rarer. When doing low-rank approximation on the co-occurrence matrix to get word embeddings, it has been observed empirically that a simple weighting can lead to much better performance than the unweighted formulation (see, e.g., [Levy and Goldberg, 2014]). In biology applications, it is often the case that the variance of the noise is different for each entry of a data matrix, due to various reasons such as different properties of different measuring devices. A natural approach to recover the ground truth matrix is to solve a weighted low-rank approximation problem where the weights are inversely proportional to the variance in the entries [Gadian, 1982, Wentzell et al., 1997]. Even for collaborative filtering, which is typically modeled as a matrix completion problem that assigns weight 1 on sampled entries and 0 on non-sampled entries, one can achieve better results when allowing non-binary weights [Srebro and Jaakkola, 2003]. ∗ Department of Computer Science, Princeton University. Email:[email protected] of Computer Science, Princeton University. Email: [email protected] ‡ Department of Computer Science, Princeton University. Email:[email protected] † Department 1 In practice, the weighted low-rank approximation is typically solved by non-convex optimization heuristics. One f to be the product of two low-rank matrices of the most frequently used is alternating minimization, which sets M and alternates between updating the two matrices. Although it is a natural heuristic to employ and also an interesting theoretical question to study, to the best of our knowledge there is no guarantee for alternating minimization for weighted low-rank approximation. Moreover, general weighted low-rank approximation is NP-hard, even when the ground truth is a rank-1 matrix [Gillis and Glineur, 2011]. A special case of weighted low-rank approximation is matrix completion, where the weights are binary. Most methods proposed for solving this problem rely on the assumptions that the observed entries are sampled uniformly at random, and additionally often the observations need to be re-sampled across different iterations of the algorithm. This is inherently infeasible for the more general weighted low-rank approximation, and thus their analysis is not portable to the more general problem. The few exceptions that work with deterministic weights are [Heiman et al., 2014, Lee and Shraibman, 2013, Bhojanapalli and Jain, 2014]. In this line of work the state-of-the-art is [Bhojanapalli and Jain, 2014], who proved recovery guarantees under the assumptions that the ground truth has a strong version of incoherence and the weight matrix has a sufficiently large spectral gap. However, their results still only work for binary weights, use a nuclear norm convex relaxation and do not consider noise on the observed entries. In this paper, we provide the first theoretical guarantee for weighted low-rank approximation via alternating minimization, under assumptions generalizing those in [Bhojanapalli and Jain, 2014]. In particular, assuming that the ground truth has a strong version of incoherence and the weight matrix has a sufficiently large spectral gap, we show that the spectral norm of the difference between the recovered matrix and the ground truth matrix is bounded by the spectral norm of the weighted noise plus an additive error term that decreases exponentially with the number of rounds of alternating minimization, from either initialization by SVD or, more importantly, random initialization. We emphasize that the bounds hold without any assumption on the noise, which is particularly important for handling complicated noise models. Since uniform sampling can satisfy our assumptions, our guarantee naturally generalizes those in previous works on matrix completion. See Section 4.1 for a detailed comparison. The guarantee is proved by showing that the distance between the intermediate solution and the ground truth is improved at each iteration, which in spirit is similar to the framework in previous works. However, the lack of randomness in the weights and the exclusion of re-sampling (i.e., using independent samples at each iteration) lead to several technical obstacles that need to be addressed. Our proof of the improvement is then significantly different (and more general) from previous ones. In particular, showing improvement after each step is only possible when the intermediate solution has some additional special properties in terms of incoherence and spectrum. Prior works ensure such properties by using re-sampling (and sometimes assumptions about the noise), which are not available in our setting. We address this by showing that the spectral property only needs to hold in an average sense, which can be achieved by a simple clipping step. This results in a very simple algorithm that almost matches the practical heuristics, and thus provides explanation for them and also suggests potential improvement of the heuristics. Further results The above results build on the insight that the spectral property only need to hold in an average sense. However, we can even make sure that the spectral property holds at each step strictly by a whitening step. More precisely, the clipping step is replaced by a whitening step using SDP and Rademacher rounding, which ensures that the intermediate solutions are incoherent and have the desired spectral property (the smallest eigenvalues of some related matrices are bounded). The technique of maintaining the smallest eigenvalues may be applicable to some other non-convex problems, and thus is of independent interest. The details are presented in Appendix C. Furthermore, combining our insight that the spectral property only need to hold in an average sense with the framework in [Sun and Luo, 2015], one can show provable guarantees for the family of algorithms analyzed there, including stochastic gradient descent. We will demonstrate this by including the proof details for stochastic gradient descent in a future version. 2 Related work Being a common practical problem (e.g., [Lu et al., 1997, Srebro and Jaakkola, 2003, Li et al., 2010, Eriksson and van den Hengel, 2012]), multiple heuristics for non-convex optimization such as alternating minimization have been 2 developed, but they come with no guarantees. On the other hand, weighted low-rank approximation is NP-hard in the worst case, even when the ground truth is a rank-1 matrix [Gillis and Glineur, 2011]. On the theoretical side, the only result we know of is [Razenshteyn et al., 2016], who provide a fixed-parameter tractability result when additionally the weight matrix is low-rank. Namely, when the weight matrix has rank r, f which approximates the optimization objective up to a 1 + ǫ they provide an algorithm for outputting a matrix M 2 multiplicative factor, and runs in time nO(k r/ǫ) . A special case of weighted low rank approximation is matrix completion, where the goal is to recover a lowrank matrix from a subset of the matrix entries and corresponds to the case when the weights are in {0, 1}. For this special case much more is known theoretically. It is known that matrix completion is NP-hard in the case when the k = 3 [Peeters, 1996]. Assuming that the matrix is incoherent and the observed entries are chosen uniformly at random, Candès and Recht [2009] showed that nuclear norm convex relation can recover an n × n rank-k matrix using m = O(n1.2 k log(n)) entries. The sample size is improved to O(nk log(n)) in subsequent papers [Candès and Tao, 2010, Recht, 2011, Gross, 2011]. Candes and Plan [2010] relaxed the assumption to tolerate noise and showed the nuclearpnorm convex relaxation can lead to a solution such that the Frobenius norm of the error matrix is bounded by O( n3 /m) times that of the noise matrix. However, all these results are for the restricted case with uniformly random binary weight matrices. The only relaxations to random sampling to the best of our knowledge are in [Heiman et al., 2014, Lee and Shraibman, 2013, Bhojanapalli and Jain, 2014]. In this line the state-of-the-art is [Bhojanapalli and Jain, 2014], where the support of the observation is a d-regular expander such that the weight matrix has a sufficiently large spectral gap. However, it only works for binary weights, and is for a nuclear norm convex relaxation and does not incorporate noise. Recently, there is an increasing interest in analyzing non-convex optimization techniques for matrix completion. In two seminal papers [Jain et al., 2013, Hardt, 2014], it was shown that with an appropriate SVD-based initialization, the alternating minimization algorithm (with a few modifications) recovers the ground-truth. These results are for random binary weight matrix and crucially rely on re-sampling (i.e., using independent samples at each iteration), which is inherently not possible for the setting studied in this paper. More recently, Sun and Luo [2015] proved recovery guarantees for a family of algorithms including alternating minimization on matrix completion without re-sampling. However, the result is still for random binary weights and has not considered noise. More detailed comparison of our result with prior work can be found in Section 4, and comments on whether their arguments can be applied in our setting can be found in Section 5. We also mention [Negahban and Wainwright, 2012] who consider random sampling, but one that is not uniformly random across the entries. In particular, their sampling produces a rank-1 matrix. (Additionally, they require the ground truth matrix to have nice properties such as low-rankness and spikiness.) The rank-1 assumption on the weight matrix is typically not true for many applications that introduce the weights to battle the different noise across the different entries of the matrix. Finally, two related works are [Bhojanapalli et al., 2015a,b]. The former implements faster SVD decomposition via weighted low rank approximation. However, here the weights in the weighted low rank problem come from leverage scores, so have a very specific structure, specially designed for performing SVD decompositions. The latter concerns optimization of strongly convex functions f (V) when V is in the set of positive-definite matrices. It does this in a non-convex manner, by setting V = UU⊤ and using the entries of U as variables. Our work focus on the recovery of the ground truth under the generative model, rather than on the optimization. 3 Problem definition and assumptions For a matrix A, let Ai denote its i-th column, Aj denote its j-th row, and Ai,j denote the element in i-th row and j-th column. Let ⊙ denote the Hadamard product, i.e., C = A ⊙ B means Ci,j = Ai,j Bi,j . Let M∗ ∈ Rn×n be a rank-k matrix. Given the observation M = M∗ + N where N is a noise matrix, we want to recover the ground truth M∗ by solving the weighted low-rank approximation problem for M and a non-negative weight matrix W: 2 f−M min M f M∈R k W 3 P 2 where Rk is the set of rank-k n by n matrices, and kAkW = i,j Wi,j A2i,j is the weighted Frobenius norm. Our goal is to specify conditions about M∗ and W, under which M∗ can be recovered up to small error by alternating f = XY⊤ where X and Y are n by k matrices, and then alternate between updating the two minimization, i.e., set M matrices. Ideally, the recovery error should be bounded by kW ⊙ Nk2 , since this allows selecting weights according to the noise to make the error bound small. As mentioned before, the problem is NP-hard in general, so we will need to impose some conditions. We summarize our assumptions as follows, and then discuss their necessity and the connections to existing ones. (A1) Ground truth is incoherent: M∗ has SVD UΣV⊤ , where maxni=1 {||Ui ||22 , ||Vi ||22 } ≤ µk n . Additionally, assume σmax (Σ) = Θ(1). (See discussion below.) Denote its condition number as τ = σmax (Σ)/σmin (Σ). (A2) Weight matrix has a spectral gap: ||W − E||2 ≤ γn, where γ < 1 and E is the all-one matrix. (A3) Weight is not degenerate: Let Di = Diag(Wi ), i.e., Di is a diagonal matrix whose diagonal entries are the i-th row of W. Then there are 0 < λ ≤ 1 ≤ λ: λI  U⊤ Di U  λI, and λI  V⊤ Di V  λI(∀i ∈ [n]). The incoherence assumption on the ground truth matrix is standard in the context of matrix completion. It is known that this is necessarily required for recovering the ground truth matrix. The assumption that σmax (Σ) = Θ(1) is without loss of generality: one can estimate σmax (Σ) up to a constant factor, scale the data and apply our results. The full details are included in the appendix. The spectrum assumption on the weight matrix is a natural generalization of the randomness assumption typically made in matrix completion scenario (e.g., [Candes and Plan, 2010, Jain et al., 2013, Hardt, 2014]). In that case,W is  a matrix with d = Ω(log n)-nonzeros in each row chosen uniformly at random, which corresponds to γ = O √1d in (A2). Our assumption is also a generalization of the one in [Bhojanapalli and Jain, 2014], which requires W to be d-regular expander-like (i.e., to have a spectral gap) but is concerned only with matrix completion where the entries of W can be 0 or 1 only. The final assumption (A3) is a generalization of the assumption A2 in [Bhojanapalli and Jain, 2014] that, intuitively, requires the singular vectors to satisfy RIP (restricted isometry property). This is because when the weights are P binary, U⊤ Di U = j∈S (Uk )(Uk )⊤ where S is the support of Wi , so after proper scaling the assumption is a strict weakening of theirs. They viewed it as a stronger version of incoherence, discussed the necessity and showed that it is implied by the strong incoherence property assumed in [Candès and Tao, 2010]. In the context of more general weights, the necessity of (A3) is even more clear, as elaborated below. Note that since (A2) does not require W to be random or d-regular, it does not a-priori exclude the degenerate case that W has one all-zero column. In that case, clearly one cannot hope to recover the corresponding column of M∗ . So, we need to make a third, non-degeneracy assumption about W, saying that it is “correlated” with M∗ . The assumption is actually quite weak in the sense that when W is chosen uniformly at random, this assumption is true automatically: in those cases, E[Di ] = I and thus E[U⊤ Di U] = I since U is orthogonal. A standard matrix concentration bound can then show that our assumption (A3) holds with high probability. Therefore, it is only needed when considering a deterministic W. Intuitively, this means that the weights should cover the singular vectors of M∗ . This prevents the aforementioned degenerate case when Wi = 0 for some i, and also some other degenerate cases. For example, consider the case when N = 0, all rows of M∗ are the same vector with first Θ(log n) entries being zero and the rest being one, and in one row of M∗ the non-zeros entries all have zero weight. In this case, there is also no hope to recover M∗ , which should be excluded by our assumption. 4 Algorithm and results We prove guarantees for the vanilla alternating minimization with a simple clipping step, from either SVD initialization or random initialization. The algorithm is specified in Algorithm 1. Overall, it follows the usual alternating 4 Algorithm 1 Main Algorithm (A LT) Input: Noisy observation M, weight matrix W, number of iterations T 1: Initialize Y1 using either Y1 = SVDI NITIAL (M, W) or Y1 = R AND I NITIAL 2: for t = 1, 2, ..., T do e t+1 = argminX∈Rn×k M − XYt⊤ 3: X W e t+1 ) Xt+1 = C LIP (X 4: 5: Xt+1 = QR(Xt+1 ) ⊤ e t+1 = argmin 6: Y Y∈Rn×k M − Xt+1 Y W e t+1 ) 7: Y t+1 = C LIP(Y 8: Yt+1 = QR(Y t+1 ) 9: end for f = XT +1 YT Output: M Algorithm 2 Clipping (C LIP) e Input: matrix X Output: matrix X with i X =  ei X 0 e i k2 ≤ ξ := if kX 2 otherwise. 2µk n Algorithm 3 SVD Initialization (SVDI NITIAL) Input: observation M, weight W e Σ, Y) e = rank-k SVD(W ⊙ M), i.e., the columns of Y e are the top k right singular vectors of W ⊙ M 1: (X, e 2: Y = C LIP (Y), Y = QR(Y) Output: Y Algorithm 4 Random Initialization (R AND I NITIAL) 1: Let Y ∈ Rn×k generated as Yi,j = bi,j √1n , where bi,j ’s are independent uniform from {−1, 1} Output: Y minimization framework: it keeps two working matrices X and Y, and alternates between updating them. In an X update step, it first updates X to be the minimizer of the weighted low rank objective while fixing Y, which can be done efficiently since now the optimization is convex. Then it performs a “clipping” step which zeros out rows of the matrix with too large norm,1 and then make it orthogonal by QR-factorization.2 At the end, the algorithm computes a f from the two iterates. final solution M The two iterates can be initialized by performing SVD on the weighted observation (Algorithm 3), which is a weighted version of SVD initialization typically used in matrix completion. Moreover, we show that the algorithm works with random initialization (Algorithm 4), which is a simple and widely used heuristic in practice but rarely understood well. We are now ready to state our main results. Theorem 1 describes our guarantee for the algorithm with SVD initialization, and Theorem 3 is for random initialization. 1 The clipping step zeros out rows with square ℓ norm twice larger than the upper bound µk/n imposed by our incoherence assumption (A1). 2 One can choose the threshold to be cµk/n where c ≥ 2 is a constant and can choose to shrink the row to have norm no greater than µk/n, and our analysis still holds. The current choices are only for ease of presentation. 2 The QR-factorization step is not necessary for our analysis. But since it is widely used in practice for numerical stability, we prefer to analyze the algorithm with QR. 5 Theorem 1 (Main, SVD initialization). Suppose M∗ , W satisfy assumptions (A1)-(A3) with  r  λ n λ γ = O min , , D1 τ µ3/2 k 2 τ 3/2 µk 2 where D1 = maxi∈[n] kWi k1 . Then after O(log(1/ǫ)) rounds of Algorithm 1 with initialization from Algorithm 3 f that satisfies outputs a matrix M   kτ ∗ f kW ⊙ Nk2 + ǫ. kM − M k2 ≤ O λ The running time is polynomial in n and log(1/ǫ). The theorem is stated in its full generality. To emphasize the dependence on the matrix size n, the rank k and the incoherence µ, we can consider a specific range of parameter values where the other parameters (the spectral bounds, condition number, D1 /n) are constants. Also, these parameter values are typical in matrix completion, which facilitates our comparison in the next subsection. Corollary 2. Suppose λ, λ and τ are all constants, D1 = Θ(n), and T = O(log(1/ǫ)). Furthermore,   1 γ=O . µ3/2 k 2 f that satisfies Then Algorithm 1 with initialization from Algorithm 3 outputs a matrix M f − M∗ k2 ≤ O (k) kW ⊙ Nk2 + ǫ. kM Remarks The theorem bounds the spectral norm of the error matrix by the spectral norm of the weighted noise plus an additive error term that decreases exponentially with the number of rounds of alternating minimization. We emphasize that our guarantee holds for any M∗ , W satisfying our deterministic assumptions; the high success probability is with respect to the execution of the algorithm, not to the input. This ensures the freedom in choosing the weights to battle the noise. We also emphasize that the bounds hold without any assumption on the noise, which is particularly important here since weighted low rank is typically applied to complicated noise models. Bounding the error by kW ⊙ Nk2 is particularly useful when the noise is not uniform across the entries: prior knowledge about the noise (e.g., the different variances of noise on different entries) can be taken into account by setting up a reasonable weight matrix3 , such that kW ⊙ Nk2 can be significantly smaller than kNk2 . Also, in recovering the ground √ truth, a spectral norm bound is more preferred than a Frobenius norm bound, since typically the Frobenius norm is n larger than the spectral norm. Furthermore, when kW ⊙ Nk2 = 0 (as in matrix completion without noise), the ground truth is recovered in a geometric rate. Finally, in matrix completion with uniform random sampled observations, the term D1 concentrates around n, so D1 n disappears in this case. Theorem 3 (Main, random initialization). Suppose M∗ , W satisfy assumptions (A1)-(A3) with  r  λ λ n γ = O min , , D1 τ µ2 k 5/2 τ 3/2 µ3/2 k 5/2   λn kWk∞ = O , k 2 µ log2 n 3 Note that W cannot be made arbitrarily small since it should satisfy our assumptions. Roughly speaking, W has spectral norm n and is flexible to take into account the prior knowledge about the noise. In particular, it can be set to the all one matrix, reducing to the unweighted case. 6 weight values determin. weights tolerate noise alter. min. order of γ (spectral gap) (1) 0-1 no yes no (2) 0-1 no yes no (3) (4) (5) ours (SVD init) ours (random init) 0-1 0-1 0-1 real real yes no no yes yes no yes no yes yes no yes yes yes yes 1 1/2 poly(log n) µkq 1 µk log n 1 µk √1 kǫ µ log n 1 √ max{ kµ log n,µk3.5 } 1 µ3/2 k2 1 µ2 k5/2 f − M∗ Bound on ∆ = M q 3 k∆kF = O( nm kNΩ kF ) 2 √ k∆kF = O( n m k kNΩ k2 ) exact recovery k∆kF ≤ ǫkM∗ + NkF exact recovery k∆k2 = O (k) kW ⊙ Nk2 + ǫ k∆k2 = O (k) kW ⊙ Nk2 + ǫ Table 1: Comparison with related work on matrix completion: (1) [Candes and Plan, 2010]; (2) [Keshavan et al., 2009]; (3) [Bhojanapalli and Jain, 2014]; (4) [Hardt, 2014]. (5) [Sun and Luo, 2015]. Technical details are ignored. Especially, parameters other than the matrix size n, the rank k and the incoherence µ are regarded as constants. where D1 = maxi∈[n] kWi k1 . Then after O(log(1/ǫ)) rounds Algorithm 1 with initialization from Algorithm 3 f that with probability at least 1 − 12 satisfies outputs a matrix M n   f − M∗ k2 ≤ O kτ kW ⊙ Nk2 + ǫ. kM λ The running time is polynomial in n and log(1/ǫ). Remarks Compared to SVD initialization, we need slightly stronger assumptions for random initialization to work. There is an extra 1/(µ1/2 k 1/2 ) in the requirement of the spectral parameter γ. We note that the same error bound is obtained when using random initialization. Roughly speaking, this is because our analysis shows that the updates can make improvement under rather weak requirements that random initialization can satisfy, and after the first step the rest updates make the same progress as in the case using SVD initialization. 4.1 Comparison with prior work For the sake of completeness, we will give a more detailed comparison with representative prior work on matrix completion from Section 2, emphasizing the dependence on n, k and µ and regarding the other parameters as constants. We first note that when the m observed entries are sampled at random from an n by n matrix, the corresponding puniformly n binary weight matrix will have a spectral gap γ = O( m ) (see, e.g., [Feige and Ofek, 2005]). Converting the sample bounds in the prior work to the spectral gap, we see that in general our result has worse dependence on parameters like the rank than those by convex relaxations, but has slightly better dependence than those by alternating minimization. The comparison is summarized in Table 1. The seminal paper [Candès and Recht, 2009] showed that a nuclear norm convex relaxation approach can recover the ground truth matrix using m = O(n1.2 k log2 n) entries chosen uniformly at random and without noise. The sample size was improved to O(nk log6 n) in [Candès and Tao, 2010] and then O(nk log n) in subsequent papers. Candes and Plan [2010] generalized the result to the case with noise: the same convex program using m = O(nk log6 n) p f s.t. kM f − M∗ kF ≤ (2 + 4 (2 + p)n/p)kNΩ kF where p = m/n2 and NΩ is the noise entries recovers a matrix M projected on the observed entries. f such that M∗ − M f Keshavan et al. [2009] showed that with m = O(nµk log n), one can recover a matrix M = F  2√  n k O m kNΩ k2 by an optimization over a Grassmanian manifold. Bhojanapalli and Jain [2014] relaxed the assumption that the entries are randomly sampled. They showed that the nuclear norm relaxation recovers the ground truth, assuming that the support Ω of the observed matrix forms a 7 √ d-regular expander graph (or alike), i.e., |Ω| = dn, σ1 (Ω) = d and σ2 (Ω) ≤ c d and d ≥ c2 µ2 k 2 . This would 1 correspond to a parameter γ = O( µk ) for us. They did not consider the robustness to noise. Hardt [2014] showed that with an appropriate initialization alternating minimization recovers the ground truth approximately. Precisely, they assumed N satisfies: (1). µ(N) . σmin (M∗ )2 ;(2). kNk∞ ≤ nµ kM∗ kF . Then, he ∗ f such that kM−M f kF ≤ ǫkMkF provided shows that log( nǫ log n) alternating minimization steps recover a matrix M 2  5  ∗ σk+1 kM kF +kNkF /ǫ where σk is the k-th singular value of the ground1 − σk that pn ≥ k(k + log(n/ǫ))µ × σk truth matrix. The parameter γ corresponding to the case considered there would be roughly O( k√µ1log n ). While their algorithm has a good tolerance to noise, N is assumed to have special structure for him that we do not assume in our setting. Sun and Luo [2015] proved recovery guarantees for a family of algorithms including alternating minimization on matrix completion. They showed that by using m = O(nk max{µ log n, µ2 k 6 }) randomly sampled  entries without  1 . noise, the ground truth can be recovered in a geometric rate. This corresponds to a spectral gap of O max{√kµ log n,µk3.5 } Our result is more general and also handles noise. When specialized to their setting, we also have a geometric rate with a slightly better dependence on the rank k but a slightly worse dependence on the incoherence µ. 5 Proof sketch Before going into our analysis, we first discuss whether arguments in prior work can be applied. Most of the work on matrix completion uses convex optimization and thus their analysis is not applicable in our setting. There indeed exists some other work that analyzes non-convex optimization for matrix completion, and it is tempting to adopt their arguments. However, there exist fundamental difficulties in porting their arguments. All of them crucially rely on the randomness in sampling the observed entries. Keshavan et al. [2009] analyzed optimization over a Grassmanian manifold, which uses the fact that E[W ⊙ S] = S for any matrix S. In [Jain et al., 2013, Hardt, 2014], re-sampling of new observed entries in different iterations was used to get around the dependency of the iterates on the sample set, a common difficulty in analyzing alternating minimization. The subtlety and the drawback of re-sampling were discussed in detail in [Bhojanapalli and Jain, 2014, Candes et al., 2015, Sun and Luo, 2015]. We note that [Sun and Luo, 2015] only needs sampling before the algorithm starts and does not need re-sampling in different iterations, but still relies on the randomness in the sampled entries. In particular, in all the aforementioned work, the randomness guarantees that the iterates X, Y stay incoherent and have good spectrum properties. Given these, alternating minimization can make progress towards the ground truth in each iteration. Nevertheless, since we focus on deterministic weights, such randomness is inherently infeasible in our setting. In this case, after just one iteration, it is unclear if the iterates can have incoherence and good spectrum properties required to progress towards the ground truth, even under our current assumptions. The whole algorithm thus breaks down. To address this, we show that it is sufficient to ensure the spectral property in an average sense and then introduce our clipping step to achieve that, arriving at our current algorithm. Here for simplicity, we drop the subscription t in all iterates, and we only focus on important factors, dropping other factors and the big-O notation. We only consider the case when W ⊙ N = 0, so as to emphasize the main technical challenges. On a high level, our analysis of the algorithm maintains potential functions distc (X, U) and distc (Y, V) between our working matrices X, Y and the ground truth U, V (recall that M∗ = UΣV⊤ ): distc (X, U) = min kXQ − Uk2 Q∈Ok×k and distc (Y, V) = min kYQ − Vk2 , Q∈Ok×k where Ok×k are the set of k × k rotation matrices. The key is to show that they decrease after each update step, so X and Y get closer to the ground truth.4 The strategy of maintaining certain potential function measuring the distance 4 Note that we also need a good initialization, which can be done by SVD. Since our analysis requires rather weak warm start, we are able to show that simple random initialization is also sufficient (at the cost of slightly worse bounds). 8 between the iterates and the ground truth is also used in prior work [Bhojanapalli and Jain, 2014, Candes et al., 2015, Sun and Luo, 2015]. We will point out below the key technical difficulties that are not encountered in prior work and make our analysis substantially different. The complete proofs are provided in the appendix due to space limitation. 5.1 Update e satisfies distc (X, U) ≤ distc (Y, V)/2 + c for some We would like to show that after an X update, the new matrix X small c (similarly for a Y update). Consider the update step ⊤ e ← argmin X . A∈Rn×k M − AY W e − UΣV⊤ Y = G where By setting the gradient to 0 and with some algebraic manipulation, we have X ⊤ Di Y(Y⊤ Di Y)−1 . Gi := Ui ΣV⊤ Y⊥ Y⊥ e is the value prior to performing QR decomposition, we want to show that X e is where Di = Diag(Wi ). Since X i ⊤ close to U ΣV Y, i.e., the error term G on right hand side is small. In the ideal case when the error term is 0, then e = UΣV⊤ Y and thus distc (X, U) = 0, meaning that with one update X e already hits into the correct subspace. So X we would like to show that it is small so that the iterate still makes progress. Let ⊤ Pi = V⊤ Y⊥ Y⊥ Di Y and Oi = (Y⊤ Di Y)−1 , so that Gi = Ui ΣPi Oi . Now the two challenges are to bound Pi and Oi . Let us first consider the simpler case of matrix completion, where the entries of the matrix are randomly sampled by probability p. Then Di is a random diagonal matrix with E[Di ] = I and E[D2i ] = p1 I. Furthermore, for n × k √ orthogonal matrices Y, Oi = (Y⊤ Di Y)−1 concentrates around I. Then in expectation, ||Pi || is about ||V⊤ Y⊥ ||/ p √ √ and kOi k is about 1, so kGi k is as small as µk||V⊤ Y⊥ ||/( pn) = µksin θ(V, Y)/( pn). High probability can then be established by the trick of re-sampling. However, in our setting, we have to deal with two major technical obstacles due to deterministic weights. 2 n 1. There is no expectation for Di . Since kDi k2∞ can be as large as poly(log n) , kPi k can potentially be as large n as sin θ(Y, V) poly(log n) , which is almost a factor n larger than the bound for random Di . This is clearly insufficient to show the progress. 2. A priori the norm of Oi = (Y⊤ Di Y)−1 may be large. Especially, in the algorithm Y is given by the alternating minimization steps and giving an upper bound on kOi k at all steps seems hard. The first issue For this, we exploit the incoherence of Y and the spectral property of the weight matrix. If Di is the identity matrix, then Pi = 0 which, intuitively, means that there are cancellations between negative part and positive parts. When W is expander-like, it will put roughly equal weights on the negative part and the positive part. If furthermore we have that Y is incoherent (i.e., the negative and positive parts are spread out), then W can mix the terms and lead to a cancellation similar to that when Di = I. More precisely, consider the (j, j ′ )-th element in Pi . Define a new vector x ∈ Rn such that e = V⊤ Y⊥ Y⊤ . e j )i (Yj ′ )i , where V xi = (V ⊥ P P Then we have the cancellation in the form of i xi = 0. When Di = I, we simply get (Pi )j,j ′ = i xi = 0. When P ′ Di 6= I, we have (Pi )j,j ′ = s∈[n] (Di )s xj,j s . Now mix over all i, we have X ((Pi )j,j ′ )2 =   X s∈[n] i∈[n] = ≤ 2 (Di )s xs  = kWxk2 k(W − E)xk2 2 2 γ n kxk 9 2 (since Ex = 0) where in the last step we use the expander-like property of W (Assumption (A2)) to gain the P cancellation. Furthermore, if kYj ′ k∞ is small, by definition kxk2 is also small, so we can get an upper bound on i∈[n] kPi k2F . Then the problem reduces to maintaining the incoherence of Y. This is taken care of by our clipping step (Algorithm 2), which sets to 0 the rows of Y that are too large. Of course, we have to show that this will not increase the distance of the clipped Y and V. The intuition is that we clip only when kYi k ≥ 2µk/n. But kVi k ≤ µk/n, so after clipping, Yi only gets closer to Vi . The second issue This is the more difficult technical obstacle, i.e., kOi k = k(Y⊤ Di Y)−1 k can be large. Our key idea is that although individual kOi k can indeed be large, this cannot be the case on average. We show that there can just be a few i’s such that kOi k is large, and they will not contribute much to kGk, so the update can make progress.  To be more formal, we wish to bound the number of indices i such that σmin Y⊤ Di Y ≤ λ4 . Consider an arbitrary unit vector a. Then, X X (Di )j ha, Yj i2 . aY⊤ (Di )j Ya = aY⊤ Di Ya = j j We know that Y is close to V, so we rewrite the above using some algebraic manipulation as X (Di )j ha, (Yj − Vj ) + Vj i2 j ≥ 1X 1X (Di )j ha, Vj i2 − (Di )j ha, Yj − Vj i2 4 j 3 j For j’s such that Yj is close to Vj (denote these j’s as Sg ), then the terms can be easily bounded since V⊤ Di V ≥ incoherence, we know λI by assumption. So we only need to consider j’s such that Yj is far from Vj . Since we have P that kYj − Vj k is still bounded in the order of µk/n. So aY⊤ Di Ya can be small only when j6∈Sg (Di )j is large. Let S denote those bad i’s. Let uS be the indicator vector for S and ug be the indicator vector for [n − Sg ]. XX (Di )j = u⊤ S Wug i∈S j6∈Sg ≤ |S|(n − |Sg |) + γn q |S|(n − |Sg |) where the last step is due to the spectral property of W. Therefore, there can be only a few i’s with large 5.2 Proofs of main results P j6∈Sg (Di )j . We only need to show that we can get an initialization close enough to the ground truth so that we can apply the above analysis for the update. For SVD initialization, [X, Σ, Y] = rank-k SVD(W ⊙ M∗ + W ⊙ N). Since ||W ⊙ N||2 ≤ δ can be regarded as small, the idea is to show that W ⊙ M∗ is close to M∗ in spectral norm and then apply Wedin’s theorem [Wedin, 1972]. We show this by the spectral gap property of W and the incoherence property of U, V. For random initialization, the proof is only a slight modification of that for SVD initialization, because the update requires rather mild conditions on the initialization such that even the random initialization is sufficient (with slightly worse parameters). 10 6 Conclusion In this paper we presented the first recovery guarantee of weighted low-rank matrix approximation via alternating minimization. Our work generalized prior work on matrix completion, and revealed technical obstacles in analyzing alternating minimization, i.e., the incoherence and spectral properties of the intermediate iterates need to be preserved. We addressed the obstacles by a simple clipping step, which resulted in a very simple algorithm that almost matches the practical heuristics. Acknowledgements This work was supported in part by NSF grants CCF-1527371, DMS-1317308, Simons Investigator Award, Simons Collaboration Grant, and ONR-N00014-16-1-2329. References Sanjeev Arora, Yuanzhi Li, Yingyu Liang, Tengyu Ma, and Andrej Risteski. A latent variable model approach to pmi-based word embeddings. To appear in Transactions of the Association for Computational Linguistics, 2016. Srinadh Bhojanapalli and Prateek Jain. Universal matrix completion. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 1881–1889, 2014. Srinadh Bhojanapalli, Prateek Jain, and Sujay Sanghavi. Tighter low-rank approximation via sampling the leveraged element. In Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 902– 920. SIAM, 2015a. Srinadh Bhojanapalli, Anastasios Kyrillidis, and Sujay Sanghavi. Dropping convexity for faster semi-definite optimization. arXiv preprint arXiv:1509.03917, 2015b. Christian Buck, Kenneth Heafield, and Bas van Ooyen. N-gram counts and language models from the common crawl. In Proceedings of the Language Resources and Evaluation Conference, Reykjavk, Icelandik, Iceland, May 2014. Emmanuel J Candes and Yaniv Plan. Matrix completion with noise. Proceedings of the IEEE, 98(6):925–936, 2010. Emmanuel J Candès and Benjamin Recht. Exact matrix completion via convex optimization. Foundations of Computational mathematics, 9(6):717–772, 2009. Emmanuel J Candès and Terence Tao. The power of convex relaxation: Near-optimal matrix completion. Information Theory, IEEE Transactions on, 56(5):2053–2080, 2010. Emmanuel J Candes, Xiaodong Li, and Mahdi Soltanolkotabi. Phase retrieval via wirtinger flow: Theory and algorithms. Information Theory, IEEE Transactions on, 61(4):1985–2007, 2015. Anders Eriksson and Anton van den Hengel. Efficient computation of robust weighted low-rank matrix approximations using the l 1 norm. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 34(9):1681–1690, 2012. Uriel Feige and Eran Ofek. Spectral techniques applied to sparse random graphs. Random Structures & Algorithms, 27(2):251–275, 2005. David G Gadian. Nuclear magnetic resonance and its applications to living systems. Clarendon Press; Oxford University Press, 1982. Nicolas Gillis and François Glineur. Low-rank matrix approximation with weights or missing data is np-hard. SIAM Journal on Matrix Analysis and Applications, 32(4):1149–1165, 2011. 11 David Gross. Recovering low-rank matrices from few coefficients in any basis. Information Theory, IEEE Transactions on, 57(3):1548–1566, 2011. Marcus Hardt. Understanding alternating minimization for matrix completion. In Foundations of Computer Science (FOCS), 2014 IEEE 55th Annual Symposium on, pages 651–660. IEEE, 2014. Eyal Heiman, Gideon Schechtman, and Adi Shraibman. Deterministic algorithms for matrix completion. Random Structures & Algorithms, 45(2):306–317, 2014. Prateek Jain, Praneeth Netrapalli, and Sujay Sanghavi. Low-rank matrix completion using alternating minimization. In Proceedings of the forty-fifth annual ACM symposium on Theory of computing, pages 665–674. ACM, 2013. Raghunandan Keshavan, Andrea Montanari, and Sewoong Oh. Matrix completion from noisy entries. In Advances in Neural Information Processing Systems, pages 952–960, 2009. Troy Lee and Adi Shraibman. Matrix completion from any given set of observations. In Advances in Neural Information Processing Systems, pages 1781–1787, 2013. Omer Levy and Yoav Goldberg. Neural word embedding as implicit matrix factorization. In Advances in Neural Information Processing Systems, pages 2177–2185, 2014. Yanen Li, Jia Hu, ChengXiang Zhai, and Ye Chen. Improving one-class collaborative filtering by incorporating rich user information. In Proceedings of the 19th ACM international conference on Information and knowledge management, pages 959–968. ACM, 2010. W-S Lu, S-C Pei, and P-H Wang. Weighted low-rank approximation of general complex matrices and its application in the design of 2-d digital filters. Circuits and Systems I: Fundamental Theory and Applications, IEEE Transactions on, 44(7):650–655, 1997. Sahand Negahban and Martin J Wainwright. Restricted strong convexity and weighted matrix completion: Optimal bounds with noise. The Journal of Machine Learning Research, 13(1):1665–1697, 2012. René Peeters. Orthogonal representations over finite fields and the chromatic number of graphs. Combinatorica, 16 (3):417–431, 1996. Jeffrey Pennington, Richard Socher, and Christopher D Manning. Glove: Global vectors for word representation. Proceedings of the Empiricial Methods in Natural Language Processing (EMNLP 2014), 12:1532–1543, 2014. Ilya Razenshteyn, Zhao Song, and David Woodruff. Weighted low rank approximations with provable guarantees. In Proceedings of the 48th Annual Symposium on the Theory of Computing, 2016. Benjamin Recht. A simpler approach to matrix completion. The Journal of Machine Learning Research, 12:3413– 3430, 2011. Nathan Srebro and Tommi Jaakkola. Weighted low-rank approximations. In Proceedings of the 20th International Conference on Machine Learning (ICML-03), pages 720–727, 2003. Ruoyu Sun and Zhi-Quan Luo. Guaranteed matrix completion via nonconvex factorization. In IEEE 56th Annual Symposium on Foundations of Computer Science, pages 270–289, 2015. Per-Åke Wedin. Perturbation bounds in connection with singular value decomposition. BIT Numerical Mathematics, 12(1):99–111, 1972. Peter D Wentzell, Darren T Andrews, and Bruce R Kowalski. Maximum likelihood multivariate calibration. Analytical chemistry, 69(13):2299–2311, 1997. Wikimedia. English Wikipedia dump. http://dumps.wikimedia.org/enwiki/latest/enwiki-latest-pages-articles.xml.bz2, 2012. Accessed Mar-2015. 12 A Preliminaries about subspace distance Before delving into the proofs, we will prove a few simple preliminaries about subspace angles/distances. Definition (Distance, Principle angle). Denote the principle angle of Y, V ∈ Rn×k as θ(Y, V). Then for orthogonal matrix Y (i.e., Y⊤ Y = I), ⊤ tan θ(Y, V) = kY⊥ V(Y⊤ V)−1 k2 . For orthogonal matrices Y, V, cos θ(Y, V) = σmin (Y⊤ V), ⊤ ⊤ Vk2 = kY⊥ Vk2 , sin θ(Y, V) = k(I − YY⊤ )Vk2 = kY⊥ Y⊥ distc (Y, V) = min kYQ − Vk2 Q∈Ok×k where Ok×k is the set of k × k orthogonal matrices. Lemma 4 (Equivalence of distance). Let Y, V ∈ Rn×k be two orthogonal matrices, then we have: sin θ(Y, V) ≤ distc (Y, V) ≤ sin θ(Y, V) + 1 − cos θ(Y, V) ≤ 2tan θ(Y, V). cos θ(Y, V) Proof of Lemma 4. Suppose Q∗ = argminQ∈Ok×k kYQ − Vk2 . Let’s write V = YQ∗ + R, then distc (Y, V) = kRk2 . We have ⊤ sin θ(Y, V) = k(I − YY⊤ )Vk2 = kY⊥ Y⊥ Rk2 ≤ kRk2 On the other hand, suppose ADB⊤ = SVD(Y⊤ V), we know that σmin (D) = σmin (Y⊤ V) = cos θ(Y, V). Therefore, by A = Y⊤ VBD−1 , AB⊤ ∈ Ok×k we have: distc (Y, V) ≤ ≤ ≤ = kYAB⊤ − Vk2 = kYY⊤ VBD−1 B⊤ − Vk2 kYY⊤ VBD−1 B⊤ − YY⊤ Vk2 + kYY⊤ V − Vk2 kBD−1 B⊤ − Ik2 + sin θ(Y, V) = kD−1 − Ik2 + sin θ(Y, V) 1 − cos θ(Y, V) . sin θ(Y, V) + cos θ(Y, V) Finally, sin θ(Y, V) ≤ tan θ(Y, V) and inequality follows. 1−cos θ(Y,V) cos θ(Y,V) ≤ tan θ(Y, V) can be verified by definition, so the last For convenience in our proofs we will also use the following generalization of incoherence: Definition (Generalized incoherence). For a matrix A ∈ Rn×k , the generalized incoherence ρ(A) is defined as: nn o ρ(A) = max kAi k22 i∈[n] k We call it generalized incoherence for obvious reasons: when A is an orthogonal matrix, then ρ(A) = µ(A). 13 B Proofs for alternating minimization with clipping We will show in this section the results for our algorithm based on alternating minimization with a clipping step. The organization is as follows. In Section B.1 we will present the necessary lemmas for the initialization, in Section B.3 we show the decrease of the potential function after one update step, and in Section B.4 we will put everything together, and prove our main theorem. Before starting with the proofs, we will make a remark which will simplify the exposition. Without loss of generality, we may assume that δ = kW ⊙ Nk2 ≤ λσmin (M∗ ) 200k (B.1) Otherwise, we can output the 0 matrix, and the guarantee of all our theorems would be satisfied vacuously. B.1 SVD-based initialization We want to show that after initialization, the matrices X, Y are close to the ground truth matrix U, V. Observe that [X, Σ, Y] = SVD(W ⊙ M) = SVD(W ⊙ (M∗ + N)) = SVD(W ⊙ M∗ + W ⊙ N). By our assumptions we know that ||W ⊙ N||2 ≤ δ which we are thinking of as small, so the idea is to show that W ⊙ M∗ is close to M∗ in spectral norm, then by Wedin’s theorem [Wedin, 1972] we will have X, Y are close to U, V. We show that W ⊙ M∗ is close to M∗ by the spectral gap property of W and the incoherence property of U, V. Lemma 5 (Spectral lemma). Let W be an (entry wise non-negative) matrix in Rn×n with a spectral gap, i.e. W = E + γnJΣW K⊤ , where J, K are n × n (column) orthogonal matrices, with ||ΣW ||2 = 1, γ < 1. Furthermore, for every matrix H ∈ Rn×n such that H = AΣB⊤ (A, B not necessarily orthogonal, Σ ∈ Rk×k is diagonal) we have p k(W − E) ⊙ Hk2 ≤ γkσmax (Σ) ρ(A)ρ(B) where E is the all one matrix. Proof of Lemma 5. We know that for any unit vectors x, y ∈ Rn , x⊤ ((W − E) ⊙ H) y = k X r=1 = γn  σr xT (W − E) ⊙ Ar B⊤ r y k X r=1 ≤ γn ≤ γn k X r=1 k X r=1 σr (Ar ⊙ x)⊤ JΣW K⊤ (Br ⊙ y) σr ||Ar ⊙ x||2 ||JΣW K⊤ ||2 ||Br ⊙ y||2 σr ||Ar ⊙ x||2 ||Br ⊙ y||2 v v u k u k uX uX t 2 ≤ γnσmax (Σ) ||Ar ⊙ x||2 t ||Br ⊙ y||22 r=1 r=1 v v u n u n uX uX 2 2 i t xi ||A ||2 t yi2 ||Bi ||22 ≤ γnσmax (Σ) i=1 i=1 v !v ! u u n n X X uk uk 2 2 t t ≤ γnσmax (Σ) xi yi ρ(A) ρ(B) n n i=1 i=1 p ≤ γσmax (Σ)k ρ(A)ρ(B). 14 The lemma follows from the definition of the operator norm. The spectral lemma can be used to prove the initialization condition, when combined with Wedin’s theorem. f be two matrices whose singular values are σ1 , ..., σn and Lemma 6 (Wedin’s Theorem [Wedin, 1972]). Let M∗ , M f respectively. If ∃α > 0 such σ̃1 , ..., σ̃n , let U, V and X, Y be the first k singular vectors (left and right) of M∗ , M that maxnr=k+1 σ̃r ≤ minki=1 σi − α, then max {sin θ(U, X), sin θ(V, Y)} ≤ f − M∗ ||2 ||M . α Lemma 7. Suppose M∗ , W satisfy all the assumptions, then for (X, Σ, Y) = rank-k SVD(W ⊙ M), we have max{tan θ(X, U), tan θ(Y, V)} ≤ 4(γµk + δ) σmin (M∗ ) Proof of Lemma 7. We know that kW ⊙ M − M∗ k2 ≤ ||W ⊙ M∗ − M∗ ||2 + ||W ⊙ N||2 ≤ γµkσmax (M∗ ) + δ. Therefore, by Weyl’s theorem, max{σr (W ⊙ M) : k + 1 ≤ r ≤ n} ≤ γµk + δ ≤ 1 σmin (M∗ ). 2 where the last inequality holds because of B.1 and the assumption on γ in the theorem statement. Now, by Wedin’s theorem with α = 21 σmin (M∗ ), for (X, Σ, Y) = rank-k SVD(W ⊙ M), max {sin θ(U, X), sin θ(V, Y)} ≤ 2(γµk + δ) σmin (M∗ ) Since γ and δ are small enough, so sinθ ≤ 1/2. In this case, we have tanθ ≤ 2sinθ, then the lemma follows. Finally, this gives us the following guarantee on the initialization: Lemma 8 (SVD initialization). Suppose M∗ , W satisfy all the assumptions. distc (V, Y1 ) ≤ 8k∆1 , ρ(Y1 ) ≤ where ∆1 = 2µ 1 − k∆1 8(γµk+δ) σmin (M∗ ) . e 1 . By Lemma 7 and 4, we get that Proof of Lemma 8. First, consider Y which means that ∃Q ∈ Ok×k , s.t. hence e 1 , V) ≤ ∆1 distc (Y e 1 Q − Vk2 ≤ ∆1 kY e 1 Q − VkF ≤ k∆1 ≤ kY 1 4 where the last inequality follows since γ and δ are small enough. e i − Vi k ≥ e i k ≥ ξ = 2µk , then kY Next, consider Y1 . In the clipping step, if kY 1 1 n i µk e i . So Y = Y . Otherwise, n e 1 Q − VkF ≤ 1 . kY1 Q − VkF ≤ kY 4 15 µk n , i and kY1 − Vi k = kVi k = Finally, we can argue that Y1 is close to V. Let’s assume that Y1 = Y1 R−1 , for an upper-triangular R. ⊤ ⊤ sin θ(V, Y1 ) = kV⊥ Y1 k2 = kV⊥ (Y 1 − VQ−1 )R−1 k2 ≤ kY1 Q − Vk2 kR−1 k2 ≤ 1 kY1 Q − VkF σmin (Y 1 ) where the second inequality follows because the singular values of R and Y 1 are the same. Note that σmin (Y 1 ) ≥ σmin (V) − kY1 − VkF ≥ σmin (V) − k∆1 = 1 − k∆1 ≥ So sin θ(V, Y1 ) ≤ 2kY1 Q − VkF ≤ 1 2 1 . 2 In this case, we have tan θ(V, Y1 ) ≤ 2sin θ(V, Y1 ) and thus distc (V, Y1 ) ≤ 2tan θ(V, Y1 ) ≤ 4sin θ(V, Y1 ) ≤ 8kY1 Q − Vk2 ≤ 8kY1 Q − VkF ≤ 8k∆1 . i For ρ(Y1 ), observe that Y1i = Y R−1 , so i kY1i k ≤ kY1 kkR−1 k2 ≤ ξ ξ ≤ 1 − k∆1 σmin (Y1 ) which leads to the bound. B.2 Random initialization With respect to the random initialization, the lemma we will need is the following one: Lemma 9 (Random initialization). Let Y be a random matrix in Rn×k generated as Yi,j = bi,j √1n , where bi,j are independent, uniform {−1, 1} variables. Furthermore, let kWk∞ ≤ k2 µλn . Then, with probability at least 1 − n12 log2 n over the draw of Y,  1 λ ∀i, σmin Y⊤ Di Y ≥ . 4 kµ P Proof of Lemma 9. Notice that Y⊤ Di Y = j (Yj )⊤ (Di )j Yj , and each of the terms (Yj )⊤ (Di )j Yj is indepen1 j ⊤ j dent. it’s easy to P Furthermore, Psee that E[(Y ) (Di )j (Y )] = n (Di )j , ∀j. By linearity of expectation it follows that 1 j ⊤ j E[ j (Y ) (Di )j Y ] = n j (Di )j . P n Now, we claim j (Di )j ≥ λn kµ . Indeed, by Assumption (A3) we have for any vector a ∈ R a⊤ V⊤ Di Va = X j (Di )j hVj , ai2 ≥ λ. P P P n On the other hand, however, by incoherence of V, j (Di )j hVj , ai2 ≤ j (Di )j µk j (Di )j ≥ λ kµ . n . Hence, Putting things together, we get X λ E[ (Yj )⊤ (Di )j Yj ] ≥ kµ j Denote B := k(Yj )⊤ (Di )j Yj k2 ≤ λ k (Di )j ≤ n kµ log2 n where the first inequality follows from our sampling procedure, and the last inequality by the assumption that kWk∞ ≤ λn . k2 µ log2 n 16 Since all the random variables (Yj )⊤ (Di )j Yj are independent, applying Matrix Chernoff we get that   λ   kµB log2 n  X e−δ λ e−δ j ⊤ j   Pr ≤n (Y ) (Di )j (Y ) ≤ (1 − δ) ≤n kµ (1 − δ)(1−δ) (1 − δ)(1−δ) j Picking δ = 43 , and union bounding over all i, with probability at least 1 − for all i,  1 λ σmin Y⊤ Di Y ≥ 4 kµ as needed. B.3 1 n2 , Update We now prove the two key technical lemmas (Lemma 10 and Lemma 11) and then use them to prove that the updates make progress towards the ground truth. We prove them for Yt and use them to show Xt improves, while completely analogous arguments also hold when switching the role of the two iterates. Note that we measure the distance between Yt and V by distc (Yt , V) = minQ∈Ok×k kYt Q − Vk where Ok×k is the set of k × k orthogonal matrices. For simplicity of notations, in these two lemmas, we let Yo = Yt Q∗ where Q∗ = argminQ∈Ok×k kYt Q − Vk. We first show that there can only be a few i’s such that the spectral property of Yo⊤ Di Yo can be bad, when Yo is close to V. Let (Di )j be the j-th diagonal entry in Di , that is, (Di )j = Wi,j . Lemma 10. Let Yo be a (column) orthogonal matrix in Rn×k , and ǫ ∈ (0, 1). If kYo − Vk2F ≤ P D1 = maxi∈[n] j (Di )j , then  i ∈ [n] σmin (Yo⊤ Di Yo ) ≤ (1 − ǫ)λ ≤ ǫ3 λ 2 n 128µkD1 for 1024µ2 k 2 γ 2 D1 kV − Yo k2F . ǫ4 λ3 Proof of Lemma 10. For a value g > 0 which we will specify shortly, we call j ∈ [n] “good” if kYoj − Vj k2 ≤ g 2 . Denote the set of “good” j’s as Sg . Then for every unit vector a ∈ Rk , X (Di )j ha, Yoj i2 a⊤ Yo⊤ Di Yo a = j∈[n] ≥ = X j∈Sg X j∈Sg (Di )j ha, Yoj i2 2 (Di )j ha, Vj i + ha, Yoj − Vj i 4−ǫ X ǫ X (Di )j ha, Vj i2 − (Di )j ha, Yoj − Vj i2 ≥ (1 − ) 4 ǫ j∈Sg j∈Sg (Using the fact ∀x, y ∈ R : (x + y)2 ≥ (1 − ǫ0 )x2 − ǫ X 4−ǫ 2 X ≥ (1 − ) (Di )j (Di )j ha, Vj i2 − g 4 ǫ j∈Sg 1 − ǫ0 2 y ) ǫ0 j∈[n] µk ǫ X (Di )j ha, Vj i2 − ≥ (1 − ) 4 n j∈[n] X j∈[n]−Sg (Di )j − 4−ǫ 2 X (Di )j g ǫ By Assumption (A3), we know that X (Di )j ha, Vj i2 = aT V⊤ Di Va ≥ σmin (V⊤ Di V) ≥ λ j∈[n] 17 j∈[n] Moreover, recall D1 = maxi∈[n] P j (Di )j , so when g 2 ≤ ǫ2 λ 16D1 , ǫλ 4−ǫ 2 X (Di )j ≤ g ǫ 4 j∈[n] Let us consider now P j∈[n]−Sg (Di )j . Define:   µk S = i ∈ [n]  n Then it is sufficient to bound |S|. For Sg , observe that X j Which implies that X j∈[n]−Sg (Di )j ≥  ǫλ  4  kVj − Yoj k22 = kV − Yo k2F |[n] − Sg | = size ([n] − Sg ) ≤ kV − Yo k2F g2 Let uS be the indicator vector of S, and ug be the indicator vector of [n] − Sg , we know that X X (Di )j u⊤ = S Wug i∈S j∈[n]−Sg ≥ ǫλn |S| 4µk On the other hand, u⊤ S Wug ⊤ = u⊤ S Eug + uS (W − E)ug q ≤ |S||[n] − Sg | + γn |S||[n] − Sg | Putting these two inequalities together, we have |[n] − Sg | + γn ǫλn 8µk , Which implies when |[n] − Sg | ≤ |S| ≤ Then, setting g 2 = ǫ2 λ 16D1 , s |[n] − Sg | ǫλn ≥ |S| 4µk we have: 64µ2 k 2 γ 2 |[n] − Sg | 64µ2 k 2 γ 2 kV − Yo k2F ≤ 2 2 ǫ λ ǫ2 λ2 g 2 we have:  i ∈ [n] σmin (Yo⊤ Di Yo ) ≤ (1 − ǫ)λ ≤ |S| ≤ 1024µ2k 2 γ 2 D1 kV − Yo k2F ǫ4 λ3 which is what we need. Lemma 11. Let Yo be a (column) orthogonal matrix in Rn×k . Then we have X ⊤ kV⊤ Y⊥ Y⊥ Di Yo k22 ≤ γ 2 ρ(Yo )nk 3 kYo − Vk22 i∈[n] 18 ⊤ Proof of Lemma 11. We want to bound the spectral norm of V⊤ Y⊥ Y⊥ Di Yo , for a fixed j ∈ [k], let Yj be the j-th ⊤ e j be the j-th column of Y⊥ Y V. column of Yo and V ⊥ ′ ′ e j )i (Yj ′ )i . For fixed j, j ′ ∈ [k], consider a new vector xj,j ∈ Rn such that xj,j = (V i ′ P j,j e j , Yj ′ i = 0, which implies that = 0. Note that hV i xi ⊤ Let us consider Vj⊤ Y⊥ Y⊥ Di Yj ′ , we know that ⊤ Vj⊤ Y⊥ Y⊥ Di Yj ′ X = s∈[n] X = e j )s (Yj ′ )s (Di )s (V (Di )s xj,j s ′ s∈[n] Which implies that X i∈[n]   X s∈[n] ′ 2  (Di )s xj,j s ′ = kWxj,j k22 ′ = k(W − E)xj,j k22 ′ (since Exj,j = 0) ′ ≤ γ 2 n2 kxj,j k22 Observe that ′ kxj,j k22 X = i∈[n] = X i∈[n] ≤ = ≤ = ≤ Which implies X i∈[n] ⊤   X s∈[n] ′ 2 (xj,j i ) e j )2i (Yj ′ )2i (V ρ(Yo )k X e 2 (Vj )i n i∈[n] ρ(Yo )k e 2 kVj k2 n ρ(Yo )k ⊤ kY⊥ Y⊥ Vk22 n ρ(Yo )k ⊤ kY⊥ Y⊥ (Yo − V)k22 n ρ(Yo )k kYo − Vk22 . n ′ 2  ≤ γ 2 ρ(Yo )nkkYo − Vk22 (Di )s xj,j s ⊤ Now we are ready to bound V Y⊥ Y⊥ Di Yo . Note that ⊤ kV⊤ Y⊥ Y⊥ Di Yo k22 ≤ ≤ = ⊤ kV⊤ Y⊥ Y⊥ Di Yo k2F X 2 ⊤ Vj⊤ Y⊥ Y⊥ Di Yj ′ j,j ′ ∈[k] X j,j ′ ∈[k] 19   X s∈[n] ′ 2  . (Di )s xj,j s This implies that X i∈[n] ⊤ kV⊤ Y⊥ Y⊥ Di Yo k22 X X ≤ i∈[n] j,j ′ ∈[k] as needed.   X s∈[n] ′ 2  ≤ γ 2 ρ(Yo )nk 3 kYo − Vk22 . (Di )s xj,j s We now use the two technical lemmas to prove the guarantees for the iterate after one update step. 2 λ n Lemma 12 (Update, main). Let Y be a (column) orthogonal matrix in Rn×k , and dist2c (Y, V) ≤ min{ 21 , 384µk 2D } 1 P for D1 = maxi∈[n] j (Di )j . e ← argmin Define X M − XY⊤ . Let X a n × k matrix such that for each row: n×k X∈R W i X =  ei X 0 Suppose X has QR decompositionX = XR. Then 2 3 2 (1) kX − UΣV⊤ Yk2F ≤ ∆2u := 108ξµ λk2 γ D1 + e i k2 ≤ ξ = if kX 2 otherwise. 160γ 2 µρ(Y)k4 λ2 (2) If ∆u ≤ 18 σmin (M∗ ), then distc (U, X) ≤  2µk n distc (Y, V)2 + 160k kW λ2 ⊙ Nk22 . 8 4µ ∆u and ρ(X) ≤ . σmin (M∗ ) − 2∆u σmin (M∗ ) − 2∆u e satisfies Proof of Lemma 12. (1) By KKT condition, we know that for orthogonal Y, the optimal X i  h e ⊤ Y=0 W ⊙ M − XY e i of X e is given by which implies that the i-th row X e i = Mi Di Y Y⊤ Di Y X −1 = (M∗ )i Di Y Y⊤ Di Y Let us consider the first term, by M∗ = UΣV⊤ , we know that (M∗ )i Di Y Y⊤ Di Y −1 −1 + Ni Di Y Y⊤ Di Y −1 = Ui ΣV⊤ Di Y Y⊤ Di Y = ⊤ Ui ΣV⊤ (YY⊤ + Y⊥ Y⊥ )Di Y Y⊤ Di Y = ⊤ Ui ΣV⊤ Y + Ui ΣV⊤ Y⊥ Y⊥ Di Y Y⊤ Di Y −1 which implies that e i − Ui ΣV⊤ Y = Ui ΣV⊤ Y⊥ Y⊤ Di Y Y⊤ Di Y X ⊥ Let us consider set S1 =  −1 i ∈ [n] σmin (Y⊤ Di Y) ≤ 20 + Ni Di Y Y⊤ Di Y λ 4  −1 −1 −1 . Now we have: X i∈S / 1 e i − Ui ΣV⊤ Y X 2 ≤ 2  16 X ⊤ 2kUi ΣV⊤ Y⊥ Y⊥ Di Yk22 + 2kNi Di Yk22 2 λ i∈S / 1 ≤ 32µkkΣk22 X 32 X ⊤ kNi Di Yk22 kV⊤ Y⊥ Y⊥ Di Yk22 + 2 2 nλ λ i∈S / i∈[n] 1 ≤ 32µkkΣk22 X 32 ⊤ kV⊤ Y⊥ Y⊥ Di Yk22 + 2 k(W ⊙ N)Yk2F 2 nλ λ i∈[n] ≤ ∆g := 32γ 2µρ(Y)k 4 32k distc (Y, V)2 + 2 k(W ⊙ N)k22 . λ2 λ i ⊤ 2 where the last inequality is due to Lemma 11. Note that since ξ = 2µk n ≥ 2kU ΣV Yk2 , this implies   n o 2∆g e i k2 ≥ ξ e i − Ui ΣV⊤ Yk2 ≥ ξ i ∈ [n] − S1 kX i ∈ [n] − S ≤ k X ≤ . 1 2 2 2 ξ n o e i k2 ≥ ξ , we have: Let S2 = i ∈ [n] − S1 kX 2 ⊤ X − UΣV Y 2 F = n X i=1 ≤ i X − Ui ΣV⊤ Y X 2ξ + X i6∈S1 ∪S2 i∈S1 ∪S2 2ξ(|S1 | + |S2 |) + ≤ 2ξ|S1 | + 4∆g + ∆g . X − UΣV⊤ Y i (because kX k22 ≤ ξ 2 e i − Ui ΣV⊤ Y X X ≤ By Lemma 10, we know that |S1 | ≤ 2 i6∈S1 ∪S2 54µ2 k3 γ 2 D1 kV λ2 and kUi ΣV⊤ Yk22 ≤ ξ) 2 2 e i − Ui ΣV⊤ Y X 2 2 − Yk22 . Further plugging in ∆g , we have 2 F 160k 54µ2 k 3 γ 2 D1 160γ 2 µρ(Y)k 4 kY − Vk22 + 2 k(W ⊙ N)k22 ≤ 2ξ kV − Yk22 + 2 λ λ2 λ   2 4 2 3 2 160k 160γ µρ(Y)k 108ξµ k γ D1 kY − Vk22 + 2 k(W ⊙ N)k22 . + = λ2 λ2 λ (2) Denote B = ΣV⊤ Y. Then, ⊤ −1 sin θ(U, X) = kU⊤ k2 ≤ kX − UBk2 kR−1 k2 = ⊥ Xk2 = kU⊥ (X − UB)R 1 kX − UBk2 σmin (X) Since kX − UBk2 ≤ ∆u , we have σmin (X) ≥ σmin (UB) − ∆u = σmin (ΣV⊤ Y) − ∆u ≥ σmin (M∗ )cos θ(Y, V) − ∆u . By the assumption cos θ(Y, V) ≥ 1/2, so sin θ(U, X) ≤ 2 ∆u . σmin (M∗ ) − 2∆u 21 When ∆u ≤ 81 σmin (M∗ ), the right hand side is smaller than 1/3, so cos θ(U, X) ≥ 1/2, and thus tan θ(U, X) ≤ 2sin θ(U, X). Then the statement on distc (U, X) follows from distc (U, X) ≤ 2tan θ(U, X) ≤ 4sin θ(U, X). i Finally, observe that Xi = X R−1 , so i kXi k2 ≤ kX k2 kR−1 k2 ≤ ξ σmin (X) which leads to the bound. B.4 Putting everything together: proofs of the main theorems Finally, in this section we put things together and prove the main theorems. We first proceed to the SVD-initialization based algorithm: Theorem 1. If M∗ , W satisfy assumptions (A1)-(A3), and   r λ λ n , , γ = O min D1 τ µ3/2 k 2 τ 3/2 µk 2 f that satisfies then after O(log(1/ǫ)) rounds Algorithm 1 with initialization from Algorithm 3 outputs a matrix M   f − M∗ ||2 ≤ O kτ ||W ⊙ N||2 + ǫ. ||M λ The running time is polynomial in n and log(1/ǫ). Proof of Theorem 1. We first show by induction distc (Xt , U) ≤ 1 k 2t + 70 λσmin (M∗ ) δ for t ≥ 1. First, by Lemma 8, Y1 satisfies distc (V, Y1 ) ≤ 8k∆1 = 1 2t + 70 λσmink(M∗ ) δ for t > 1, and distc (Yt , U) ≤ 64k(γµk + δ) . σmin (M∗ )   Since γ = O τ k12 µ , the base case follows. Now proceed to the inductive step and prove the statement for t + 1 assuming it is true for t. Now we can apply Lemma 12. By taking the constants within the O(·) notation for γ sufficiently small and by the inductive hypothesis, we have   1 2 160γ 2µρ(Y1 )k 4 108ξµ2 k 3 γ 2 D1 ≤ + σmin (M∗ ) 2 2 100 λ λ and ∆u ≤ 1 σmin (M∗ ). 8 By Lemma 12, we get 8 2 ∆u ≤ ∆u distc (U, Xt+1 ) ≤ ∗ σmin (M ) − 2∆u 3σmin (M∗ ) s  8 160k 108ξµ2 k 3 γ 2 D1 160γ 2 µρ(Y1 )k 4 = dist2c (U, Xt ) + 2 δ 2 + 2 2 ∗ 3σmin (M ) λ λ λ s s !  160γ 2µρ(Y1 )k 4 160k 2 8 108ξµ2 k 3 γ 2 D1 2 distc (Yt , V) + + δ ≤ 3σmin (M∗ ) λ2 λ2 λ2 √ 1 35 k ≤ distc (Yt , V) + δ 2 λσmin (M∗ ) 22 (using √ √ √ a + b ≤ a + b) so the statement also holds for t + 1. This completes the proof for bounding distc (Xt , U) and distc (Yt , V). Given the bounds on distc (Xt , U) and distc (Yt , V), we are now ready to prove the theorem statement. For f = XY. simplicity, let X denote XT +1 and Y denote YT , so the algorithm outputs M By Lemma 12,   160k 108ξµ2 k 3 γ 2 D1 160γ 2µρ(Y)k 4 distc (Y, V)2 + 2 kW ⊙ Nk22 . kX − UΣV⊤ Yk2F ≤ ∆2u := + λ2 λ2 λ Plugging the choice of γ and noting ξ = which leads to 2µk n and ρ(Y) = O(µ/σmin (M∗ )), we have  160k kX − UΣV⊤ Yk2F ≤ ∆2u = O distc (Y, V)2 + 2 kW ⊙ Nk22 λ √ 16 k kX − UΣV YkF ≤ ∆u ≤ O (distc (Y, V)) + kW ⊙ Nk2 . λ ⊤ f 2 = kM∗ −XY⊤ k2 . By definition, we know that there exists Q such that Y = VQ+∆y Now consider kM∗ − Mk where k∆y k2 = O(distc (Y, V)). Also, let R = X − UΣV⊤ Y.   f − M∗ = UΣV⊤ (VQ + ∆y ) + R (VQ + ∆y )⊤ − UΣV⊤ M ⊤ ⊤ ⊤ = UΣQ∆⊤ y + UΣV ∆y (VQ + ∆y ) + R(VQ + ∆y ) ⊤ ⊤ ⊤ = UΣQ∆⊤ y + UΣV ∆y Y + RY . Therefore, f − M∗ k2 ≤ kUΣk2 kQk2 k∆y k2 + kUΣV⊤ k2 k∆y k2 kYk2 + kRk2 kYk2 kM ≤ 2k∆y k2 + kRk2 √ 16 k kW ⊙ Nk2 . ≤ O (distc (Y, V)) + λ Combining this with the bound on distc (YT , V), the theorem then follows. Next, we show the main theorem for random initialization: Theorem 3 (Main, random initialization). Suppose M∗ , W satisfy assumptions (A1)-(A3) with  r  λ n λ γ = O min , , D1 τ µ2 k 5/2 τ 3/2 µ3/2 k 5/2   λn , kWk∞ = O 2 k µ log2 n where D1 = maxi∈[n] kWi k1 . Then after O(log(1/ǫ)) rounds Algorithm 1 using initialization from Algorithm 4 f that with probability at least 1 − 1/n2 satisfies outputs a matrix M   kτ ∗ f kM − M k2 ≤ O kW ⊙ Nk2 + ǫ. λ The running time is polynomial in n and log(1/ǫ). 23 Proof of Theorem 3. Let Y be initialized using the random initialization algorithm 4. Consider applying the proof in Lemma 12, with S1 being modified to be   λ S1 = i ∈ [n] σmin (Y⊤ Di Y) ≤ 4µk But with this modification, S1 = ∅, with high probability. Then the same calculation from Lemma 12 (which now doesn’t need to use Lemma 10 at all since S1 = ∅) gives X − UΣV⊤ Y 2 F ≤ ∆g µk But following part (2) of the same Lemma, we get that if ∆g µk < 81 σmin (M ∗ ), distc (U, X) ≤ 2 σmin (M∗ ) − 2∆g µk ∆g µk So, in order to argue by induction in 1 exactly as before, we only need to check that after the update step for X, distc (U, X) is small enough to apply Lemma 12 for later steps. Indeed, we have: s   1 2 λ2 n min distc (U, X) ≤ ∆ µk ≤ , g σmin (M∗ ) − 2∆g µk 2 384µk 2 D1 Noticing that ∆g has a quadratic dependency on γ, we see that if )! (r 3/2 n λσmin (M∗ ) λσmin (M∗ ) , , 3/2 5/2 γ = O min D1 µ2 k 5/2 µ k the inequality is indeed satisfied. With that, the theorem statement follows. B.5 Estimating σmax (M∗ ) Finally, we show that we can estimate σmax (M∗ ) up to a very good accuracy, so that we can apply our main theorems to matrices with arbitrary σmax (M∗ ). This is quite easy: the estimate of it is just kW ⊙ Mk2 . Then, the following lemma holds: 1 Lemma 13. It γ = o( kµ ) and δ = kW ⊙ Nk2 = o(σmax (M∗ )) then kW ⊙ Mk2 = (1 ± o(1))(σmax (M∗ )) Proof. We proceed separately for the upper and lower bound. For the upper bound, we have kW ⊙ Mk2 = kW ⊙ M∗ + W ⊙ Nk2 ≤ kW ⊙ M∗ k2 + kW ⊙ Nk2 ≤ k(W − E) ⊙ M∗ k2 + kE ⊙ M∗ k2 + kW ⊙ Nk2 ≤ γkµσmax (M∗ ) + σmax (M∗ ) + δ ≤ (1 + o(1))σmax (M∗ ). (by Lemma 5) For the lower bound, completely analogously we have kW ⊙ Mk2 = kW ⊙ M∗ + W ⊙ Nk2 ≥ kW ⊙ M∗ k2 − kW ⊙ Nk2 ≥ kE ⊙ M∗ k2 − k(W − E) ⊙ M∗ k2 − kW ⊙ Nk2 ≥ σmax (M∗ ) − γkµσmax (M∗ ) − δ ≥ (1 − o(1))σmax (M∗ ) (by Lemma 5) which finishes the proof. Given this, the reduction to the case σmax (M∗ ) ≤ 1 is obvious: first, we scale the matrix M down by our estimate of σmax (M∗ ) and run our algorithm with, say, four times as many rounds. After this, we rescale the resulting matrix f by our estimate of σmax (M∗ ), after which the claim of Theorems 1 and 3 follows. M 24 Algorithm 5 Main Algorithm (A LT) Input: Noisy observation M, weight matrix W, rank k, number of iterations T √ 1 64 kδ √ 1: (X1 , Y1 ) = SVDI NITIAL (M, W), d1 = + λσmin (M∗ ) 8k log n 2: 3: 4: 5: Y 1 ← W HITENING (Y1 , W, d1 , λ, λ, µ, k) for t = 1, 2, ..., T do √ 64 k 1 √1 + dt+1 = 2t+1 λσmin (M∗ ) δ 8k log n ⊤ Xt+1 ← argminX∈Rn×k M − XYt W e t+1 ← QR(Xt+1 ) X e t+1 , W, dt+1 , λ, λ, µ, k) Xt+1 ← W HITENING(X 7: 8: Yt+1 ← argminY∈Rn×k M − Xt+1 Y⊤ W e t+1 ← QR(Yt+1 ) 9: Y e t+1 , W, dt+1 , λ, λ, µ, k) 10: Y t+1 ← W HITENING (Y 11: end for ⊤ 12: Σ ← argminΣ kW ⊙ (M − XT +1 ΣY T +1 )k2 f = XT +1 ΣY ⊤ Output: M 6: T +1 Algorithm 6 Whitening (W HITENING) e ∈ Rn×k , weight W, distance d, spectral barriers λ, λ, incoherency µ, rank k. Input: orthogonal matrix X 1: Solve the following convex programing on the matrices R ∈ Rn×k and {Ar ∈ Rk×k }n r=1 : e 2≤d ||R − X|| e ⊤ (R − X) e + (R − X) e ⊤ X|| e 2 ≤ d2 ||X e ⊤ R||2 ≤ d ||X ⊥ r ⊤ (R ) Rr  Ar , ∀r ∈ [n] µk Tr(Ar ) ≤ , ∀r ∈ [n] n n X Ar = I r=1 λI  n X r=1 Wi,r Ar  λI, ∀i ∈ [n] ∀r ∈ [n], Xr ∼ Rademacher(Rr , Ar − (Rr )⊤ Rr ). 3: X = QR(X), X ∈ Rn×k whose rows are Xr . Output: X. (may need O(log(1/α)) runs to succeed with probability 1 − α; see text) 2: C An alternative approach: alternating minimization with SDP whitening Our main results build on the insight that the spectral property only need to hold in an average sense. However, we can even make sure that the spectral property holds at each step in a strict sense by a whitening step using SDP and Rademacher rounding. This is presented a previous version of the paper, and we keep this result here since potentially it can be applied in some other applications where similar spectral properties are needed and is thus of independent interest. The whitening step (see Algorithm 6) is a convex (actually semidefinite) relaxation followed by a randomized 25 rounding procedure. We explain each of the constraints in the semidefinite program in turn. The first three constraints e The next two constraints control the incoherency, and the rest are control the spectral distance between X and X. for the spectral ratio. The solution of the relaxation is then used to specify the mean and variance of a Rademacher (random) vector, from which the final output of the whitening step is drawn. Here a Rademacher vector is defined as: Definition (Rademacher random vector). A random vector x ∈ Rk is a Rademacher random vector with mean µ and variance Σ  0 (denoted as x ∼ Rademacher(µ, Σ)), if x = µ + Sσ where S is a k × k symmetric matrix such that S2 = Σ, σ ∈ Rk is a vector where each entry is i.i.d Rademacher random variable. We use this type of random vector to ensure that if x ∼ Rademacher(µ, Σ), then E[x] = µ, E[xx⊤ ] = µµ⊤ + Σ. Since the desired properties of the output of whitening can be tested (see Lemma 17), we can repeat the whitening step O(log(1/α)) times to get high probability 1 − α. In the rest of the paper, we will just assume that it is repeated sufficiently many times (polynomial in n and log(1/ǫ)) so that Algorithm 5 succeeds with probability 1 − 1/n. We now present the analysis for this algorithm. The SVD initialization has been analyzed, so we focus on the update step and the whitening step. 1, λ ≤ 1, therefore, without lose of generality we can assume that ||W ⊙ output zero matrix.   √ k3/2 log n ∗ λσmin (M∗ ) ||W⊙N||2 and ||M ||2 = ∗ min (M ) √ , otherwise we can just N||2 ≤ λσ k3/2 log n ∗ f such that ||M−M f Note Since our algorithm will output matrix M ||2 ≈ O C.1 Update We want to show that after every round of A LT, we move our current matrices X, Y closer to the optimum. We will ⊤ e ← argmin e = M∗ Y + G where ||G||2 is show that X is a noisy power method update: X X∈Rn×k M − XY W small. e = M∗ Y, then we know that tan θ(X, e U) = 0, so within one For intuition, note that if ||G||2 = 0, that is, X step of update we will be already hit into the correct subspace. We will show when ||G||2 is small we still have that e U) is progressively decreasing. Then, in order to show ||G||2 is small, we need to make sure we start from tan θ(X, a good Y as assumed in Lemma 16. e U) is small. First, we show that when G is small, then tan θ(X, Lemma 14 (Distance from OPT). Let M∗ = UΣVT ∈ Rn×n be the singular value decomposition of a rank-k matrix e = M∗ Y + G, then we have M∗ , let Y ∈ Rn×k be an orthogonal matrix, X e U) ≤ tan θ(X, ||G||2 . cos θ(Y, V)σmin (Σ) − ||G||2 Proof of Lemma 14. By definition, e U) tan θ(X, = = ≤ ≤ ≤ ≤ For the last term, we have e ⊤ e −1 ||2 ||U⊤ ⊥ X(U X) ∗ ⊤ ∗ −1 ||U⊤ ||2 ⊥ (M Y + G)(U (M Y + G)) ⊤ ⊤ −1 ||U⊤ ||2 ⊥ G(ΣV Y + U G) ⊤ ⊤ −1 ||U⊤ ||2 ⊥ G||2 ||(ΣV Y + U G) ⊤ ⊤ −1 ||U⊥ G||2 ||(V Y) ||2 ||(Σ + U⊤ G(V⊤ Y)−1 )−1 ||2  1 ||U⊤ σ −1 Σ + U⊤ G(V⊤ Y)−1 . ⊥ G||2 cos θ(Y, V) min  ||U⊤ G||2 . σmin (Σ + U⊤ G(V⊤ Y)−1 ) ≥ σmin (Σ) − σmax U⊤ G(V⊤ Y)−1 ≥ σmin (Σ) − cos θ(Y, V) 26 Therefore, e U) tan θ(X, ≤ = ≤ ||U⊤ G||2  ⊥ cos θ(Y, V) σmin (Σ) − ||U⊤ G||2 cos θ(Y,V) ||U⊤ ⊥ G||2 cos θ(Y, V)σmin (Σ) − ||U⊤ G||2 ||G||2 cos θ(Y, V)σmin (Σ) − ||G||2  completing the proof. Now we show that if Y has nice properties as stated in Lemma 16, then G is small. Recall the following notation: for a matrix A, let ρ(A) be defined as maxi { nk ||Ai ||22 }. Lemma 15 (Bounding ||G||2 ). Let M∗ = UΣV⊤ ∈ Rn×n be the singular value decomposition of a rank-k matrix M∗ , M = M∗ + N be the noisy observation, and let W, M∗ satisfy the conditions of Theorem 20. Let Y ∈ Rn×k be an orthogonal matrix. For e = argmin ||M − XY⊤ ||W X X e = M∗ Y + G where we have X ) p √ ρ(U)ρ(Y) k||W ⊙ N|| 2 . sin θ(Y, V) + ||G||2 ≤ max γk 3/2 σmin (Y⊤ Di Y) σmin (Y⊤ Di Y) i∈[n] ( e Proof of Lemma 15. By taking the derivatives of ||M − XY⊤ ||W w.r.t. X, we know that the optimal solution X ⊤ ∗ e e = M Y + G, we get satisfies (W ⊙ [M − XY ])Y = 0. Plugging in X (W ⊙ [M − M∗ YY⊤ ])Y = (W ⊙ [GY⊤ ])Y. ⊤ Since M = M∗ + N and I = YY⊤ + Y⊥ Y⊥ , the above equation is ⊤ (W ⊙ [GY⊤ ])Y = (W ⊙ [M∗ Y⊥ Y⊥ ])Y + (W ⊙ N)Y. So for any i ∈ [n] (recall that [·]i is the i-th row) ⊤ ])Y]i + [(W ⊙ N)Y]i . [(W ⊙ [GY⊤ ])Y]i = [(W ⊙ [M∗ Y⊥ Y⊥ (C.1) Note that for every matrix S ∈ Rn×n , for Di = Diag(Wi ) we have [W ⊙ S]i = Si Di . Applying this to (C.1) leads to ⊤ Gi Y⊤ Di Y = (M∗ )i Y⊥ Y⊥ Di Y + [(W ⊙ N)]i Y. ⊤ Since (M∗ )i Y⊥ Y⊥ IY = 0, ⊤ Gi Y⊤ Di Y = (M∗ )i Y⊥ Y⊥ (Di − I)Y + [(W ⊙ N)]i Y. This gives us ⊤ Gi = (M∗ )i Y⊥ Y⊥ (Di − I)Y(Y⊤ Di Y)−1 + [(W ⊙ N)]i Y(Y⊤ Di Y)−1 . 27 (C.2) Now we turn to bound the operator norm of G. By definition, it suffices to bound ||a⊤ Gb||2 for any two unit vectors a ∈ Rn×1 , b ∈ Rk×1 (note that for a scalar s, ||s||2 = |s|). By (C.2), ||a⊤ Gb||2 n X = i=1 ≤ | n X i=1 ⊤ ai (M∗ )i Y⊥ Y⊥ (Di − I)Y(Y⊤ Di Y)−1 b + ⊤ ai (M∗ )i Y⊥ Y⊥ (Di − I)Y(Y⊤ Di Y)−1 b {z T1 In the following, we bound the two terms T 1 and T 2 respectively. n X i=1 + }2 | ai [(W ⊙ N)]i Y(Y⊤ Di Y)−1 b n X i=1 ai [(W ⊙ N)]i Y(Y⊤ Di Y)−1 b {z T2 ⊤ (Bounding T 1) Let Q = ΣV⊤ Y⊥ Y⊥ . We have ⊤ (M∗ )i Y⊥ Y⊥ = Ui Q and ||Q||2 ≤ ||V⊤ Y⊥ ||2 = sin θ(Y, V). Also let B denote the matrix whose i-th column is Bi = (Y⊤ Di Y)−1 b. Then T 1 becomes n X T1 = i=1 n X = i=1 ⊤ ai (M∗ )i Y⊥ Y⊥ (Di − I)Y(Y⊤ Di Y)−1 b ai Ui Q(Di − I)YBi n X k X = i=1 r=1 k X n X = r=1 i=1 k X = 2 (ai Ui,r )Qr (Di − I)YBi (ai Ui,r )Qr (Di − I)YBi n X r=1 i,j=1 2 2 (ai Ui,r )(Wi,j − 1)Qr,j Yj Bi 2 Pn where the last equality is because Qr (Di − I)Y = j=1 (Wi,j − 1)Qr,j Yj . Now denote αi,r = ai Ui,r and αr = (α1,r , ..., αn,r )⊤ . T1 = k X n X r=1 i,j=1 = k X r=1 ≤ = k X r=1 k X r=1 Clearly, for kQr k2 we have (ai Ui,r )(Wi,j − 1)Qr,j Yj Bi 2 ⊤ ⊤ α⊤ r [(W − E) ⊙ (B Y )]Qr 2 ⊤ ⊤ α⊤ r [(W − E) ⊙ (B Y )]Qr kαr k2 (W − E) ⊙ (B⊤ Y⊤ ) kQr k2 ≤ kQk2 ≤ sin θ(Y, V). 28 2 2 2 kQr k2 . 2 . }2 For kαr k2 , we have k X r=1 ||αr ||2 v u k √ uX ≤ ||αr ||22 kt r=1 v u k n X √ uX a2i U2i,r = kt r=1 i=1 v u n √ uX = a2i kt k X r=1 i=1 v u √ u kρ(U) kt ≤ n r ρ(U) = k . n For (W − E) ⊙ (B⊤ Y⊤ ) 2 U2i,r n X a2i i=1 !! ! , we can apply the spectral lemma (Lemma 5) to get q (W − E) ⊙ (B⊤ Y⊤ ) 2 ≤ γk ρ(B⊤ )ρ(Y). 1 , σmin (Y ⊤ Di Y) We have ||Bi ||2 = ||(Y⊤ Di Y)−1 b||2 ≤ ⊤ ρ(B ) ≤ max i∈[n] so  n/k 2 σmin (Y⊤ Di Y) and ⊤ ⊤ (W − E) ⊙ (B Y ) 2 ≤ max i∈[n] (  ) p knρ(Y) . σmin (Y⊤ Di Y) γ Putting together, we have ( p ) γ knρ(Y) ρ(U) T1 ≤ k × sin θ(Y, V) × max n i∈[n] σmin (Y⊤ Di Y) ) ( p γk 3/2 ρ(Y)ρ(U) sin θ(Y, V) . ≤ max σmin (Y⊤ Di Y) i∈[n] r (Bounding T 2) Recall that B denote the matrix whose i-th column is Bi = (Y⊤ Di Y)−1 b. T2 = = n X i=1 n X i=1 = n X i=1 = ai [(W ⊙ N)]i Y(Y⊤ Di Y)−1 b ai [(W ⊙ N)]i YBi ai [(W ⊙ N)]i k X n X r=1 i=1 k X 2 Yr Br,i r=1 ai [(W ⊙ N)]i Yr Br,i 29 2 . 2 2 (C.3) Now denote βi,r = ai Br,i and βr = (βr,1 , βr,2 , . . . , βr,n )⊤ . k X n X T2 = r=1 i=1 k X n X = r=1 i=1 k X = r=1 ≤ ≤ k X r=1 r=1 βr⊤ (W ⊙ N)Yr 2 2 2 2 kβr k2 kW ⊙ Nk2 kYr k2 . We have kYr k2 = 1. For kβr k2 , we have k X βi,r [(W ⊙ N)]i Yr βr⊤ (W ⊙ N)Yr r=1 k X ai [(W ⊙ N)]i Yr Br,i v u k √ uX ≤ ||βr ||22 kt kβr k2 r=1 v u k n X √ uX  a2i B2r,i = kt r=1 i=1 v u n k X √ uX = kt a2i B2r,i i=1 r=1 v u n √ uX = kt a2i ||Bi ||22 . i=1 We have ||Bi ||2 = ||(Y⊤ Di Y)−1 b||2 ≤ k X r=1 Pn 1 σmin (Y ⊤ Di Y) kβr k2 ≤ ≤ and i=1 a2i = 1, so v u n √ uX a2i ||Bi ||22 kt i=1 max i∈[n] ( √ k σmin (Y⊤ Di Y) ) . Putting together, we have T 2 ≤ max i∈[n] ( ) √ k kW ⊙ Nk2 . σmin (Y⊤ Di Y) (C.4) The lemma follows from combining (C.3) and (C.4). Now we have all the ingredients to prove the update lemma. Lemma 16. Suppose M∗ , W satisfy all the assumptions, column orthogonal matrix Y ∈ Rn×k is (5kµ)-incoherent, and for all i ∈ [n], Di = Diag(Wi ) satisfies 1 λI  Y⊤ Di Y  4λI. 4 30 e ← argminX∈Rn×k M − XY⊤ Then X W satisfies e U) ≤ tan θ(X, 1 16kδ √ . tan θ(Y, V) + λσmin (M∗ ) 16k log n Proof of Lemma 16. By Lemma 14 and Lemma 15, we have ||G||2 , cos θ(Y, V)σmin (M∗ ) − ||G||2 ) ( p √ ρ(U)ρ(Y) k||W ⊙ N||2 3/2 . sin θ(Y, V) + ||G||2 ≤ max γk σmin (Y⊤ Di Y) σmin (Y⊤ Di Y) i∈[n] e U) ≤ tan θ(X, (C.5) (C.6) By the assumptions Y⊤ Di Y  λ4 I, ρ(U) ≤ µ, ρ(Y) ≤ 5kµ, in (C.6) we have: √ √ 4 kδ 4 5γk 2 µ sin θ(Y, V) + . ||G||2 ≤ λ λ Plugging this in (C.5), and noting that γ≤ λ 1 1 √ , ||G||2 ≤ σmin (M∗ ), cos θ(Y, V) ≥ , √ 3 4 2 128 5k µ log n we get e U) ≤ 2 tan θ(X, as needed. √ 1 ||G||2 16 kδ √ ≤ tan θ(Y, V) + cos θ(Y, V)σmin (M∗ ) λσmin (M∗ ) 16k log n C.2 Whitening What remains is to show that the whitening step can make sure that Y has good incoherency and Oi has the desired spectral property. Recall that the whitening step consists of a SDP relaxation and a new rounding scheme to fix Y whenever Y⊤ Di Y having very small singular values. Intuitively, we want to get through the SDP relaxation, an R close to VP and Ar ≈ (Vr )⊤ Vr ∈ Rk×k , so that we’d have the incoherency of R is close to µ(V) which is bounded by µ, and nr=1 Wi,r Ar ≈ V⊤ Di V  λI. (Note one can not simply say when tan θ(Y, U) ≤ d, then Y⊤ Di Y is n ⊤ close to V⊤ Di V. This is because ||Di ||2 can be as large as poly(log n) in our case, however, ||V Di V||2 = O(1).) The key observation is that our randomized rounding outputs a n × k random matrix X such that E[Xr ] = Rr r (X is the i-th row of X), E[(Xr )⊤ (Xr )] = Ar , with the variance of (Xr ) bounded by Ar − (Rr )⊤ Rr . Therefore, E[Xr ] = Rr , E[X⊤ Di X] = n X r=1 Wi,r Ar  λI Thus, X is incoherent (Note ||Xr ||22 = Tr[(Xr )⊤ (Xr )]) and ||(X⊤ Di X)−1 ||2 is small in expectation. we can apply matrix concentration bound on X to show that the above values actually concentrate on the expectation, thus the output matrix X = QR(X) will have the required properties. e is µ-incoherent and satisfies tan θ(X, e U) ≤ Lemma 17 (Whitening). Suppose X e W, d, λ, λ, µ, k) satisfies with high probability: X ← W HITENING (X, ⊤ (1). 14 λI  X Di X  4λI; (2). X is (5kµ)-incoherent; √ (3). tan θ(X, U) ≤ 4dk log n. 31 d 2 where d ≤ √1 . 4k log n Then As a preliminary to showing whitening works, we need to introduce a new type of random variables and a new matrix concentration bound. Another natural distribution to use is a Gaussian random vector y ∼ N (µ, Σ). The advantage of a Rademacher vector x is that kxk2 is always bounded, which facillitates proving concentration bounds. k Lemma 18 (Matrix Concentration). Let {xi }ni=1 be independent Rademacher random vectors in PnR with xi ∼ 2 2 Rademacher(ai , ∆i ), let Tr(∆)max = maxi∈[n] {Tr(∆i )}, (||a||2 )max = maxi∈[n] {||ai ||2 }, || i=1 ∆i || ≤ ∆, then for every t ≥ 0, Pr " n X xi x⊤ i i=1 −E " n X xi x⊤ i i=1 # #  ≥ t ≤ exp − t2 c1 + c2 t  where c1 = c2 = [2Tr(∆)max + (3 + k)(||a||22 )max ]∆, q (k + 1)Tr(∆)max + 2 k(||a||22 )max ∆. Proof of Lemma 18. Let Si ∈ Rk×k be a matrix such that S2i = ∆i , Note that ⊤ ⊤ ⊤ ⊤ ⊤ E[xi x⊤ i ] = E[(ai + Si σ)(ai + Si σ) ] = ai ai + Si E[σσ ]Si = ai ai + ∆i  ⊤ = We first move the random variable to center at zero: consider yi = xi − ai , define Yi = xi x⊤ i − E xi xi ⊤ ⊤ ⊤ ⊤ xi x⊤ − (a a + ∆ ) = y y + a y + y a − ∆ , we have: E[Y ] = 0. By y and −y being identically distributed, i i i i i i i i i i i i i i we obtain ⊤ E[||yi ||22 yi a⊤ i ] = 0, E[hai , yi iyi yi ] = 0 Therefore, using the fact that E[yi ] = 0, and E[yi yi⊤ ] = ∆i , we can calculate that E[Yi2 ] = = 2 E[(yi yi⊤ + ai yi⊤ + yi a⊤ i − ∆i ) ] ⊤ E[||yi ||22 yi yi⊤ + hai , yi iyi yi⊤ + ||yi ||22 yi a⊤ i − yi yi ∆ i ⊤ +||yi ||22 ai yi⊤ + hai , yi iai yi⊤ + ||yi ||22 ai a⊤ i − ai y i ∆ i 2 ⊤ ⊤ ⊤ +hai , yi iyi yi + ||ai ||2 yi yi + hai , yi iyi ai − yi a⊤ i ∆i = = 2 −∆i yi yi⊤ − ∆i ai yi⊤ − ∆i yi a⊤ i + ∆i ] 2 ⊤ ⊤ ⊤ 2 2 E[||yi ||22 yi yi⊤ ] + ai a⊤ i E[||yi ||2 ] + ||ai ||2 E[yi yi ] + E[hai , yi i(ai yi + yi ai )] − ∆i 2 ⊤ ⊤ 2 E[||yi ||22 yi yi⊤ ] + Tr(∆i )ai a⊤ i + ||ai ||2 ∆i + ai ai ∆i + ∆i ai ai − ∆i Furthermore, E[||yi ||22 yi yi⊤ ] = E[(σ ⊤ ∆i σ)Si σσ ⊤ S⊤ i ] Si E[(σ ⊤ ∆i σ)σσ ⊤ ]S⊤ i = On the other hand, For u 6= v: ⊤ ⊤ (E[(σ ∆i σ)σσ ])u,v = E = " X X σp (∆i )p,q σq σu σv p,q (∆i )p,q E[σp σq σu σv ] p,q = 2(∆i )u,v 32 # For u = v: ⊤ ⊤ (E[(σ ∆i σ)σσ ])u,u = E = " X X σp (∆i )p,q σq σu σu p,q # (∆i )p,q E[σp σq σu2 ] p,q = X (∆i )p,p = Tr(∆i ) p Therefore, E[(σ ⊤ ∆i σ)σσ ⊤ ]  Tr(∆i )I + 2∆i E[||yi ||22 yi yi⊤ ]  2∆2i + Tr(∆i )∆i ⊤ 2 Therefore, by ∆2i  Tr(∆i )∆i , ai a⊤ i ∆i + ∆i ai ai  2||ai ||2 ∆i , we obtain n X i=1 E[Yi2 ]  n X i=1 ⊤ 2 ⊤ ∆2i + Tr(∆i )∆i + Tr(∆i )ai a⊤ i + ||ai ||2 ∆i + ai ai ∆i + ∆i ai ai  [2Tr(∆)max + 3(||a||22 )max ]∆I +  [2Tr(∆)max + 3(||a||22 )max ]∆I +  [2Tr(∆)max + 3(||a||22 )max ]∆I + n X  Tr(∆i )ai a⊤ i i=1 n X i=1 ||ai ||22 Tr(∆i )I (||a||22 )max Tr n X ∆i I i=1  [2Tr(∆)max + 3(||a||22 )max ]∆I + k(||a||22 )max ∆I ! Moreover, ||Yi ||2 ≤ ||∆i ||2 + ||yi yi⊤ ||2 + ||ai yi⊤ ||2 + ||yi a⊤ i ||2 ⊤ = ||∆i ||2 + 2||ai σ ⊤ S⊤ || + ||S σσS || i i 2 i 2 q 2 ≤ ||∆i ||2 + 2 k(||a||2 )max ∆ + k||∆i ||2 q ≤ (k + 1)Tr(∆)max + 2 k(||a||22 )max ∆ where the last inequality is due to ||σσ ⊤ ||2 ≤ k. The lemma then follows by the matrix Bernstein inequality. Now we are ready to prove the lemma for the whitening step. e ∈ Rn×k is Lemma 17. Suppose M∗ , N, W satisfy all assumptions, µ-incoherent column orthogonal matrix X d 1 e e close to U: tan θ(X, U) ≤ 2 where d ≤ 4k√log n , then X ← W HITENING (X, W, d, λ, λ, µ, k) satisfies with high ⊤ probability: (1). For all i ∈ [n], let Di = Diag(Wi ), then 14 λI  X Di X  4λI; (2). X is (5kµ)-incoherent; (3). √ tan θ(X, U) ≤ 4dk log n. Proof of Lemma 17. Firstly we need to show that there is a feasible solution to our SDP relaxation, and then we need to show that the output has the desired properties stated in the lemma. 33 (Existence of a feasible solution) To be specific, we want to show that R = UQ, Ar = Q⊤ (Ur )⊤ Ur Q is a feasible solution to the SDP for some orthogonal matrix Q ∈ Rk×k . Clearly, by setting R and Ar as above, we automatically satisfy: (Rr )⊤ Rr  Ar Tr(Ar ) = ||Rr ||22 = ||QUr ||22 = ||Ur ||22 ≤ n X Ar = r=1 λI  n X Wi,r Ar = r=1 n X µk n Q⊤ (Ur )⊤ Ur Q = Q⊤ U⊤ UQ = I r=1 n X r=1  Wi,r Q⊤ (Ur )⊤ Ur Q = Q⊤ U⊤ Diag(Wi )U Q  λI So we only need to show that there exists orthogonal Q that UQ satisfies the distance constraints: e⊤ ||X ⊥ UQ||2 e 2 ||UQ − X|| ≤ d, ≤ d2 . ≤ e ⊤ (UQ − X) e + (UQ − X) e ⊤ X|| e 2 ||X d, e U) ≤ tan θ(X, e U), so Note that sin θ(X, e ⊤ UQ||2 = ||X e ⊤ U||2 = sin θ(X, e U) ≤ tan θ(X, e U) ≤ d/2 ≤ d. ||X ⊥ ⊥ e U) = Moreover, when tan θ(X, d 2 ≤ 21 , e U) 1 − cos θ(X, e U), ≤ sin θ(X, e U) cos θ(X, e U) ≤ 2sin θ(X, e U). By definition, there exits an orthogonal matrix Q such that and thus by Lemma 4, distc (X, e 2 ≤ 2sin θ(X, e U) ≤ d. ||UQ − X|| e and UQ are orthogonal, we know that Finally, since X which implies e ⊤ (UQ − X) e + (UQ − X) e ⊤X e = −(UQ − X) e ⊤ (UQ − X) e X e ⊤ (UQ − X) e + (UQ − X) e ⊤ X|| e 2 = ||(UQ − X) e ⊤ (UQ − X)|| e 2 ≤ ||(UQ − X) e ⊤ (UQ − X)|| e 2 ≤ d2 . ||X 2 This shows that the solution to our SDP exists. (Desired properties) Now we show that the randomly rounded solution has the required properties with high probability. We first prove some nice properties of X, and then use them to prove the properties of X. Claim 19. X satisfies the following properties. (a). Orthogonality property.  Pr ||X⊤ X − I||2 ≥ (b). Spectral property. " ⊤ Pr ∃i ∈ [n], X Di X − n X r=1 34  1 1 ≤ . 4 8 Wi,r Ar 2 # 1 λ ≤ . ≥ 2 8 (c). Distance property. h i p e ⊤ X||2 ≥ dk log n ≤ 1 . Pr ||X ⊥ 8 (d). Incoherent property. ∀r ∈ [n], (Xr )(Xr )⊤ ≤ µk(k + 1) . n Proof of Claim 19. It is easy to verify that in expectation, the rounded solution satisfies the properties stated: (a). Orthogonality property. E[X⊤ X] = n X E[(Xr )⊤ Xr ] = r=1 n X r=1 n  X Ar = I (Rr )⊤ Rr + Sr E[σ ⊤ σ]Sr = r=1 since Xr = Rr + σSr where Sr is a PSD matrix with S2r = Ar − (Rr )⊤ (Rr ). (b). Spectral property. n n X X E[X⊤ Di X] = E[Wi,r (Xr )⊤ (Xr )] = Wi,r Ar . r=1 r=1 (c). Distance property. e ⊤ X] = X e ⊤ R. E[X ⊥ ⊥ E[X] = R, (d). Incoherent property. E[(Xr )(Xr )⊤ ] = Tr(Ar ). Therefore, we just need to show that the random variables in (a), (b), (c), and (d) concentrate around theirP expectation. n First consider (a). We can apply the matrix concentration lemma (18), for which we need to bound || r=1 ∆r ||2  P Pn r ⊤ r r ⊤ r R⊤ R . (R ) (R ) = σ where ∆r = Ar −(R ) (R ). Note that r=1 Ar = I, it suffices to bound σmin min r e − X, e we have Since R = R + X    e ⊤X e + (R − X) e ⊤ (R − X) e +X e ⊤ (R − X) e + (R − X) e ⊤X e . σmin R⊤ R = σmin X e 2 ≤ d, ||X e ⊤ (R − X) e + (R − X) e ⊤ X|| e 2 ≤ d2 and X e ⊤X e = I, we get Then by ||R − X||  e ⊤ (R − X)|| e 2 − ||X e ⊤ (R − X) e + (R − X) e ⊤ X|| e 2 ≥ 1 − 2d2 . σmin R⊤ R ≥ 1 − ||(R − X) Therefore, n X r=1 = ∆r 2 n X r=1 Ar − n X (Rr )⊤ (Rr ) r=1 2 = I − R⊤ R 2 Using the matrix concentration lemma (18) with ∆ = 2d , Tr(∆)max ≤ that when n is sufficiently large:   1 1 ≤ . Pr X⊤ X − I 2 ≥ 4 8 2 ≤ 2d2 . µk 2 n , (||a||2 )max = µk n ,t = 1/4, we obtain Next consider (b). We can also apply the matrix concentration lemma (18) for each i ∈ [n] and then take the union  bound. Here, ∆r = Wi,r Ar − (Rr )⊤ (Rr ) , so n X r=1 ∆r 2 ≤ n X r=1 Wi,r Ar 2 ≤ λ. 2 Using the matrix concentration lemma (18) with ∆ = λ, Tr(∆)max = µk n ||W||∞ , (||a||2 )max = we obtain that for any i ∈ [n], when r 32k 2 µ||W||∞ log n λ≥ λ, n 35 µk n ||W||∞ , t = λ 2, we have Pr " X⊤ Di X − n X Wi,r Ar r=1 2 # λ 1 ≥ ≤ . 2 8n Taking the union bound leads to the desired property. Now consider (c). By triangle inequality, e ⊤ X||2 ≤ ||X e ⊤ R||2 + ||X e ⊤ (X − R)||2 . ||X ⊥ ⊥ ⊥ e ⊥ ]r )⊤ (X−R)r . Let Zr = ([X e ⊥ ]r )⊤ (X− e ⊤ R||2 ≤ d, so it suffices to bound X e ⊤ (X−R) = Pn ([X By the SDP, ||X ⊥ ⊥ r=1 P n r ⊤ e (X − R) = R) , we have X ⊥ r=1 Zr . Furthermore, E[Zr ] = 0 with E[ n X Zr Z⊤ r ] r=1 E[ n X r=1 2 Z⊤ r Zr ] 2 ≤ E[ ≤ n X r=1 n X (X − R)r [(X − R)r ]⊤ ] ∆r r=1 2 = 2 n X r=1 Tr(∆r ) ≤ 3d2 k, ≤ 3d2 , ||Zr ||2 ≤ 2dk. By Matrix Bernstein inequality, when n is sufficiently large,   1 1 p e⊤ log n ≤ . dk (X − R)|| ≥ Pr ||X 2 ⊥ 2 8 The property then follows from the triangle inequality. Finally, consider (d). We know that Xr = Rr + σSr where Sr is a PSD matrix with S2r = Ar − (Rr )⊤ (Rr ). Therefore, µk(k + 1) . (Xr )(Xr )⊤ = (Rr )(Rr )⊤ + σS2r σ ⊤ ≤ Tr(Ar ) + Tr(Ar )||σ||22 ≤ n This completes the proof of the claim. We are now ready to prove the properties of X = QR(X), the final output of W HITENING . Assume none of the bad events in Claim 19 happen. First, by the spectral property (b) of X in the claim, we have that for any i ∈ [n], λ I  X⊤ Di X  2λI. 2 2 2 Note that ||X⊤ X − I|| ≤ 41 , which implies that σmax (X) ≤ 54 , σmin (X) ≥ 34 . Therefore, for any i ∈ [n], ⊤ 1 λ X⊤ Di X  I 2 σmax (X) 4 ⊤ 1 X⊤ Di X 2 σmin (X) X Di X  and X Di X   4λI. Next, note that e = ||X e⊤ sin θ(X, X) ⊥ X||2 ≤ 1 3 e⊤ 3 p e⊤ ||X ⊥ X||2 ≤ ||X⊥ X||2 ≤ dk log n. σmin (X) 2 2 e U) ≤ tan θ(X, e U) ≤ d , we have Since sin θ(X, 2 sin θ(X, U) ≤ p d 3 p + dk log n ≤ 2dk log n ≤ 1/2. 2 2 36 When sinθ ≤ 1/2, tanθ ≤ 2sinθ. So tan θ(X, U) ≤ 2sin θ(X, U) ≤ 4dk p log n. Finally, for incoherence, we know that ρ(X) ≤ µ(k +1), σmin (X) ≥ 34 . Then the output X satisfies ρ(X) ≤ 4ρ(X) ≤ 5µk. Note: since all the property of output X can be tested in polynomial time (for (3) we can test it using the e because tan θ(X, e U) ≤ d ), we can run the whitening algorithm for O(log(1/α)) times (using fresh input matrix X 2 randomness for the choice of X) and we will have success probability 1 − α. C.3 Final result Theorem 20. If M∗ , W satisfy assumptions (A1)-(A3), and     λσmin (M∗ ) λ2 n √ , , γ = O ||W||∞ = O k 3 µ log n k 2 µλ log n f that with probability ≥ 1 − 1/n satisfies then after O(log(1/ǫ)) rounds Algorithm 5 outputs a matrix M  3/2 √  k log n ∗ f ||M − M ||2 ≤ O ||W ⊙ N||2 + ǫ. λσmin (M∗ ) The running time is polynomial in n and log(1/ǫ). The theorem is stated in its full generality. To emphasize the dependence on the matrix size n, the rank k and the incoherency µ, we can consider a specific range of parameter values where the other parameters (the lower/upper spectral bound, the condition number of M∗ ) are constants, which gives a corollary which is easier to parse. Also, these parameter values show that we can handle a wider range of parameters than the simple algorithm with the clipping as a whitening step. Corollary 21. Suppose λ, λ and σmin (M∗ ) are all constants, and T = O(log(1/ǫ)). Furthermore,     1 n √ , γ=O kWk∞ = O . k 2 µ log n k 3 µ log n Then with probability ≥ 1 − 1/n,   p f − M∗ ||2 ≤ O k 3/2 log n ||W ⊙ N||2 + ǫ. ||M We now consider proving the theorem. After proving these lemmas, the proof is rather immediate. Define the following two quantities: √ √ p 64 k 256k 3/2 log n val = . val = 4k log n, c = λσmin (M∗ ) λσmin (M∗ ) We just need to show that tan θ(Xt , U) ≤ 21t + cδ for every t ≥ 1, and tan θ(Y t , U) ≤ will prove it by induction. (a). After initialization, by Lemma 8 and 17, we have tan θ(Y1 , V) ≤ 4kd1 (b). Suppose tan θ(Xt , U) and tan θ(Y t , V) ≤ 1 2t 1 2t + cδ for every t > 1. We p 1 log n = d1 val = + cδ. 2 + cδ is true for t, and consider the iterates at step t + 1. Since ⊤ Y t is given by W HITENING, by Lemma 17, we know that 41 λI  Yt Di Y t  4λI and Yt is (5kµ)-incoherent. 37 Therefore, applying Lemma 16 we have √ 16 kδ tan θ(Y t , V) e + tan θ(Xt+1 , U) ≤ 4val λσmin (M∗ ) ! √ 1 16 k c δ ≤ t+2 + + 2 val 4val λσmin (M∗ ) √ 1 32 k ≤ t+2 + δ. 2 val λσmin (M∗ ) e t+1 , U) ≤ Now, we know that tan θ(X dt+1 2 for dt+1 = 1 2t+1 val + √ 64 k λσmin (M∗ ) δ. By Lemma 17, tan θ(Xt+1 , U) ≤ dt+1 val ≤ ≤ ! √ 64 k + δ val 2t+1 val λσmin (M∗ ) 1 1 + cδ. 2t+1 1 + cδ. Using exactly the same argument we can show that tan θ(Yt+1 , V) ≤ 2t+1 ∗ f 2 by tan θ(Y T +1 , V), tan θ(XT +1 , U) using the triangle Then the theorem follows by bounding kM − Mk inequality and the spectral property of W. For simplicity, let X = XT +1 and Y = Y T +1 . By definition, we know that there exists Qx and Qy such that XQx = U + ∆x and XQy = V + ∆y where k∆x k2 = O(tan θ(X, U)) and k∆y k2 = O(tan θ(Y, V)). kW ⊙ (M − XΣY⊤ )k2 ≤ kW ⊙ (M − XQx ΣQy Y⊤ )k2 ≤ kW ⊙ (M∗ + N − XQx ΣQy Y⊤ )k2 ≤ kW ⊙ (M∗ + −XQx ΣQy Y⊤ )k2 + kW ⊙ Nk2 ≤ kW ⊙ (M∗ + −XQx ΣQy Y⊤ )k2 + kW ⊙ Nk2 . On the other hand, kW ⊙ (M − XΣY⊤ )k2 ≥ kW ⊙ (M∗ − XΣY⊤ )k2 − kW ⊙ Nk2 . Therefore, kW ⊙ (M∗ − XΣY⊤ )k2 ≤ kW ⊙ (M∗ − XQx ΣQy Y⊤ )k2 + 2kW ⊙ Nk2 = O(tan θ(X, U) + tan θ(Y, V)) + O(kW ⊙ Nk2 ). ⊤ ⊤ Define ∆ = M∗ − XΣY⊤ and ∆′ = XQx ΣQ⊤ y Y − XΣY , and note that the difference between the two is O(tan θ(X, U) + tan θ(Y, V)). k∆k2 ≤ kW ⊙ ∆k2 + k(W − E) ⊙ ∆k2 ≤ kW ⊙ ∆k2 + k(W − E) ⊙ ∆′ k2 + O(tan θ(X, U) + tan θ(Y, V)). So now it is sufficient to show that k(W − E) ⊙ ∆′ k2 ≤ ck∆k2 for a small c < 1/2. Now we apply Lemma 5. Let Z = Qx ΣQ⊤ y − Σ. ⊤ ⊤ k(W − E) ⊙ ∆′ k2 = k(W − E) ⊙ (XQx ΣQ⊤ y Y − XΣY )k2 = k(W − E) ⊙ (XZY⊤ )k2 ≤ ckZk2 38 Wikipedia Commoncrawl with threshold without threshold 1.2 1 spectral gap spectral gap 1 0.8 0.6 0.8 0.6 0.4 0.4 0.2 0.2 0 with threshold without threshold 1.2 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 matrix size matrix size Figure 1: Spectral gap of the weight matrix for word embeddings on two corpora. x-axis: number of words (size of the matrix); y-axis: the spectral gap kW − Ek2 where E is the all-one matrix. for some small c < 1/2, since γ is small and X and Y are incoherent. Note that X and Y are projections, so kZk2 = kXZY⊤ k2 , then k(W − E) ⊙ ∆′ k2 ≤ ck∆k2 . Combining all things we have k∆k2 = O(tan θ(X, U) + tan θ(Y, V)) + O(kW ⊙ Nk2 ) = O(tan θ(X, U) + tan θ(Y, V)), which completes the proof. D Empirical verification of the spectral gap property Experiments on the performance of the alternating minimization can be found in related work (e.g., [Lu et al., 1997, Srebro and Jaakkola, 2003]). Therefore, we focus on verifying the key assumption, i.e., the spectral gap property of the weight matrix (Assumption (A2)). Here we consider the application of computing word embeddings by factorizing the co-occurrence matrix between the words, which is one of the state-of-the-art techniques for mapping words to low-dimensional vectors (about 300 dimension) in natural language processing. There are many variants (e.g., [Levy and Goldberg, 2014, Pennington et al., 2014, Arora et al., 2016]); we consider the following simple approach. Let X be the co-occurrence matrix, where Xi,j is the number of times that word i and word j appear together within a window of small size (we use size 10 here) in the given corpus. Then the word embedding by weighted low rank problem is    2 X Xi,j f (Xi,j ) log − hVi , Vj i min V X i,j P where X = i,j Xi,j , Vi ’s are the vectors for the words, and f (x) = max{Xi,j , 100} for a large corpus and f (x) = max{Xi,j , 10} for a small corpus. We focus on the weight matrix Wi,j = f (Xi,j ). It has been observed that using Xi,j as weights is roughly the maximum likelihood estimator under certain probabilistic model and is better than using uniform weights. It has also been verified that using the truncated weight f (Xi,j ) is better than using Xi,j . Our experiments suggest that f (Xi,j ) is better partially due to the requirement that the weight matrix should have the spectral gap property for the algorithm to succeed. We consider two large corpora (Wikipedia corpus [Wikimedia, 2012], about 3G tokens; a subset of Commoncrawl corpus [Buck et al., 2014], about 20G tokens). For each corpus, we pick the top n words (n = 500, 1000, . . . , 5000) and compute the spectral gap kW − Ek2 where W is the weight matrix corresponding to the words, and E is the 39 all-one matrix. Note that a scaling of W does not affect the problem, so we enumerate different scaling of W (from 2−20 to 210 ) and plot the best spectral gap. We compare the two variants: with threshold (Wi,j = f (Xi,j )), and without threshold (Wi,j = Xi,j ). The results are shown in Figure 1. Without threshold, there is almost no spectral gap. With threshold, there is a decent gap, though with the increase of the matrix size, the gap become smaller because larger vocabulary includes more uneven co-occurrence entries and thus more noise. This suggests that thresholding can make the weight matrix nicer for the algorithm, and thus leads to better performance. 40
8cs.DS